@sentdm/sentdm 0.32.0 → 0.34.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 (94) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/client.d.mts +11 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/contacts.d.mts +66 -1
  12. package/resources/contacts.d.mts.map +1 -1
  13. package/resources/contacts.d.ts +66 -1
  14. package/resources/contacts.d.ts.map +1 -1
  15. package/resources/contacts.js +24 -0
  16. package/resources/contacts.js.map +1 -1
  17. package/resources/contacts.mjs +24 -0
  18. package/resources/contacts.mjs.map +1 -1
  19. package/resources/conversations.d.mts +160 -0
  20. package/resources/conversations.d.mts.map +1 -0
  21. package/resources/conversations.d.ts +160 -0
  22. package/resources/conversations.d.ts.map +1 -0
  23. package/resources/conversations.js +59 -0
  24. package/resources/conversations.js.map +1 -0
  25. package/resources/conversations.mjs +55 -0
  26. package/resources/conversations.mjs.map +1 -0
  27. package/resources/index.d.mts +5 -4
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +5 -4
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js +3 -1
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs +1 -0
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/messages.d.mts +7 -3
  36. package/resources/messages.d.mts.map +1 -1
  37. package/resources/messages.d.ts +7 -3
  38. package/resources/messages.d.ts.map +1 -1
  39. package/resources/messages.js +6 -1
  40. package/resources/messages.js.map +1 -1
  41. package/resources/messages.mjs +6 -1
  42. package/resources/messages.mjs.map +1 -1
  43. package/resources/profiles/campaigns.d.mts +112 -83
  44. package/resources/profiles/campaigns.d.mts.map +1 -1
  45. package/resources/profiles/campaigns.d.ts +112 -83
  46. package/resources/profiles/campaigns.d.ts.map +1 -1
  47. package/resources/profiles/campaigns.js +6 -5
  48. package/resources/profiles/campaigns.js.map +1 -1
  49. package/resources/profiles/campaigns.mjs +6 -5
  50. package/resources/profiles/campaigns.mjs.map +1 -1
  51. package/resources/profiles/index.d.mts +2 -2
  52. package/resources/profiles/index.d.mts.map +1 -1
  53. package/resources/profiles/index.d.ts +2 -2
  54. package/resources/profiles/index.d.ts.map +1 -1
  55. package/resources/profiles/profiles.d.mts +151 -139
  56. package/resources/profiles/profiles.d.mts.map +1 -1
  57. package/resources/profiles/profiles.d.ts +151 -139
  58. package/resources/profiles/profiles.d.ts.map +1 -1
  59. package/resources/profiles/profiles.js +39 -21
  60. package/resources/profiles/profiles.js.map +1 -1
  61. package/resources/profiles/profiles.mjs +39 -21
  62. package/resources/profiles/profiles.mjs.map +1 -1
  63. package/resources/templates.d.mts +87 -87
  64. package/resources/templates.d.mts.map +1 -1
  65. package/resources/templates.d.ts +87 -87
  66. package/resources/templates.d.ts.map +1 -1
  67. package/resources/users.d.mts +5 -3
  68. package/resources/users.d.mts.map +1 -1
  69. package/resources/users.d.ts +5 -3
  70. package/resources/users.d.ts.map +1 -1
  71. package/resources/users.js +5 -3
  72. package/resources/users.js.map +1 -1
  73. package/resources/users.mjs +5 -3
  74. package/resources/users.mjs.map +1 -1
  75. package/resources/webhooks.d.mts +226 -2
  76. package/resources/webhooks.d.mts.map +1 -1
  77. package/resources/webhooks.d.ts +226 -2
  78. package/resources/webhooks.d.ts.map +1 -1
  79. package/src/client.ts +53 -18
  80. package/src/resources/contacts.ts +96 -0
  81. package/src/resources/conversations.ts +238 -0
  82. package/src/resources/index.ts +25 -9
  83. package/src/resources/messages.ts +7 -3
  84. package/src/resources/profiles/campaigns.ts +160 -132
  85. package/src/resources/profiles/index.ts +8 -8
  86. package/src/resources/profiles/profiles.ts +185 -175
  87. package/src/resources/templates.ts +105 -105
  88. package/src/resources/users.ts +5 -3
  89. package/src/resources/webhooks.ts +269 -1
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.ts +1 -1
  93. package/version.js +1 -1
  94. package/version.mjs +1 -1
@@ -169,7 +169,7 @@ export interface APIResponseTemplate {
169
169
  /**
170
170
  * Configuration for AUTHENTICATION category templates
171
171
  */
172
- export interface SentDmServicesCommonContractsPocOsAuthenticationConfig {
172
+ export interface AuthenticationConfig {
173
173
  /**
174
174
  * Whether to add the security recommendation text: "For your security, do not
175
175
  * share this code."
@@ -183,10 +183,65 @@ export interface SentDmServicesCommonContractsPocOsAuthenticationConfig {
183
183
  codeExpirationMinutes?: number | null;
184
184
  }
185
185
 
186
+ /**
187
+ * Template response for v3 API
188
+ */
189
+ export interface Template {
190
+ /**
191
+ * Unique template identifier
192
+ */
193
+ id?: string;
194
+
195
+ /**
196
+ * Template category: MARKETING, UTILITY, AUTHENTICATION
197
+ */
198
+ category?: string;
199
+
200
+ /**
201
+ * Supported channels: sms, whatsapp
202
+ */
203
+ channels?: Array<string> | null;
204
+
205
+ /**
206
+ * When the template was created
207
+ */
208
+ created_at?: string;
209
+
210
+ /**
211
+ * Whether the template is published and active
212
+ */
213
+ is_published?: boolean;
214
+
215
+ /**
216
+ * Template language code (e.g., en_US)
217
+ */
218
+ language?: string;
219
+
220
+ /**
221
+ * Template display name
222
+ */
223
+ name?: string;
224
+
225
+ /**
226
+ * Template status: APPROVED, PENDING, REJECTED
227
+ */
228
+ status?: string;
229
+
230
+ /**
231
+ * When the template was last updated
232
+ */
233
+ updated_at?: string | null;
234
+
235
+ /**
236
+ * Template variables for personalization
237
+ */
238
+ variables?: Array<string> | null;
239
+ }
240
+
186
241
  /**
187
242
  * Body section of a message template with channel-specific content
188
243
  */
189
- export interface SentDmServicesCommonContractsPocOsTemplateBody {
244
+ export interface TemplateBody {
190
245
  /**
191
246
  * Content that will be used for all channels (SMS and WhatsApp) unless
192
247
  * channel-specific content is provided
@@ -210,14 +265,22 @@ export interface SentDmServicesCommonContractsPocOsTemplateBody {
210
265
  whatsapp?: TemplateBodyContent | null;
211
266
  }
212
267
 
268
+ export interface TemplateBodyContent {
269
+ template: string;
270
+
271
+ type?: string | null;
272
+
273
+ variables?: Array<TemplateVariable> | null;
274
+ }
275
+
213
276
  /**
214
277
  * Interactive button in a message template
215
278
  */
216
- export interface SentDmServicesCommonContractsPocOsTemplateButton {
279
+ export interface TemplateButton {
217
280
  /**
218
281
  * Properties specific to the button type
219
282
  */
220
- props: SentDmServicesCommonContractsPocOsTemplateButtonProps;
283
+ props: TemplateButtonProps;
221
284
 
222
285
  /**
223
286
  * The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
@@ -230,7 +293,7 @@ export interface SentDmServicesCommonContractsPocOsTemplateButton {
230
293
  id?: number;
231
294
  }
232
295
 
233
- export interface SentDmServicesCommonContractsPocOsTemplateButtonProps {
296
+ export interface TemplateButtonProps {
234
297
  activeFor: number;
235
298
 
236
299
  countryCode: string;
@@ -264,143 +327,80 @@ export interface SentDmServicesCommonContractsPocOsTemplateButtonProps {
264
327
  }
265
328
 
266
329
  /**
267
- * Footer section of a message template
330
+ * Complete definition of a message template including header, body, footer, and
331
+ * buttons
268
332
  */
269
- export interface SentDmServicesCommonContractsPocOsTemplateFooter {
333
+ export interface TemplateDefinition {
270
334
  /**
271
- * The footer template text with optional variable placeholders
335
+ * Body section of a message template with channel-specific content
272
336
  */
273
- template: string;
337
+ body: TemplateBody;
274
338
 
275
339
  /**
276
- * The type of footer (typically "text")
340
+ * Configuration for AUTHENTICATION category templates
277
341
  */
278
- type?: string | null;
342
+ authenticationConfig?: AuthenticationConfig | null;
279
343
 
280
344
  /**
281
- * List of variables used in the footer template
345
+ * Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
282
346
  */
283
- variables?: Array<TemplateVariable> | null;
284
- }
347
+ buttons?: Array<TemplateButton> | null;
285
348
 
286
- /**
287
- * Header section of a message template
288
- */
289
- export interface SentDmServicesCommonContractsPocOsTemplateHeader {
290
349
  /**
291
- * The header template text with optional variable placeholders (e.g., "Welcome to
292
- * {{0:variable}}")
350
+ * The version of the template definition format
293
351
  */
294
- template: string;
352
+ definitionVersion?: string | null;
295
353
 
296
354
  /**
297
- * The type of header (e.g., "text", "image", "video", "document")
355
+ * Footer section of a message template
298
356
  */
299
- type?: string | null;
357
+ footer?: TemplateFooter | null;
300
358
 
301
359
  /**
302
- * List of variables used in the header template
360
+ * Header section of a message template
303
361
  */
304
- variables?: Array<TemplateVariable> | null;
362
+ header?: TemplateHeader | null;
305
363
  }
306
364
 
307
365
  /**
308
- * Template response for v3 API
366
+ * Footer section of a message template
309
367
  */
310
- export interface Template {
311
- /**
312
- * Unique template identifier
313
- */
314
- id?: string;
315
-
316
- /**
317
- * Template category: MARKETING, UTILITY, AUTHENTICATION
318
- */
319
- category?: string;
320
-
321
- /**
322
- * Supported channels: sms, whatsapp
323
- */
324
- channels?: Array<string> | null;
325
-
368
+ export interface TemplateFooter {
326
369
  /**
327
- * When the template was created
328
- */
329
- created_at?: string;
330
-
331
- /**
332
- * Whether the template is published and active
333
- */
334
- is_published?: boolean;
335
-
336
- /**
337
- * Template language code (e.g., en_US)
338
- */
339
- language?: string;
340
-
341
- /**
342
- * Template display name
343
- */
344
- name?: string;
345
-
346
- /**
347
- * Template status: APPROVED, PENDING, REJECTED
370
+ * The footer template text with optional variable placeholders
348
371
  */
349
- status?: string;
372
+ template: string;
350
373
 
351
374
  /**
352
- * When the template was last updated
375
+ * The type of footer (typically "text")
353
376
  */
354
- updated_at?: string | null;
377
+ type?: string | null;
355
378
 
356
379
  /**
357
- * Template variables for personalization
380
+ * List of variables used in the footer template
358
381
  */
359
- variables?: Array<string> | null;
360
- }
361
-
362
- export interface TemplateBodyContent {
363
- template: string;
364
-
365
- type?: string | null;
366
-
367
382
  variables?: Array<TemplateVariable> | null;
368
383
  }
369
384
 
370
385
  /**
371
- * Complete definition of a message template including header, body, footer, and
372
- * buttons
386
+ * Header section of a message template
373
387
  */
374
- export interface TemplateDefinition {
388
+ export interface TemplateHeader {
375
389
  /**
376
- * Body section of a message template with channel-specific content
377
- */
378
- body: SentDmServicesCommonContractsPocOsTemplateBody;
379
-
380
- /**
381
- * Configuration for AUTHENTICATION category templates
382
- */
383
- authenticationConfig?: SentDmServicesCommonContractsPocOsAuthenticationConfig | null;
384
-
385
- /**
386
- * Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
387
- */
388
- buttons?: Array<SentDmServicesCommonContractsPocOsTemplateButton> | null;
389
-
390
- /**
391
- * The version of the template definition format
390
+ * The header template text with optional variable placeholders (e.g., "Welcome to
391
+ * {{0:variable}}")
392
392
  */
393
- definitionVersion?: string | null;
393
+ template: string;
394
394
 
395
395
  /**
396
- * Footer section of a message template
396
+ * The type of header (e.g., "text", "image", "video", "document")
397
397
  */
398
- footer?: SentDmServicesCommonContractsPocOsTemplateFooter | null;
398
+ type?: string | null;
399
399
 
400
400
  /**
401
- * Header section of a message template
401
+ * List of variables used in the header template
402
402
  */
403
- header?: SentDmServicesCommonContractsPocOsTemplateHeader | null;
403
+ variables?: Array<TemplateVariable> | null;
404
404
  }
405
405
 
406
406
  export interface TemplateVariable {
@@ -644,15 +644,15 @@ export interface TemplateDeleteParams {
644
644
  export declare namespace Templates {
645
645
  export {
646
646
  type APIResponseTemplate as APIResponseTemplate,
647
- type SentDmServicesCommonContractsPocOsAuthenticationConfig as SentDmServicesCommonContractsPocOsAuthenticationConfig,
648
- type SentDmServicesCommonContractsPocOsTemplateBody as SentDmServicesCommonContractsPocOsTemplateBody,
649
- type SentDmServicesCommonContractsPocOsTemplateButton as SentDmServicesCommonContractsPocOsTemplateButton,
650
- type SentDmServicesCommonContractsPocOsTemplateButtonProps as SentDmServicesCommonContractsPocOsTemplateButtonProps,
651
- type SentDmServicesCommonContractsPocOsTemplateFooter as SentDmServicesCommonContractsPocOsTemplateFooter,
652
- type SentDmServicesCommonContractsPocOsTemplateHeader as SentDmServicesCommonContractsPocOsTemplateHeader,
647
+ type AuthenticationConfig as AuthenticationConfig,
653
648
  type Template as Template,
649
+ type TemplateBody as TemplateBody,
654
650
  type TemplateBodyContent as TemplateBodyContent,
651
+ type TemplateButton as TemplateButton,
652
+ type TemplateButtonProps as TemplateButtonProps,
655
653
  type TemplateDefinition as TemplateDefinition,
654
+ type TemplateFooter as TemplateFooter,
655
+ type TemplateHeader as TemplateHeader,
656
656
  type TemplateVariable as TemplateVariable,
657
657
  type TemplateListResponse as TemplateListResponse,
658
658
  type TemplateCreateParams as TemplateCreateParams,
@@ -19,7 +19,7 @@ export class Users extends APIResource {
19
19
  * @example
20
20
  * ```ts
21
21
  * const apiResponseOfUser = await client.users.retrieve(
22
- * 'userId',
22
+ * '880e8400-e29b-41d4-a716-446655440003',
23
23
  * );
24
24
  * ```
25
25
  */
@@ -93,7 +93,9 @@ export class Users extends APIResource {
93
93
  *
94
94
  * @example
95
95
  * ```ts
96
- * await client.users.remove('userId');
96
+ * await client.users.remove(
97
+ * 'aa0e8400-e29b-41d4-a716-446655440005',
98
+ * );
97
99
  * ```
98
100
  */
99
101
  remove(userID: string, params: UserRemoveParams, options?: RequestOptions): APIPromise<void> {
@@ -115,7 +117,7 @@ export class Users extends APIResource {
115
117
  * @example
116
118
  * ```ts
117
119
  * const apiResponseOfUser = await client.users.updateRole(
118
- * 'userId',
120
+ * 'aa0e8400-e29b-41d4-a716-446655440005',
119
121
  * );
120
122
  * ```
121
123
  */
@@ -337,6 +337,177 @@ export interface ErrorDetail {
337
337
  message?: string;
338
338
  }
339
339
 
340
+ /**
341
+ * The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
342
+ * this shape and varies only in Payload.
343
+ */
344
+ export interface InboundMessageEvent {
345
+ /**
346
+ * The specific event within the family, for example message.delivered or
347
+ * message.received. Absent on events that have no subtype, so treat it as
348
+ * optional.
349
+ */
350
+ event?: string | null;
351
+
352
+ /**
353
+ * The event family, for example message or templates. Route on this first, then on
354
+ * event for the specific change.
355
+ */
356
+ field?: string;
357
+
358
+ /**
359
+ * Body of a message.received event. Delivered when a contact messages one of your
360
+ * numbers.
361
+ */
362
+ payload?: InboundMessageEventPayload | null;
363
+
364
+ /**
365
+ * When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
366
+ * time, not the time the underlying change happened. Use the timestamp inside the
367
+ * payload for the latter.
368
+ */
369
+ timestamp?: string;
370
+ }
371
+
372
+ /**
373
+ * Body of a message.received event. Delivered when a contact messages one of your
374
+ * numbers.
375
+ */
376
+ export interface InboundMessageEventPayload {
377
+ /**
378
+ * The account the message belongs to.
379
+ */
380
+ account_id?: string;
381
+
382
+ /**
383
+ * The channel the message arrived on, for example sms or whatsapp.
384
+ */
385
+ channel?: string;
386
+
387
+ /**
388
+ * The contact's number in E.164 format, meaning the number the message came from.
389
+ */
390
+ inbound_number?: string;
391
+
392
+ /**
393
+ * The inbound message.
394
+ */
395
+ message_id?: string;
396
+
397
+ /**
398
+ * Your number in E.164 format, meaning the number the message was addressed to.
399
+ */
400
+ outbound_number?: string;
401
+
402
+ /**
403
+ * When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ).
404
+ */
405
+ received_at?: string;
406
+
407
+ /**
408
+ * The message body. Sent as null when the inbound message carried no text, for
409
+ * example a media-only message. The field is always present, so read it and check
410
+ * for null rather than checking whether the key exists.
411
+ */
412
+ text?: string | null;
413
+
414
+ /**
415
+ * When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ). Same value as
416
+ * ReceivedAt, kept for envelope consistency with outbound events.
417
+ */
418
+ updated_at?: string;
419
+ }
420
+
421
+ /**
422
+ * The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
423
+ * this shape and varies only in Payload.
424
+ */
425
+ export interface MessageEvent {
426
+ /**
427
+ * The specific event within the family, for example message.delivered or
428
+ * message.received. Absent on events that have no subtype, so treat it as
429
+ * optional.
430
+ */
431
+ event?: string | null;
432
+
433
+ /**
434
+ * The event family, for example message or templates. Route on this first, then on
435
+ * event for the specific change.
436
+ */
437
+ field?: string;
438
+
439
+ /**
440
+ * Body of an outbound message lifecycle event. Delivered once per status change,
441
+ * so a single message produces several of these as it moves toward a terminal
442
+ * status.
443
+ */
444
+ payload?: MessageEventPayload | null;
445
+
446
+ /**
447
+ * When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
448
+ * time, not the time the underlying change happened. Use the timestamp inside the
449
+ * payload for the latter.
450
+ */
451
+ timestamp?: string;
452
+ }
453
+
454
+ /**
455
+ * Body of an outbound message lifecycle event. Delivered once per status change,
456
+ * so a single message produces several of these as it moves toward a terminal
457
+ * status.
458
+ */
459
+ export interface MessageEventPayload {
460
+ /**
461
+ * The account the message belongs to.
462
+ */
463
+ account_id?: string;
464
+
465
+ /**
466
+ * The agent attributed to the send, when the send was attributed to one.
467
+ */
468
+ agent_id?: string | null;
469
+
470
+ /**
471
+ * The channel the message went out on, for example sms or whatsapp. A message that
472
+ * falls back to another channel reports the channel actually used.
473
+ */
474
+ channel?: string;
475
+
476
+ /**
477
+ * The message this event describes. Stable across every event in the message's
478
+ * lifecycle, so use it to correlate them.
479
+ */
480
+ message_id?: string;
481
+
482
+ /**
483
+ * The status the message just reached, for example SENT, DELIVERED, or FAILED.
484
+ * Sent means dispatched and delivered means confirmed, so treat them as distinct
485
+ * outcomes.
486
+ */
487
+ message_status?: string;
488
+
489
+ /**
490
+ * The recipient's number in E.164 format.
491
+ */
492
+ outbound_number?: string;
493
+
494
+ /**
495
+ * The template the message was sent from, when it was sent from one.
496
+ */
497
+ template_id?: string | null;
498
+
499
+ /**
500
+ * Name of the template the message was sent from. Omitted when the message wasn't
501
+ * template-based.
502
+ */
503
+ template_name?: string | null;
504
+
505
+ /**
506
+ * When the message reached MessageStatus, in UTC (yyyy-MM-ddTHH:mm:ssZ).
507
+ */
508
+ updated_at?: string;
509
+ }
510
+
340
511
  export interface MutationRequest {
341
512
  /**
342
513
  * Sandbox flag - when true, the operation is simulated without side effects Useful
@@ -397,6 +568,91 @@ export namespace PaginationMeta {
397
568
  }
398
569
  }
399
570
 
571
+ /**
572
+ * The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
573
+ * this shape and varies only in Payload.
574
+ */
575
+ export interface TemplateEvent {
576
+ /**
577
+ * The specific event within the family, for example message.delivered or
578
+ * message.received. Absent on events that have no subtype, so treat it as
579
+ * optional.
580
+ */
581
+ event?: string | null;
582
+
583
+ /**
584
+ * The event family, for example message or templates. Route on this first, then on
585
+ * event for the specific change.
586
+ */
587
+ field?: string;
588
+
589
+ /**
590
+ * Body of a template status event. Delivered when a template's review outcome
591
+ * changes, so you can react without polling.
592
+ */
593
+ payload?: TemplateEventPayload | null;
594
+
595
+ /**
596
+ * When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
597
+ * time, not the time the underlying change happened. Use the timestamp inside the
598
+ * payload for the latter.
599
+ */
600
+ timestamp?: string;
601
+ }
602
+
603
+ /**
604
+ * Body of a template status event. Delivered when a template's review outcome
605
+ * changes, so you can react without polling.
606
+ */
607
+ export interface TemplateEventPayload {
608
+ /**
609
+ * The account the template belongs to.
610
+ */
611
+ account_id?: string;
612
+
613
+ /**
614
+ * The template's category, for example UTILITY, MARKETING, or AUTHENTICATION.
615
+ */
616
+ category?: string;
617
+
618
+ /**
619
+ * The channel the template applies to.
620
+ */
621
+ channel?: string;
622
+
623
+ /**
624
+ * The template's language code, for example en_US.
625
+ */
626
+ language?: string;
627
+
628
+ /**
629
+ * Why the template reached Status, when a reason was given. Populated on a
630
+ * rejection.
631
+ */
632
+ reason?: string | null;
633
+
634
+ /**
635
+ * The review status the template just reached, for example APPROVED or REJECTED.
636
+ */
637
+ status?: string;
638
+
639
+ /**
640
+ * The template in Sent.
641
+ */
642
+ template_id?: string;
643
+
644
+ /**
645
+ * The template's display name.
646
+ */
647
+ template_name?: string;
648
+
649
+ /**
650
+ * The template's identifier with Meta, assigned when the template is submitted for
651
+ * review.
652
+ */
653
+ whatsapp_template_id?: string;
654
+ }
655
+
400
656
  export interface WebhookEventType {
401
657
  description?: string | null;
402
658
 
@@ -564,7 +820,13 @@ export namespace WebhookListEventsResponse {
564
820
 
565
821
  error_message?: string | null;
566
822
 
567
- event_data?: unknown;
823
+ /**
824
+ * The exact event body that was delivered, or attempted, for this record. One of
825
+ * the three webhook envelopes: a message status change, an inbound message, or a
826
+ * template status change. Read field and event to tell which, the same way your
827
+ * endpoint does.
828
+ */
829
+ event_data?: WebhooksAPI.MessageEvent | WebhooksAPI.InboundMessageEvent | WebhooksAPI.TemplateEvent;
568
830
 
569
831
  event_type?: string;
570
832
 
@@ -911,8 +1173,14 @@ export declare namespace Webhooks {
911
1173
  type APIMeta as APIMeta,
912
1174
  type APIResponseWebhook as APIResponseWebhook,
913
1175
  type ErrorDetail as ErrorDetail,
1176
+ type InboundMessageEvent as InboundMessageEvent,
1177
+ type InboundMessageEventPayload as InboundMessageEventPayload,
1178
+ type MessageEvent as MessageEvent,
1179
+ type MessageEventPayload as MessageEventPayload,
914
1180
  type MutationRequest as MutationRequest,
915
1181
  type PaginationMeta as PaginationMeta,
1182
+ type TemplateEvent as TemplateEvent,
1183
+ type TemplateEventPayload as TemplateEventPayload,
916
1184
  type WebhookEventType as WebhookEventType,
917
1185
  type WebhookResponse as WebhookResponse,
918
1186
  type WebhookListResponse as WebhookListResponse,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.32.0'; // x-release-please-version
1
+ export const VERSION = '0.34.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.32.0";
1
+ export declare const VERSION = "0.34.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.32.0";
1
+ export declare const VERSION = "0.34.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.32.0'; // x-release-please-version
4
+ exports.VERSION = '0.34.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.32.0'; // x-release-please-version
1
+ export const VERSION = '0.34.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map