evo360-types 1.3.298 → 1.3.304

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.
@@ -0,0 +1,186 @@
1
+ import { z } from "zod";
2
+ export declare const zInboxSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ model_ver: z.ZodDefault<z.ZodNumber>;
5
+ name: z.ZodString;
6
+ type: z.ZodEnum<["personal", "team", "supervisor_view"]>;
7
+ status: z.ZodEnum<["active", "paused", "disabled"]>;
8
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
9
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
11
+ id: z.ZodString;
12
+ model_ver: z.ZodDefault<z.ZodNumber>;
13
+ name: z.ZodString;
14
+ type: z.ZodEnum<["personal", "team", "supervisor_view"]>;
15
+ status: z.ZodEnum<["active", "paused", "disabled"]>;
16
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
17
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
18
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
19
+ id: z.ZodString;
20
+ model_ver: z.ZodDefault<z.ZodNumber>;
21
+ name: z.ZodString;
22
+ type: z.ZodEnum<["personal", "team", "supervisor_view"]>;
23
+ status: z.ZodEnum<["active", "paused", "disabled"]>;
24
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
25
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
26
+ }, z.ZodTypeAny, "passthrough">>;
27
+ export declare const zInboxMemberPermissionsSchema: z.ZodObject<{
28
+ can_read: z.ZodBoolean;
29
+ can_reply: z.ZodBoolean;
30
+ can_close_ticket: z.ZodBoolean;
31
+ can_manage_inbox: z.ZodBoolean;
32
+ }, "strip", z.ZodTypeAny, {
33
+ can_read: boolean;
34
+ can_reply: boolean;
35
+ can_close_ticket: boolean;
36
+ can_manage_inbox: boolean;
37
+ }, {
38
+ can_read: boolean;
39
+ can_reply: boolean;
40
+ can_close_ticket: boolean;
41
+ can_manage_inbox: boolean;
42
+ }>;
43
+ export declare const zInboxMemberSchema: z.ZodObject<{
44
+ user_id: z.ZodString;
45
+ role: z.ZodEnum<["viewer", "agent", "admin"]>;
46
+ permissions: z.ZodObject<{
47
+ can_read: z.ZodBoolean;
48
+ can_reply: z.ZodBoolean;
49
+ can_close_ticket: z.ZodBoolean;
50
+ can_manage_inbox: z.ZodBoolean;
51
+ }, "strip", z.ZodTypeAny, {
52
+ can_read: boolean;
53
+ can_reply: boolean;
54
+ can_close_ticket: boolean;
55
+ can_manage_inbox: boolean;
56
+ }, {
57
+ can_read: boolean;
58
+ can_reply: boolean;
59
+ can_close_ticket: boolean;
60
+ can_manage_inbox: boolean;
61
+ }>;
62
+ created_at: z.ZodOptional<z.ZodDate>;
63
+ updated_at: z.ZodOptional<z.ZodDate>;
64
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
65
+ user_id: z.ZodString;
66
+ role: z.ZodEnum<["viewer", "agent", "admin"]>;
67
+ permissions: z.ZodObject<{
68
+ can_read: z.ZodBoolean;
69
+ can_reply: z.ZodBoolean;
70
+ can_close_ticket: z.ZodBoolean;
71
+ can_manage_inbox: z.ZodBoolean;
72
+ }, "strip", z.ZodTypeAny, {
73
+ can_read: boolean;
74
+ can_reply: boolean;
75
+ can_close_ticket: boolean;
76
+ can_manage_inbox: boolean;
77
+ }, {
78
+ can_read: boolean;
79
+ can_reply: boolean;
80
+ can_close_ticket: boolean;
81
+ can_manage_inbox: boolean;
82
+ }>;
83
+ created_at: z.ZodOptional<z.ZodDate>;
84
+ updated_at: z.ZodOptional<z.ZodDate>;
85
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
86
+ user_id: z.ZodString;
87
+ role: z.ZodEnum<["viewer", "agent", "admin"]>;
88
+ permissions: z.ZodObject<{
89
+ can_read: z.ZodBoolean;
90
+ can_reply: z.ZodBoolean;
91
+ can_close_ticket: z.ZodBoolean;
92
+ can_manage_inbox: z.ZodBoolean;
93
+ }, "strip", z.ZodTypeAny, {
94
+ can_read: boolean;
95
+ can_reply: boolean;
96
+ can_close_ticket: boolean;
97
+ can_manage_inbox: boolean;
98
+ }, {
99
+ can_read: boolean;
100
+ can_reply: boolean;
101
+ can_close_ticket: boolean;
102
+ can_manage_inbox: boolean;
103
+ }>;
104
+ created_at: z.ZodOptional<z.ZodDate>;
105
+ updated_at: z.ZodOptional<z.ZodDate>;
106
+ }, z.ZodTypeAny, "passthrough">>;
107
+ export declare const zInboxItemSchema: z.ZodObject<{
108
+ tenant: z.ZodString;
109
+ ticket_id: z.ZodString;
110
+ thread_id: z.ZodString;
111
+ contact_id: z.ZodString;
112
+ lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ channel_ids: z.ZodArray<z.ZodString, "many">;
114
+ department_id: z.ZodString;
115
+ status: z.ZodEnum<["open", "closed"]>;
116
+ assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
+ last_message_at: z.ZodOptional<z.ZodDate>;
118
+ last_inbound_at: z.ZodOptional<z.ZodDate>;
119
+ last_message_preview: z.ZodOptional<z.ZodString>;
120
+ last_message_type: z.ZodOptional<z.ZodString>;
121
+ last_message_channel_id: z.ZodOptional<z.ZodString>;
122
+ unread_count: z.ZodOptional<z.ZodNumber>;
123
+ contact_name: z.ZodOptional<z.ZodString>;
124
+ contact_address: z.ZodOptional<z.ZodString>;
125
+ updated_at: z.ZodOptional<z.ZodDate>;
126
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
127
+ tenant: z.ZodString;
128
+ ticket_id: z.ZodString;
129
+ thread_id: z.ZodString;
130
+ contact_id: z.ZodString;
131
+ lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ channel_ids: z.ZodArray<z.ZodString, "many">;
133
+ department_id: z.ZodString;
134
+ status: z.ZodEnum<["open", "closed"]>;
135
+ assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ last_message_at: z.ZodOptional<z.ZodDate>;
137
+ last_inbound_at: z.ZodOptional<z.ZodDate>;
138
+ last_message_preview: z.ZodOptional<z.ZodString>;
139
+ last_message_type: z.ZodOptional<z.ZodString>;
140
+ last_message_channel_id: z.ZodOptional<z.ZodString>;
141
+ unread_count: z.ZodOptional<z.ZodNumber>;
142
+ contact_name: z.ZodOptional<z.ZodString>;
143
+ contact_address: z.ZodOptional<z.ZodString>;
144
+ updated_at: z.ZodOptional<z.ZodDate>;
145
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
146
+ tenant: z.ZodString;
147
+ ticket_id: z.ZodString;
148
+ thread_id: z.ZodString;
149
+ contact_id: z.ZodString;
150
+ lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
+ channel_ids: z.ZodArray<z.ZodString, "many">;
152
+ department_id: z.ZodString;
153
+ status: z.ZodEnum<["open", "closed"]>;
154
+ assigned_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
155
+ last_message_at: z.ZodOptional<z.ZodDate>;
156
+ last_inbound_at: z.ZodOptional<z.ZodDate>;
157
+ last_message_preview: z.ZodOptional<z.ZodString>;
158
+ last_message_type: z.ZodOptional<z.ZodString>;
159
+ last_message_channel_id: z.ZodOptional<z.ZodString>;
160
+ unread_count: z.ZodOptional<z.ZodNumber>;
161
+ contact_name: z.ZodOptional<z.ZodString>;
162
+ contact_address: z.ZodOptional<z.ZodString>;
163
+ updated_at: z.ZodOptional<z.ZodDate>;
164
+ }, z.ZodTypeAny, "passthrough">>;
165
+ export declare const zInboxSubscriptionSchema: z.ZodObject<{
166
+ type: z.ZodEnum<["dep", "tenant"]>;
167
+ tenant: z.ZodString;
168
+ ref_id: z.ZodString;
169
+ status: z.ZodEnum<["active", "paused", "disabled"]>;
170
+ created_at: z.ZodOptional<z.ZodDate>;
171
+ updated_at: z.ZodOptional<z.ZodDate>;
172
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
173
+ type: z.ZodEnum<["dep", "tenant"]>;
174
+ tenant: z.ZodString;
175
+ ref_id: z.ZodString;
176
+ status: z.ZodEnum<["active", "paused", "disabled"]>;
177
+ created_at: z.ZodOptional<z.ZodDate>;
178
+ updated_at: z.ZodOptional<z.ZodDate>;
179
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
180
+ type: z.ZodEnum<["dep", "tenant"]>;
181
+ tenant: z.ZodString;
182
+ ref_id: z.ZodString;
183
+ status: z.ZodEnum<["active", "paused", "disabled"]>;
184
+ created_at: z.ZodOptional<z.ZodDate>;
185
+ updated_at: z.ZodOptional<z.ZodDate>;
186
+ }, z.ZodTypeAny, "passthrough">>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zInboxSubscriptionSchema = exports.zInboxItemSchema = exports.zInboxMemberSchema = exports.zInboxMemberPermissionsSchema = exports.zInboxSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.zInboxSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ model_ver: zod_1.z.number().default(1),
8
+ name: zod_1.z.string(),
9
+ type: zod_1.z.enum(['personal', 'team', 'supervisor_view']),
10
+ status: zod_1.z.enum(['active', 'paused', 'disabled']),
11
+ created_at: zod_1.z.coerce.date().nullable().optional(),
12
+ updated_at: zod_1.z.coerce.date().nullable().optional(),
13
+ }).passthrough();
14
+ exports.zInboxMemberPermissionsSchema = zod_1.z.object({
15
+ can_read: zod_1.z.boolean(),
16
+ can_reply: zod_1.z.boolean(),
17
+ can_close_ticket: zod_1.z.boolean(),
18
+ can_manage_inbox: zod_1.z.boolean(),
19
+ });
20
+ exports.zInboxMemberSchema = zod_1.z.object({
21
+ user_id: zod_1.z.string(),
22
+ role: zod_1.z.enum(['viewer', 'agent', 'admin']),
23
+ permissions: exports.zInboxMemberPermissionsSchema,
24
+ created_at: zod_1.z.coerce.date().optional(),
25
+ updated_at: zod_1.z.coerce.date().optional(),
26
+ }).passthrough();
27
+ exports.zInboxItemSchema = zod_1.z.object({
28
+ tenant: zod_1.z.string(),
29
+ ticket_id: zod_1.z.string(),
30
+ thread_id: zod_1.z.string(),
31
+ contact_id: zod_1.z.string(),
32
+ lead_id: zod_1.z.string().nullable().optional(),
33
+ channel_ids: zod_1.z.array(zod_1.z.string()),
34
+ department_id: zod_1.z.string(),
35
+ status: zod_1.z.enum(['open', 'closed']),
36
+ assigned_user_id: zod_1.z.string().nullable().optional(),
37
+ last_message_at: zod_1.z.coerce.date().optional(),
38
+ last_inbound_at: zod_1.z.coerce.date().optional(),
39
+ last_message_preview: zod_1.z.string().optional(),
40
+ last_message_type: zod_1.z.string().optional(),
41
+ last_message_channel_id: zod_1.z.string().optional(),
42
+ unread_count: zod_1.z.number().optional(),
43
+ contact_name: zod_1.z.string().optional(),
44
+ contact_address: zod_1.z.string().optional(),
45
+ updated_at: zod_1.z.coerce.date().optional(),
46
+ }).passthrough();
47
+ exports.zInboxSubscriptionSchema = zod_1.z.object({
48
+ type: zod_1.z.enum(['dep', 'tenant']),
49
+ tenant: zod_1.z.string(),
50
+ ref_id: zod_1.z.string(),
51
+ status: zod_1.z.enum(['active', 'paused', 'disabled']),
52
+ created_at: zod_1.z.coerce.date().optional(),
53
+ updated_at: zod_1.z.coerce.date().optional(),
54
+ }).passthrough();
@@ -0,0 +1,56 @@
1
+ import { z } from "zod";
2
+
3
+ export const zInboxSchema = z.object({
4
+ id: z.string(),
5
+ model_ver: z.number().default(1),
6
+ name: z.string(),
7
+ type: z.enum(['personal', 'team', 'supervisor_view']),
8
+ status: z.enum(['active', 'paused', 'disabled']),
9
+ created_at: z.coerce.date().nullable().optional(),
10
+ updated_at: z.coerce.date().nullable().optional(),
11
+ }).passthrough();
12
+
13
+ export const zInboxMemberPermissionsSchema = z.object({
14
+ can_read: z.boolean(),
15
+ can_reply: z.boolean(),
16
+ can_close_ticket: z.boolean(),
17
+ can_manage_inbox: z.boolean(),
18
+ });
19
+
20
+ export const zInboxMemberSchema = z.object({
21
+ user_id: z.string(),
22
+ role: z.enum(['viewer', 'agent', 'admin']),
23
+ permissions: zInboxMemberPermissionsSchema,
24
+ created_at: z.coerce.date().optional(),
25
+ updated_at: z.coerce.date().optional(),
26
+ }).passthrough();
27
+
28
+ export const zInboxItemSchema = z.object({
29
+ tenant: z.string(),
30
+ ticket_id: z.string(),
31
+ thread_id: z.string(),
32
+ contact_id: z.string(),
33
+ lead_id: z.string().nullable().optional(),
34
+ channel_ids: z.array(z.string()),
35
+ department_id: z.string(),
36
+ status: z.enum(['open', 'closed']),
37
+ assigned_user_id: z.string().nullable().optional(),
38
+ last_message_at: z.coerce.date().optional(),
39
+ last_inbound_at: z.coerce.date().optional(),
40
+ last_message_preview: z.string().optional(),
41
+ last_message_type: z.string().optional(),
42
+ last_message_channel_id: z.string().optional(),
43
+ unread_count: z.number().optional(),
44
+ contact_name: z.string().optional(),
45
+ contact_address: z.string().optional(),
46
+ updated_at: z.coerce.date().optional(),
47
+ }).passthrough();
48
+
49
+ export const zInboxSubscriptionSchema = z.object({
50
+ type: z.enum(['dep', 'tenant']),
51
+ tenant: z.string(),
52
+ ref_id: z.string(),
53
+ status: z.enum(['active', 'paused', 'disabled']),
54
+ created_at: z.coerce.date().optional(),
55
+ updated_at: z.coerce.date().optional(),
56
+ }).passthrough();
package/dist/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export * from "./apps/evo-chat/channel/zod-schemas";
36
36
  export * from "./apps/evo-chat/thread/zod-schemas";
37
37
  export * from "./apps/evo-chat/thread-message/zod-schemas";
38
38
  export * from "./apps/evo-chat/ticket/zod-schemas";
39
+ export * from "./apps/evo-chat/inbox/zod-schemas";
39
40
  export * from "./apps/evo-hub-ia/channel/zod-schemas";
40
41
  export * from "./apps/evo-med/calendar/zod-schemas";
41
42
  export * from "./apps/evo-med/appointment/zod-schemas";
package/dist/index.js CHANGED
@@ -54,6 +54,7 @@ __exportStar(require("./apps/evo-chat/channel/zod-schemas"), exports);
54
54
  __exportStar(require("./apps/evo-chat/thread/zod-schemas"), exports);
55
55
  __exportStar(require("./apps/evo-chat/thread-message/zod-schemas"), exports);
56
56
  __exportStar(require("./apps/evo-chat/ticket/zod-schemas"), exports);
57
+ __exportStar(require("./apps/evo-chat/inbox/zod-schemas"), exports);
57
58
  __exportStar(require("./apps/evo-hub-ia/channel/zod-schemas"), exports);
58
59
  __exportStar(require("./apps/evo-med/calendar/zod-schemas"), exports);
59
60
  __exportStar(require("./apps/evo-med/appointment/zod-schemas"), exports);
package/dist/index.ts CHANGED
@@ -39,6 +39,7 @@ export * from "./apps/evo-chat/channel/zod-schemas";
39
39
  export * from "./apps/evo-chat/thread/zod-schemas";
40
40
  export * from "./apps/evo-chat/thread-message/zod-schemas";
41
41
  export * from "./apps/evo-chat/ticket/zod-schemas";
42
+ export * from "./apps/evo-chat/inbox/zod-schemas";
42
43
  export * from "./apps/evo-hub-ia/channel/zod-schemas";
43
44
  export * from "./apps/evo-med/calendar/zod-schemas";
44
45
  export * from "./apps/evo-med/appointment/zod-schemas";
@@ -7,3 +7,4 @@ export declare const CHANNELS_COLLECTION = "channels";
7
7
  export declare const THREADS_COLLECTION = "threads";
8
8
  export declare const THREAD_MESSAGES_COLLECTION = "messages";
9
9
  export declare const TICKETS_COLLECTION = "tickets";
10
+ export declare const INBOXES_COLLECTION = "inboxes";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.INBOXES_COLLECTION = 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
@@ -16,3 +16,4 @@ exports.CHANNELS_COLLECTION = "channels";
16
16
  exports.THREADS_COLLECTION = "threads";
17
17
  exports.THREAD_MESSAGES_COLLECTION = "messages"; // subcollection de threads
18
18
  exports.TICKETS_COLLECTION = "tickets";
19
+ exports.INBOXES_COLLECTION = "inboxes";
@@ -18,3 +18,4 @@ export const CHANNELS_COLLECTION = "channels";
18
18
  export const THREADS_COLLECTION = "threads";
19
19
  export const THREAD_MESSAGES_COLLECTION = "messages"; // subcollection de threads
20
20
  export const TICKETS_COLLECTION = "tickets";
21
+ export const INBOXES_COLLECTION = "inboxes";
@@ -0,0 +1,52 @@
1
+ import { IFireGlobalDoc } from "../../shared";
2
+ export type InboxType = 'personal' | 'team' | 'supervisor_view';
3
+ export type InboxStatus = 'active' | 'paused' | 'disabled';
4
+ export type InboxMemberRole = 'viewer' | 'agent' | 'admin';
5
+ export type InboxSubscriptionType = 'dep' | 'tenant';
6
+ export interface IInbox extends IFireGlobalDoc {
7
+ name: string;
8
+ type: InboxType;
9
+ status: InboxStatus;
10
+ [key: string]: unknown;
11
+ }
12
+ export interface IInboxMemberPermissions {
13
+ can_read: boolean;
14
+ can_reply: boolean;
15
+ can_close_ticket: boolean;
16
+ can_manage_inbox: boolean;
17
+ }
18
+ export interface IInboxMember {
19
+ user_id: string;
20
+ role: InboxMemberRole;
21
+ permissions: IInboxMemberPermissions;
22
+ created_at?: Date;
23
+ updated_at?: Date;
24
+ }
25
+ export interface IInboxItem {
26
+ tenant: string;
27
+ ticket_id: string;
28
+ thread_id: string;
29
+ contact_id: string;
30
+ lead_id?: string | null;
31
+ channel_ids: string[];
32
+ department_id: string;
33
+ status: 'open' | 'closed';
34
+ assigned_user_id?: string | null;
35
+ last_message_at?: Date;
36
+ last_inbound_at?: Date;
37
+ last_message_preview?: string;
38
+ last_message_type?: string;
39
+ last_message_channel_id?: string;
40
+ unread_count?: number;
41
+ contact_name?: string;
42
+ contact_address?: string;
43
+ updated_at?: Date;
44
+ }
45
+ export interface IInboxSubscription {
46
+ type: InboxSubscriptionType;
47
+ tenant: string;
48
+ ref_id: string;
49
+ status: 'active' | 'paused' | 'disabled';
50
+ created_at?: Date;
51
+ updated_at?: Date;
52
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,68 @@
1
+ import { IFireGlobalDoc } from "../../shared";
2
+
3
+ // ── Inbox types ──
4
+
5
+ export type InboxType = 'personal' | 'team' | 'supervisor_view';
6
+ export type InboxStatus = 'active' | 'paused' | 'disabled';
7
+ export type InboxMemberRole = 'viewer' | 'agent' | 'admin';
8
+ export type InboxSubscriptionType = 'dep' | 'tenant';
9
+
10
+ // ── Inbox (global, cross-tenant) ──
11
+
12
+ export interface IInbox extends IFireGlobalDoc {
13
+ name: string;
14
+ type: InboxType;
15
+ status: InboxStatus;
16
+ [key: string]: unknown;
17
+ }
18
+
19
+ // ── Inbox Member ──
20
+
21
+ export interface IInboxMemberPermissions {
22
+ can_read: boolean;
23
+ can_reply: boolean;
24
+ can_close_ticket: boolean;
25
+ can_manage_inbox: boolean;
26
+ }
27
+
28
+ export interface IInboxMember {
29
+ user_id: string;
30
+ role: InboxMemberRole;
31
+ permissions: IInboxMemberPermissions;
32
+ created_at?: Date;
33
+ updated_at?: Date;
34
+ }
35
+
36
+ // ── Inbox Item (snapshot of a ticket) ──
37
+
38
+ export interface IInboxItem {
39
+ tenant: string;
40
+ ticket_id: string;
41
+ thread_id: string;
42
+ contact_id: string;
43
+ lead_id?: string | null;
44
+ channel_ids: string[];
45
+ department_id: string;
46
+ status: 'open' | 'closed';
47
+ assigned_user_id?: string | null;
48
+ last_message_at?: Date;
49
+ last_inbound_at?: Date;
50
+ last_message_preview?: string;
51
+ last_message_type?: string;
52
+ last_message_channel_id?: string;
53
+ unread_count?: number;
54
+ contact_name?: string;
55
+ contact_address?: string;
56
+ updated_at?: Date;
57
+ }
58
+
59
+ // ── Inbox Subscription ──
60
+
61
+ export interface IInboxSubscription {
62
+ type: InboxSubscriptionType;
63
+ tenant: string;
64
+ ref_id: string; // dep => departmentId; tenant => tenantId
65
+ status: 'active' | 'paused' | 'disabled';
66
+ created_at?: Date;
67
+ updated_at?: Date;
68
+ }
@@ -6,6 +6,7 @@ export * from "./channel";
6
6
  export * from "./thread";
7
7
  export * from "./thread-message";
8
8
  export * from "./ticket";
9
+ export * from "./inbox";
9
10
  export declare const EvoChatPermissions: {
10
11
  readonly Read: "evo_chat_read";
11
12
  readonly Write: "evo_chat_write";
@@ -23,6 +23,7 @@ __exportStar(require("./channel"), exports);
23
23
  __exportStar(require("./thread"), exports);
24
24
  __exportStar(require("./thread-message"), exports);
25
25
  __exportStar(require("./ticket"), exports);
26
+ __exportStar(require("./inbox"), exports);
26
27
  // Permissões para o evo-chat
27
28
  exports.EvoChatPermissions = {
28
29
  Read: "evo_chat_read",
@@ -6,6 +6,7 @@ export * from "./channel";
6
6
  export * from "./thread";
7
7
  export * from "./thread-message";
8
8
  export * from "./ticket";
9
+ export * from "./inbox";
9
10
 
10
11
  // Permissões para o evo-chat
11
12
  export const EvoChatPermissions = {
@@ -37,6 +37,7 @@ export interface INexFinopsBilling extends IFireGlobalDoc {
37
37
  customer_ref?: string | null;
38
38
  contract_id: string;
39
39
  contract_ref?: string | null;
40
+ code?: string | null;
40
41
  status: NexFinopsBillingStatus;
41
42
  contact_email?: string | null;
42
43
  contact_phone?: string | null;
@@ -56,6 +56,9 @@ export interface INexFinopsBilling extends IFireGlobalDoc {
56
56
  contract_id: string;
57
57
  contract_ref?: string | null;
58
58
 
59
+ // Código interno (herdado do contrato)
60
+ code?: string | null;
61
+
59
62
  // Status
60
63
  status: NexFinopsBillingStatus;
61
64
 
@@ -12,6 +12,7 @@ export declare const EvoNotificationsCollections: {
12
12
  readonly Logs: "logs";
13
13
  readonly EmailChannels: "email_channels";
14
14
  readonly EmailTemplates: "email_templates";
15
+ readonly WhatsAppChannels: "whatsapp_channels";
15
16
  };
16
17
  export type EvoNotificationsCollectionName = (typeof EvoNotificationsCollections)[keyof typeof EvoNotificationsCollections];
17
18
  export declare const NotificationTaskKindEnum: {
@@ -197,6 +198,17 @@ export interface IEmailTemplate extends IFireDoc {
197
198
  variables: string[];
198
199
  enabled: boolean;
199
200
  }
201
+ export interface IWabaChannelConfig extends IFireDoc {
202
+ display_name: string;
203
+ phone_number_id: string;
204
+ waba_id: string;
205
+ business_id?: string;
206
+ number?: string;
207
+ access_token_secret_ref?: string;
208
+ default_department_id: string;
209
+ company_id?: string;
210
+ enabled: boolean;
211
+ }
200
212
  export interface INotificationProviderConfig {
201
213
  id: string;
202
214
  provider_name: string;
@@ -48,6 +48,7 @@ exports.EvoNotificationsCollections = {
48
48
  Logs: "logs",
49
49
  EmailChannels: "email_channels",
50
50
  EmailTemplates: "email_templates", // subcollection de email_channels
51
+ WhatsAppChannels: "whatsapp_channels",
51
52
  };
52
53
  // ----- Task Runner integration
53
54
  exports.NotificationTaskKindEnum = {
@@ -39,6 +39,7 @@ export const EvoNotificationsCollections = {
39
39
  Logs: "logs",
40
40
  EmailChannels: "email_channels",
41
41
  EmailTemplates: "email_templates", // subcollection de email_channels
42
+ WhatsAppChannels: "whatsapp_channels",
42
43
  } as const;
43
44
 
44
45
  export type EvoNotificationsCollectionName =
@@ -341,6 +342,23 @@ export interface IEmailTemplate extends IFireDoc {
341
342
  enabled: boolean;
342
343
  }
343
344
 
345
+ // ======================================================
346
+ // WhatsApp channels (hub-waba)
347
+ // Path: /tenants/{tenant}/apps/evo-notifications/whatsapp_channels/{channelId}
348
+ // ======================================================
349
+
350
+ export interface IWabaChannelConfig extends IFireDoc {
351
+ display_name: string;
352
+ phone_number_id: string;
353
+ waba_id: string;
354
+ business_id?: string;
355
+ number?: string;
356
+ access_token_secret_ref?: string;
357
+ default_department_id: string;
358
+ company_id?: string;
359
+ enabled: boolean;
360
+ }
361
+
344
362
  // ======================================================
345
363
  // Nexus / platform: configuração global de providers de envio
346
364
  // Path Firestore: platform/evo-notifications/providers/{providerId}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.298",
3
+ "version": "1.3.304",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",