@graph-compose/core 1.0.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 (155) hide show
  1. package/README.md +323 -0
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +24 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/tsconfig.tsbuildinfo +1 -0
  7. package/dist/types/behaviors/conditions.d.ts +54 -0
  8. package/dist/types/behaviors/conditions.d.ts.map +1 -0
  9. package/dist/types/behaviors/conditions.js +103 -0
  10. package/dist/types/behaviors/conditions.js.map +1 -0
  11. package/dist/types/behaviors/index.d.ts +3 -0
  12. package/dist/types/behaviors/index.d.ts.map +1 -0
  13. package/dist/types/behaviors/index.js +19 -0
  14. package/dist/types/behaviors/index.js.map +1 -0
  15. package/dist/types/behaviors/notifications.d.ts +157 -0
  16. package/dist/types/behaviors/notifications.d.ts.map +1 -0
  17. package/dist/types/behaviors/notifications.js +89 -0
  18. package/dist/types/behaviors/notifications.js.map +1 -0
  19. package/dist/types/config/activity.d.ts +58 -0
  20. package/dist/types/config/activity.d.ts.map +1 -0
  21. package/dist/types/config/activity.js +53 -0
  22. package/dist/types/config/activity.js.map +1 -0
  23. package/dist/types/config/http.d.ts +20 -0
  24. package/dist/types/config/http.d.ts.map +1 -0
  25. package/dist/types/config/http.js +66 -0
  26. package/dist/types/config/http.js.map +1 -0
  27. package/dist/types/config/index.d.ts +5 -0
  28. package/dist/types/config/index.d.ts.map +1 -0
  29. package/dist/types/config/index.js +21 -0
  30. package/dist/types/config/index.js.map +1 -0
  31. package/dist/types/config/protocols.d.ts +3 -0
  32. package/dist/types/config/protocols.d.ts.map +1 -0
  33. package/dist/types/config/protocols.js +14 -0
  34. package/dist/types/config/protocols.js.map +1 -0
  35. package/dist/types/config/workflow.d.ts +10 -0
  36. package/dist/types/config/workflow.d.ts.map +1 -0
  37. package/dist/types/config/workflow.js +12 -0
  38. package/dist/types/config/workflow.js.map +1 -0
  39. package/dist/types/context/index.d.ts +4 -0
  40. package/dist/types/context/index.d.ts.map +1 -0
  41. package/dist/types/context/index.js +8 -0
  42. package/dist/types/context/index.js.map +1 -0
  43. package/dist/types/contracts/agents.d.ts +87 -0
  44. package/dist/types/contracts/agents.d.ts.map +1 -0
  45. package/dist/types/contracts/agents.js +94 -0
  46. package/dist/types/contracts/agents.js.map +1 -0
  47. package/dist/types/contracts/index.d.ts +3 -0
  48. package/dist/types/contracts/index.d.ts.map +1 -0
  49. package/dist/types/contracts/index.js +19 -0
  50. package/dist/types/contracts/index.js.map +1 -0
  51. package/dist/types/contracts/tools.d.ts +72 -0
  52. package/dist/types/contracts/tools.d.ts.map +1 -0
  53. package/dist/types/contracts/tools.js +101 -0
  54. package/dist/types/contracts/tools.js.map +1 -0
  55. package/dist/types/index.d.ts +10 -0
  56. package/dist/types/index.d.ts.map +1 -0
  57. package/dist/types/index.js +26 -0
  58. package/dist/types/index.js.map +1 -0
  59. package/dist/types/nodes/agents.d.ts +149 -0
  60. package/dist/types/nodes/agents.d.ts.map +1 -0
  61. package/dist/types/nodes/agents.js +48 -0
  62. package/dist/types/nodes/agents.js.map +1 -0
  63. package/dist/types/nodes/common/base-node-schema.d.ts +109 -0
  64. package/dist/types/nodes/common/base-node-schema.d.ts.map +1 -0
  65. package/dist/types/nodes/common/base-node-schema.js +55 -0
  66. package/dist/types/nodes/common/base-node-schema.js.map +1 -0
  67. package/dist/types/nodes/common/index.d.ts +2 -0
  68. package/dist/types/nodes/common/index.d.ts.map +1 -0
  69. package/dist/types/nodes/common/index.js +18 -0
  70. package/dist/types/nodes/common/index.js.map +1 -0
  71. package/dist/types/nodes/destination.d.ts +148 -0
  72. package/dist/types/nodes/destination.d.ts.map +1 -0
  73. package/dist/types/nodes/destination.js +30 -0
  74. package/dist/types/nodes/destination.js.map +1 -0
  75. package/dist/types/nodes/error-boundary.d.ts +126 -0
  76. package/dist/types/nodes/error-boundary.d.ts.map +1 -0
  77. package/dist/types/nodes/error-boundary.js +24 -0
  78. package/dist/types/nodes/error-boundary.js.map +1 -0
  79. package/dist/types/nodes/http.d.ts +194 -0
  80. package/dist/types/nodes/http.d.ts.map +1 -0
  81. package/dist/types/nodes/http.js +28 -0
  82. package/dist/types/nodes/http.js.map +1 -0
  83. package/dist/types/nodes/index.d.ts +734 -0
  84. package/dist/types/nodes/index.d.ts.map +1 -0
  85. package/dist/types/nodes/index.js +48 -0
  86. package/dist/types/nodes/index.js.map +1 -0
  87. package/dist/types/nodes/iterator.d.ts +126 -0
  88. package/dist/types/nodes/iterator.d.ts.map +1 -0
  89. package/dist/types/nodes/iterator.js +21 -0
  90. package/dist/types/nodes/iterator.js.map +1 -0
  91. package/dist/types/nodes/tools.d.ts +1321 -0
  92. package/dist/types/nodes/tools.d.ts.map +1 -0
  93. package/dist/types/nodes/tools.js +65 -0
  94. package/dist/types/nodes/tools.js.map +1 -0
  95. package/dist/types/primitives/index.d.ts +2 -0
  96. package/dist/types/primitives/index.d.ts.map +1 -0
  97. package/dist/types/primitives/index.js +18 -0
  98. package/dist/types/primitives/index.js.map +1 -0
  99. package/dist/types/primitives/shared.d.ts +21 -0
  100. package/dist/types/primitives/shared.d.ts.map +1 -0
  101. package/dist/types/primitives/shared.js +113 -0
  102. package/dist/types/primitives/shared.js.map +1 -0
  103. package/dist/types/results/agent.d.ts +156 -0
  104. package/dist/types/results/agent.d.ts.map +1 -0
  105. package/dist/types/results/agent.js +54 -0
  106. package/dist/types/results/agent.js.map +1 -0
  107. package/dist/types/results/base.d.ts +4 -0
  108. package/dist/types/results/base.d.ts.map +1 -0
  109. package/dist/types/results/base.js +12 -0
  110. package/dist/types/results/base.js.map +1 -0
  111. package/dist/types/results/index.d.ts +7 -0
  112. package/dist/types/results/index.d.ts.map +1 -0
  113. package/dist/types/results/index.js +23 -0
  114. package/dist/types/results/index.js.map +1 -0
  115. package/dist/types/results/node.d.ts +38 -0
  116. package/dist/types/results/node.d.ts.map +1 -0
  117. package/dist/types/results/node.js +26 -0
  118. package/dist/types/results/node.js.map +1 -0
  119. package/dist/types/results/shared.d.ts +36 -0
  120. package/dist/types/results/shared.d.ts.map +1 -0
  121. package/dist/types/results/shared.js +31 -0
  122. package/dist/types/results/shared.js.map +1 -0
  123. package/dist/types/results/source.d.ts +53 -0
  124. package/dist/types/results/source.d.ts.map +1 -0
  125. package/dist/types/results/source.js +64 -0
  126. package/dist/types/results/source.js.map +1 -0
  127. package/dist/types/results/tool.d.ts +170 -0
  128. package/dist/types/results/tool.d.ts.map +1 -0
  129. package/dist/types/results/tool.js +110 -0
  130. package/dist/types/results/tool.js.map +1 -0
  131. package/dist/types/state/index.d.ts +2 -0
  132. package/dist/types/state/index.d.ts.map +1 -0
  133. package/dist/types/state/index.js +18 -0
  134. package/dist/types/state/index.js.map +1 -0
  135. package/dist/types/state/workflow-state.d.ts +63 -0
  136. package/dist/types/state/workflow-state.d.ts.map +1 -0
  137. package/dist/types/state/workflow-state.js +52 -0
  138. package/dist/types/state/workflow-state.js.map +1 -0
  139. package/dist/types/validation/schema.d.ts +14 -0
  140. package/dist/types/validation/schema.d.ts.map +1 -0
  141. package/dist/types/validation/schema.js +37 -0
  142. package/dist/types/validation/schema.js.map +1 -0
  143. package/dist/types/workflow.d.ts +2179 -0
  144. package/dist/types/workflow.d.ts.map +1 -0
  145. package/dist/types/workflow.js +132 -0
  146. package/dist/types/workflow.js.map +1 -0
  147. package/dist/utils/index.d.ts +2 -0
  148. package/dist/utils/index.d.ts.map +1 -0
  149. package/dist/utils/index.js +18 -0
  150. package/dist/utils/index.js.map +1 -0
  151. package/dist/utils/template/index.d.ts +39 -0
  152. package/dist/utils/template/index.d.ts.map +1 -0
  153. package/dist/utils/template/index.js +151 -0
  154. package/dist/utils/template/index.js.map +1 -0
  155. package/package.json +73 -0
@@ -0,0 +1,109 @@
1
+ import { z } from "zod";
2
+ export declare const IterationContextSchema: z.ZodObject<{
3
+ item: z.ZodAny;
4
+ originalNodeId: z.ZodString;
5
+ iteratorNodeId: z.ZodString;
6
+ index: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ originalNodeId: string;
9
+ iteratorNodeId: string;
10
+ index: number;
11
+ item?: any;
12
+ }, {
13
+ originalNodeId: string;
14
+ iteratorNodeId: string;
15
+ index: number;
16
+ item?: any;
17
+ }>;
18
+ export declare const BaseNodeSchema: z.ZodObject<{
19
+ id: z.ZodString;
20
+ type: z.ZodUnion<[z.ZodLiteral<"http">, z.ZodLiteral<"error_boundary">, z.ZodLiteral<"agent">, z.ZodLiteral<"tool">, z.ZodLiteral<"source_iterator">]>;
21
+ iterationContext: z.ZodOptional<z.ZodObject<{
22
+ originalNodeId: z.ZodString;
23
+ iteratorNodeId: z.ZodString;
24
+ index: z.ZodNumber;
25
+ }, "strip", z.ZodTypeAny, {
26
+ originalNodeId: string;
27
+ iteratorNodeId: string;
28
+ index: number;
29
+ }, {
30
+ originalNodeId: string;
31
+ iteratorNodeId: string;
32
+ index: number;
33
+ }>>;
34
+ activityConfig: z.ZodOptional<z.ZodObject<{
35
+ retryPolicy: z.ZodOptional<z.ZodObject<{
36
+ backoffCoefficient: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
37
+ initialInterval: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
38
+ maximumAttempts: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
39
+ maximumInterval: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ backoffCoefficient?: number | undefined;
42
+ initialInterval?: string | undefined;
43
+ maximumAttempts?: number | undefined;
44
+ maximumInterval?: string | undefined;
45
+ }, {
46
+ backoffCoefficient?: number | undefined;
47
+ initialInterval?: string | undefined;
48
+ maximumAttempts?: number | undefined;
49
+ maximumInterval?: string | undefined;
50
+ }>>;
51
+ startToCloseTimeout: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
52
+ scheduleToCloseTimeout: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ retryPolicy?: {
55
+ backoffCoefficient?: number | undefined;
56
+ initialInterval?: string | undefined;
57
+ maximumAttempts?: number | undefined;
58
+ maximumInterval?: string | undefined;
59
+ } | undefined;
60
+ startToCloseTimeout?: string | undefined;
61
+ scheduleToCloseTimeout?: string | undefined;
62
+ }, {
63
+ retryPolicy?: {
64
+ backoffCoefficient?: number | undefined;
65
+ initialInterval?: string | undefined;
66
+ maximumAttempts?: number | undefined;
67
+ maximumInterval?: string | undefined;
68
+ } | undefined;
69
+ startToCloseTimeout?: string | undefined;
70
+ scheduleToCloseTimeout?: string | undefined;
71
+ }>>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ type: "tool" | "http" | "error_boundary" | "agent" | "source_iterator";
74
+ id: string;
75
+ iterationContext?: {
76
+ originalNodeId: string;
77
+ iteratorNodeId: string;
78
+ index: number;
79
+ } | undefined;
80
+ activityConfig?: {
81
+ retryPolicy?: {
82
+ backoffCoefficient?: number | undefined;
83
+ initialInterval?: string | undefined;
84
+ maximumAttempts?: number | undefined;
85
+ maximumInterval?: string | undefined;
86
+ } | undefined;
87
+ startToCloseTimeout?: string | undefined;
88
+ scheduleToCloseTimeout?: string | undefined;
89
+ } | undefined;
90
+ }, {
91
+ type: "tool" | "http" | "error_boundary" | "agent" | "source_iterator";
92
+ id: string;
93
+ iterationContext?: {
94
+ originalNodeId: string;
95
+ iteratorNodeId: string;
96
+ index: number;
97
+ } | undefined;
98
+ activityConfig?: {
99
+ retryPolicy?: {
100
+ backoffCoefficient?: number | undefined;
101
+ initialInterval?: string | undefined;
102
+ maximumAttempts?: number | undefined;
103
+ maximumInterval?: string | undefined;
104
+ } | undefined;
105
+ startToCloseTimeout?: string | undefined;
106
+ scheduleToCloseTimeout?: string | undefined;
107
+ } | undefined;
108
+ }>;
109
+ //# sourceMappingURL=base-node-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-node-schema.d.ts","sourceRoot":"","sources":["../../../../src/types/nodes/common/base-node-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAGH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDvB,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseNodeSchema = exports.IterationContextSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const config_1 = require("../../config");
6
+ exports.IterationContextSchema = zod_1.z.object({
7
+ item: zod_1.z.any(),
8
+ originalNodeId: zod_1.z.string(),
9
+ iteratorNodeId: zod_1.z.string(),
10
+ index: zod_1.z.number(),
11
+ });
12
+ // Base schema for all nodes
13
+ exports.BaseNodeSchema = zod_1.z
14
+ .object({
15
+ id: zod_1.z.string().openapi({
16
+ description: "Unique identifier for the node. This cannot have dashes in the name and must use underscores for spacing",
17
+ example: "fetch_user_data",
18
+ }),
19
+ type: zod_1.z
20
+ .union([
21
+ zod_1.z.literal("http"),
22
+ zod_1.z.literal("error_boundary"),
23
+ zod_1.z.literal("agent"),
24
+ zod_1.z.literal("tool"),
25
+ zod_1.z.literal("source_iterator"),
26
+ ])
27
+ .openapi({
28
+ description: "Specifies the node's type, determining its behavior and configuration. Available types: \`http\`, \`error_boundary\`, \`agent\`, \`source_iterator\`, \`destination\`. (Note: \`tool\` type exists but is used within the separate 'tools' definition).",
29
+ example: "http",
30
+ }),
31
+ iterationContext: zod_1.z
32
+ .object({
33
+ originalNodeId: zod_1.z.string().openapi({
34
+ description: "The ID of the node that this iteration instance originated from.",
35
+ }),
36
+ iteratorNodeId: zod_1.z.string().openapi({
37
+ description: "The ID of the iterator node responsible for creating this iteration.",
38
+ }),
39
+ index: zod_1.z.number().openapi({
40
+ description: "The zero-based index of this iteration within the sequence.",
41
+ }),
42
+ })
43
+ .optional()
44
+ .openapi({
45
+ description: "Contextual information automatically added by the system when a node is executed as part of an iteration (e.g., by a source_iterator). Primarily for internal use.",
46
+ }),
47
+ activityConfig: config_1.ActivityConfigSchema.optional().openapi({
48
+ description: "Optional configuration for the execution behavior of this specific node, such as timeouts and retry strategies. \n\nIf omitted or partially defined, default values based on your subscription tier will be applied. See ActivityConfig for details on individual properties.",
49
+ }),
50
+ })
51
+ .openapi({
52
+ ref: "BaseNode",
53
+ description: "Base schema for all node types (http, error_boundary, agent, tool, iterator)",
54
+ });
55
+ //# sourceMappingURL=base-node-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-node-schema.js","sourceRoot":"","sources":["../../../../src/types/nodes/common/base-node-schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAAoD;AAEvC,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,GAAG,EAAE;IACb,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH,4BAA4B;AACf,QAAA,cAAc,GAAG,OAAC;KAC5B,MAAM,CAAC;IACN,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;QACrB,WAAW,EACT,0GAA0G;QAC5G,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IACF,IAAI,EAAE,OAAC;SACJ,KAAK,CAAC;QACL,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACjB,OAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAC3B,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAClB,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACjB,OAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;KAC7B,CAAC;SACD,OAAO,CAAC;QACP,WAAW,EACT,yPAAyP;QAC3P,OAAO,EAAE,MAAM;KAChB,CAAC;IACJ,gBAAgB,EAAE,OAAC;SAChB,MAAM,CAAC;QACN,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;YACjC,WAAW,EACT,kEAAkE;SACrE,CAAC;QACF,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;YACjC,WAAW,EACT,sEAAsE;SACzE,CAAC;QACF,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;YACxB,WAAW,EACT,6DAA6D;SAChE,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EACT,oKAAoK;KACvK,CAAC;IAEJ,cAAc,EAAE,6BAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;QACtD,WAAW,EACT,+QAA+Q;KAClR,CAAC;CACH,CAAC;KACD,OAAO,CAAC;IACP,GAAG,EAAE,UAAU;IACf,WAAW,EACT,8EAA8E;CACjF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./base-node-schema";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/nodes/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./base-node-schema"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/nodes/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
@@ -0,0 +1,148 @@
1
+ import { z } from "zod";
2
+ export declare const DestinationNodeSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ iterationContext: z.ZodOptional<z.ZodObject<{
5
+ originalNodeId: z.ZodString;
6
+ iteratorNodeId: z.ZodString;
7
+ index: z.ZodNumber;
8
+ }, "strip", z.ZodTypeAny, {
9
+ originalNodeId: string;
10
+ iteratorNodeId: string;
11
+ index: number;
12
+ }, {
13
+ originalNodeId: string;
14
+ iteratorNodeId: string;
15
+ index: number;
16
+ }>>;
17
+ activityConfig: z.ZodOptional<z.ZodObject<{
18
+ retryPolicy: z.ZodOptional<z.ZodObject<{
19
+ backoffCoefficient: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
20
+ initialInterval: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
21
+ maximumAttempts: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
22
+ maximumInterval: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ backoffCoefficient?: number | undefined;
25
+ initialInterval?: string | undefined;
26
+ maximumAttempts?: number | undefined;
27
+ maximumInterval?: string | undefined;
28
+ }, {
29
+ backoffCoefficient?: number | undefined;
30
+ initialInterval?: string | undefined;
31
+ maximumAttempts?: number | undefined;
32
+ maximumInterval?: string | undefined;
33
+ }>>;
34
+ startToCloseTimeout: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
35
+ scheduleToCloseTimeout: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ retryPolicy?: {
38
+ backoffCoefficient?: number | undefined;
39
+ initialInterval?: string | undefined;
40
+ maximumAttempts?: number | undefined;
41
+ maximumInterval?: string | undefined;
42
+ } | undefined;
43
+ startToCloseTimeout?: string | undefined;
44
+ scheduleToCloseTimeout?: string | undefined;
45
+ }, {
46
+ retryPolicy?: {
47
+ backoffCoefficient?: number | undefined;
48
+ initialInterval?: string | undefined;
49
+ maximumAttempts?: number | undefined;
50
+ maximumInterval?: string | undefined;
51
+ } | undefined;
52
+ startToCloseTimeout?: string | undefined;
53
+ scheduleToCloseTimeout?: string | undefined;
54
+ }>>;
55
+ } & {
56
+ type: z.ZodLiteral<"destination">;
57
+ http: z.ZodObject<{
58
+ method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>;
59
+ url: z.ZodEffects<z.ZodString, string, string>;
60
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodEffects<z.ZodString, string, string>]>]>>>;
61
+ } & {
62
+ body: z.ZodObject<{
63
+ sheetId: z.ZodString;
64
+ cellValues: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
65
+ }, "strip", z.ZodTypeAny, {
66
+ sheetId: string;
67
+ cellValues: string[];
68
+ }, {
69
+ sheetId: string;
70
+ cellValues: string[];
71
+ }>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ url: string;
74
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
75
+ body: {
76
+ sheetId: string;
77
+ cellValues: string[];
78
+ };
79
+ headers?: Record<string, string | Record<string, any>> | undefined;
80
+ }, {
81
+ url: string;
82
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
83
+ body: {
84
+ sheetId: string;
85
+ cellValues: string[];
86
+ };
87
+ headers?: Record<string, string | Record<string, any>> | undefined;
88
+ }>;
89
+ dependencies: z.ZodArray<z.ZodString, "many">;
90
+ }, "strip", z.ZodTypeAny, {
91
+ type: "destination";
92
+ id: string;
93
+ http: {
94
+ url: string;
95
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
96
+ body: {
97
+ sheetId: string;
98
+ cellValues: string[];
99
+ };
100
+ headers?: Record<string, string | Record<string, any>> | undefined;
101
+ };
102
+ dependencies: string[];
103
+ iterationContext?: {
104
+ originalNodeId: string;
105
+ iteratorNodeId: string;
106
+ index: number;
107
+ } | undefined;
108
+ activityConfig?: {
109
+ retryPolicy?: {
110
+ backoffCoefficient?: number | undefined;
111
+ initialInterval?: string | undefined;
112
+ maximumAttempts?: number | undefined;
113
+ maximumInterval?: string | undefined;
114
+ } | undefined;
115
+ startToCloseTimeout?: string | undefined;
116
+ scheduleToCloseTimeout?: string | undefined;
117
+ } | undefined;
118
+ }, {
119
+ type: "destination";
120
+ id: string;
121
+ http: {
122
+ url: string;
123
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
124
+ body: {
125
+ sheetId: string;
126
+ cellValues: string[];
127
+ };
128
+ headers?: Record<string, string | Record<string, any>> | undefined;
129
+ };
130
+ dependencies: string[];
131
+ iterationContext?: {
132
+ originalNodeId: string;
133
+ iteratorNodeId: string;
134
+ index: number;
135
+ } | undefined;
136
+ activityConfig?: {
137
+ retryPolicy?: {
138
+ backoffCoefficient?: number | undefined;
139
+ initialInterval?: string | undefined;
140
+ maximumAttempts?: number | undefined;
141
+ maximumInterval?: string | undefined;
142
+ } | undefined;
143
+ startToCloseTimeout?: string | undefined;
144
+ scheduleToCloseTimeout?: string | undefined;
145
+ } | undefined;
146
+ }>;
147
+ export type DestinationNode = z.infer<typeof DestinationNodeSchema>;
148
+ //# sourceMappingURL=destination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destination.d.ts","sourceRoot":"","sources":["../../../src/types/nodes/destination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DestinationNodeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const config_1 = require("../config");
6
+ const primitives_1 = require("../primitives");
7
+ const base_node_schema_1 = require("./common/base-node-schema");
8
+ // Iterator Node Schema
9
+ exports.DestinationNodeSchema = base_node_schema_1.BaseNodeSchema.extend({
10
+ type: zod_1.z.literal("destination").openapi({
11
+ description: "Specifies the node type as \`destination\`. Other available types include \`http\`, \`error_boundary\`, \`agent\`, and \`source_iterator\`.",
12
+ example: "destination",
13
+ }),
14
+ http: config_1.HTTPConfigSchema.extend({
15
+ body: zod_1.z.object({
16
+ sheetId: zod_1.z.string(),
17
+ cellValues: zod_1.z.array(primitives_1.TemplatedStringSchema),
18
+ }),
19
+ }),
20
+ dependencies: zod_1.z.array(zod_1.z.string()).openapi({
21
+ description: "IDs of nodes that must complete before this node can execute",
22
+ example: ["auth_token", "user_id"],
23
+ }),
24
+ }).openapi({
25
+ ref: "DestinationNode",
26
+ title: "DestinationNode",
27
+ description: "A workflow construct that creates a virtual copy of downstream nodes for each item from a source node. Each item is automatically available in the context as {{item}} for use in expressions.",
28
+ "x-tags": ["Nodes"],
29
+ });
30
+ //# sourceMappingURL=destination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destination.js","sourceRoot":"","sources":["../../../src/types/nodes/destination.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAA6C;AAC7C,8CAAsD;AACtD,gEAA2D;AAE3D,uBAAuB;AACV,QAAA,qBAAqB,GAAG,iCAAc,CAAC,MAAM,CAAC;IACzD,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC;QACrC,WAAW,EACT,6IAA6I;QAC/I,OAAO,EAAE,aAAa;KACvB,CAAC;IACF,IAAI,EAAE,yBAAgB,CAAC,MAAM,CAAC;QAC5B,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;YACb,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;YACnB,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,kCAAqB,CAAC;SAC3C,CAAC;KACH,CAAC;IACF,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC;QACxC,WAAW,EAAE,8DAA8D;QAC3E,OAAO,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;KACnC,CAAC;CACH,CAAC,CAAC,OAAO,CAAC;IACT,GAAG,EAAE,iBAAiB;IACtB,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,gMAAgM;IAClM,QAAQ,EAAE,CAAC,OAAO,CAAC;CACpB,CAAC,CAAC"}
@@ -0,0 +1,126 @@
1
+ import { z } from "zod";
2
+ export declare const ErrorBoundaryNodeSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ iterationContext: z.ZodOptional<z.ZodObject<{
5
+ originalNodeId: z.ZodString;
6
+ iteratorNodeId: z.ZodString;
7
+ index: z.ZodNumber;
8
+ }, "strip", z.ZodTypeAny, {
9
+ originalNodeId: string;
10
+ iteratorNodeId: string;
11
+ index: number;
12
+ }, {
13
+ originalNodeId: string;
14
+ iteratorNodeId: string;
15
+ index: number;
16
+ }>>;
17
+ activityConfig: z.ZodOptional<z.ZodObject<{
18
+ retryPolicy: z.ZodOptional<z.ZodObject<{
19
+ backoffCoefficient: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
20
+ initialInterval: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
21
+ maximumAttempts: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
22
+ maximumInterval: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ backoffCoefficient?: number | undefined;
25
+ initialInterval?: string | undefined;
26
+ maximumAttempts?: number | undefined;
27
+ maximumInterval?: string | undefined;
28
+ }, {
29
+ backoffCoefficient?: number | undefined;
30
+ initialInterval?: string | undefined;
31
+ maximumAttempts?: number | undefined;
32
+ maximumInterval?: string | undefined;
33
+ }>>;
34
+ startToCloseTimeout: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
35
+ scheduleToCloseTimeout: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ retryPolicy?: {
38
+ backoffCoefficient?: number | undefined;
39
+ initialInterval?: string | undefined;
40
+ maximumAttempts?: number | undefined;
41
+ maximumInterval?: string | undefined;
42
+ } | undefined;
43
+ startToCloseTimeout?: string | undefined;
44
+ scheduleToCloseTimeout?: string | undefined;
45
+ }, {
46
+ retryPolicy?: {
47
+ backoffCoefficient?: number | undefined;
48
+ initialInterval?: string | undefined;
49
+ maximumAttempts?: number | undefined;
50
+ maximumInterval?: string | undefined;
51
+ } | undefined;
52
+ startToCloseTimeout?: string | undefined;
53
+ scheduleToCloseTimeout?: string | undefined;
54
+ }>>;
55
+ } & {
56
+ type: z.ZodLiteral<"error_boundary">;
57
+ protectedNodes: z.ZodArray<z.ZodString, "many">;
58
+ http: z.ZodObject<{
59
+ method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>;
60
+ url: z.ZodEffects<z.ZodString, string, string>;
61
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodEffects<z.ZodString, string, string>]>]>>>;
62
+ body: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodEffects<z.ZodString, string, string>]>>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ url: string;
65
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
66
+ headers?: Record<string, string | Record<string, any>> | undefined;
67
+ body?: string | Record<string, any> | undefined;
68
+ }, {
69
+ url: string;
70
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
71
+ headers?: Record<string, string | Record<string, any>> | undefined;
72
+ body?: string | Record<string, any> | undefined;
73
+ }>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ type: "error_boundary";
76
+ id: string;
77
+ http: {
78
+ url: string;
79
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
80
+ headers?: Record<string, string | Record<string, any>> | undefined;
81
+ body?: string | Record<string, any> | undefined;
82
+ };
83
+ protectedNodes: string[];
84
+ iterationContext?: {
85
+ originalNodeId: string;
86
+ iteratorNodeId: string;
87
+ index: number;
88
+ } | undefined;
89
+ activityConfig?: {
90
+ retryPolicy?: {
91
+ backoffCoefficient?: number | undefined;
92
+ initialInterval?: string | undefined;
93
+ maximumAttempts?: number | undefined;
94
+ maximumInterval?: string | undefined;
95
+ } | undefined;
96
+ startToCloseTimeout?: string | undefined;
97
+ scheduleToCloseTimeout?: string | undefined;
98
+ } | undefined;
99
+ }, {
100
+ type: "error_boundary";
101
+ id: string;
102
+ http: {
103
+ url: string;
104
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
105
+ headers?: Record<string, string | Record<string, any>> | undefined;
106
+ body?: string | Record<string, any> | undefined;
107
+ };
108
+ protectedNodes: string[];
109
+ iterationContext?: {
110
+ originalNodeId: string;
111
+ iteratorNodeId: string;
112
+ index: number;
113
+ } | undefined;
114
+ activityConfig?: {
115
+ retryPolicy?: {
116
+ backoffCoefficient?: number | undefined;
117
+ initialInterval?: string | undefined;
118
+ maximumAttempts?: number | undefined;
119
+ maximumInterval?: string | undefined;
120
+ } | undefined;
121
+ startToCloseTimeout?: string | undefined;
122
+ scheduleToCloseTimeout?: string | undefined;
123
+ } | undefined;
124
+ }>;
125
+ export type ErrorBoundaryNode = z.infer<typeof ErrorBoundaryNodeSchema>;
126
+ //# sourceMappingURL=error-boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../../src/types/nodes/error-boundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorBoundaryNodeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const config_1 = require("../config");
6
+ const base_node_schema_1 = require("./common/base-node-schema");
7
+ // Error Boundary Node Schema
8
+ exports.ErrorBoundaryNodeSchema = base_node_schema_1.BaseNodeSchema.extend({
9
+ type: zod_1.z.literal("error_boundary").openapi({
10
+ description: "Specifies the node type as \`error_boundary\`. Other available types include \`http\`, \`agent\`, \`source_iterator\`, and \`destination\`.",
11
+ example: "error_boundary",
12
+ }),
13
+ protectedNodes: zod_1.z.array(zod_1.z.string()).openapi({
14
+ description: "IDs of nodes that this boundary protects and handles errors for",
15
+ example: ["fetch-user-data", "process-user-info"],
16
+ }),
17
+ http: config_1.HTTPConfigSchema,
18
+ }).openapi({
19
+ ref: "ErrorBoundaryNode",
20
+ title: "ErrorBoundaryNode",
21
+ description: 'A node that can protect both HTTP and Agent Nodes. Think of them like a try catch block in code. Only the most "specific" error boundary node will catch the error, the rest will be ignored.',
22
+ "x-tags": ["Nodes"],
23
+ });
24
+ //# sourceMappingURL=error-boundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.js","sourceRoot":"","sources":["../../../src/types/nodes/error-boundary.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAA6C;AAC7C,gEAA2D;AAE3D,6BAA6B;AAChB,QAAA,uBAAuB,GAAG,iCAAc,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC;QACxC,WAAW,EACT,6IAA6I;QAC/I,OAAO,EAAE,gBAAgB;KAC1B,CAAC;IACF,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC;QAC1C,WAAW,EACT,iEAAiE;QACnE,OAAO,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;KAClD,CAAC;IACF,IAAI,EAAE,yBAAgB;CACvB,CAAC,CAAC,OAAO,CAAC;IACT,GAAG,EAAE,mBAAmB;IACxB,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,+LAA+L;IACjM,QAAQ,EAAE,CAAC,OAAO,CAAC;CACpB,CAAC,CAAC"}