@cognigy/rest-api-client
Version:
Cognigy REST-Client
37 lines • 1.2 kB
JavaScript
import { __awaiter } from "tslib";
/* Custom modules */
import { createNodeDescriptor } from "../../createNodeDescriptor";
/**
* Node name: 'getAppSessionPin'
*
* Purpose:
* Retrieve a short-lived Cognigy App Session PIN.
*/
export const GET_APP_SESSION_PIN = 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: ({ cognigy }) => __awaiter(void 0, void 0, void 0, function* () {
const { api } = cognigy;
const appSessionPin = yield api.getAppSessionPin();
api.addToInput("apps.session.pin", appSessionPin);
}),
});
//# sourceMappingURL=getAppSessionPin.js.map