@atomoz/workflows-nodes 0.1.13 → 0.1.15
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/package.json +49 -51
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -1
- package/src/nodes/consts/index.d.ts +0 -3
- package/src/nodes/consts/index.d.ts.map +0 -1
- package/src/nodes/consts/index.js +0 -2
- package/src/nodes/consts/node-colors.d.ts +0 -7
- package/src/nodes/consts/node-colors.d.ts.map +0 -1
- package/src/nodes/consts/node-colors.js +0 -6
- package/src/nodes/consts/node-functions.d.ts +0 -20
- package/src/nodes/consts/node-functions.d.ts.map +0 -1
- package/src/nodes/consts/node-functions.js +0 -29
- package/src/nodes/consts/nodes.d.ts +0 -3
- package/src/nodes/consts/nodes.d.ts.map +0 -1
- package/src/nodes/consts/nodes.js +0 -30
- package/src/nodes/consts/schemas.d.ts +0 -30
- package/src/nodes/consts/schemas.d.ts.map +0 -1
- package/src/nodes/consts/schemas.js +0 -7
- package/src/nodes/ia/agent/data.d.ts +0 -11
- package/src/nodes/ia/agent/data.d.ts.map +0 -1
- package/src/nodes/ia/agent/data.js +0 -111
- package/src/nodes/ia/agent/function.d.ts +0 -2
- package/src/nodes/ia/agent/function.d.ts.map +0 -1
- package/src/nodes/ia/agent/function.js +0 -90
- package/src/nodes/ia/agent/index.d.ts +0 -3
- package/src/nodes/ia/agent/index.d.ts.map +0 -1
- package/src/nodes/ia/agent/index.js +0 -2
- package/src/nodes/ia/index.d.ts +0 -5
- package/src/nodes/ia/index.d.ts.map +0 -1
- package/src/nodes/ia/index.js +0 -4
- package/src/nodes/ia/message/index.d.ts +0 -2
- package/src/nodes/ia/message/index.d.ts.map +0 -1
- package/src/nodes/ia/message/index.js +0 -1
- package/src/nodes/ia/message/message.d.ts +0 -10
- package/src/nodes/ia/message/message.d.ts.map +0 -1
- package/src/nodes/ia/message/message.js +0 -118
- package/src/nodes/ia/supervisor/data.d.ts +0 -10
- package/src/nodes/ia/supervisor/data.d.ts.map +0 -1
- package/src/nodes/ia/supervisor/data.js +0 -84
- package/src/nodes/ia/supervisor/function.d.ts +0 -2
- package/src/nodes/ia/supervisor/function.d.ts.map +0 -1
- package/src/nodes/ia/supervisor/function.js +0 -227
- package/src/nodes/ia/supervisor/index.d.ts +0 -3
- package/src/nodes/ia/supervisor/index.d.ts.map +0 -1
- package/src/nodes/ia/supervisor/index.js +0 -2
- package/src/nodes/ia/tool/data.d.ts +0 -16
- package/src/nodes/ia/tool/data.d.ts.map +0 -1
- package/src/nodes/ia/tool/data.js +0 -70
- package/src/nodes/ia/tool/function.d.ts +0 -4
- package/src/nodes/ia/tool/function.d.ts.map +0 -1
- package/src/nodes/ia/tool/function.js +0 -36
- package/src/nodes/ia/tool/index.d.ts +0 -3
- package/src/nodes/ia/tool/index.d.ts.map +0 -1
- package/src/nodes/ia/tool/index.js +0 -2
- package/src/nodes/index.d.ts +0 -9
- package/src/nodes/index.d.ts.map +0 -1
- package/src/nodes/index.js +0 -8
- package/src/nodes/inputs/chat/chat.d.ts +0 -4
- package/src/nodes/inputs/chat/chat.d.ts.map +0 -1
- package/src/nodes/inputs/chat/chat.js +0 -51
- package/src/nodes/inputs/http/delete/data.d.ts +0 -3
- package/src/nodes/inputs/http/delete/data.d.ts.map +0 -1
- package/src/nodes/inputs/http/delete/data.js +0 -57
- package/src/nodes/inputs/http/delete/function.d.ts +0 -2
- package/src/nodes/inputs/http/delete/function.d.ts.map +0 -1
- package/src/nodes/inputs/http/delete/function.js +0 -28
- package/src/nodes/inputs/http/delete/index.d.ts +0 -4
- package/src/nodes/inputs/http/delete/index.d.ts.map +0 -1
- package/src/nodes/inputs/http/delete/index.js +0 -3
- package/src/nodes/inputs/http/delete/schema.d.ts +0 -16
- package/src/nodes/inputs/http/delete/schema.d.ts.map +0 -1
- package/src/nodes/inputs/http/delete/schema.js +0 -7
- package/src/nodes/inputs/http/get/data.d.ts +0 -3
- package/src/nodes/inputs/http/get/data.d.ts.map +0 -1
- package/src/nodes/inputs/http/get/data.js +0 -58
- package/src/nodes/inputs/http/get/function.d.ts +0 -2
- package/src/nodes/inputs/http/get/function.d.ts.map +0 -1
- package/src/nodes/inputs/http/get/function.js +0 -25
- package/src/nodes/inputs/http/get/index.d.ts +0 -4
- package/src/nodes/inputs/http/get/index.d.ts.map +0 -1
- package/src/nodes/inputs/http/get/index.js +0 -3
- package/src/nodes/inputs/http/get/schema.d.ts +0 -16
- package/src/nodes/inputs/http/get/schema.d.ts.map +0 -1
- package/src/nodes/inputs/http/get/schema.js +0 -7
- package/src/nodes/inputs/http/index.d.ts +0 -8
- package/src/nodes/inputs/http/index.d.ts.map +0 -1
- package/src/nodes/inputs/http/index.js +0 -10
- package/src/nodes/inputs/http/patch/data.d.ts +0 -3
- package/src/nodes/inputs/http/patch/data.d.ts.map +0 -1
- package/src/nodes/inputs/http/patch/data.js +0 -70
- package/src/nodes/inputs/http/patch/function.d.ts +0 -2
- package/src/nodes/inputs/http/patch/function.d.ts.map +0 -1
- package/src/nodes/inputs/http/patch/function.js +0 -36
- package/src/nodes/inputs/http/patch/index.d.ts +0 -4
- package/src/nodes/inputs/http/patch/index.d.ts.map +0 -1
- package/src/nodes/inputs/http/patch/index.js +0 -3
- package/src/nodes/inputs/http/patch/schema.d.ts +0 -21
- package/src/nodes/inputs/http/patch/schema.d.ts.map +0 -1
- package/src/nodes/inputs/http/patch/schema.js +0 -8
- package/src/nodes/inputs/http/post/data.d.ts +0 -3
- package/src/nodes/inputs/http/post/data.d.ts.map +0 -1
- package/src/nodes/inputs/http/post/data.js +0 -70
- package/src/nodes/inputs/http/post/function.d.ts +0 -2
- package/src/nodes/inputs/http/post/function.d.ts.map +0 -1
- package/src/nodes/inputs/http/post/function.js +0 -36
- package/src/nodes/inputs/http/post/index.d.ts +0 -4
- package/src/nodes/inputs/http/post/index.d.ts.map +0 -1
- package/src/nodes/inputs/http/post/index.js +0 -3
- package/src/nodes/inputs/http/post/schema.d.ts +0 -21
- package/src/nodes/inputs/http/post/schema.d.ts.map +0 -1
- package/src/nodes/inputs/http/post/schema.js +0 -8
- package/src/nodes/inputs/http/put/data.d.ts +0 -3
- package/src/nodes/inputs/http/put/data.d.ts.map +0 -1
- package/src/nodes/inputs/http/put/data.js +0 -70
- package/src/nodes/inputs/http/put/function.d.ts +0 -2
- package/src/nodes/inputs/http/put/function.d.ts.map +0 -1
- package/src/nodes/inputs/http/put/function.js +0 -36
- package/src/nodes/inputs/http/put/index.d.ts +0 -4
- package/src/nodes/inputs/http/put/index.d.ts.map +0 -1
- package/src/nodes/inputs/http/put/index.js +0 -3
- package/src/nodes/inputs/http/put/schema.d.ts +0 -21
- package/src/nodes/inputs/http/put/schema.d.ts.map +0 -1
- package/src/nodes/inputs/http/put/schema.js +0 -8
- package/src/nodes/inputs/http/schemas.d.ts +0 -18
- package/src/nodes/inputs/http/schemas.d.ts.map +0 -1
- package/src/nodes/inputs/http/schemas.js +0 -17
- package/src/nodes/inputs/http/utils.d.ts +0 -21
- package/src/nodes/inputs/http/utils.d.ts.map +0 -1
- package/src/nodes/inputs/http/utils.js +0 -63
- package/src/nodes/inputs/index.d.ts +0 -5
- package/src/nodes/inputs/index.d.ts.map +0 -1
- package/src/nodes/inputs/index.js +0 -4
- package/src/nodes/inputs/manual/trigger.d.ts +0 -4
- package/src/nodes/inputs/manual/trigger.d.ts.map +0 -1
- package/src/nodes/inputs/manual/trigger.js +0 -39
- package/src/nodes/output-node/index.d.ts +0 -4
- package/src/nodes/output-node/index.d.ts.map +0 -1
- package/src/nodes/output-node/index.js +0 -123
- package/src/nodes/outputs/chat/output.d.ts +0 -4
- package/src/nodes/outputs/chat/output.d.ts.map +0 -1
- package/src/nodes/outputs/chat/output.js +0 -48
- package/src/nodes/outputs/http-output.d.ts +0 -4
- package/src/nodes/outputs/http-output.d.ts.map +0 -1
- package/src/nodes/outputs/http-output.js +0 -76
- package/src/nodes/processors/concat.d.ts +0 -9
- package/src/nodes/processors/concat.d.ts.map +0 -1
- package/src/nodes/processors/concat.js +0 -68
- package/src/nodes/processors/custom-code.d.ts +0 -4
- package/src/nodes/processors/custom-code.d.ts.map +0 -1
- package/src/nodes/processors/custom-code.js +0 -54
- package/src/nodes/processors/index.d.ts +0 -2
- package/src/nodes/processors/index.d.ts.map +0 -1
- package/src/nodes/processors/index.js +0 -1
- package/src/nodes/processors/transform.d.ts +0 -3
- package/src/nodes/processors/transform.d.ts.map +0 -1
- package/src/nodes/processors/transform.js +0 -48
- package/src/nodes/social/index.d.ts +0 -2
- package/src/nodes/social/index.d.ts.map +0 -1
- package/src/nodes/social/index.js +0 -1
- package/src/nodes/social/whatsapp/index.d.ts +0 -4
- package/src/nodes/social/whatsapp/index.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/index.js +0 -3
- package/src/nodes/social/whatsapp/message-trigger/data.d.ts +0 -3
- package/src/nodes/social/whatsapp/message-trigger/data.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/message-trigger/data.js +0 -55
- package/src/nodes/social/whatsapp/message-trigger/index.d.ts +0 -2
- package/src/nodes/social/whatsapp/message-trigger/index.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/message-trigger/index.js +0 -1
- package/src/nodes/social/whatsapp/send-message/data.d.ts +0 -8
- package/src/nodes/social/whatsapp/send-message/data.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/send-message/data.js +0 -46
- package/src/nodes/social/whatsapp/send-message/functions.d.ts +0 -3
- package/src/nodes/social/whatsapp/send-message/functions.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/send-message/functions.js +0 -32
- package/src/nodes/social/whatsapp/send-message/index.d.ts +0 -3
- package/src/nodes/social/whatsapp/send-message/index.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/send-message/index.js +0 -2
- package/src/nodes/social/whatsapp/send-template/data.d.ts +0 -8
- package/src/nodes/social/whatsapp/send-template/data.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/send-template/data.js +0 -42
- package/src/nodes/social/whatsapp/send-template/functions.d.ts +0 -5
- package/src/nodes/social/whatsapp/send-template/functions.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/send-template/functions.js +0 -60
- package/src/nodes/social/whatsapp/send-template/index.d.ts +0 -3
- package/src/nodes/social/whatsapp/send-template/index.d.ts.map +0 -1
- package/src/nodes/social/whatsapp/send-template/index.js +0 -2
- package/src/nodes/types/base-node.d.ts +0 -17
- package/src/nodes/types/base-node.d.ts.map +0 -1
- package/src/nodes/types/base-node.js +0 -1
- package/src/nodes/types/base-node.types.d.ts +0 -144
- package/src/nodes/types/base-node.types.d.ts.map +0 -1
- package/src/nodes/types/base-node.types.js +0 -1
- package/src/utils/llm-factory.d.ts +0 -16
- package/src/utils/llm-factory.d.ts.map +0 -1
- package/src/utils/llm-factory.js +0 -110
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export const ChatInputNodeFunction = (params) => {
|
|
2
|
-
const { request, fieldValues } = params;
|
|
3
|
-
const { message: configMessage, chatId: configChatId } = fieldValues || {};
|
|
4
|
-
const actualData = {
|
|
5
|
-
message: request?.message ?? configMessage ?? "",
|
|
6
|
-
chatId: request?.chatId ?? configChatId ?? null,
|
|
7
|
-
};
|
|
8
|
-
if (!actualData.message || typeof actualData.message !== "string") {
|
|
9
|
-
throw new Error("Message is required for ChatInputNode");
|
|
10
|
-
}
|
|
11
|
-
return actualData;
|
|
12
|
-
};
|
|
13
|
-
export const ChatInputNode = {
|
|
14
|
-
label: "Chat Input",
|
|
15
|
-
type: "ChatInput",
|
|
16
|
-
category: "input",
|
|
17
|
-
icon: "💬",
|
|
18
|
-
description: "Entrada de mensagem de chat para iniciar conversas com IA",
|
|
19
|
-
tags: {
|
|
20
|
-
execution: "sync",
|
|
21
|
-
group: "IA",
|
|
22
|
-
},
|
|
23
|
-
fields: [
|
|
24
|
-
{
|
|
25
|
-
id: "message",
|
|
26
|
-
label: "Message",
|
|
27
|
-
type: "string",
|
|
28
|
-
required: true,
|
|
29
|
-
typeable: false,
|
|
30
|
-
handle: {
|
|
31
|
-
type: "output",
|
|
32
|
-
label: "Message",
|
|
33
|
-
name: "message",
|
|
34
|
-
fieldType: "string",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: "chatId",
|
|
39
|
-
label: "Chat ID",
|
|
40
|
-
type: "string",
|
|
41
|
-
required: true,
|
|
42
|
-
typeable: false,
|
|
43
|
-
handle: {
|
|
44
|
-
type: "output",
|
|
45
|
-
label: "Chat ID",
|
|
46
|
-
name: "chatId",
|
|
47
|
-
fieldType: "string",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/delete/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,eAAO,MAAM,mBAAmB,EAAE,QAwDjC,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export const HttpDeleteInputNode = {
|
|
2
|
-
label: 'Http DELETE Input',
|
|
3
|
-
type: 'HttpDeleteInput',
|
|
4
|
-
category: 'input',
|
|
5
|
-
icon: '🗑️',
|
|
6
|
-
description: 'Node que representa uma rota DELETE HTTP para remoção de recursos',
|
|
7
|
-
tags: {
|
|
8
|
-
execution: 'sync',
|
|
9
|
-
group: 'HTTP'
|
|
10
|
-
},
|
|
11
|
-
fields: [
|
|
12
|
-
{
|
|
13
|
-
id: 'route',
|
|
14
|
-
label: 'Route',
|
|
15
|
-
type: 'route',
|
|
16
|
-
required: true,
|
|
17
|
-
placeholder: '/produtos/{id}',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: 'queryParams',
|
|
21
|
-
label: 'Query Params',
|
|
22
|
-
type: 'keyValue',
|
|
23
|
-
required: false,
|
|
24
|
-
handle: {
|
|
25
|
-
type: 'output',
|
|
26
|
-
label: 'Query Params',
|
|
27
|
-
name: 'queryParams',
|
|
28
|
-
fieldType: 'keyValue',
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'headers',
|
|
33
|
-
label: 'Headers',
|
|
34
|
-
type: 'keyValue',
|
|
35
|
-
required: false,
|
|
36
|
-
handle: {
|
|
37
|
-
type: 'output',
|
|
38
|
-
label: 'Headers',
|
|
39
|
-
name: 'headers',
|
|
40
|
-
fieldType: 'keyValue',
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'ip',
|
|
45
|
-
label: 'Request IP',
|
|
46
|
-
type: 'string',
|
|
47
|
-
required: false,
|
|
48
|
-
typeable: false,
|
|
49
|
-
handle: {
|
|
50
|
-
type: 'output',
|
|
51
|
-
label: 'IP',
|
|
52
|
-
name: 'ip',
|
|
53
|
-
fieldType: 'string',
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/delete/function.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,GAAU,QAAQ,GAAG,KAAG,OAAO,CAAC,GAAG,CA+B1E,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
export const HttpDeleteInputNodeFunction = async (params) => {
|
|
3
|
-
const { request, fieldValues } = params;
|
|
4
|
-
const { queryParams: configQueryParams, headers: configHeaders } = fieldValues || {};
|
|
5
|
-
if (request.method !== 'DELETE') {
|
|
6
|
-
throw new Error('Método HTTP inválido');
|
|
7
|
-
}
|
|
8
|
-
const actualData = {
|
|
9
|
-
queryParams: request?.query || {},
|
|
10
|
-
headers: request?.headers || {},
|
|
11
|
-
ip: request?.ip || '127.0.0.1',
|
|
12
|
-
};
|
|
13
|
-
if (configQueryParams) {
|
|
14
|
-
const requiredParams = configQueryParams.filter((p) => p.required);
|
|
15
|
-
const missingParams = requiredParams.filter((p) => !actualData.queryParams[p.key]);
|
|
16
|
-
if (missingParams.length > 0) {
|
|
17
|
-
throw new Error(`Parâmetros obrigatórios ausentes: ${missingParams.map((p) => p.key).join(', ')}`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
if (configHeaders) {
|
|
21
|
-
const requiredHeaders = configHeaders.filter((h) => h.required);
|
|
22
|
-
const missingHeaders = requiredHeaders.filter((h) => !actualData.headers[h.key.toLowerCase()]);
|
|
23
|
-
if (missingHeaders.length > 0) {
|
|
24
|
-
throw new Error(`Headers obrigatórios ausentes: ${missingHeaders.map((h) => h.key).join(', ')}`);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return actualData;
|
|
28
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/delete/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const HttpDeleteInputNodeSchema: z.ZodObject<{
|
|
3
|
-
route: z.ZodString;
|
|
4
|
-
queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5
|
-
key: z.ZodString;
|
|
6
|
-
value: z.ZodOptional<z.ZodString>;
|
|
7
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
-
}, z.core.$strip>>>;
|
|
9
|
-
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
|
-
key: z.ZodString;
|
|
11
|
-
value: z.ZodOptional<z.ZodString>;
|
|
12
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
}, z.core.$strip>>>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export type HttpDeleteInputNodeType = z.infer<typeof HttpDeleteInputNodeSchema>;
|
|
16
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/delete/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;iBAIpC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RouteSchema, QueryParamSchema, HeaderSchema } from "../schemas";
|
|
3
|
-
export const HttpDeleteInputNodeSchema = z.object({
|
|
4
|
-
route: RouteSchema,
|
|
5
|
-
queryParams: z.array(QueryParamSchema).optional().describe("Query parameters configuration"),
|
|
6
|
-
headers: z.array(HeaderSchema).optional().describe("Headers configuration"),
|
|
7
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/get/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,eAAO,MAAM,gBAAgB,EAAE,QAyD9B,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export const HttpGetInputNode = {
|
|
2
|
-
label: 'Http GET Input',
|
|
3
|
-
type: 'HttpGetInput',
|
|
4
|
-
category: 'input',
|
|
5
|
-
icon: '🌐',
|
|
6
|
-
description: 'Node que representa uma rota GET HTTP e recebe query/path parameters',
|
|
7
|
-
group: 'HTTP',
|
|
8
|
-
tags: {
|
|
9
|
-
execution: 'sync',
|
|
10
|
-
group: 'HTTP'
|
|
11
|
-
},
|
|
12
|
-
fields: [
|
|
13
|
-
{
|
|
14
|
-
id: 'route',
|
|
15
|
-
label: 'Route',
|
|
16
|
-
type: 'route',
|
|
17
|
-
required: true,
|
|
18
|
-
placeholder: '/produtos/{id}',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 'queryParams',
|
|
22
|
-
label: 'Query Params',
|
|
23
|
-
type: 'keyValue',
|
|
24
|
-
required: false,
|
|
25
|
-
handle: {
|
|
26
|
-
type: 'output',
|
|
27
|
-
label: 'Query Params',
|
|
28
|
-
name: 'queryParams',
|
|
29
|
-
fieldType: 'keyValue',
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: 'headers',
|
|
34
|
-
label: 'Headers',
|
|
35
|
-
type: 'keyValue',
|
|
36
|
-
required: false,
|
|
37
|
-
handle: {
|
|
38
|
-
type: 'output',
|
|
39
|
-
label: 'Headers',
|
|
40
|
-
name: 'headers',
|
|
41
|
-
fieldType: 'keyValue',
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
id: 'ip',
|
|
46
|
-
label: 'Request IP',
|
|
47
|
-
type: 'string',
|
|
48
|
-
required: false,
|
|
49
|
-
typeable: false,
|
|
50
|
-
handle: {
|
|
51
|
-
type: 'output',
|
|
52
|
-
label: 'IP',
|
|
53
|
-
name: 'ip',
|
|
54
|
-
fieldType: 'string',
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/get/function.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,GAAU,QAAQ,GAAG,KAAG,OAAO,CAAC,GAAG,CA2BvE,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
export const HttpGetInputNodeFunction = async (params) => {
|
|
3
|
-
const { request, fieldValues } = params;
|
|
4
|
-
const { queryParams: configQueryParams, headers: configHeaders } = fieldValues || {};
|
|
5
|
-
const actualData = {
|
|
6
|
-
queryParams: request?.query || {},
|
|
7
|
-
headers: request?.headers || {},
|
|
8
|
-
ip: request?.ip || '127.0.0.1',
|
|
9
|
-
};
|
|
10
|
-
if (configQueryParams) {
|
|
11
|
-
const requiredParams = configQueryParams.filter((p) => p.required);
|
|
12
|
-
const missingParams = requiredParams.filter((p) => !actualData.queryParams[p.key]);
|
|
13
|
-
if (missingParams.length > 0) {
|
|
14
|
-
throw new Error(`Parâmetros obrigatórios ausentes: ${missingParams.map((p) => p.key).join(', ')}`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
if (configHeaders) {
|
|
18
|
-
const requiredHeaders = configHeaders.filter((h) => h.required);
|
|
19
|
-
const missingHeaders = requiredHeaders.filter((h) => !actualData.headers[h.key.toLowerCase()]);
|
|
20
|
-
if (missingHeaders.length > 0) {
|
|
21
|
-
throw new Error(`Headers obrigatórios ausentes: ${missingHeaders.map((h) => h.key).join(', ')}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return actualData;
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/get/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const HttpGetInputNodeSchema: z.ZodObject<{
|
|
3
|
-
route: z.ZodString;
|
|
4
|
-
queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5
|
-
key: z.ZodString;
|
|
6
|
-
value: z.ZodOptional<z.ZodString>;
|
|
7
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
-
}, z.core.$strip>>>;
|
|
9
|
-
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
|
-
key: z.ZodString;
|
|
11
|
-
value: z.ZodOptional<z.ZodString>;
|
|
12
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
}, z.core.$strip>>>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export type HttpGetInputNodeType = z.infer<typeof HttpGetInputNodeSchema>;
|
|
16
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/get/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;iBAIjC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RouteSchema, QueryParamSchema, HeaderSchema } from "../schemas";
|
|
3
|
-
export const HttpGetInputNodeSchema = z.object({
|
|
4
|
-
route: RouteSchema,
|
|
5
|
-
queryParams: z.array(QueryParamSchema).optional().describe("Query parameters configuration"),
|
|
6
|
-
headers: z.array(HeaderSchema).optional().describe("Headers configuration"),
|
|
7
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../libs/nodes/src/nodes/inputs/http/index.ts"],"names":[],"mappings":"AACA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/patch/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,eAAO,MAAM,kBAAkB,EAAE,QAqEhC,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export const HttpPatchInputNode = {
|
|
2
|
-
label: 'Http PATCH Input',
|
|
3
|
-
type: 'HttpPatchInput',
|
|
4
|
-
category: 'input',
|
|
5
|
-
icon: '🔧',
|
|
6
|
-
description: 'Node que representa uma rota PATCH HTTP para atualização parcial de recursos',
|
|
7
|
-
tags: {
|
|
8
|
-
execution: 'sync',
|
|
9
|
-
group: 'HTTP'
|
|
10
|
-
},
|
|
11
|
-
fields: [
|
|
12
|
-
{
|
|
13
|
-
id: 'route',
|
|
14
|
-
label: 'Route',
|
|
15
|
-
type: 'route',
|
|
16
|
-
required: true,
|
|
17
|
-
placeholder: '/produtos/{id}',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: 'queryParams',
|
|
21
|
-
label: 'Query Params',
|
|
22
|
-
type: 'keyValue',
|
|
23
|
-
required: false,
|
|
24
|
-
handle: {
|
|
25
|
-
type: 'output',
|
|
26
|
-
label: 'Query Params',
|
|
27
|
-
name: 'queryParams',
|
|
28
|
-
fieldType: 'keyValue',
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'headers',
|
|
33
|
-
label: 'Headers',
|
|
34
|
-
type: 'keyValue',
|
|
35
|
-
required: false,
|
|
36
|
-
handle: {
|
|
37
|
-
type: 'output',
|
|
38
|
-
label: 'Headers',
|
|
39
|
-
name: 'headers',
|
|
40
|
-
fieldType: 'keyValue',
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'body',
|
|
45
|
-
label: 'Body',
|
|
46
|
-
type: 'object',
|
|
47
|
-
required: false,
|
|
48
|
-
handle: {
|
|
49
|
-
type: 'output',
|
|
50
|
-
label: 'Body',
|
|
51
|
-
name: 'body',
|
|
52
|
-
fieldType: 'object',
|
|
53
|
-
required: false
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 'ip',
|
|
58
|
-
label: 'Request IP',
|
|
59
|
-
type: 'string',
|
|
60
|
-
required: false,
|
|
61
|
-
typeable: false,
|
|
62
|
-
handle: {
|
|
63
|
-
type: 'output',
|
|
64
|
-
label: 'IP',
|
|
65
|
-
name: 'ip',
|
|
66
|
-
fieldType: 'string',
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/patch/function.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,GAAI,QAAQ,GAAG,KAAG,GAwCxD,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// "use server";
|
|
2
|
-
export const HttpPatchInputNodeFunction = (params) => {
|
|
3
|
-
const { request, fieldValues } = params;
|
|
4
|
-
const { queryParams: configQueryParams, headers: configHeaders, body: configBody } = fieldValues || {};
|
|
5
|
-
if (request.method !== 'PATCH') {
|
|
6
|
-
throw new Error('Método HTTP inválido');
|
|
7
|
-
}
|
|
8
|
-
const actualData = {
|
|
9
|
-
queryParams: request?.query || {},
|
|
10
|
-
headers: request?.headers || {},
|
|
11
|
-
body: request?.body || {},
|
|
12
|
-
ip: request?.ip || '127.0.0.1',
|
|
13
|
-
};
|
|
14
|
-
if (configQueryParams) {
|
|
15
|
-
const requiredParams = configQueryParams.filter((p) => p.required);
|
|
16
|
-
const missingParams = requiredParams.filter((p) => !actualData.queryParams[p.key]);
|
|
17
|
-
if (missingParams.length > 0) {
|
|
18
|
-
throw new Error(`Parâmetros obrigatórios ausentes: ${missingParams.map((p) => p.key).join(', ')}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (configHeaders) {
|
|
22
|
-
const requiredHeaders = configHeaders.filter((h) => h.required);
|
|
23
|
-
const missingHeaders = requiredHeaders.filter((h) => !actualData.headers[h.key.toLowerCase()]);
|
|
24
|
-
if (missingHeaders.length > 0) {
|
|
25
|
-
throw new Error(`Headers obrigatórios ausentes: ${missingHeaders.map((h) => h.key).join(', ')}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (configBody) {
|
|
29
|
-
const requiredBodyFields = configBody.filter((f) => f.required);
|
|
30
|
-
const missingBodyFields = requiredBodyFields.filter((f) => !actualData.body[f.key]);
|
|
31
|
-
if (missingBodyFields.length > 0) {
|
|
32
|
-
throw new Error(`Campos obrigatórios do body ausentes: ${missingBodyFields.map((f) => f.key).join(', ')}`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return actualData;
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/patch/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const HttpPatchInputNodeSchema: z.ZodObject<{
|
|
3
|
-
route: z.ZodString;
|
|
4
|
-
queryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5
|
-
key: z.ZodString;
|
|
6
|
-
value: z.ZodOptional<z.ZodString>;
|
|
7
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
-
}, z.core.$strip>>>;
|
|
9
|
-
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
|
-
key: z.ZodString;
|
|
11
|
-
value: z.ZodOptional<z.ZodString>;
|
|
12
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
}, z.core.$strip>>>;
|
|
14
|
-
body: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
-
key: z.ZodString;
|
|
16
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
17
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
}, z.core.$strip>>>;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
export type HttpPatchInputNodeType = z.infer<typeof HttpPatchInputNodeSchema>;
|
|
21
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/patch/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAKnC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RouteSchema, QueryParamSchema, HeaderSchema, BodyFieldSchema } from "../schemas";
|
|
3
|
-
export const HttpPatchInputNodeSchema = z.object({
|
|
4
|
-
route: RouteSchema,
|
|
5
|
-
queryParams: z.array(QueryParamSchema).optional().describe("Query parameters configuration"),
|
|
6
|
-
headers: z.array(HeaderSchema).optional().describe("Headers configuration"),
|
|
7
|
-
body: z.array(BodyFieldSchema).optional().describe("Body fields configuration"),
|
|
8
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/post/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,eAAO,MAAM,iBAAiB,EAAE,QAqE/B,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export const HttpPostInputNode = {
|
|
2
|
-
label: 'Http POST Input',
|
|
3
|
-
type: 'HttpPostInput',
|
|
4
|
-
category: 'input',
|
|
5
|
-
icon: '📤',
|
|
6
|
-
description: 'Node que representa uma rota POST HTTP e recebe dados no body',
|
|
7
|
-
tags: {
|
|
8
|
-
execution: 'sync',
|
|
9
|
-
group: 'HTTP'
|
|
10
|
-
},
|
|
11
|
-
fields: [
|
|
12
|
-
{
|
|
13
|
-
id: 'route',
|
|
14
|
-
label: 'Route',
|
|
15
|
-
type: 'route',
|
|
16
|
-
required: true,
|
|
17
|
-
placeholder: '/produtos/{id}',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: 'queryParams',
|
|
21
|
-
label: 'Query Params',
|
|
22
|
-
type: 'keyValue',
|
|
23
|
-
required: false,
|
|
24
|
-
handle: {
|
|
25
|
-
type: 'output',
|
|
26
|
-
label: 'Query Params',
|
|
27
|
-
name: 'queryParams',
|
|
28
|
-
fieldType: 'keyValue',
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'headers',
|
|
33
|
-
label: 'Headers',
|
|
34
|
-
type: 'keyValue',
|
|
35
|
-
required: false,
|
|
36
|
-
handle: {
|
|
37
|
-
type: 'output',
|
|
38
|
-
label: 'Headers',
|
|
39
|
-
name: 'headers',
|
|
40
|
-
fieldType: 'keyValue',
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'body',
|
|
45
|
-
label: 'Body',
|
|
46
|
-
type: 'object',
|
|
47
|
-
required: false,
|
|
48
|
-
handle: {
|
|
49
|
-
type: 'output',
|
|
50
|
-
label: 'Body',
|
|
51
|
-
name: 'body',
|
|
52
|
-
fieldType: 'object',
|
|
53
|
-
required: false
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 'ip',
|
|
58
|
-
label: 'Request IP',
|
|
59
|
-
type: 'string',
|
|
60
|
-
required: false,
|
|
61
|
-
typeable: false,
|
|
62
|
-
handle: {
|
|
63
|
-
type: 'output',
|
|
64
|
-
label: 'IP',
|
|
65
|
-
name: 'ip',
|
|
66
|
-
fieldType: 'string',
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/nodes/src/nodes/inputs/http/post/function.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,GAAI,QAAQ,GAAG,KAAG,GAwCvD,CAAC"}
|