evo360-types 1.3.685 → 1.3.690
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/inbox/zod-schemas.d.ts +18 -0
- package/dist/apps/evo-chat/inbox/zod-schemas.js +7 -0
- package/dist/apps/evo-chat/inbox/zod-schemas.ts +7 -0
- package/dist/apps/evo-chat/ticket/zod-schemas.d.ts +9 -0
- package/dist/apps/evo-chat/ticket/zod-schemas.js +4 -0
- package/dist/apps/evo-chat/ticket/zod-schemas.ts +4 -0
- package/dist/apps/evo-crm/lead/zod-schemas.d.ts +9 -0
- package/dist/apps/evo-crm/lead/zod-schemas.js +6 -1
- package/dist/apps/evo-crm/lead/zod-schemas.ts +6 -0
- package/dist/types/evo-chat/inbox/index.d.ts +11 -0
- package/dist/types/evo-chat/inbox/index.ts +11 -0
- package/dist/types/evo-chat/ticket/index.d.ts +5 -0
- package/dist/types/evo-chat/ticket/index.ts +6 -0
- package/dist/types/evo-crm/lead/index.d.ts +4 -0
- package/dist/types/evo-crm/lead/index.ts +5 -0
- package/package.json +1 -1
|
@@ -117,6 +117,10 @@ export declare const zInboxItemSchema: z.ZodObject<{
|
|
|
117
117
|
department_id: z.ZodString;
|
|
118
118
|
status: z.ZodEnum<["open", "closed"]>;
|
|
119
119
|
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
121
|
+
is_pinned: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
pinned_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
123
|
+
pinned_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
124
|
last_message_at: z.ZodOptional<z.ZodDate>;
|
|
121
125
|
last_inbound_at: z.ZodOptional<z.ZodDate>;
|
|
122
126
|
last_message_preview: z.ZodOptional<z.ZodString>;
|
|
@@ -124,6 +128,8 @@ export declare const zInboxItemSchema: z.ZodObject<{
|
|
|
124
128
|
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
125
129
|
unread_count: z.ZodOptional<z.ZodNumber>;
|
|
126
130
|
contact_name: z.ZodOptional<z.ZodString>;
|
|
131
|
+
/** feat-273: categoria do lead denormalizada; null = comum. */
|
|
132
|
+
lead_special_kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["doctor", "employee", "secretary"]>>>;
|
|
127
133
|
contact_address: z.ZodOptional<z.ZodString>;
|
|
128
134
|
updated_at: z.ZodOptional<z.ZodDate>;
|
|
129
135
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -136,6 +142,10 @@ export declare const zInboxItemSchema: z.ZodObject<{
|
|
|
136
142
|
department_id: z.ZodString;
|
|
137
143
|
status: z.ZodEnum<["open", "closed"]>;
|
|
138
144
|
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
146
|
+
is_pinned: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
pinned_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
148
|
+
pinned_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
149
|
last_message_at: z.ZodOptional<z.ZodDate>;
|
|
140
150
|
last_inbound_at: z.ZodOptional<z.ZodDate>;
|
|
141
151
|
last_message_preview: z.ZodOptional<z.ZodString>;
|
|
@@ -143,6 +153,8 @@ export declare const zInboxItemSchema: z.ZodObject<{
|
|
|
143
153
|
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
144
154
|
unread_count: z.ZodOptional<z.ZodNumber>;
|
|
145
155
|
contact_name: z.ZodOptional<z.ZodString>;
|
|
156
|
+
/** feat-273: categoria do lead denormalizada; null = comum. */
|
|
157
|
+
lead_special_kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["doctor", "employee", "secretary"]>>>;
|
|
146
158
|
contact_address: z.ZodOptional<z.ZodString>;
|
|
147
159
|
updated_at: z.ZodOptional<z.ZodDate>;
|
|
148
160
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
@@ -155,6 +167,10 @@ export declare const zInboxItemSchema: z.ZodObject<{
|
|
|
155
167
|
department_id: z.ZodString;
|
|
156
168
|
status: z.ZodEnum<["open", "closed"]>;
|
|
157
169
|
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
171
|
+
is_pinned: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
pinned_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
173
|
+
pinned_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
174
|
last_message_at: z.ZodOptional<z.ZodDate>;
|
|
159
175
|
last_inbound_at: z.ZodOptional<z.ZodDate>;
|
|
160
176
|
last_message_preview: z.ZodOptional<z.ZodString>;
|
|
@@ -162,6 +178,8 @@ export declare const zInboxItemSchema: z.ZodObject<{
|
|
|
162
178
|
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
163
179
|
unread_count: z.ZodOptional<z.ZodNumber>;
|
|
164
180
|
contact_name: z.ZodOptional<z.ZodString>;
|
|
181
|
+
/** feat-273: categoria do lead denormalizada; null = comum. */
|
|
182
|
+
lead_special_kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["doctor", "employee", "secretary"]>>>;
|
|
165
183
|
contact_address: z.ZodOptional<z.ZodString>;
|
|
166
184
|
updated_at: z.ZodOptional<z.ZodDate>;
|
|
167
185
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.zInboxSubscriptionSchema = exports.zInboxItemSchema = exports.zInboxMemberSchema = exports.zInboxMemberPermissionsSchema = exports.zInboxSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const zod_schemas_1 = require("../../evo-crm/lead/zod-schemas");
|
|
5
6
|
exports.zInboxSchema = zod_1.z.object({
|
|
6
7
|
id: zod_1.z.string(),
|
|
7
8
|
model_ver: zod_1.z.number().default(1),
|
|
@@ -35,6 +36,10 @@ exports.zInboxItemSchema = zod_1.z.object({
|
|
|
35
36
|
department_id: zod_1.z.string(),
|
|
36
37
|
status: zod_1.z.enum(['open', 'closed']),
|
|
37
38
|
assigned_user_id: zod_1.z.string().nullable().optional(),
|
|
39
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
40
|
+
is_pinned: zod_1.z.boolean().optional(),
|
|
41
|
+
pinned_at: zod_1.z.coerce.date().nullable().optional(),
|
|
42
|
+
pinned_by: zod_1.z.string().nullable().optional(),
|
|
38
43
|
last_message_at: zod_1.z.coerce.date().optional(),
|
|
39
44
|
last_inbound_at: zod_1.z.coerce.date().optional(),
|
|
40
45
|
last_message_preview: zod_1.z.string().optional(),
|
|
@@ -42,6 +47,8 @@ exports.zInboxItemSchema = zod_1.z.object({
|
|
|
42
47
|
last_message_channel_id: zod_1.z.string().optional(),
|
|
43
48
|
unread_count: zod_1.z.number().optional(),
|
|
44
49
|
contact_name: zod_1.z.string().optional(),
|
|
50
|
+
/** feat-273: categoria do lead denormalizada; null = comum. */
|
|
51
|
+
lead_special_kind: zod_schemas_1.zLeadSpecialKindSchema.nullable().optional(),
|
|
45
52
|
contact_address: zod_1.z.string().optional(),
|
|
46
53
|
updated_at: zod_1.z.coerce.date().optional(),
|
|
47
54
|
}).passthrough();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { zLeadSpecialKindSchema } from "../../evo-crm/lead/zod-schemas";
|
|
2
3
|
|
|
3
4
|
export const zInboxSchema = z.object({
|
|
4
5
|
id: z.string(),
|
|
@@ -36,6 +37,10 @@ export const zInboxItemSchema = z.object({
|
|
|
36
37
|
department_id: z.string(),
|
|
37
38
|
status: z.enum(['open', 'closed']),
|
|
38
39
|
assigned_user_id: z.string().nullable().optional(),
|
|
40
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
41
|
+
is_pinned: z.boolean().optional(),
|
|
42
|
+
pinned_at: z.coerce.date().nullable().optional(),
|
|
43
|
+
pinned_by: z.string().nullable().optional(),
|
|
39
44
|
last_message_at: z.coerce.date().optional(),
|
|
40
45
|
last_inbound_at: z.coerce.date().optional(),
|
|
41
46
|
last_message_preview: z.string().optional(),
|
|
@@ -43,6 +48,8 @@ export const zInboxItemSchema = z.object({
|
|
|
43
48
|
last_message_channel_id: z.string().optional(),
|
|
44
49
|
unread_count: z.number().optional(),
|
|
45
50
|
contact_name: z.string().optional(),
|
|
51
|
+
/** feat-273: categoria do lead denormalizada; null = comum. */
|
|
52
|
+
lead_special_kind: zLeadSpecialKindSchema.nullable().optional(),
|
|
46
53
|
contact_address: z.string().optional(),
|
|
47
54
|
updated_at: z.coerce.date().optional(),
|
|
48
55
|
}).passthrough();
|
|
@@ -107,6 +107,9 @@ export declare const zTicketSchema: z.ZodObject<{
|
|
|
107
107
|
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
108
108
|
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
109
|
assigned_user_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
is_pinned: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
pinned_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
112
|
+
pinned_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
113
|
attendant_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ai", "human"]>>>;
|
|
111
114
|
attendant_changed_at: z.ZodOptional<z.ZodDate>;
|
|
112
115
|
created_by: z.ZodOptional<z.ZodObject<{
|
|
@@ -203,6 +206,9 @@ export declare const zTicketSchema: z.ZodObject<{
|
|
|
203
206
|
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
204
207
|
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
205
208
|
assigned_user_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
|
+
is_pinned: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
pinned_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
211
|
+
pinned_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
212
|
attendant_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ai", "human"]>>>;
|
|
207
213
|
attendant_changed_at: z.ZodOptional<z.ZodDate>;
|
|
208
214
|
created_by: z.ZodOptional<z.ZodObject<{
|
|
@@ -299,6 +305,9 @@ export declare const zTicketSchema: z.ZodObject<{
|
|
|
299
305
|
last_message_channel_id: z.ZodOptional<z.ZodString>;
|
|
300
306
|
assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
307
|
assigned_user_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
308
|
+
is_pinned: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
pinned_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
310
|
+
pinned_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
302
311
|
attendant_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ai", "human"]>>>;
|
|
303
312
|
attendant_changed_at: z.ZodOptional<z.ZodDate>;
|
|
304
313
|
created_by: z.ZodOptional<z.ZodObject<{
|
|
@@ -42,6 +42,10 @@ exports.zTicketSchema = zod_schemas_1.zFireDocSchema
|
|
|
42
42
|
last_message_channel_id: zod_1.z.string().optional(),
|
|
43
43
|
assigned_user_id: zod_1.z.string().nullable().optional(),
|
|
44
44
|
assigned_user_name: zod_1.z.string().nullable().optional(),
|
|
45
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
46
|
+
is_pinned: zod_1.z.boolean().optional(),
|
|
47
|
+
pinned_at: zod_1.z.coerce.date().nullable().optional(),
|
|
48
|
+
pinned_by: zod_1.z.string().nullable().optional(),
|
|
45
49
|
attendant_type: exports.zTicketAttendantTypeSchema,
|
|
46
50
|
attendant_changed_at: zod_1.z.coerce.date().optional(),
|
|
47
51
|
created_by: exports.zTicketCreatedBySchema.optional(),
|
|
@@ -44,6 +44,10 @@ export const zTicketSchema = zFireDocSchema
|
|
|
44
44
|
last_message_channel_id: z.string().optional(),
|
|
45
45
|
assigned_user_id: z.string().nullable().optional(),
|
|
46
46
|
assigned_user_name: z.string().nullable().optional(),
|
|
47
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
48
|
+
is_pinned: z.boolean().optional(),
|
|
49
|
+
pinned_at: z.coerce.date().nullable().optional(),
|
|
50
|
+
pinned_by: z.string().nullable().optional(),
|
|
47
51
|
attendant_type: zTicketAttendantTypeSchema,
|
|
48
52
|
attendant_changed_at: z.coerce.date().optional(),
|
|
49
53
|
created_by: zTicketCreatedBySchema.optional(),
|
|
@@ -48,6 +48,9 @@ export declare const zLeadReactivationSchema: z.ZodObject<{
|
|
|
48
48
|
last_no_interaction_close_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
49
49
|
last_reactivation_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
50
50
|
}, z.ZodTypeAny, "passthrough">>;
|
|
51
|
+
/** feat-273: categorias de contato especial no Omni. */
|
|
52
|
+
export declare const LEAD_SPECIAL_KINDS: readonly ["doctor", "employee", "secretary"];
|
|
53
|
+
export declare const zLeadSpecialKindSchema: z.ZodEnum<["doctor", "employee", "secretary"]>;
|
|
51
54
|
export declare const zLeadSchema: z.ZodObject<{
|
|
52
55
|
id: z.ZodString;
|
|
53
56
|
ref: z.ZodAny;
|
|
@@ -310,6 +313,8 @@ export declare const zLeadSchema: z.ZodObject<{
|
|
|
310
313
|
last_no_interaction_close_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
311
314
|
last_reactivation_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
312
315
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
316
|
+
/** feat-273: categoria do contato no Omni; null limpa. */
|
|
317
|
+
special_kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["doctor", "employee", "secretary"]>>>;
|
|
313
318
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
314
319
|
id: z.ZodString;
|
|
315
320
|
ref: z.ZodAny;
|
|
@@ -572,6 +577,8 @@ export declare const zLeadSchema: z.ZodObject<{
|
|
|
572
577
|
last_no_interaction_close_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
573
578
|
last_reactivation_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
574
579
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
580
|
+
/** feat-273: categoria do contato no Omni; null limpa. */
|
|
581
|
+
special_kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["doctor", "employee", "secretary"]>>>;
|
|
575
582
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
576
583
|
id: z.ZodString;
|
|
577
584
|
ref: z.ZodAny;
|
|
@@ -834,4 +841,6 @@ export declare const zLeadSchema: z.ZodObject<{
|
|
|
834
841
|
last_no_interaction_close_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
835
842
|
last_reactivation_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
836
843
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
844
|
+
/** feat-273: categoria do contato no Omni; null limpa. */
|
|
845
|
+
special_kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<["doctor", "employee", "secretary"]>>>;
|
|
837
846
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zLeadSchema = exports.zLeadReactivationSchema = exports.zLeadDistChannelSchema = exports.zLeadQualificationSchema = exports.zLeadStatusSchema = void 0;
|
|
3
|
+
exports.zLeadSchema = exports.zLeadSpecialKindSchema = exports.LEAD_SPECIAL_KINDS = exports.zLeadReactivationSchema = exports.zLeadDistChannelSchema = exports.zLeadQualificationSchema = exports.zLeadStatusSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
6
|
const zod_schemas_2 = require("../../evo-people/zod-schemas");
|
|
@@ -28,6 +28,9 @@ exports.zLeadReactivationSchema = zod_1.z
|
|
|
28
28
|
last_reactivation_at: zod_1.z.coerce.date().nullable().optional(),
|
|
29
29
|
})
|
|
30
30
|
.passthrough();
|
|
31
|
+
/** feat-273: categorias de contato especial no Omni. */
|
|
32
|
+
exports.LEAD_SPECIAL_KINDS = ['doctor', 'employee', 'secretary'];
|
|
33
|
+
exports.zLeadSpecialKindSchema = zod_1.z.enum(exports.LEAD_SPECIAL_KINDS);
|
|
31
34
|
exports.zLeadSchema = zod_schemas_2.zProfileSchema // Extend from ProfileSchema
|
|
32
35
|
.extend({
|
|
33
36
|
external_id: zod_1.z.string().nullable().optional(),
|
|
@@ -59,5 +62,7 @@ exports.zLeadSchema = zod_schemas_2.zProfileSchema // Extend from ProfileSchema
|
|
|
59
62
|
capture_data: zod_schemas_1.zCaptureDataMapSchema.nullable().optional(),
|
|
60
63
|
userRef: zod_1.z.any(),
|
|
61
64
|
reactivation: exports.zLeadReactivationSchema.nullable().optional(),
|
|
65
|
+
/** feat-273: categoria do contato no Omni; null limpa. */
|
|
66
|
+
special_kind: exports.zLeadSpecialKindSchema.nullable().optional(),
|
|
62
67
|
})
|
|
63
68
|
.passthrough();
|
|
@@ -35,6 +35,10 @@ export const zLeadReactivationSchema = z
|
|
|
35
35
|
})
|
|
36
36
|
.passthrough();
|
|
37
37
|
|
|
38
|
+
/** feat-273: categorias de contato especial no Omni. */
|
|
39
|
+
export const LEAD_SPECIAL_KINDS = ['doctor', 'employee', 'secretary'] as const;
|
|
40
|
+
export const zLeadSpecialKindSchema = z.enum(LEAD_SPECIAL_KINDS);
|
|
41
|
+
|
|
38
42
|
export const zLeadSchema = zProfileSchema // Extend from ProfileSchema
|
|
39
43
|
.extend({
|
|
40
44
|
external_id: z.string().nullable().optional(),
|
|
@@ -66,5 +70,7 @@ export const zLeadSchema = zProfileSchema // Extend from ProfileSchema
|
|
|
66
70
|
capture_data: zCaptureDataMapSchema.nullable().optional(),
|
|
67
71
|
userRef: z.any(),
|
|
68
72
|
reactivation: zLeadReactivationSchema.nullable().optional(),
|
|
73
|
+
/** feat-273: categoria do contato no Omni; null limpa. */
|
|
74
|
+
special_kind: zLeadSpecialKindSchema.nullable().optional(),
|
|
69
75
|
})
|
|
70
76
|
.passthrough();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IFireGlobalDoc } from "../../shared";
|
|
2
|
+
import type { LeadSpecialKind } from "../../evo-crm/lead";
|
|
2
3
|
export type InboxType = 'personal' | 'team' | 'supervisor_view';
|
|
3
4
|
export type InboxStatus = 'active' | 'paused' | 'disabled';
|
|
4
5
|
export type InboxMemberRole = 'viewer' | 'agent' | 'admin';
|
|
@@ -51,6 +52,11 @@ export interface IInboxItem {
|
|
|
51
52
|
hubia_conversation_mode?: HubiaConversationMode | null;
|
|
52
53
|
postponed_until?: Date | null;
|
|
53
54
|
is_postponed: boolean;
|
|
55
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
56
|
+
is_pinned?: boolean;
|
|
57
|
+
pinned_at?: Date | null;
|
|
58
|
+
/** `users/{id}` (mesmo espaço de `assigned_user_id`), não o uid do Auth. */
|
|
59
|
+
pinned_by?: string | null;
|
|
54
60
|
last_message_at?: Date;
|
|
55
61
|
last_inbound_at?: Date;
|
|
56
62
|
last_message_preview?: string;
|
|
@@ -89,6 +95,11 @@ export interface IInboxItem {
|
|
|
89
95
|
*/
|
|
90
96
|
next_task_due_at?: Date | null;
|
|
91
97
|
contact_name?: string;
|
|
98
|
+
/**
|
|
99
|
+
* feat-273: categoria do lead, denormalizada pelo inbox-handler a cada evento.
|
|
100
|
+
* null = contato comum; ausente = desconhecido (item legado).
|
|
101
|
+
*/
|
|
102
|
+
lead_special_kind?: LeadSpecialKind | null;
|
|
92
103
|
contact_address?: string;
|
|
93
104
|
updated_at?: Date;
|
|
94
105
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IFireGlobalDoc } from "../../shared";
|
|
2
|
+
import type { LeadSpecialKind } from "../../evo-crm/lead";
|
|
2
3
|
|
|
3
4
|
// ── Inbox types ──
|
|
4
5
|
|
|
@@ -70,6 +71,11 @@ export interface IInboxItem {
|
|
|
70
71
|
hubia_conversation_mode?: HubiaConversationMode | null;
|
|
71
72
|
postponed_until?: Date | null;
|
|
72
73
|
is_postponed: boolean;
|
|
74
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
75
|
+
is_pinned?: boolean;
|
|
76
|
+
pinned_at?: Date | null;
|
|
77
|
+
/** `users/{id}` (mesmo espaço de `assigned_user_id`), não o uid do Auth. */
|
|
78
|
+
pinned_by?: string | null;
|
|
73
79
|
last_message_at?: Date;
|
|
74
80
|
last_inbound_at?: Date;
|
|
75
81
|
last_message_preview?: string;
|
|
@@ -108,6 +114,11 @@ export interface IInboxItem {
|
|
|
108
114
|
*/
|
|
109
115
|
next_task_due_at?: Date | null;
|
|
110
116
|
contact_name?: string;
|
|
117
|
+
/**
|
|
118
|
+
* feat-273: categoria do lead, denormalizada pelo inbox-handler a cada evento.
|
|
119
|
+
* null = contato comum; ausente = desconhecido (item legado).
|
|
120
|
+
*/
|
|
121
|
+
lead_special_kind?: LeadSpecialKind | null;
|
|
111
122
|
contact_address?: string;
|
|
112
123
|
updated_at?: Date;
|
|
113
124
|
}
|
|
@@ -37,6 +37,11 @@ export interface ITicket extends IFireDoc {
|
|
|
37
37
|
last_message_channel_id?: string;
|
|
38
38
|
assigned_user_id?: string | null;
|
|
39
39
|
postponed_until?: Date | null;
|
|
40
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
41
|
+
is_pinned?: boolean;
|
|
42
|
+
pinned_at?: Date | null;
|
|
43
|
+
/** `users/{id}` (mesmo espaço de `assigned_user_id`), não o uid do Auth. */
|
|
44
|
+
pinned_by?: string | null;
|
|
40
45
|
created_by?: ITicketCreatedBy;
|
|
41
46
|
/** Resumo denormalizado da última avaliação do CSQ 2.0 do lead deste ticket.
|
|
42
47
|
* Escrito pelo pipeline do evo-csq; ausente = nunca avaliado. */
|
|
@@ -58,6 +58,12 @@ export interface ITicket extends IFireDoc {
|
|
|
58
58
|
|
|
59
59
|
postponed_until?: Date | null;
|
|
60
60
|
|
|
61
|
+
/** feat-274 — pino da equipe. Ausente = não fixado. */
|
|
62
|
+
is_pinned?: boolean;
|
|
63
|
+
pinned_at?: Date | null;
|
|
64
|
+
/** `users/{id}` (mesmo espaço de `assigned_user_id`), não o uid do Auth. */
|
|
65
|
+
pinned_by?: string | null;
|
|
66
|
+
|
|
61
67
|
created_by?: ITicketCreatedBy;
|
|
62
68
|
|
|
63
69
|
/** Resumo denormalizado da última avaliação do CSQ 2.0 do lead deste ticket.
|
|
@@ -91,6 +91,8 @@ export interface ILeadReactivation {
|
|
|
91
91
|
/** Quando a última mensagem de reativação foi efetivamente enviada. */
|
|
92
92
|
last_reactivation_at?: Date | null;
|
|
93
93
|
}
|
|
94
|
+
/** feat-273: categoria de contato especial. */
|
|
95
|
+
export type LeadSpecialKind = 'doctor' | 'employee' | 'secretary';
|
|
94
96
|
export interface ILead extends IProfile {
|
|
95
97
|
external_id?: string | null;
|
|
96
98
|
social_id?: string | null;
|
|
@@ -140,6 +142,8 @@ export interface ILead extends IProfile {
|
|
|
140
142
|
} | null;
|
|
141
143
|
acquisition_sources?: ILeadReferral[] | null;
|
|
142
144
|
reactivation?: ILeadReactivation | null;
|
|
145
|
+
/** feat-273: categoria do contato no Omni (anel + ícone no avatar). null/ausente = contato comum. */
|
|
146
|
+
special_kind?: LeadSpecialKind | null;
|
|
143
147
|
/**
|
|
144
148
|
* Provider que originou o lead: `chatbee`, `hub-waba`, `hub-instagram`,
|
|
145
149
|
* `waba-history`, `campaign`... Escrito desde sempre pelos dois criadores de
|
|
@@ -134,6 +134,9 @@ export interface ILeadReactivation {
|
|
|
134
134
|
last_reactivation_at?: Date | null;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/** feat-273: categoria de contato especial. */
|
|
138
|
+
export type LeadSpecialKind = 'doctor' | 'employee' | 'secretary';
|
|
139
|
+
|
|
137
140
|
export interface ILead extends IProfile {
|
|
138
141
|
external_id?: string | null; // ID externo do paciente
|
|
139
142
|
social_id?: string | null; //CPF
|
|
@@ -187,6 +190,8 @@ export interface ILead extends IProfile {
|
|
|
187
190
|
acquisition_sources?: ILeadReferral[] | null;
|
|
188
191
|
// Régua de reativação (feat-037) — mantida pelo subscriber ticket_closed + task lead_reactivation.
|
|
189
192
|
reactivation?: ILeadReactivation | null;
|
|
193
|
+
/** feat-273: categoria do contato no Omni (anel + ícone no avatar). null/ausente = contato comum. */
|
|
194
|
+
special_kind?: LeadSpecialKind | null;
|
|
190
195
|
/**
|
|
191
196
|
* Provider que originou o lead: `chatbee`, `hub-waba`, `hub-instagram`,
|
|
192
197
|
* `waba-history`, `campaign`... Escrito desde sempre pelos dois criadores de
|