@voltade/envoy-sdk 1.0.0

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.
Files changed (38) hide show
  1. package/README.md +194 -0
  2. package/dist/client.d.ts +57 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +49 -0
  5. package/dist/client.js.map +1 -0
  6. package/dist/errors.d.ts +59 -0
  7. package/dist/errors.d.ts.map +1 -0
  8. package/dist/errors.js +91 -0
  9. package/dist/errors.js.map +1 -0
  10. package/dist/http-client.d.ts +64 -0
  11. package/dist/http-client.d.ts.map +1 -0
  12. package/dist/http-client.js +159 -0
  13. package/dist/http-client.js.map +1 -0
  14. package/dist/index.d.ts +31 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +34 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/resources/conversations/index.d.ts +75 -0
  19. package/dist/resources/conversations/index.d.ts.map +1 -0
  20. package/dist/resources/conversations/index.js +89 -0
  21. package/dist/resources/conversations/index.js.map +1 -0
  22. package/dist/resources/conversations/types.d.ts +958 -0
  23. package/dist/resources/conversations/types.d.ts.map +1 -0
  24. package/dist/resources/conversations/types.js +160 -0
  25. package/dist/resources/conversations/types.js.map +1 -0
  26. package/dist/resources/inboxes/index.d.ts +39 -0
  27. package/dist/resources/inboxes/index.d.ts.map +1 -0
  28. package/dist/resources/inboxes/index.js +46 -0
  29. package/dist/resources/inboxes/index.js.map +1 -0
  30. package/dist/resources/inboxes/types.d.ts +88 -0
  31. package/dist/resources/inboxes/types.d.ts.map +1 -0
  32. package/dist/resources/inboxes/types.js +24 -0
  33. package/dist/resources/inboxes/types.js.map +1 -0
  34. package/dist/resources/index.d.ts +7 -0
  35. package/dist/resources/index.d.ts.map +1 -0
  36. package/dist/resources/index.js +7 -0
  37. package/dist/resources/index.js.map +1 -0
  38. package/package.json +78 -0
@@ -0,0 +1,958 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod Schemas for Conversations
4
+ */
5
+ export declare const MessageTypeSchema: z.ZodEnum<["incoming", "outgoing"]>;
6
+ export declare const ContentTypeSchema: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
7
+ export declare const CreateMessageParamsSchema: z.ZodObject<{
8
+ content: z.ZodString;
9
+ message_type: z.ZodOptional<z.ZodEnum<["incoming", "outgoing"]>>;
10
+ private: z.ZodOptional<z.ZodBoolean>;
11
+ content_type: z.ZodOptional<z.ZodEnum<["text", "input_select", "cards", "form", "article"]>>;
12
+ content_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ content: string;
15
+ message_type?: "incoming" | "outgoing" | undefined;
16
+ private?: boolean | undefined;
17
+ content_type?: "text" | "input_select" | "cards" | "form" | "article" | undefined;
18
+ content_attributes?: Record<string, unknown> | undefined;
19
+ }, {
20
+ content: string;
21
+ message_type?: "incoming" | "outgoing" | undefined;
22
+ private?: boolean | undefined;
23
+ content_type?: "text" | "input_select" | "cards" | "form" | "article" | undefined;
24
+ content_attributes?: Record<string, unknown> | undefined;
25
+ }>;
26
+ export declare const MessageSchema: z.ZodObject<{
27
+ id: z.ZodNumber;
28
+ content: z.ZodString;
29
+ message_type: z.ZodEnum<["incoming", "outgoing"]>;
30
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
31
+ content_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
32
+ created_at: z.ZodNumber;
33
+ private: z.ZodBoolean;
34
+ conversation_id: z.ZodNumber;
35
+ sender: z.ZodOptional<z.ZodObject<{
36
+ id: z.ZodNumber;
37
+ name: z.ZodString;
38
+ email: z.ZodOptional<z.ZodString>;
39
+ type: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ type: string;
42
+ id: number;
43
+ name: string;
44
+ email?: string | undefined;
45
+ }, {
46
+ type: string;
47
+ id: number;
48
+ name: string;
49
+ email?: string | undefined;
50
+ }>>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ content: string;
53
+ message_type: "incoming" | "outgoing";
54
+ private: boolean;
55
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
56
+ content_attributes: Record<string, unknown>;
57
+ id: number;
58
+ created_at: number;
59
+ conversation_id: number;
60
+ sender?: {
61
+ type: string;
62
+ id: number;
63
+ name: string;
64
+ email?: string | undefined;
65
+ } | undefined;
66
+ }, {
67
+ content: string;
68
+ message_type: "incoming" | "outgoing";
69
+ private: boolean;
70
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
71
+ content_attributes: Record<string, unknown>;
72
+ id: number;
73
+ created_at: number;
74
+ conversation_id: number;
75
+ sender?: {
76
+ type: string;
77
+ id: number;
78
+ name: string;
79
+ email?: string | undefined;
80
+ } | undefined;
81
+ }>;
82
+ export declare const EscalationTypeSchema: z.ZodEnum<["agent", "team"]>;
83
+ export declare const PrioritySchema: z.ZodEnum<["low", "medium", "high", "urgent"]>;
84
+ export declare const TeamSchema: z.ZodObject<{
85
+ id: z.ZodOptional<z.ZodNumber>;
86
+ name: z.ZodOptional<z.ZodString>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ id?: number | undefined;
89
+ name?: string | undefined;
90
+ }, {
91
+ id?: number | undefined;
92
+ name?: string | undefined;
93
+ }>;
94
+ export declare const AgentSchema: z.ZodObject<{
95
+ id: z.ZodOptional<z.ZodNumber>;
96
+ name: z.ZodOptional<z.ZodString>;
97
+ available_name: z.ZodOptional<z.ZodString>;
98
+ avatar_url: z.ZodOptional<z.ZodString>;
99
+ type: z.ZodOptional<z.ZodString>;
100
+ availability: z.ZodOptional<z.ZodString>;
101
+ thumbnail: z.ZodOptional<z.ZodString>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ type?: string | undefined;
104
+ id?: number | undefined;
105
+ name?: string | undefined;
106
+ available_name?: string | undefined;
107
+ avatar_url?: string | undefined;
108
+ availability?: string | undefined;
109
+ thumbnail?: string | undefined;
110
+ }, {
111
+ type?: string | undefined;
112
+ id?: number | undefined;
113
+ name?: string | undefined;
114
+ available_name?: string | undefined;
115
+ avatar_url?: string | undefined;
116
+ availability?: string | undefined;
117
+ thumbnail?: string | undefined;
118
+ }>;
119
+ export declare const EscalationResponseSchema: z.ZodObject<{
120
+ success: z.ZodBoolean;
121
+ escalation_type: z.ZodOptional<z.ZodEnum<["agent", "team"]>>;
122
+ team: z.ZodOptional<z.ZodNullable<z.ZodObject<{
123
+ id: z.ZodOptional<z.ZodNumber>;
124
+ name: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ id?: number | undefined;
127
+ name?: string | undefined;
128
+ }, {
129
+ id?: number | undefined;
130
+ name?: string | undefined;
131
+ }>>>;
132
+ agent: z.ZodOptional<z.ZodNullable<z.ZodObject<{
133
+ id: z.ZodOptional<z.ZodNumber>;
134
+ name: z.ZodOptional<z.ZodString>;
135
+ available_name: z.ZodOptional<z.ZodString>;
136
+ avatar_url: z.ZodOptional<z.ZodString>;
137
+ type: z.ZodOptional<z.ZodString>;
138
+ availability: z.ZodOptional<z.ZodString>;
139
+ thumbnail: z.ZodOptional<z.ZodString>;
140
+ }, "strip", z.ZodTypeAny, {
141
+ type?: string | undefined;
142
+ id?: number | undefined;
143
+ name?: string | undefined;
144
+ available_name?: string | undefined;
145
+ avatar_url?: string | undefined;
146
+ availability?: string | undefined;
147
+ thumbnail?: string | undefined;
148
+ }, {
149
+ type?: string | undefined;
150
+ id?: number | undefined;
151
+ name?: string | undefined;
152
+ available_name?: string | undefined;
153
+ avatar_url?: string | undefined;
154
+ availability?: string | undefined;
155
+ thumbnail?: string | undefined;
156
+ }>>>;
157
+ reason: z.ZodOptional<z.ZodString>;
158
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "urgent"]>>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ success: boolean;
161
+ agent?: {
162
+ type?: string | undefined;
163
+ id?: number | undefined;
164
+ name?: string | undefined;
165
+ available_name?: string | undefined;
166
+ avatar_url?: string | undefined;
167
+ availability?: string | undefined;
168
+ thumbnail?: string | undefined;
169
+ } | null | undefined;
170
+ team?: {
171
+ id?: number | undefined;
172
+ name?: string | undefined;
173
+ } | null | undefined;
174
+ escalation_type?: "agent" | "team" | undefined;
175
+ reason?: string | undefined;
176
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
177
+ }, {
178
+ success: boolean;
179
+ agent?: {
180
+ type?: string | undefined;
181
+ id?: number | undefined;
182
+ name?: string | undefined;
183
+ available_name?: string | undefined;
184
+ avatar_url?: string | undefined;
185
+ availability?: string | undefined;
186
+ thumbnail?: string | undefined;
187
+ } | null | undefined;
188
+ team?: {
189
+ id?: number | undefined;
190
+ name?: string | undefined;
191
+ } | null | undefined;
192
+ escalation_type?: "agent" | "team" | undefined;
193
+ reason?: string | undefined;
194
+ priority?: "low" | "medium" | "high" | "urgent" | undefined;
195
+ }>;
196
+ export declare const ConversationStatusSchema: z.ZodEnum<["open", "resolved", "pending", "snoozed"]>;
197
+ export declare const ContactSchema: z.ZodObject<{
198
+ id: z.ZodNumber;
199
+ name: z.ZodNullable<z.ZodString>;
200
+ email: z.ZodNullable<z.ZodString>;
201
+ phone_number: z.ZodNullable<z.ZodString>;
202
+ thumbnail: z.ZodString;
203
+ identifier: z.ZodNullable<z.ZodString>;
204
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
205
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
206
+ blocked: z.ZodBoolean;
207
+ customer_stage: z.ZodString;
208
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
209
+ type: z.ZodOptional<z.ZodString>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ id: number;
212
+ name: string | null;
213
+ email: string | null;
214
+ thumbnail: string;
215
+ phone_number: string | null;
216
+ identifier: string | null;
217
+ additional_attributes: Record<string, unknown>;
218
+ custom_attributes: Record<string, unknown>;
219
+ blocked: boolean;
220
+ customer_stage: string;
221
+ customer_stage_explanation: string | null;
222
+ type?: string | undefined;
223
+ }, {
224
+ id: number;
225
+ name: string | null;
226
+ email: string | null;
227
+ thumbnail: string;
228
+ phone_number: string | null;
229
+ identifier: string | null;
230
+ additional_attributes: Record<string, unknown>;
231
+ custom_attributes: Record<string, unknown>;
232
+ blocked: boolean;
233
+ customer_stage: string;
234
+ customer_stage_explanation: string | null;
235
+ type?: string | undefined;
236
+ }>;
237
+ export declare const ContactInboxSchema: z.ZodObject<{
238
+ id: z.ZodNumber;
239
+ contact_id: z.ZodNumber;
240
+ inbox_id: z.ZodNumber;
241
+ source_id: z.ZodNullable<z.ZodString>;
242
+ created_at: z.ZodString;
243
+ updated_at: z.ZodString;
244
+ hmac_verified: z.ZodBoolean;
245
+ pubsub_token: z.ZodString;
246
+ }, "strip", z.ZodTypeAny, {
247
+ id: number;
248
+ created_at: string;
249
+ contact_id: number;
250
+ inbox_id: number;
251
+ source_id: string | null;
252
+ updated_at: string;
253
+ hmac_verified: boolean;
254
+ pubsub_token: string;
255
+ }, {
256
+ id: number;
257
+ created_at: string;
258
+ contact_id: number;
259
+ inbox_id: number;
260
+ source_id: string | null;
261
+ updated_at: string;
262
+ hmac_verified: boolean;
263
+ pubsub_token: string;
264
+ }>;
265
+ export declare const AssigneeSchema: z.ZodObject<{
266
+ id: z.ZodNumber;
267
+ name: z.ZodString;
268
+ email: z.ZodString;
269
+ }, "strip", z.ZodTypeAny, {
270
+ id: number;
271
+ name: string;
272
+ email: string;
273
+ }, {
274
+ id: number;
275
+ name: string;
276
+ email: string;
277
+ }>;
278
+ export declare const ConversationMetaSchema: z.ZodObject<{
279
+ sender: z.ZodObject<{
280
+ id: z.ZodNumber;
281
+ name: z.ZodNullable<z.ZodString>;
282
+ email: z.ZodNullable<z.ZodString>;
283
+ phone_number: z.ZodNullable<z.ZodString>;
284
+ thumbnail: z.ZodString;
285
+ identifier: z.ZodNullable<z.ZodString>;
286
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
287
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
288
+ blocked: z.ZodBoolean;
289
+ customer_stage: z.ZodString;
290
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
291
+ type: z.ZodOptional<z.ZodString>;
292
+ }, "strip", z.ZodTypeAny, {
293
+ id: number;
294
+ name: string | null;
295
+ email: string | null;
296
+ thumbnail: string;
297
+ phone_number: string | null;
298
+ identifier: string | null;
299
+ additional_attributes: Record<string, unknown>;
300
+ custom_attributes: Record<string, unknown>;
301
+ blocked: boolean;
302
+ customer_stage: string;
303
+ customer_stage_explanation: string | null;
304
+ type?: string | undefined;
305
+ }, {
306
+ id: number;
307
+ name: string | null;
308
+ email: string | null;
309
+ thumbnail: string;
310
+ phone_number: string | null;
311
+ identifier: string | null;
312
+ additional_attributes: Record<string, unknown>;
313
+ custom_attributes: Record<string, unknown>;
314
+ blocked: boolean;
315
+ customer_stage: string;
316
+ customer_stage_explanation: string | null;
317
+ type?: string | undefined;
318
+ }>;
319
+ assignee: z.ZodNullable<z.ZodObject<{
320
+ id: z.ZodNumber;
321
+ name: z.ZodString;
322
+ email: z.ZodString;
323
+ }, "strip", z.ZodTypeAny, {
324
+ id: number;
325
+ name: string;
326
+ email: string;
327
+ }, {
328
+ id: number;
329
+ name: string;
330
+ email: string;
331
+ }>>;
332
+ team: z.ZodNullable<z.ZodUnknown>;
333
+ hmac_verified: z.ZodBoolean;
334
+ }, "strip", z.ZodTypeAny, {
335
+ sender: {
336
+ id: number;
337
+ name: string | null;
338
+ email: string | null;
339
+ thumbnail: string;
340
+ phone_number: string | null;
341
+ identifier: string | null;
342
+ additional_attributes: Record<string, unknown>;
343
+ custom_attributes: Record<string, unknown>;
344
+ blocked: boolean;
345
+ customer_stage: string;
346
+ customer_stage_explanation: string | null;
347
+ type?: string | undefined;
348
+ };
349
+ hmac_verified: boolean;
350
+ assignee: {
351
+ id: number;
352
+ name: string;
353
+ email: string;
354
+ } | null;
355
+ team?: unknown;
356
+ }, {
357
+ sender: {
358
+ id: number;
359
+ name: string | null;
360
+ email: string | null;
361
+ thumbnail: string;
362
+ phone_number: string | null;
363
+ identifier: string | null;
364
+ additional_attributes: Record<string, unknown>;
365
+ custom_attributes: Record<string, unknown>;
366
+ blocked: boolean;
367
+ customer_stage: string;
368
+ customer_stage_explanation: string | null;
369
+ type?: string | undefined;
370
+ };
371
+ hmac_verified: boolean;
372
+ assignee: {
373
+ id: number;
374
+ name: string;
375
+ email: string;
376
+ } | null;
377
+ team?: unknown;
378
+ }>;
379
+ export declare const ConversationSchema: z.ZodObject<{
380
+ id: z.ZodNumber;
381
+ account_id: z.ZodNumber;
382
+ inbox_id: z.ZodNumber;
383
+ status: z.ZodEnum<["open", "resolved", "pending", "snoozed"]>;
384
+ channel: z.ZodOptional<z.ZodString>;
385
+ can_reply: z.ZodOptional<z.ZodBoolean>;
386
+ contact_inbox: z.ZodOptional<z.ZodObject<{
387
+ id: z.ZodNumber;
388
+ contact_id: z.ZodNumber;
389
+ inbox_id: z.ZodNumber;
390
+ source_id: z.ZodNullable<z.ZodString>;
391
+ created_at: z.ZodString;
392
+ updated_at: z.ZodString;
393
+ hmac_verified: z.ZodBoolean;
394
+ pubsub_token: z.ZodString;
395
+ }, "strip", z.ZodTypeAny, {
396
+ id: number;
397
+ created_at: string;
398
+ contact_id: number;
399
+ inbox_id: number;
400
+ source_id: string | null;
401
+ updated_at: string;
402
+ hmac_verified: boolean;
403
+ pubsub_token: string;
404
+ }, {
405
+ id: number;
406
+ created_at: string;
407
+ contact_id: number;
408
+ inbox_id: number;
409
+ source_id: string | null;
410
+ updated_at: string;
411
+ hmac_verified: boolean;
412
+ pubsub_token: string;
413
+ }>>;
414
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
415
+ id: z.ZodNumber;
416
+ content: z.ZodString;
417
+ message_type: z.ZodEnum<["incoming", "outgoing"]>;
418
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
419
+ content_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
420
+ created_at: z.ZodNumber;
421
+ private: z.ZodBoolean;
422
+ conversation_id: z.ZodNumber;
423
+ sender: z.ZodOptional<z.ZodObject<{
424
+ id: z.ZodNumber;
425
+ name: z.ZodString;
426
+ email: z.ZodOptional<z.ZodString>;
427
+ type: z.ZodString;
428
+ }, "strip", z.ZodTypeAny, {
429
+ type: string;
430
+ id: number;
431
+ name: string;
432
+ email?: string | undefined;
433
+ }, {
434
+ type: string;
435
+ id: number;
436
+ name: string;
437
+ email?: string | undefined;
438
+ }>>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ content: string;
441
+ message_type: "incoming" | "outgoing";
442
+ private: boolean;
443
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
444
+ content_attributes: Record<string, unknown>;
445
+ id: number;
446
+ created_at: number;
447
+ conversation_id: number;
448
+ sender?: {
449
+ type: string;
450
+ id: number;
451
+ name: string;
452
+ email?: string | undefined;
453
+ } | undefined;
454
+ }, {
455
+ content: string;
456
+ message_type: "incoming" | "outgoing";
457
+ private: boolean;
458
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
459
+ content_attributes: Record<string, unknown>;
460
+ id: number;
461
+ created_at: number;
462
+ conversation_id: number;
463
+ sender?: {
464
+ type: string;
465
+ id: number;
466
+ name: string;
467
+ email?: string | undefined;
468
+ } | undefined;
469
+ }>, "many">>;
470
+ meta: z.ZodOptional<z.ZodObject<{
471
+ sender: z.ZodObject<{
472
+ id: z.ZodNumber;
473
+ name: z.ZodNullable<z.ZodString>;
474
+ email: z.ZodNullable<z.ZodString>;
475
+ phone_number: z.ZodNullable<z.ZodString>;
476
+ thumbnail: z.ZodString;
477
+ identifier: z.ZodNullable<z.ZodString>;
478
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
479
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
480
+ blocked: z.ZodBoolean;
481
+ customer_stage: z.ZodString;
482
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
483
+ type: z.ZodOptional<z.ZodString>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ id: number;
486
+ name: string | null;
487
+ email: string | null;
488
+ thumbnail: string;
489
+ phone_number: string | null;
490
+ identifier: string | null;
491
+ additional_attributes: Record<string, unknown>;
492
+ custom_attributes: Record<string, unknown>;
493
+ blocked: boolean;
494
+ customer_stage: string;
495
+ customer_stage_explanation: string | null;
496
+ type?: string | undefined;
497
+ }, {
498
+ id: number;
499
+ name: string | null;
500
+ email: string | null;
501
+ thumbnail: string;
502
+ phone_number: string | null;
503
+ identifier: string | null;
504
+ additional_attributes: Record<string, unknown>;
505
+ custom_attributes: Record<string, unknown>;
506
+ blocked: boolean;
507
+ customer_stage: string;
508
+ customer_stage_explanation: string | null;
509
+ type?: string | undefined;
510
+ }>;
511
+ assignee: z.ZodNullable<z.ZodObject<{
512
+ id: z.ZodNumber;
513
+ name: z.ZodString;
514
+ email: z.ZodString;
515
+ }, "strip", z.ZodTypeAny, {
516
+ id: number;
517
+ name: string;
518
+ email: string;
519
+ }, {
520
+ id: number;
521
+ name: string;
522
+ email: string;
523
+ }>>;
524
+ team: z.ZodNullable<z.ZodUnknown>;
525
+ hmac_verified: z.ZodBoolean;
526
+ }, "strip", z.ZodTypeAny, {
527
+ sender: {
528
+ id: number;
529
+ name: string | null;
530
+ email: string | null;
531
+ thumbnail: string;
532
+ phone_number: string | null;
533
+ identifier: string | null;
534
+ additional_attributes: Record<string, unknown>;
535
+ custom_attributes: Record<string, unknown>;
536
+ blocked: boolean;
537
+ customer_stage: string;
538
+ customer_stage_explanation: string | null;
539
+ type?: string | undefined;
540
+ };
541
+ hmac_verified: boolean;
542
+ assignee: {
543
+ id: number;
544
+ name: string;
545
+ email: string;
546
+ } | null;
547
+ team?: unknown;
548
+ }, {
549
+ sender: {
550
+ id: number;
551
+ name: string | null;
552
+ email: string | null;
553
+ thumbnail: string;
554
+ phone_number: string | null;
555
+ identifier: string | null;
556
+ additional_attributes: Record<string, unknown>;
557
+ custom_attributes: Record<string, unknown>;
558
+ blocked: boolean;
559
+ customer_stage: string;
560
+ customer_stage_explanation: string | null;
561
+ type?: string | undefined;
562
+ };
563
+ hmac_verified: boolean;
564
+ assignee: {
565
+ id: number;
566
+ name: string;
567
+ email: string;
568
+ } | null;
569
+ team?: unknown;
570
+ }>>;
571
+ labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
572
+ additional_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
573
+ custom_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
574
+ snoozed_until: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
575
+ unread_count: z.ZodOptional<z.ZodNumber>;
576
+ first_reply_created_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
577
+ priority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
578
+ waiting_since: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
579
+ ai_disabled: z.ZodOptional<z.ZodBoolean>;
580
+ reenable_ai_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
581
+ ai_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
582
+ conversation_type: z.ZodOptional<z.ZodString>;
583
+ agent_last_seen_at: z.ZodOptional<z.ZodNumber>;
584
+ contact_last_seen_at: z.ZodOptional<z.ZodNumber>;
585
+ last_activity_at: z.ZodOptional<z.ZodNumber>;
586
+ timestamp: z.ZodOptional<z.ZodNumber>;
587
+ created_at: z.ZodNumber;
588
+ updated_at: z.ZodNumber;
589
+ }, "strip", z.ZodTypeAny, {
590
+ status: "open" | "resolved" | "pending" | "snoozed";
591
+ id: number;
592
+ created_at: number;
593
+ inbox_id: number;
594
+ updated_at: number;
595
+ account_id: number;
596
+ priority?: string | null | undefined;
597
+ additional_attributes?: Record<string, unknown> | undefined;
598
+ custom_attributes?: Record<string, unknown> | undefined;
599
+ channel?: string | undefined;
600
+ can_reply?: boolean | undefined;
601
+ contact_inbox?: {
602
+ id: number;
603
+ created_at: string;
604
+ contact_id: number;
605
+ inbox_id: number;
606
+ source_id: string | null;
607
+ updated_at: string;
608
+ hmac_verified: boolean;
609
+ pubsub_token: string;
610
+ } | undefined;
611
+ messages?: {
612
+ content: string;
613
+ message_type: "incoming" | "outgoing";
614
+ private: boolean;
615
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
616
+ content_attributes: Record<string, unknown>;
617
+ id: number;
618
+ created_at: number;
619
+ conversation_id: number;
620
+ sender?: {
621
+ type: string;
622
+ id: number;
623
+ name: string;
624
+ email?: string | undefined;
625
+ } | undefined;
626
+ }[] | undefined;
627
+ meta?: {
628
+ sender: {
629
+ id: number;
630
+ name: string | null;
631
+ email: string | null;
632
+ thumbnail: string;
633
+ phone_number: string | null;
634
+ identifier: string | null;
635
+ additional_attributes: Record<string, unknown>;
636
+ custom_attributes: Record<string, unknown>;
637
+ blocked: boolean;
638
+ customer_stage: string;
639
+ customer_stage_explanation: string | null;
640
+ type?: string | undefined;
641
+ };
642
+ hmac_verified: boolean;
643
+ assignee: {
644
+ id: number;
645
+ name: string;
646
+ email: string;
647
+ } | null;
648
+ team?: unknown;
649
+ } | undefined;
650
+ labels?: string[] | undefined;
651
+ snoozed_until?: number | null | undefined;
652
+ unread_count?: number | undefined;
653
+ first_reply_created_at?: string | number | null | undefined;
654
+ waiting_since?: number | null | undefined;
655
+ ai_disabled?: boolean | undefined;
656
+ reenable_ai_at?: number | null | undefined;
657
+ ai_summary?: string | null | undefined;
658
+ conversation_type?: string | undefined;
659
+ agent_last_seen_at?: number | undefined;
660
+ contact_last_seen_at?: number | undefined;
661
+ last_activity_at?: number | undefined;
662
+ timestamp?: number | undefined;
663
+ }, {
664
+ status: "open" | "resolved" | "pending" | "snoozed";
665
+ id: number;
666
+ created_at: number;
667
+ inbox_id: number;
668
+ updated_at: number;
669
+ account_id: number;
670
+ priority?: string | null | undefined;
671
+ additional_attributes?: Record<string, unknown> | undefined;
672
+ custom_attributes?: Record<string, unknown> | undefined;
673
+ channel?: string | undefined;
674
+ can_reply?: boolean | undefined;
675
+ contact_inbox?: {
676
+ id: number;
677
+ created_at: string;
678
+ contact_id: number;
679
+ inbox_id: number;
680
+ source_id: string | null;
681
+ updated_at: string;
682
+ hmac_verified: boolean;
683
+ pubsub_token: string;
684
+ } | undefined;
685
+ messages?: {
686
+ content: string;
687
+ message_type: "incoming" | "outgoing";
688
+ private: boolean;
689
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
690
+ content_attributes: Record<string, unknown>;
691
+ id: number;
692
+ created_at: number;
693
+ conversation_id: number;
694
+ sender?: {
695
+ type: string;
696
+ id: number;
697
+ name: string;
698
+ email?: string | undefined;
699
+ } | undefined;
700
+ }[] | undefined;
701
+ meta?: {
702
+ sender: {
703
+ id: number;
704
+ name: string | null;
705
+ email: string | null;
706
+ thumbnail: string;
707
+ phone_number: string | null;
708
+ identifier: string | null;
709
+ additional_attributes: Record<string, unknown>;
710
+ custom_attributes: Record<string, unknown>;
711
+ blocked: boolean;
712
+ customer_stage: string;
713
+ customer_stage_explanation: string | null;
714
+ type?: string | undefined;
715
+ };
716
+ hmac_verified: boolean;
717
+ assignee: {
718
+ id: number;
719
+ name: string;
720
+ email: string;
721
+ } | null;
722
+ team?: unknown;
723
+ } | undefined;
724
+ labels?: string[] | undefined;
725
+ snoozed_until?: number | null | undefined;
726
+ unread_count?: number | undefined;
727
+ first_reply_created_at?: string | number | null | undefined;
728
+ waiting_since?: number | null | undefined;
729
+ ai_disabled?: boolean | undefined;
730
+ reenable_ai_at?: number | null | undefined;
731
+ ai_summary?: string | null | undefined;
732
+ conversation_type?: string | undefined;
733
+ agent_last_seen_at?: number | undefined;
734
+ contact_last_seen_at?: number | undefined;
735
+ last_activity_at?: number | undefined;
736
+ timestamp?: number | undefined;
737
+ }>;
738
+ export declare const MessagesResponseMetaSchema: z.ZodObject<{
739
+ labels: z.ZodArray<z.ZodString, "many">;
740
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
741
+ contact: z.ZodUnknown;
742
+ assignee: z.ZodNullable<z.ZodObject<{
743
+ id: z.ZodNumber;
744
+ name: z.ZodString;
745
+ email: z.ZodString;
746
+ }, "strip", z.ZodTypeAny, {
747
+ id: number;
748
+ name: string;
749
+ email: string;
750
+ }, {
751
+ id: number;
752
+ name: string;
753
+ email: string;
754
+ }>>;
755
+ agent_last_seen_at: z.ZodNullable<z.ZodString>;
756
+ assignee_last_seen_at: z.ZodNullable<z.ZodString>;
757
+ }, "strip", z.ZodTypeAny, {
758
+ additional_attributes: Record<string, unknown>;
759
+ assignee: {
760
+ id: number;
761
+ name: string;
762
+ email: string;
763
+ } | null;
764
+ labels: string[];
765
+ agent_last_seen_at: string | null;
766
+ assignee_last_seen_at: string | null;
767
+ contact?: unknown;
768
+ }, {
769
+ additional_attributes: Record<string, unknown>;
770
+ assignee: {
771
+ id: number;
772
+ name: string;
773
+ email: string;
774
+ } | null;
775
+ labels: string[];
776
+ agent_last_seen_at: string | null;
777
+ assignee_last_seen_at: string | null;
778
+ contact?: unknown;
779
+ }>;
780
+ export declare const MessagesResponseSchema: z.ZodObject<{
781
+ meta: z.ZodObject<{
782
+ labels: z.ZodArray<z.ZodString, "many">;
783
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
784
+ contact: z.ZodUnknown;
785
+ assignee: z.ZodNullable<z.ZodObject<{
786
+ id: z.ZodNumber;
787
+ name: z.ZodString;
788
+ email: z.ZodString;
789
+ }, "strip", z.ZodTypeAny, {
790
+ id: number;
791
+ name: string;
792
+ email: string;
793
+ }, {
794
+ id: number;
795
+ name: string;
796
+ email: string;
797
+ }>>;
798
+ agent_last_seen_at: z.ZodNullable<z.ZodString>;
799
+ assignee_last_seen_at: z.ZodNullable<z.ZodString>;
800
+ }, "strip", z.ZodTypeAny, {
801
+ additional_attributes: Record<string, unknown>;
802
+ assignee: {
803
+ id: number;
804
+ name: string;
805
+ email: string;
806
+ } | null;
807
+ labels: string[];
808
+ agent_last_seen_at: string | null;
809
+ assignee_last_seen_at: string | null;
810
+ contact?: unknown;
811
+ }, {
812
+ additional_attributes: Record<string, unknown>;
813
+ assignee: {
814
+ id: number;
815
+ name: string;
816
+ email: string;
817
+ } | null;
818
+ labels: string[];
819
+ agent_last_seen_at: string | null;
820
+ assignee_last_seen_at: string | null;
821
+ contact?: unknown;
822
+ }>;
823
+ payload: z.ZodArray<z.ZodObject<{
824
+ id: z.ZodNumber;
825
+ content: z.ZodString;
826
+ message_type: z.ZodEnum<["incoming", "outgoing"]>;
827
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
828
+ content_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
829
+ created_at: z.ZodNumber;
830
+ private: z.ZodBoolean;
831
+ conversation_id: z.ZodNumber;
832
+ sender: z.ZodOptional<z.ZodObject<{
833
+ id: z.ZodNumber;
834
+ name: z.ZodString;
835
+ email: z.ZodOptional<z.ZodString>;
836
+ type: z.ZodString;
837
+ }, "strip", z.ZodTypeAny, {
838
+ type: string;
839
+ id: number;
840
+ name: string;
841
+ email?: string | undefined;
842
+ }, {
843
+ type: string;
844
+ id: number;
845
+ name: string;
846
+ email?: string | undefined;
847
+ }>>;
848
+ }, "strip", z.ZodTypeAny, {
849
+ content: string;
850
+ message_type: "incoming" | "outgoing";
851
+ private: boolean;
852
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
853
+ content_attributes: Record<string, unknown>;
854
+ id: number;
855
+ created_at: number;
856
+ conversation_id: number;
857
+ sender?: {
858
+ type: string;
859
+ id: number;
860
+ name: string;
861
+ email?: string | undefined;
862
+ } | undefined;
863
+ }, {
864
+ content: string;
865
+ message_type: "incoming" | "outgoing";
866
+ private: boolean;
867
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
868
+ content_attributes: Record<string, unknown>;
869
+ id: number;
870
+ created_at: number;
871
+ conversation_id: number;
872
+ sender?: {
873
+ type: string;
874
+ id: number;
875
+ name: string;
876
+ email?: string | undefined;
877
+ } | undefined;
878
+ }>, "many">;
879
+ }, "strip", z.ZodTypeAny, {
880
+ meta: {
881
+ additional_attributes: Record<string, unknown>;
882
+ assignee: {
883
+ id: number;
884
+ name: string;
885
+ email: string;
886
+ } | null;
887
+ labels: string[];
888
+ agent_last_seen_at: string | null;
889
+ assignee_last_seen_at: string | null;
890
+ contact?: unknown;
891
+ };
892
+ payload: {
893
+ content: string;
894
+ message_type: "incoming" | "outgoing";
895
+ private: boolean;
896
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
897
+ content_attributes: Record<string, unknown>;
898
+ id: number;
899
+ created_at: number;
900
+ conversation_id: number;
901
+ sender?: {
902
+ type: string;
903
+ id: number;
904
+ name: string;
905
+ email?: string | undefined;
906
+ } | undefined;
907
+ }[];
908
+ }, {
909
+ meta: {
910
+ additional_attributes: Record<string, unknown>;
911
+ assignee: {
912
+ id: number;
913
+ name: string;
914
+ email: string;
915
+ } | null;
916
+ labels: string[];
917
+ agent_last_seen_at: string | null;
918
+ assignee_last_seen_at: string | null;
919
+ contact?: unknown;
920
+ };
921
+ payload: {
922
+ content: string;
923
+ message_type: "incoming" | "outgoing";
924
+ private: boolean;
925
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
926
+ content_attributes: Record<string, unknown>;
927
+ id: number;
928
+ created_at: number;
929
+ conversation_id: number;
930
+ sender?: {
931
+ type: string;
932
+ id: number;
933
+ name: string;
934
+ email?: string | undefined;
935
+ } | undefined;
936
+ }[];
937
+ }>;
938
+ /**
939
+ * TypeScript Types (inferred from Zod schemas)
940
+ */
941
+ export type MessageType = z.infer<typeof MessageTypeSchema>;
942
+ export type ContentType = z.infer<typeof ContentTypeSchema>;
943
+ export type CreateMessageParams = z.infer<typeof CreateMessageParamsSchema>;
944
+ export type Message = z.infer<typeof MessageSchema>;
945
+ export type EscalationType = z.infer<typeof EscalationTypeSchema>;
946
+ export type Priority = z.infer<typeof PrioritySchema>;
947
+ export type Team = z.infer<typeof TeamSchema>;
948
+ export type Agent = z.infer<typeof AgentSchema>;
949
+ export type EscalationResponse = z.infer<typeof EscalationResponseSchema>;
950
+ export type ConversationStatus = z.infer<typeof ConversationStatusSchema>;
951
+ export type Contact = z.infer<typeof ContactSchema>;
952
+ export type ContactInbox = z.infer<typeof ContactInboxSchema>;
953
+ export type Assignee = z.infer<typeof AssigneeSchema>;
954
+ export type ConversationMeta = z.infer<typeof ConversationMetaSchema>;
955
+ export type Conversation = z.infer<typeof ConversationSchema>;
956
+ export type MessagesResponseMeta = z.infer<typeof MessagesResponseMetaSchema>;
957
+ export type MessagesResponse = z.infer<typeof MessagesResponseSchema>;
958
+ //# sourceMappingURL=types.d.ts.map