9export function calculateEstimatedDuration(steps: any[]): number {
10 const baseDuration = steps.length * 2;
11 const complexSteps = steps.filter(s => ["make_api_call", "database_operation"].includes(s.type)).length;
12 return baseDuration + (complexSteps * 5);
13}
38 permissions.add("network_access");
39 break;
40 case "database_operation":
41 permissions.add("database_access");
42 break;
43 case "collect_user_input":
63 dependencies.add("http_client");
64 }
65 if (step.type === "database_operation") {
66 dependencies.add("database_driver");
67 }
68 });
507 input: { label: "Entrada", icon: "š", color: "#9C27B0", subtypes: ["Texto", "NĆŗmero", "Arquivo", "Seleção"] },
508 output: { label: "SaĆda", icon: "š¤", color: "#FF5722", subtypes: ["Exibir", "Arquivo", "Notificação", "Resposta API"] },
509 api: { label: "API", icon: "š", color: "#673AB7", subtypes: ["REST API", "GraphQL", "Webhook", "Database"] },
510 end: { label: "Fim", icon: "ā¹ļø", color: "#F4436", subtypes: [] },
511 };
5function calculateEstimatedDuration(steps) {
6 const baseDuration = steps.length * 2;
7 const complexSteps = steps.filter(s => ["api_call", "database_operation"].includes(s.action)).length;
8 return baseDuration + (complexSteps * 5);
9}
24 permissions.add("network_access");
25 break;
26 case "database_operation":
27 permissions.add("database_access");
28 break;
29 case "collect_user_input":
44 dependencies.add("http_client");
45 }
46 if (step.action === "database_operation") {
47 dependencies.add("database_driver");
48 }
49 });
48| **Entrada** | š | Coletar dados | Texto, NĆŗmero, Arquivo, Seleção |
49| **SaĆda** | š¤ | Exibir resultados | Exibir, Arquivo, Notificação, Resposta API |
50| **API** | š | Chamadas externas | REST API, GraphQL, Webhook, Database |
51| **Fim** | ā¹ļø | Ponto de tĆ©rmino | - |
52
121- `display_output`: Exibição de resultados
122- `make_api_call`: Chamadas para APIs
123- `database_operation`: OperaƧƵes de banco de dados
124- `iterate`: Loops e iteraƧƵes
125- `terminate_agent`: Finalização do agente
32 'output': 'system_output',
33 'api': 'api_call',
34 'database': 'data_operation',
35 'loop': 'iteration'
36 };
127 break;
128
129 case 'database':
130 step.action = "database_operation";
131 step.parameters = {
132 operation: node.operation || "select",
507 input: { label: "Entrada", icon: "š", color: "#9C27B0", subtypes: ["Texto", "NĆŗmero", "Arquivo", "Seleção"] },
508 output: { label: "SaĆda", icon: "š¤", color: "#FF5722", subtypes: ["Exibir", "Arquivo", "Notificação", "Resposta API"] },
509 api: { label: "API", icon: "š", color: "#673AB7", subtypes: ["REST API", "GraphQL", "Webhook", "Database"] },
510 end: { label: "Fim", icon: "ā¹ļø", color: "#F4436", subtypes: [] },
511 };
68#### š API
69- **Função**: Chamadas para APIs externas
70- **Subtipos**: REST API, GraphQL, Webhook, Database
71- **Uso**: Integração com serviços externos
72
170- `display_output`: Exibição de saĆda
171- `make_api_call`: Chamadas de API
172- `database_operation`: OperaƧƵes de banco
173- `iterate`: Loops e iteraƧƵes
174- `terminate_agent`: Finalização
5 // Estimar duração baseada no tipo e quantidade de steps
6 const baseDuration = steps.length * 2; // 2 segundos por step base
7 const complexSteps = steps.filter(s => ["api_call", "database_operation"].includes(s.action)).length;
8 return baseDuration + (complexSteps * 5); // +5 segundos para steps complexos
9}
25 permissions.add("network_access");
26 break;
27 case "database_operation":
28 permissions.add("database_access");
29 break;
30 case "collect_user_input":
47 dependencies.add("http_client");
48 }
49 if (step.action === "database_operation") {
50 dependencies.add("database_driver");
51 }
52 });
67 "api": "API Call",
68 "end": "Fim",
69 "database": "Banco de Dados", // Adicionado
70 "loop": "Loop", // Adicionado
71 };
104 { value: "graphql", label: "GraphQL" },
105 { value: "webhook", label: "Webhook" },
106 { value: "database", label: "Database" },
107 ],
108 "database": [
109 { value: "select", label: "Select" },
110 { value: "insert", label: "Insert" },
16}
17
18// All feeds are stored in the valtown sqlite database. GET/ADD/DELETE are
19// handled by the http_rss_sub.tsx file.
20async function getAllFeeds(): Promise<string[]> {