@venturialstd/workflow 0.1.67 → 0.1.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/modules/session/actions/index.d.ts +1 -0
  2. package/dist/modules/session/actions/index.d.ts.map +1 -1
  3. package/dist/modules/session/actions/index.js +1 -0
  4. package/dist/modules/session/actions/index.js.map +1 -1
  5. package/dist/modules/session/actions/save-context-by-key.action.d.ts +3 -0
  6. package/dist/modules/session/actions/save-context-by-key.action.d.ts.map +1 -0
  7. package/dist/modules/session/actions/save-context-by-key.action.js +62 -0
  8. package/dist/modules/session/actions/save-context-by-key.action.js.map +1 -0
  9. package/dist/modules/session/services/get-session-by-key.service.d.ts.map +1 -1
  10. package/dist/modules/session/services/get-session-by-key.service.js +0 -1
  11. package/dist/modules/session/services/get-session-by-key.service.js.map +1 -1
  12. package/dist/modules/session/services/index.d.ts +1 -0
  13. package/dist/modules/session/services/index.d.ts.map +1 -1
  14. package/dist/modules/session/services/index.js +1 -0
  15. package/dist/modules/session/services/index.js.map +1 -1
  16. package/dist/modules/session/services/save-context-by-key.service.d.ts +8 -0
  17. package/dist/modules/session/services/save-context-by-key.service.d.ts.map +1 -0
  18. package/dist/modules/session/services/save-context-by-key.service.js +48 -0
  19. package/dist/modules/session/services/save-context-by-key.service.js.map +1 -0
  20. package/dist/modules/session/session-nest.module.d.ts.map +1 -1
  21. package/dist/modules/session/session-nest.module.js +2 -2
  22. package/dist/modules/session/session-nest.module.js.map +1 -1
  23. package/dist/modules/session/session.module.d.ts.map +1 -1
  24. package/dist/modules/session/session.module.js +1 -1
  25. package/dist/modules/session/session.module.js.map +1 -1
  26. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
1
  export * from './get-session-by-key.action';
2
+ export * from './save-context-by-key.action';
2
3
  export * from './set-session-variable.action';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC"}
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-session-by-key.action"), exports);
18
+ __exportStar(require("./save-context-by-key.action"), exports);
18
19
  __exportStar(require("./set-session-variable.action"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/session/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,gEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/session/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,+DAA6C;AAC7C,gEAA8C"}
@@ -0,0 +1,3 @@
1
+ import { WorkflowActionTrigger } from '../../types';
2
+ export declare const saveContextByKeyAction: WorkflowActionTrigger;
3
+ //# sourceMappingURL=save-context-by-key.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-context-by-key.action.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/actions/save-context-by-key.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,sBAAsB,EAAE,qBAuDpC,CAAC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.saveContextByKeyAction = void 0;
4
+ const types_1 = require("../../types");
5
+ const save_context_by_key_service_1 = require("../services/save-context-by-key.service");
6
+ exports.saveContextByKeyAction = {
7
+ key: 'save-context-by-key',
8
+ name: 'Save Context By Key',
9
+ description: 'Save the current workflow execution context with a specific key for later retrieval',
10
+ category: types_1.NODE_CATEGORY.ACTION,
11
+ icon: '💾',
12
+ serviceClass: save_context_by_key_service_1.SaveContextByKeyService,
13
+ inputs: [
14
+ {
15
+ id: 'contextKey',
16
+ name: 'Context Key',
17
+ description: 'The key to use for storing the context (used for retrieval later)',
18
+ type: types_1.FIELD_TYPE.STRING,
19
+ validation: {
20
+ required: true,
21
+ },
22
+ placeholder: 'e.g., user-onboarding-state, checkout-data',
23
+ },
24
+ {
25
+ id: 'ttl',
26
+ name: 'TTL (Time To Live)',
27
+ description: 'Optional: Time to live in seconds (default: 1 hour). Leave empty to use default.',
28
+ type: types_1.FIELD_TYPE.NUMBER,
29
+ validation: {
30
+ required: false,
31
+ },
32
+ placeholder: 'e.g., 3600 (1 hour), 86400 (24 hours)',
33
+ },
34
+ ],
35
+ outputs: [
36
+ {
37
+ id: 'success',
38
+ name: 'Success',
39
+ description: 'Whether the context was saved successfully',
40
+ type: types_1.FIELD_TYPE.BOOLEAN,
41
+ },
42
+ {
43
+ id: 'contextKey',
44
+ name: 'Context Key',
45
+ description: 'The key that was used to save the context',
46
+ type: types_1.FIELD_TYPE.STRING,
47
+ },
48
+ {
49
+ id: 'savedAt',
50
+ name: 'Saved At',
51
+ description: 'Timestamp when the context was saved',
52
+ type: types_1.FIELD_TYPE.STRING,
53
+ },
54
+ {
55
+ id: 'message',
56
+ name: 'Message',
57
+ description: 'Success message',
58
+ type: types_1.FIELD_TYPE.STRING,
59
+ },
60
+ ],
61
+ };
62
+ //# sourceMappingURL=save-context-by-key.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-context-by-key.action.js","sourceRoot":"","sources":["../../../../src/modules/session/actions/save-context-by-key.action.ts"],"names":[],"mappings":";;;AAAA,uCAKqB;AACrB,yFAAkF;AAErE,QAAA,sBAAsB,GAA0B;IAC3D,GAAG,EAAE,qBAAqB;IAC1B,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qFAAqF;IAClG,QAAQ,EAAE,qBAAa,CAAC,MAAM;IAC9B,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,qDAA6E;IAC3F,MAAM,EAAE;QACN;YACE,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,mEAAmE;YAChF,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;aACf;YACD,WAAW,EAAE,4CAA4C;SAC1D;QACD;YACE,EAAE,EAAE,KAAK;YACT,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAAE,kFAAkF;YAC/F,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,KAAK;aAChB;YACD,WAAW,EAAE,uCAAuC;SACrD;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,4CAA4C;YACzD,IAAI,EAAE,kBAAU,CAAC,OAAO;SACzB;QACD;YACE,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,2CAA2C;YACxD,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;KACF;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-session-by-key.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/services/get-session-by-key.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAK5E,UAAU,mBAAmB;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,qBACa,sBAAuB,YAAW,sBAAsB;IAEjE,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAFxB,YAAY,EAAE,YAAY,EAC1B,sBAAsB,EAAE,sBAAsB,EAC9C,wBAAwB,EAAE,wBAAwB;IAI/D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;KAAE,CAAC;CAmCrF"}
1
+ {"version":3,"file":"get-session-by-key.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/services/get-session-by-key.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAK5E,UAAU,mBAAmB;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,qBACa,sBAAuB,YAAW,sBAAsB;IAEjE,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAFxB,YAAY,EAAE,YAAY,EAC1B,sBAAsB,EAAE,sBAAsB,EAC9C,wBAAwB,EAAE,wBAAwB;IAI/D,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;KAAE,CAAC;CAiCrF"}
@@ -42,7 +42,6 @@ let GetSessionByKeyService = class GetSessionByKeyService {
42
42
  response.error = `Session with key "${sessionKey}" not found in cache`;
43
43
  return response;
44
44
  }
45
- await this.cacheService.set(sessionKey, cachedSessionData, undefined, core_1.CACHE_TTL.FIFTEEN_MINUTES);
46
45
  response.error = '';
47
46
  response.success = true;
48
47
  response.session = {
@@ -1 +1 @@
1
- {"version":3,"file":"get-session-by-key.service.js","sourceRoot":"","sources":["../../../../src/modules/session/services/get-session-by-key.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAA6D;AAE7D,6FAAwF;AACxF,yFAAoF;AAa7E,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAEd;IACA;IACA;IAHnB,YACmB,YAA0B,EAC1B,sBAA8C,EAC9C,wBAAkD;QAFlD,iBAAY,GAAZ,YAAY,CAAc;QAC1B,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,6BAAwB,GAAxB,wBAAwB,CAA0B;IAClE,CAAC;IAGJ,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,QAAQ,GAAG;YACf,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE;gBACP,aAAa,EAAE,EAAE;gBACjB,WAAW,EAAE,EAAE;gBACf,IAAI,EAAE,EAAE;aACc;SACzB,CAAC;QACF,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAE/C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAGD,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAA6B,UAAU,CAAC,CAAC;QAE9F,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,QAAQ,CAAC,KAAK,GAAG,qBAAqB,UAAU,sBAAsB,CAAC;YACvE,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,gBAAS,CAAC,eAAe,CAAC,CAAC;QAEjG,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;QACpB,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,QAAQ,CAAC,OAAO,GAAG;YACjB,aAAa,EAAE,iBAAiB,CAAC,aAAa;YAC9C,WAAW,EAAE,iBAAiB,CAAC,WAAW;YAC1C,IAAI,EAAE,iBAAiB,CAAC,IAAI;SAC7B,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AA9CY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAGsB,mBAAY;QACF,iDAAsB;QACpB,qDAAwB;GAJ1D,sBAAsB,CA8ClC"}
1
+ {"version":3,"file":"get-session-by-key.service.js","sourceRoot":"","sources":["../../../../src/modules/session/services/get-session-by-key.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAA6D;AAE7D,6FAAwF;AACxF,yFAAoF;AAa7E,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAEd;IACA;IACA;IAHnB,YACmB,YAA0B,EAC1B,sBAA8C,EAC9C,wBAAkD;QAFlD,iBAAY,GAAZ,YAAY,CAAc;QAC1B,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,6BAAwB,GAAxB,wBAAwB,CAA0B;IAClE,CAAC;IAGJ,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,QAAQ,GAAG;YACf,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE;gBACP,aAAa,EAAE,EAAE;gBACjB,WAAW,EAAE,EAAE;gBACf,IAAI,EAAE,EAAE;aACc;SACzB,CAAC;QACF,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAE/C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAGD,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAA6B,UAAU,CAAC,CAAC;QAE9F,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,QAAQ,CAAC,KAAK,GAAG,qBAAqB,UAAU,sBAAsB,CAAC;YACvE,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;QACpB,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,QAAQ,CAAC,OAAO,GAAG;YACjB,aAAa,EAAE,iBAAiB,CAAC,aAAa;YAC9C,WAAW,EAAE,iBAAiB,CAAC,WAAW;YAC1C,IAAI,EAAE,iBAAiB,CAAC,IAAI;SAC7B,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AA5CY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAGsB,mBAAY;QACF,iDAAsB;QACpB,qDAAwB;GAJ1D,sBAAsB,CA4ClC"}
@@ -1,3 +1,4 @@
1
1
  export * from './get-session-by-key.service';
2
+ export * from './save-context-by-key.service';
2
3
  export * from './set-session-variable.service';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC"}
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-session-by-key.service"), exports);
18
+ __exportStar(require("./save-context-by-key.service"), exports);
18
19
  __exportStar(require("./set-session-variable.service"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/session/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,iEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/session/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C"}
@@ -0,0 +1,8 @@
1
+ import { CacheService } from '@venturialstd/core';
2
+ import { IWorkflowActionService, WorkflowActionContext } from '../../types';
3
+ export declare class SaveContextByKeyService implements IWorkflowActionService {
4
+ private readonly cacheService;
5
+ constructor(cacheService: CacheService);
6
+ perform(inputs: Record<string, unknown>, context: WorkflowActionContext): Promise<Record<string, unknown>>;
7
+ }
8
+ //# sourceMappingURL=save-context-by-key.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-context-by-key.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/session/services/save-context-by-key.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAc5E,qBACa,uBAAwB,YAAW,sBAAsB;IACxD,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAEjD,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CA4BpC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SaveContextByKeyService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const core_1 = require("@venturialstd/core");
15
+ let SaveContextByKeyService = class SaveContextByKeyService {
16
+ cacheService;
17
+ constructor(cacheService) {
18
+ this.cacheService = cacheService;
19
+ }
20
+ async perform(inputs, context) {
21
+ const contextKey = inputs.contextKey;
22
+ const ttl = inputs.ttl;
23
+ if (!contextKey) {
24
+ throw new Error('Context key is required');
25
+ }
26
+ const contextData = {
27
+ workflowId: context.workflowId,
28
+ executionId: context.executionId,
29
+ sessionId: context.sessionId,
30
+ context: context.context || {},
31
+ previousOutputs: context.previousOutputs || {},
32
+ savedAt: new Date().toISOString(),
33
+ };
34
+ await this.cacheService.set(contextKey, contextData, undefined, ttl);
35
+ return {
36
+ success: true,
37
+ contextKey,
38
+ savedAt: contextData.savedAt,
39
+ message: `Context saved successfully with key "${contextKey}"`,
40
+ };
41
+ }
42
+ };
43
+ exports.SaveContextByKeyService = SaveContextByKeyService;
44
+ exports.SaveContextByKeyService = SaveContextByKeyService = __decorate([
45
+ (0, common_1.Injectable)(),
46
+ __metadata("design:paramtypes", [core_1.CacheService])
47
+ ], SaveContextByKeyService);
48
+ //# sourceMappingURL=save-context-by-key.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-context-by-key.service.js","sourceRoot":"","sources":["../../../../src/modules/session/services/save-context-by-key.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAkD;AAiB3C,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACL;IAA7B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAE3D,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,OAA8B;QAE9B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAoB,CAAC;QAC/C,MAAM,GAAG,GAAG,MAAM,CAAC,GAAyB,CAAC;QAE7C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAGD,MAAM,WAAW,GAAwB;YACvC,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;YAC9B,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,EAAE;YAC9C,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SAClC,CAAC;QAGF,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAErE,OAAO;YACL,OAAO,EAAE,IAAI;YACb,UAAU;YACV,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,OAAO,EAAE,wCAAwC,UAAU,GAAG;SAC/D,CAAC;IACJ,CAAC;CACF,CAAA;AAlCY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAEgC,mBAAY;GAD5C,uBAAuB,CAkCnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"session-nest.module.d.ts","sourceRoot":"","sources":["../../../src/modules/session/session-nest.module.ts"],"names":[],"mappings":"AAKA,qBAKa,iBAAiB;CAAG"}
1
+ {"version":3,"file":"session-nest.module.d.ts","sourceRoot":"","sources":["../../../src/modules/session/session-nest.module.ts"],"names":[],"mappings":"AASA,qBAKa,iBAAiB;CAAG"}
@@ -16,8 +16,8 @@ exports.SessionNestModule = SessionNestModule;
16
16
  exports.SessionNestModule = SessionNestModule = __decorate([
17
17
  (0, common_1.Module)({
18
18
  imports: [workflow_core_module_1.WorkflowCoreModule],
19
- providers: [services_1.GetSessionByKeyService, services_1.SetSessionVariableService],
20
- exports: [services_1.GetSessionByKeyService, services_1.SetSessionVariableService],
19
+ providers: [services_1.GetSessionByKeyService, services_1.SaveContextByKeyService, services_1.SetSessionVariableService],
20
+ exports: [services_1.GetSessionByKeyService, services_1.SaveContextByKeyService, services_1.SetSessionVariableService],
21
21
  })
22
22
  ], SessionNestModule);
23
23
  //# sourceMappingURL=session-nest.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-nest.module.js","sourceRoot":"","sources":["../../../src/modules/session/session-nest.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,qEAAgE;AAChE,yCAA+E;AAOxE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAL7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yCAAkB,CAAC;QAC7B,SAAS,EAAE,CAAC,iCAAsB,EAAE,oCAAyB,CAAC;QAC9D,OAAO,EAAE,CAAC,iCAAsB,EAAE,oCAAyB,CAAC;KAC7D,CAAC;GACW,iBAAiB,CAAG"}
1
+ {"version":3,"file":"session-nest.module.js","sourceRoot":"","sources":["../../../src/modules/session/session-nest.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,qEAAgE;AAChE,yCAIoB;AAOb,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAL7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yCAAkB,CAAC;QAC7B,SAAS,EAAE,CAAC,iCAAsB,EAAE,kCAAuB,EAAE,oCAAyB,CAAC;QACvF,OAAO,EAAE,CAAC,iCAAsB,EAAE,kCAAuB,EAAE,oCAAyB,CAAC;KACtF,CAAC;GACW,iBAAiB,CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"session.module.d.ts","sourceRoot":"","sources":["../../../src/modules/session/session.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD,eAAO,MAAM,aAAa,EAAE,wBAQ3B,CAAC"}
1
+ {"version":3,"file":"session.module.d.ts","sourceRoot":"","sources":["../../../src/modules/session/session.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAOpD,eAAO,MAAM,aAAa,EAAE,wBAQ3B,CAAC"}
@@ -8,7 +8,7 @@ exports.sessionModule = {
8
8
  description: 'Manage workflow session variables and context',
9
9
  icon: '💾',
10
10
  version: '1.0.0',
11
- actions: [actions_1.getSessionByKeyAction, actions_1.setSessionVariableAction],
11
+ actions: [actions_1.getSessionByKeyAction, actions_1.saveContextByKeyAction, actions_1.setSessionVariableAction],
12
12
  triggers: [],
13
13
  };
14
14
  //# sourceMappingURL=session.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.module.js","sourceRoot":"","sources":["../../../src/modules/session/session.module.ts"],"names":[],"mappings":";;;AACA,uCAA4E;AAE/D,QAAA,aAAa,GAA6B;IACrD,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,CAAC,+BAAqB,EAAE,kCAAwB,CAAC;IAC1D,QAAQ,EAAE,EAAE;CACb,CAAC"}
1
+ {"version":3,"file":"session.module.js","sourceRoot":"","sources":["../../../src/modules/session/session.module.ts"],"names":[],"mappings":";;;AACA,uCAImB;AAEN,QAAA,aAAa,GAA6B;IACrD,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,CAAC,+BAAqB,EAAE,gCAAsB,EAAE,kCAAwB,CAAC;IAClF,QAAQ,EAAE,EAAE;CACb,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venturialstd/workflow",
3
- "version": "0.1.67",
3
+ "version": "0.1.68",
4
4
  "description": "Workflow Module for Venturial",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",