@requence/service 1.0.0-alpha.2 → 1.0.0-alpha.20

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 (88) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/build/{chunk-0x9092n4.js → chunk-6w7td62p.js} +5 -44
  3. package/build/chunk-6w7td62p.js.map +10 -0
  4. package/build/cli.js +22 -11
  5. package/build/cli.js.map +3 -3
  6. package/build/index.js +534 -775
  7. package/build/index.js.map +16 -16
  8. package/build/types/helpers/src/files/RequenceFile.d.ts +40 -0
  9. package/build/types/helpers/src/files/RequenceFile.d.ts.map +1 -0
  10. package/build/types/helpers/src/files/RequenceStream.d.ts +32 -0
  11. package/build/types/helpers/src/files/RequenceStream.d.ts.map +1 -0
  12. package/build/types/helpers/src/files/fileObject.d.ts +16 -0
  13. package/build/types/helpers/src/files/fileObject.d.ts.map +1 -0
  14. package/build/types/helpers/src/files/index.d.ts +7 -0
  15. package/build/types/helpers/src/files/index.d.ts.map +1 -0
  16. package/build/types/helpers/src/files/isValidMimeType.d.ts +5 -0
  17. package/build/types/helpers/src/files/isValidMimeType.d.ts.map +1 -0
  18. package/build/types/helpers/src/files/mapOutput.d.ts +10 -0
  19. package/build/types/helpers/src/files/mapOutput.d.ts.map +1 -0
  20. package/build/types/helpers/src/files/streamObject.d.ts +14 -0
  21. package/build/types/helpers/src/files/streamObject.d.ts.map +1 -0
  22. package/build/types/helpers/src/files/types.d.ts +4 -0
  23. package/build/types/helpers/src/files/types.d.ts.map +1 -0
  24. package/build/types/helpers/src/index.d.ts +9 -6
  25. package/build/types/helpers/src/index.d.ts.map +1 -1
  26. package/build/types/helpers/src/jsonschema/mapSchema.d.ts +20 -0
  27. package/build/types/helpers/src/jsonschema/mapSchema.d.ts.map +1 -0
  28. package/build/types/helpers/src/jsonschema/types.d.ts +11 -0
  29. package/build/types/helpers/src/jsonschema/types.d.ts.map +1 -0
  30. package/build/types/helpers/src/jsonschema/validate.d.ts +29 -0
  31. package/build/types/helpers/src/jsonschema/validate.d.ts.map +1 -0
  32. package/build/types/helpers/src/jsonschema/zod.d.ts +12 -0
  33. package/build/types/helpers/src/jsonschema/zod.d.ts.map +1 -0
  34. package/build/types/helpers/src/protocol/NodeTree.d.ts +504 -0
  35. package/build/types/helpers/src/protocol/NodeTree.d.ts.map +1 -0
  36. package/build/types/helpers/src/protocol/command.d.ts +414 -0
  37. package/build/types/helpers/src/protocol/command.d.ts.map +1 -0
  38. package/build/types/helpers/src/protocol/helpers.d.ts +5 -0
  39. package/build/types/helpers/src/protocol/helpers.d.ts.map +1 -0
  40. package/build/types/helpers/src/protocol/index.d.ts +8 -0
  41. package/build/types/helpers/src/protocol/index.d.ts.map +1 -0
  42. package/build/types/helpers/src/protocol/nodeOptions.d.ts +16 -0
  43. package/build/types/helpers/src/protocol/nodeOptions.d.ts.map +1 -0
  44. package/build/types/helpers/src/protocol/nodeType.d.ts +283 -0
  45. package/build/types/helpers/src/protocol/nodeType.d.ts.map +1 -0
  46. package/build/types/helpers/src/protocol/targetNodes.d.ts +253 -0
  47. package/build/types/helpers/src/protocol/targetNodes.d.ts.map +1 -0
  48. package/build/types/helpers/src/protocol/treeNodes.d.ts +606 -0
  49. package/build/types/helpers/src/protocol/treeNodes.d.ts.map +1 -0
  50. package/build/types/helpers/src/protocol/update.d.ts +241 -0
  51. package/build/types/helpers/src/protocol/update.d.ts.map +1 -0
  52. package/build/types/helpers/src/utils/callbackToAsyncIterator.d.ts +3 -0
  53. package/build/types/helpers/src/utils/callbackToAsyncIterator.d.ts.map +1 -0
  54. package/build/types/helpers/src/utils/clone.d.ts +3 -0
  55. package/build/types/helpers/src/utils/clone.d.ts.map +1 -0
  56. package/build/types/helpers/src/utils/createObjectProxy.d.ts +2 -0
  57. package/build/types/helpers/src/utils/createObjectProxy.d.ts.map +1 -0
  58. package/build/types/helpers/src/{createRemotePromise.d.ts → utils/createRemotePromise.d.ts} +1 -1
  59. package/build/types/helpers/src/utils/createRemotePromise.d.ts.map +1 -0
  60. package/build/types/helpers/src/utils/isRecord.d.ts +2 -0
  61. package/build/types/helpers/src/utils/isRecord.d.ts.map +1 -0
  62. package/build/types/helpers/src/utils/mapData.d.ts +17 -0
  63. package/build/types/helpers/src/utils/mapData.d.ts.map +1 -0
  64. package/build/types/helpers/src/{utils.d.ts → utils/matchSchema.d.ts} +2 -2
  65. package/build/types/helpers/src/utils/matchSchema.d.ts.map +1 -0
  66. package/build/types/helpers/src/utils/obfuscate.d.ts.map +1 -0
  67. package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts +2 -0
  68. package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts.map +1 -0
  69. package/build/types/helpers/src/utils/types.d.ts +4 -0
  70. package/build/types/helpers/src/utils/types.d.ts.map +1 -0
  71. package/build/types/service/src/createAmqpConnection.d.ts +17 -18
  72. package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
  73. package/build/types/service/src/helpers.d.ts +13 -88
  74. package/build/types/service/src/helpers.d.ts.map +1 -1
  75. package/build/types/service/src/index.d.ts +7 -5
  76. package/build/types/service/src/index.d.ts.map +1 -1
  77. package/build/types/service/src/mapInput.d.ts +2 -0
  78. package/build/types/service/src/mapInput.d.ts.map +1 -0
  79. package/package.json +7 -8
  80. package/build/chunk-0x9092n4.js.map +0 -12
  81. package/build/types/helpers/src/clone.d.ts +0 -3
  82. package/build/types/helpers/src/clone.d.ts.map +0 -1
  83. package/build/types/helpers/src/createObjectProxy.d.ts +0 -2
  84. package/build/types/helpers/src/createObjectProxy.d.ts.map +0 -1
  85. package/build/types/helpers/src/createRemotePromise.d.ts.map +0 -1
  86. package/build/types/helpers/src/obfuscate.d.ts.map +0 -1
  87. package/build/types/helpers/src/utils.d.ts.map +0 -1
  88. /package/build/types/helpers/src/{obfuscate.d.ts → utils/obfuscate.d.ts} +0 -0
@@ -0,0 +1,20 @@
1
+ import type { JSONSchema7Definition } from 'json-schema';
2
+ import type { JSONSchema7 } from './types.ts';
3
+ interface Visitor {
4
+ String?: (schema: JSONSchema7) => JSONSchema7 | void;
5
+ Integer?: (schema: JSONSchema7) => JSONSchema7 | void;
6
+ Boolean?: (schema: JSONSchema7) => JSONSchema7 | void;
7
+ Null?: (schema: JSONSchema7) => JSONSchema7 | void;
8
+ Number?: (schema: JSONSchema7) => JSONSchema7 | void;
9
+ Array?: (schema: JSONSchema7) => JSONSchema7 | void;
10
+ Object?: (schema: JSONSchema7) => JSONSchema7 | void;
11
+ AnyOf?: (schema: JSONSchema7) => JSONSchema7 | void;
12
+ AllOf?: (schema: JSONSchema7) => JSONSchema7 | void;
13
+ OneOf?: (schema: JSONSchema7) => JSONSchema7 | void;
14
+ $ref?: (schema: JSONSchema7) => JSONSchema7 | void;
15
+ Enum?: (schema: JSONSchema7) => JSONSchema7 | void;
16
+ RequenceType?: (schema: JSONSchema7) => JSONSchema7 | void;
17
+ }
18
+ export default function mapSchema<T extends JSONSchema7Definition>(rawSchema: T, visitor: Visitor): T;
19
+ export {};
20
+ //# sourceMappingURL=mapSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapSchema.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/mapSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,UAAU,OAAO;IACf,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACpD,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACrD,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACrD,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IAClD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACpD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACnD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACpD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACnD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACnD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IACnD,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IAClD,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;IAClD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,IAAI,CAAA;CAC3D;AAMD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,qBAAqB,EAC/D,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,OAAO,GACf,CAAC,CAuFH"}
@@ -0,0 +1,11 @@
1
+ import type { JSONSchema7, JSONSchema7TypeName } from 'json-schema';
2
+ declare module 'json-schema' {
3
+ interface JSONSchema7 {
4
+ requenceType?: 'file' | 'stream';
5
+ maxByteLength?: number;
6
+ instanceOf?: string;
7
+ accept?: string;
8
+ }
9
+ }
10
+ export type { JSONSchema7, JSONSchema7TypeName };
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEnE,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,WAAW;QACnB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAChC,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB;CACF;AAED,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { Ajv as BaseAjv, type KeywordDefinition, type Options } from 'ajv';
2
+ import type { JSONSchema7 } from 'json-schema';
3
+ export declare class ValidationError extends Error {
4
+ readonly property?: string | undefined;
5
+ constructor(message: string, property?: string | undefined);
6
+ }
7
+ export declare const acceptKeyword: KeywordDefinition;
8
+ export declare const acceptKeywordEnforced: KeywordDefinition;
9
+ export declare const requenceTypeKeywords: KeywordDefinition;
10
+ export declare const instanceOfKeyword: KeywordDefinition;
11
+ export declare const maxByteLengthKeyword: KeywordDefinition;
12
+ export declare const maxByteLengthKeywordEnforced: KeywordDefinition;
13
+ export declare class Ajv extends BaseAjv {
14
+ constructor(options?: Options & {
15
+ enforeFileKeywords?: boolean;
16
+ });
17
+ }
18
+ export declare function validate<T extends JSONSchema7>(options: {
19
+ schema: T;
20
+ value: unknown;
21
+ property?: string;
22
+ allowAdditionalProperties?: boolean;
23
+ enforeFileKeywords?: boolean;
24
+ coerceTypes?: boolean;
25
+ removeAdditional?: boolean;
26
+ }): {
27
+ [x: string]: {};
28
+ };
29
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,IAAI,OAAO,EAEd,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACb,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAO9C,qBAAa,eAAgB,SAAQ,KAAK;aAGtB,QAAQ,CAAC,EAAE,MAAM;gBADjC,OAAO,EAAE,MAAM,EACC,QAAQ,CAAC,EAAE,MAAM,YAAA;CAIpC;AAED,eAAO,MAAM,aAAa,EAAE,iBAQ3B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,iBAkBnC,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAKlC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAkB/B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAOlC,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,iBAmB1C,CAAA;AAED,qBAAa,GAAI,SAAQ,OAAO;gBAClB,OAAO,CAAC,EAAE,OAAO,GAAG;QAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;KAAE;CAajE;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE;IACvD,MAAM,EAAE,CAAC,CAAA;IACT,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;;EA+BA"}
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod/v4';
2
+ import type { JSONSchema7 } from './types.ts';
3
+ export declare const jsonSchema7Schema: z.ZodCustom<JSONSchema7, JSONSchema7>;
4
+ export declare const jsonSchema7ObjectSchema: z.ZodIntersection<z.ZodObject<{
5
+ type: z.ZodLiteral<"object">;
6
+ }, z.core.$strip>, z.ZodCustom<JSONSchema7, JSONSchema7>>;
7
+ export declare const jsonSchema7NullSchema: z.ZodObject<{
8
+ type: z.ZodLiteral<"null">;
9
+ }, z.core.$strip>;
10
+ export type JSONSchema7Object = z.infer<typeof jsonSchema7ObjectSchema>;
11
+ export type JSONSchema7Null = z.infer<typeof jsonSchema7NullSchema>;
12
+ //# sourceMappingURL=zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/jsonschema/zod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAG7C,eAAO,MAAM,iBAAiB,uCAU7B,CAAA;AAED,eAAO,MAAM,uBAAuB;;yDAIX,CAAA;AAEzB,eAAO,MAAM,qBAAqB;;iBAEhC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,504 @@
1
+ import { ERROR, type TreeEdge, type TreeNode } from './nodeType.ts';
2
+ export type OutputName = string | null | typeof ERROR;
3
+ type ExtendedTreeEdge = TreeEdge & {
4
+ traversed: number;
5
+ data?: string;
6
+ };
7
+ interface NodeTreeOptions {
8
+ nodes: TreeNode[];
9
+ edges: TreeEdge[] | ExtendedTreeEdge[];
10
+ data?: Map<string, unknown>;
11
+ }
12
+ export declare class NodeTree {
13
+ private nodes;
14
+ private edges;
15
+ private data;
16
+ readonly cycles: {
17
+ node: TreeNode;
18
+ name: OutputName;
19
+ }[][];
20
+ readonly entryNode: Extract<TreeNode, {
21
+ type: 'entry';
22
+ }>;
23
+ constructor({ nodes, edges, data }: NodeTreeOptions);
24
+ pack(): (({
25
+ id: string;
26
+ type: "exit";
27
+ alias?: string | undefined;
28
+ } | {
29
+ id: string;
30
+ type: "entry";
31
+ inputSchema: import("json-schema").JSONSchema7;
32
+ outputs: {
33
+ name: string | typeof ERROR | null;
34
+ schema: import("json-schema").JSONSchema7 | null;
35
+ }[];
36
+ alias?: string | undefined;
37
+ } | {
38
+ id: string;
39
+ type: "service";
40
+ inputSchema: ({
41
+ type: "object";
42
+ } & import("json-schema").JSONSchema7) | {
43
+ type: "null";
44
+ };
45
+ name: string;
46
+ version: string;
47
+ configurationSchema: import("json-schema").JSONSchema7;
48
+ outputs: {
49
+ name: string | typeof ERROR | null;
50
+ schema: import("json-schema").JSONSchema7 | null;
51
+ }[];
52
+ alias?: string | undefined;
53
+ configuration?: any;
54
+ ttl?: number | undefined;
55
+ retry?: number | undefined;
56
+ retryDelay?: number | undefined;
57
+ } | {
58
+ id: string;
59
+ type: "logic";
60
+ script: string;
61
+ concurrency: boolean;
62
+ language: "javascript" | "python" | "typescript";
63
+ maxExecutionTime: number;
64
+ outputs: {
65
+ name: string | typeof ERROR | null;
66
+ schema: import("json-schema").JSONSchema7 | null;
67
+ }[];
68
+ alias?: string | undefined;
69
+ } | {
70
+ id: string;
71
+ type: "or";
72
+ outputs: {
73
+ name: string | typeof ERROR | null;
74
+ schema: import("json-schema").JSONSchema7 | null;
75
+ }[];
76
+ alias?: string | undefined;
77
+ } | {
78
+ id: string;
79
+ type: "reference";
80
+ reference: string;
81
+ outputs: {
82
+ name: string | typeof ERROR | null;
83
+ schema: import("json-schema").JSONSchema7 | null;
84
+ }[];
85
+ alias?: string | undefined;
86
+ configuration?: any;
87
+ })[] | ExtendedTreeEdge[] | Map<string, unknown>)[];
88
+ static get ERROR(): typeof ERROR;
89
+ getPossiblePathsTo(nodeId: string, allowMultipleOutputs?: boolean): {
90
+ node: {
91
+ id: string;
92
+ type: "exit";
93
+ alias?: string | undefined;
94
+ } | {
95
+ id: string;
96
+ type: "entry";
97
+ inputSchema: import("json-schema").JSONSchema7;
98
+ outputs: {
99
+ name: string | typeof ERROR | null;
100
+ schema: import("json-schema").JSONSchema7 | null;
101
+ }[];
102
+ alias?: string | undefined;
103
+ } | {
104
+ id: string;
105
+ type: "service";
106
+ inputSchema: ({
107
+ type: "object";
108
+ } & import("json-schema").JSONSchema7) | {
109
+ type: "null";
110
+ };
111
+ name: string;
112
+ version: string;
113
+ configurationSchema: import("json-schema").JSONSchema7;
114
+ outputs: {
115
+ name: string | typeof ERROR | null;
116
+ schema: import("json-schema").JSONSchema7 | null;
117
+ }[];
118
+ alias?: string | undefined;
119
+ configuration?: any;
120
+ ttl?: number | undefined;
121
+ retry?: number | undefined;
122
+ retryDelay?: number | undefined;
123
+ } | {
124
+ id: string;
125
+ type: "logic";
126
+ script: string;
127
+ concurrency: boolean;
128
+ language: "javascript" | "python" | "typescript";
129
+ maxExecutionTime: number;
130
+ outputs: {
131
+ name: string | typeof ERROR | null;
132
+ schema: import("json-schema").JSONSchema7 | null;
133
+ }[];
134
+ alias?: string | undefined;
135
+ } | {
136
+ id: string;
137
+ type: "or";
138
+ outputs: {
139
+ name: string | typeof ERROR | null;
140
+ schema: import("json-schema").JSONSchema7 | null;
141
+ }[];
142
+ alias?: string | undefined;
143
+ } | {
144
+ id: string;
145
+ type: "reference";
146
+ reference: string;
147
+ outputs: {
148
+ name: string | typeof ERROR | null;
149
+ schema: import("json-schema").JSONSchema7 | null;
150
+ }[];
151
+ alias?: string | undefined;
152
+ configuration?: any;
153
+ };
154
+ name: OutputName;
155
+ }[][];
156
+ getNodes(condition?: (node: TreeNode) => boolean): ({
157
+ id: string;
158
+ type: "exit";
159
+ alias?: string | undefined;
160
+ } | {
161
+ id: string;
162
+ type: "entry";
163
+ inputSchema: import("json-schema").JSONSchema7;
164
+ outputs: {
165
+ name: string | typeof ERROR | null;
166
+ schema: import("json-schema").JSONSchema7 | null;
167
+ }[];
168
+ alias?: string | undefined;
169
+ } | {
170
+ id: string;
171
+ type: "service";
172
+ inputSchema: ({
173
+ type: "object";
174
+ } & import("json-schema").JSONSchema7) | {
175
+ type: "null";
176
+ };
177
+ name: string;
178
+ version: string;
179
+ configurationSchema: import("json-schema").JSONSchema7;
180
+ outputs: {
181
+ name: string | typeof ERROR | null;
182
+ schema: import("json-schema").JSONSchema7 | null;
183
+ }[];
184
+ alias?: string | undefined;
185
+ configuration?: any;
186
+ ttl?: number | undefined;
187
+ retry?: number | undefined;
188
+ retryDelay?: number | undefined;
189
+ } | {
190
+ id: string;
191
+ type: "logic";
192
+ script: string;
193
+ concurrency: boolean;
194
+ language: "javascript" | "python" | "typescript";
195
+ maxExecutionTime: number;
196
+ outputs: {
197
+ name: string | typeof ERROR | null;
198
+ schema: import("json-schema").JSONSchema7 | null;
199
+ }[];
200
+ alias?: string | undefined;
201
+ } | {
202
+ id: string;
203
+ type: "or";
204
+ outputs: {
205
+ name: string | typeof ERROR | null;
206
+ schema: import("json-schema").JSONSchema7 | null;
207
+ }[];
208
+ alias?: string | undefined;
209
+ } | {
210
+ id: string;
211
+ type: "reference";
212
+ reference: string;
213
+ outputs: {
214
+ name: string | typeof ERROR | null;
215
+ schema: import("json-schema").JSONSchema7 | null;
216
+ }[];
217
+ alias?: string | undefined;
218
+ configuration?: any;
219
+ })[];
220
+ getNode(condition: (node: TreeNode) => boolean): TreeNode | undefined;
221
+ getChildren(nodeId: string, outputName: OutputName): ({
222
+ id: string;
223
+ type: "exit";
224
+ alias?: string | undefined;
225
+ } | {
226
+ id: string;
227
+ type: "entry";
228
+ inputSchema: import("json-schema").JSONSchema7;
229
+ outputs: {
230
+ name: string | typeof ERROR | null;
231
+ schema: import("json-schema").JSONSchema7 | null;
232
+ }[];
233
+ alias?: string | undefined;
234
+ } | {
235
+ id: string;
236
+ type: "service";
237
+ inputSchema: ({
238
+ type: "object";
239
+ } & import("json-schema").JSONSchema7) | {
240
+ type: "null";
241
+ };
242
+ name: string;
243
+ version: string;
244
+ configurationSchema: import("json-schema").JSONSchema7;
245
+ outputs: {
246
+ name: string | typeof ERROR | null;
247
+ schema: import("json-schema").JSONSchema7 | null;
248
+ }[];
249
+ alias?: string | undefined;
250
+ configuration?: any;
251
+ ttl?: number | undefined;
252
+ retry?: number | undefined;
253
+ retryDelay?: number | undefined;
254
+ } | {
255
+ id: string;
256
+ type: "logic";
257
+ script: string;
258
+ concurrency: boolean;
259
+ language: "javascript" | "python" | "typescript";
260
+ maxExecutionTime: number;
261
+ outputs: {
262
+ name: string | typeof ERROR | null;
263
+ schema: import("json-schema").JSONSchema7 | null;
264
+ }[];
265
+ alias?: string | undefined;
266
+ } | {
267
+ id: string;
268
+ type: "or";
269
+ outputs: {
270
+ name: string | typeof ERROR | null;
271
+ schema: import("json-schema").JSONSchema7 | null;
272
+ }[];
273
+ alias?: string | undefined;
274
+ } | {
275
+ id: string;
276
+ type: "reference";
277
+ reference: string;
278
+ outputs: {
279
+ name: string | typeof ERROR | null;
280
+ schema: import("json-schema").JSONSchema7 | null;
281
+ }[];
282
+ alias?: string | undefined;
283
+ configuration?: any;
284
+ })[];
285
+ getParents(nodeId: string): ({
286
+ id: string;
287
+ type: "exit";
288
+ alias?: string | undefined;
289
+ } | {
290
+ id: string;
291
+ type: "entry";
292
+ inputSchema: import("json-schema").JSONSchema7;
293
+ outputs: {
294
+ name: string | typeof ERROR | null;
295
+ schema: import("json-schema").JSONSchema7 | null;
296
+ }[];
297
+ alias?: string | undefined;
298
+ } | {
299
+ id: string;
300
+ type: "service";
301
+ inputSchema: ({
302
+ type: "object";
303
+ } & import("json-schema").JSONSchema7) | {
304
+ type: "null";
305
+ };
306
+ name: string;
307
+ version: string;
308
+ configurationSchema: import("json-schema").JSONSchema7;
309
+ outputs: {
310
+ name: string | typeof ERROR | null;
311
+ schema: import("json-schema").JSONSchema7 | null;
312
+ }[];
313
+ alias?: string | undefined;
314
+ configuration?: any;
315
+ ttl?: number | undefined;
316
+ retry?: number | undefined;
317
+ retryDelay?: number | undefined;
318
+ } | {
319
+ id: string;
320
+ type: "logic";
321
+ script: string;
322
+ concurrency: boolean;
323
+ language: "javascript" | "python" | "typescript";
324
+ maxExecutionTime: number;
325
+ outputs: {
326
+ name: string | typeof ERROR | null;
327
+ schema: import("json-schema").JSONSchema7 | null;
328
+ }[];
329
+ alias?: string | undefined;
330
+ } | {
331
+ id: string;
332
+ type: "or";
333
+ outputs: {
334
+ name: string | typeof ERROR | null;
335
+ schema: import("json-schema").JSONSchema7 | null;
336
+ }[];
337
+ alias?: string | undefined;
338
+ } | {
339
+ id: string;
340
+ type: "reference";
341
+ reference: string;
342
+ outputs: {
343
+ name: string | typeof ERROR | null;
344
+ schema: import("json-schema").JSONSchema7 | null;
345
+ }[];
346
+ alias?: string | undefined;
347
+ configuration?: any;
348
+ })[];
349
+ getAllParents(nodeId: string): ({
350
+ id: string;
351
+ type: "exit";
352
+ alias?: string | undefined;
353
+ } | {
354
+ id: string;
355
+ type: "entry";
356
+ inputSchema: import("json-schema").JSONSchema7;
357
+ outputs: {
358
+ name: string | typeof ERROR | null;
359
+ schema: import("json-schema").JSONSchema7 | null;
360
+ }[];
361
+ alias?: string | undefined;
362
+ } | {
363
+ id: string;
364
+ type: "service";
365
+ inputSchema: ({
366
+ type: "object";
367
+ } & import("json-schema").JSONSchema7) | {
368
+ type: "null";
369
+ };
370
+ name: string;
371
+ version: string;
372
+ configurationSchema: import("json-schema").JSONSchema7;
373
+ outputs: {
374
+ name: string | typeof ERROR | null;
375
+ schema: import("json-schema").JSONSchema7 | null;
376
+ }[];
377
+ alias?: string | undefined;
378
+ configuration?: any;
379
+ ttl?: number | undefined;
380
+ retry?: number | undefined;
381
+ retryDelay?: number | undefined;
382
+ } | {
383
+ id: string;
384
+ type: "logic";
385
+ script: string;
386
+ concurrency: boolean;
387
+ language: "javascript" | "python" | "typescript";
388
+ maxExecutionTime: number;
389
+ outputs: {
390
+ name: string | typeof ERROR | null;
391
+ schema: import("json-schema").JSONSchema7 | null;
392
+ }[];
393
+ alias?: string | undefined;
394
+ } | {
395
+ id: string;
396
+ type: "or";
397
+ outputs: {
398
+ name: string | typeof ERROR | null;
399
+ schema: import("json-schema").JSONSchema7 | null;
400
+ }[];
401
+ alias?: string | undefined;
402
+ } | {
403
+ id: string;
404
+ type: "reference";
405
+ reference: string;
406
+ outputs: {
407
+ name: string | typeof ERROR | null;
408
+ schema: import("json-schema").JSONSchema7 | null;
409
+ }[];
410
+ alias?: string | undefined;
411
+ configuration?: any;
412
+ })[];
413
+ /**
414
+ * normally a node is "reached" when all incoming edges are traversed with the following exceptions:
415
+ *
416
+ * when the incoming edge belongs to a service that is part of a loop where the questioned node is also part of,
417
+ * this incoming edge is considered traversed
418
+ *
419
+ * or nodes are "reaced" when at least one incoming edge is traversed
420
+ *
421
+ * the entry node is "reached" by default
422
+ */
423
+ isReached(nodeId: string): boolean;
424
+ getParentsWithEdgeHandle(nodeId: string): {
425
+ node: {
426
+ id: string;
427
+ type: "exit";
428
+ alias?: string | undefined;
429
+ } | {
430
+ id: string;
431
+ type: "entry";
432
+ inputSchema: import("json-schema").JSONSchema7;
433
+ outputs: {
434
+ name: string | typeof ERROR | null;
435
+ schema: import("json-schema").JSONSchema7 | null;
436
+ }[];
437
+ alias?: string | undefined;
438
+ } | {
439
+ id: string;
440
+ type: "service";
441
+ inputSchema: ({
442
+ type: "object";
443
+ } & import("json-schema").JSONSchema7) | {
444
+ type: "null";
445
+ };
446
+ name: string;
447
+ version: string;
448
+ configurationSchema: import("json-schema").JSONSchema7;
449
+ outputs: {
450
+ name: string | typeof ERROR | null;
451
+ schema: import("json-schema").JSONSchema7 | null;
452
+ }[];
453
+ alias?: string | undefined;
454
+ configuration?: any;
455
+ ttl?: number | undefined;
456
+ retry?: number | undefined;
457
+ retryDelay?: number | undefined;
458
+ } | {
459
+ id: string;
460
+ type: "logic";
461
+ script: string;
462
+ concurrency: boolean;
463
+ language: "javascript" | "python" | "typescript";
464
+ maxExecutionTime: number;
465
+ outputs: {
466
+ name: string | typeof ERROR | null;
467
+ schema: import("json-schema").JSONSchema7 | null;
468
+ }[];
469
+ alias?: string | undefined;
470
+ } | {
471
+ id: string;
472
+ type: "or";
473
+ outputs: {
474
+ name: string | typeof ERROR | null;
475
+ schema: import("json-schema").JSONSchema7 | null;
476
+ }[];
477
+ alias?: string | undefined;
478
+ } | {
479
+ id: string;
480
+ type: "reference";
481
+ reference: string;
482
+ outputs: {
483
+ name: string | typeof ERROR | null;
484
+ schema: import("json-schema").JSONSchema7 | null;
485
+ }[];
486
+ alias?: string | undefined;
487
+ configuration?: any;
488
+ };
489
+ handle: OutputName;
490
+ }[];
491
+ getTriggers(nodeId: string): string[];
492
+ traverse(nodeId: string, outputName: OutputName): void;
493
+ traverseWithData(nodeId: string, outputName: OutputName, data: unknown): void;
494
+ disconnect(sourceNodeId: string, sourceNodeOutputName: OutputName, targetNodeId: string): void;
495
+ getData(nodeId: string, outputName: OutputName): unknown;
496
+ traversed(sourceNodeId: string, targetNodeId: string): boolean;
497
+ getAllData(): Map<string, Map<OutputName, unknown>>;
498
+ getAggregatedDataByNode(targetNodeId: string): Record<string, unknown>;
499
+ getAggregatedData(targetNodeId: string): Record<string, unknown>;
500
+ reset(): void;
501
+ gc(): void;
502
+ }
503
+ export {};
504
+ //# sourceMappingURL=NodeTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeTree.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/NodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEnE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,KAAK,CAAA;AAErD,KAAK,gBAAgB,GAAG,QAAQ,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAgHvE,UAAU,eAAe;IACvB,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,KAAK,EAAE,QAAQ,EAAE,GAAG,gBAAgB,EAAE,CAAA;IACtC,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC5B;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,IAAI,CAAsB;IAClC,SAAgB,MAAM,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,UAAU,CAAA;KAAE,EAAE,EAAE,CAAA;IAChE,SAAgB,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;gBAEnD,EAAE,KAAK,EAAE,KAAK,EAAE,IAAgB,EAAE,EAAE,eAAe;IAoB/D,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIJ,MAAM,KAAK,KAAK,IAAI,OAAO,KAAK,CAE/B;IAED,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,oBAAoB,UAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAjDnC,UAAU;;IA0DtC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKhD,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,GAAG,QAAQ,GAAG,SAAS;IAQrE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQlD,UAAU,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQzB,aAAa,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAe5B;;;;;;;;;OASG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM;IA8BxB,wBAAwB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAKJ,UAAU;;IAI7C,WAAW,CAAC,MAAM,EAAE,MAAM;IAU1B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;IAS/C,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO;IAiBtE,UAAU,CACR,YAAY,EAAE,MAAM,EACpB,oBAAoB,EAAE,UAAU,EAChC,YAAY,EAAE,MAAM;IAatB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;IAO9C,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IASpD,UAAU;IAiBV,uBAAuB,CAAC,YAAY,EAAE,MAAM;IAkC5C,iBAAiB,CAAC,YAAY,EAAE,MAAM;IAYtC,KAAK;IASL,EAAE;CAYH"}