@atomoz/workflows-nodes 0.1.26 → 0.1.28

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 CHANGED
@@ -144,7 +144,7 @@ interface ExecutionStep {
144
144
  type NodeExecution = 'sync' | 'async';
145
145
  interface NodeTags {
146
146
  execution: NodeExecution[] | NodeExecution;
147
- group: 'IA' | 'HTTP' | 'Data Transformation' | 'Custom' | 'Social' | 'Control' | 'Memory' | 'Guardrails';
147
+ group: 'IA' | 'HTTP' | 'Data Transformation' | 'Custom' | 'Social' | 'Control' | 'Memory' | 'Guardrails' | 'Chat';
148
148
  }
149
149
 
150
150
  type NodeData = {
@@ -183,14 +183,16 @@ declare const nodeFunctions: {
183
183
  AiSupervisorNode: (params: any) => Promise<any>;
184
184
  WhatsappNode: (fieldValues: any) => Promise<any>;
185
185
  WhatsappSendMessageNode: (fieldValues: any) => Promise<any>;
186
- CustomCodeNode: (params: any) => any;
187
- CustomNode: (params: any) => any;
186
+ CustomCodeNode: (params: any) => Promise<any>;
187
+ CustomNode: (params: any) => Promise<any>;
188
188
  PostgresMemoryNode: (inputs: any) => Promise<any>;
189
189
  RedisMemoryNode: (inputs: any) => Promise<any>;
190
190
  PromptGuardrailNode: (inputs: any) => Promise<any>;
191
191
  RuleGuardrailNode: (inputs: any) => Promise<any>;
192
192
  FunctionGuardrailNode: (inputs: any) => Promise<any>;
193
193
  ModelGuardrailNode: (inputs: any) => Promise<any>;
194
+ GetOrCreateThreadNode: (inputs: any) => Promise<any>;
195
+ ChatLogNode: (inputs: any) => Promise<any>;
194
196
  };
195
197
 
196
198
  declare const IaAgentNodeSchema: z.ZodObject<{
@@ -444,4 +446,40 @@ declare const WhatsappSendMessageFunction: (fieldValues: any) => Promise<any>;
444
446
 
445
447
  declare const WhatsappMessageTriggerNode: NodeData;
446
448
 
447
- 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 };
449
+ declare const GetOrCreateThreadSchema: z.ZodObject<{
450
+ source: z.ZodString;
451
+ identifier: z.ZodString;
452
+ timeoutMinutes: z.ZodOptional<z.ZodNumber>;
453
+ }, z.core.$strip>;
454
+ declare const GetOrCreateThreadNode: NodeData;
455
+
456
+ /**
457
+ * GetOrCreateThread Node Function
458
+ *
459
+ * Generates or retrieves a threadId based on source + identifier + timeout.
460
+ * ALWAYS filters by companyId for tenant isolation.
461
+ */
462
+ declare const GetOrCreateThreadNodeFunction: (inputs: any) => Promise<any>;
463
+
464
+ declare const ChatLogSchema: z.ZodObject<{
465
+ threadId: z.ZodString;
466
+ direction: z.ZodEnum<{
467
+ inbound: "inbound";
468
+ outbound: "outbound";
469
+ }>;
470
+ content: z.ZodString;
471
+ source: z.ZodOptional<z.ZodString>;
472
+ identifier: z.ZodOptional<z.ZodString>;
473
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
474
+ }, z.core.$strip>;
475
+ declare const ChatLogNode: NodeData;
476
+
477
+ /**
478
+ * ChatLog Node Function
479
+ *
480
+ * Saves a message to chat_messages table.
481
+ * ALWAYS filters by companyId for tenant isolation.
482
+ */
483
+ declare const ChatLogNodeFunction: (inputs: any) => Promise<any>;
484
+
485
+ export { AiSupervisorNode, AiSupervisorNodeFunction, AiSupervisorNodeSchema, AiToolNode, AiToolNodeFunction, AiToolNodeSchema, type BaseNodeType, BodyFieldSchema, ChatLogNode, ChatLogNodeFunction, ChatLogSchema, CustomToolSchema, type ExecutionStep, GetOrCreateThreadNode, GetOrCreateThreadNodeFunction, GetOrCreateThreadSchema, 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 };
package/dist/index.d.ts CHANGED
@@ -144,7 +144,7 @@ interface ExecutionStep {
144
144
  type NodeExecution = 'sync' | 'async';
145
145
  interface NodeTags {
146
146
  execution: NodeExecution[] | NodeExecution;
147
- group: 'IA' | 'HTTP' | 'Data Transformation' | 'Custom' | 'Social' | 'Control' | 'Memory' | 'Guardrails';
147
+ group: 'IA' | 'HTTP' | 'Data Transformation' | 'Custom' | 'Social' | 'Control' | 'Memory' | 'Guardrails' | 'Chat';
148
148
  }
149
149
 
150
150
  type NodeData = {
@@ -183,14 +183,16 @@ declare const nodeFunctions: {
183
183
  AiSupervisorNode: (params: any) => Promise<any>;
184
184
  WhatsappNode: (fieldValues: any) => Promise<any>;
185
185
  WhatsappSendMessageNode: (fieldValues: any) => Promise<any>;
186
- CustomCodeNode: (params: any) => any;
187
- CustomNode: (params: any) => any;
186
+ CustomCodeNode: (params: any) => Promise<any>;
187
+ CustomNode: (params: any) => Promise<any>;
188
188
  PostgresMemoryNode: (inputs: any) => Promise<any>;
189
189
  RedisMemoryNode: (inputs: any) => Promise<any>;
190
190
  PromptGuardrailNode: (inputs: any) => Promise<any>;
191
191
  RuleGuardrailNode: (inputs: any) => Promise<any>;
192
192
  FunctionGuardrailNode: (inputs: any) => Promise<any>;
193
193
  ModelGuardrailNode: (inputs: any) => Promise<any>;
194
+ GetOrCreateThreadNode: (inputs: any) => Promise<any>;
195
+ ChatLogNode: (inputs: any) => Promise<any>;
194
196
  };
195
197
 
196
198
  declare const IaAgentNodeSchema: z.ZodObject<{
@@ -444,4 +446,40 @@ declare const WhatsappSendMessageFunction: (fieldValues: any) => Promise<any>;
444
446
 
445
447
  declare const WhatsappMessageTriggerNode: NodeData;
446
448
 
447
- 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 };
449
+ declare const GetOrCreateThreadSchema: z.ZodObject<{
450
+ source: z.ZodString;
451
+ identifier: z.ZodString;
452
+ timeoutMinutes: z.ZodOptional<z.ZodNumber>;
453
+ }, z.core.$strip>;
454
+ declare const GetOrCreateThreadNode: NodeData;
455
+
456
+ /**
457
+ * GetOrCreateThread Node Function
458
+ *
459
+ * Generates or retrieves a threadId based on source + identifier + timeout.
460
+ * ALWAYS filters by companyId for tenant isolation.
461
+ */
462
+ declare const GetOrCreateThreadNodeFunction: (inputs: any) => Promise<any>;
463
+
464
+ declare const ChatLogSchema: z.ZodObject<{
465
+ threadId: z.ZodString;
466
+ direction: z.ZodEnum<{
467
+ inbound: "inbound";
468
+ outbound: "outbound";
469
+ }>;
470
+ content: z.ZodString;
471
+ source: z.ZodOptional<z.ZodString>;
472
+ identifier: z.ZodOptional<z.ZodString>;
473
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
474
+ }, z.core.$strip>;
475
+ declare const ChatLogNode: NodeData;
476
+
477
+ /**
478
+ * ChatLog Node Function
479
+ *
480
+ * Saves a message to chat_messages table.
481
+ * ALWAYS filters by companyId for tenant isolation.
482
+ */
483
+ declare const ChatLogNodeFunction: (inputs: any) => Promise<any>;
484
+
485
+ export { AiSupervisorNode, AiSupervisorNodeFunction, AiSupervisorNodeSchema, AiToolNode, AiToolNodeFunction, AiToolNodeSchema, type BaseNodeType, BodyFieldSchema, ChatLogNode, ChatLogNodeFunction, ChatLogSchema, CustomToolSchema, type ExecutionStep, GetOrCreateThreadNode, GetOrCreateThreadNodeFunction, GetOrCreateThreadSchema, 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 };