UNPKG

n8n-nodes-recallio

Version:

RecallioAI Memory node for n8n

27 lines 914 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSessionId = getSessionId; function getSessionId(context, itemIndex) { var _a, _b; try { const explicitSessionId = context.getNodeParameter('sessionId', itemIndex); if (explicitSessionId) return explicitSessionId; } catch { } try { const userId = context.getNodeParameter('userId', itemIndex); if (userId) return userId; } catch { } const staticData = context.getWorkflowStaticData('global'); if (!staticData.__recallioSessionId) { const workflowId = (_b = (_a = context.getWorkflow()) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : 'workflow'; staticData.__recallioSessionId = `${workflowId}`; } return staticData.__recallioSessionId; } //# sourceMappingURL=helpers.js.map