UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

42 lines 1.39 kB
import { __awaiter } from "tslib"; /* Custom modules */ import { createNodeDescriptor } from "../../createNodeDescriptor"; /** * Node name: 'setAppState' * * Purpose: * Set the state of a Cognigy App Template. */ export const SET_APP_STATE = createNodeDescriptor({ type: "setAppState", defaultLabel: "xApp: Set State", summary: "UI__NODE_EDITOR__SET_APP_STATE__SUMMARY", appearance: { showIcon: false, }, fields: [ { key: "appTemplateId", type: "cognigyText", label: "UI__NODE_EDITOR__SET_APP_STATE__APP_TEMPLATE_ID__LABEL", description: "UI__NODE_EDITOR__SET_APP_STATE__APP_TEMPLATE_ID__DESCRIPTION", params: { required: true, }, }, { key: "appTemplateData", type: "json", label: "UI__NODE_EDITOR__SET_APP_STATE__APP_TEMPLATE_DATA__LABEL", description: "UI__NODE_EDITOR__SET_APP_STATE__APP_TEMPLATE_DATA__DESCRIPTION", defaultValue: "{}", }, ], tags: ["basic", "apps", "xApps"], function: ({ cognigy, config }) => __awaiter(void 0, void 0, void 0, function* () { const { api } = cognigy; const { appTemplateId, appTemplateData } = config; api.setAppState(appTemplateId, appTemplateData); }), }); //# sourceMappingURL=setAppState.js.map