evo360-types 1.3.687 → 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.
@@ -128,6 +128,8 @@ export declare const zInboxItemSchema: z.ZodObject<{
128
128
  last_message_channel_id: z.ZodOptional<z.ZodString>;
129
129
  unread_count: z.ZodOptional<z.ZodNumber>;
130
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"]>>>;
131
133
  contact_address: z.ZodOptional<z.ZodString>;
132
134
  updated_at: z.ZodOptional<z.ZodDate>;
133
135
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -151,6 +153,8 @@ export declare const zInboxItemSchema: z.ZodObject<{
151
153
  last_message_channel_id: z.ZodOptional<z.ZodString>;
152
154
  unread_count: z.ZodOptional<z.ZodNumber>;
153
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"]>>>;
154
158
  contact_address: z.ZodOptional<z.ZodString>;
155
159
  updated_at: z.ZodOptional<z.ZodDate>;
156
160
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -174,6 +178,8 @@ export declare const zInboxItemSchema: z.ZodObject<{
174
178
  last_message_channel_id: z.ZodOptional<z.ZodString>;
175
179
  unread_count: z.ZodOptional<z.ZodNumber>;
176
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"]>>>;
177
183
  contact_address: z.ZodOptional<z.ZodString>;
178
184
  updated_at: z.ZodOptional<z.ZodDate>;
179
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),
@@ -46,6 +47,8 @@ exports.zInboxItemSchema = zod_1.z.object({
46
47
  last_message_channel_id: zod_1.z.string().optional(),
47
48
  unread_count: zod_1.z.number().optional(),
48
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(),
49
52
  contact_address: zod_1.z.string().optional(),
50
53
  updated_at: zod_1.z.coerce.date().optional(),
51
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(),
@@ -47,6 +48,8 @@ export const zInboxItemSchema = z.object({
47
48
  last_message_channel_id: z.string().optional(),
48
49
  unread_count: z.number().optional(),
49
50
  contact_name: z.string().optional(),
51
+ /** feat-273: categoria do lead denormalizada; null = comum. */
52
+ lead_special_kind: zLeadSpecialKindSchema.nullable().optional(),
50
53
  contact_address: z.string().optional(),
51
54
  updated_at: z.coerce.date().optional(),
52
55
  }).passthrough();
@@ -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';
@@ -94,6 +95,11 @@ export interface IInboxItem {
94
95
  */
95
96
  next_task_due_at?: Date | null;
96
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;
97
103
  contact_address?: string;
98
104
  updated_at?: Date;
99
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
 
@@ -113,6 +114,11 @@ export interface IInboxItem {
113
114
  */
114
115
  next_task_due_at?: Date | null;
115
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;
116
122
  contact_address?: string;
117
123
  updated_at?: Date;
118
124
  }
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.687",
3
+ "version": "1.3.690",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",