@sentdm/sentdm 0.34.0 → 0.35.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 +8 -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 +132 -41
  34. package/resources/me.d.mts.map +1 -1
  35. package/resources/me.d.ts +132 -41
  36. package/resources/me.d.ts.map +1 -1
  37. package/resources/me.js +3 -1
  38. package/resources/me.js.map +1 -1
  39. package/resources/me.mjs +3 -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 +770 -169
  96. package/resources/webhooks.d.mts.map +1 -1
  97. package/resources/webhooks.d.ts +770 -169
  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 +151 -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 +1006 -283
  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,9 +1,12 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
- import * as WebhooksAPI from "./webhooks.mjs";
3
2
  import { APIPromise } from "../core/api-promise.mjs";
4
3
  import { RequestOptions } from "../internal/request-options.mjs";
5
4
  /**
6
- * Send and track SMS and WhatsApp messages
5
+ * Send a message and follow what happened to it.
6
+ *
7
+ * One endpoint sends on any channel: pass `channel: "sent"` and we pick between SMS, WhatsApp and RCS per recipient using your routing rules, or name a channel to pin it. A send is accepted asynchronously — `POST /v3/messages` returns an id, and delivery is reported through `GET /v3/messages/{id}`, its activities, or a webhook.
8
+ *
9
+ * **A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
7
10
  */
8
11
  export declare class Messages extends APIResource {
9
12
  /**
@@ -60,11 +63,11 @@ export interface MessageRetrieveActivitiesResponse {
60
63
  /**
61
64
  * Error information
62
65
  */
63
- error?: WebhooksAPI.ErrorDetail | null;
66
+ error?: MessageRetrieveActivitiesResponse.Error | null;
64
67
  /**
65
68
  * Request and response metadata
66
69
  */
67
- meta?: WebhooksAPI.APIMeta;
70
+ meta?: MessageRetrieveActivitiesResponse.Meta;
68
71
  /**
69
72
  * Indicates whether the request was successful
70
73
  */
@@ -83,6 +86,10 @@ export declare namespace MessageRetrieveActivitiesResponse {
83
86
  * The message ID these activities belong to
84
87
  */
85
88
  message_id?: string;
89
+ /**
90
+ * Pagination metadata for list responses
91
+ */
92
+ pagination?: Data.Pagination;
86
93
  }
87
94
  namespace Data {
88
95
  /**
@@ -119,6 +126,90 @@ export declare namespace MessageRetrieveActivitiesResponse {
119
126
  */
120
127
  timestamp?: string;
121
128
  }
129
+ /**
130
+ * Pagination metadata for list responses
131
+ */
132
+ interface Pagination {
133
+ /**
134
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
135
+ */
136
+ cursors?: Pagination.Cursors | null;
137
+ /**
138
+ * Whether there are more pages after this one
139
+ */
140
+ has_more?: boolean;
141
+ /**
142
+ * Current page number (1-indexed)
143
+ */
144
+ page?: number;
145
+ /**
146
+ * Number of items per page
147
+ */
148
+ page_size?: number;
149
+ /**
150
+ * Total number of items across all pages
151
+ */
152
+ total_count?: number;
153
+ /**
154
+ * Total number of pages
155
+ */
156
+ total_pages?: number;
157
+ }
158
+ namespace Pagination {
159
+ /**
160
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
161
+ */
162
+ interface Cursors {
163
+ /**
164
+ * Cursor to fetch the next page.
165
+ */
166
+ after?: string | null;
167
+ /**
168
+ * Cursor to fetch the previous page.
169
+ */
170
+ before?: string | null;
171
+ }
172
+ }
173
+ }
174
+ /**
175
+ * Error information
176
+ */
177
+ interface Error {
178
+ /**
179
+ * Machine-readable error code (e.g., "RESOURCE_001")
180
+ */
181
+ code?: string;
182
+ /**
183
+ * Additional validation error details (field-level errors)
184
+ */
185
+ details?: {
186
+ [key: string]: Array<string>;
187
+ } | null;
188
+ /**
189
+ * URL to documentation about this error
190
+ */
191
+ doc_url?: string | null;
192
+ /**
193
+ * Human-readable error message
194
+ */
195
+ message?: string;
196
+ }
197
+ /**
198
+ * Request and response metadata
199
+ */
200
+ interface Meta {
201
+ /**
202
+ * Unique identifier for this request (for tracing and support)
203
+ */
204
+ request_id?: string;
205
+ /**
206
+ * Server timestamp when the response was generated
207
+ */
208
+ timestamp?: string;
209
+ /**
210
+ * API version used for this request
211
+ */
212
+ version?: string;
122
213
  }
123
214
  }
124
215
  /**
@@ -132,11 +223,11 @@ export interface MessageRetrieveStatusResponse {
132
223
  /**
133
224
  * Error information
134
225
  */
135
- error?: WebhooksAPI.ErrorDetail | null;
226
+ error?: MessageRetrieveStatusResponse.Error | null;
136
227
  /**
137
228
  * Request and response metadata
138
229
  */
139
- meta?: WebhooksAPI.APIMeta;
230
+ meta?: MessageRetrieveStatusResponse.Meta;
140
231
  /**
141
232
  * Indicates whether the request was successful
142
233
  */
@@ -197,23 +288,72 @@ export declare namespace MessageRetrieveStatusResponse {
197
288
  }
198
289
  }
199
290
  }
291
+ /**
292
+ * Error information
293
+ */
294
+ interface Error {
295
+ /**
296
+ * Machine-readable error code (e.g., "RESOURCE_001")
297
+ */
298
+ code?: string;
299
+ /**
300
+ * Additional validation error details (field-level errors)
301
+ */
302
+ details?: {
303
+ [key: string]: Array<string>;
304
+ } | null;
305
+ /**
306
+ * URL to documentation about this error
307
+ */
308
+ doc_url?: string | null;
309
+ /**
310
+ * Human-readable error message
311
+ */
312
+ message?: string;
313
+ }
314
+ /**
315
+ * Request and response metadata
316
+ */
317
+ interface Meta {
318
+ /**
319
+ * Unique identifier for this request (for tracing and support)
320
+ */
321
+ request_id?: string;
322
+ /**
323
+ * Server timestamp when the response was generated
324
+ */
325
+ timestamp?: string;
326
+ /**
327
+ * API version used for this request
328
+ */
329
+ version?: string;
330
+ }
200
331
  }
201
332
  /**
202
333
  * Standard API response envelope for all v3 endpoints
203
334
  */
204
335
  export interface MessageSendResponse {
205
336
  /**
206
- * Response for the multi-recipient send message endpoint
337
+ * The result of a multi-recipient send.
338
+ *
339
+ * Declared here rather than in the service layer. POST /v3/messages used to
340
+ * publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
341
+ * the public contract was whatever the send service happened to return, and
342
+ * changing that service for an internal reason changed the API. The service keeps
343
+ * its result; this is what a caller sees, and the mapping between them is a
344
+ * decision the endpoint makes.
345
+ *
346
+ * The wire is unchanged by the move: same names, same values.
207
347
  */
208
348
  data?: MessageSendResponse.Data | null;
209
349
  /**
210
350
  * Error information
211
351
  */
212
- error?: WebhooksAPI.ErrorDetail | null;
352
+ error?: MessageSendResponse.Error | null;
213
353
  /**
214
354
  * Request and response metadata
215
355
  */
216
- meta?: WebhooksAPI.APIMeta;
356
+ meta?: MessageSendResponse.Meta;
217
357
  /**
218
358
  * Indicates whether the request was successful
219
359
  */
@@ -221,51 +361,90 @@ export interface MessageSendResponse {
221
361
  }
222
362
  export declare namespace MessageSendResponse {
223
363
  /**
224
- * Response for the multi-recipient send message endpoint
364
+ * The result of a multi-recipient send.
365
+ *
366
+ * Declared here rather than in the service layer. POST /v3/messages used to
367
+ * publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
368
+ * the public contract was whatever the send service happened to return, and
369
+ * changing that service for an internal reason changed the API. The service keeps
370
+ * its result; this is what a caller sees, and the mapping between them is a
371
+ * decision the endpoint makes.
372
+ *
373
+ * The wire is unchanged by the move: same names, same values.
225
374
  */
226
375
  interface Data {
227
- /**
228
- * Per-recipient message results
229
- */
230
376
  recipients?: Array<Data.Recipient>;
231
377
  /**
232
- * Overall request status: "QUEUED" when the batch has been accepted for delivery.
378
+ * Overall status — QUEUED once the batch is accepted for delivery.
233
379
  */
234
380
  status?: string;
235
- /**
236
- * Template ID that was used
237
- */
238
381
  template_id?: string;
239
- /**
240
- * Template display name
241
- */
242
382
  template_name?: string;
243
383
  }
244
384
  namespace Data {
245
385
  /**
246
- * Per-recipient result in the send message response
386
+ * What one recipient of a send got, as the API reports it.
247
387
  */
248
388
  interface Recipient {
249
389
  /**
250
- * Resolved template body text for this recipient's channel, or null for
251
- * auto-detect
390
+ * Resolved template body for this recipient's channel, or null when the channel is
391
+ * auto-detected.
252
392
  */
253
393
  body?: string | null;
254
394
  /**
255
- * Channel this message will be sent on (e.g. "sms", "whatsapp"), or null for
256
- * auto-detect
395
+ * Channel this message will be sent on — sms, whatsapp — or null to auto-detect.
257
396
  */
258
397
  channel?: string | null;
259
398
  /**
260
- * Unique message identifier for tracking this recipient's message
399
+ * Identifier for tracking this recipient's message.
261
400
  */
262
401
  message_id?: string;
263
402
  /**
264
- * Phone number in E.164 format
403
+ * Phone number in E.164 format.
265
404
  */
266
405
  to?: string;
267
406
  }
268
407
  }
408
+ /**
409
+ * Error information
410
+ */
411
+ interface Error {
412
+ /**
413
+ * Machine-readable error code (e.g., "RESOURCE_001")
414
+ */
415
+ code?: string;
416
+ /**
417
+ * Additional validation error details (field-level errors)
418
+ */
419
+ details?: {
420
+ [key: string]: Array<string>;
421
+ } | null;
422
+ /**
423
+ * URL to documentation about this error
424
+ */
425
+ doc_url?: string | null;
426
+ /**
427
+ * Human-readable error message
428
+ */
429
+ message?: string;
430
+ }
431
+ /**
432
+ * Request and response metadata
433
+ */
434
+ interface Meta {
435
+ /**
436
+ * Unique identifier for this request (for tracing and support)
437
+ */
438
+ request_id?: string;
439
+ /**
440
+ * Server timestamp when the response was generated
441
+ */
442
+ timestamp?: string;
443
+ /**
444
+ * API version used for this request
445
+ */
446
+ version?: string;
447
+ }
269
448
  }
270
449
  export interface MessageRetrieveActivitiesParams {
271
450
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"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G,IAAI,CAAC;IAE7C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;;OAGG;IACH,UAAiB,QAAQ;QACvB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEnB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;KAC/C;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -1,9 +1,12 @@
1
1
  import { APIResource } from "../core/resource.js";
2
- import * as WebhooksAPI from "./webhooks.js";
3
2
  import { APIPromise } from "../core/api-promise.js";
4
3
  import { RequestOptions } from "../internal/request-options.js";
5
4
  /**
6
- * Send and track SMS and WhatsApp messages
5
+ * Send a message and follow what happened to it.
6
+ *
7
+ * One endpoint sends on any channel: pass `channel: "sent"` and we pick between SMS, WhatsApp and RCS per recipient using your routing rules, or name a channel to pin it. A send is accepted asynchronously — `POST /v3/messages` returns an id, and delivery is reported through `GET /v3/messages/{id}`, its activities, or a webhook.
8
+ *
9
+ * **A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
7
10
  */
8
11
  export declare class Messages extends APIResource {
9
12
  /**
@@ -60,11 +63,11 @@ export interface MessageRetrieveActivitiesResponse {
60
63
  /**
61
64
  * Error information
62
65
  */
63
- error?: WebhooksAPI.ErrorDetail | null;
66
+ error?: MessageRetrieveActivitiesResponse.Error | null;
64
67
  /**
65
68
  * Request and response metadata
66
69
  */
67
- meta?: WebhooksAPI.APIMeta;
70
+ meta?: MessageRetrieveActivitiesResponse.Meta;
68
71
  /**
69
72
  * Indicates whether the request was successful
70
73
  */
@@ -83,6 +86,10 @@ export declare namespace MessageRetrieveActivitiesResponse {
83
86
  * The message ID these activities belong to
84
87
  */
85
88
  message_id?: string;
89
+ /**
90
+ * Pagination metadata for list responses
91
+ */
92
+ pagination?: Data.Pagination;
86
93
  }
87
94
  namespace Data {
88
95
  /**
@@ -119,6 +126,90 @@ export declare namespace MessageRetrieveActivitiesResponse {
119
126
  */
120
127
  timestamp?: string;
121
128
  }
129
+ /**
130
+ * Pagination metadata for list responses
131
+ */
132
+ interface Pagination {
133
+ /**
134
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
135
+ */
136
+ cursors?: Pagination.Cursors | null;
137
+ /**
138
+ * Whether there are more pages after this one
139
+ */
140
+ has_more?: boolean;
141
+ /**
142
+ * Current page number (1-indexed)
143
+ */
144
+ page?: number;
145
+ /**
146
+ * Number of items per page
147
+ */
148
+ page_size?: number;
149
+ /**
150
+ * Total number of items across all pages
151
+ */
152
+ total_count?: number;
153
+ /**
154
+ * Total number of pages
155
+ */
156
+ total_pages?: number;
157
+ }
158
+ namespace Pagination {
159
+ /**
160
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
161
+ */
162
+ interface Cursors {
163
+ /**
164
+ * Cursor to fetch the next page.
165
+ */
166
+ after?: string | null;
167
+ /**
168
+ * Cursor to fetch the previous page.
169
+ */
170
+ before?: string | null;
171
+ }
172
+ }
173
+ }
174
+ /**
175
+ * Error information
176
+ */
177
+ interface Error {
178
+ /**
179
+ * Machine-readable error code (e.g., "RESOURCE_001")
180
+ */
181
+ code?: string;
182
+ /**
183
+ * Additional validation error details (field-level errors)
184
+ */
185
+ details?: {
186
+ [key: string]: Array<string>;
187
+ } | null;
188
+ /**
189
+ * URL to documentation about this error
190
+ */
191
+ doc_url?: string | null;
192
+ /**
193
+ * Human-readable error message
194
+ */
195
+ message?: string;
196
+ }
197
+ /**
198
+ * Request and response metadata
199
+ */
200
+ interface Meta {
201
+ /**
202
+ * Unique identifier for this request (for tracing and support)
203
+ */
204
+ request_id?: string;
205
+ /**
206
+ * Server timestamp when the response was generated
207
+ */
208
+ timestamp?: string;
209
+ /**
210
+ * API version used for this request
211
+ */
212
+ version?: string;
122
213
  }
123
214
  }
124
215
  /**
@@ -132,11 +223,11 @@ export interface MessageRetrieveStatusResponse {
132
223
  /**
133
224
  * Error information
134
225
  */
135
- error?: WebhooksAPI.ErrorDetail | null;
226
+ error?: MessageRetrieveStatusResponse.Error | null;
136
227
  /**
137
228
  * Request and response metadata
138
229
  */
139
- meta?: WebhooksAPI.APIMeta;
230
+ meta?: MessageRetrieveStatusResponse.Meta;
140
231
  /**
141
232
  * Indicates whether the request was successful
142
233
  */
@@ -197,23 +288,72 @@ export declare namespace MessageRetrieveStatusResponse {
197
288
  }
198
289
  }
199
290
  }
291
+ /**
292
+ * Error information
293
+ */
294
+ interface Error {
295
+ /**
296
+ * Machine-readable error code (e.g., "RESOURCE_001")
297
+ */
298
+ code?: string;
299
+ /**
300
+ * Additional validation error details (field-level errors)
301
+ */
302
+ details?: {
303
+ [key: string]: Array<string>;
304
+ } | null;
305
+ /**
306
+ * URL to documentation about this error
307
+ */
308
+ doc_url?: string | null;
309
+ /**
310
+ * Human-readable error message
311
+ */
312
+ message?: string;
313
+ }
314
+ /**
315
+ * Request and response metadata
316
+ */
317
+ interface Meta {
318
+ /**
319
+ * Unique identifier for this request (for tracing and support)
320
+ */
321
+ request_id?: string;
322
+ /**
323
+ * Server timestamp when the response was generated
324
+ */
325
+ timestamp?: string;
326
+ /**
327
+ * API version used for this request
328
+ */
329
+ version?: string;
330
+ }
200
331
  }
201
332
  /**
202
333
  * Standard API response envelope for all v3 endpoints
203
334
  */
204
335
  export interface MessageSendResponse {
205
336
  /**
206
- * Response for the multi-recipient send message endpoint
337
+ * The result of a multi-recipient send.
338
+ *
339
+ * Declared here rather than in the service layer. POST /v3/messages used to
340
+ * publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
341
+ * the public contract was whatever the send service happened to return, and
342
+ * changing that service for an internal reason changed the API. The service keeps
343
+ * its result; this is what a caller sees, and the mapping between them is a
344
+ * decision the endpoint makes.
345
+ *
346
+ * The wire is unchanged by the move: same names, same values.
207
347
  */
208
348
  data?: MessageSendResponse.Data | null;
209
349
  /**
210
350
  * Error information
211
351
  */
212
- error?: WebhooksAPI.ErrorDetail | null;
352
+ error?: MessageSendResponse.Error | null;
213
353
  /**
214
354
  * Request and response metadata
215
355
  */
216
- meta?: WebhooksAPI.APIMeta;
356
+ meta?: MessageSendResponse.Meta;
217
357
  /**
218
358
  * Indicates whether the request was successful
219
359
  */
@@ -221,51 +361,90 @@ export interface MessageSendResponse {
221
361
  }
222
362
  export declare namespace MessageSendResponse {
223
363
  /**
224
- * Response for the multi-recipient send message endpoint
364
+ * The result of a multi-recipient send.
365
+ *
366
+ * Declared here rather than in the service layer. POST /v3/messages used to
367
+ * publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
368
+ * the public contract was whatever the send service happened to return, and
369
+ * changing that service for an internal reason changed the API. The service keeps
370
+ * its result; this is what a caller sees, and the mapping between them is a
371
+ * decision the endpoint makes.
372
+ *
373
+ * The wire is unchanged by the move: same names, same values.
225
374
  */
226
375
  interface Data {
227
- /**
228
- * Per-recipient message results
229
- */
230
376
  recipients?: Array<Data.Recipient>;
231
377
  /**
232
- * Overall request status: "QUEUED" when the batch has been accepted for delivery.
378
+ * Overall status — QUEUED once the batch is accepted for delivery.
233
379
  */
234
380
  status?: string;
235
- /**
236
- * Template ID that was used
237
- */
238
381
  template_id?: string;
239
- /**
240
- * Template display name
241
- */
242
382
  template_name?: string;
243
383
  }
244
384
  namespace Data {
245
385
  /**
246
- * Per-recipient result in the send message response
386
+ * What one recipient of a send got, as the API reports it.
247
387
  */
248
388
  interface Recipient {
249
389
  /**
250
- * Resolved template body text for this recipient's channel, or null for
251
- * auto-detect
390
+ * Resolved template body for this recipient's channel, or null when the channel is
391
+ * auto-detected.
252
392
  */
253
393
  body?: string | null;
254
394
  /**
255
- * Channel this message will be sent on (e.g. "sms", "whatsapp"), or null for
256
- * auto-detect
395
+ * Channel this message will be sent on — sms, whatsapp — or null to auto-detect.
257
396
  */
258
397
  channel?: string | null;
259
398
  /**
260
- * Unique message identifier for tracking this recipient's message
399
+ * Identifier for tracking this recipient's message.
261
400
  */
262
401
  message_id?: string;
263
402
  /**
264
- * Phone number in E.164 format
403
+ * Phone number in E.164 format.
265
404
  */
266
405
  to?: string;
267
406
  }
268
407
  }
408
+ /**
409
+ * Error information
410
+ */
411
+ interface Error {
412
+ /**
413
+ * Machine-readable error code (e.g., "RESOURCE_001")
414
+ */
415
+ code?: string;
416
+ /**
417
+ * Additional validation error details (field-level errors)
418
+ */
419
+ details?: {
420
+ [key: string]: Array<string>;
421
+ } | null;
422
+ /**
423
+ * URL to documentation about this error
424
+ */
425
+ doc_url?: string | null;
426
+ /**
427
+ * Human-readable error message
428
+ */
429
+ message?: string;
430
+ }
431
+ /**
432
+ * Request and response metadata
433
+ */
434
+ interface Meta {
435
+ /**
436
+ * Unique identifier for this request (for tracing and support)
437
+ */
438
+ request_id?: string;
439
+ /**
440
+ * Server timestamp when the response was generated
441
+ */
442
+ timestamp?: string;
443
+ /**
444
+ * API version used for this request
445
+ */
446
+ version?: string;
447
+ }
269
448
  }
270
449
  export interface MessageRetrieveActivitiesParams {
271
450
  /**