evo360-types 1.3.292 → 1.3.296
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/channel/zod-schemas.d.ts +129 -0
- package/dist/apps/evo-chat/channel/zod-schemas.js +26 -0
- package/dist/apps/evo-chat/channel/zod-schemas.ts +25 -0
- package/dist/apps/evo-chat/contact/zod-schemas.d.ts +12 -0
- package/dist/apps/evo-chat/contact/zod-schemas.js +5 -0
- package/dist/apps/evo-chat/contact/zod-schemas.ts +5 -0
- package/dist/apps/evo-chat/thread/zod-schemas.d.ts +99 -0
- package/dist/apps/evo-chat/thread/zod-schemas.js +25 -0
- package/dist/apps/evo-chat/thread/zod-schemas.ts +24 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.d.ts +522 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.js +72 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.ts +74 -0
- package/dist/apps/evo-chat/ticket/zod-schemas.d.ts +202 -0
- package/dist/apps/evo-chat/ticket/zod-schemas.js +39 -0
- package/dist/apps/evo-chat/ticket/zod-schemas.ts +39 -0
- package/dist/apps/evo-crm/dic/zod-schemas.d.ts +3 -0
- package/dist/apps/evo-crm/dic/zod-schemas.js +1 -0
- package/dist/apps/evo-crm/dic/zod-schemas.ts +1 -0
- package/dist/apps/evo-notif-user/zod-schemas.d.ts +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.ts +4 -0
- package/dist/types/evo-chat/channel/index.d.ts +25 -0
- package/dist/types/evo-chat/channel/index.js +2 -0
- package/dist/types/evo-chat/channel/index.ts +36 -0
- package/dist/types/evo-chat/contact/index.d.ts +4 -0
- package/dist/types/evo-chat/contact/index.ts +7 -0
- package/dist/types/evo-chat/fb_collections.d.ts +4 -0
- package/dist/types/evo-chat/fb_collections.js +6 -1
- package/dist/types/evo-chat/fb_collections.ts +6 -0
- package/dist/types/evo-chat/index.d.ts +7 -0
- package/dist/types/evo-chat/index.js +7 -0
- package/dist/types/evo-chat/index.ts +7 -0
- package/dist/types/evo-chat/thread/index.d.ts +20 -0
- package/dist/types/evo-chat/thread/index.js +2 -0
- package/dist/types/evo-chat/thread/index.ts +35 -0
- package/dist/types/evo-chat/thread-message/index.d.ts +99 -0
- package/dist/types/evo-chat/thread-message/index.js +2 -0
- package/dist/types/evo-chat/thread-message/index.ts +130 -0
- package/dist/types/evo-chat/ticket/index.d.ts +35 -0
- package/dist/types/evo-chat/ticket/index.js +2 -0
- package/dist/types/evo-chat/ticket/index.ts +56 -0
- package/dist/types/evo-crm/dic/index.d.ts +1 -0
- package/dist/types/evo-crm/dic/index.ts +1 -0
- package/dist/types/evo-finops/common/billing.js +1 -1
- package/dist/types/evo-finops/common/billing.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const zTicketCloseSchema: z.ZodObject<{
|
|
3
|
+
base: z.ZodString;
|
|
4
|
+
label: z.ZodString;
|
|
5
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
6
|
+
closed_by_user_id: z.ZodString;
|
|
7
|
+
closed_at: z.ZodDate;
|
|
8
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
9
|
+
base: z.ZodString;
|
|
10
|
+
label: z.ZodString;
|
|
11
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
12
|
+
closed_by_user_id: z.ZodString;
|
|
13
|
+
closed_at: z.ZodDate;
|
|
14
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
15
|
+
base: z.ZodString;
|
|
16
|
+
label: z.ZodString;
|
|
17
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
18
|
+
closed_by_user_id: z.ZodString;
|
|
19
|
+
closed_at: z.ZodDate;
|
|
20
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
21
|
+
export declare const zTicketCreatedBySchema: z.ZodObject<{
|
|
22
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
23
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
24
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
26
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
27
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
28
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
30
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
31
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
34
|
+
export declare const zTicketSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
ref: z.ZodAny;
|
|
37
|
+
tenant: z.ZodString;
|
|
38
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
39
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
40
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
41
|
+
} & {
|
|
42
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
contact_id: z.ZodString;
|
|
44
|
+
thread_id: z.ZodString;
|
|
45
|
+
lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
department_id: z.ZodString;
|
|
47
|
+
status: z.ZodEnum<["open", "closed"]>;
|
|
48
|
+
channel_ids: z.ZodArray<z.ZodString, "many">;
|
|
49
|
+
close: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
base: z.ZodString;
|
|
51
|
+
label: z.ZodString;
|
|
52
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
53
|
+
closed_by_user_id: z.ZodString;
|
|
54
|
+
closed_at: z.ZodDate;
|
|
55
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
56
|
+
base: z.ZodString;
|
|
57
|
+
label: z.ZodString;
|
|
58
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
59
|
+
closed_by_user_id: z.ZodString;
|
|
60
|
+
closed_at: z.ZodDate;
|
|
61
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
62
|
+
base: z.ZodString;
|
|
63
|
+
label: z.ZodString;
|
|
64
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
65
|
+
closed_by_user_id: z.ZodString;
|
|
66
|
+
closed_at: z.ZodDate;
|
|
67
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
68
|
+
system_status: z.ZodOptional<z.ZodEnum<["normal", "moved"]>>;
|
|
69
|
+
quality_indicator: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
70
|
+
message_count: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
last_message_id: z.ZodOptional<z.ZodString>;
|
|
72
|
+
last_message_at: z.ZodOptional<z.ZodDate>;
|
|
73
|
+
last_inbound_at: z.ZodOptional<z.ZodDate>;
|
|
74
|
+
last_message_preview: z.ZodOptional<z.ZodString>;
|
|
75
|
+
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
76
|
+
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
created_by: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
79
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
80
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
82
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
83
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
84
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
86
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
87
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
88
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
90
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
ref: z.ZodAny;
|
|
93
|
+
tenant: z.ZodString;
|
|
94
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
95
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
96
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
97
|
+
} & {
|
|
98
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
99
|
+
contact_id: z.ZodString;
|
|
100
|
+
thread_id: z.ZodString;
|
|
101
|
+
lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
department_id: z.ZodString;
|
|
103
|
+
status: z.ZodEnum<["open", "closed"]>;
|
|
104
|
+
channel_ids: z.ZodArray<z.ZodString, "many">;
|
|
105
|
+
close: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
base: z.ZodString;
|
|
107
|
+
label: z.ZodString;
|
|
108
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
109
|
+
closed_by_user_id: z.ZodString;
|
|
110
|
+
closed_at: z.ZodDate;
|
|
111
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
112
|
+
base: z.ZodString;
|
|
113
|
+
label: z.ZodString;
|
|
114
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
115
|
+
closed_by_user_id: z.ZodString;
|
|
116
|
+
closed_at: z.ZodDate;
|
|
117
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
118
|
+
base: z.ZodString;
|
|
119
|
+
label: z.ZodString;
|
|
120
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
121
|
+
closed_by_user_id: z.ZodString;
|
|
122
|
+
closed_at: z.ZodDate;
|
|
123
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
124
|
+
system_status: z.ZodOptional<z.ZodEnum<["normal", "moved"]>>;
|
|
125
|
+
quality_indicator: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
126
|
+
message_count: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
last_message_id: z.ZodOptional<z.ZodString>;
|
|
128
|
+
last_message_at: z.ZodOptional<z.ZodDate>;
|
|
129
|
+
last_inbound_at: z.ZodOptional<z.ZodDate>;
|
|
130
|
+
last_message_preview: z.ZodOptional<z.ZodString>;
|
|
131
|
+
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
132
|
+
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
|
+
created_by: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
135
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
136
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
138
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
139
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
140
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
142
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
143
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
144
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
146
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
ref: z.ZodAny;
|
|
149
|
+
tenant: z.ZodString;
|
|
150
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
151
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
152
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
153
|
+
} & {
|
|
154
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
155
|
+
contact_id: z.ZodString;
|
|
156
|
+
thread_id: z.ZodString;
|
|
157
|
+
lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
department_id: z.ZodString;
|
|
159
|
+
status: z.ZodEnum<["open", "closed"]>;
|
|
160
|
+
channel_ids: z.ZodArray<z.ZodString, "many">;
|
|
161
|
+
close: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
base: z.ZodString;
|
|
163
|
+
label: z.ZodString;
|
|
164
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
165
|
+
closed_by_user_id: z.ZodString;
|
|
166
|
+
closed_at: z.ZodDate;
|
|
167
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
168
|
+
base: z.ZodString;
|
|
169
|
+
label: z.ZodString;
|
|
170
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
171
|
+
closed_by_user_id: z.ZodString;
|
|
172
|
+
closed_at: z.ZodDate;
|
|
173
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
174
|
+
base: z.ZodString;
|
|
175
|
+
label: z.ZodString;
|
|
176
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
177
|
+
closed_by_user_id: z.ZodString;
|
|
178
|
+
closed_at: z.ZodDate;
|
|
179
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
180
|
+
system_status: z.ZodOptional<z.ZodEnum<["normal", "moved"]>>;
|
|
181
|
+
quality_indicator: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
182
|
+
message_count: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
last_message_id: z.ZodOptional<z.ZodString>;
|
|
184
|
+
last_message_at: z.ZodOptional<z.ZodDate>;
|
|
185
|
+
last_inbound_at: z.ZodOptional<z.ZodDate>;
|
|
186
|
+
last_message_preview: z.ZodOptional<z.ZodString>;
|
|
187
|
+
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
188
|
+
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
+
created_by: z.ZodOptional<z.ZodObject<{
|
|
190
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
191
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
192
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
193
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
194
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
195
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
196
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
198
|
+
type: z.ZodEnum<["human", "automation", "system"]>;
|
|
199
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
200
|
+
workflow_id: z.ZodOptional<z.ZodString>;
|
|
201
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
202
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.zTicketSchema = exports.zTicketCreatedBySchema = exports.zTicketCloseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
|
+
exports.zTicketCloseSchema = zod_1.z.object({
|
|
7
|
+
base: zod_1.z.string(),
|
|
8
|
+
label: zod_1.z.string(),
|
|
9
|
+
notes: zod_1.z.string().optional(),
|
|
10
|
+
closed_by_user_id: zod_1.z.string(),
|
|
11
|
+
closed_at: zod_1.z.coerce.date(),
|
|
12
|
+
}).passthrough();
|
|
13
|
+
exports.zTicketCreatedBySchema = zod_1.z.object({
|
|
14
|
+
type: zod_1.z.enum(['human', 'automation', 'system']),
|
|
15
|
+
user_id: zod_1.z.string().optional(),
|
|
16
|
+
workflow_id: zod_1.z.string().optional(),
|
|
17
|
+
}).passthrough();
|
|
18
|
+
exports.zTicketSchema = zod_schemas_1.zFireDocSchema
|
|
19
|
+
.extend({
|
|
20
|
+
model_ver: zod_1.z.number().default(1),
|
|
21
|
+
contact_id: zod_1.z.string(),
|
|
22
|
+
thread_id: zod_1.z.string(),
|
|
23
|
+
lead_id: zod_1.z.string().nullable().optional(),
|
|
24
|
+
department_id: zod_1.z.string(),
|
|
25
|
+
status: zod_1.z.enum(['open', 'closed']),
|
|
26
|
+
channel_ids: zod_1.z.array(zod_1.z.string()),
|
|
27
|
+
close: exports.zTicketCloseSchema.optional(),
|
|
28
|
+
system_status: zod_1.z.enum(['normal', 'moved']).optional(),
|
|
29
|
+
quality_indicator: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
30
|
+
message_count: zod_1.z.number().optional(),
|
|
31
|
+
last_message_id: zod_1.z.string().optional(),
|
|
32
|
+
last_message_at: zod_1.z.coerce.date().optional(),
|
|
33
|
+
last_inbound_at: zod_1.z.coerce.date().optional(),
|
|
34
|
+
last_message_preview: zod_1.z.string().optional(),
|
|
35
|
+
last_message_channel_id: zod_1.z.string().optional(),
|
|
36
|
+
assigned_user_id: zod_1.z.string().nullable().optional(),
|
|
37
|
+
created_by: exports.zTicketCreatedBySchema.optional(),
|
|
38
|
+
})
|
|
39
|
+
.passthrough();
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { zFireDocSchema } from "../../shared/zod-schemas";
|
|
3
|
+
|
|
4
|
+
export const zTicketCloseSchema = z.object({
|
|
5
|
+
base: z.string(),
|
|
6
|
+
label: z.string(),
|
|
7
|
+
notes: z.string().optional(),
|
|
8
|
+
closed_by_user_id: z.string(),
|
|
9
|
+
closed_at: z.coerce.date(),
|
|
10
|
+
}).passthrough();
|
|
11
|
+
|
|
12
|
+
export const zTicketCreatedBySchema = z.object({
|
|
13
|
+
type: z.enum(['human', 'automation', 'system']),
|
|
14
|
+
user_id: z.string().optional(),
|
|
15
|
+
workflow_id: z.string().optional(),
|
|
16
|
+
}).passthrough();
|
|
17
|
+
|
|
18
|
+
export const zTicketSchema = zFireDocSchema
|
|
19
|
+
.extend({
|
|
20
|
+
model_ver: z.number().default(1),
|
|
21
|
+
contact_id: z.string(),
|
|
22
|
+
thread_id: z.string(),
|
|
23
|
+
lead_id: z.string().nullable().optional(),
|
|
24
|
+
department_id: z.string(),
|
|
25
|
+
status: z.enum(['open', 'closed']),
|
|
26
|
+
channel_ids: z.array(z.string()),
|
|
27
|
+
close: zTicketCloseSchema.optional(),
|
|
28
|
+
system_status: z.enum(['normal', 'moved']).optional(),
|
|
29
|
+
quality_indicator: z.union([z.number(), z.string()]).optional(),
|
|
30
|
+
message_count: z.number().optional(),
|
|
31
|
+
last_message_id: z.string().optional(),
|
|
32
|
+
last_message_at: z.coerce.date().optional(),
|
|
33
|
+
last_inbound_at: z.coerce.date().optional(),
|
|
34
|
+
last_message_preview: z.string().optional(),
|
|
35
|
+
last_message_channel_id: z.string().optional(),
|
|
36
|
+
assigned_user_id: z.string().nullable().optional(),
|
|
37
|
+
created_by: zTicketCreatedBySchema.optional(),
|
|
38
|
+
})
|
|
39
|
+
.passthrough();
|
|
@@ -204,6 +204,7 @@ export declare const zQualificationSchema: z.ZodObject<{
|
|
|
204
204
|
name: z.ZodString;
|
|
205
205
|
funnelLevel: z.ZodEnum<["invalid", "new", "trying_contact", "contacted", "qualifying", "qualified", "disqualified", "presented", "proposal_sent", "negotiating", "won", "lost", "waiting_reply", "follow_up_later"]>;
|
|
206
206
|
hide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
207
|
+
funnelHide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
207
208
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
208
209
|
name: z.ZodString;
|
|
209
210
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -236,6 +237,7 @@ export declare const zQualificationSchema: z.ZodObject<{
|
|
|
236
237
|
name: z.ZodString;
|
|
237
238
|
funnelLevel: z.ZodEnum<["invalid", "new", "trying_contact", "contacted", "qualifying", "qualified", "disqualified", "presented", "proposal_sent", "negotiating", "won", "lost", "waiting_reply", "follow_up_later"]>;
|
|
238
239
|
hide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
240
|
+
funnelHide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
239
241
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
240
242
|
name: z.ZodString;
|
|
241
243
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -268,6 +270,7 @@ export declare const zQualificationSchema: z.ZodObject<{
|
|
|
268
270
|
name: z.ZodString;
|
|
269
271
|
funnelLevel: z.ZodEnum<["invalid", "new", "trying_contact", "contacted", "qualifying", "qualified", "disqualified", "presented", "proposal_sent", "negotiating", "won", "lost", "waiting_reply", "follow_up_later"]>;
|
|
270
272
|
hide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
273
|
+
funnelHide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
271
274
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
272
275
|
name: z.ZodString;
|
|
273
276
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -42,6 +42,7 @@ exports.zQualificationSchema = zod_schemas_1.zFireDocSchema
|
|
|
42
42
|
name: zod_1.z.string().min(1).max(255),
|
|
43
43
|
funnelLevel: exports.zQualificationFunnelLevelSchema,
|
|
44
44
|
hide: zod_1.z.boolean().optional().default(false),
|
|
45
|
+
funnelHide: zod_1.z.boolean().optional().default(false),
|
|
45
46
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
46
47
|
})
|
|
47
48
|
.passthrough();
|
|
@@ -43,6 +43,7 @@ export const zQualificationSchema = zFireDocSchema
|
|
|
43
43
|
name: z.string().min(1).max(255),
|
|
44
44
|
funnelLevel: zQualificationFunnelLevelSchema,
|
|
45
45
|
hide: z.boolean().optional().default(false),
|
|
46
|
+
funnelHide: z.boolean().optional().default(false),
|
|
46
47
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
47
48
|
})
|
|
48
49
|
.passthrough();
|
|
@@ -377,9 +377,9 @@ export declare const zCreateNotifUserInputSchema: z.ZodObject<{
|
|
|
377
377
|
display_name: string;
|
|
378
378
|
};
|
|
379
379
|
title: string;
|
|
380
|
+
body: string;
|
|
380
381
|
category: string;
|
|
381
382
|
userId: string;
|
|
382
|
-
body: string;
|
|
383
383
|
source?: {
|
|
384
384
|
module: string;
|
|
385
385
|
event: string;
|
|
@@ -410,9 +410,9 @@ export declare const zCreateNotifUserInputSchema: z.ZodObject<{
|
|
|
410
410
|
display_name: string;
|
|
411
411
|
};
|
|
412
412
|
title: string;
|
|
413
|
+
body: string;
|
|
413
414
|
category: string;
|
|
414
415
|
userId: string;
|
|
415
|
-
body: string;
|
|
416
416
|
source?: {
|
|
417
417
|
module: string;
|
|
418
418
|
event: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ export * from "./apps/evo-crm/lead/zod-schemas";
|
|
|
32
32
|
export * from "./apps/evo-chat/chatbee/zod-schemas";
|
|
33
33
|
export * from "./apps/evo-chat/contact/zod-schemas";
|
|
34
34
|
export * from "./apps/evo-chat/message/zod-schemas";
|
|
35
|
+
export * from "./apps/evo-chat/channel/zod-schemas";
|
|
36
|
+
export * from "./apps/evo-chat/thread/zod-schemas";
|
|
37
|
+
export * from "./apps/evo-chat/thread-message/zod-schemas";
|
|
38
|
+
export * from "./apps/evo-chat/ticket/zod-schemas";
|
|
35
39
|
export * from "./apps/evo-hub-ia/channel/zod-schemas";
|
|
36
40
|
export * from "./apps/evo-med/calendar/zod-schemas";
|
|
37
41
|
export * from "./apps/evo-med/appointment/zod-schemas";
|
package/dist/index.js
CHANGED
|
@@ -50,6 +50,10 @@ __exportStar(require("./apps/evo-crm/lead/zod-schemas"), exports);
|
|
|
50
50
|
__exportStar(require("./apps/evo-chat/chatbee/zod-schemas"), exports);
|
|
51
51
|
__exportStar(require("./apps/evo-chat/contact/zod-schemas"), exports);
|
|
52
52
|
__exportStar(require("./apps/evo-chat/message/zod-schemas"), exports);
|
|
53
|
+
__exportStar(require("./apps/evo-chat/channel/zod-schemas"), exports);
|
|
54
|
+
__exportStar(require("./apps/evo-chat/thread/zod-schemas"), exports);
|
|
55
|
+
__exportStar(require("./apps/evo-chat/thread-message/zod-schemas"), exports);
|
|
56
|
+
__exportStar(require("./apps/evo-chat/ticket/zod-schemas"), exports);
|
|
53
57
|
__exportStar(require("./apps/evo-hub-ia/channel/zod-schemas"), exports);
|
|
54
58
|
__exportStar(require("./apps/evo-med/calendar/zod-schemas"), exports);
|
|
55
59
|
__exportStar(require("./apps/evo-med/appointment/zod-schemas"), exports);
|
package/dist/index.ts
CHANGED
|
@@ -35,6 +35,10 @@ export * from "./apps/evo-crm/lead/zod-schemas";
|
|
|
35
35
|
export * from "./apps/evo-chat/chatbee/zod-schemas";
|
|
36
36
|
export * from "./apps/evo-chat/contact/zod-schemas";
|
|
37
37
|
export * from "./apps/evo-chat/message/zod-schemas";
|
|
38
|
+
export * from "./apps/evo-chat/channel/zod-schemas";
|
|
39
|
+
export * from "./apps/evo-chat/thread/zod-schemas";
|
|
40
|
+
export * from "./apps/evo-chat/thread-message/zod-schemas";
|
|
41
|
+
export * from "./apps/evo-chat/ticket/zod-schemas";
|
|
38
42
|
export * from "./apps/evo-hub-ia/channel/zod-schemas";
|
|
39
43
|
export * from "./apps/evo-med/calendar/zod-schemas";
|
|
40
44
|
export * from "./apps/evo-med/appointment/zod-schemas";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IHubIAConfig } from "../../evo-hub-ia/channel";
|
|
2
|
+
import { IFireDoc } from "../../shared";
|
|
3
|
+
export type ChannelProvider = 'chatbee' | 'hub-waba';
|
|
4
|
+
export type ChannelType = 'waba' | 'instagram' | 'telegram' | 'email' | 'sms';
|
|
5
|
+
export type ChannelStatus = 'active' | 'paused' | 'disabled';
|
|
6
|
+
export interface IChannelProviderRef {
|
|
7
|
+
channel_id?: string;
|
|
8
|
+
channel_uuid?: string;
|
|
9
|
+
waba_id?: string;
|
|
10
|
+
phone_number_id?: string;
|
|
11
|
+
business_id?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IChannel extends IFireDoc {
|
|
14
|
+
model_ver: number;
|
|
15
|
+
provider: ChannelProvider | string;
|
|
16
|
+
type: ChannelType | string;
|
|
17
|
+
name: string;
|
|
18
|
+
number?: string;
|
|
19
|
+
company_id?: string;
|
|
20
|
+
default_department_id: string;
|
|
21
|
+
status: ChannelStatus;
|
|
22
|
+
provider_ref: IChannelProviderRef;
|
|
23
|
+
hub_ia?: IHubIAConfig;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { IHubIAConfig } from "../../evo-hub-ia/channel";
|
|
2
|
+
import { IFireDoc } from "../../shared";
|
|
3
|
+
|
|
4
|
+
// ── Channel provider/type enums ──
|
|
5
|
+
|
|
6
|
+
export type ChannelProvider = 'chatbee' | 'hub-waba';
|
|
7
|
+
export type ChannelType = 'waba' | 'instagram' | 'telegram' | 'email' | 'sms';
|
|
8
|
+
export type ChannelStatus = 'active' | 'paused' | 'disabled';
|
|
9
|
+
|
|
10
|
+
// ── Provider-specific references ──
|
|
11
|
+
|
|
12
|
+
export interface IChannelProviderRef {
|
|
13
|
+
// chatbee
|
|
14
|
+
channel_id?: string;
|
|
15
|
+
channel_uuid?: string;
|
|
16
|
+
// hub-waba
|
|
17
|
+
waba_id?: string;
|
|
18
|
+
phone_number_id?: string;
|
|
19
|
+
business_id?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// ── Channel (evo-chat v3) ──
|
|
23
|
+
|
|
24
|
+
export interface IChannel extends IFireDoc {
|
|
25
|
+
model_ver: number;
|
|
26
|
+
provider: ChannelProvider | string;
|
|
27
|
+
type: ChannelType | string;
|
|
28
|
+
name: string;
|
|
29
|
+
number?: string;
|
|
30
|
+
company_id?: string;
|
|
31
|
+
default_department_id: string;
|
|
32
|
+
status: ChannelStatus;
|
|
33
|
+
provider_ref: IChannelProviderRef;
|
|
34
|
+
hub_ia?: IHubIAConfig;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
@@ -17,5 +17,9 @@ export interface IChatContact extends IFireDoc {
|
|
|
17
17
|
hub_ia_mode?: string;
|
|
18
18
|
tags?: ITag[] | null;
|
|
19
19
|
userRef?: FirestoreDocumentReference;
|
|
20
|
+
bsuid?: string | null;
|
|
21
|
+
wa_id?: string | null;
|
|
22
|
+
provider?: 'chatbee' | 'hub-waba' | string;
|
|
23
|
+
channel_ids?: string[];
|
|
20
24
|
[key: string]: unknown;
|
|
21
25
|
}
|
|
@@ -22,5 +22,12 @@ export interface IChatContact extends IFireDoc {
|
|
|
22
22
|
hub_ia_mode?: string; // reply, suggestion
|
|
23
23
|
tags?: ITag[] | null;
|
|
24
24
|
userRef?: FirestoreDocumentReference;
|
|
25
|
+
|
|
26
|
+
// ── hub-waba fields (optional — backward compatible) ──
|
|
27
|
+
bsuid?: string | null;
|
|
28
|
+
wa_id?: string | null;
|
|
29
|
+
provider?: 'chatbee' | 'hub-waba' | string;
|
|
30
|
+
channel_ids?: string[];
|
|
31
|
+
|
|
25
32
|
[key: string]: unknown; // index signature
|
|
26
33
|
}
|
|
@@ -3,3 +3,7 @@ export declare const CONTACTS_COLLECTION = "contacts";
|
|
|
3
3
|
export declare const PROTOCOLS_COLLECTION = "protocols";
|
|
4
4
|
export declare const HSM_MESSAGES_COLLECTION = "hsm-messages";
|
|
5
5
|
export declare const CHATBEE_CHANNELS_COLLECTION = "chatbee-channels";
|
|
6
|
+
export declare const CHANNELS_COLLECTION = "channels";
|
|
7
|
+
export declare const THREADS_COLLECTION = "threads";
|
|
8
|
+
export declare const THREAD_MESSAGES_COLLECTION = "messages";
|
|
9
|
+
export declare const TICKETS_COLLECTION = "tickets";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHATBEE_CHANNELS_COLLECTION = exports.HSM_MESSAGES_COLLECTION = exports.PROTOCOLS_COLLECTION = exports.CONTACTS_COLLECTION = exports.EVO_CHAT_APP = void 0;
|
|
3
|
+
exports.TICKETS_COLLECTION = exports.THREAD_MESSAGES_COLLECTION = exports.THREADS_COLLECTION = exports.CHANNELS_COLLECTION = exports.CHATBEE_CHANNELS_COLLECTION = exports.HSM_MESSAGES_COLLECTION = exports.PROTOCOLS_COLLECTION = exports.CONTACTS_COLLECTION = exports.EVO_CHAT_APP = void 0;
|
|
4
4
|
//EVO Chat Application Doc
|
|
5
5
|
exports.EVO_CHAT_APP = "evo-chat";
|
|
6
6
|
//contacts collection
|
|
@@ -11,3 +11,8 @@ exports.PROTOCOLS_COLLECTION = "protocols";
|
|
|
11
11
|
exports.HSM_MESSAGES_COLLECTION = "hsm-messages";
|
|
12
12
|
//chatbee-channels collection
|
|
13
13
|
exports.CHATBEE_CHANNELS_COLLECTION = "chatbee-channels";
|
|
14
|
+
// ── hub-waba / evo-chat v3 collections ──
|
|
15
|
+
exports.CHANNELS_COLLECTION = "channels";
|
|
16
|
+
exports.THREADS_COLLECTION = "threads";
|
|
17
|
+
exports.THREAD_MESSAGES_COLLECTION = "messages"; // subcollection de threads
|
|
18
|
+
exports.TICKETS_COLLECTION = "tickets";
|
|
@@ -12,3 +12,9 @@ export const HSM_MESSAGES_COLLECTION = "hsm-messages";
|
|
|
12
12
|
|
|
13
13
|
//chatbee-channels collection
|
|
14
14
|
export const CHATBEE_CHANNELS_COLLECTION = "chatbee-channels";
|
|
15
|
+
|
|
16
|
+
// ── hub-waba / evo-chat v3 collections ──
|
|
17
|
+
export const CHANNELS_COLLECTION = "channels";
|
|
18
|
+
export const THREADS_COLLECTION = "threads";
|
|
19
|
+
export const THREAD_MESSAGES_COLLECTION = "messages"; // subcollection de threads
|
|
20
|
+
export const TICKETS_COLLECTION = "tickets";
|
|
@@ -2,8 +2,15 @@ export * from "./fb_collections";
|
|
|
2
2
|
export * from "./contact";
|
|
3
3
|
export * from "./message";
|
|
4
4
|
export * from "./chatbee";
|
|
5
|
+
export * from "./channel";
|
|
6
|
+
export * from "./thread";
|
|
7
|
+
export * from "./thread-message";
|
|
8
|
+
export * from "./ticket";
|
|
5
9
|
export declare const EvoChatPermissions: {
|
|
6
10
|
readonly Read: "evo_chat_read";
|
|
7
11
|
readonly Write: "evo_chat_write";
|
|
12
|
+
readonly InboxManage: "evo_chat_inbox_manage";
|
|
13
|
+
readonly TicketClose: "evo_chat_ticket_close";
|
|
14
|
+
readonly TicketTransfer: "evo_chat_ticket_transfer";
|
|
8
15
|
};
|
|
9
16
|
export type EvoChatPermissions = (typeof EvoChatPermissions)[keyof typeof EvoChatPermissions];
|
|
@@ -19,8 +19,15 @@ __exportStar(require("./fb_collections"), exports);
|
|
|
19
19
|
__exportStar(require("./contact"), exports);
|
|
20
20
|
__exportStar(require("./message"), exports);
|
|
21
21
|
__exportStar(require("./chatbee"), exports);
|
|
22
|
+
__exportStar(require("./channel"), exports);
|
|
23
|
+
__exportStar(require("./thread"), exports);
|
|
24
|
+
__exportStar(require("./thread-message"), exports);
|
|
25
|
+
__exportStar(require("./ticket"), exports);
|
|
22
26
|
// Permissões para o evo-chat
|
|
23
27
|
exports.EvoChatPermissions = {
|
|
24
28
|
Read: "evo_chat_read",
|
|
25
29
|
Write: "evo_chat_write",
|
|
30
|
+
InboxManage: "evo_chat_inbox_manage",
|
|
31
|
+
TicketClose: "evo_chat_ticket_close",
|
|
32
|
+
TicketTransfer: "evo_chat_ticket_transfer",
|
|
26
33
|
};
|
|
@@ -2,11 +2,18 @@ export * from "./fb_collections";
|
|
|
2
2
|
export * from "./contact";
|
|
3
3
|
export * from "./message";
|
|
4
4
|
export * from "./chatbee";
|
|
5
|
+
export * from "./channel";
|
|
6
|
+
export * from "./thread";
|
|
7
|
+
export * from "./thread-message";
|
|
8
|
+
export * from "./ticket";
|
|
5
9
|
|
|
6
10
|
// Permissões para o evo-chat
|
|
7
11
|
export const EvoChatPermissions = {
|
|
8
12
|
Read: "evo_chat_read",
|
|
9
13
|
Write: "evo_chat_write",
|
|
14
|
+
InboxManage: "evo_chat_inbox_manage",
|
|
15
|
+
TicketClose: "evo_chat_ticket_close",
|
|
16
|
+
TicketTransfer: "evo_chat_ticket_transfer",
|
|
10
17
|
} as const;
|
|
11
18
|
|
|
12
19
|
export type EvoChatPermissions =
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IFireDoc } from "../../shared";
|
|
2
|
+
export interface IConversationWindow {
|
|
3
|
+
expires_at: Date;
|
|
4
|
+
is_open: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IThread extends IFireDoc {
|
|
7
|
+
model_ver: number;
|
|
8
|
+
contact_id: string;
|
|
9
|
+
lead_id?: string | null;
|
|
10
|
+
channel_ids: string[];
|
|
11
|
+
providers: string[];
|
|
12
|
+
open_ticket_id?: string | null;
|
|
13
|
+
last_message_at?: Date;
|
|
14
|
+
last_inbound_at?: Date;
|
|
15
|
+
last_message_preview?: string;
|
|
16
|
+
last_message_type?: string;
|
|
17
|
+
last_message_channel_id?: string;
|
|
18
|
+
conversation_windows?: Record<string, IConversationWindow>;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IFireDoc } from "../../shared";
|
|
2
|
+
|
|
3
|
+
// ── Conversation window per channel ──
|
|
4
|
+
|
|
5
|
+
export interface IConversationWindow {
|
|
6
|
+
expires_at: Date;
|
|
7
|
+
is_open: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// ── Thread (evo-chat v3 — omnichannel) ──
|
|
11
|
+
|
|
12
|
+
export interface IThread extends IFireDoc {
|
|
13
|
+
model_ver: number;
|
|
14
|
+
contact_id: string;
|
|
15
|
+
lead_id?: string | null;
|
|
16
|
+
|
|
17
|
+
// Active channels in this thread
|
|
18
|
+
channel_ids: string[];
|
|
19
|
+
providers: string[];
|
|
20
|
+
|
|
21
|
+
// Active ticket
|
|
22
|
+
open_ticket_id?: string | null;
|
|
23
|
+
|
|
24
|
+
// Last message snapshot
|
|
25
|
+
last_message_at?: Date;
|
|
26
|
+
last_inbound_at?: Date;
|
|
27
|
+
last_message_preview?: string;
|
|
28
|
+
last_message_type?: string;
|
|
29
|
+
last_message_channel_id?: string;
|
|
30
|
+
|
|
31
|
+
// Conversation windows (key = channelId)
|
|
32
|
+
conversation_windows?: Record<string, IConversationWindow>;
|
|
33
|
+
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|