@sentdm/sentdm 0.34.0 → 0.36.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 (120) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/client.d.mts +53 -22
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +53 -22
  5. package/client.d.ts.map +1 -1
  6. package/client.js +39 -8
  7. package/client.js.map +1 -1
  8. package/client.mjs +39 -8
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/contacts.d.mts +606 -89
  12. package/resources/contacts.d.mts.map +1 -1
  13. package/resources/contacts.d.ts +606 -89
  14. package/resources/contacts.d.ts.map +1 -1
  15. package/resources/contacts.js +21 -15
  16. package/resources/contacts.js.map +1 -1
  17. package/resources/contacts.mjs +21 -15
  18. package/resources/contacts.mjs.map +1 -1
  19. package/resources/conversations.d.mts +335 -69
  20. package/resources/conversations.d.mts.map +1 -1
  21. package/resources/conversations.d.ts +335 -69
  22. package/resources/conversations.d.ts.map +1 -1
  23. package/resources/conversations.js +15 -10
  24. package/resources/conversations.js.map +1 -1
  25. package/resources/conversations.mjs +15 -10
  26. package/resources/conversations.mjs.map +1 -1
  27. package/resources/index.d.mts +7 -7
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +7 -7
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/me.d.mts +165 -41
  34. package/resources/me.d.mts.map +1 -1
  35. package/resources/me.d.ts +165 -41
  36. package/resources/me.d.ts.map +1 -1
  37. package/resources/me.js +14 -1
  38. package/resources/me.js.map +1 -1
  39. package/resources/me.mjs +14 -1
  40. package/resources/me.mjs.map +1 -1
  41. package/resources/messages.d.mts +206 -27
  42. package/resources/messages.d.mts.map +1 -1
  43. package/resources/messages.d.ts +206 -27
  44. package/resources/messages.d.ts.map +1 -1
  45. package/resources/messages.js +5 -1
  46. package/resources/messages.js.map +1 -1
  47. package/resources/messages.mjs +5 -1
  48. package/resources/messages.mjs.map +1 -1
  49. package/resources/numbers.d.mts +45 -4
  50. package/resources/numbers.d.mts.map +1 -1
  51. package/resources/numbers.d.ts +45 -4
  52. package/resources/numbers.d.ts.map +1 -1
  53. package/resources/numbers.js +3 -1
  54. package/resources/numbers.js.map +1 -1
  55. package/resources/numbers.mjs +3 -1
  56. package/resources/numbers.mjs.map +1 -1
  57. package/resources/profiles/campaigns.d.mts +579 -209
  58. package/resources/profiles/campaigns.d.mts.map +1 -1
  59. package/resources/profiles/campaigns.d.ts +579 -209
  60. package/resources/profiles/campaigns.d.ts.map +1 -1
  61. package/resources/profiles/campaigns.js +33 -64
  62. package/resources/profiles/campaigns.js.map +1 -1
  63. package/resources/profiles/campaigns.mjs +33 -64
  64. package/resources/profiles/campaigns.mjs.map +1 -1
  65. package/resources/profiles/index.d.mts +2 -2
  66. package/resources/profiles/index.d.mts.map +1 -1
  67. package/resources/profiles/index.d.ts +2 -2
  68. package/resources/profiles/index.d.ts.map +1 -1
  69. package/resources/profiles/index.js.map +1 -1
  70. package/resources/profiles/index.mjs.map +1 -1
  71. package/resources/profiles/profiles.d.mts +2006 -508
  72. package/resources/profiles/profiles.d.mts.map +1 -1
  73. package/resources/profiles/profiles.d.ts +2006 -508
  74. package/resources/profiles/profiles.d.ts.map +1 -1
  75. package/resources/profiles/profiles.js +98 -75
  76. package/resources/profiles/profiles.js.map +1 -1
  77. package/resources/profiles/profiles.mjs +98 -75
  78. package/resources/profiles/profiles.mjs.map +1 -1
  79. package/resources/templates.d.mts +497 -84
  80. package/resources/templates.d.mts.map +1 -1
  81. package/resources/templates.d.ts +497 -84
  82. package/resources/templates.d.ts.map +1 -1
  83. package/resources/templates.js +6 -4
  84. package/resources/templates.js.map +1 -1
  85. package/resources/templates.mjs +6 -4
  86. package/resources/templates.mjs.map +1 -1
  87. package/resources/users.d.mts +444 -43
  88. package/resources/users.d.mts.map +1 -1
  89. package/resources/users.d.ts +444 -43
  90. package/resources/users.d.ts.map +1 -1
  91. package/resources/users.js +6 -4
  92. package/resources/users.js.map +1 -1
  93. package/resources/users.mjs +6 -4
  94. package/resources/users.mjs.map +1 -1
  95. package/resources/webhooks.d.mts +791 -190
  96. package/resources/webhooks.d.mts.map +1 -1
  97. package/resources/webhooks.d.ts +791 -190
  98. package/resources/webhooks.d.ts.map +1 -1
  99. package/resources/webhooks.js +11 -8
  100. package/resources/webhooks.js.map +1 -1
  101. package/resources/webhooks.mjs +11 -8
  102. package/resources/webhooks.mjs.map +1 -1
  103. package/src/client.ts +78 -60
  104. package/src/resources/contacts.ts +696 -92
  105. package/src/resources/conversations.ts +400 -77
  106. package/src/resources/index.ts +20 -26
  107. package/src/resources/me.ts +186 -52
  108. package/src/resources/messages.ts +230 -27
  109. package/src/resources/numbers.ts +50 -4
  110. package/src/resources/profiles/campaigns.ts +706 -232
  111. package/src/resources/profiles/index.ts +6 -14
  112. package/src/resources/profiles/profiles.ts +2421 -646
  113. package/src/resources/templates.ts +583 -99
  114. package/src/resources/users.ts +514 -44
  115. package/src/resources/webhooks.ts +964 -241
  116. package/src/version.ts +1 -1
  117. package/version.d.mts +1 -1
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
  120. package/version.mjs +1 -1
@@ -1,15 +1,15 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import * as TemplatesAPI from './templates';
5
- import * as WebhooksAPI from './webhooks';
6
4
  import { APIPromise } from '../core/api-promise';
7
5
  import { buildHeaders } from '../internal/headers';
8
6
  import { RequestOptions } from '../internal/request-options';
9
7
  import { path } from '../internal/utils/path';
10
8
 
11
9
  /**
12
- * Manage message templates with variable substitution
10
+ * Reusable message bodies with named variables.
11
+ *
12
+ * A template is substituted at send time from the values you pass, so the copy lives here rather than in your application. WhatsApp templates additionally need Meta's approval before they can be sent, and a template's channel status reports where that stands — an approved SMS template and an unapproved WhatsApp one are the same template in two states.
13
13
  */
14
14
  export class Templates extends APIResource {
15
15
  /**
@@ -19,10 +19,10 @@ export class Templates extends APIResource {
19
19
  *
20
20
  * @example
21
21
  * ```ts
22
- * const apiResponseTemplate = await client.templates.create();
22
+ * const template = await client.templates.create();
23
23
  * ```
24
24
  */
25
- create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<APIResponseTemplate> {
25
+ create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<TemplateCreateResponse> {
26
26
  const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
27
27
  return this._client.post('/v3/templates', {
28
28
  body,
@@ -43,7 +43,7 @@ export class Templates extends APIResource {
43
43
  *
44
44
  * @example
45
45
  * ```ts
46
- * const apiResponseTemplate = await client.templates.retrieve(
46
+ * const template = await client.templates.retrieve(
47
47
  * '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
48
48
  * );
49
49
  * ```
@@ -52,7 +52,7 @@ export class Templates extends APIResource {
52
52
  id: string,
53
53
  params: TemplateRetrieveParams | null | undefined = {},
54
54
  options?: RequestOptions,
55
- ): APIPromise<APIResponseTemplate> {
55
+ ): APIPromise<TemplateRetrieveResponse> {
56
56
  const { 'x-profile-id': xProfileID } = params ?? {};
57
57
  return this._client.get(path`/v3/templates/${id}`, {
58
58
  ...options,
@@ -69,7 +69,7 @@ export class Templates extends APIResource {
69
69
  *
70
70
  * @example
71
71
  * ```ts
72
- * const apiResponseTemplate = await client.templates.update(
72
+ * const template = await client.templates.update(
73
73
  * '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
74
74
  * );
75
75
  * ```
@@ -78,7 +78,7 @@ export class Templates extends APIResource {
78
78
  id: string,
79
79
  params: TemplateUpdateParams,
80
80
  options?: RequestOptions,
81
- ): APIPromise<APIResponseTemplate> {
81
+ ): APIPromise<TemplateUpdateResponse> {
82
82
  const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
83
83
  return this._client.put(path`/v3/templates/${id}`, {
84
84
  body,
@@ -141,31 +141,6 @@ export class Templates extends APIResource {
141
141
  }
142
142
  }
143
143
 
144
- /**
145
- * Standard API response envelope for all v3 endpoints
146
- */
147
- export interface APIResponseTemplate {
148
- /**
149
- * Template response for v3 API
150
- */
151
- data?: Template | null;
152
-
153
- /**
154
- * Error information
155
- */
156
- error?: WebhooksAPI.ErrorDetail | null;
157
-
158
- /**
159
- * Request and response metadata
160
- */
161
- meta?: WebhooksAPI.APIMeta;
162
-
163
- /**
164
- * Indicates whether the request was successful
165
- */
166
- success?: boolean;
167
- }
168
-
169
144
  /**
170
145
  * Configuration for AUTHENTICATION category templates
171
146
  */
@@ -183,61 +158,6 @@ export interface AuthenticationConfig {
183
158
  codeExpirationMinutes?: number | null;
184
159
  }
185
160
 
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
-
241
161
  /**
242
162
  * Body section of a message template with channel-specific content
243
163
  */
@@ -431,24 +351,423 @@ export namespace TemplateVariable {
431
351
  }
432
352
  }
433
353
 
354
+ /**
355
+ * Standard API response envelope for all v3 endpoints
356
+ */
357
+ export interface TemplateCreateResponse {
358
+ /**
359
+ * Template response for v3 API
360
+ */
361
+ data?: TemplateCreateResponse.Data | null;
362
+
363
+ /**
364
+ * Error information
365
+ */
366
+ error?: TemplateCreateResponse.Error | null;
367
+
368
+ /**
369
+ * Request and response metadata
370
+ */
371
+ meta?: TemplateCreateResponse.Meta;
372
+
373
+ /**
374
+ * Indicates whether the request was successful
375
+ */
376
+ success?: boolean;
377
+ }
378
+
379
+ export namespace TemplateCreateResponse {
380
+ /**
381
+ * Template response for v3 API
382
+ */
383
+ export interface Data {
384
+ /**
385
+ * Which customer owns this — the key's own, or the profile named in x-profile-id.
386
+ * Says whose resource this is, which the resource's own id does not.
387
+ */
388
+ customer_id: string;
389
+
390
+ /**
391
+ * Unique template identifier
392
+ */
393
+ id?: string;
394
+
395
+ /**
396
+ * Template category: MARKETING, UTILITY, AUTHENTICATION
397
+ */
398
+ category?: string;
399
+
400
+ /**
401
+ * Supported channels: sms, whatsapp
402
+ */
403
+ channels?: Array<string> | null;
404
+
405
+ /**
406
+ * When the template was created
407
+ */
408
+ created_at?: string;
409
+
410
+ /**
411
+ * Whether the template is published and active
412
+ */
413
+ is_published?: boolean;
414
+
415
+ /**
416
+ * Template language code (e.g., en_US)
417
+ */
418
+ language?: string;
419
+
420
+ /**
421
+ * Template display name
422
+ */
423
+ name?: string;
424
+
425
+ /**
426
+ * Template status: APPROVED, PENDING, REJECTED
427
+ */
428
+ status?: string;
429
+
430
+ /**
431
+ * When the template was last updated
432
+ */
433
+ updated_at?: string | null;
434
+
435
+ /**
436
+ * Template variables for personalization
437
+ */
438
+ variables?: Array<string> | null;
439
+ }
440
+
441
+ /**
442
+ * Error information
443
+ */
444
+ export interface Error {
445
+ /**
446
+ * Machine-readable error code (e.g., "RESOURCE_001")
447
+ */
448
+ code?: string;
449
+
450
+ /**
451
+ * Additional validation error details (field-level errors)
452
+ */
453
+ details?: { [key: string]: Array<string> } | null;
454
+
455
+ /**
456
+ * URL to documentation about this error
457
+ */
458
+ doc_url?: string | null;
459
+
460
+ /**
461
+ * Human-readable error message
462
+ */
463
+ message?: string;
464
+ }
465
+
466
+ /**
467
+ * Request and response metadata
468
+ */
469
+ export interface Meta {
470
+ /**
471
+ * Unique identifier for this request (for tracing and support)
472
+ */
473
+ request_id?: string;
474
+
475
+ /**
476
+ * Server timestamp when the response was generated
477
+ */
478
+ timestamp?: string;
479
+
480
+ /**
481
+ * API version used for this request
482
+ */
483
+ version?: string;
484
+ }
485
+ }
486
+
487
+ /**
488
+ * Standard API response envelope for all v3 endpoints
489
+ */
490
+ export interface TemplateRetrieveResponse {
491
+ /**
492
+ * Template response for v3 API
493
+ */
494
+ data?: TemplateRetrieveResponse.Data | null;
495
+
496
+ /**
497
+ * Error information
498
+ */
499
+ error?: TemplateRetrieveResponse.Error | null;
500
+
501
+ /**
502
+ * Request and response metadata
503
+ */
504
+ meta?: TemplateRetrieveResponse.Meta;
505
+
506
+ /**
507
+ * Indicates whether the request was successful
508
+ */
509
+ success?: boolean;
510
+ }
511
+
512
+ export namespace TemplateRetrieveResponse {
513
+ /**
514
+ * Template response for v3 API
515
+ */
516
+ export interface Data {
517
+ /**
518
+ * Which customer owns this — the key's own, or the profile named in x-profile-id.
519
+ * Says whose resource this is, which the resource's own id does not.
520
+ */
521
+ customer_id: string;
522
+
523
+ /**
524
+ * Unique template identifier
525
+ */
526
+ id?: string;
527
+
528
+ /**
529
+ * Template category: MARKETING, UTILITY, AUTHENTICATION
530
+ */
531
+ category?: string;
532
+
533
+ /**
534
+ * Supported channels: sms, whatsapp
535
+ */
536
+ channels?: Array<string> | null;
537
+
538
+ /**
539
+ * When the template was created
540
+ */
541
+ created_at?: string;
542
+
543
+ /**
544
+ * Whether the template is published and active
545
+ */
546
+ is_published?: boolean;
547
+
548
+ /**
549
+ * Template language code (e.g., en_US)
550
+ */
551
+ language?: string;
552
+
553
+ /**
554
+ * Template display name
555
+ */
556
+ name?: string;
557
+
558
+ /**
559
+ * Template status: APPROVED, PENDING, REJECTED
560
+ */
561
+ status?: string;
562
+
563
+ /**
564
+ * When the template was last updated
565
+ */
566
+ updated_at?: string | null;
567
+
568
+ /**
569
+ * Template variables for personalization
570
+ */
571
+ variables?: Array<string> | null;
572
+ }
573
+
574
+ /**
575
+ * Error information
576
+ */
577
+ export interface Error {
578
+ /**
579
+ * Machine-readable error code (e.g., "RESOURCE_001")
580
+ */
581
+ code?: string;
582
+
583
+ /**
584
+ * Additional validation error details (field-level errors)
585
+ */
586
+ details?: { [key: string]: Array<string> } | null;
587
+
588
+ /**
589
+ * URL to documentation about this error
590
+ */
591
+ doc_url?: string | null;
592
+
593
+ /**
594
+ * Human-readable error message
595
+ */
596
+ message?: string;
597
+ }
598
+
599
+ /**
600
+ * Request and response metadata
601
+ */
602
+ export interface Meta {
603
+ /**
604
+ * Unique identifier for this request (for tracing and support)
605
+ */
606
+ request_id?: string;
607
+
608
+ /**
609
+ * Server timestamp when the response was generated
610
+ */
611
+ timestamp?: string;
612
+
613
+ /**
614
+ * API version used for this request
615
+ */
616
+ version?: string;
617
+ }
618
+ }
619
+
620
+ /**
621
+ * Standard API response envelope for all v3 endpoints
622
+ */
623
+ export interface TemplateUpdateResponse {
624
+ /**
625
+ * Template response for v3 API
626
+ */
627
+ data?: TemplateUpdateResponse.Data | null;
628
+
629
+ /**
630
+ * Error information
631
+ */
632
+ error?: TemplateUpdateResponse.Error | null;
633
+
634
+ /**
635
+ * Request and response metadata
636
+ */
637
+ meta?: TemplateUpdateResponse.Meta;
638
+
639
+ /**
640
+ * Indicates whether the request was successful
641
+ */
642
+ success?: boolean;
643
+ }
644
+
645
+ export namespace TemplateUpdateResponse {
646
+ /**
647
+ * Template response for v3 API
648
+ */
649
+ export interface Data {
650
+ /**
651
+ * Which customer owns this — the key's own, or the profile named in x-profile-id.
652
+ * Says whose resource this is, which the resource's own id does not.
653
+ */
654
+ customer_id: string;
655
+
656
+ /**
657
+ * Unique template identifier
658
+ */
659
+ id?: string;
660
+
661
+ /**
662
+ * Template category: MARKETING, UTILITY, AUTHENTICATION
663
+ */
664
+ category?: string;
665
+
666
+ /**
667
+ * Supported channels: sms, whatsapp
668
+ */
669
+ channels?: Array<string> | null;
670
+
671
+ /**
672
+ * When the template was created
673
+ */
674
+ created_at?: string;
675
+
676
+ /**
677
+ * Whether the template is published and active
678
+ */
679
+ is_published?: boolean;
680
+
681
+ /**
682
+ * Template language code (e.g., en_US)
683
+ */
684
+ language?: string;
685
+
686
+ /**
687
+ * Template display name
688
+ */
689
+ name?: string;
690
+
691
+ /**
692
+ * Template status: APPROVED, PENDING, REJECTED
693
+ */
694
+ status?: string;
695
+
696
+ /**
697
+ * When the template was last updated
698
+ */
699
+ updated_at?: string | null;
700
+
701
+ /**
702
+ * Template variables for personalization
703
+ */
704
+ variables?: Array<string> | null;
705
+ }
706
+
707
+ /**
708
+ * Error information
709
+ */
710
+ export interface Error {
711
+ /**
712
+ * Machine-readable error code (e.g., "RESOURCE_001")
713
+ */
714
+ code?: string;
715
+
716
+ /**
717
+ * Additional validation error details (field-level errors)
718
+ */
719
+ details?: { [key: string]: Array<string> } | null;
720
+
721
+ /**
722
+ * URL to documentation about this error
723
+ */
724
+ doc_url?: string | null;
725
+
726
+ /**
727
+ * Human-readable error message
728
+ */
729
+ message?: string;
730
+ }
731
+
732
+ /**
733
+ * Request and response metadata
734
+ */
735
+ export interface Meta {
736
+ /**
737
+ * Unique identifier for this request (for tracing and support)
738
+ */
739
+ request_id?: string;
740
+
741
+ /**
742
+ * Server timestamp when the response was generated
743
+ */
744
+ timestamp?: string;
745
+
746
+ /**
747
+ * API version used for this request
748
+ */
749
+ version?: string;
750
+ }
751
+ }
752
+
434
753
  /**
435
754
  * Standard API response envelope for all v3 endpoints
436
755
  */
437
756
  export interface TemplateListResponse {
438
757
  /**
439
- * Paginated list of templates
758
+ * A paginated list of templates.
440
759
  */
441
760
  data?: TemplateListResponse.Data | null;
442
761
 
443
762
  /**
444
763
  * Error information
445
764
  */
446
- error?: WebhooksAPI.ErrorDetail | null;
765
+ error?: TemplateListResponse.Error | null;
447
766
 
448
767
  /**
449
768
  * Request and response metadata
450
769
  */
451
- meta?: WebhooksAPI.APIMeta;
770
+ meta?: TemplateListResponse.Meta;
452
771
 
453
772
  /**
454
773
  * Indicates whether the request was successful
@@ -458,18 +777,178 @@ export interface TemplateListResponse {
458
777
 
459
778
  export namespace TemplateListResponse {
460
779
  /**
461
- * Paginated list of templates
780
+ * A paginated list of templates.
462
781
  */
463
782
  export interface Data {
464
783
  /**
465
784
  * Pagination metadata for list responses
466
785
  */
467
- pagination?: WebhooksAPI.PaginationMeta;
786
+ pagination?: Data.Pagination;
787
+
788
+ /**
789
+ * The templates on this page.
790
+ */
791
+ templates?: Array<Data.Template>;
792
+ }
793
+
794
+ export namespace Data {
795
+ /**
796
+ * Pagination metadata for list responses
797
+ */
798
+ export interface Pagination {
799
+ /**
800
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
801
+ */
802
+ cursors?: Pagination.Cursors | null;
803
+
804
+ /**
805
+ * Whether there are more pages after this one
806
+ */
807
+ has_more?: boolean;
808
+
809
+ /**
810
+ * Current page number (1-indexed)
811
+ */
812
+ page?: number;
813
+
814
+ /**
815
+ * Number of items per page
816
+ */
817
+ page_size?: number;
818
+
819
+ /**
820
+ * Total number of items across all pages
821
+ */
822
+ total_count?: number;
823
+
824
+ /**
825
+ * Total number of pages
826
+ */
827
+ total_pages?: number;
828
+ }
829
+
830
+ export namespace Pagination {
831
+ /**
832
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
833
+ */
834
+ export interface Cursors {
835
+ /**
836
+ * Cursor to fetch the next page.
837
+ */
838
+ after?: string | null;
839
+
840
+ /**
841
+ * Cursor to fetch the previous page.
842
+ */
843
+ before?: string | null;
844
+ }
845
+ }
846
+
847
+ /**
848
+ * Template response for v3 API
849
+ */
850
+ export interface Template {
851
+ /**
852
+ * Which customer owns this — the key's own, or the profile named in x-profile-id.
853
+ * Says whose resource this is, which the resource's own id does not.
854
+ */
855
+ customer_id: string;
856
+
857
+ /**
858
+ * Unique template identifier
859
+ */
860
+ id?: string;
861
+
862
+ /**
863
+ * Template category: MARKETING, UTILITY, AUTHENTICATION
864
+ */
865
+ category?: string;
866
+
867
+ /**
868
+ * Supported channels: sms, whatsapp
869
+ */
870
+ channels?: Array<string> | null;
871
+
872
+ /**
873
+ * When the template was created
874
+ */
875
+ created_at?: string;
876
+
877
+ /**
878
+ * Whether the template is published and active
879
+ */
880
+ is_published?: boolean;
881
+
882
+ /**
883
+ * Template language code (e.g., en_US)
884
+ */
885
+ language?: string;
886
+
887
+ /**
888
+ * Template display name
889
+ */
890
+ name?: string;
891
+
892
+ /**
893
+ * Template status: APPROVED, PENDING, REJECTED
894
+ */
895
+ status?: string;
896
+
897
+ /**
898
+ * When the template was last updated
899
+ */
900
+ updated_at?: string | null;
901
+
902
+ /**
903
+ * Template variables for personalization
904
+ */
905
+ variables?: Array<string> | null;
906
+ }
907
+ }
908
+
909
+ /**
910
+ * Error information
911
+ */
912
+ export interface Error {
913
+ /**
914
+ * Machine-readable error code (e.g., "RESOURCE_001")
915
+ */
916
+ code?: string;
917
+
918
+ /**
919
+ * Additional validation error details (field-level errors)
920
+ */
921
+ details?: { [key: string]: Array<string> } | null;
922
+
923
+ /**
924
+ * URL to documentation about this error
925
+ */
926
+ doc_url?: string | null;
927
+
928
+ /**
929
+ * Human-readable error message
930
+ */
931
+ message?: string;
932
+ }
933
+
934
+ /**
935
+ * Request and response metadata
936
+ */
937
+ export interface Meta {
938
+ /**
939
+ * Unique identifier for this request (for tracing and support)
940
+ */
941
+ request_id?: string;
942
+
943
+ /**
944
+ * Server timestamp when the response was generated
945
+ */
946
+ timestamp?: string;
468
947
 
469
948
  /**
470
- * List of templates
949
+ * API version used for this request
471
950
  */
472
- templates?: Array<TemplatesAPI.Template>;
951
+ version?: string;
473
952
  }
474
953
  }
475
954
 
@@ -598,7 +1077,11 @@ export interface TemplateListParams {
598
1077
  category?: string | null;
599
1078
 
600
1079
  /**
601
- * Query param: Optional filter by welcome playground flag
1080
+ * Query param: Accepted and ignored. It used to filter on the welcome-playground
1081
+ * marker inside a template's LOB details; that filter is gone and nothing reads
1082
+ * this value, so sending it neither narrows nor widens the result. Retained only
1083
+ * so a client still passing is_welcome_playground keeps binding instead of the
1084
+ * request shape changing under it.
602
1085
  */
603
1086
  is_welcome_playground?: boolean | null;
604
1087
 
@@ -643,9 +1126,7 @@ export interface TemplateDeleteParams {
643
1126
 
644
1127
  export declare namespace Templates {
645
1128
  export {
646
- type APIResponseTemplate as APIResponseTemplate,
647
1129
  type AuthenticationConfig as AuthenticationConfig,
648
- type Template as Template,
649
1130
  type TemplateBody as TemplateBody,
650
1131
  type TemplateBodyContent as TemplateBodyContent,
651
1132
  type TemplateButton as TemplateButton,
@@ -654,6 +1135,9 @@ export declare namespace Templates {
654
1135
  type TemplateFooter as TemplateFooter,
655
1136
  type TemplateHeader as TemplateHeader,
656
1137
  type TemplateVariable as TemplateVariable,
1138
+ type TemplateCreateResponse as TemplateCreateResponse,
1139
+ type TemplateRetrieveResponse as TemplateRetrieveResponse,
1140
+ type TemplateUpdateResponse as TemplateUpdateResponse,
657
1141
  type TemplateListResponse as TemplateListResponse,
658
1142
  type TemplateCreateParams as TemplateCreateParams,
659
1143
  type TemplateRetrieveParams as TemplateRetrieveParams,