getActsKeys
getActsKeys: (
service: keyof typeof acts,
schema: string,
)
get actions of schema of specific 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 getCityActsKeys = coreApp.acts.getActsKeys("main", "city");
Return Of Example
[
"addCity",
"updateCity",
"addCities",
"getCities",
"addCityCountry"
]
Parameters
schema: string;
service: keyof typeof acts;
acts: Services;