@sentdm/sentdm 0.33.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.
- package/CHANGELOG.md +35 -0
- package/client.d.mts +53 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -22
- package/client.d.ts.map +1 -1
- package/client.js +39 -8
- package/client.js.map +1 -1
- package/client.mjs +39 -8
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +606 -89
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +606 -89
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +21 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +21 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +335 -69
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +335 -69
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +15 -10
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +15 -10
- package/resources/conversations.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +132 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +132 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +3 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +3 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +212 -31
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +212 -31
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +11 -5
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +11 -5
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +45 -4
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +45 -4
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js +3 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs +3 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +579 -209
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +579 -209
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +33 -64
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +33 -64
- package/resources/profiles/campaigns.mjs.map +1 -1
- package/resources/profiles/index.d.mts +2 -2
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts +2 -2
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.js.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +2006 -499
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -499
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +97 -68
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +97 -68
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +497 -84
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +497 -84
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +6 -4
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +6 -4
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +449 -46
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +449 -46
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +11 -7
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +11 -7
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +934 -109
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +934 -109
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -8
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -8
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +90 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +26 -26
- package/src/resources/me.ts +151 -52
- package/src/resources/messages.ts +236 -31
- package/src/resources/numbers.ts +50 -4
- package/src/resources/profiles/campaigns.ts +706 -232
- package/src/resources/profiles/index.ts +6 -14
- package/src/resources/profiles/profiles.ts +2421 -637
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +519 -47
- package/src/resources/webhooks.ts +1170 -179
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/me.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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 MeAPI from './me';
|
|
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
|
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* Who the current key is.
|
|
10
|
+
*
|
|
11
|
+
* `GET /v3/me` answers with the account the key authenticates as, which is the quickest way to tell a live key from a test one, an organization key from a sender profile's, and to confirm `x-profile-id` resolved to the profile you meant.
|
|
12
12
|
*/
|
|
13
13
|
export class Me extends APIResource {
|
|
14
14
|
/**
|
|
@@ -43,46 +43,6 @@ export class Me extends APIResource {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* Profile configuration settings
|
|
48
|
-
*/
|
|
49
|
-
export interface ProfileSettings {
|
|
50
|
-
/**
|
|
51
|
-
* Whether contacts are shared across profiles in the organization
|
|
52
|
-
*/
|
|
53
|
-
allow_contact_sharing?: boolean | null;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Whether templates are shared across profiles in the organization
|
|
57
|
-
*/
|
|
58
|
-
allow_template_sharing?: boolean | null;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Billing model: profile, organization, or profile_and_organization
|
|
62
|
-
*/
|
|
63
|
-
billing_model?: string | null;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Whether this profile inherits contacts from the organization
|
|
67
|
-
*/
|
|
68
|
-
inherit_contacts?: boolean | null;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Whether this profile inherits TCR brand from the organization
|
|
72
|
-
*/
|
|
73
|
-
inherit_tcr_brand?: boolean | null;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Whether this profile inherits TCR campaign from the organization
|
|
77
|
-
*/
|
|
78
|
-
inherit_tcr_campaign?: boolean | null;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Whether this profile inherits templates from the organization
|
|
82
|
-
*/
|
|
83
|
-
inherit_templates?: boolean | null;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
46
|
/**
|
|
87
47
|
* Standard API response envelope for all v3 endpoints
|
|
88
48
|
*/
|
|
@@ -97,12 +57,12 @@ export interface MeRetrieveResponse {
|
|
|
97
57
|
/**
|
|
98
58
|
* Error information
|
|
99
59
|
*/
|
|
100
|
-
error?:
|
|
60
|
+
error?: MeRetrieveResponse.Error | null;
|
|
101
61
|
|
|
102
62
|
/**
|
|
103
63
|
* Request and response metadata
|
|
104
64
|
*/
|
|
105
|
-
meta?:
|
|
65
|
+
meta?: MeRetrieveResponse.Meta;
|
|
106
66
|
|
|
107
67
|
/**
|
|
108
68
|
* Indicates whether the request was successful
|
|
@@ -167,7 +127,7 @@ export namespace MeRetrieveResponse {
|
|
|
167
127
|
/**
|
|
168
128
|
* Profile configuration settings
|
|
169
129
|
*/
|
|
170
|
-
settings?:
|
|
130
|
+
settings?: Data.Settings | null;
|
|
171
131
|
|
|
172
132
|
/**
|
|
173
133
|
* Short name / abbreviation (only for profile type)
|
|
@@ -301,7 +261,7 @@ export namespace MeRetrieveResponse {
|
|
|
301
261
|
/**
|
|
302
262
|
* Profile configuration settings
|
|
303
263
|
*/
|
|
304
|
-
settings?:
|
|
264
|
+
settings?: Profile.Settings;
|
|
305
265
|
|
|
306
266
|
/**
|
|
307
267
|
* Profile short name (abbreviation)
|
|
@@ -313,6 +273,149 @@ export namespace MeRetrieveResponse {
|
|
|
313
273
|
*/
|
|
314
274
|
status?: string | null;
|
|
315
275
|
}
|
|
276
|
+
|
|
277
|
+
export namespace Profile {
|
|
278
|
+
/**
|
|
279
|
+
* Profile configuration settings
|
|
280
|
+
*/
|
|
281
|
+
export interface Settings {
|
|
282
|
+
/**
|
|
283
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
284
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
285
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
286
|
+
*/
|
|
287
|
+
allow_contact_sharing?: boolean | null;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
291
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
292
|
+
* deserializing; it carries no information.
|
|
293
|
+
*/
|
|
294
|
+
allow_template_sharing?: boolean | null;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
298
|
+
*/
|
|
299
|
+
billing_model?: string | null;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
303
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
304
|
+
* deserializing; it carries no information.
|
|
305
|
+
*/
|
|
306
|
+
inherit_contacts?: boolean | null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Whether this profile inherits TCR brand from the organization
|
|
310
|
+
*/
|
|
311
|
+
inherit_tcr_brand?: boolean | null;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
315
|
+
*/
|
|
316
|
+
inherit_tcr_campaign?: boolean | null;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
320
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
321
|
+
* deserializing; it carries no information.
|
|
322
|
+
*/
|
|
323
|
+
inherit_templates?: boolean | null;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Profile configuration settings
|
|
329
|
+
*/
|
|
330
|
+
export interface Settings {
|
|
331
|
+
/**
|
|
332
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
333
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
334
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
335
|
+
*/
|
|
336
|
+
allow_contact_sharing?: boolean | null;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
340
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
341
|
+
* deserializing; it carries no information.
|
|
342
|
+
*/
|
|
343
|
+
allow_template_sharing?: boolean | null;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
347
|
+
*/
|
|
348
|
+
billing_model?: string | null;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
352
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
353
|
+
* deserializing; it carries no information.
|
|
354
|
+
*/
|
|
355
|
+
inherit_contacts?: boolean | null;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Whether this profile inherits TCR brand from the organization
|
|
359
|
+
*/
|
|
360
|
+
inherit_tcr_brand?: boolean | null;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
364
|
+
*/
|
|
365
|
+
inherit_tcr_campaign?: boolean | null;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
369
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
370
|
+
* deserializing; it carries no information.
|
|
371
|
+
*/
|
|
372
|
+
inherit_templates?: boolean | null;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Error information
|
|
378
|
+
*/
|
|
379
|
+
export interface Error {
|
|
380
|
+
/**
|
|
381
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
382
|
+
*/
|
|
383
|
+
code?: string;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Additional validation error details (field-level errors)
|
|
387
|
+
*/
|
|
388
|
+
details?: { [key: string]: Array<string> } | null;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* URL to documentation about this error
|
|
392
|
+
*/
|
|
393
|
+
doc_url?: string | null;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Human-readable error message
|
|
397
|
+
*/
|
|
398
|
+
message?: string;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Request and response metadata
|
|
403
|
+
*/
|
|
404
|
+
export interface Meta {
|
|
405
|
+
/**
|
|
406
|
+
* Unique identifier for this request (for tracing and support)
|
|
407
|
+
*/
|
|
408
|
+
request_id?: string;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Server timestamp when the response was generated
|
|
412
|
+
*/
|
|
413
|
+
timestamp?: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* API version used for this request
|
|
417
|
+
*/
|
|
418
|
+
version?: string;
|
|
316
419
|
}
|
|
317
420
|
}
|
|
318
421
|
|
|
@@ -325,9 +428,5 @@ export interface MeRetrieveParams {
|
|
|
325
428
|
}
|
|
326
429
|
|
|
327
430
|
export declare namespace Me {
|
|
328
|
-
export {
|
|
329
|
-
type ProfileSettings as ProfileSettings,
|
|
330
|
-
type MeRetrieveResponse as MeRetrieveResponse,
|
|
331
|
-
type MeRetrieveParams as MeRetrieveParams,
|
|
332
|
-
};
|
|
431
|
+
export { type MeRetrieveResponse as MeRetrieveResponse, type MeRetrieveParams as MeRetrieveParams };
|
|
333
432
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
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 WebhooksAPI from './webhooks';
|
|
5
4
|
import { APIPromise } from '../core/api-promise';
|
|
6
5
|
import { buildHeaders } from '../internal/headers';
|
|
7
6
|
import { RequestOptions } from '../internal/request-options';
|
|
8
7
|
import { path } from '../internal/utils/path';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
|
-
* Send and
|
|
10
|
+
* Send a message and follow what happened to it.
|
|
11
|
+
*
|
|
12
|
+
* 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.
|
|
13
|
+
*
|
|
14
|
+
* **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.
|
|
12
15
|
*/
|
|
13
16
|
export class Messages extends APIResource {
|
|
14
17
|
/**
|
|
@@ -68,10 +71,12 @@ export class Messages extends APIResource {
|
|
|
68
71
|
* multi-channel broadcast — when multiple channels are specified (e.g. ["sms",
|
|
69
72
|
* "whatsapp"]), a separate message is created for each (recipient, channel) pair.
|
|
70
73
|
* Returns immediately with per-recipient message IDs for async tracking via
|
|
71
|
-
* webhooks or the GET /messages/{id} endpoint.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
74
|
+
* webhooks or the GET /messages/{id} endpoint. Sends gated before any delivery
|
|
75
|
+
* attempt do not reject the request — an account-level precondition such as
|
|
76
|
+
* insufficient balance, a template not approved for sending, or free-form content
|
|
77
|
+
* with no open conversation with the contact. The send is accepted with 202 and
|
|
78
|
+
* the affected messages are reported as BLOCKED on GET /messages/{id} and the
|
|
79
|
+
* message.blocked webhook.
|
|
75
80
|
*
|
|
76
81
|
* @example
|
|
77
82
|
* ```ts
|
|
@@ -106,12 +111,12 @@ export interface MessageRetrieveActivitiesResponse {
|
|
|
106
111
|
/**
|
|
107
112
|
* Error information
|
|
108
113
|
*/
|
|
109
|
-
error?:
|
|
114
|
+
error?: MessageRetrieveActivitiesResponse.Error | null;
|
|
110
115
|
|
|
111
116
|
/**
|
|
112
117
|
* Request and response metadata
|
|
113
118
|
*/
|
|
114
|
-
meta?:
|
|
119
|
+
meta?: MessageRetrieveActivitiesResponse.Meta;
|
|
115
120
|
|
|
116
121
|
/**
|
|
117
122
|
* Indicates whether the request was successful
|
|
@@ -133,6 +138,11 @@ export namespace MessageRetrieveActivitiesResponse {
|
|
|
133
138
|
* The message ID these activities belong to
|
|
134
139
|
*/
|
|
135
140
|
message_id?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Pagination metadata for list responses
|
|
144
|
+
*/
|
|
145
|
+
pagination?: Data.Pagination;
|
|
136
146
|
}
|
|
137
147
|
|
|
138
148
|
export namespace Data {
|
|
@@ -175,6 +185,103 @@ export namespace MessageRetrieveActivitiesResponse {
|
|
|
175
185
|
*/
|
|
176
186
|
timestamp?: string;
|
|
177
187
|
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Pagination metadata for list responses
|
|
191
|
+
*/
|
|
192
|
+
export interface Pagination {
|
|
193
|
+
/**
|
|
194
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
195
|
+
*/
|
|
196
|
+
cursors?: Pagination.Cursors | null;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Whether there are more pages after this one
|
|
200
|
+
*/
|
|
201
|
+
has_more?: boolean;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Current page number (1-indexed)
|
|
205
|
+
*/
|
|
206
|
+
page?: number;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Number of items per page
|
|
210
|
+
*/
|
|
211
|
+
page_size?: number;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Total number of items across all pages
|
|
215
|
+
*/
|
|
216
|
+
total_count?: number;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Total number of pages
|
|
220
|
+
*/
|
|
221
|
+
total_pages?: number;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export namespace Pagination {
|
|
225
|
+
/**
|
|
226
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
227
|
+
*/
|
|
228
|
+
export interface Cursors {
|
|
229
|
+
/**
|
|
230
|
+
* Cursor to fetch the next page.
|
|
231
|
+
*/
|
|
232
|
+
after?: string | null;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Cursor to fetch the previous page.
|
|
236
|
+
*/
|
|
237
|
+
before?: string | null;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Error information
|
|
244
|
+
*/
|
|
245
|
+
export interface Error {
|
|
246
|
+
/**
|
|
247
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
248
|
+
*/
|
|
249
|
+
code?: string;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Additional validation error details (field-level errors)
|
|
253
|
+
*/
|
|
254
|
+
details?: { [key: string]: Array<string> } | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* URL to documentation about this error
|
|
258
|
+
*/
|
|
259
|
+
doc_url?: string | null;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Human-readable error message
|
|
263
|
+
*/
|
|
264
|
+
message?: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Request and response metadata
|
|
269
|
+
*/
|
|
270
|
+
export interface Meta {
|
|
271
|
+
/**
|
|
272
|
+
* Unique identifier for this request (for tracing and support)
|
|
273
|
+
*/
|
|
274
|
+
request_id?: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Server timestamp when the response was generated
|
|
278
|
+
*/
|
|
279
|
+
timestamp?: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* API version used for this request
|
|
283
|
+
*/
|
|
284
|
+
version?: string;
|
|
178
285
|
}
|
|
179
286
|
}
|
|
180
287
|
|
|
@@ -190,12 +297,12 @@ export interface MessageRetrieveStatusResponse {
|
|
|
190
297
|
/**
|
|
191
298
|
* Error information
|
|
192
299
|
*/
|
|
193
|
-
error?:
|
|
300
|
+
error?: MessageRetrieveStatusResponse.Error | null;
|
|
194
301
|
|
|
195
302
|
/**
|
|
196
303
|
* Request and response metadata
|
|
197
304
|
*/
|
|
198
|
-
meta?:
|
|
305
|
+
meta?: MessageRetrieveStatusResponse.Meta;
|
|
199
306
|
|
|
200
307
|
/**
|
|
201
308
|
* Indicates whether the request was successful
|
|
@@ -285,6 +392,51 @@ export namespace MessageRetrieveStatusResponse {
|
|
|
285
392
|
}
|
|
286
393
|
}
|
|
287
394
|
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Error information
|
|
398
|
+
*/
|
|
399
|
+
export interface Error {
|
|
400
|
+
/**
|
|
401
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
402
|
+
*/
|
|
403
|
+
code?: string;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Additional validation error details (field-level errors)
|
|
407
|
+
*/
|
|
408
|
+
details?: { [key: string]: Array<string> } | null;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* URL to documentation about this error
|
|
412
|
+
*/
|
|
413
|
+
doc_url?: string | null;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Human-readable error message
|
|
417
|
+
*/
|
|
418
|
+
message?: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Request and response metadata
|
|
423
|
+
*/
|
|
424
|
+
export interface Meta {
|
|
425
|
+
/**
|
|
426
|
+
* Unique identifier for this request (for tracing and support)
|
|
427
|
+
*/
|
|
428
|
+
request_id?: string;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Server timestamp when the response was generated
|
|
432
|
+
*/
|
|
433
|
+
timestamp?: string;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* API version used for this request
|
|
437
|
+
*/
|
|
438
|
+
version?: string;
|
|
439
|
+
}
|
|
288
440
|
}
|
|
289
441
|
|
|
290
442
|
/**
|
|
@@ -292,19 +444,28 @@ export namespace MessageRetrieveStatusResponse {
|
|
|
292
444
|
*/
|
|
293
445
|
export interface MessageSendResponse {
|
|
294
446
|
/**
|
|
295
|
-
*
|
|
447
|
+
* The result of a multi-recipient send.
|
|
448
|
+
*
|
|
449
|
+
* Declared here rather than in the service layer. POST /v3/messages used to
|
|
450
|
+
* publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
|
|
451
|
+
* the public contract was whatever the send service happened to return, and
|
|
452
|
+
* changing that service for an internal reason changed the API. The service keeps
|
|
453
|
+
* its result; this is what a caller sees, and the mapping between them is a
|
|
454
|
+
* decision the endpoint makes.
|
|
455
|
+
*
|
|
456
|
+
* The wire is unchanged by the move: same names, same values.
|
|
296
457
|
*/
|
|
297
458
|
data?: MessageSendResponse.Data | null;
|
|
298
459
|
|
|
299
460
|
/**
|
|
300
461
|
* Error information
|
|
301
462
|
*/
|
|
302
|
-
error?:
|
|
463
|
+
error?: MessageSendResponse.Error | null;
|
|
303
464
|
|
|
304
465
|
/**
|
|
305
466
|
* Request and response metadata
|
|
306
467
|
*/
|
|
307
|
-
meta?:
|
|
468
|
+
meta?: MessageSendResponse.Meta;
|
|
308
469
|
|
|
309
470
|
/**
|
|
310
471
|
* Indicates whether the request was successful
|
|
@@ -314,58 +475,102 @@ export interface MessageSendResponse {
|
|
|
314
475
|
|
|
315
476
|
export namespace MessageSendResponse {
|
|
316
477
|
/**
|
|
317
|
-
*
|
|
478
|
+
* The result of a multi-recipient send.
|
|
479
|
+
*
|
|
480
|
+
* Declared here rather than in the service layer. POST /v3/messages used to
|
|
481
|
+
* publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
|
|
482
|
+
* the public contract was whatever the send service happened to return, and
|
|
483
|
+
* changing that service for an internal reason changed the API. The service keeps
|
|
484
|
+
* its result; this is what a caller sees, and the mapping between them is a
|
|
485
|
+
* decision the endpoint makes.
|
|
486
|
+
*
|
|
487
|
+
* The wire is unchanged by the move: same names, same values.
|
|
318
488
|
*/
|
|
319
489
|
export interface Data {
|
|
320
|
-
/**
|
|
321
|
-
* Per-recipient message results
|
|
322
|
-
*/
|
|
323
490
|
recipients?: Array<Data.Recipient>;
|
|
324
491
|
|
|
325
492
|
/**
|
|
326
|
-
* Overall
|
|
493
|
+
* Overall status — QUEUED once the batch is accepted for delivery.
|
|
327
494
|
*/
|
|
328
495
|
status?: string;
|
|
329
496
|
|
|
330
|
-
/**
|
|
331
|
-
* Template ID that was used
|
|
332
|
-
*/
|
|
333
497
|
template_id?: string;
|
|
334
498
|
|
|
335
|
-
/**
|
|
336
|
-
* Template display name
|
|
337
|
-
*/
|
|
338
499
|
template_name?: string;
|
|
339
500
|
}
|
|
340
501
|
|
|
341
502
|
export namespace Data {
|
|
342
503
|
/**
|
|
343
|
-
*
|
|
504
|
+
* What one recipient of a send got, as the API reports it.
|
|
344
505
|
*/
|
|
345
506
|
export interface Recipient {
|
|
346
507
|
/**
|
|
347
|
-
* Resolved template body
|
|
348
|
-
* auto-
|
|
508
|
+
* Resolved template body for this recipient's channel, or null when the channel is
|
|
509
|
+
* auto-detected.
|
|
349
510
|
*/
|
|
350
511
|
body?: string | null;
|
|
351
512
|
|
|
352
513
|
/**
|
|
353
|
-
* Channel this message will be sent on
|
|
354
|
-
* auto-detect
|
|
514
|
+
* Channel this message will be sent on — sms, whatsapp — or null to auto-detect.
|
|
355
515
|
*/
|
|
356
516
|
channel?: string | null;
|
|
357
517
|
|
|
358
518
|
/**
|
|
359
|
-
*
|
|
519
|
+
* Identifier for tracking this recipient's message.
|
|
360
520
|
*/
|
|
361
521
|
message_id?: string;
|
|
362
522
|
|
|
363
523
|
/**
|
|
364
|
-
* Phone number in E.164 format
|
|
524
|
+
* Phone number in E.164 format.
|
|
365
525
|
*/
|
|
366
526
|
to?: string;
|
|
367
527
|
}
|
|
368
528
|
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Error information
|
|
532
|
+
*/
|
|
533
|
+
export interface Error {
|
|
534
|
+
/**
|
|
535
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
536
|
+
*/
|
|
537
|
+
code?: string;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Additional validation error details (field-level errors)
|
|
541
|
+
*/
|
|
542
|
+
details?: { [key: string]: Array<string> } | null;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* URL to documentation about this error
|
|
546
|
+
*/
|
|
547
|
+
doc_url?: string | null;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Human-readable error message
|
|
551
|
+
*/
|
|
552
|
+
message?: string;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Request and response metadata
|
|
557
|
+
*/
|
|
558
|
+
export interface Meta {
|
|
559
|
+
/**
|
|
560
|
+
* Unique identifier for this request (for tracing and support)
|
|
561
|
+
*/
|
|
562
|
+
request_id?: string;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Server timestamp when the response was generated
|
|
566
|
+
*/
|
|
567
|
+
timestamp?: string;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* API version used for this request
|
|
571
|
+
*/
|
|
572
|
+
version?: string;
|
|
573
|
+
}
|
|
369
574
|
}
|
|
370
575
|
|
|
371
576
|
export interface MessageRetrieveActivitiesParams {
|