UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

54 lines 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ADD_LEXICON_KEYPHRASE = void 0; /* Custom modules */ const createNodeDescriptor_1 = require("../../createNodeDescriptor"); /** * Node name: 'addLexiconKeyphrase' * * Purpose: * Adds a keyphrase to a lexicon */ exports.ADD_LEXICON_KEYPHRASE = (0, createNodeDescriptor_1.createNodeDescriptor)({ type: "addLexiconKeyphrase", defaultLabel: "Add Lexicon Keyphrase", summary: "UI__NODE_EDITOR__NLU__ADD_LEXICON_KEY_PHRASE__SUMMARY", appearance: { showIcon: false }, fields: [ { key: "lexiconId", type: "cognigyText", label: "UI__NODE_EDITOR__NLU__ADD_LEXICON_KEY_PHRASE__FIELDS__LEXICONID__LABEL", params: { required: true } }, { key: "keyphrase", type: "cognigyText", label: "UI__NODE_EDITOR__NLU__ADD_LEXICON_KEY_PHRASE__FIELDS__KEYPHRASE__LABEL", params: { required: true } }, { key: "slots", type: "textArray", label: "UI__NODE_EDITOR__NLU__ADD_LEXICON_KEY_PHRASE__FIELDS__SLOTS__LABEL" }, { key: "synonyms", type: "textArray", label: "UI__NODE_EDITOR__NLU__ADD_LEXICON_KEY_PHRASE__FIELDS__SYNONYMS__LABEL" } ], tags: ["data", "nlu"], function: async ({ cognigy, config }) => { const { api } = cognigy; const { lexiconId, keyphrase, slots, synonyms } = config; await api.addLexiconKeyphrase(lexiconId, keyphrase, slots, synonyms); } }); //# sourceMappingURL=addLexiconKeyphrase.js.map