evo360-types 1.3.109 → 1.3.112
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-chat/chatbee/zod-schemas.d.ts +305 -21
- package/dist/apps/evo-chat/chatbee/zod-schemas.js +58 -8
- package/dist/apps/evo-chat/chatbee/zod-schemas.ts +64 -7
- package/dist/apps/evo-chat/contact/zod-schemas.d.ts +537 -116
- package/dist/apps/evo-chat/contact/zod-schemas.js +11 -16
- package/dist/apps/evo-chat/contact/zod-schemas.ts +12 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.ts +1 -1
- package/dist/types/evo-chat/chatbee/index.d.ts +49 -6
- package/dist/types/evo-chat/chatbee/index.ts +63 -6
- package/dist/types/evo-chat/contact/index.d.ts +8 -13
- package/dist/types/evo-chat/contact/index.ts +12 -15
- package/package.json +1 -1
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zChatContactSchema =
|
|
3
|
+
exports.zChatContactSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
|
-
|
|
7
|
-
id: zod_1.z.string(),
|
|
8
|
-
external_id: zod_1.z.string(),
|
|
9
|
-
name: zod_1.z.string(),
|
|
10
|
-
});
|
|
11
|
-
exports.zChatbeeContactSchema = zod_1.z.object({
|
|
12
|
-
id: zod_1.z.string(),
|
|
13
|
-
external_id: zod_1.z.string(),
|
|
14
|
-
name: zod_1.z.string(),
|
|
15
|
-
is_group: zod_1.z.string(),
|
|
16
|
-
address: zod_1.z.string(),
|
|
17
|
-
type: zod_1.z.string(),
|
|
18
|
-
});
|
|
6
|
+
const zod_schemas_2 = require("../chatbee/zod-schemas");
|
|
19
7
|
exports.zChatContactSchema = zod_schemas_1.zFireDocSchema
|
|
20
8
|
.extend({
|
|
21
|
-
channel:
|
|
22
|
-
contact:
|
|
9
|
+
channel: zod_schemas_2.zChatbeeChannelSchema.nullable().optional(),
|
|
10
|
+
contact: zod_schemas_2.zChatbeeContactSchema.nullable().optional(),
|
|
23
11
|
lead_id: zod_1.z.string().nullable().optional(),
|
|
24
12
|
lead_ref: zod_1.z.any().nullable().optional(),
|
|
13
|
+
histories: zod_1.z.array(zod_schemas_2.zChatbeeContactHistorySchema).optional(), // Lista de históricos (opcional)
|
|
14
|
+
ai_active: zod_1.z.boolean().optional(), // Se o atendimento por IA está ativo
|
|
15
|
+
hub_ia_action: zod_1.z.string().optional(), // Qual ação a IA está fazendo
|
|
16
|
+
hub_ia_status: zod_1.z.string().optional(), // processing / done
|
|
17
|
+
hub_ia_suggestion: zod_1.z.string().optional(), // Sugestão de resposta
|
|
18
|
+
hub_ia_action_suggestion: zod_1.z.string().optional(), // Sugestão de ação da IA
|
|
19
|
+
hub_ia_mode: zod_1.z.string().optional(), // reply, suggestion
|
|
25
20
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
26
21
|
userRef: zod_1.z.any(),
|
|
27
22
|
})
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const zChatbeeContactSchema = z.object({
|
|
11
|
-
id: z.string(),
|
|
12
|
-
external_id: z.string(),
|
|
13
|
-
name: z.string(),
|
|
14
|
-
is_group: z.string(),
|
|
15
|
-
address: z.string(),
|
|
16
|
-
type: z.string(),
|
|
17
|
-
});
|
|
3
|
+
import {
|
|
4
|
+
zChatbeeChannelSchema,
|
|
5
|
+
zChatbeeContactSchema,
|
|
6
|
+
zChatbeeContactHistorySchema,
|
|
7
|
+
} from "../chatbee/zod-schemas";
|
|
18
8
|
|
|
19
9
|
export const zChatContactSchema = zFireDocSchema
|
|
20
10
|
.extend({
|
|
@@ -22,6 +12,13 @@ export const zChatContactSchema = zFireDocSchema
|
|
|
22
12
|
contact: zChatbeeContactSchema.nullable().optional(),
|
|
23
13
|
lead_id: z.string().nullable().optional(),
|
|
24
14
|
lead_ref: z.any().nullable().optional(),
|
|
15
|
+
histories: z.array(zChatbeeContactHistorySchema).optional(), // Lista de históricos (opcional)
|
|
16
|
+
ai_active: z.boolean().optional(), // Se o atendimento por IA está ativo
|
|
17
|
+
hub_ia_action: z.string().optional(), // Qual ação a IA está fazendo
|
|
18
|
+
hub_ia_status: z.string().optional(), // processing / done
|
|
19
|
+
hub_ia_suggestion: z.string().optional(), // Sugestão de resposta
|
|
20
|
+
hub_ia_action_suggestion: z.string().optional(), // Sugestão de ação da IA
|
|
21
|
+
hub_ia_mode: z.string().optional(), // reply, suggestion
|
|
25
22
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
26
23
|
userRef: z.any(),
|
|
27
24
|
})
|
package/dist/index.d.ts
CHANGED
|
@@ -26,9 +26,9 @@ export * from "./apps/evo-activity/zod-schemas";
|
|
|
26
26
|
export * from "./apps/evo-people/zod-schemas";
|
|
27
27
|
export * from "./apps/evo-crm/dic/zod-schemas";
|
|
28
28
|
export * from "./apps/evo-crm/lead/zod-schemas";
|
|
29
|
+
export * from "./apps/evo-chat/chatbee/zod-schemas";
|
|
29
30
|
export * from "./apps/evo-chat/contact/zod-schemas";
|
|
30
31
|
export * from "./apps/evo-chat/message/zod-schemas";
|
|
31
|
-
export * from "./apps/evo-chat/chatbee/zod-schemas";
|
|
32
32
|
export * from "./apps/evo-hub-ia/channel/zod-schemas";
|
|
33
33
|
export * from "./apps/evo-med/calendar/zod-schemas";
|
|
34
34
|
export * from "./apps/evo-med/appointment/zod-schemas";
|
package/dist/index.js
CHANGED
|
@@ -41,9 +41,9 @@ __exportStar(require("./apps/evo-activity/zod-schemas"), exports);
|
|
|
41
41
|
__exportStar(require("./apps/evo-people/zod-schemas"), exports);
|
|
42
42
|
__exportStar(require("./apps/evo-crm/dic/zod-schemas"), exports);
|
|
43
43
|
__exportStar(require("./apps/evo-crm/lead/zod-schemas"), exports);
|
|
44
|
+
__exportStar(require("./apps/evo-chat/chatbee/zod-schemas"), exports);
|
|
44
45
|
__exportStar(require("./apps/evo-chat/contact/zod-schemas"), exports);
|
|
45
46
|
__exportStar(require("./apps/evo-chat/message/zod-schemas"), exports);
|
|
46
|
-
__exportStar(require("./apps/evo-chat/chatbee/zod-schemas"), exports);
|
|
47
47
|
__exportStar(require("./apps/evo-hub-ia/channel/zod-schemas"), exports);
|
|
48
48
|
__exportStar(require("./apps/evo-med/calendar/zod-schemas"), exports);
|
|
49
49
|
__exportStar(require("./apps/evo-med/appointment/zod-schemas"), exports);
|
package/dist/index.ts
CHANGED
|
@@ -26,9 +26,9 @@ export * from "./apps/evo-activity/zod-schemas";
|
|
|
26
26
|
export * from "./apps/evo-people/zod-schemas";
|
|
27
27
|
export * from "./apps/evo-crm/dic/zod-schemas";
|
|
28
28
|
export * from "./apps/evo-crm/lead/zod-schemas";
|
|
29
|
+
export * from "./apps/evo-chat/chatbee/zod-schemas";
|
|
29
30
|
export * from "./apps/evo-chat/contact/zod-schemas";
|
|
30
31
|
export * from "./apps/evo-chat/message/zod-schemas";
|
|
31
|
-
export * from "./apps/evo-chat/chatbee/zod-schemas";
|
|
32
32
|
export * from "./apps/evo-hub-ia/channel/zod-schemas";
|
|
33
33
|
export * from "./apps/evo-med/calendar/zod-schemas";
|
|
34
34
|
export * from "./apps/evo-med/appointment/zod-schemas";
|
|
@@ -1,11 +1,54 @@
|
|
|
1
1
|
import type { IHubIAConfig } from "../../evo-hub-ia/channel";
|
|
2
2
|
import { IFireDoc } from "../../shared";
|
|
3
3
|
export interface IChatBeeChannelConfig extends IFireDoc {
|
|
4
|
-
name
|
|
5
|
-
channel_id
|
|
6
|
-
number
|
|
7
|
-
type
|
|
8
|
-
channel_uuid
|
|
9
|
-
hub_ia
|
|
4
|
+
name?: string;
|
|
5
|
+
channel_id?: string;
|
|
6
|
+
number?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
channel_uuid?: string;
|
|
9
|
+
hub_ia?: IHubIAConfig;
|
|
10
10
|
[key: string]: unknown;
|
|
11
11
|
}
|
|
12
|
+
export interface IChatbeeChannel {
|
|
13
|
+
id?: string;
|
|
14
|
+
external_id?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IChatbeeDepartment {
|
|
18
|
+
external_id?: string;
|
|
19
|
+
id?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IChatbeeStatus {
|
|
23
|
+
external_id?: string;
|
|
24
|
+
id?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IChatbeeContact {
|
|
28
|
+
id?: string;
|
|
29
|
+
external_id?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
is_group?: string;
|
|
32
|
+
address?: string;
|
|
33
|
+
type?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface IChatbeeContactHistoryPayloadCreated {
|
|
36
|
+
department?: IChatbeeDepartment;
|
|
37
|
+
}
|
|
38
|
+
export interface IChatbeeContactHistoryPayloadClosed {
|
|
39
|
+
department?: IChatbeeDepartment;
|
|
40
|
+
status?: IChatbeeStatus;
|
|
41
|
+
}
|
|
42
|
+
export interface IChatbeeContactHistory {
|
|
43
|
+
id?: string;
|
|
44
|
+
channel_id?: string;
|
|
45
|
+
contact_id?: number;
|
|
46
|
+
department_id?: string;
|
|
47
|
+
department_name?: string;
|
|
48
|
+
created_at?: any;
|
|
49
|
+
history_id?: number;
|
|
50
|
+
payload_created?: IChatbeeContactHistoryPayloadCreated;
|
|
51
|
+
payload_closed?: IChatbeeContactHistoryPayloadClosed;
|
|
52
|
+
status_name?: string;
|
|
53
|
+
updated_at?: any;
|
|
54
|
+
}
|
|
@@ -3,11 +3,68 @@ import { IFireDoc } from "../../shared";
|
|
|
3
3
|
|
|
4
4
|
// ───────── ChatBee Channel Config ─────────
|
|
5
5
|
export interface IChatBeeChannelConfig extends IFireDoc {
|
|
6
|
-
name
|
|
7
|
-
channel_id
|
|
8
|
-
number
|
|
9
|
-
type
|
|
10
|
-
channel_uuid
|
|
11
|
-
hub_ia
|
|
6
|
+
name?: string; // Nome do canal
|
|
7
|
+
channel_id?: string; // ID do canal
|
|
8
|
+
number?: string; // Número do canal
|
|
9
|
+
type?: string; // Tipo do canal
|
|
10
|
+
channel_uuid?: string; // UUID do canal
|
|
11
|
+
hub_ia?: IHubIAConfig; // Configurações da HubIA para este canal
|
|
12
12
|
[key: string]: unknown; // index signature
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
// ───────── ChatBee Channel ─────────
|
|
16
|
+
export interface IChatbeeChannel {
|
|
17
|
+
id?: string;
|
|
18
|
+
external_id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// ───────── ChatBee Department ─────────
|
|
23
|
+
export interface IChatbeeDepartment {
|
|
24
|
+
external_id?: string;
|
|
25
|
+
id?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ───────── ChatBee Status ─────────
|
|
30
|
+
export interface IChatbeeStatus {
|
|
31
|
+
external_id?: string;
|
|
32
|
+
id?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ───────── ChatBee Contact ─────────
|
|
37
|
+
export interface IChatbeeContact {
|
|
38
|
+
id?: string;
|
|
39
|
+
external_id?: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
is_group?: string;
|
|
42
|
+
address?: string;
|
|
43
|
+
type?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Interface para payload_created
|
|
47
|
+
export interface IChatbeeContactHistoryPayloadCreated {
|
|
48
|
+
department?: IChatbeeDepartment;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Interface para payload_closed
|
|
52
|
+
export interface IChatbeeContactHistoryPayloadClosed {
|
|
53
|
+
department?: IChatbeeDepartment;
|
|
54
|
+
status?: IChatbeeStatus;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Interface para o histórico do contato
|
|
58
|
+
export interface IChatbeeContactHistory {
|
|
59
|
+
id?: string;
|
|
60
|
+
channel_id?: string;
|
|
61
|
+
contact_id?: number;
|
|
62
|
+
department_id?: string;
|
|
63
|
+
department_name?: string;
|
|
64
|
+
created_at?: any;
|
|
65
|
+
history_id?: number;
|
|
66
|
+
payload_created?: IChatbeeContactHistoryPayloadCreated;
|
|
67
|
+
payload_closed?: IChatbeeContactHistoryPayloadClosed;
|
|
68
|
+
status_name?: string;
|
|
69
|
+
updated_at?: any;
|
|
70
|
+
}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import { FirestoreDocumentReference, IFireDoc, ITag } from "../../shared";
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
external_id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
export interface IChatbeeContact {
|
|
8
|
-
id: string;
|
|
9
|
-
external_id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
is_group: string;
|
|
12
|
-
address: string;
|
|
13
|
-
type: string;
|
|
14
|
-
}
|
|
2
|
+
import { IChatbeeChannel, IChatbeeContact, IChatbeeContactHistory } from "../chatbee";
|
|
15
3
|
export interface IChatContact extends IFireDoc {
|
|
16
4
|
channel?: IChatbeeChannel | null;
|
|
17
5
|
contact?: IChatbeeContact | null;
|
|
18
6
|
lead_id?: string | null;
|
|
19
7
|
lead_ref?: FirestoreDocumentReference | null;
|
|
8
|
+
histories?: IChatbeeContactHistory[];
|
|
9
|
+
ai_active?: boolean;
|
|
10
|
+
hub_ia_action?: string;
|
|
11
|
+
hub_ia_status?: string;
|
|
12
|
+
hub_ia_suggestion?: string;
|
|
13
|
+
hub_ia_action_suggestion?: string;
|
|
14
|
+
hub_ia_mode?: string;
|
|
20
15
|
tags?: ITag[] | null;
|
|
21
16
|
userRef?: FirestoreDocumentReference;
|
|
22
17
|
[key: string]: unknown;
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { FirestoreDocumentReference, IFireDoc, ITag } from "../../shared";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface IChatbeeContact {
|
|
10
|
-
id: string;
|
|
11
|
-
external_id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
is_group: string;
|
|
14
|
-
address: string;
|
|
15
|
-
type: string;
|
|
16
|
-
}
|
|
2
|
+
import {
|
|
3
|
+
IChatbeeChannel,
|
|
4
|
+
IChatbeeContact,
|
|
5
|
+
IChatbeeContactHistory,
|
|
6
|
+
} from "../chatbee";
|
|
17
7
|
|
|
18
8
|
export interface IChatContact extends IFireDoc {
|
|
19
9
|
channel?: IChatbeeChannel | null;
|
|
20
10
|
contact?: IChatbeeContact | null;
|
|
21
11
|
lead_id?: string | null;
|
|
22
12
|
lead_ref?: FirestoreDocumentReference | null;
|
|
13
|
+
histories?: IChatbeeContactHistory[]; // Lista de históricos (opcional)
|
|
14
|
+
ai_active?: boolean; // Se o atendimento por IA está ativo
|
|
15
|
+
hub_ia_action?: string; // Qual ação a IA está fazendo
|
|
16
|
+
hub_ia_status?: string; // processing / done
|
|
17
|
+
hub_ia_suggestion?: string; // Sugestão de resposta
|
|
18
|
+
hub_ia_action_suggestion?: string; // Sugestão de ação da IA
|
|
19
|
+
hub_ia_mode?: string; // reply, suggestion
|
|
23
20
|
tags?: ITag[] | null;
|
|
24
21
|
userRef?: FirestoreDocumentReference;
|
|
25
22
|
[key: string]: unknown; // index signature
|