@cognigy/rest-api-client
Version:
Cognigy REST-Client
19 lines • 1.01 kB
JavaScript
import { __rest } from "tslib";
import { GenericAPIFn } from "../../GenericAPIFn";
import { stringifyQuery } from "../../shared/helper/rest";
export function addSkillAPIs(self) {
return {
indexSkills: (args, options) => GenericAPIFn(`/v1/skills?${stringifyQuery(args)}`, "GET", self)(undefined, options),
createSkill: (args, options) => GenericAPIFn("/v1/skills", "POST", self)(args, options),
readSkill: (_a, options) => {
var { skillId } = _a, args = __rest(_a, ["skillId"]);
return GenericAPIFn(`/v1/skills/${skillId}?${stringifyQuery(args)}`, "GET", self)(undefined, options);
},
updateSkill: (_a, options) => {
var { skillId } = _a, args = __rest(_a, ["skillId"]);
return GenericAPIFn(`/v1/skills/${skillId}`, "PATCH", self)(args, options);
},
deleteSkill: ({ skillId }, options) => GenericAPIFn(`/v1/skills/${skillId}`, "DELETE", self)(undefined, options)
};
}
//# sourceMappingURL=skillAPI.js.map