@cognigy/rest-api-client
Version:
Cognigy REST-Client
33 lines • 955 B
JavaScript
import { __awaiter } from "tslib";
/* Custom modules */
import { createNodeDescriptor } from "../../createNodeDescriptor";
/**
* Node name: 'code'
*
* Purpose:
* Executes custom TypeScript code
*/
export const CODE = createNodeDescriptor({
type: "code",
defaultLabel: "Code",
summary: "UI__NODE_EDITOR__CODE__SUMMARY",
appearance: {
color: "#EF5F5E",
showIcon: false
},
fields: [
{
key: "code",
type: "code",
label: "UI__NODE_EDITOR__CODE__FIELDS__CODE__LABEL",
description: "UI__NODE_EDITOR__CODE__FIELDS__CODE__DESCRIPTION",
}
],
tags: ["basic", "data", "javascript", "typescript"],
function: (codeParams) => __awaiter(void 0, void 0, void 0, function* () {
const { cognigy } = codeParams;
const { api } = cognigy;
yield api.executeCodeInSecureContext(codeParams);
})
});
//# sourceMappingURL=code.js.map