UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

37 lines 957 B
import { __awaiter } from "tslib"; /* Custom modules */ import { createNodeDescriptor } from "../../createNodeDescriptor"; /** * Node name: 'pause' * * Purpose: * Pauses the Flow */ export const SLEEP = 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: ({ config }) => __awaiter(void 0, void 0, void 0, function* () { const { milliseconds } = config; yield new Promise(resolve => setTimeout(resolve, milliseconds)); }) }); //# sourceMappingURL=sleep.js.map