@decaf-ts/integrations 0.3.11 → 0.4.0

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 (120) hide show
  1. package/dist/integrations.cjs +1 -1
  2. package/lib/cjs/graph/engine/execution/CodeGraphNodeExecutor.cjs +26 -29
  3. package/lib/cjs/graph/engine/execution/CodeGraphNodeExecutor.cjs.map +1 -1
  4. package/lib/cjs/graph/engine/execution/GraphExecutionEngine.cjs +20 -1
  5. package/lib/cjs/graph/engine/execution/GraphExecutionEngine.cjs.map +1 -1
  6. package/lib/cjs/graph/engine/execution/IsolatedVmCodeSandboxEvaluator.cjs +126 -0
  7. package/lib/cjs/graph/engine/execution/IsolatedVmCodeSandboxEvaluator.cjs.map +1 -1
  8. package/lib/cjs/graph/engine/execution/LogGraphNodeExecutor.cjs +19 -0
  9. package/lib/cjs/graph/engine/execution/LogGraphNodeExecutor.cjs.map +1 -0
  10. package/lib/cjs/graph/engine/execution/SwitchGraphNodeExecutor.cjs +21 -4
  11. package/lib/cjs/graph/engine/execution/SwitchGraphNodeExecutor.cjs.map +1 -1
  12. package/lib/cjs/graph/engine/execution/index.cjs +1 -0
  13. package/lib/cjs/graph/engine/execution/index.cjs.map +1 -1
  14. package/lib/cjs/graph/engine/index.cjs +1 -0
  15. package/lib/cjs/graph/engine/index.cjs.map +1 -1
  16. package/lib/cjs/graph/engine/loops/ForeachGraphNodeExecutor.cjs +1 -0
  17. package/lib/cjs/graph/engine/loops/ForeachGraphNodeExecutor.cjs.map +1 -1
  18. package/lib/cjs/graph/shared/nodes/flow-control.cjs +91 -9
  19. package/lib/cjs/graph/shared/nodes/flow-control.cjs.map +1 -1
  20. package/lib/cjs/index.cjs +3 -3
  21. package/lib/cjs/nest/graph/GraphExecutionController.cjs +39 -50
  22. package/lib/cjs/nest/graph/GraphExecutionController.cjs.map +1 -1
  23. package/lib/cjs/nest/graph/GraphExecutionModule.cjs +45 -40
  24. package/lib/cjs/nest/graph/GraphExecutionModule.cjs.map +1 -1
  25. package/lib/cjs/nest/graph/GraphExecutionResultModel.cjs +0 -18
  26. package/lib/cjs/nest/graph/GraphExecutionResultModel.cjs.map +1 -1
  27. package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs +11 -46
  28. package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs.map +1 -1
  29. package/lib/cjs/nest/graph/GraphResultService.cjs +54 -0
  30. package/lib/cjs/nest/graph/GraphResultService.cjs.map +1 -0
  31. package/lib/cjs/nest/graph/GraphWorkflowModel.cjs +44 -0
  32. package/lib/cjs/nest/graph/GraphWorkflowModel.cjs.map +1 -0
  33. package/lib/cjs/nest/graph/GraphWorkflowService.cjs +62 -0
  34. package/lib/cjs/nest/graph/GraphWorkflowService.cjs.map +1 -0
  35. package/lib/cjs/nest/graph/index.cjs +3 -6
  36. package/lib/cjs/nest/graph/index.cjs.map +1 -1
  37. package/lib/cjs/nest/graph/main.cjs +1 -1
  38. package/lib/cjs/nest/graph/main.cjs.map +1 -1
  39. package/lib/esm/graph/engine/execution/CodeGraphNodeExecutor.js +26 -29
  40. package/lib/esm/graph/engine/execution/CodeGraphNodeExecutor.js.map +1 -1
  41. package/lib/esm/graph/engine/execution/GraphExecutionEngine.js +20 -1
  42. package/lib/esm/graph/engine/execution/GraphExecutionEngine.js.map +1 -1
  43. package/lib/esm/graph/engine/execution/IsolatedVmCodeSandboxEvaluator.js +126 -0
  44. package/lib/esm/graph/engine/execution/IsolatedVmCodeSandboxEvaluator.js.map +1 -1
  45. package/lib/esm/graph/engine/execution/LogGraphNodeExecutor.js +14 -0
  46. package/lib/esm/graph/engine/execution/LogGraphNodeExecutor.js.map +1 -0
  47. package/lib/esm/graph/engine/execution/SwitchGraphNodeExecutor.js +21 -4
  48. package/lib/esm/graph/engine/execution/SwitchGraphNodeExecutor.js.map +1 -1
  49. package/lib/esm/graph/engine/execution/index.js +1 -0
  50. package/lib/esm/graph/engine/execution/index.js.map +1 -1
  51. package/lib/esm/graph/engine/index.js +1 -0
  52. package/lib/esm/graph/engine/index.js.map +1 -1
  53. package/lib/esm/graph/engine/loops/ForeachGraphNodeExecutor.js +1 -0
  54. package/lib/esm/graph/engine/loops/ForeachGraphNodeExecutor.js.map +1 -1
  55. package/lib/esm/graph/shared/nodes/flow-control.js +91 -9
  56. package/lib/esm/graph/shared/nodes/flow-control.js.map +1 -1
  57. package/lib/esm/index.js +3 -3
  58. package/lib/esm/nest/graph/GraphExecutionController.js +39 -50
  59. package/lib/esm/nest/graph/GraphExecutionController.js.map +1 -1
  60. package/lib/esm/nest/graph/GraphExecutionModule.js +11 -39
  61. package/lib/esm/nest/graph/GraphExecutionModule.js.map +1 -1
  62. package/lib/esm/nest/graph/GraphExecutionResultModel.js +0 -18
  63. package/lib/esm/nest/graph/GraphExecutionResultModel.js.map +1 -1
  64. package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js +12 -47
  65. package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js.map +1 -1
  66. package/lib/esm/nest/graph/GraphResultService.js +45 -0
  67. package/lib/esm/nest/graph/GraphResultService.js.map +1 -0
  68. package/lib/esm/nest/graph/GraphWorkflowModel.js +35 -0
  69. package/lib/esm/nest/graph/GraphWorkflowModel.js.map +1 -0
  70. package/lib/esm/nest/graph/GraphWorkflowService.js +53 -0
  71. package/lib/esm/nest/graph/GraphWorkflowService.js.map +1 -0
  72. package/lib/esm/nest/graph/index.js +3 -6
  73. package/lib/esm/nest/graph/index.js.map +1 -1
  74. package/lib/esm/nest/graph/main.js +1 -1
  75. package/lib/esm/nest/graph/main.js.map +1 -1
  76. package/lib/types/graph/engine/execution/CodeGraphNodeExecutor.d.cts +17 -17
  77. package/lib/types/graph/engine/execution/CodeGraphNodeExecutor.d.mts +17 -17
  78. package/lib/types/graph/engine/execution/CodeSandboxEvaluator.d.cts +23 -0
  79. package/lib/types/graph/engine/execution/CodeSandboxEvaluator.d.mts +23 -0
  80. package/lib/types/graph/engine/execution/GraphExecutionEngine.d.cts +6 -0
  81. package/lib/types/graph/engine/execution/GraphExecutionEngine.d.mts +6 -0
  82. package/lib/types/graph/engine/execution/IsolatedVmCodeSandboxEvaluator.d.cts +18 -0
  83. package/lib/types/graph/engine/execution/IsolatedVmCodeSandboxEvaluator.d.mts +18 -0
  84. package/lib/types/graph/engine/execution/LogGraphNodeExecutor.d.cts +19 -0
  85. package/lib/types/graph/engine/execution/LogGraphNodeExecutor.d.mts +19 -0
  86. package/lib/types/graph/engine/execution/SwitchGraphNodeExecutor.d.cts +3 -2
  87. package/lib/types/graph/engine/execution/SwitchGraphNodeExecutor.d.mts +3 -2
  88. package/lib/types/graph/engine/execution/index.d.cts +1 -0
  89. package/lib/types/graph/engine/execution/index.d.mts +1 -0
  90. package/lib/types/graph/engine/index.d.cts +1 -0
  91. package/lib/types/graph/engine/index.d.mts +1 -0
  92. package/lib/types/graph/shared/nodes/flow-control.d.cts +29 -3
  93. package/lib/types/graph/shared/nodes/flow-control.d.mts +29 -3
  94. package/lib/types/graph/shared/types.d.cts +6 -0
  95. package/lib/types/graph/shared/types.d.mts +6 -0
  96. package/lib/types/index.d.cts +2 -2
  97. package/lib/types/index.d.mts +2 -2
  98. package/lib/types/nest/graph/GraphExecutionController.d.cts +11 -42
  99. package/lib/types/nest/graph/GraphExecutionController.d.mts +11 -42
  100. package/lib/types/nest/graph/GraphExecutionModule.d.cts +9 -29
  101. package/lib/types/nest/graph/GraphExecutionModule.d.mts +9 -29
  102. package/lib/types/nest/graph/GraphExecutionResultModel.d.cts +0 -34
  103. package/lib/types/nest/graph/GraphExecutionResultModel.d.mts +0 -34
  104. package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.cts +9 -9
  105. package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.mts +9 -9
  106. package/lib/types/nest/graph/GraphResultService.d.cts +8 -0
  107. package/lib/types/nest/graph/GraphResultService.d.mts +8 -0
  108. package/lib/types/nest/graph/GraphWorkflowModel.d.cts +7 -0
  109. package/lib/types/nest/graph/GraphWorkflowModel.d.mts +7 -0
  110. package/lib/types/nest/graph/GraphWorkflowService.d.cts +7 -0
  111. package/lib/types/nest/graph/GraphWorkflowService.d.mts +7 -0
  112. package/lib/types/nest/graph/index.d.cts +3 -6
  113. package/lib/types/nest/graph/index.d.mts +3 -6
  114. package/package.json +3 -3
  115. package/lib/cjs/nest/graph/GraphExecutionResultRepository.cjs +0 -66
  116. package/lib/cjs/nest/graph/GraphExecutionResultRepository.cjs.map +0 -1
  117. package/lib/esm/nest/graph/GraphExecutionResultRepository.js +0 -60
  118. package/lib/esm/nest/graph/GraphExecutionResultRepository.js.map +0 -1
  119. package/lib/types/nest/graph/GraphExecutionResultRepository.d.cts +0 -38
  120. package/lib/types/nest/graph/GraphExecutionResultRepository.d.mts +0 -38
@@ -0,0 +1,7 @@
1
+ import { ModelService, type Context, type MaybeContextualArg } from "@decaf-ts/core";
2
+ import { GraphWorkflowModel } from "./GraphWorkflowModel.d.mts";
3
+ export declare class GraphWorkflowService extends ModelService<GraphWorkflowModel> {
4
+ constructor();
5
+ saveSnapshot(workflowId: string, snapshot: Record<string, unknown>, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowModel>;
6
+ loadSnapshot(workflowId: string, ...args: MaybeContextualArg<Context>): Promise<GraphWorkflowModel | null>;
7
+ }
@@ -1,10 +1,7 @@
1
- /**
2
- * @module integrations/nest/graph
3
- * @summary NestJS graph execution backend module.
4
- * @description Server-side hosting for the Decaf graph execution engine. Exposes REST endpoints for triggering execution and retrieving persisted results, plus an SSE endpoint for streaming execution events. Designed to be consumed by for-angular via for-http's `ServerEventConnector`.
5
- */
6
1
  export * from "./GraphExecutionResultModel.d.cts";
7
- export * from "./GraphExecutionResultRepository.d.cts";
2
+ export * from "./GraphResultService.d.cts";
3
+ export * from "./GraphWorkflowModel.d.cts";
4
+ export * from "./GraphWorkflowService.d.cts";
8
5
  export * from "./GraphExecutorRegistryFactory.d.cts";
9
6
  export * from "./GraphExecutionController.d.cts";
10
7
  export * from "./GraphExecutionModule.d.cts";
@@ -1,10 +1,7 @@
1
- /**
2
- * @module integrations/nest/graph
3
- * @summary NestJS graph execution backend module.
4
- * @description Server-side hosting for the Decaf graph execution engine. Exposes REST endpoints for triggering execution and retrieving persisted results, plus an SSE endpoint for streaming execution events. Designed to be consumed by for-angular via for-http's `ServerEventConnector`.
5
- */
6
1
  export * from "./GraphExecutionResultModel.d.mts";
7
- export * from "./GraphExecutionResultRepository.d.mts";
2
+ export * from "./GraphResultService.d.mts";
3
+ export * from "./GraphWorkflowModel.d.mts";
4
+ export * from "./GraphWorkflowService.d.mts";
8
5
  export * from "./GraphExecutorRegistryFactory.d.mts";
9
6
  export * from "./GraphExecutionController.d.mts";
10
7
  export * from "./GraphExecutionModule.d.mts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/integrations",
3
- "version": "0.3.11",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.mts",
@@ -307,7 +307,7 @@
307
307
  "@decaf-ts/cli": "latest",
308
308
  "@decaf-ts/for-http": "latest",
309
309
  "@decaf-ts/for-nano": "latest",
310
- "@decaf-ts/for-nest": "0.11.2-refactor.9",
310
+ "@decaf-ts/for-nest": "latest",
311
311
  "@decaf-ts/utils": "latest",
312
312
  "@nestjs/common": "^11.0.0",
313
313
  "@nestjs/core": "^11.0.0",
@@ -323,7 +323,7 @@
323
323
  "peerDependencies": {
324
324
  "@decaf-ts/as-zod": "latest",
325
325
  "@decaf-ts/for-http": "latest",
326
- "@decaf-ts/for-nest": "0.11.2-refactor.9",
326
+ "@decaf-ts/for-nest": "latest",
327
327
  "jose": ">=5.0.0"
328
328
  },
329
329
  "peerDependenciesMeta": {
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createGraphExecutionResultRepository = createGraphExecutionResultRepository;
4
- exports.toResultModel = toResultModel;
5
- exports.fromResultModel = fromResultModel;
6
- /**
7
- * @module integrations/nest/graph/GraphExecutionResultRepository
8
- * @summary Repository for persisting and retrieving graph execution results.
9
- * @description Provides a typed handle to a Decaf {@link Repository} backed by RamAdapter, with convenience methods for saving and loading {@link GraphExecutionResultModel} records. The repository is created via `Repository.forModel()` so it inherits all standard Decaf CRUD operations.
10
- */
11
- const core_1 = require("@decaf-ts/core");
12
- const GraphExecutionResultModel_js_1 = require("./GraphExecutionResultModel.cjs");
13
- /**
14
- * Creates a Decaf repository for {@link GraphExecutionResultModel}.
15
- *
16
- * The caller must ensure the RamAdapter has been initialised and set as the
17
- * current adapter (via `RamAdapter.decoration()` and `Adapter.setCurrent()`)
18
- * before invoking this factory.
19
- *
20
- * @returns A Decaf repository instance for {@link GraphExecutionResultModel}.
21
- */
22
- function createGraphExecutionResultRepository() {
23
- return core_1.Repository.forModel(GraphExecutionResultModel_js_1.GraphExecutionResultModel);
24
- }
25
- /**
26
- * Converts a {@link GraphExecutionResult} into a persistable
27
- * {@link GraphExecutionResultModel}.
28
- *
29
- * @param result - The execution result to convert.
30
- * @returns A model instance ready for persistence.
31
- */
32
- function toResultModel(result) {
33
- return new GraphExecutionResultModel_js_1.GraphExecutionResultModel({
34
- runId: result.runId,
35
- workflowId: result.workflowId,
36
- status: result.status,
37
- inputs: result.inputs,
38
- outputs: result.outputs,
39
- nodeResults: result.nodeResults,
40
- startedAt: result.startedAt,
41
- finishedAt: result.finishedAt,
42
- });
43
- }
44
- /**
45
- * Converts a persisted {@link GraphExecutionResultModel} back into a plain
46
- * result-like object suitable for API responses.
47
- *
48
- * @param model - The persisted model (or `null` if not found).
49
- * @returns A plain object with the result fields, or `null`.
50
- */
51
- function fromResultModel(model) {
52
- if (!model)
53
- return null;
54
- return {
55
- runId: model.runId,
56
- workflowId: model.workflowId,
57
- status: model.status,
58
- inputs: model.inputs,
59
- outputs: model.outputs,
60
- nodeResults: model.nodeResults,
61
- startedAt: model.startedAt,
62
- finishedAt: model.finishedAt,
63
- };
64
- }
65
- //# sourceMappingURL=GraphExecutionResultRepository.js.map
66
- //# sourceMappingURL=GraphExecutionResultRepository.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nest/graph/GraphExecutionResultRepository.cjs","sourceRoot":"","sources":["nest/graph/GraphExecutionResultRepository.js"],"names":[],"mappings":";;AAgBA,oFAEC;AAQD,sCAWC;AAQD,0CAaC;AA1DD;;;;GAIG;AACH,yCAA4C;AAC5C,iFAA2E;AAC3E;;;;;;;;GAQG;AACH,SAAgB,oCAAoC;IAChD,OAAO,iBAAU,CAAC,QAAQ,CAAC,wDAAyB,CAAC,CAAC;AAC1D,CAAC;AACD;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,MAAM;IAChC,OAAO,IAAI,wDAAyB,CAAC;QACjC,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;KAChC,CAAC,CAAC;AACP,CAAC;AACD;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,KAAK;IACjC,IAAI,CAAC,KAAK;QACN,OAAO,IAAI,CAAC;IAChB,OAAO;QACH,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;KAC/B,CAAC;AACN,CAAC;AACD,0DAA0D"}
@@ -1,60 +0,0 @@
1
- /**
2
- * @module integrations/nest/graph/GraphExecutionResultRepository
3
- * @summary Repository for persisting and retrieving graph execution results.
4
- * @description Provides a typed handle to a Decaf {@link Repository} backed by RamAdapter, with convenience methods for saving and loading {@link GraphExecutionResultModel} records. The repository is created via `Repository.forModel()` so it inherits all standard Decaf CRUD operations.
5
- */
6
- import { Repository } from "@decaf-ts/core";
7
- import { GraphExecutionResultModel } from "./GraphExecutionResultModel.js";
8
- /**
9
- * Creates a Decaf repository for {@link GraphExecutionResultModel}.
10
- *
11
- * The caller must ensure the RamAdapter has been initialised and set as the
12
- * current adapter (via `RamAdapter.decoration()` and `Adapter.setCurrent()`)
13
- * before invoking this factory.
14
- *
15
- * @returns A Decaf repository instance for {@link GraphExecutionResultModel}.
16
- */
17
- export function createGraphExecutionResultRepository() {
18
- return Repository.forModel(GraphExecutionResultModel);
19
- }
20
- /**
21
- * Converts a {@link GraphExecutionResult} into a persistable
22
- * {@link GraphExecutionResultModel}.
23
- *
24
- * @param result - The execution result to convert.
25
- * @returns A model instance ready for persistence.
26
- */
27
- export function toResultModel(result) {
28
- return new GraphExecutionResultModel({
29
- runId: result.runId,
30
- workflowId: result.workflowId,
31
- status: result.status,
32
- inputs: result.inputs,
33
- outputs: result.outputs,
34
- nodeResults: result.nodeResults,
35
- startedAt: result.startedAt,
36
- finishedAt: result.finishedAt,
37
- });
38
- }
39
- /**
40
- * Converts a persisted {@link GraphExecutionResultModel} back into a plain
41
- * result-like object suitable for API responses.
42
- *
43
- * @param model - The persisted model (or `null` if not found).
44
- * @returns A plain object with the result fields, or `null`.
45
- */
46
- export function fromResultModel(model) {
47
- if (!model)
48
- return null;
49
- return {
50
- runId: model.runId,
51
- workflowId: model.workflowId,
52
- status: model.status,
53
- inputs: model.inputs,
54
- outputs: model.outputs,
55
- nodeResults: model.nodeResults,
56
- startedAt: model.startedAt,
57
- finishedAt: model.finishedAt,
58
- };
59
- }
60
- //# sourceMappingURL=GraphExecutionResultRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphExecutionResultRepository.js","sourceRoot":"","sources":["../../../../src/nest/graph/GraphExecutionResultRepository.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,yBAAyB,EAAE,uCAAoC;AAQxE;;;;;;;;GAQG;AACH,MAAM,UAAU,oCAAoC;IAClD,OAAO,UAAU,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,MAA4B;IAE5B,OAAO,IAAI,yBAAyB,CAAC;QACnC,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,MAAM,CAAC,WAAsC;QAC1D,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAuC;IAEvC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,MAAM,EAAE,KAAK,CAAC,MAAwC;QACtD,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,WAAW,EAAE,KAAK,CAAC,WAAkD;QACrE,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
@@ -1,38 +0,0 @@
1
- /**
2
- * @module integrations/nest/graph/GraphExecutionResultRepository
3
- * @summary Repository for persisting and retrieving graph execution results.
4
- * @description Provides a typed handle to a Decaf {@link Repository} backed by RamAdapter, with convenience methods for saving and loading {@link GraphExecutionResultModel} records. The repository is created via `Repository.forModel()` so it inherits all standard Decaf CRUD operations.
5
- */
6
- import { Repository } from "@decaf-ts/core";
7
- import type { GraphExecutionResult } from "../../graph/index.d.cts";
8
- import { GraphExecutionResultModel } from "./GraphExecutionResultModel.d.cts";
9
- /**
10
- * Type alias for the Decaf repository typed to {@link GraphExecutionResultModel}.
11
- */
12
- export type GraphExecutionResultRepositoryInstance = Repository<GraphExecutionResultModel, any>;
13
- /**
14
- * Creates a Decaf repository for {@link GraphExecutionResultModel}.
15
- *
16
- * The caller must ensure the RamAdapter has been initialised and set as the
17
- * current adapter (via `RamAdapter.decoration()` and `Adapter.setCurrent()`)
18
- * before invoking this factory.
19
- *
20
- * @returns A Decaf repository instance for {@link GraphExecutionResultModel}.
21
- */
22
- export declare function createGraphExecutionResultRepository(): import("@decaf-ts/core").Repo<GraphExecutionResultModel>;
23
- /**
24
- * Converts a {@link GraphExecutionResult} into a persistable
25
- * {@link GraphExecutionResultModel}.
26
- *
27
- * @param result - The execution result to convert.
28
- * @returns A model instance ready for persistence.
29
- */
30
- export declare function toResultModel(result: GraphExecutionResult): GraphExecutionResultModel;
31
- /**
32
- * Converts a persisted {@link GraphExecutionResultModel} back into a plain
33
- * result-like object suitable for API responses.
34
- *
35
- * @param model - The persisted model (or `null` if not found).
36
- * @returns A plain object with the result fields, or `null`.
37
- */
38
- export declare function fromResultModel(model: GraphExecutionResultModel | null): Omit<GraphExecutionResult, "workflow" | "events" | "metadata"> | null;
@@ -1,38 +0,0 @@
1
- /**
2
- * @module integrations/nest/graph/GraphExecutionResultRepository
3
- * @summary Repository for persisting and retrieving graph execution results.
4
- * @description Provides a typed handle to a Decaf {@link Repository} backed by RamAdapter, with convenience methods for saving and loading {@link GraphExecutionResultModel} records. The repository is created via `Repository.forModel()` so it inherits all standard Decaf CRUD operations.
5
- */
6
- import { Repository } from "@decaf-ts/core";
7
- import type { GraphExecutionResult } from "../../graph/index.d.mts";
8
- import { GraphExecutionResultModel } from "./GraphExecutionResultModel.d.mts";
9
- /**
10
- * Type alias for the Decaf repository typed to {@link GraphExecutionResultModel}.
11
- */
12
- export type GraphExecutionResultRepositoryInstance = Repository<GraphExecutionResultModel, any>;
13
- /**
14
- * Creates a Decaf repository for {@link GraphExecutionResultModel}.
15
- *
16
- * The caller must ensure the RamAdapter has been initialised and set as the
17
- * current adapter (via `RamAdapter.decoration()` and `Adapter.setCurrent()`)
18
- * before invoking this factory.
19
- *
20
- * @returns A Decaf repository instance for {@link GraphExecutionResultModel}.
21
- */
22
- export declare function createGraphExecutionResultRepository(): import("@decaf-ts/core").Repo<GraphExecutionResultModel>;
23
- /**
24
- * Converts a {@link GraphExecutionResult} into a persistable
25
- * {@link GraphExecutionResultModel}.
26
- *
27
- * @param result - The execution result to convert.
28
- * @returns A model instance ready for persistence.
29
- */
30
- export declare function toResultModel(result: GraphExecutionResult): GraphExecutionResultModel;
31
- /**
32
- * Converts a persisted {@link GraphExecutionResultModel} back into a plain
33
- * result-like object suitable for API responses.
34
- *
35
- * @param model - The persisted model (or `null` if not found).
36
- * @returns A plain object with the result fields, or `null`.
37
- */
38
- export declare function fromResultModel(model: GraphExecutionResultModel | null): Omit<GraphExecutionResult, "workflow" | "events" | "metadata"> | null;