@sentdm/sentdm 0.25.3 → 0.26.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 (110) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client.d.mts +12 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/internal/utils/log.d.mts.map +1 -1
  9. package/internal/utils/log.d.ts.map +1 -1
  10. package/internal/utils/log.js +3 -2
  11. package/internal/utils/log.js.map +1 -1
  12. package/internal/utils/log.mjs +3 -2
  13. package/internal/utils/log.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/contacts.d.mts +488 -68
  16. package/resources/contacts.d.mts.map +1 -1
  17. package/resources/contacts.d.ts +488 -68
  18. package/resources/contacts.d.ts.map +1 -1
  19. package/resources/contacts.js +3 -3
  20. package/resources/contacts.js.map +1 -1
  21. package/resources/contacts.mjs +3 -3
  22. package/resources/contacts.mjs.map +1 -1
  23. package/resources/index.d.mts +6 -6
  24. package/resources/index.d.mts.map +1 -1
  25. package/resources/index.d.ts +6 -6
  26. package/resources/index.d.ts.map +1 -1
  27. package/resources/index.js.map +1 -1
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/me.d.mts +113 -40
  30. package/resources/me.d.mts.map +1 -1
  31. package/resources/me.d.ts +113 -40
  32. package/resources/me.d.ts.map +1 -1
  33. package/resources/me.js.map +1 -1
  34. package/resources/me.mjs.map +1 -1
  35. package/resources/messages.d.mts +130 -9
  36. package/resources/messages.d.mts.map +1 -1
  37. package/resources/messages.d.ts +130 -9
  38. package/resources/messages.d.ts.map +1 -1
  39. package/resources/messages.js.map +1 -1
  40. package/resources/messages.mjs.map +1 -1
  41. package/resources/numbers.d.mts +42 -3
  42. package/resources/numbers.d.mts.map +1 -1
  43. package/resources/numbers.d.ts +42 -3
  44. package/resources/numbers.d.ts.map +1 -1
  45. package/resources/numbers.js.map +1 -1
  46. package/resources/numbers.mjs.map +1 -1
  47. package/resources/profiles/campaigns.d.mts +480 -147
  48. package/resources/profiles/campaigns.d.mts.map +1 -1
  49. package/resources/profiles/campaigns.d.ts +480 -147
  50. package/resources/profiles/campaigns.d.ts.map +1 -1
  51. package/resources/profiles/campaigns.js +39 -41
  52. package/resources/profiles/campaigns.js.map +1 -1
  53. package/resources/profiles/campaigns.mjs +39 -41
  54. package/resources/profiles/campaigns.mjs.map +1 -1
  55. package/resources/profiles/index.d.mts +2 -2
  56. package/resources/profiles/index.d.mts.map +1 -1
  57. package/resources/profiles/index.d.ts +2 -2
  58. package/resources/profiles/index.d.ts.map +1 -1
  59. package/resources/profiles/index.js.map +1 -1
  60. package/resources/profiles/index.mjs.map +1 -1
  61. package/resources/profiles/profiles.d.mts +1699 -391
  62. package/resources/profiles/profiles.d.mts.map +1 -1
  63. package/resources/profiles/profiles.d.ts +1699 -391
  64. package/resources/profiles/profiles.d.ts.map +1 -1
  65. package/resources/profiles/profiles.js +3 -6
  66. package/resources/profiles/profiles.js.map +1 -1
  67. package/resources/profiles/profiles.mjs +3 -6
  68. package/resources/profiles/profiles.mjs.map +1 -1
  69. package/resources/templates.d.mts +993 -172
  70. package/resources/templates.d.mts.map +1 -1
  71. package/resources/templates.d.ts +993 -172
  72. package/resources/templates.d.ts.map +1 -1
  73. package/resources/templates.js +3 -3
  74. package/resources/templates.js.map +1 -1
  75. package/resources/templates.mjs +3 -3
  76. package/resources/templates.mjs.map +1 -1
  77. package/resources/users.d.mts +373 -46
  78. package/resources/users.d.mts.map +1 -1
  79. package/resources/users.d.ts +373 -46
  80. package/resources/users.d.ts.map +1 -1
  81. package/resources/users.js +3 -7
  82. package/resources/users.js.map +1 -1
  83. package/resources/users.mjs +3 -7
  84. package/resources/users.mjs.map +1 -1
  85. package/resources/webhooks.d.mts +624 -110
  86. package/resources/webhooks.d.mts.map +1 -1
  87. package/resources/webhooks.d.ts +624 -110
  88. package/resources/webhooks.d.ts.map +1 -1
  89. package/resources/webhooks.js +6 -7
  90. package/resources/webhooks.js.map +1 -1
  91. package/resources/webhooks.mjs +6 -7
  92. package/resources/webhooks.mjs.map +1 -1
  93. package/src/client.ts +33 -68
  94. package/src/internal/utils/log.ts +2 -1
  95. package/src/resources/contacts.ts +567 -66
  96. package/src/resources/index.ts +17 -34
  97. package/src/resources/me.ts +132 -51
  98. package/src/resources/messages.ts +147 -9
  99. package/src/resources/numbers.ts +47 -3
  100. package/src/resources/profiles/campaigns.ts +668 -169
  101. package/src/resources/profiles/index.ts +5 -17
  102. package/src/resources/profiles/profiles.ts +2278 -545
  103. package/src/resources/templates.ts +1261 -206
  104. package/src/resources/users.ts +430 -47
  105. package/src/resources/webhooks.ts +742 -120
  106. package/src/version.ts +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -1,6 +1,4 @@
1
1
  import { APIResource } from "../core/resource.js";
2
- import * as ContactsAPI from "./contacts.js";
3
- import * as WebhooksAPI from "./webhooks.js";
4
2
  import { APIPromise } from "../core/api-promise.js";
5
3
  import { RequestOptions } from "../internal/request-options.js";
6
4
  /**
@@ -13,10 +11,10 @@ export declare class Contacts extends APIResource {
13
11
  *
14
12
  * @example
15
13
  * ```ts
16
- * const apiResponseOfContact = await client.contacts.create();
14
+ * const contact = await client.contacts.create();
17
15
  * ```
18
16
  */
19
- create(params: ContactCreateParams, options?: RequestOptions): APIPromise<APIResponseOfContact>;
17
+ create(params: ContactCreateParams, options?: RequestOptions): APIPromise<ContactCreateResponse>;
20
18
  /**
21
19
  * Retrieves a specific contact by their unique identifier. Returns detailed
22
20
  * contact information including phone formats, available channels, and opt-out
@@ -24,24 +22,24 @@ export declare class Contacts extends APIResource {
24
22
  *
25
23
  * @example
26
24
  * ```ts
27
- * const apiResponseOfContact = await client.contacts.retrieve(
25
+ * const contact = await client.contacts.retrieve(
28
26
  * '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
29
27
  * );
30
28
  * ```
31
29
  */
32
- retrieve(id: string, params?: ContactRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfContact>;
30
+ retrieve(id: string, params?: ContactRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactRetrieveResponse>;
33
31
  /**
34
32
  * Updates a contact's default channel and/or opt-out status. Inherited contacts
35
33
  * cannot be updated.
36
34
  *
37
35
  * @example
38
36
  * ```ts
39
- * const apiResponseOfContact = await client.contacts.update(
37
+ * const contact = await client.contacts.update(
40
38
  * '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
41
39
  * );
42
40
  * ```
43
41
  */
44
- update(id: string, params: ContactUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfContact>;
42
+ update(id: string, params: ContactUpdateParams, options?: RequestOptions): APIPromise<ContactUpdateResponse>;
45
43
  /**
46
44
  * Retrieves a paginated list of contacts for the authenticated customer. Supports
47
45
  * filtering by search term, channel, or phone number.
@@ -71,93 +69,377 @@ export declare class Contacts extends APIResource {
71
69
  /**
72
70
  * Standard API response envelope for all v3 endpoints
73
71
  */
74
- export interface APIResponseOfContact {
72
+ export interface ContactCreateResponse {
75
73
  /**
76
74
  * Contact response for v3 API Uses snake_case for JSON property names
77
75
  */
78
- data?: ContactResponse | null;
76
+ data?: ContactCreateResponse.Data | null;
79
77
  /**
80
78
  * Error information
81
79
  */
82
- error?: WebhooksAPI.ErrorDetail | null;
80
+ error?: ContactCreateResponse.Error | null;
83
81
  /**
84
82
  * Request and response metadata
85
83
  */
86
- meta?: WebhooksAPI.APIMeta;
84
+ meta?: ContactCreateResponse.Meta;
87
85
  /**
88
86
  * Indicates whether the request was successful
89
87
  */
90
88
  success?: boolean;
91
89
  }
92
- /**
93
- * Contact response for v3 API Uses snake_case for JSON property names
94
- */
95
- export interface ContactResponse {
90
+ export declare namespace ContactCreateResponse {
96
91
  /**
97
- * Unique identifier for the contact
92
+ * Contact response for v3 API Uses snake_case for JSON property names
98
93
  */
99
- id?: string;
94
+ interface Data {
95
+ /**
96
+ * Unique identifier for the contact
97
+ */
98
+ id?: string;
99
+ /**
100
+ * Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
101
+ */
102
+ available_channels?: string;
103
+ /**
104
+ * Country calling code (e.g., 1 for US/Canada)
105
+ */
106
+ country_code?: string;
107
+ /**
108
+ * When the contact was created
109
+ */
110
+ created_at?: string;
111
+ /**
112
+ * Default messaging channel to use (e.g., "sms" or "whatsapp")
113
+ */
114
+ default_channel?: string;
115
+ /**
116
+ * Phone number in E.164 format (e.g., +1234567890)
117
+ */
118
+ format_e164?: string;
119
+ /**
120
+ * Phone number in international format (e.g., +1 234-567-890)
121
+ */
122
+ format_international?: string;
123
+ /**
124
+ * Phone number in national format (e.g., (234) 567-890)
125
+ */
126
+ format_national?: string;
127
+ /**
128
+ * Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
129
+ */
130
+ format_rfc?: string;
131
+ /**
132
+ * Whether this is an inherited contact (read-only)
133
+ */
134
+ is_inherited?: boolean;
135
+ /**
136
+ * Whether the contact has opted out of messaging. Single source of truth — opt-out
137
+ * is per-contact, not per-channel.
138
+ */
139
+ opt_out?: boolean;
140
+ /**
141
+ * Phone number in original format
142
+ */
143
+ phone_number?: string;
144
+ /**
145
+ * ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
146
+ */
147
+ region_code?: string;
148
+ /**
149
+ * When the contact was last updated
150
+ */
151
+ updated_at?: string | null;
152
+ }
153
+ /**
154
+ * Error information
155
+ */
156
+ interface Error {
157
+ /**
158
+ * Machine-readable error code (e.g., "RESOURCE_001")
159
+ */
160
+ code?: string;
161
+ /**
162
+ * Additional validation error details (field-level errors)
163
+ */
164
+ details?: {
165
+ [key: string]: Array<string>;
166
+ } | null;
167
+ /**
168
+ * URL to documentation about this error
169
+ */
170
+ doc_url?: string | null;
171
+ /**
172
+ * Human-readable error message
173
+ */
174
+ message?: string;
175
+ }
176
+ /**
177
+ * Request and response metadata
178
+ */
179
+ interface Meta {
180
+ /**
181
+ * Unique identifier for this request (for tracing and support)
182
+ */
183
+ request_id?: string;
184
+ /**
185
+ * Server timestamp when the response was generated
186
+ */
187
+ timestamp?: string;
188
+ /**
189
+ * API version used for this request
190
+ */
191
+ version?: string;
192
+ }
193
+ }
194
+ /**
195
+ * Standard API response envelope for all v3 endpoints
196
+ */
197
+ export interface ContactRetrieveResponse {
100
198
  /**
101
- * Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
199
+ * Contact response for v3 API Uses snake_case for JSON property names
102
200
  */
103
- available_channels?: string;
201
+ data?: ContactRetrieveResponse.Data | null;
104
202
  /**
105
- * Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
106
- * "opted_out". All channels will have the same status because consent is global
107
- * across channels. A STOP on any channel opts out of all channels; a START opts in
108
- * to all.
203
+ * Error information
109
204
  */
110
- channel_consent?: {
111
- [key: string]: string;
112
- } | null;
205
+ error?: ContactRetrieveResponse.Error | null;
113
206
  /**
114
- * Country calling code (e.g., 1 for US/Canada)
207
+ * Request and response metadata
115
208
  */
116
- country_code?: string;
209
+ meta?: ContactRetrieveResponse.Meta;
117
210
  /**
118
- * When the contact was created
211
+ * Indicates whether the request was successful
119
212
  */
120
- created_at?: string;
213
+ success?: boolean;
214
+ }
215
+ export declare namespace ContactRetrieveResponse {
121
216
  /**
122
- * Default messaging channel to use (e.g., "sms" or "whatsapp")
217
+ * Contact response for v3 API Uses snake_case for JSON property names
123
218
  */
124
- default_channel?: string;
219
+ interface Data {
220
+ /**
221
+ * Unique identifier for the contact
222
+ */
223
+ id?: string;
224
+ /**
225
+ * Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
226
+ */
227
+ available_channels?: string;
228
+ /**
229
+ * Country calling code (e.g., 1 for US/Canada)
230
+ */
231
+ country_code?: string;
232
+ /**
233
+ * When the contact was created
234
+ */
235
+ created_at?: string;
236
+ /**
237
+ * Default messaging channel to use (e.g., "sms" or "whatsapp")
238
+ */
239
+ default_channel?: string;
240
+ /**
241
+ * Phone number in E.164 format (e.g., +1234567890)
242
+ */
243
+ format_e164?: string;
244
+ /**
245
+ * Phone number in international format (e.g., +1 234-567-890)
246
+ */
247
+ format_international?: string;
248
+ /**
249
+ * Phone number in national format (e.g., (234) 567-890)
250
+ */
251
+ format_national?: string;
252
+ /**
253
+ * Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
254
+ */
255
+ format_rfc?: string;
256
+ /**
257
+ * Whether this is an inherited contact (read-only)
258
+ */
259
+ is_inherited?: boolean;
260
+ /**
261
+ * Whether the contact has opted out of messaging. Single source of truth — opt-out
262
+ * is per-contact, not per-channel.
263
+ */
264
+ opt_out?: boolean;
265
+ /**
266
+ * Phone number in original format
267
+ */
268
+ phone_number?: string;
269
+ /**
270
+ * ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
271
+ */
272
+ region_code?: string;
273
+ /**
274
+ * When the contact was last updated
275
+ */
276
+ updated_at?: string | null;
277
+ }
125
278
  /**
126
- * Phone number in E.164 format (e.g., +1234567890)
279
+ * Error information
127
280
  */
128
- format_e164?: string;
281
+ interface Error {
282
+ /**
283
+ * Machine-readable error code (e.g., "RESOURCE_001")
284
+ */
285
+ code?: string;
286
+ /**
287
+ * Additional validation error details (field-level errors)
288
+ */
289
+ details?: {
290
+ [key: string]: Array<string>;
291
+ } | null;
292
+ /**
293
+ * URL to documentation about this error
294
+ */
295
+ doc_url?: string | null;
296
+ /**
297
+ * Human-readable error message
298
+ */
299
+ message?: string;
300
+ }
129
301
  /**
130
- * Phone number in international format (e.g., +1 234-567-890)
302
+ * Request and response metadata
131
303
  */
132
- format_international?: string;
304
+ interface Meta {
305
+ /**
306
+ * Unique identifier for this request (for tracing and support)
307
+ */
308
+ request_id?: string;
309
+ /**
310
+ * Server timestamp when the response was generated
311
+ */
312
+ timestamp?: string;
313
+ /**
314
+ * API version used for this request
315
+ */
316
+ version?: string;
317
+ }
318
+ }
319
+ /**
320
+ * Standard API response envelope for all v3 endpoints
321
+ */
322
+ export interface ContactUpdateResponse {
133
323
  /**
134
- * Phone number in national format (e.g., (234) 567-890)
324
+ * Contact response for v3 API Uses snake_case for JSON property names
135
325
  */
136
- format_national?: string;
326
+ data?: ContactUpdateResponse.Data | null;
137
327
  /**
138
- * Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
328
+ * Error information
139
329
  */
140
- format_rfc?: string;
330
+ error?: ContactUpdateResponse.Error | null;
141
331
  /**
142
- * Whether this is an inherited contact (read-only)
332
+ * Request and response metadata
143
333
  */
144
- is_inherited?: boolean;
334
+ meta?: ContactUpdateResponse.Meta;
145
335
  /**
146
- * Whether the contact has opted out of messaging
336
+ * Indicates whether the request was successful
147
337
  */
148
- opt_out?: boolean;
338
+ success?: boolean;
339
+ }
340
+ export declare namespace ContactUpdateResponse {
149
341
  /**
150
- * Phone number in original format
342
+ * Contact response for v3 API Uses snake_case for JSON property names
151
343
  */
152
- phone_number?: string;
344
+ interface Data {
345
+ /**
346
+ * Unique identifier for the contact
347
+ */
348
+ id?: string;
349
+ /**
350
+ * Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
351
+ */
352
+ available_channels?: string;
353
+ /**
354
+ * Country calling code (e.g., 1 for US/Canada)
355
+ */
356
+ country_code?: string;
357
+ /**
358
+ * When the contact was created
359
+ */
360
+ created_at?: string;
361
+ /**
362
+ * Default messaging channel to use (e.g., "sms" or "whatsapp")
363
+ */
364
+ default_channel?: string;
365
+ /**
366
+ * Phone number in E.164 format (e.g., +1234567890)
367
+ */
368
+ format_e164?: string;
369
+ /**
370
+ * Phone number in international format (e.g., +1 234-567-890)
371
+ */
372
+ format_international?: string;
373
+ /**
374
+ * Phone number in national format (e.g., (234) 567-890)
375
+ */
376
+ format_national?: string;
377
+ /**
378
+ * Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
379
+ */
380
+ format_rfc?: string;
381
+ /**
382
+ * Whether this is an inherited contact (read-only)
383
+ */
384
+ is_inherited?: boolean;
385
+ /**
386
+ * Whether the contact has opted out of messaging. Single source of truth — opt-out
387
+ * is per-contact, not per-channel.
388
+ */
389
+ opt_out?: boolean;
390
+ /**
391
+ * Phone number in original format
392
+ */
393
+ phone_number?: string;
394
+ /**
395
+ * ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
396
+ */
397
+ region_code?: string;
398
+ /**
399
+ * When the contact was last updated
400
+ */
401
+ updated_at?: string | null;
402
+ }
153
403
  /**
154
- * ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
404
+ * Error information
155
405
  */
156
- region_code?: string;
406
+ interface Error {
407
+ /**
408
+ * Machine-readable error code (e.g., "RESOURCE_001")
409
+ */
410
+ code?: string;
411
+ /**
412
+ * Additional validation error details (field-level errors)
413
+ */
414
+ details?: {
415
+ [key: string]: Array<string>;
416
+ } | null;
417
+ /**
418
+ * URL to documentation about this error
419
+ */
420
+ doc_url?: string | null;
421
+ /**
422
+ * Human-readable error message
423
+ */
424
+ message?: string;
425
+ }
157
426
  /**
158
- * When the contact was last updated
427
+ * Request and response metadata
159
428
  */
160
- updated_at?: string | null;
429
+ interface Meta {
430
+ /**
431
+ * Unique identifier for this request (for tracing and support)
432
+ */
433
+ request_id?: string;
434
+ /**
435
+ * Server timestamp when the response was generated
436
+ */
437
+ timestamp?: string;
438
+ /**
439
+ * API version used for this request
440
+ */
441
+ version?: string;
442
+ }
161
443
  }
162
444
  /**
163
445
  * Standard API response envelope for all v3 endpoints
@@ -170,11 +452,11 @@ export interface ContactListResponse {
170
452
  /**
171
453
  * Error information
172
454
  */
173
- error?: WebhooksAPI.ErrorDetail | null;
455
+ error?: ContactListResponse.Error | null;
174
456
  /**
175
457
  * Request and response metadata
176
458
  */
177
- meta?: WebhooksAPI.APIMeta;
459
+ meta?: ContactListResponse.Meta;
178
460
  /**
179
461
  * Indicates whether the request was successful
180
462
  */
@@ -188,11 +470,159 @@ export declare namespace ContactListResponse {
188
470
  /**
189
471
  * List of contacts
190
472
  */
191
- contacts?: Array<ContactsAPI.ContactResponse>;
473
+ contacts?: Array<Data.Contact>;
192
474
  /**
193
475
  * Pagination metadata for list responses
194
476
  */
195
- pagination?: WebhooksAPI.PaginationMeta;
477
+ pagination?: Data.Pagination;
478
+ }
479
+ namespace Data {
480
+ /**
481
+ * Contact response for v3 API Uses snake_case for JSON property names
482
+ */
483
+ interface Contact {
484
+ /**
485
+ * Unique identifier for the contact
486
+ */
487
+ id?: string;
488
+ /**
489
+ * Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
490
+ */
491
+ available_channels?: string;
492
+ /**
493
+ * Country calling code (e.g., 1 for US/Canada)
494
+ */
495
+ country_code?: string;
496
+ /**
497
+ * When the contact was created
498
+ */
499
+ created_at?: string;
500
+ /**
501
+ * Default messaging channel to use (e.g., "sms" or "whatsapp")
502
+ */
503
+ default_channel?: string;
504
+ /**
505
+ * Phone number in E.164 format (e.g., +1234567890)
506
+ */
507
+ format_e164?: string;
508
+ /**
509
+ * Phone number in international format (e.g., +1 234-567-890)
510
+ */
511
+ format_international?: string;
512
+ /**
513
+ * Phone number in national format (e.g., (234) 567-890)
514
+ */
515
+ format_national?: string;
516
+ /**
517
+ * Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
518
+ */
519
+ format_rfc?: string;
520
+ /**
521
+ * Whether this is an inherited contact (read-only)
522
+ */
523
+ is_inherited?: boolean;
524
+ /**
525
+ * Whether the contact has opted out of messaging. Single source of truth — opt-out
526
+ * is per-contact, not per-channel.
527
+ */
528
+ opt_out?: boolean;
529
+ /**
530
+ * Phone number in original format
531
+ */
532
+ phone_number?: string;
533
+ /**
534
+ * ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
535
+ */
536
+ region_code?: string;
537
+ /**
538
+ * When the contact was last updated
539
+ */
540
+ updated_at?: string | null;
541
+ }
542
+ /**
543
+ * Pagination metadata for list responses
544
+ */
545
+ interface Pagination {
546
+ /**
547
+ * Cursor-based pagination pointers
548
+ */
549
+ cursors?: Pagination.Cursors | null;
550
+ /**
551
+ * Whether there are more pages after this one
552
+ */
553
+ has_more?: boolean;
554
+ /**
555
+ * Current page number (1-indexed)
556
+ */
557
+ page?: number;
558
+ /**
559
+ * Number of items per page
560
+ */
561
+ page_size?: number;
562
+ /**
563
+ * Total number of items across all pages
564
+ */
565
+ total_count?: number;
566
+ /**
567
+ * Total number of pages
568
+ */
569
+ total_pages?: number;
570
+ }
571
+ namespace Pagination {
572
+ /**
573
+ * Cursor-based pagination pointers
574
+ */
575
+ interface Cursors {
576
+ /**
577
+ * Cursor to fetch the next page
578
+ */
579
+ after?: string | null;
580
+ /**
581
+ * Cursor to fetch the previous page
582
+ */
583
+ before?: string | null;
584
+ }
585
+ }
586
+ }
587
+ /**
588
+ * Error information
589
+ */
590
+ interface Error {
591
+ /**
592
+ * Machine-readable error code (e.g., "RESOURCE_001")
593
+ */
594
+ code?: string;
595
+ /**
596
+ * Additional validation error details (field-level errors)
597
+ */
598
+ details?: {
599
+ [key: string]: Array<string>;
600
+ } | null;
601
+ /**
602
+ * URL to documentation about this error
603
+ */
604
+ doc_url?: string | null;
605
+ /**
606
+ * Human-readable error message
607
+ */
608
+ message?: string;
609
+ }
610
+ /**
611
+ * Request and response metadata
612
+ */
613
+ interface Meta {
614
+ /**
615
+ * Unique identifier for this request (for tracing and support)
616
+ */
617
+ request_id?: string;
618
+ /**
619
+ * Server timestamp when the response was generated
620
+ */
621
+ timestamp?: string;
622
+ /**
623
+ * API version used for this request
624
+ */
625
+ version?: string;
196
626
  }
197
627
  }
198
628
  export interface ContactCreateParams {
@@ -226,23 +656,13 @@ export interface ContactRetrieveParams {
226
656
  'x-profile-id'?: string;
227
657
  }
228
658
  export interface ContactUpdateParams {
229
- /**
230
- * Body param: Consent status by channel. Keys: "sms", "whatsapp". Values:
231
- * "opted_in", "opted_out". All entries must have the same status — mixed values
232
- * (e.g., sms: opted_out + whatsapp: opted_in) are rejected with 400. The provided
233
- * status is applied to ALL channels regardless of which keys are specified,
234
- * because consent is global across channels. When provided, takes precedence over
235
- * the opt_out field.
236
- */
237
- channel_consent?: {
238
- [key: string]: string;
239
- } | null;
240
659
  /**
241
660
  * Body param: Default messaging channel: "sms" or "whatsapp"
242
661
  */
243
662
  default_channel?: string | null;
244
663
  /**
245
- * Body param: Whether the contact has opted out of messaging
664
+ * Body param: Whether the contact has opted out of messaging. Single source of
665
+ * truth — opt-out is per-contact, not per-channel.
246
666
  */
247
667
  opt_out?: boolean | null;
248
668
  /**
@@ -305,6 +725,6 @@ export interface ContactDeleteParams {
305
725
  'x-profile-id'?: string;
306
726
  }
307
727
  export declare namespace Contacts {
308
- export { type APIResponseOfContact as APIResponseOfContact, type ContactResponse as ContactResponse, type ContactListResponse as ContactListResponse, type ContactCreateParams as ContactCreateParams, type ContactRetrieveParams as ContactRetrieveParams, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, type ContactDeleteParams as ContactDeleteParams, };
728
+ export { type ContactCreateResponse as ContactCreateResponse, type ContactRetrieveResponse as ContactRetrieveResponse, type ContactUpdateResponse as ContactUpdateResponse, type ContactListResponse as ContactListResponse, type ContactCreateParams as ContactCreateParams, type ContactRetrieveParams as ContactRetrieveParams, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, type ContactDeleteParams as ContactDeleteParams, };
309
729
  }
310
730
  //# sourceMappingURL=contacts.d.ts.map