getActs
getActs: ( schema: string )
get actions of schema of main service
Example
const coreApp = lesan();
const locationPure = {
name: string(),
population: number(),
abb: string(),
};
const cities = coreApp.odm.newModel(
"city",
locationPure,
{
country: {
schemaName: "country",
type: "single",
optional: false,
relatedRelations: {
cities: {
type: "multiple",
limit: 5,
sort: {
field: "_id",
order: "asc",
},
},
},
},
},
);
const getCityActs = coreApp.acts.getActs("city");
Return Of Example:
"addCity": {
"validator": {
"type": "object",
"schema": {
"set": {
"type": "object",
"schema": {
"name": {
"type": "string",
"schema": null
},
"population": {
"type": "number",
"schema": null
},
"abb": {
"type": "string",
"schema": null
},
"isCapital": {
"type": "boolean",
"schema": null
},
"country": {
"type": "union",
"schema": null
}
}
},
}
},
"validationRunType": "assert"
}
Parameters
schema: string;