@cognigy/rest-api-client
Version:
Cognigy REST-Client
375 lines • 61.2 kB
JavaScript
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResourcesAPIGroup_2_0 = void 0;
const GenericAPIFn_1 = require("../GenericAPIFn");
const query_1 = require("../shared/helper/rest/query");
const GenericUploadFn_1 = require("../GenericUploadFn");
const GenericTusFn_1 = require("../GenericTusFn");
const agentAPI_1 = require("./aiAgentsV2/agentAPI");
const agentPersonaAPI_1 = require("./aiAgentsV2/agentPersonaAPI");
const toolDescriptorAPI_1 = require("./aiAgentsV2/toolDescriptorAPI");
const toolAPI_1 = require("./aiAgentsV2/toolAPI");
const skillAPI_1 = require("./aiAgentsV2/skillAPI");
const builtinToolAPI_1 = require("./aiAgentsV2/builtinToolAPI");
const builtinSkillAPI_1 = require("./aiAgentsV2/builtinSkillAPI");
const setupAPI_1 = require("./aiAgentsV2/setupAPI");
const workflowAPI_1 = require("./aiAgentsV2/workflowAPI");
const evalProfileAPI_1 = require("./serviceToolkit/evalProfileAPI");
const ResourcesAPIGroup_2_0 = (instance) => {
const self = instance;
const agentAPIs = (0, agentAPI_1.addAgentAPIs)(self);
const agentPersonaAPIs = (0, agentPersonaAPI_1.addAgentPersonaAPIs)(self);
const toolDescriptorAPIs = (0, toolDescriptorAPI_1.addToolDescriptorAPIs)(self);
const toolAPIs = (0, toolAPI_1.addToolAPIs)(self);
const skillAPIs = (0, skillAPI_1.addSkillAPIs)(self);
const builtinToolAPIs = (0, builtinToolAPI_1.addBuiltinToolAPIs)(self);
const builtinSkillAPIs = (0, builtinSkillAPI_1.addBuiltinSkillAPIs)(self);
const setupAPIs = (0, setupAPI_1.addSetupAPIs)(self);
const workflowAPIs = (0, workflowAPI_1.addWorkflowAPIs)(self);
const evalProfileAPIs = (0, evalProfileAPI_1.addEvalProfileAPIs)(self);
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, agentAPIs), agentPersonaAPIs), toolDescriptorAPIs), toolAPIs), skillAPIs), builtinToolAPIs), builtinSkillAPIs), setupAPIs), workflowAPIs), evalProfileAPIs), { searchResources: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/search?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), indexFlows: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), batchFlows: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows?${(0, query_1.stringifyQuery)({ projectId })}`, "PATCH", self)(args, options);
}, createChildFlow: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/chart/nodes/childflow`, "POST", self)(args, options);
}, createFlow: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/flows", "POST", self)(args, options), readFlow: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, updateFlow: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}`, "PATCH", self)(args, options);
}, deleteFlow: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${args.flowId}`, "DELETE", self)(undefined, options), cloneFlow: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/clone`, "POST", self)(args, options);
}, addFlowLocalization: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/addlocalization`, "POST", self)(args, options);
}, removeFlowLocalization: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/removelocalization`, "POST", self)(args, options);
},
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
indexFlowStates: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
},
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
batchFlowStates: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states`, "PATCH", self)(args, options);
},
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
createFlowState: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states`, "POST", self)(args, options);
},
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
readFlowState: ({ flowId, stateId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states/${stateId}`, "GET", self)(undefined, options),
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
updateFlowState: (_a, options) => {
var { flowId, stateId } = _a, args = __rest(_a, ["flowId", "stateId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states/${stateId}`, "PATCH", self)(args, options);
},
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
deleteFlowState: ({ flowId, stateId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states/${stateId}`, "DELETE", self)(undefined, options),
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
addIntentToFlowState: (_a, options) => {
var { flowId, stateId } = _a, args = __rest(_a, ["flowId", "stateId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states/${stateId}/addintent`, "POST", self)(args, options);
},
/** @deprecated The "State" feature has been deprecated since 2026.7.0 and will be removed in an upcoming release. */
removeIntentFromFlowState: (_a, options) => {
var { flowId, stateId } = _a, args = __rest(_a, ["flowId", "stateId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/states/${stateId}/removeintent`, "POST", self)(args, options);
}, readFlowSettings: ({ flowId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/settings`, "GET", self)(undefined, options), updateFlowSettings: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/settings`, "PATCH", self)(args, options);
}, indexLexicons: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), batchLexicons: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons?${(0, query_1.stringifyQuery)({ projectId })}`, "PATCH", self)(args, options);
}, createLexicon: (_a, options) => {
var { shouldGenerateLexiconEntries, shouldGenerateSynonyms, generateLexiconEntriesLimit, defaultSlot, languageCode } = _a, args = __rest(_a, ["shouldGenerateLexiconEntries", "shouldGenerateSynonyms", "generateLexiconEntriesLimit", "defaultSlot", "languageCode"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons?${(0, query_1.stringifyQuery)({
shouldGenerateLexiconEntries,
shouldGenerateSynonyms,
generateLexiconEntriesLimit,
defaultSlot,
languageCode
})}`, "POST", self)(args, options);
}, readLexicon: ({ lexiconId, metaOnly }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}?${(0, query_1.stringifyQuery)({ metaOnly })}`, "GET", self)(undefined, options), updateLexicon: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}`, "PATCH", self)(args, options);
}, deleteLexicon: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${args.lexiconId}`, "DELETE", self)(undefined, options), indexLexiconEntries: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, batchLexiconEntries: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries`, "PATCH", self)(args, options);
}, createLexiconEntry: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries`, "POST", self)(args, options);
}, updateLexiconEntry: (_a, options) => {
var { lexiconId, entryId } = _a, args = __rest(_a, ["lexiconId", "entryId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries/${entryId}`, "PATCH", self)(args, options);
}, deleteLexiconEntry: ({ lexiconId, entryId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries/${entryId}`, "DELETE", self)(undefined, options), indexLexiconEntryKeyphrases: (_a, options) => {
var { lexiconId, entryId } = _a, args = __rest(_a, ["lexiconId", "entryId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries/${entryId}/keyphrases?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, addKeyphraseToLexiconEntry: (_a, options) => {
var { lexiconId, entryId } = _a, args = __rest(_a, ["lexiconId", "entryId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries/${entryId}/keyphrases`, "POST", self)(args, options);
}, removeKeyphraseFromLexiconEntry: ({ lexiconId, entryId, keyphraseId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries/${entryId}/keyphrases/${keyphraseId}`, "POST", self)(undefined, options), indexLexiconKeyphrases: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/keyphrases?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, updateLexiconKeyphrase: (_a, options) => {
var { lexiconId, keyphraseId } = _a, args = __rest(_a, ["lexiconId", "keyphraseId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/keyphrases/${keyphraseId}`, "PATCH", self)(args, options);
}, indexLexiconSlots: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/slots?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, batchLexiconSlots: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/slots`, "PATCH", self)(args, options);
}, createLexiconSlot: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/slots`, "POST", self)(args, options);
}, updateLexiconSlot: (_a, options) => {
var { lexiconId, slotId } = _a, args = __rest(_a, ["lexiconId", "slotId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/slots/${slotId}`, "PATCH", self)(args, options);
}, deleteLexiconSlot: ({ lexiconId, slotId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/slots/${slotId}`, "DELETE", self)(undefined, options), addSlotToLexiconEntry: (_a, options) => {
var { lexiconId, entryId } = _a, args = __rest(_a, ["lexiconId", "entryId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries/${entryId}/slots`, "POST", self)(args, options);
}, removeSlotFromLexiconEntry: ({ lexiconId, entryId, slotId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/entries/${entryId}/slots/${slotId}`, "POST", self)(undefined, options), importIntoLexicon: (_a, options) => {
var { lexiconId } = _a, args = __rest(_a, ["lexiconId"]);
return (0, GenericUploadFn_1.GenericUploadFn)(`/new/v2.0/lexicons/${lexiconId}/import`, "POST", self)(args, options);
}, exportFromLexicon: ({ lexiconId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/export`, "GET", self)(undefined, options), composeLexiconDownloadLink: ({ lexiconId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/lexicons/${lexiconId}/downloadlink`, "POST", self)(undefined, options), indexEndpoints: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), batchEndpoints: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints?${(0, query_1.stringifyQuery)({ projectId })}`, "PATCH", self)(args, options);
}, createEndpoint: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/endpoints", "POST", self)(args, options), readEndpoint: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints/${args.endpointId}`, "GET", self)(undefined, options), updateEndpoint: (_a, options) => {
var { endpointId } = _a, args = __rest(_a, ["endpointId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints/${endpointId}`, "PATCH", self)(args, options);
}, deleteEndpoint: (args, options) => {
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints/${args.endpointId}?channelType=${args === null || args === void 0 ? void 0 : args.channelType}`, "DELETE", self)(undefined, options);
}, createEndpointApiKey: (_a, options) => {
var { endpointId } = _a, args = __rest(_a, ["endpointId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints/${endpointId}/apikeys`, "POST", self)(args, options);
}, listEndpointApiKeys: ({ endpointId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints/${endpointId}/apikeys`, "GET", self)(undefined, options), deleteEndpointApiKey: ({ endpointId, keyId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/endpoints/${endpointId}/apikeys/${keyId}`, "DELETE", self)(undefined, options), indexGoals: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/goals?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), createGoal: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/goals", "POST", self)(args, options), readGoal: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/goals/${args.goalId}`, "GET", self)(undefined, options), updateGoal: (_a, options) => {
var { goalId } = _a, args = __rest(_a, ["goalId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/goals/${goalId}`, "PATCH", self)(args, options);
}, deleteGoal: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/goals/${args.goalId}`, "DELETE", self)(undefined, options), indexHandoverServices: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/services?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), indexHandoverProviders: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), createHandoverProvider: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/handover/providers", "POST", self)(args, options), readHandoverProvider: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers/${args.handoverProviderId}`, "GET", self)(undefined, options), updateHandoverProvider: (_a, options) => {
var { handoverProviderId } = _a, args = __rest(_a, ["handoverProviderId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers/${handoverProviderId}`, "PATCH", self)(args, options);
}, deleteHandoverProvider: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/handover/providers/${args.handoverProviderId}?${(0, query_1.stringifyQuery)({ projectId: args.projectId })}`, "DELETE", self)(undefined, options), indexPlaybooks: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), batchPlaybooks: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks?${(0, query_1.stringifyQuery)({ projectId })}`, "PATCH", self)(args, options);
}, createPlaybook: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/playbooks", "POST", self)(args, options), readPlaybook: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${args.playbookId}`, "GET", self)(undefined, options), updatePlaybook: (_a, options) => {
var { playbookId } = _a, args = __rest(_a, ["playbookId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}`, "PATCH", self)(args, options);
}, deletePlaybook: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${args.playbookId}`, "DELETE", self)(undefined, options), schedulePlaybook: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${args.playbookId}/schedule`, "POST", self)(args, options), createPlaybookStep: (_a, options) => {
var { playbookId } = _a, args = __rest(_a, ["playbookId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/steps`, "POST", self)(args, options);
}, updatePlaybookStep: (_a, options) => {
var { playbookId, stepId } = _a, args = __rest(_a, ["playbookId", "stepId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/steps/${stepId}`, "PATCH", self)(args, options);
}, deletePlaybookStep: ({ playbookId, stepId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/steps/${stepId}`, "DELETE", self)(undefined, options), createPlaybookStepAssert: (_a, options) => {
var { playbookId, stepId } = _a, args = __rest(_a, ["playbookId", "stepId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/steps/${stepId}/asserts`, "POST", self)(args, options);
}, updatePlaybookStepAssert: (_a, options) => {
var { playbookId, stepId, assertId } = _a, args = __rest(_a, ["playbookId", "stepId", "assertId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/steps/${stepId}/asserts/${assertId}`, "PATCH", self)(args, options);
}, deletePlaybookStepAssert: ({ playbookId, stepId, assertId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/steps/${stepId}/asserts/${assertId}`, "DELETE", self)(undefined, options), changePlaybookStepOrder: (_a, options) => {
var { playbookId } = _a, args = __rest(_a, ["playbookId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/steps/order`, "POST", self)(args, options);
}, indexPlaybookRuns: (_a, options) => {
var { playbookId } = _a, args = __rest(_a, ["playbookId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/runs?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(args, options);
}, readPlaybookRun: (_a, options) => {
var { playbookId, playbookRunId } = _a, args = __rest(_a, ["playbookId", "playbookRunId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/runs/${playbookRunId}`, "GET", self)(undefined, options);
}, deletePlaybookRun: ({ playbookId, playbookRunId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/playbooks/${playbookId}/runs/${playbookRunId}`, "DELETE", self)(undefined, options), indexProjects: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(args, options), createProject: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/projects", "POST", self)(args, options), createProjectByTemplate: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/projects/createbytemplate", "POST", self)(args, options), readProject: ({ projectId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}`, "GET", self)(undefined, options), updateProject: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}`, "PATCH", self)(args, options);
}, deleteProject: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${args.projectId}`, "DELETE", self)(undefined, options), validateProjectName: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/projects/validateprojectname", "POST", self)(args, options), graphProject: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/graph?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(args, options);
}, trainAllProjectFlows: ({ projectId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/trainallflows`, "POST", self)(options), readProjectSettings: ({ projectId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/settings`, "GET", self)(undefined, options), updateProjectSettings: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/settings`, "PATCH", self)(args, options);
}, setupCognigyGenerativeAI: ({ projectId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/settings/setupgenerativeai`, "POST", self)(options), indexSnippets: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/snippets?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, createSnippet: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/snippets`, "POST", self)(args, options);
}, deleteSnippet: ({ projectId, snippetId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/snippets/${snippetId}`, "DELETE", self)(undefined, options), readChart: (_a, options) => {
var { resourceId, resourceType } = _a, args = __rest(_a, ["resourceId", "resourceType"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, indexChartNodes: (_a, options) => {
var { resourceId, resourceType } = _a, args = __rest(_a, ["resourceId", "resourceType"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, createChartNode: (_a, options) => {
var { resourceId, resourceType } = _a, args = __rest(_a, ["resourceId", "resourceType"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes`, "POST", self)(args, options);
}, searchChartNodes: (_a, options) => {
var { resourceId, resourceType } = _a, args = __rest(_a, ["resourceId", "resourceType"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/search?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(args, options);
}, readChartNode: (_a, options) => {
var { resourceId, resourceType, nodeId } = _a, args = __rest(_a, ["resourceId", "resourceType", "nodeId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, updateChartNode: (_a, options) => {
var { resourceId, resourceType, nodeId } = _a, args = __rest(_a, ["resourceId", "resourceType", "nodeId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}`, "PATCH", self)(args, options);
}, deleteChartNode: ({ resourceId, resourceType, nodeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}`, "DELETE", self)(undefined, options), addChartNodeLocalization: (_a, options) => {
var { resourceId, resourceType, nodeId } = _a, args = __rest(_a, ["resourceId", "resourceType", "nodeId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}/addlocalization`, "POST", self)(args, options);
}, removeChartNodeLocalization: (_a, options) => {
var { resourceId, resourceType, nodeId } = _a, args = __rest(_a, ["resourceId", "resourceType", "nodeId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}/removelocalization`, "POST", self)(args, options);
}, moveChartNode: (_a, options) => {
var { resourceId, resourceType, nodeId } = _a, args = __rest(_a, ["resourceId", "resourceType", "nodeId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}/move`, "POST", self)(args, options);
}, copyChartNode: ({ resourceId, resourceType, nodeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}/copy`, "POST", self)(undefined, options), cutChartNode: ({ resourceId, resourceType, nodeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}/cut`, "POST", self)(undefined, options), pasteChartNode: ({ resourceId, resourceType, nodeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/nodes/${nodeId}/paste`, "POST", self)(undefined, options), undoChart: ({ resourceId, resourceType }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/undo`, "POST", self)(undefined, options), redoChart: ({ resourceId, resourceType }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/redo`, "POST", self)(undefined, options), getUndoRedoSteps: ({ resourceId, resourceType }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/undoredosteps`, "GET", self)(undefined, options), indexNodeDescriptors: ({ resourceType, resourceId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/${resourceType}s/${resourceId}/chart/descriptors`, "GET", self)(undefined, options), indexIntents: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, batchIntents: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents`, "PATCH", self)(args, options);
}, createIntent: (_a, options) => {
var { flowId, shouldGenerateSentences, generateSentenceLimit } = _a, args = __rest(_a, ["flowId", "shouldGenerateSentences", "generateSentenceLimit"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents?${(0, query_1.stringifyQuery)({
shouldGenerateSentences,
generateSentenceLimit
})}`, "POST", self)(args, options);
}, readIntent: (_a, options) => {
var { intentId, flowId } = _a, args = __rest(_a, ["intentId", "flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, updateIntent: (_a, options) => {
var { intentId, flowId } = _a, args = __rest(_a, ["intentId", "flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}`, "PATCH", self)(args, options);
}, deleteIntent: ({ intentId, flowId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}`, "DELETE", self)(undefined, options), importIntents: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericUploadFn_1.GenericUploadFn)(`/new/v2.0/flows/${flowId}/intents/import`, "POST", self)(args, options);
}, exportIntents: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/export`, "POST", self)(args, options);
}, addIntentLocalization: (_a, options) => {
var { intentId, flowId } = _a, args = __rest(_a, ["intentId", "flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/addlocalization`, "POST", self)(args, options);
}, removeIntentLocalization: (_a, options) => {
var { intentId, flowId } = _a, args = __rest(_a, ["intentId", "flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/removelocalization`, "POST", self)(args, options);
}, indexSlotFillers: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/slotfillers?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, batchSlotFillers: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/slotfillers`, "PATCH", self)(args, options);
}, createSlotFiller: (_a, options) => {
var { flowId } = _a, args = __rest(_a, ["flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/slotfillers`, "POST", self)(args, options);
}, readSlotFiller: (_a, options) => {
var { slotFillerId, flowId } = _a, args = __rest(_a, ["slotFillerId", "flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/slotfillers/${slotFillerId}?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, updateSlotFiller: (_a, options) => {
var { slotFillerId, flowId } = _a, args = __rest(_a, ["slotFillerId", "flowId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/slotfillers/${slotFillerId}`, "PATCH", self)(args, options);
}, deleteSlotFiller: ({ slotFillerId, flowId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/slotfillers/${slotFillerId}`, "DELETE", self)(undefined, options), indexSentences: (_a, options) => {
var { flowId, intentId } = _a, args = __rest(_a, ["flowId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/sentences?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, batchIntentSentences: (_a, options) => {
var { flowId, intentId } = _a, args = __rest(_a, ["flowId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/sentences`, "PATCH", self)(args, options);
}, createSentence: (_a, options) => {
var { flowId, intentId } = _a, args = __rest(_a, ["flowId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/sentences`, "POST", self)(args, options);
}, readSentence: ({ sentenceId, intentId, flowId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/sentences/${sentenceId}`, "GET", self)(undefined, options), updateSentence: (_a, options) => {
var { flowId, intentId, sentenceId } = _a, args = __rest(_a, ["flowId", "intentId", "sentenceId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/sentences/${sentenceId}`, "PATCH", self)(args, options);
}, deleteSentence: ({ sentenceId, intentId, flowId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/sentences/${sentenceId}`, "DELETE", self)(undefined, options), generateSentences: ({ intentId, flowId, localeId, limit }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/${intentId}/sentences/generate?${(0, query_1.stringifyQuery)({ localeId, limit })}`, "POST", self)(undefined, options), indexLearningSentences: (_a, options) => {
var { flowId, intentId } = _a, args = __rest(_a, ["flowId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/learningsentences?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, readLearningSentence: ({ learningSentenceId, flowId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/learningsentences/${learningSentenceId}`, "GET", self)(undefined, options), deleteLearningSentence: ({ learningSentenceId, flowId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/learningsentences/${learningSentenceId}`, "DELETE", self)(undefined, options), indexNLUConnectors: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/nluconnectors?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), batchNLUConnectors: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/nluconnectors?${(0, query_1.stringifyQuery)({ projectId })}`, "PATCH", self)(args, options);
}, createNLUConnector: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/nluconnectors", "POST", self)(args, options), readNLUConnector: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/nluconnectors/${args.nluConnectorId}`, "GET", self)(undefined, options), updateNLUConnector: (_a, options) => {
var { nluConnectorId } = _a, args = __rest(_a, ["nluConnectorId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/nluconnectors/${nluConnectorId}`, "PATCH", self)(args, options);
}, deleteNLUConnector: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/nluconnectors/${args.nluConnectorId}`, "DELETE", self)(undefined, options), indexExtensions: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/extensions?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), readExtension: ({ extensionId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/extensions/${extensionId}`, "GET", self)(undefined, options), deleteExtension: ({ extensionId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/extensions/${extensionId}`, "DELETE", self)(undefined, options), updateExtension: (_a, options) => {
var { extensionId } = _a, args = __rest(_a, ["extensionId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/extensions/${extensionId}`, "PATCH", self)(args, options);
}, uploadExtension: (args, options) => (args.file
? (0, GenericUploadFn_1.GenericUploadFn)("/new/v2.0/extensions/upload", "POST", self)
: (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/extensions/upload", "POST", self))(args, options), updateExtensionPackage: (args, options) => (args.file
? (0, GenericUploadFn_1.GenericUploadFn)("/new/v2.0/extensions/update", "POST", self)
: (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/extensions/update", "POST", self))(args, options), indexSnapshots: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/snapshots?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), createSnapshot: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/snapshots", "POST", self)(args, options), readSnapshot: ({ snapshotId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/snapshots/${snapshotId}`, "GET", self)(undefined, options), deleteSnapshot: ({ snapshotId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/snapshots/${snapshotId}`, "DELETE", self)(undefined, options), composeSnapshotDownloadLink: ({ snapshotId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/snapshots/${snapshotId}/downloadlink`, "POST", self)(undefined, options), packageSnapshot: ({ snapshotId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/snapshots/${snapshotId}/package`, "POST", self)(undefined, options), uploadSnapshotPackage: (args, options) => (0, GenericUploadFn_1.GenericUploadFn)("/new/v2.0/snapshots/upload", "POST", self)(args, options), indexResourcesInSnapshot: (_a, options) => {
var { snapshotId } = _a, args = __rest(_a, ["snapshotId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/snapshots/${snapshotId}/resources?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, restoreSnapshot: (_a, options) => {
var { snapshotId } = _a, args = __rest(_a, ["snapshotId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/snapshots/${snapshotId}/restore`, "POST", self)(args, options);
}, trainIntents: (_a, options) => {
var { flowId, localeId, mode } = _a, args = __rest(_a, ["flowId", "localeId", "mode"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/flows/${flowId}/intents/train?${(0, query_1.stringifyQuery)(args)}`, "POST", self)({ localeId, mode }, options);
}, indexConnections: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), batchConnections: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections?${(0, query_1.stringifyQuery)({ projectId })}`, "PATCH", self)(args, options);
}, createConnection: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/connections", "POST", self)(args, options), readConnection: ({ connectionId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections/${connectionId}`, "GET", self)(undefined, options), updateConnection: (_a, options) => {
var { connectionId } = _a, args = __rest(_a, ["connectionId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections/${connectionId}`, "PATCH", self)(args, options);
}, deleteConnection: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections/${args.connectionId}`, "DELETE", self)(undefined, options), createConnectionField: (_a, options) => {
var { connectionId } = _a, args = __rest(_a, ["connectionId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections/${connectionId}/fields`, "POST", self)(args, options);
}, deleteConnectionField: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections/${args.connectionId}/fields/${encodeURIComponent(args.fieldName)}`, "DELETE", self)(undefined, options), indexConnectionSchemas: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/connections/schemas?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), indexLocales: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), createLocale: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/locales", "POST", self)(args, options), readLocale: ({ localeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}`, "GET", self)(undefined, options), updateLocale: (_a, options) => {
var { localeId } = _a, args = __rest(_a, ["localeId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}`, "PATCH", self)(args, options);
}, deleteLocale: ({ localeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}`, "DELETE", self)(undefined, options), indexFunctions: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), createFunction: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/functions", "POST", self)(args, options), readFunction: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${args.functionId}`, "GET", self)(undefined, options), updateFunction: (_a, options) => {
var { functionId } = _a, args = __rest(_a, ["functionId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${functionId}`, "PATCH", self)(args, options);
}, deleteFunction: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${args.functionId}`, "DELETE", self)(undefined, options), triggerFunction: ({ functionId, parameters }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${functionId}/trigger`, "POST", self)(parameters, options), indexFunctionInstances: (_a, options) => {
var { functionId } = _a, args = __rest(_a, ["functionId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${functionId}/instances?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
}, readFunctionInstance: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${args.functionId}/instances/${args.functionInstanceId}`, "GET", self)(undefined, options), stopFunctionInstance: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${args.functionId}/instances/${args.functionInstanceId}/stop`, "POST", self)(undefined, options), indexPackages: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/packages?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), createPackage: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/packages", "POST", self)(args, options), readPackage: ({ packageId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/packages/${packageId}`, "GET", self)(undefined, options), deletePackage: ({ packageId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/packages/${packageId}`, "DELETE", self)(undefined, options), composePackageDownloadLink: ({ packageId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/packages/${packageId}/downloadlink`, "POST", self)(undefined, options), mergePackage: (_a, options) => {
var { packageId } = _a, args = __rest(_a, ["packageId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/packages/${packageId}/merge`, "POST", self)(args, options);
}, uploadPackage: (args, options) => (0, GenericUploadFn_1.GenericUploadFn)("/new/v2.0/packages/upload", "POST", self)(args, options), optionsResolver: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/optionsResolver", "POST", self)(args, options), uploadFile: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericUploadFn_1.GenericUploadFn)(`/new/v2.0/files/upload?${(0, query_1.stringifyQuery)({ projectId })}`, "POST", self)(args, options);
}, indexAudioPreviewLanguages: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/audio/preview/languages?${(0, query_1.stringifyQuery)({ projectId })}`, "GET", self)(args, options);
}, voicePrepareCall: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/audio/preparecall", "POST", self)(args, options), readYesNoIntents: (_a, options) => {
var { localeId } = _a, args = __rest(_a, ["localeId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents`, "GET", self)(args, options);
}, trainYesNoIntents: ({ localeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents/train`, "POST", self)(undefined, options), trainYesNoIntentsProject: ({ projectId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/locales/yesnointents/train`, "POST", self)(undefined, options), updateYesNoIntents: (_a, options) => {
var { localeId, intentId } = _a, args = __rest(_a, ["localeId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents/${intentId}`, "PATCH", self)(args, options);
}, deleteYesNoIntents: (_a, options) => {
var { localeId, intentId } = _a, args = __rest(_a, ["localeId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents/${intentId}`, "DELETE", self)(args, options);
}, createYesNoSentence: (_a, options) => {
var { localeId, intentId } = _a, args = __rest(_a, ["localeId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents/${intentId}/sentences`, "POST", self)(args, options);
}, updateYesNoSentence: (_a, options) => {
var { localeId, intentId, sentenceId } = _a, args = __rest(_a, ["localeId", "intentId", "sentenceId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents/${intentId}/sentences/${sentenceId}`, "PATCH", self)(args, options);
}, deleteYesNoSentence: (_a, options) => {
var { localeId, intentId, sentenceId } = _a, args = __rest(_a, ["localeId", "intentId", "sentenceId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents/${intentId}/sentences/${sentenceId}`, "DELETE", self)(args, options);
}, indexYesNoSentences: (_a, options) => {
var { localeId, intentId } = _a, args = __rest(_a, ["localeId", "intentId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}/yesnointents/${intentId}/sentences?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(args, options);
}, testVoiceProvider: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/audio/voiceprovider/test", "POST", self)(args, options), testTranslationSettings: (_a, options) => {
var { projectId } = _a, args = __rest(_a, ["projectId"]);
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/settings/translation/test`, "POST", self)(args, options);
}, indexAgentAssistConfigs: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/aicopilotconfigs?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options), createAgentAssistConfig: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/aicopilotconfigs", "POST", self)(args, options)