@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.
- package/CHANGELOG.md +15 -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 +165 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +165 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +206 -27
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +206 -27
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +5 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +5 -1
- 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 -508
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -508
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +98 -75
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +98 -75
- 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 +444 -43
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +444 -43
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +6 -4
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +6 -4
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +791 -190
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +791 -190
- 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 +78 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +20 -26
- package/src/resources/me.ts +186 -52
- package/src/resources/messages.ts +230 -27
- 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 -646
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +514 -44
- package/src/resources/webhooks.ts +964 -241
- 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
|
/**
|
|
@@ -27,6 +27,17 @@ export class Me extends APIResource {
|
|
|
27
27
|
* **Channels:** The `channels` object always includes `sms`, `whatsapp`, and
|
|
28
28
|
* `rcs`. Each channel has a `configured` boolean. Configured channels expose
|
|
29
29
|
* additional details such as `phone_number`.
|
|
30
|
+
*
|
|
31
|
+
* **Sending number:** `sending_phone_number` is the account's US SMS sender. It is
|
|
32
|
+
* intentionally the same value as `channels.sms.phone_number` — the two are kept
|
|
33
|
+
* in step, and it is published under both names because `sending_phone_number` is
|
|
34
|
+
* what this value is called on `GET /v3/profiles`. Read either. One difference:
|
|
35
|
+
* `sending_phone_number` is always present, including as `null`, while
|
|
36
|
+
* `channels.sms.phone_number` is omitted when there is no sender.
|
|
37
|
+
*
|
|
38
|
+
* `sending_phone_number_profile_id` names the account that holds that number in
|
|
39
|
+
* inventory — normally this account, and a different one where a number is shared.
|
|
40
|
+
* Both are `null` when the account has no US SMS sender.
|
|
30
41
|
*/
|
|
31
42
|
retrieve(
|
|
32
43
|
params: MeRetrieveParams | null | undefined = {},
|
|
@@ -43,46 +54,6 @@ export class Me extends APIResource {
|
|
|
43
54
|
}
|
|
44
55
|
}
|
|
45
56
|
|
|
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
57
|
/**
|
|
87
58
|
* Standard API response envelope for all v3 endpoints
|
|
88
59
|
*/
|
|
@@ -97,12 +68,12 @@ export interface MeRetrieveResponse {
|
|
|
97
68
|
/**
|
|
98
69
|
* Error information
|
|
99
70
|
*/
|
|
100
|
-
error?:
|
|
71
|
+
error?: MeRetrieveResponse.Error | null;
|
|
101
72
|
|
|
102
73
|
/**
|
|
103
74
|
* Request and response metadata
|
|
104
75
|
*/
|
|
105
|
-
meta?:
|
|
76
|
+
meta?: MeRetrieveResponse.Meta;
|
|
106
77
|
|
|
107
78
|
/**
|
|
108
79
|
* Indicates whether the request was successful
|
|
@@ -164,10 +135,34 @@ export namespace MeRetrieveResponse {
|
|
|
164
135
|
*/
|
|
165
136
|
profiles?: Array<Data.Profile>;
|
|
166
137
|
|
|
138
|
+
/**
|
|
139
|
+
* The SMS sender this account sends from in the United States, in E.164 form. Null
|
|
140
|
+
* when the account has no US SMS sender.
|
|
141
|
+
*
|
|
142
|
+
* The same value as channels.sms.phone_number, published under both names on
|
|
143
|
+
* purpose: sending_phone_number is what this value is already called on GET
|
|
144
|
+
* /v3/profiles, so the same key answers the same question whichever of the two
|
|
145
|
+
* endpoints you ask. Neither name is preferred over the other and neither is
|
|
146
|
+
* deprecated.
|
|
147
|
+
*
|
|
148
|
+
* The same value, not the same presence: this key is always written, including as
|
|
149
|
+
* null, whereas channels.sms.phone_number is left out entirely when there is no
|
|
150
|
+
* sender.
|
|
151
|
+
*/
|
|
152
|
+
sending_phone_number?: string | null;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The account that holds sending_phone_number in number inventory: normally this
|
|
156
|
+
* account itself, and a different account when the number is held elsewhere. Null
|
|
157
|
+
* when there is no US sender, or when the sender is not a number drawn from
|
|
158
|
+
* inventory — an alphanumeric sender ID or a short code.
|
|
159
|
+
*/
|
|
160
|
+
sending_phone_number_profile_id?: string | null;
|
|
161
|
+
|
|
167
162
|
/**
|
|
168
163
|
* Profile configuration settings
|
|
169
164
|
*/
|
|
170
|
-
settings?:
|
|
165
|
+
settings?: Data.Settings | null;
|
|
171
166
|
|
|
172
167
|
/**
|
|
173
168
|
* Short name / abbreviation (only for profile type)
|
|
@@ -301,7 +296,7 @@ export namespace MeRetrieveResponse {
|
|
|
301
296
|
/**
|
|
302
297
|
* Profile configuration settings
|
|
303
298
|
*/
|
|
304
|
-
settings?:
|
|
299
|
+
settings?: Profile.Settings;
|
|
305
300
|
|
|
306
301
|
/**
|
|
307
302
|
* Profile short name (abbreviation)
|
|
@@ -313,6 +308,149 @@ export namespace MeRetrieveResponse {
|
|
|
313
308
|
*/
|
|
314
309
|
status?: string | null;
|
|
315
310
|
}
|
|
311
|
+
|
|
312
|
+
export namespace Profile {
|
|
313
|
+
/**
|
|
314
|
+
* Profile configuration settings
|
|
315
|
+
*/
|
|
316
|
+
export interface Settings {
|
|
317
|
+
/**
|
|
318
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
319
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
320
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
321
|
+
*/
|
|
322
|
+
allow_contact_sharing?: boolean | null;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
326
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
327
|
+
* deserializing; it carries no information.
|
|
328
|
+
*/
|
|
329
|
+
allow_template_sharing?: boolean | null;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
333
|
+
*/
|
|
334
|
+
billing_model?: string | null;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
338
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
339
|
+
* deserializing; it carries no information.
|
|
340
|
+
*/
|
|
341
|
+
inherit_contacts?: boolean | null;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Whether this profile inherits TCR brand from the organization
|
|
345
|
+
*/
|
|
346
|
+
inherit_tcr_brand?: boolean | null;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
350
|
+
*/
|
|
351
|
+
inherit_tcr_campaign?: boolean | null;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
355
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
356
|
+
* deserializing; it carries no information.
|
|
357
|
+
*/
|
|
358
|
+
inherit_templates?: boolean | null;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Profile configuration settings
|
|
364
|
+
*/
|
|
365
|
+
export interface Settings {
|
|
366
|
+
/**
|
|
367
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
368
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
369
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
370
|
+
*/
|
|
371
|
+
allow_contact_sharing?: boolean | null;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
375
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
376
|
+
* deserializing; it carries no information.
|
|
377
|
+
*/
|
|
378
|
+
allow_template_sharing?: boolean | null;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
382
|
+
*/
|
|
383
|
+
billing_model?: string | null;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
387
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
388
|
+
* deserializing; it carries no information.
|
|
389
|
+
*/
|
|
390
|
+
inherit_contacts?: boolean | null;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Whether this profile inherits TCR brand from the organization
|
|
394
|
+
*/
|
|
395
|
+
inherit_tcr_brand?: boolean | null;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
399
|
+
*/
|
|
400
|
+
inherit_tcr_campaign?: boolean | null;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
404
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
405
|
+
* deserializing; it carries no information.
|
|
406
|
+
*/
|
|
407
|
+
inherit_templates?: boolean | null;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Error information
|
|
413
|
+
*/
|
|
414
|
+
export interface Error {
|
|
415
|
+
/**
|
|
416
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
417
|
+
*/
|
|
418
|
+
code?: string;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Additional validation error details (field-level errors)
|
|
422
|
+
*/
|
|
423
|
+
details?: { [key: string]: Array<string> } | null;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* URL to documentation about this error
|
|
427
|
+
*/
|
|
428
|
+
doc_url?: string | null;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Human-readable error message
|
|
432
|
+
*/
|
|
433
|
+
message?: string;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Request and response metadata
|
|
438
|
+
*/
|
|
439
|
+
export interface Meta {
|
|
440
|
+
/**
|
|
441
|
+
* Unique identifier for this request (for tracing and support)
|
|
442
|
+
*/
|
|
443
|
+
request_id?: string;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Server timestamp when the response was generated
|
|
447
|
+
*/
|
|
448
|
+
timestamp?: string;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* API version used for this request
|
|
452
|
+
*/
|
|
453
|
+
version?: string;
|
|
316
454
|
}
|
|
317
455
|
}
|
|
318
456
|
|
|
@@ -325,9 +463,5 @@ export interface MeRetrieveParams {
|
|
|
325
463
|
}
|
|
326
464
|
|
|
327
465
|
export declare namespace Me {
|
|
328
|
-
export {
|
|
329
|
-
type ProfileSettings as ProfileSettings,
|
|
330
|
-
type MeRetrieveResponse as MeRetrieveResponse,
|
|
331
|
-
type MeRetrieveParams as MeRetrieveParams,
|
|
332
|
-
};
|
|
466
|
+
export { type MeRetrieveResponse as MeRetrieveResponse, type MeRetrieveParams as MeRetrieveParams };
|
|
333
467
|
}
|
|
@@ -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
|
/**
|
|
@@ -108,12 +111,12 @@ export interface MessageRetrieveActivitiesResponse {
|
|
|
108
111
|
/**
|
|
109
112
|
* Error information
|
|
110
113
|
*/
|
|
111
|
-
error?:
|
|
114
|
+
error?: MessageRetrieveActivitiesResponse.Error | null;
|
|
112
115
|
|
|
113
116
|
/**
|
|
114
117
|
* Request and response metadata
|
|
115
118
|
*/
|
|
116
|
-
meta?:
|
|
119
|
+
meta?: MessageRetrieveActivitiesResponse.Meta;
|
|
117
120
|
|
|
118
121
|
/**
|
|
119
122
|
* Indicates whether the request was successful
|
|
@@ -135,6 +138,11 @@ export namespace MessageRetrieveActivitiesResponse {
|
|
|
135
138
|
* The message ID these activities belong to
|
|
136
139
|
*/
|
|
137
140
|
message_id?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Pagination metadata for list responses
|
|
144
|
+
*/
|
|
145
|
+
pagination?: Data.Pagination;
|
|
138
146
|
}
|
|
139
147
|
|
|
140
148
|
export namespace Data {
|
|
@@ -177,6 +185,103 @@ export namespace MessageRetrieveActivitiesResponse {
|
|
|
177
185
|
*/
|
|
178
186
|
timestamp?: string;
|
|
179
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;
|
|
180
285
|
}
|
|
181
286
|
}
|
|
182
287
|
|
|
@@ -192,12 +297,12 @@ export interface MessageRetrieveStatusResponse {
|
|
|
192
297
|
/**
|
|
193
298
|
* Error information
|
|
194
299
|
*/
|
|
195
|
-
error?:
|
|
300
|
+
error?: MessageRetrieveStatusResponse.Error | null;
|
|
196
301
|
|
|
197
302
|
/**
|
|
198
303
|
* Request and response metadata
|
|
199
304
|
*/
|
|
200
|
-
meta?:
|
|
305
|
+
meta?: MessageRetrieveStatusResponse.Meta;
|
|
201
306
|
|
|
202
307
|
/**
|
|
203
308
|
* Indicates whether the request was successful
|
|
@@ -287,6 +392,51 @@ export namespace MessageRetrieveStatusResponse {
|
|
|
287
392
|
}
|
|
288
393
|
}
|
|
289
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
|
+
}
|
|
290
440
|
}
|
|
291
441
|
|
|
292
442
|
/**
|
|
@@ -294,19 +444,28 @@ export namespace MessageRetrieveStatusResponse {
|
|
|
294
444
|
*/
|
|
295
445
|
export interface MessageSendResponse {
|
|
296
446
|
/**
|
|
297
|
-
*
|
|
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.
|
|
298
457
|
*/
|
|
299
458
|
data?: MessageSendResponse.Data | null;
|
|
300
459
|
|
|
301
460
|
/**
|
|
302
461
|
* Error information
|
|
303
462
|
*/
|
|
304
|
-
error?:
|
|
463
|
+
error?: MessageSendResponse.Error | null;
|
|
305
464
|
|
|
306
465
|
/**
|
|
307
466
|
* Request and response metadata
|
|
308
467
|
*/
|
|
309
|
-
meta?:
|
|
468
|
+
meta?: MessageSendResponse.Meta;
|
|
310
469
|
|
|
311
470
|
/**
|
|
312
471
|
* Indicates whether the request was successful
|
|
@@ -316,58 +475,102 @@ export interface MessageSendResponse {
|
|
|
316
475
|
|
|
317
476
|
export namespace MessageSendResponse {
|
|
318
477
|
/**
|
|
319
|
-
*
|
|
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.
|
|
320
488
|
*/
|
|
321
489
|
export interface Data {
|
|
322
|
-
/**
|
|
323
|
-
* Per-recipient message results
|
|
324
|
-
*/
|
|
325
490
|
recipients?: Array<Data.Recipient>;
|
|
326
491
|
|
|
327
492
|
/**
|
|
328
|
-
* Overall
|
|
493
|
+
* Overall status — QUEUED once the batch is accepted for delivery.
|
|
329
494
|
*/
|
|
330
495
|
status?: string;
|
|
331
496
|
|
|
332
|
-
/**
|
|
333
|
-
* Template ID that was used
|
|
334
|
-
*/
|
|
335
497
|
template_id?: string;
|
|
336
498
|
|
|
337
|
-
/**
|
|
338
|
-
* Template display name
|
|
339
|
-
*/
|
|
340
499
|
template_name?: string;
|
|
341
500
|
}
|
|
342
501
|
|
|
343
502
|
export namespace Data {
|
|
344
503
|
/**
|
|
345
|
-
*
|
|
504
|
+
* What one recipient of a send got, as the API reports it.
|
|
346
505
|
*/
|
|
347
506
|
export interface Recipient {
|
|
348
507
|
/**
|
|
349
|
-
* Resolved template body
|
|
350
|
-
* auto-
|
|
508
|
+
* Resolved template body for this recipient's channel, or null when the channel is
|
|
509
|
+
* auto-detected.
|
|
351
510
|
*/
|
|
352
511
|
body?: string | null;
|
|
353
512
|
|
|
354
513
|
/**
|
|
355
|
-
* Channel this message will be sent on
|
|
356
|
-
* auto-detect
|
|
514
|
+
* Channel this message will be sent on — sms, whatsapp — or null to auto-detect.
|
|
357
515
|
*/
|
|
358
516
|
channel?: string | null;
|
|
359
517
|
|
|
360
518
|
/**
|
|
361
|
-
*
|
|
519
|
+
* Identifier for tracking this recipient's message.
|
|
362
520
|
*/
|
|
363
521
|
message_id?: string;
|
|
364
522
|
|
|
365
523
|
/**
|
|
366
|
-
* Phone number in E.164 format
|
|
524
|
+
* Phone number in E.164 format.
|
|
367
525
|
*/
|
|
368
526
|
to?: string;
|
|
369
527
|
}
|
|
370
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
|
+
}
|
|
371
574
|
}
|
|
372
575
|
|
|
373
576
|
export interface MessageRetrieveActivitiesParams {
|