@atomoz/workflows-nodes 0.1.10 → 0.1.11

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.
package/dist/index.d.cts DELETED
@@ -1,429 +0,0 @@
1
- import * as zod from 'zod';
2
- import { z } from 'zod';
3
- import * as zod_v4_core from 'zod/v4/core';
4
-
5
- interface NodeHandle {
6
- type: 'input' | 'output';
7
- label: string;
8
- name: string;
9
- fieldType: string;
10
- required?: boolean;
11
- acceptTypes?: string[];
12
- rejectTypes?: string[];
13
- maxConnections?: number;
14
- }
15
- interface NodeField {
16
- id?: string;
17
- name?: string;
18
- label: string;
19
- toolField?: boolean;
20
- typeable?: boolean;
21
- type: 'text' | 'textarea' | 'number' | 'boolean' | 'select' | 'json' | 'string' | 'object' | 'HttpOutput' | 'route' | 'code' | 'keyValue' | 'any' | 'llm' | 'function' | 'agent' | 'tool' | 'model' | 'supervisor';
22
- required?: boolean;
23
- placeholder?: string;
24
- defaultValue?: any;
25
- value?: any;
26
- options?: Array<{
27
- label: string;
28
- value: any;
29
- }>;
30
- optionsSource?: {
31
- provider: string;
32
- params?: Record<string, any>;
33
- };
34
- min?: number;
35
- max?: number;
36
- handle?: NodeHandle;
37
- }
38
- interface NodeInput {
39
- id: string;
40
- label: string;
41
- type: 'text' | 'textarea' | 'number' | 'boolean' | 'select' | 'json' | 'keyValue';
42
- required?: boolean;
43
- placeholder?: string;
44
- defaultValue?: any;
45
- options?: Array<{
46
- label: string;
47
- value: any;
48
- }>;
49
- min?: number;
50
- max?: number;
51
- }
52
- interface NodeOutput {
53
- type: string;
54
- structure: Array<{
55
- label: string;
56
- name: string;
57
- type: string;
58
- required: boolean;
59
- }>;
60
- }
61
- interface HttpOutput {
62
- status: number;
63
- statusText: string;
64
- headers: Record<string, string>;
65
- data: any;
66
- url: string;
67
- method: string;
68
- responseTime?: number;
69
- }
70
- interface BaseNodeType {
71
- label: string;
72
- type: string;
73
- description: string;
74
- isInput?: boolean;
75
- isOutput?: boolean;
76
- category?: 'input' | 'transform' | 'output' | 'api' | 'custom';
77
- icon?: string;
78
- color?: string;
79
- handles?: NodeHandle[];
80
- fields?: NodeField[];
81
- inputs?: NodeInput[];
82
- output?: NodeOutput;
83
- config?: Record<string, any>;
84
- }
85
- interface NodeLogicFunction {
86
- (node: any, inputValue?: string | string[], context?: NodeExecutionContext): any;
87
- }
88
- interface NodeExecutionContext {
89
- outputs?: Record<string, any>;
90
- nodeId: string;
91
- workflowId?: string;
92
- timestamp: number;
93
- }
94
- interface NodeDefinition {
95
- type: string;
96
- name: string;
97
- description: string;
98
- logic: (node: any, inputValue?: string | string[]) => any;
99
- style: NodeStyle;
100
- fields: NodeField[];
101
- inputs: NodeInput[];
102
- validate?: (node: any) => string[];
103
- sanitize?: (node: any) => any;
104
- }
105
- type NodeInputValue = string | number | boolean | object | any[];
106
- type NodeOutputValue = string | number | boolean | object | any[];
107
- interface NodeValidation {
108
- required?: boolean;
109
- minLength?: number;
110
- maxLength?: number;
111
- pattern?: RegExp;
112
- custom?: (value: any) => boolean;
113
- message?: string;
114
- }
115
- interface NodeTransformation {
116
- input?: (value: any) => any;
117
- output?: (value: any) => any;
118
- }
119
- interface NodeExecutionConfig {
120
- async?: boolean;
121
- timeout?: number;
122
- retries?: number;
123
- fallback?: any;
124
- }
125
- interface NodeStyle {
126
- icon: string;
127
- color: string;
128
- bgColor: string;
129
- borderColor?: string;
130
- }
131
- interface ExecutionStep {
132
- nodeId: string;
133
- nodeData: NodeData;
134
- nextSteps: ExecutionStep[];
135
- fieldConnections?: {
136
- [sourceHandleId: string]: {
137
- targetNodeId: string;
138
- targetFieldId: string;
139
- }[];
140
- };
141
- }
142
- type NodeExecution = 'sync' | 'async';
143
- interface NodeTags {
144
- execution: NodeExecution[] | NodeExecution;
145
- group: 'IA' | 'HTTP' | 'Data Transformation' | 'Custom' | 'Social';
146
- }
147
-
148
- type NodeData = {
149
- nodeId?: string;
150
- label: string;
151
- type: string;
152
- icon?: string;
153
- category: string;
154
- description?: string;
155
- toolable?: boolean;
156
- tags?: NodeTags;
157
- fields?: NodeField[];
158
- value?: any;
159
- friendlyId?: string;
160
- data?: any;
161
- group?: string;
162
- };
163
-
164
- declare const nodes: NodeData[];
165
-
166
- declare const nodeFunctions: {
167
- ChatInput: (params: any) => any;
168
- ChatOutput: (params: any) => Promise<any>;
169
- HttpGetInput: (params: any) => Promise<any>;
170
- HttpPostInput: (params: any) => any;
171
- ManualTrigger: (params: any) => any;
172
- HttpOutput: (params: any) => any;
173
- ConcatNode: (inputs: any) => any;
174
- IaMessageNode: (inputs: any) => Promise<any>;
175
- IaAgentNode: (inputs: any) => Promise<any>;
176
- AiToolNode: (fieldValues: any) => Promise<{
177
- tool: any;
178
- }>;
179
- AiSupervisorNode: (fieldValues: any) => Promise<any>;
180
- WhatsappNode: (fieldValues: any) => Promise<any>;
181
- WhatsappSendMessageNode: (fieldValues: any) => Promise<any>;
182
- };
183
-
184
- declare const IaAgentNodeSchema: z.ZodObject<{
185
- name: z.ZodString;
186
- systemMessage: z.ZodOptional<z.ZodString>;
187
- message: z.ZodOptional<z.ZodString>;
188
- model: z.ZodAny;
189
- tools: z.ZodOptional<z.ZodAny>;
190
- }, z.core.$strip>;
191
- declare const IaAgentNode: NodeData;
192
-
193
- declare const IaAgentNodeFunction: (inputs: any) => Promise<any>;
194
-
195
- declare const AiSupervisorNodeSchema: z.ZodObject<{
196
- model: z.ZodAny;
197
- agents: z.ZodOptional<z.ZodAny>;
198
- message: z.ZodString;
199
- systemMessage: z.ZodOptional<z.ZodString>;
200
- }, z.core.$strip>;
201
- declare const AiSupervisorNode: NodeData;
202
-
203
- declare const AiSupervisorNodeFunction: (fieldValues: any) => Promise<any>;
204
-
205
- declare const CustomToolSchema: z.ZodObject<{
206
- input: z.ZodOptional<z.ZodString>;
207
- }, z.core.$strip>;
208
- declare const AiToolNodeSchema: z.ZodObject<{
209
- name: z.ZodString;
210
- description: z.ZodString;
211
- nodeFunction: z.ZodAny;
212
- nodeType: z.ZodString;
213
- originalNodeData: z.ZodOptional<z.ZodAny>;
214
- workflowService: z.ZodOptional<z.ZodAny>;
215
- currentResults: z.ZodOptional<z.ZodAny>;
216
- }, z.core.$strip>;
217
- declare const AiToolNode: NodeData;
218
-
219
- declare const AiToolNodeFunction: (fieldValues: any) => Promise<{
220
- tool: any;
221
- }>;
222
-
223
- declare const IaMessageNodeSchema: z.ZodObject<{
224
- model: z.ZodAny;
225
- systemMessage: z.ZodOptional<z.ZodString>;
226
- message: z.ZodString;
227
- }, z.core.$strip>;
228
- declare const IaMessageNodeFunction: (inputs: any) => Promise<any>;
229
- declare const IaMessageNode: NodeData;
230
-
231
- declare const HttpGetInputNode: NodeData;
232
-
233
- declare const HttpGetInputNodeFunction: (params: any) => Promise<any>;
234
-
235
- declare const HttpGetInputNodeSchema: z.ZodObject<{
236
- route: z.ZodString;
237
- queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
238
- key: z.ZodString;
239
- value: z.ZodOptional<z.ZodString>;
240
- required: z.ZodOptional<z.ZodBoolean>;
241
- }, z.core.$strip>>>;
242
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
243
- key: z.ZodString;
244
- value: z.ZodOptional<z.ZodString>;
245
- required: z.ZodOptional<z.ZodBoolean>;
246
- }, z.core.$strip>>>;
247
- }, z.core.$strip>;
248
- type HttpGetInputNodeType = z.infer<typeof HttpGetInputNodeSchema>;
249
-
250
- declare const HttpPostInputNode: NodeData;
251
-
252
- declare const HttpPostInputNodeFunction: (params: any) => any;
253
-
254
- declare const HttpPostInputNodeSchema: z.ZodObject<{
255
- route: z.ZodString;
256
- queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
257
- key: z.ZodString;
258
- value: z.ZodOptional<z.ZodString>;
259
- required: z.ZodOptional<z.ZodBoolean>;
260
- }, z.core.$strip>>>;
261
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
262
- key: z.ZodString;
263
- value: z.ZodOptional<z.ZodString>;
264
- required: z.ZodOptional<z.ZodBoolean>;
265
- }, z.core.$strip>>>;
266
- body: z.ZodOptional<z.ZodArray<z.ZodObject<{
267
- key: z.ZodString;
268
- value: z.ZodOptional<z.ZodAny>;
269
- required: z.ZodOptional<z.ZodBoolean>;
270
- }, z.core.$strip>>>;
271
- }, z.core.$strip>;
272
- type HttpPostInputNodeType = z.infer<typeof HttpPostInputNodeSchema>;
273
-
274
- declare const HttpPutInputNode: NodeData;
275
-
276
- declare const HttpPutInputNodeFunction: (params: any) => any;
277
-
278
- declare const HttpPutInputNodeSchema: z.ZodObject<{
279
- route: z.ZodString;
280
- queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
281
- key: z.ZodString;
282
- value: z.ZodOptional<z.ZodString>;
283
- required: z.ZodOptional<z.ZodBoolean>;
284
- }, z.core.$strip>>>;
285
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
286
- key: z.ZodString;
287
- value: z.ZodOptional<z.ZodString>;
288
- required: z.ZodOptional<z.ZodBoolean>;
289
- }, z.core.$strip>>>;
290
- body: z.ZodOptional<z.ZodArray<z.ZodObject<{
291
- key: z.ZodString;
292
- value: z.ZodOptional<z.ZodAny>;
293
- required: z.ZodOptional<z.ZodBoolean>;
294
- }, z.core.$strip>>>;
295
- }, z.core.$strip>;
296
- type HttpPutInputNodeType = z.infer<typeof HttpPutInputNodeSchema>;
297
-
298
- declare const HttpDeleteInputNode: NodeData;
299
-
300
- declare const HttpDeleteInputNodeFunction: (params: any) => Promise<any>;
301
-
302
- declare const HttpDeleteInputNodeSchema: z.ZodObject<{
303
- route: z.ZodString;
304
- queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
305
- key: z.ZodString;
306
- value: z.ZodOptional<z.ZodString>;
307
- required: z.ZodOptional<z.ZodBoolean>;
308
- }, z.core.$strip>>>;
309
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
310
- key: z.ZodString;
311
- value: z.ZodOptional<z.ZodString>;
312
- required: z.ZodOptional<z.ZodBoolean>;
313
- }, z.core.$strip>>>;
314
- }, z.core.$strip>;
315
- type HttpDeleteInputNodeType = z.infer<typeof HttpDeleteInputNodeSchema>;
316
-
317
- declare const HttpPatchInputNode: NodeData;
318
-
319
- declare const HttpPatchInputNodeFunction: (params: any) => any;
320
-
321
- declare const HttpPatchInputNodeSchema: z.ZodObject<{
322
- route: z.ZodString;
323
- queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
324
- key: z.ZodString;
325
- value: z.ZodOptional<z.ZodString>;
326
- required: z.ZodOptional<z.ZodBoolean>;
327
- }, z.core.$strip>>>;
328
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
- key: z.ZodString;
330
- value: z.ZodOptional<z.ZodString>;
331
- required: z.ZodOptional<z.ZodBoolean>;
332
- }, z.core.$strip>>>;
333
- body: z.ZodOptional<z.ZodArray<z.ZodObject<{
334
- key: z.ZodString;
335
- value: z.ZodOptional<z.ZodAny>;
336
- required: z.ZodOptional<z.ZodBoolean>;
337
- }, z.core.$strip>>>;
338
- }, z.core.$strip>;
339
- type HttpPatchInputNodeType = z.infer<typeof HttpPatchInputNodeSchema>;
340
-
341
- declare const QueryParamSchema: z.ZodObject<{
342
- key: z.ZodString;
343
- value: z.ZodOptional<z.ZodString>;
344
- required: z.ZodOptional<z.ZodBoolean>;
345
- }, z.core.$strip>;
346
- declare const HeaderSchema: z.ZodObject<{
347
- key: z.ZodString;
348
- value: z.ZodOptional<z.ZodString>;
349
- required: z.ZodOptional<z.ZodBoolean>;
350
- }, z.core.$strip>;
351
- declare const BodyFieldSchema: z.ZodObject<{
352
- key: z.ZodString;
353
- value: z.ZodOptional<z.ZodAny>;
354
- required: z.ZodOptional<z.ZodBoolean>;
355
- }, z.core.$strip>;
356
- declare const RouteSchema: z.ZodString;
357
-
358
- declare const HTTP_NODE_TYPES: {
359
- readonly GET: "HttpGetInput";
360
- readonly POST: "HttpPostInput";
361
- readonly PUT: "HttpPutInput";
362
- readonly DELETE: "HttpDeleteInput";
363
- readonly PATCH: "HttpPatchInput";
364
- };
365
- declare const HTTP_METHODS: readonly ["GET", "POST", "PUT", "DELETE", "PATCH"];
366
- type HttpMethod = typeof HTTP_METHODS[number];
367
- type HttpNodeType = typeof HTTP_NODE_TYPES[keyof typeof HTTP_NODE_TYPES];
368
- declare const getHttpNodesTypes: () => string[];
369
- declare const getHttpNodeTypesArray: () => HttpNodeType[];
370
- declare const isHttpInputNode: (nodeType: string) => boolean;
371
- declare const isHttpMethodNode: (nodeType: string, method: HttpMethod) => boolean;
372
- declare const extractHttpMethodFromNodeType: (nodeType: string) => HttpMethod;
373
- declare const getHttpMethodFromNodeType: (nodeType: string) => HttpMethod;
374
- declare const isAnyHttpInputNode: (nodeType: string) => boolean;
375
- declare const getHttpNodeTypeStrings: () => string[];
376
- declare const isHttpInputFriendlyId: (friendlyId: string) => boolean;
377
- declare const getHttpMethodFromFriendlyId: (friendlyId: string) => HttpMethod;
378
-
379
- declare const schemas: {
380
- IaAgentNode: zod.ZodObject<{
381
- name: zod.ZodString;
382
- systemMessage: zod.ZodOptional<zod.ZodString>;
383
- message: zod.ZodOptional<zod.ZodString>;
384
- model: zod.ZodAny;
385
- tools: zod.ZodOptional<zod.ZodAny>;
386
- }, zod_v4_core.$strip>;
387
- AiSupervisorNode: zod.ZodObject<{
388
- model: zod.ZodAny;
389
- agents: zod.ZodOptional<zod.ZodAny>;
390
- message: zod.ZodString;
391
- systemMessage: zod.ZodOptional<zod.ZodString>;
392
- }, zod_v4_core.$strip>;
393
- AiToolNode: zod.ZodObject<{
394
- name: zod.ZodString;
395
- description: zod.ZodString;
396
- nodeFunction: zod.ZodAny;
397
- nodeType: zod.ZodString;
398
- originalNodeData: zod.ZodOptional<zod.ZodAny>;
399
- workflowService: zod.ZodOptional<zod.ZodAny>;
400
- currentResults: zod.ZodOptional<zod.ZodAny>;
401
- }, zod_v4_core.$strip>;
402
- IaMessageNode: zod.ZodObject<{
403
- model: zod.ZodAny;
404
- systemMessage: zod.ZodOptional<zod.ZodString>;
405
- message: zod.ZodString;
406
- }, zod_v4_core.$strip>;
407
- };
408
-
409
- declare const WhatsappSendTemplateNodeSchema: z.ZodObject<{
410
- phoneNumber: z.ZodString;
411
- message: z.ZodString;
412
- }, z.core.$strip>;
413
- declare const WhatsappSendTemplateNode: NodeData;
414
-
415
- declare const WhatsappStartChatFunction: (fieldValues: any) => Promise<any>;
416
- declare const getMessageTemplates: () => Promise<unknown>;
417
- declare const createMessageTemplate: (payload: Record<string, unknown>) => Promise<Record<string, unknown>>;
418
-
419
- declare const WhatsappSendMessageNodeSchema: z.ZodObject<{
420
- phoneNumber: z.ZodString;
421
- message: z.ZodString;
422
- }, z.core.$strip>;
423
- declare const WhatsappSendMessageNode: NodeData;
424
-
425
- declare const WhatsappSendMessageFunction: (fieldValues: any) => Promise<any>;
426
-
427
- declare const WhatsappMessageTriggerNode: NodeData;
428
-
429
- export { AiSupervisorNode, AiSupervisorNodeFunction, AiSupervisorNodeSchema, AiToolNode, AiToolNodeFunction, AiToolNodeSchema, type BaseNodeType, BodyFieldSchema, CustomToolSchema, type ExecutionStep, HTTP_METHODS, HTTP_NODE_TYPES, HeaderSchema, HttpDeleteInputNode, HttpDeleteInputNodeFunction, HttpDeleteInputNodeSchema, type HttpDeleteInputNodeType, HttpGetInputNode, HttpGetInputNodeFunction, HttpGetInputNodeSchema, type HttpGetInputNodeType, type HttpMethod, type HttpNodeType, type HttpOutput, HttpPatchInputNode, HttpPatchInputNodeFunction, HttpPatchInputNodeSchema, type HttpPatchInputNodeType, HttpPostInputNode, HttpPostInputNodeFunction, HttpPostInputNodeSchema, type HttpPostInputNodeType, HttpPutInputNode, HttpPutInputNodeFunction, HttpPutInputNodeSchema, type HttpPutInputNodeType, IaAgentNode, IaAgentNodeFunction, IaAgentNodeSchema, IaMessageNode, IaMessageNodeFunction, IaMessageNodeSchema, type NodeData, type NodeDefinition, type NodeExecution, type NodeExecutionConfig, type NodeExecutionContext, type NodeField, type NodeHandle, type NodeInput, type NodeInputValue, type NodeLogicFunction, type NodeOutput, type NodeOutputValue, type NodeStyle, type NodeTags, type NodeTransformation, type NodeValidation, QueryParamSchema, RouteSchema, WhatsappMessageTriggerNode, WhatsappSendMessageFunction, WhatsappSendMessageNode, WhatsappSendMessageNodeSchema, WhatsappSendTemplateNode, WhatsappSendTemplateNodeSchema, WhatsappStartChatFunction, createMessageTemplate, extractHttpMethodFromNodeType, getHttpMethodFromFriendlyId, getHttpMethodFromNodeType, getHttpNodeTypeStrings, getHttpNodeTypesArray, getHttpNodesTypes, getMessageTemplates, isAnyHttpInputNode, isHttpInputFriendlyId, isHttpInputNode, isHttpMethodNode, nodeFunctions, nodes, schemas };