evo360-types 1.3.772 → 1.3.778
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/apps/evo-core/zod-schemas.d.ts +23 -0
- package/dist/apps/evo-core/zod-schemas.js +1 -0
- package/dist/apps/evo-core/zod-schemas.ts +1 -0
- package/dist/apps/evo-hub-ia/workflows/zod-schemas.d.ts +550 -0
- package/dist/apps/evo-hub-ia/workflows/zod-schemas.js +127 -0
- package/dist/apps/evo-hub-ia/workflows/zod-schemas.ts +150 -0
- package/dist/apps/hub-automation/zod-schemas.js +4 -1
- package/dist/apps/hub-automation/zod-schemas.ts +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.ts +2 -0
- package/dist/types/evo-chat/index.d.ts +2 -0
- package/dist/types/evo-chat/index.js +2 -0
- package/dist/types/evo-chat/index.ts +2 -0
- package/dist/types/evo-core/index.d.ts +2 -0
- package/dist/types/evo-core/index.ts +2 -0
- package/dist/types/evo-emr/index.d.ts +14 -0
- package/dist/types/evo-emr/index.js +25 -0
- package/dist/types/evo-emr/index.ts +28 -0
- package/dist/types/evo-modules/catalog.d.ts +3 -1
- package/dist/types/evo-modules/catalog.js +37 -2
- package/dist/types/evo-modules/catalog.ts +37 -1
- package/dist/types/evo-reports/index.d.ts +2 -1
- package/dist/types/evo-reports/index.ts +3 -1
- package/dist/types/hub-automation/index.d.ts +2 -2
- package/dist/types/hub-automation/index.js +14 -1
- package/dist/types/hub-automation/index.ts +17 -2
- package/package.json +1 -1
|
@@ -274,10 +274,13 @@ export declare const zNexusModuleFinancePermissionsSchema: z.ZodObject<{
|
|
|
274
274
|
*/
|
|
275
275
|
export declare const zNexusModuleToolsPermissionsSchema: z.ZodObject<{
|
|
276
276
|
forms: z.ZodOptional<z.ZodBoolean>;
|
|
277
|
+
"hubia-n8n": z.ZodOptional<z.ZodBoolean>;
|
|
277
278
|
}, "strip", z.ZodTypeAny, {
|
|
278
279
|
forms?: boolean | undefined;
|
|
280
|
+
"hubia-n8n"?: boolean | undefined;
|
|
279
281
|
}, {
|
|
280
282
|
forms?: boolean | undefined;
|
|
283
|
+
"hubia-n8n"?: boolean | undefined;
|
|
281
284
|
}>;
|
|
282
285
|
/**
|
|
283
286
|
* Schema for INexusModules
|
|
@@ -326,10 +329,13 @@ export declare const zNexusModulesSchema: z.ZodObject<{
|
|
|
326
329
|
integrations: z.ZodOptional<z.ZodBoolean>;
|
|
327
330
|
tools: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
328
331
|
forms: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
+
"hubia-n8n": z.ZodOptional<z.ZodBoolean>;
|
|
329
333
|
}, "strip", z.ZodTypeAny, {
|
|
330
334
|
forms?: boolean | undefined;
|
|
335
|
+
"hubia-n8n"?: boolean | undefined;
|
|
331
336
|
}, {
|
|
332
337
|
forms?: boolean | undefined;
|
|
338
|
+
"hubia-n8n"?: boolean | undefined;
|
|
333
339
|
}>, z.ZodBoolean]>>;
|
|
334
340
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
335
341
|
chat: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -375,10 +381,13 @@ export declare const zNexusModulesSchema: z.ZodObject<{
|
|
|
375
381
|
integrations: z.ZodOptional<z.ZodBoolean>;
|
|
376
382
|
tools: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
377
383
|
forms: z.ZodOptional<z.ZodBoolean>;
|
|
384
|
+
"hubia-n8n": z.ZodOptional<z.ZodBoolean>;
|
|
378
385
|
}, "strip", z.ZodTypeAny, {
|
|
379
386
|
forms?: boolean | undefined;
|
|
387
|
+
"hubia-n8n"?: boolean | undefined;
|
|
380
388
|
}, {
|
|
381
389
|
forms?: boolean | undefined;
|
|
390
|
+
"hubia-n8n"?: boolean | undefined;
|
|
382
391
|
}>, z.ZodBoolean]>>;
|
|
383
392
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
384
393
|
chat: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -424,10 +433,13 @@ export declare const zNexusModulesSchema: z.ZodObject<{
|
|
|
424
433
|
integrations: z.ZodOptional<z.ZodBoolean>;
|
|
425
434
|
tools: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
426
435
|
forms: z.ZodOptional<z.ZodBoolean>;
|
|
436
|
+
"hubia-n8n": z.ZodOptional<z.ZodBoolean>;
|
|
427
437
|
}, "strip", z.ZodTypeAny, {
|
|
428
438
|
forms?: boolean | undefined;
|
|
439
|
+
"hubia-n8n"?: boolean | undefined;
|
|
429
440
|
}, {
|
|
430
441
|
forms?: boolean | undefined;
|
|
442
|
+
"hubia-n8n"?: boolean | undefined;
|
|
431
443
|
}>, z.ZodBoolean]>>;
|
|
432
444
|
}, z.ZodTypeAny, "passthrough">>;
|
|
433
445
|
/**
|
|
@@ -479,10 +491,13 @@ export declare const zNexusClaimsSchema: z.ZodObject<{
|
|
|
479
491
|
integrations: z.ZodOptional<z.ZodBoolean>;
|
|
480
492
|
tools: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
481
493
|
forms: z.ZodOptional<z.ZodBoolean>;
|
|
494
|
+
"hubia-n8n": z.ZodOptional<z.ZodBoolean>;
|
|
482
495
|
}, "strip", z.ZodTypeAny, {
|
|
483
496
|
forms?: boolean | undefined;
|
|
497
|
+
"hubia-n8n"?: boolean | undefined;
|
|
484
498
|
}, {
|
|
485
499
|
forms?: boolean | undefined;
|
|
500
|
+
"hubia-n8n"?: boolean | undefined;
|
|
486
501
|
}>, z.ZodBoolean]>>;
|
|
487
502
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
488
503
|
chat: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -528,10 +543,13 @@ export declare const zNexusClaimsSchema: z.ZodObject<{
|
|
|
528
543
|
integrations: z.ZodOptional<z.ZodBoolean>;
|
|
529
544
|
tools: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
530
545
|
forms: z.ZodOptional<z.ZodBoolean>;
|
|
546
|
+
"hubia-n8n": z.ZodOptional<z.ZodBoolean>;
|
|
531
547
|
}, "strip", z.ZodTypeAny, {
|
|
532
548
|
forms?: boolean | undefined;
|
|
549
|
+
"hubia-n8n"?: boolean | undefined;
|
|
533
550
|
}, {
|
|
534
551
|
forms?: boolean | undefined;
|
|
552
|
+
"hubia-n8n"?: boolean | undefined;
|
|
535
553
|
}>, z.ZodBoolean]>>;
|
|
536
554
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
537
555
|
chat: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -577,10 +595,13 @@ export declare const zNexusClaimsSchema: z.ZodObject<{
|
|
|
577
595
|
integrations: z.ZodOptional<z.ZodBoolean>;
|
|
578
596
|
tools: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
579
597
|
forms: z.ZodOptional<z.ZodBoolean>;
|
|
598
|
+
"hubia-n8n": z.ZodOptional<z.ZodBoolean>;
|
|
580
599
|
}, "strip", z.ZodTypeAny, {
|
|
581
600
|
forms?: boolean | undefined;
|
|
601
|
+
"hubia-n8n"?: boolean | undefined;
|
|
582
602
|
}, {
|
|
583
603
|
forms?: boolean | undefined;
|
|
604
|
+
"hubia-n8n"?: boolean | undefined;
|
|
584
605
|
}>, z.ZodBoolean]>>;
|
|
585
606
|
}, z.ZodTypeAny, "passthrough">>;
|
|
586
607
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -606,6 +627,7 @@ export declare const zNexusClaimsSchema: z.ZodObject<{
|
|
|
606
627
|
webhooks?: boolean | undefined;
|
|
607
628
|
tools?: boolean | {
|
|
608
629
|
forms?: boolean | undefined;
|
|
630
|
+
"hubia-n8n"?: boolean | undefined;
|
|
609
631
|
} | undefined;
|
|
610
632
|
} & {
|
|
611
633
|
[k: string]: unknown;
|
|
@@ -633,6 +655,7 @@ export declare const zNexusClaimsSchema: z.ZodObject<{
|
|
|
633
655
|
webhooks?: boolean | undefined;
|
|
634
656
|
tools?: boolean | {
|
|
635
657
|
forms?: boolean | undefined;
|
|
658
|
+
"hubia-n8n"?: boolean | undefined;
|
|
636
659
|
} | undefined;
|
|
637
660
|
} & {
|
|
638
661
|
[k: string]: unknown;
|
|
@@ -118,6 +118,7 @@ exports.zNexusModuleFinancePermissionsSchema = zod_1.z.object({
|
|
|
118
118
|
*/
|
|
119
119
|
exports.zNexusModuleToolsPermissionsSchema = zod_1.z.object({
|
|
120
120
|
forms: zod_1.z.boolean().optional(),
|
|
121
|
+
"hubia-n8n": zod_1.z.boolean().optional(),
|
|
121
122
|
});
|
|
122
123
|
/**
|
|
123
124
|
* Schema for INexusModules
|
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* feat-324 — workflows n8n acionados pela HubIA (LLM), pela equipe no Omni
|
|
4
|
+
* (manual) ou pela aprovação de uma proposta do modo híbrido.
|
|
5
|
+
*
|
|
6
|
+
* - Catálogo (plataforma): `/platform/evo-hubia-workflows/workflows/{id}`.
|
|
7
|
+
* - Habilitação (tenant): `tenants/{t}/apps/evo-hubia-v1/workflows/{id}` (id = id do workflow).
|
|
8
|
+
* - Protocolo: `hubia-workflow/1` (envelope + resposta abaixo), assinado por JWT HS256
|
|
9
|
+
* com claim `body_sha256`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const HUBIA_WORKFLOWS_PLATFORM_DOC = "evo-hubia-workflows";
|
|
12
|
+
export declare const HUBIA_WORKFLOWS_COLLECTION = "workflows";
|
|
13
|
+
export declare const HUBIA_WORKFLOW_PROTOCOL = "hubia-workflow/1";
|
|
14
|
+
export declare const HUBIA_WORKFLOW_MAX_TIMEOUT_MS = 30000;
|
|
15
|
+
export declare const zHubiaWorkflowCodeSchema: z.ZodString;
|
|
16
|
+
export declare const zHubiaWorkflowParamTypeSchema: z.ZodEnum<["string", "number", "boolean", "date", "enum"]>;
|
|
17
|
+
export declare const zHubiaWorkflowParamSchema: z.ZodEffects<z.ZodObject<{
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
/** Rótulo do campo no diálogo manual do Omni. */
|
|
20
|
+
label: z.ZodString;
|
|
21
|
+
type: z.ZodEnum<["string", "number", "boolean", "date", "enum"]>;
|
|
22
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
/** Como o LLM deve preencher o campo (HubIA no turno e pré-preenchimento do diálogo). */
|
|
24
|
+
description: z.ZodString;
|
|
25
|
+
enum_values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
name: string;
|
|
28
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
29
|
+
label: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
description: string;
|
|
32
|
+
enum_values?: string[] | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
name: string;
|
|
35
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
36
|
+
label: string;
|
|
37
|
+
description: string;
|
|
38
|
+
required?: boolean | undefined;
|
|
39
|
+
enum_values?: string[] | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
name: string;
|
|
42
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
43
|
+
label: string;
|
|
44
|
+
required: boolean;
|
|
45
|
+
description: string;
|
|
46
|
+
enum_values?: string[] | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
name: string;
|
|
49
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
50
|
+
label: string;
|
|
51
|
+
description: string;
|
|
52
|
+
required?: boolean | undefined;
|
|
53
|
+
enum_values?: string[] | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const zHubiaWorkflowModeSchema: z.ZodEnum<["ai_only", "hybrid_assist"]>;
|
|
56
|
+
export declare const zHubiaWorkflowInvocationSchema: z.ZodEffects<z.ZodObject<{
|
|
57
|
+
/** A IA pode acionar (aparece no catálogo do prompt). */
|
|
58
|
+
llm: z.ZodBoolean;
|
|
59
|
+
/** A equipe pode acionar pelo botão "Workflows" do Omni. */
|
|
60
|
+
manual: z.ZodBoolean;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
manual: boolean;
|
|
63
|
+
llm: boolean;
|
|
64
|
+
}, {
|
|
65
|
+
manual: boolean;
|
|
66
|
+
llm: boolean;
|
|
67
|
+
}>, {
|
|
68
|
+
manual: boolean;
|
|
69
|
+
llm: boolean;
|
|
70
|
+
}, {
|
|
71
|
+
manual: boolean;
|
|
72
|
+
llm: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
/** Campos editáveis no Nexus (o servidor cuida de version/auditoria). */
|
|
75
|
+
export declare const zHubiaWorkflowInputSchema: z.ZodObject<{
|
|
76
|
+
code: z.ZodString;
|
|
77
|
+
name: z.ZodString;
|
|
78
|
+
status: z.ZodEnum<["active", "inactive"]>;
|
|
79
|
+
llm_instructions: z.ZodString;
|
|
80
|
+
input_schema: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
/** Rótulo do campo no diálogo manual do Omni. */
|
|
83
|
+
label: z.ZodString;
|
|
84
|
+
type: z.ZodEnum<["string", "number", "boolean", "date", "enum"]>;
|
|
85
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
86
|
+
/** Como o LLM deve preencher o campo (HubIA no turno e pré-preenchimento do diálogo). */
|
|
87
|
+
description: z.ZodString;
|
|
88
|
+
enum_values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
name: string;
|
|
91
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
92
|
+
label: string;
|
|
93
|
+
required: boolean;
|
|
94
|
+
description: string;
|
|
95
|
+
enum_values?: string[] | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
name: string;
|
|
98
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
99
|
+
label: string;
|
|
100
|
+
description: string;
|
|
101
|
+
required?: boolean | undefined;
|
|
102
|
+
enum_values?: string[] | undefined;
|
|
103
|
+
}>, {
|
|
104
|
+
name: string;
|
|
105
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
106
|
+
label: string;
|
|
107
|
+
required: boolean;
|
|
108
|
+
description: string;
|
|
109
|
+
enum_values?: string[] | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
name: string;
|
|
112
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
113
|
+
label: string;
|
|
114
|
+
description: string;
|
|
115
|
+
required?: boolean | undefined;
|
|
116
|
+
enum_values?: string[] | undefined;
|
|
117
|
+
}>, "many">;
|
|
118
|
+
output_hint: z.ZodDefault<z.ZodString>;
|
|
119
|
+
kind: z.ZodEnum<["read", "action"]>;
|
|
120
|
+
invocation: z.ZodEffects<z.ZodObject<{
|
|
121
|
+
/** A IA pode acionar (aparece no catálogo do prompt). */
|
|
122
|
+
llm: z.ZodBoolean;
|
|
123
|
+
/** A equipe pode acionar pelo botão "Workflows" do Omni. */
|
|
124
|
+
manual: z.ZodBoolean;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
manual: boolean;
|
|
127
|
+
llm: boolean;
|
|
128
|
+
}, {
|
|
129
|
+
manual: boolean;
|
|
130
|
+
llm: boolean;
|
|
131
|
+
}>, {
|
|
132
|
+
manual: boolean;
|
|
133
|
+
llm: boolean;
|
|
134
|
+
}, {
|
|
135
|
+
manual: boolean;
|
|
136
|
+
llm: boolean;
|
|
137
|
+
}>;
|
|
138
|
+
allowed_modes: z.ZodArray<z.ZodEnum<["ai_only", "hybrid_assist"]>, "many">;
|
|
139
|
+
/** Híbrido: `execute` roda direto (resultado entra na sugestão); `propose` só sugere a execução. */
|
|
140
|
+
hybrid_behavior: z.ZodEnum<["execute", "propose"]>;
|
|
141
|
+
timeout_ms: z.ZodNumber;
|
|
142
|
+
endpoint_url: z.ZodString;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
code: string;
|
|
145
|
+
name: string;
|
|
146
|
+
kind: "read" | "action";
|
|
147
|
+
status: "active" | "inactive";
|
|
148
|
+
timeout_ms: number;
|
|
149
|
+
llm_instructions: string;
|
|
150
|
+
input_schema: {
|
|
151
|
+
name: string;
|
|
152
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
153
|
+
label: string;
|
|
154
|
+
required: boolean;
|
|
155
|
+
description: string;
|
|
156
|
+
enum_values?: string[] | undefined;
|
|
157
|
+
}[];
|
|
158
|
+
output_hint: string;
|
|
159
|
+
invocation: {
|
|
160
|
+
manual: boolean;
|
|
161
|
+
llm: boolean;
|
|
162
|
+
};
|
|
163
|
+
allowed_modes: ("ai_only" | "hybrid_assist")[];
|
|
164
|
+
hybrid_behavior: "execute" | "propose";
|
|
165
|
+
endpoint_url: string;
|
|
166
|
+
}, {
|
|
167
|
+
code: string;
|
|
168
|
+
name: string;
|
|
169
|
+
kind: "read" | "action";
|
|
170
|
+
status: "active" | "inactive";
|
|
171
|
+
timeout_ms: number;
|
|
172
|
+
llm_instructions: string;
|
|
173
|
+
input_schema: {
|
|
174
|
+
name: string;
|
|
175
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
176
|
+
label: string;
|
|
177
|
+
description: string;
|
|
178
|
+
required?: boolean | undefined;
|
|
179
|
+
enum_values?: string[] | undefined;
|
|
180
|
+
}[];
|
|
181
|
+
invocation: {
|
|
182
|
+
manual: boolean;
|
|
183
|
+
llm: boolean;
|
|
184
|
+
};
|
|
185
|
+
allowed_modes: ("ai_only" | "hybrid_assist")[];
|
|
186
|
+
hybrid_behavior: "execute" | "propose";
|
|
187
|
+
endpoint_url: string;
|
|
188
|
+
output_hint?: string | undefined;
|
|
189
|
+
}>;
|
|
190
|
+
export declare const zHubiaWorkflowDocSchema: z.ZodObject<{
|
|
191
|
+
code: z.ZodString;
|
|
192
|
+
name: z.ZodString;
|
|
193
|
+
status: z.ZodEnum<["active", "inactive"]>;
|
|
194
|
+
llm_instructions: z.ZodString;
|
|
195
|
+
input_schema: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
196
|
+
name: z.ZodString;
|
|
197
|
+
/** Rótulo do campo no diálogo manual do Omni. */
|
|
198
|
+
label: z.ZodString;
|
|
199
|
+
type: z.ZodEnum<["string", "number", "boolean", "date", "enum"]>;
|
|
200
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
201
|
+
/** Como o LLM deve preencher o campo (HubIA no turno e pré-preenchimento do diálogo). */
|
|
202
|
+
description: z.ZodString;
|
|
203
|
+
enum_values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
name: string;
|
|
206
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
207
|
+
label: string;
|
|
208
|
+
required: boolean;
|
|
209
|
+
description: string;
|
|
210
|
+
enum_values?: string[] | undefined;
|
|
211
|
+
}, {
|
|
212
|
+
name: string;
|
|
213
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
214
|
+
label: string;
|
|
215
|
+
description: string;
|
|
216
|
+
required?: boolean | undefined;
|
|
217
|
+
enum_values?: string[] | undefined;
|
|
218
|
+
}>, {
|
|
219
|
+
name: string;
|
|
220
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
221
|
+
label: string;
|
|
222
|
+
required: boolean;
|
|
223
|
+
description: string;
|
|
224
|
+
enum_values?: string[] | undefined;
|
|
225
|
+
}, {
|
|
226
|
+
name: string;
|
|
227
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
228
|
+
label: string;
|
|
229
|
+
description: string;
|
|
230
|
+
required?: boolean | undefined;
|
|
231
|
+
enum_values?: string[] | undefined;
|
|
232
|
+
}>, "many">;
|
|
233
|
+
output_hint: z.ZodDefault<z.ZodString>;
|
|
234
|
+
kind: z.ZodEnum<["read", "action"]>;
|
|
235
|
+
invocation: z.ZodEffects<z.ZodObject<{
|
|
236
|
+
/** A IA pode acionar (aparece no catálogo do prompt). */
|
|
237
|
+
llm: z.ZodBoolean;
|
|
238
|
+
/** A equipe pode acionar pelo botão "Workflows" do Omni. */
|
|
239
|
+
manual: z.ZodBoolean;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
manual: boolean;
|
|
242
|
+
llm: boolean;
|
|
243
|
+
}, {
|
|
244
|
+
manual: boolean;
|
|
245
|
+
llm: boolean;
|
|
246
|
+
}>, {
|
|
247
|
+
manual: boolean;
|
|
248
|
+
llm: boolean;
|
|
249
|
+
}, {
|
|
250
|
+
manual: boolean;
|
|
251
|
+
llm: boolean;
|
|
252
|
+
}>;
|
|
253
|
+
allowed_modes: z.ZodArray<z.ZodEnum<["ai_only", "hybrid_assist"]>, "many">;
|
|
254
|
+
/** Híbrido: `execute` roda direto (resultado entra na sugestão); `propose` só sugere a execução. */
|
|
255
|
+
hybrid_behavior: z.ZodEnum<["execute", "propose"]>;
|
|
256
|
+
timeout_ms: z.ZodNumber;
|
|
257
|
+
endpoint_url: z.ZodString;
|
|
258
|
+
} & {
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
version: z.ZodNumber;
|
|
261
|
+
/** Nome do segredo no Secret Manager (`hubia-workflow-<code>`). */
|
|
262
|
+
secret_name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
263
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
264
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
265
|
+
created_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
266
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
267
|
+
updated_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
269
|
+
}, "strip", z.ZodTypeAny, {
|
|
270
|
+
code: string;
|
|
271
|
+
name: string;
|
|
272
|
+
id: string;
|
|
273
|
+
kind: "read" | "action";
|
|
274
|
+
status: "active" | "inactive";
|
|
275
|
+
model_ver: number;
|
|
276
|
+
version: number;
|
|
277
|
+
timeout_ms: number;
|
|
278
|
+
llm_instructions: string;
|
|
279
|
+
input_schema: {
|
|
280
|
+
name: string;
|
|
281
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
282
|
+
label: string;
|
|
283
|
+
required: boolean;
|
|
284
|
+
description: string;
|
|
285
|
+
enum_values?: string[] | undefined;
|
|
286
|
+
}[];
|
|
287
|
+
output_hint: string;
|
|
288
|
+
invocation: {
|
|
289
|
+
manual: boolean;
|
|
290
|
+
llm: boolean;
|
|
291
|
+
};
|
|
292
|
+
allowed_modes: ("ai_only" | "hybrid_assist")[];
|
|
293
|
+
hybrid_behavior: "execute" | "propose";
|
|
294
|
+
endpoint_url: string;
|
|
295
|
+
secret_name: string | null;
|
|
296
|
+
created_by?: string | null | undefined;
|
|
297
|
+
created_at?: Date | null | undefined;
|
|
298
|
+
updated_at?: Date | null | undefined;
|
|
299
|
+
deleted_at?: Date | null | undefined;
|
|
300
|
+
updated_by?: string | null | undefined;
|
|
301
|
+
}, {
|
|
302
|
+
code: string;
|
|
303
|
+
name: string;
|
|
304
|
+
id: string;
|
|
305
|
+
kind: "read" | "action";
|
|
306
|
+
status: "active" | "inactive";
|
|
307
|
+
version: number;
|
|
308
|
+
timeout_ms: number;
|
|
309
|
+
llm_instructions: string;
|
|
310
|
+
input_schema: {
|
|
311
|
+
name: string;
|
|
312
|
+
type: "string" | "number" | "boolean" | "date" | "enum";
|
|
313
|
+
label: string;
|
|
314
|
+
description: string;
|
|
315
|
+
required?: boolean | undefined;
|
|
316
|
+
enum_values?: string[] | undefined;
|
|
317
|
+
}[];
|
|
318
|
+
invocation: {
|
|
319
|
+
manual: boolean;
|
|
320
|
+
llm: boolean;
|
|
321
|
+
};
|
|
322
|
+
allowed_modes: ("ai_only" | "hybrid_assist")[];
|
|
323
|
+
hybrid_behavior: "execute" | "propose";
|
|
324
|
+
endpoint_url: string;
|
|
325
|
+
created_by?: string | null | undefined;
|
|
326
|
+
created_at?: Date | null | undefined;
|
|
327
|
+
model_ver?: number | undefined;
|
|
328
|
+
updated_at?: Date | null | undefined;
|
|
329
|
+
deleted_at?: Date | null | undefined;
|
|
330
|
+
updated_by?: string | null | undefined;
|
|
331
|
+
output_hint?: string | undefined;
|
|
332
|
+
secret_name?: string | null | undefined;
|
|
333
|
+
}>;
|
|
334
|
+
export declare const zHubiaWorkflowTenantParamValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
335
|
+
export declare const zHubiaWorkflowGrantInputSchema: z.ZodObject<{
|
|
336
|
+
enabled: z.ZodBoolean;
|
|
337
|
+
/** Parâmetros fixos do tenant, enviados no envelope; a IA não vê nem escolhe. */
|
|
338
|
+
tenant_params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
339
|
+
instructions_extra: z.ZodDefault<z.ZodString>;
|
|
340
|
+
}, "strip", z.ZodTypeAny, {
|
|
341
|
+
enabled: boolean;
|
|
342
|
+
tenant_params: Record<string, string | number | boolean>;
|
|
343
|
+
instructions_extra: string;
|
|
344
|
+
}, {
|
|
345
|
+
enabled: boolean;
|
|
346
|
+
tenant_params?: Record<string, string | number | boolean> | undefined;
|
|
347
|
+
instructions_extra?: string | undefined;
|
|
348
|
+
}>;
|
|
349
|
+
export declare const zHubiaWorkflowGrantDocSchema: z.ZodObject<{
|
|
350
|
+
enabled: z.ZodBoolean;
|
|
351
|
+
/** Parâmetros fixos do tenant, enviados no envelope; a IA não vê nem escolhe. */
|
|
352
|
+
tenant_params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
353
|
+
instructions_extra: z.ZodDefault<z.ZodString>;
|
|
354
|
+
} & {
|
|
355
|
+
id: z.ZodString;
|
|
356
|
+
workflow_id: z.ZodString;
|
|
357
|
+
code: z.ZodString;
|
|
358
|
+
tenant: z.ZodString;
|
|
359
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
360
|
+
enabled_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
361
|
+
enabled_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
362
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
363
|
+
}, "strip", z.ZodTypeAny, {
|
|
364
|
+
code: string;
|
|
365
|
+
id: string;
|
|
366
|
+
tenant: string;
|
|
367
|
+
model_ver: number;
|
|
368
|
+
enabled: boolean;
|
|
369
|
+
workflow_id: string;
|
|
370
|
+
tenant_params: Record<string, string | number | boolean>;
|
|
371
|
+
instructions_extra: string;
|
|
372
|
+
updated_at?: Date | null | undefined;
|
|
373
|
+
enabled_by?: string | null | undefined;
|
|
374
|
+
enabled_at?: Date | null | undefined;
|
|
375
|
+
}, {
|
|
376
|
+
code: string;
|
|
377
|
+
id: string;
|
|
378
|
+
tenant: string;
|
|
379
|
+
enabled: boolean;
|
|
380
|
+
workflow_id: string;
|
|
381
|
+
model_ver?: number | undefined;
|
|
382
|
+
updated_at?: Date | null | undefined;
|
|
383
|
+
tenant_params?: Record<string, string | number | boolean> | undefined;
|
|
384
|
+
instructions_extra?: string | undefined;
|
|
385
|
+
enabled_by?: string | null | undefined;
|
|
386
|
+
enabled_at?: Date | null | undefined;
|
|
387
|
+
}>;
|
|
388
|
+
export declare const zHubiaWorkflowSourceSchema: z.ZodEnum<["llm", "proposal", "manual", "nexus_test"]>;
|
|
389
|
+
export declare const zHubiaWorkflowActorSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
390
|
+
type: z.ZodLiteral<"hubia">;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
type: "hubia";
|
|
393
|
+
}, {
|
|
394
|
+
type: "hubia";
|
|
395
|
+
}>, z.ZodObject<{
|
|
396
|
+
type: z.ZodLiteral<"user">;
|
|
397
|
+
uid: z.ZodString;
|
|
398
|
+
}, "strip", z.ZodTypeAny, {
|
|
399
|
+
type: "user";
|
|
400
|
+
uid: string;
|
|
401
|
+
}, {
|
|
402
|
+
type: "user";
|
|
403
|
+
uid: string;
|
|
404
|
+
}>]>;
|
|
405
|
+
/** Envelope `hubia-workflow/1` enviado ao n8n. */
|
|
406
|
+
export declare const zHubiaWorkflowCallV1Schema: z.ZodObject<{
|
|
407
|
+
protocol: z.ZodLiteral<"hubia-workflow/1">;
|
|
408
|
+
workflow: z.ZodObject<{
|
|
409
|
+
code: z.ZodString;
|
|
410
|
+
version: z.ZodNumber;
|
|
411
|
+
}, "strip", z.ZodTypeAny, {
|
|
412
|
+
code: string;
|
|
413
|
+
version: number;
|
|
414
|
+
}, {
|
|
415
|
+
code: string;
|
|
416
|
+
version: number;
|
|
417
|
+
}>;
|
|
418
|
+
call_id: z.ZodString;
|
|
419
|
+
source: z.ZodEnum<["llm", "proposal", "manual", "nexus_test"]>;
|
|
420
|
+
actor: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
421
|
+
type: z.ZodLiteral<"hubia">;
|
|
422
|
+
}, "strip", z.ZodTypeAny, {
|
|
423
|
+
type: "hubia";
|
|
424
|
+
}, {
|
|
425
|
+
type: "hubia";
|
|
426
|
+
}>, z.ZodObject<{
|
|
427
|
+
type: z.ZodLiteral<"user">;
|
|
428
|
+
uid: z.ZodString;
|
|
429
|
+
}, "strip", z.ZodTypeAny, {
|
|
430
|
+
type: "user";
|
|
431
|
+
uid: string;
|
|
432
|
+
}, {
|
|
433
|
+
type: "user";
|
|
434
|
+
uid: string;
|
|
435
|
+
}>]>;
|
|
436
|
+
tenant: z.ZodString;
|
|
437
|
+
context: z.ZodObject<{
|
|
438
|
+
execution_id: z.ZodNullable<z.ZodString>;
|
|
439
|
+
ticket_id: z.ZodNullable<z.ZodString>;
|
|
440
|
+
conversation_id: z.ZodNullable<z.ZodString>;
|
|
441
|
+
contact_id: z.ZodNullable<z.ZodString>;
|
|
442
|
+
lead_id: z.ZodNullable<z.ZodString>;
|
|
443
|
+
patient_id: z.ZodNullable<z.ZodString>;
|
|
444
|
+
department_id: z.ZodNullable<z.ZodString>;
|
|
445
|
+
}, "strip", z.ZodTypeAny, {
|
|
446
|
+
lead_id: string | null;
|
|
447
|
+
department_id: string | null;
|
|
448
|
+
contact_id: string | null;
|
|
449
|
+
ticket_id: string | null;
|
|
450
|
+
patient_id: string | null;
|
|
451
|
+
execution_id: string | null;
|
|
452
|
+
conversation_id: string | null;
|
|
453
|
+
}, {
|
|
454
|
+
lead_id: string | null;
|
|
455
|
+
department_id: string | null;
|
|
456
|
+
contact_id: string | null;
|
|
457
|
+
ticket_id: string | null;
|
|
458
|
+
patient_id: string | null;
|
|
459
|
+
execution_id: string | null;
|
|
460
|
+
conversation_id: string | null;
|
|
461
|
+
}>;
|
|
462
|
+
tenant_params: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
463
|
+
parametros: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
464
|
+
}, "strip", z.ZodTypeAny, {
|
|
465
|
+
tenant: string;
|
|
466
|
+
source: "manual" | "llm" | "proposal" | "nexus_test";
|
|
467
|
+
context: {
|
|
468
|
+
lead_id: string | null;
|
|
469
|
+
department_id: string | null;
|
|
470
|
+
contact_id: string | null;
|
|
471
|
+
ticket_id: string | null;
|
|
472
|
+
patient_id: string | null;
|
|
473
|
+
execution_id: string | null;
|
|
474
|
+
conversation_id: string | null;
|
|
475
|
+
};
|
|
476
|
+
actor: {
|
|
477
|
+
type: "hubia";
|
|
478
|
+
} | {
|
|
479
|
+
type: "user";
|
|
480
|
+
uid: string;
|
|
481
|
+
};
|
|
482
|
+
tenant_params: Record<string, string | number | boolean>;
|
|
483
|
+
protocol: "hubia-workflow/1";
|
|
484
|
+
workflow: {
|
|
485
|
+
code: string;
|
|
486
|
+
version: number;
|
|
487
|
+
};
|
|
488
|
+
call_id: string;
|
|
489
|
+
parametros: Record<string, unknown>;
|
|
490
|
+
}, {
|
|
491
|
+
tenant: string;
|
|
492
|
+
source: "manual" | "llm" | "proposal" | "nexus_test";
|
|
493
|
+
context: {
|
|
494
|
+
lead_id: string | null;
|
|
495
|
+
department_id: string | null;
|
|
496
|
+
contact_id: string | null;
|
|
497
|
+
ticket_id: string | null;
|
|
498
|
+
patient_id: string | null;
|
|
499
|
+
execution_id: string | null;
|
|
500
|
+
conversation_id: string | null;
|
|
501
|
+
};
|
|
502
|
+
actor: {
|
|
503
|
+
type: "hubia";
|
|
504
|
+
} | {
|
|
505
|
+
type: "user";
|
|
506
|
+
uid: string;
|
|
507
|
+
};
|
|
508
|
+
tenant_params: Record<string, string | number | boolean>;
|
|
509
|
+
protocol: "hubia-workflow/1";
|
|
510
|
+
workflow: {
|
|
511
|
+
code: string;
|
|
512
|
+
version: number;
|
|
513
|
+
};
|
|
514
|
+
call_id: string;
|
|
515
|
+
parametros: Record<string, unknown>;
|
|
516
|
+
}>;
|
|
517
|
+
/** Resposta `hubia-workflow/1` do n8n. */
|
|
518
|
+
export declare const zHubiaWorkflowResponseV1Schema: z.ZodObject<{
|
|
519
|
+
ok: z.ZodBoolean;
|
|
520
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
521
|
+
/** Texto curto para o LLM interpretar o resultado. */
|
|
522
|
+
message_for_llm: z.ZodOptional<z.ZodString>;
|
|
523
|
+
/** Texto que o Omni exibe para a equipe (balão do evento / diálogo). */
|
|
524
|
+
message_for_human: z.ZodOptional<z.ZodString>;
|
|
525
|
+
error_code: z.ZodOptional<z.ZodString>;
|
|
526
|
+
n8n_execution_id: z.ZodOptional<z.ZodString>;
|
|
527
|
+
}, "strip", z.ZodTypeAny, {
|
|
528
|
+
ok: boolean;
|
|
529
|
+
data?: unknown;
|
|
530
|
+
error_code?: string | undefined;
|
|
531
|
+
message_for_llm?: string | undefined;
|
|
532
|
+
message_for_human?: string | undefined;
|
|
533
|
+
n8n_execution_id?: string | undefined;
|
|
534
|
+
}, {
|
|
535
|
+
ok: boolean;
|
|
536
|
+
data?: unknown;
|
|
537
|
+
error_code?: string | undefined;
|
|
538
|
+
message_for_llm?: string | undefined;
|
|
539
|
+
message_for_human?: string | undefined;
|
|
540
|
+
n8n_execution_id?: string | undefined;
|
|
541
|
+
}>;
|
|
542
|
+
export type HubiaWorkflowParam = z.infer<typeof zHubiaWorkflowParamSchema>;
|
|
543
|
+
export type HubiaWorkflowInput = z.infer<typeof zHubiaWorkflowInputSchema>;
|
|
544
|
+
export type HubiaWorkflowDoc = z.infer<typeof zHubiaWorkflowDocSchema>;
|
|
545
|
+
export type HubiaWorkflowGrantInput = z.infer<typeof zHubiaWorkflowGrantInputSchema>;
|
|
546
|
+
export type HubiaWorkflowGrantDoc = z.infer<typeof zHubiaWorkflowGrantDocSchema>;
|
|
547
|
+
export type HubiaWorkflowSource = z.infer<typeof zHubiaWorkflowSourceSchema>;
|
|
548
|
+
export type HubiaWorkflowActor = z.infer<typeof zHubiaWorkflowActorSchema>;
|
|
549
|
+
export type HubiaWorkflowCallV1 = z.infer<typeof zHubiaWorkflowCallV1Schema>;
|
|
550
|
+
export type HubiaWorkflowResponseV1 = z.infer<typeof zHubiaWorkflowResponseV1Schema>;
|