@cognigy/rest-api-client
Version:
Cognigy REST-Client
39 lines • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GET_APP_SESSION_PIN = void 0;
/* Custom modules */
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
/**
* Node name: 'getAppSessionPin'
*
* Purpose:
* Retrieve a short-lived Cognigy App Session PIN.
*/
exports.GET_APP_SESSION_PIN = (0, createNodeDescriptor_1.createNodeDescriptor)({
type: "getAppSessionPin",
defaultLabel: "xApp: Get Session PIN",
summary: "UI__NODE_EDITOR__GET_APP_SESSION_PIN__SUMMARY",
appearance: {
showIcon: false,
},
fields: [],
tags: ["basic", "apps", "xApps"],
tokens: [
{
type: "input",
label: "UI__NODE_EDITOR__GET_APP_SESSION_PIN__TOKEN_XAPP_SESSION_PIN__LABEL",
script: "input.apps.session.pin",
},
{
type: "input",
label: "UI__NODE_EDITOR__GET_APP_SESSION_PIN__TOKEN_XAPP_PIN_PAGE_URL__LABEL",
script: "input.apps.baseUrl",
},
],
function: async ({ cognigy }) => {
const { api } = cognigy;
const appSessionPin = await api.getAppSessionPin();
api.addToInput("apps.session.pin", appSessionPin);
},
});
//# sourceMappingURL=getAppSessionPin.js.map