@requence/service 1.0.0-alpha.3 → 1.0.0-alpha.30

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 (92) hide show
  1. package/CHANGELOG.md +163 -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 +14 -9
  5. package/build/cli.js.map +3 -3
  6. package/build/index.js +801 -792
  7. package/build/index.js.map +17 -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 +10 -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 +12 -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 +441 -0
  35. package/build/types/helpers/src/protocol/NodeTree.d.ts.map +1 -0
  36. package/build/types/helpers/src/protocol/command.d.ts +420 -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/nodeType.d.ts +283 -0
  43. package/build/types/helpers/src/protocol/nodeType.d.ts.map +1 -0
  44. package/build/types/helpers/src/protocol/targetNodes.d.ts +253 -0
  45. package/build/types/helpers/src/protocol/targetNodes.d.ts.map +1 -0
  46. package/build/types/helpers/src/protocol/taskOptions.d.ts +17 -0
  47. package/build/types/helpers/src/protocol/taskOptions.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 +354 -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 +18 -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/requenceCallback.d.ts +17 -0
  68. package/build/types/helpers/src/utils/requenceCallback.d.ts.map +1 -0
  69. package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts +8 -0
  70. package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts.map +1 -0
  71. package/build/types/helpers/src/utils/types.d.ts +4 -0
  72. package/build/types/helpers/src/utils/types.d.ts.map +1 -0
  73. package/build/types/service/src/createAmqpConnection.d.ts +19 -20
  74. package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
  75. package/build/types/service/src/helpers.d.ts +56 -100
  76. package/build/types/service/src/helpers.d.ts.map +1 -1
  77. package/build/types/service/src/index.d.ts +8 -5
  78. package/build/types/service/src/index.d.ts.map +1 -1
  79. package/build/types/service/src/macro.d.ts +2 -0
  80. package/build/types/service/src/macro.d.ts.map +1 -0
  81. package/build/types/service/src/mapInput.d.ts +2 -0
  82. package/build/types/service/src/mapInput.d.ts.map +1 -0
  83. package/package.json +7 -8
  84. package/build/chunk-0x9092n4.js.map +0 -12
  85. package/build/types/helpers/src/clone.d.ts +0 -3
  86. package/build/types/helpers/src/clone.d.ts.map +0 -1
  87. package/build/types/helpers/src/createObjectProxy.d.ts +0 -2
  88. package/build/types/helpers/src/createObjectProxy.d.ts.map +0 -1
  89. package/build/types/helpers/src/createRemotePromise.d.ts.map +0 -1
  90. package/build/types/helpers/src/obfuscate.d.ts.map +0 -1
  91. package/build/types/helpers/src/utils.d.ts.map +0 -1
  92. /package/build/types/helpers/src/{obfuscate.d.ts → utils/obfuscate.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streamObject.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/streamObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,QAAA,MAAM,kBAAkB;;;;iBAItB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,YAAY,CAElE;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,YAAY,CAKf"}
@@ -0,0 +1,4 @@
1
+ export type MainMimeType<T extends string> = T extends `${infer V}/${string}` ? V extends '*' ? any : V : any;
2
+ export type SubMimeType<T extends string> = T extends `${string}/${infer V}` ? V extends '*' ? any : V : any;
3
+ export type ValidMimeType<T extends `${string}/${string}`> = T extends `${infer A}/${infer B}` ? A extends '*' | '' | '/' ? never : B extends '*' | '' | '/' ? never : T : never;
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,EAAE,GACzE,CAAC,SAAS,GAAG,GACX,GAAG,GACH,CAAC,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,MAAM,CAAC,EAAE,GACxE,CAAC,SAAS,GAAG,GACX,GAAG,GACH,CAAC,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,GAAG,MAAM,IAAI,MAAM,EAAE,IACvD,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,GAC7B,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,GAAG,GACtB,KAAK,GACL,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,GAAG,GACtB,KAAK,GACL,CAAC,GACL,KAAK,CAAA"}
@@ -1,7 +1,11 @@
1
- export * from './utils.ts';
2
- export * from './obfuscate.ts';
3
- export { default as clone } from './clone.ts';
4
- export { default as createObjectProxy } from './createObjectProxy.ts';
5
- export { default as createRemotePromise } from './createRemotePromise.ts';
6
- export { type RemotePromise } from './createRemotePromise.ts';
1
+ export * from './utils/matchSchema.ts';
2
+ export * from './utils/obfuscate.ts';
3
+ export * from './utils/clone.ts';
4
+ export * from './utils/createObjectProxy.ts';
5
+ export * from './utils/createRemotePromise.ts';
6
+ export * from './utils/callbackToAsyncIterator.ts';
7
+ export * from './utils/mapData.ts';
8
+ export * from './utils/isRecord.ts';
9
+ export * from './utils/resolveRequenceTypes.ts';
10
+ export * from './utils/requenceCallback.ts';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../helpers/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../helpers/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA"}
@@ -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 declare 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;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-schema' {
3
+ interface JSONSchema7 {
4
+ requenceType?: 'file' | 'stream' | 'callback';
5
+ arg?: JSONSchema7;
6
+ maxByteLength?: number;
7
+ instanceOf?: string;
8
+ accept?: string;
9
+ }
10
+ }
11
+ export type { JSONSchema7, JSONSchema7TypeName };
12
+ //# 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,GAAG,UAAU,CAAA;QAC7C,GAAG,CAAC,EAAE,WAAW,CAAA;QACjB,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;AAEZ,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;AAMD,qBAAa,GAAI,SAAQ,OAAO;gBAClB,OAAO,CAAC,EAAE,OAAO,GAAG;QAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;KAAE;CAcjE;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;;EA0DA"}
@@ -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,441 @@
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
+ nodeId: string;
91
+ name: OutputName;
92
+ }[][];
93
+ getNodes(condition?: (node: TreeNode) => boolean): ({
94
+ id: string;
95
+ type: "exit";
96
+ alias?: string | undefined;
97
+ } | {
98
+ id: string;
99
+ type: "entry";
100
+ inputSchema: import("json-schema").JSONSchema7;
101
+ outputs: {
102
+ name: string | typeof ERROR | null;
103
+ schema: import("json-schema").JSONSchema7 | null;
104
+ }[];
105
+ alias?: string | undefined;
106
+ } | {
107
+ id: string;
108
+ type: "service";
109
+ inputSchema: ({
110
+ type: "object";
111
+ } & import("json-schema").JSONSchema7) | {
112
+ type: "null";
113
+ };
114
+ name: string;
115
+ version: string;
116
+ configurationSchema: import("json-schema").JSONSchema7;
117
+ outputs: {
118
+ name: string | typeof ERROR | null;
119
+ schema: import("json-schema").JSONSchema7 | null;
120
+ }[];
121
+ alias?: string | undefined;
122
+ configuration?: any;
123
+ ttl?: number | undefined;
124
+ retry?: number | undefined;
125
+ retryDelay?: number | undefined;
126
+ } | {
127
+ id: string;
128
+ type: "logic";
129
+ script: string;
130
+ concurrency: boolean;
131
+ language: "javascript" | "python" | "typescript";
132
+ maxExecutionTime: number;
133
+ outputs: {
134
+ name: string | typeof ERROR | null;
135
+ schema: import("json-schema").JSONSchema7 | null;
136
+ }[];
137
+ alias?: string | undefined;
138
+ } | {
139
+ id: string;
140
+ type: "or";
141
+ outputs: {
142
+ name: string | typeof ERROR | null;
143
+ schema: import("json-schema").JSONSchema7 | null;
144
+ }[];
145
+ alias?: string | undefined;
146
+ } | {
147
+ id: string;
148
+ type: "reference";
149
+ reference: string;
150
+ outputs: {
151
+ name: string | typeof ERROR | null;
152
+ schema: import("json-schema").JSONSchema7 | null;
153
+ }[];
154
+ alias?: string | undefined;
155
+ configuration?: any;
156
+ })[];
157
+ getNode(condition: (node: TreeNode) => boolean): TreeNode | undefined;
158
+ getChildren(nodeId: string, outputName: OutputName): ({
159
+ id: string;
160
+ type: "exit";
161
+ alias?: string | undefined;
162
+ } | {
163
+ id: string;
164
+ type: "entry";
165
+ inputSchema: import("json-schema").JSONSchema7;
166
+ outputs: {
167
+ name: string | typeof ERROR | null;
168
+ schema: import("json-schema").JSONSchema7 | null;
169
+ }[];
170
+ alias?: string | undefined;
171
+ } | {
172
+ id: string;
173
+ type: "service";
174
+ inputSchema: ({
175
+ type: "object";
176
+ } & import("json-schema").JSONSchema7) | {
177
+ type: "null";
178
+ };
179
+ name: string;
180
+ version: string;
181
+ configurationSchema: import("json-schema").JSONSchema7;
182
+ outputs: {
183
+ name: string | typeof ERROR | null;
184
+ schema: import("json-schema").JSONSchema7 | null;
185
+ }[];
186
+ alias?: string | undefined;
187
+ configuration?: any;
188
+ ttl?: number | undefined;
189
+ retry?: number | undefined;
190
+ retryDelay?: number | undefined;
191
+ } | {
192
+ id: string;
193
+ type: "logic";
194
+ script: string;
195
+ concurrency: boolean;
196
+ language: "javascript" | "python" | "typescript";
197
+ maxExecutionTime: number;
198
+ outputs: {
199
+ name: string | typeof ERROR | null;
200
+ schema: import("json-schema").JSONSchema7 | null;
201
+ }[];
202
+ alias?: string | undefined;
203
+ } | {
204
+ id: string;
205
+ type: "or";
206
+ outputs: {
207
+ name: string | typeof ERROR | null;
208
+ schema: import("json-schema").JSONSchema7 | null;
209
+ }[];
210
+ alias?: string | undefined;
211
+ } | {
212
+ id: string;
213
+ type: "reference";
214
+ reference: string;
215
+ outputs: {
216
+ name: string | typeof ERROR | null;
217
+ schema: import("json-schema").JSONSchema7 | null;
218
+ }[];
219
+ alias?: string | undefined;
220
+ configuration?: any;
221
+ })[];
222
+ getParents(nodeId: string): ({
223
+ id: string;
224
+ type: "exit";
225
+ alias?: string | undefined;
226
+ } | {
227
+ id: string;
228
+ type: "entry";
229
+ inputSchema: import("json-schema").JSONSchema7;
230
+ outputs: {
231
+ name: string | typeof ERROR | null;
232
+ schema: import("json-schema").JSONSchema7 | null;
233
+ }[];
234
+ alias?: string | undefined;
235
+ } | {
236
+ id: string;
237
+ type: "service";
238
+ inputSchema: ({
239
+ type: "object";
240
+ } & import("json-schema").JSONSchema7) | {
241
+ type: "null";
242
+ };
243
+ name: string;
244
+ version: string;
245
+ configurationSchema: import("json-schema").JSONSchema7;
246
+ outputs: {
247
+ name: string | typeof ERROR | null;
248
+ schema: import("json-schema").JSONSchema7 | null;
249
+ }[];
250
+ alias?: string | undefined;
251
+ configuration?: any;
252
+ ttl?: number | undefined;
253
+ retry?: number | undefined;
254
+ retryDelay?: number | undefined;
255
+ } | {
256
+ id: string;
257
+ type: "logic";
258
+ script: string;
259
+ concurrency: boolean;
260
+ language: "javascript" | "python" | "typescript";
261
+ maxExecutionTime: number;
262
+ outputs: {
263
+ name: string | typeof ERROR | null;
264
+ schema: import("json-schema").JSONSchema7 | null;
265
+ }[];
266
+ alias?: string | undefined;
267
+ } | {
268
+ id: string;
269
+ type: "or";
270
+ outputs: {
271
+ name: string | typeof ERROR | null;
272
+ schema: import("json-schema").JSONSchema7 | null;
273
+ }[];
274
+ alias?: string | undefined;
275
+ } | {
276
+ id: string;
277
+ type: "reference";
278
+ reference: string;
279
+ outputs: {
280
+ name: string | typeof ERROR | null;
281
+ schema: import("json-schema").JSONSchema7 | null;
282
+ }[];
283
+ alias?: string | undefined;
284
+ configuration?: any;
285
+ })[];
286
+ getAllParents(nodeId: string): ({
287
+ id: string;
288
+ type: "exit";
289
+ alias?: string | undefined;
290
+ } | {
291
+ id: string;
292
+ type: "entry";
293
+ inputSchema: import("json-schema").JSONSchema7;
294
+ outputs: {
295
+ name: string | typeof ERROR | null;
296
+ schema: import("json-schema").JSONSchema7 | null;
297
+ }[];
298
+ alias?: string | undefined;
299
+ } | {
300
+ id: string;
301
+ type: "service";
302
+ inputSchema: ({
303
+ type: "object";
304
+ } & import("json-schema").JSONSchema7) | {
305
+ type: "null";
306
+ };
307
+ name: string;
308
+ version: string;
309
+ configurationSchema: import("json-schema").JSONSchema7;
310
+ outputs: {
311
+ name: string | typeof ERROR | null;
312
+ schema: import("json-schema").JSONSchema7 | null;
313
+ }[];
314
+ alias?: string | undefined;
315
+ configuration?: any;
316
+ ttl?: number | undefined;
317
+ retry?: number | undefined;
318
+ retryDelay?: number | undefined;
319
+ } | {
320
+ id: string;
321
+ type: "logic";
322
+ script: string;
323
+ concurrency: boolean;
324
+ language: "javascript" | "python" | "typescript";
325
+ maxExecutionTime: number;
326
+ outputs: {
327
+ name: string | typeof ERROR | null;
328
+ schema: import("json-schema").JSONSchema7 | null;
329
+ }[];
330
+ alias?: string | undefined;
331
+ } | {
332
+ id: string;
333
+ type: "or";
334
+ outputs: {
335
+ name: string | typeof ERROR | null;
336
+ schema: import("json-schema").JSONSchema7 | null;
337
+ }[];
338
+ alias?: string | undefined;
339
+ } | {
340
+ id: string;
341
+ type: "reference";
342
+ reference: string;
343
+ outputs: {
344
+ name: string | typeof ERROR | null;
345
+ schema: import("json-schema").JSONSchema7 | null;
346
+ }[];
347
+ alias?: string | undefined;
348
+ configuration?: any;
349
+ })[];
350
+ /**
351
+ * normally a node is "reached" when all incoming edges are traversed with the following exceptions:
352
+ *
353
+ * when the incoming edge belongs to a service that is part of a loop where the questioned node is also part of,
354
+ * this incoming edge is considered traversed
355
+ *
356
+ * or nodes are "reaced" when at least one incoming edge is traversed
357
+ *
358
+ * the entry node is "reached" by default
359
+ */
360
+ isReached(nodeId: string): boolean;
361
+ getParentsWithEdgeHandle(nodeId: string): {
362
+ node: {
363
+ id: string;
364
+ type: "exit";
365
+ alias?: string | undefined;
366
+ } | {
367
+ id: string;
368
+ type: "entry";
369
+ inputSchema: import("json-schema").JSONSchema7;
370
+ outputs: {
371
+ name: string | typeof ERROR | null;
372
+ schema: import("json-schema").JSONSchema7 | null;
373
+ }[];
374
+ alias?: string | undefined;
375
+ } | {
376
+ id: string;
377
+ type: "service";
378
+ inputSchema: ({
379
+ type: "object";
380
+ } & import("json-schema").JSONSchema7) | {
381
+ type: "null";
382
+ };
383
+ name: string;
384
+ version: string;
385
+ configurationSchema: import("json-schema").JSONSchema7;
386
+ outputs: {
387
+ name: string | typeof ERROR | null;
388
+ schema: import("json-schema").JSONSchema7 | null;
389
+ }[];
390
+ alias?: string | undefined;
391
+ configuration?: any;
392
+ ttl?: number | undefined;
393
+ retry?: number | undefined;
394
+ retryDelay?: number | undefined;
395
+ } | {
396
+ id: string;
397
+ type: "logic";
398
+ script: string;
399
+ concurrency: boolean;
400
+ language: "javascript" | "python" | "typescript";
401
+ maxExecutionTime: number;
402
+ outputs: {
403
+ name: string | typeof ERROR | null;
404
+ schema: import("json-schema").JSONSchema7 | null;
405
+ }[];
406
+ alias?: string | undefined;
407
+ } | {
408
+ id: string;
409
+ type: "or";
410
+ outputs: {
411
+ name: string | typeof ERROR | null;
412
+ schema: import("json-schema").JSONSchema7 | null;
413
+ }[];
414
+ alias?: string | undefined;
415
+ } | {
416
+ id: string;
417
+ type: "reference";
418
+ reference: string;
419
+ outputs: {
420
+ name: string | typeof ERROR | null;
421
+ schema: import("json-schema").JSONSchema7 | null;
422
+ }[];
423
+ alias?: string | undefined;
424
+ configuration?: any;
425
+ };
426
+ handle: OutputName;
427
+ }[];
428
+ getTriggers(nodeId: string): string[];
429
+ traverse(nodeId: string, outputName: OutputName): void;
430
+ traverseWithData(nodeId: string, outputName: OutputName, data: unknown): void;
431
+ disconnect(sourceNodeId: string, sourceNodeOutputName: OutputName, targetNodeId: string): void;
432
+ getData(nodeId: string, outputName: OutputName): unknown;
433
+ traversed(sourceNodeId: string, targetNodeId: string): boolean;
434
+ getAllData(): Map<string, Map<OutputName, unknown>>;
435
+ getAggregatedDataByNode(targetNodeId: string): Record<string, unknown>;
436
+ getAggregatedData(targetNodeId: string): Record<string, unknown>;
437
+ reset(): void;
438
+ gc(): void;
439
+ }
440
+ export {};
441
+ //# sourceMappingURL=NodeTree.d.ts.map
@@ -0,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