UNPKG

zeebe-node

Version:

The Node.js client library for the Zeebe Workflow Automation Engine.

23 lines 986 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringifyVariables = exports.parseVariablesAndCustomHeadersToJSON = exports.parseVariables = void 0; function parseVariables(response) { return Object.assign({}, response, { variables: JSON.parse(response.variables || '{}'), }); } exports.parseVariables = parseVariables; function parseVariablesAndCustomHeadersToJSON(response) { return Object.assign({}, response, { customHeaders: JSON.parse(response.customHeaders), variables: JSON.parse(response.variables), }); } exports.parseVariablesAndCustomHeadersToJSON = parseVariablesAndCustomHeadersToJSON; function stringifyVariables(request) { const variables = request.variables || {}; const variablesString = JSON.stringify(variables); return Object.assign({}, request, { variables: variablesString }); } exports.stringifyVariables = stringifyVariables; //# sourceMappingURL=stringifyVariables.js.map