UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

39 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SLEEP = void 0; /* Custom modules */ const createNodeDescriptor_1 = require("../../createNodeDescriptor"); /** * Node name: 'pause' * * Purpose: * Pauses the Flow */ exports.SLEEP = (0, createNodeDescriptor_1.createNodeDescriptor)({ type: "sleep", defaultLabel: "Sleep", summary: "UI__NODE_EDITOR__SLEEP__SUMMARY", appearance: { showIcon: false }, fields: [ { key: "milliseconds", type: "number", label: "UI__NODE_EDITOR__SLEEP__MILLISECONDS__LABEL", params: { required: true } }, ], preview: { key: "milliseconds", type: "text" }, tags: ["logic", "wait", "sleep"], function: async ({ config }) => { const { milliseconds } = config; await new Promise(resolve => setTimeout(resolve, milliseconds)); } }); //# sourceMappingURL=sleep.js.map