@sentdm/sentdm 0.7.2 → 0.14.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 +117 -0
- package/README.md +71 -34
- package/client.d.mts +49 -21
- package/client.d.mts.map +1 -1
- package/client.d.ts +49 -21
- package/client.d.ts.map +1 -1
- package/client.js +52 -38
- package/client.js.map +1 -1
- package/client.mjs +52 -38
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +0 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +0 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/contacts.d.mts +243 -49
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +243 -49
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +112 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +112 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.mts +8 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +269 -0
- package/resources/me.d.mts.map +1 -0
- package/resources/me.d.ts +269 -0
- package/resources/me.d.ts.map +1 -0
- package/resources/me.js +40 -0
- package/resources/me.js.map +1 -0
- package/resources/me.mjs +36 -0
- package/resources/me.mjs.map +1 -0
- package/resources/messages.d.mts +239 -133
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +239 -133
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +42 -50
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +42 -50
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +70 -0
- package/resources/numbers.d.mts.map +1 -0
- package/resources/numbers.d.ts +70 -0
- package/resources/numbers.d.ts.map +1 -0
- package/resources/numbers.js +36 -0
- package/resources/numbers.js.map +1 -0
- package/resources/numbers.mjs +32 -0
- package/resources/numbers.mjs.map +1 -0
- package/resources/profiles/campaigns.d.mts +339 -0
- package/resources/profiles/campaigns.d.mts.map +1 -0
- package/resources/profiles/campaigns.d.ts +339 -0
- package/resources/profiles/campaigns.d.ts.map +1 -0
- package/resources/profiles/campaigns.js +148 -0
- package/resources/profiles/campaigns.js.map +1 -0
- package/resources/profiles/campaigns.mjs +144 -0
- package/resources/profiles/campaigns.mjs.map +1 -0
- package/resources/profiles/index.d.mts +3 -0
- package/resources/profiles/index.d.mts.map +1 -0
- package/resources/profiles/index.d.ts +3 -0
- package/resources/profiles/index.d.ts.map +1 -0
- package/resources/profiles/index.js +9 -0
- package/resources/profiles/index.js.map +1 -0
- package/resources/profiles/index.mjs +4 -0
- package/resources/profiles/index.mjs.map +1 -0
- package/resources/profiles/profiles.d.mts +967 -0
- package/resources/profiles/profiles.d.mts.map +1 -0
- package/resources/profiles/profiles.d.ts +967 -0
- package/resources/profiles/profiles.d.ts.map +1 -0
- package/resources/profiles/profiles.js +227 -0
- package/resources/profiles/profiles.js.map +1 -0
- package/resources/profiles/profiles.mjs +222 -0
- package/resources/profiles/profiles.mjs.map +1 -0
- package/resources/profiles.d.mts +2 -0
- package/resources/profiles.d.mts.map +1 -0
- package/resources/profiles.d.ts +2 -0
- package/resources/profiles.d.ts.map +1 -0
- package/resources/profiles.js +6 -0
- package/resources/profiles.js.map +1 -0
- package/resources/profiles.mjs +3 -0
- package/resources/profiles.mjs.map +1 -0
- package/resources/templates.d.mts +327 -191
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +327 -191
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +80 -35
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +80 -35
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +251 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +251 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +124 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +120 -0
- package/resources/users.mjs.map +1 -0
- package/resources/webhooks.d.mts +639 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +639 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +237 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +233 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +228 -80
- package/src/internal/utils/log.ts +0 -1
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/contacts.ts +335 -57
- package/src/resources/index.ts +81 -12
- package/src/resources/me.ts +333 -0
- package/src/resources/messages.ts +306 -147
- package/src/resources/numbers.ts +102 -0
- package/src/resources/profiles/campaigns.ts +501 -0
- package/src/resources/profiles/index.ts +38 -0
- package/src/resources/profiles/profiles.ts +1302 -0
- package/src/resources/profiles.ts +3 -0
- package/src/resources/templates.ts +424 -202
- package/src/resources/users.ts +366 -0
- package/src/resources/webhooks.ts +923 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/number-lookup.d.mts +0 -59
- package/resources/number-lookup.d.mts.map +0 -1
- package/resources/number-lookup.d.ts +0 -59
- package/resources/number-lookup.d.ts.map +0 -1
- package/resources/number-lookup.js +0 -17
- package/resources/number-lookup.js.map +0 -1
- package/resources/number-lookup.mjs +0 -13
- package/resources/number-lookup.mjs.map +0 -1
- package/src/resources/number-lookup.ts +0 -80
|
@@ -0,0 +1,1302 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as ProfilesAPI from './profiles';
|
|
5
|
+
import * as WebhooksAPI from '../webhooks';
|
|
6
|
+
import * as CampaignsAPI from './campaigns';
|
|
7
|
+
import {
|
|
8
|
+
APIResponseOfTcrCampaignWithUseCases,
|
|
9
|
+
BaseDto,
|
|
10
|
+
CampaignCreateParams,
|
|
11
|
+
CampaignData,
|
|
12
|
+
CampaignDeleteParams,
|
|
13
|
+
CampaignListParams,
|
|
14
|
+
CampaignListResponse,
|
|
15
|
+
CampaignUpdateParams,
|
|
16
|
+
Campaigns,
|
|
17
|
+
MessagingUseCaseUs,
|
|
18
|
+
SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData,
|
|
19
|
+
TcrCampaignWithUseCases,
|
|
20
|
+
} from './campaigns';
|
|
21
|
+
import { APIPromise } from '../../core/api-promise';
|
|
22
|
+
import { buildHeaders } from '../../internal/headers';
|
|
23
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
24
|
+
import { path } from '../../internal/utils/path';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Manage organization profiles
|
|
28
|
+
*/
|
|
29
|
+
export class Profiles extends APIResource {
|
|
30
|
+
campaigns: CampaignsAPI.Campaigns = new CampaignsAPI.Campaigns(this._client);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Creates a new sender profile within an organization. Profiles represent
|
|
34
|
+
* different brands, departments, or use cases, each with their own messaging
|
|
35
|
+
* configuration and settings. Requires admin role in the organization.
|
|
36
|
+
*
|
|
37
|
+
* ## WhatsApp Business Account
|
|
38
|
+
*
|
|
39
|
+
* Every profile must be linked to a WhatsApp Business Account. There are two ways
|
|
40
|
+
* to do this:
|
|
41
|
+
*
|
|
42
|
+
* **1. Inherit from organization (default)** — Omit the
|
|
43
|
+
* `whatsapp_business_account` field. The profile will share the organization's
|
|
44
|
+
* WhatsApp Business Account, which must have been set up via WhatsApp Embedded
|
|
45
|
+
* Signup. This is the recommended path for most use cases.
|
|
46
|
+
*
|
|
47
|
+
* **2. Direct credentials** — Provide a `whatsapp_business_account` object with
|
|
48
|
+
* `waba_id`, `phone_number_id`, and `access_token`. Use this when the profile
|
|
49
|
+
* needs its own independent WhatsApp Business Account. Obtain these from Meta
|
|
50
|
+
* Business Manager by creating a System User with `whatsapp_business_messaging`
|
|
51
|
+
* and `whatsapp_business_management` permissions.
|
|
52
|
+
*
|
|
53
|
+
* If the `whatsapp_business_account` field is omitted and the organization has no
|
|
54
|
+
* WhatsApp Business Account configured, the request will be rejected with
|
|
55
|
+
* HTTP 422.
|
|
56
|
+
*
|
|
57
|
+
* ## Brand
|
|
58
|
+
*
|
|
59
|
+
* Include the optional `brand` field to create the brand for this profile at the
|
|
60
|
+
* same time. Cannot be used when `inherit_tcr_brand` is `true`.
|
|
61
|
+
*
|
|
62
|
+
* ## Payment Details
|
|
63
|
+
*
|
|
64
|
+
* When `billing_model` is `"profile"` or `"profile_and_organization"` you may
|
|
65
|
+
* include a `payment_details` object containing the card number, expiry (MM/YY),
|
|
66
|
+
* CVC, and billing ZIP code. Payment details are **never stored** on our servers
|
|
67
|
+
* and are forwarded directly to the payment processor. Providing `payment_details`
|
|
68
|
+
* when `billing_model` is `"organization"` is not allowed.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const apiResponseOfProfileDetail =
|
|
73
|
+
* await client.profiles.create();
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
create(params: ProfileCreateParams, options?: RequestOptions): APIPromise<APIResponseOfProfileDetail> {
|
|
77
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
78
|
+
return this._client.post('/v3/profiles', {
|
|
79
|
+
body,
|
|
80
|
+
...options,
|
|
81
|
+
headers: buildHeaders([
|
|
82
|
+
{
|
|
83
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
84
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
85
|
+
},
|
|
86
|
+
options?.headers,
|
|
87
|
+
]),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Retrieves detailed information about a specific sender profile within an
|
|
93
|
+
* organization, including brand and KYC information if a brand has been
|
|
94
|
+
* configured.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const apiResponseOfProfileDetail =
|
|
99
|
+
* await client.profiles.retrieve('profileId');
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
retrieve(
|
|
103
|
+
profileID: string,
|
|
104
|
+
params: ProfileRetrieveParams | null | undefined = {},
|
|
105
|
+
options?: RequestOptions,
|
|
106
|
+
): APIPromise<APIResponseOfProfileDetail> {
|
|
107
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
108
|
+
return this._client.get(path`/v3/profiles/${profileID}`, {
|
|
109
|
+
...options,
|
|
110
|
+
headers: buildHeaders([
|
|
111
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
112
|
+
options?.headers,
|
|
113
|
+
]),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Updates a profile's configuration and settings. Requires admin role in the
|
|
119
|
+
* organization. Only provided fields will be updated (partial update).
|
|
120
|
+
*
|
|
121
|
+
* ## Brand Management
|
|
122
|
+
*
|
|
123
|
+
* Include the optional `brand` field to create or update the brand associated with
|
|
124
|
+
* this profile. The brand holds KYC and TCR compliance data (legal business info,
|
|
125
|
+
* contact details, messaging vertical). Once a brand has been submitted to TCR it
|
|
126
|
+
* cannot be modified. Setting `inherit_tcr_brand: true` and providing `brand` in
|
|
127
|
+
* the same request is not allowed.
|
|
128
|
+
*
|
|
129
|
+
* ## Payment Details
|
|
130
|
+
*
|
|
131
|
+
* When `billing_model` is `"profile"` or `"profile_and_organization"` you may
|
|
132
|
+
* include a `payment_details` object containing the card number, expiry (MM/YY),
|
|
133
|
+
* CVC, and billing ZIP code. Payment details are **never stored** on our servers
|
|
134
|
+
* and are forwarded directly to the payment processor. Providing `payment_details`
|
|
135
|
+
* when `billing_model` is `"organization"` is not allowed.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* const apiResponseOfProfileDetail =
|
|
140
|
+
* await client.profiles.update('profileId');
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
update(
|
|
144
|
+
profileID: string,
|
|
145
|
+
params: ProfileUpdateParams,
|
|
146
|
+
options?: RequestOptions,
|
|
147
|
+
): APIPromise<APIResponseOfProfileDetail> {
|
|
148
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
149
|
+
return this._client.patch(path`/v3/profiles/${profileID}`, {
|
|
150
|
+
body,
|
|
151
|
+
...options,
|
|
152
|
+
headers: buildHeaders([
|
|
153
|
+
{
|
|
154
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
155
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
156
|
+
},
|
|
157
|
+
options?.headers,
|
|
158
|
+
]),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Retrieves all sender profiles within an organization, including brand
|
|
164
|
+
* information for each profile. Profiles represent different brands, departments,
|
|
165
|
+
* or use cases within an organization, each with their own messaging
|
|
166
|
+
* configuration.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* const profiles = await client.profiles.list();
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
list(
|
|
174
|
+
params: ProfileListParams | null | undefined = {},
|
|
175
|
+
options?: RequestOptions,
|
|
176
|
+
): APIPromise<ProfileListResponse> {
|
|
177
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
178
|
+
return this._client.get('/v3/profiles', {
|
|
179
|
+
...options,
|
|
180
|
+
headers: buildHeaders([
|
|
181
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
182
|
+
options?.headers,
|
|
183
|
+
]),
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Soft deletes a sender profile. The profile will be marked as deleted but data is
|
|
189
|
+
* retained. Requires admin role in the organization.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* await client.profiles.delete('profileId', { body: {} });
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
delete(profileID: string, params: ProfileDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
197
|
+
const { body, 'x-profile-id': xProfileID } = params;
|
|
198
|
+
return this._client.delete(path`/v3/profiles/${profileID}`, {
|
|
199
|
+
body: body,
|
|
200
|
+
...options,
|
|
201
|
+
headers: buildHeaders([
|
|
202
|
+
{ Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
203
|
+
options?.headers,
|
|
204
|
+
]),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Final step in profile compliance workflow. Validates all prerequisites (general
|
|
210
|
+
* data, brand, campaigns), connects profile to Telnyx/WhatsApp, and sets status
|
|
211
|
+
* based on configuration. The process runs in the background and calls the
|
|
212
|
+
* provided webhook URL when finished.
|
|
213
|
+
*
|
|
214
|
+
* Prerequisites:
|
|
215
|
+
* - Profile must be completed
|
|
216
|
+
* - If inheritTcrBrand=false: Profile must have existing brand
|
|
217
|
+
* - If inheritTcrBrand=true: Parent must have existing brand
|
|
218
|
+
* - If TCR application: Must have at least one campaign (own or inherited)
|
|
219
|
+
* - If inheritTcrCampaign=false: Profile should have campaigns
|
|
220
|
+
* - If inheritTcrCampaign=true: Parent must have campaigns
|
|
221
|
+
*
|
|
222
|
+
* Status Logic:
|
|
223
|
+
* - If both SMS and WhatsApp channels are missing → SUBMITTED
|
|
224
|
+
* - If TCR application and not inheriting brand/campaigns → SUBMITTED
|
|
225
|
+
* - If non-TCR with destination country (IsMain=true) → SUBMITTED
|
|
226
|
+
* - Otherwise → COMPLETED
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```ts
|
|
230
|
+
* const response = await client.profiles.complete(
|
|
231
|
+
* '660e8400-e29b-41d4-a716-446655440000',
|
|
232
|
+
* {
|
|
233
|
+
* webHookUrl:
|
|
234
|
+
* 'https://your-app.com/webhook/profile-complete',
|
|
235
|
+
* },
|
|
236
|
+
* );
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
complete(profileID: string, params: ProfileCompleteParams, options?: RequestOptions): APIPromise<unknown> {
|
|
240
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
241
|
+
return this._client.post(path`/v3/profiles/${profileID}/complete`, {
|
|
242
|
+
body,
|
|
243
|
+
...options,
|
|
244
|
+
headers: buildHeaders([
|
|
245
|
+
{
|
|
246
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
247
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
248
|
+
},
|
|
249
|
+
options?.headers,
|
|
250
|
+
]),
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Standard API response envelope for all v3 endpoints
|
|
257
|
+
*/
|
|
258
|
+
export interface APIResponseOfProfileDetail {
|
|
259
|
+
/**
|
|
260
|
+
* Detailed profile response for v3 API
|
|
261
|
+
*/
|
|
262
|
+
data?: ProfileDetail | null;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Error information
|
|
266
|
+
*/
|
|
267
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Request and response metadata
|
|
271
|
+
*/
|
|
272
|
+
meta?: WebhooksAPI.APIMeta;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Indicates whether the request was successful
|
|
276
|
+
*/
|
|
277
|
+
success?: boolean;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Billing contact information for a profile. Required when billing_model is
|
|
282
|
+
* "profile" or "profile_and_organization".
|
|
283
|
+
*/
|
|
284
|
+
export interface BillingContactInfo {
|
|
285
|
+
/**
|
|
286
|
+
* Email address where invoices will be sent (required)
|
|
287
|
+
*/
|
|
288
|
+
email: string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Full name of the billing contact or company (required)
|
|
292
|
+
*/
|
|
293
|
+
name: string;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Billing address (optional). Free-form text including street, city, state, postal
|
|
297
|
+
* code, and country.
|
|
298
|
+
*/
|
|
299
|
+
address?: string | null;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Phone number for the billing contact (optional)
|
|
303
|
+
*/
|
|
304
|
+
phone?: string | null;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Brand and KYC data grouped into contact, business, and compliance sections
|
|
309
|
+
*/
|
|
310
|
+
export interface BrandsBrandData {
|
|
311
|
+
/**
|
|
312
|
+
* Compliance and TCR information for brand registration
|
|
313
|
+
*/
|
|
314
|
+
compliance: SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Contact information for brand KYC
|
|
318
|
+
*/
|
|
319
|
+
contact: SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Business details and address for brand KYC
|
|
323
|
+
*/
|
|
324
|
+
business?: SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo | null;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export interface DestinationCountry {
|
|
328
|
+
id?: string;
|
|
329
|
+
|
|
330
|
+
isMain?: boolean;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Payment card details for a profile. Accepted when billing_model is "profile" or
|
|
335
|
+
* "profile_and_organization". These details are not stored on our servers and will
|
|
336
|
+
* be forwarded to the payment processor.
|
|
337
|
+
*/
|
|
338
|
+
export interface PaymentDetails {
|
|
339
|
+
/**
|
|
340
|
+
* Card number (digits only, 13–19 characters)
|
|
341
|
+
*/
|
|
342
|
+
card_number: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Card security code (3–4 digits)
|
|
346
|
+
*/
|
|
347
|
+
cvc: string;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Card expiry date in MM/YY format (e.g. "09/27")
|
|
351
|
+
*/
|
|
352
|
+
expiry: string;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Billing ZIP / postal code associated with the card
|
|
356
|
+
*/
|
|
357
|
+
zip_code: string;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Detailed profile response for v3 API
|
|
362
|
+
*/
|
|
363
|
+
export interface ProfileDetail {
|
|
364
|
+
/**
|
|
365
|
+
* Profile unique identifier
|
|
366
|
+
*/
|
|
367
|
+
id?: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Whether contacts are shared across profiles in the organization
|
|
371
|
+
*/
|
|
372
|
+
allow_contact_sharing?: boolean;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Whether number changes are allowed during onboarding
|
|
376
|
+
*/
|
|
377
|
+
allow_number_change_during_onboarding?: boolean | null;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Whether templates are shared across profiles in the organization
|
|
381
|
+
*/
|
|
382
|
+
allow_template_sharing?: boolean;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Billing contact info returned in profile responses
|
|
386
|
+
*/
|
|
387
|
+
billing_contact?: ProfileDetail.BillingContact | null;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
391
|
+
*/
|
|
392
|
+
billing_model?: string;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Brand response with nested contact, business, and compliance sections — mirrors
|
|
396
|
+
* the request structure.
|
|
397
|
+
*/
|
|
398
|
+
brand?: ProfileDetail.Brand | null;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* When the profile was created
|
|
402
|
+
*/
|
|
403
|
+
created_at?: string;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Profile description
|
|
407
|
+
*/
|
|
408
|
+
description?: string | null;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Profile email (inherited from organization)
|
|
412
|
+
*/
|
|
413
|
+
email?: string | null;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Profile icon URL
|
|
417
|
+
*/
|
|
418
|
+
icon?: string | null;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Whether this profile inherits contacts from the organization
|
|
422
|
+
*/
|
|
423
|
+
inherit_contacts?: boolean;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Whether this profile inherits TCR brand from the organization
|
|
427
|
+
*/
|
|
428
|
+
inherit_tcr_brand?: boolean;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
432
|
+
*/
|
|
433
|
+
inherit_tcr_campaign?: boolean;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Whether this profile inherits templates from the organization
|
|
437
|
+
*/
|
|
438
|
+
inherit_templates?: boolean;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Profile name
|
|
442
|
+
*/
|
|
443
|
+
name?: string;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Parent organization ID
|
|
447
|
+
*/
|
|
448
|
+
organization_id?: string | null;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Direct SMS phone number
|
|
452
|
+
*/
|
|
453
|
+
sending_phone_number?: string | null;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Reference to another profile for SMS/Telnyx configuration
|
|
457
|
+
*/
|
|
458
|
+
sending_phone_number_profile_id?: string | null;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Reference to another profile for WhatsApp configuration
|
|
462
|
+
*/
|
|
463
|
+
sending_whatsapp_number_profile_id?: string | null;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Profile short name/abbreviation. 3–11 characters: letters, numbers, and spaces
|
|
467
|
+
* only, with at least one letter.
|
|
468
|
+
*/
|
|
469
|
+
short_name?: string | null;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Profile setup status: incomplete, pending_review, approved, rejected
|
|
473
|
+
*/
|
|
474
|
+
status?: string;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* When the profile was last updated
|
|
478
|
+
*/
|
|
479
|
+
updated_at?: string | null;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* WhatsApp Business Account ID associated with this profile. Present whether the
|
|
483
|
+
* WABA is inherited from the organization or configured directly.
|
|
484
|
+
*/
|
|
485
|
+
waba_id?: string | null;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Direct WhatsApp phone number
|
|
489
|
+
*/
|
|
490
|
+
whatsapp_phone_number?: string | null;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export namespace ProfileDetail {
|
|
494
|
+
/**
|
|
495
|
+
* Billing contact info returned in profile responses
|
|
496
|
+
*/
|
|
497
|
+
export interface BillingContact {
|
|
498
|
+
address?: string | null;
|
|
499
|
+
|
|
500
|
+
email?: string | null;
|
|
501
|
+
|
|
502
|
+
name?: string | null;
|
|
503
|
+
|
|
504
|
+
phone?: string | null;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Brand response with nested contact, business, and compliance sections — mirrors
|
|
509
|
+
* the request structure.
|
|
510
|
+
*/
|
|
511
|
+
export interface Brand {
|
|
512
|
+
/**
|
|
513
|
+
* Unique identifier for the brand
|
|
514
|
+
*/
|
|
515
|
+
id?: string;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Business details and address information
|
|
519
|
+
*/
|
|
520
|
+
business?: Brand.Business | null;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Compliance and TCR-related information
|
|
524
|
+
*/
|
|
525
|
+
compliance?: Brand.Compliance | null;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Contact information for the brand
|
|
529
|
+
*/
|
|
530
|
+
contact?: Brand.Contact | null;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* When the brand was created
|
|
534
|
+
*/
|
|
535
|
+
created_at?: string;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* CSP (Campaign Service Provider) ID
|
|
539
|
+
*/
|
|
540
|
+
csp_id?: string | null;
|
|
541
|
+
|
|
542
|
+
identity_status?: 'SELF_DECLARED' | 'UNVERIFIED' | 'VERIFIED' | 'VETTED_VERIFIED' | null;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Whether this brand is inherited from the parent organization
|
|
546
|
+
*/
|
|
547
|
+
is_inherited?: boolean;
|
|
548
|
+
|
|
549
|
+
status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | null;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* When the brand was submitted to TCR
|
|
553
|
+
*/
|
|
554
|
+
submitted_at?: string | null;
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Whether this brand has been submitted to TCR
|
|
558
|
+
*/
|
|
559
|
+
submitted_to_tcr?: boolean;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* TCR brand ID (populated after TCR submission)
|
|
563
|
+
*/
|
|
564
|
+
tcr_brand_id?: string | null;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Universal EIN from TCR
|
|
568
|
+
*/
|
|
569
|
+
universal_ein?: string | null;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* When the brand was last updated
|
|
573
|
+
*/
|
|
574
|
+
updated_at?: string | null;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export namespace Brand {
|
|
578
|
+
/**
|
|
579
|
+
* Business details and address information
|
|
580
|
+
*/
|
|
581
|
+
export interface Business {
|
|
582
|
+
/**
|
|
583
|
+
* City
|
|
584
|
+
*/
|
|
585
|
+
city?: string | null;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Country code (e.g., US, CA)
|
|
589
|
+
*/
|
|
590
|
+
country?: string | null;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Country where the business is registered
|
|
594
|
+
*/
|
|
595
|
+
country_of_registration?: string | null;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Business entity type
|
|
599
|
+
*/
|
|
600
|
+
entity_type?: string | null;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Legal business name
|
|
604
|
+
*/
|
|
605
|
+
legal_name?: string | null;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Postal/ZIP code
|
|
609
|
+
*/
|
|
610
|
+
postal_code?: string | null;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* State/province code
|
|
614
|
+
*/
|
|
615
|
+
state?: string | null;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Street address
|
|
619
|
+
*/
|
|
620
|
+
street?: string | null;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Tax ID/EIN number
|
|
624
|
+
*/
|
|
625
|
+
tax_id?: string | null;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Type of tax ID (e.g., us_ein, ca_bn)
|
|
629
|
+
*/
|
|
630
|
+
tax_id_type?: string | null;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Business website URL
|
|
634
|
+
*/
|
|
635
|
+
url?: string | null;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Compliance and TCR-related information
|
|
640
|
+
*/
|
|
641
|
+
export interface Compliance {
|
|
642
|
+
brand_relationship?: ProfilesAPI.TcrBrandRelationship | null;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* List of destination countries for messaging
|
|
646
|
+
*/
|
|
647
|
+
destination_countries?: Array<ProfilesAPI.DestinationCountry>;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Expected daily messaging volume
|
|
651
|
+
*/
|
|
652
|
+
expected_messaging_volume?: string | null;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Whether this is a TCR (Campaign Registry) application
|
|
656
|
+
*/
|
|
657
|
+
is_tcr_application?: boolean;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Additional notes about the business or use case
|
|
661
|
+
*/
|
|
662
|
+
notes?: string | null;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Phone number prefix for messaging (e.g., "+1")
|
|
666
|
+
*/
|
|
667
|
+
phone_number_prefix?: string | null;
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Primary messaging use case description
|
|
671
|
+
*/
|
|
672
|
+
primary_use_case?: string | null;
|
|
673
|
+
|
|
674
|
+
vertical?: ProfilesAPI.TcrVertical | null;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Contact information for the brand
|
|
679
|
+
*/
|
|
680
|
+
export interface Contact {
|
|
681
|
+
/**
|
|
682
|
+
* Business/brand name
|
|
683
|
+
*/
|
|
684
|
+
business_name?: string | null;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Contact email address
|
|
688
|
+
*/
|
|
689
|
+
email?: string | null;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Primary contact name
|
|
693
|
+
*/
|
|
694
|
+
name?: string;
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Contact phone number in E.164 format
|
|
698
|
+
*/
|
|
699
|
+
phone?: string | null;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Contact phone country code (e.g., "1" for US)
|
|
703
|
+
*/
|
|
704
|
+
phone_country_code?: string | null;
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* Contact's role in the business
|
|
708
|
+
*/
|
|
709
|
+
role?: string | null;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Business details and address for brand KYC
|
|
716
|
+
*/
|
|
717
|
+
export interface SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo {
|
|
718
|
+
/**
|
|
719
|
+
* City
|
|
720
|
+
*/
|
|
721
|
+
city?: string | null;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Country code (e.g., US, CA)
|
|
725
|
+
*/
|
|
726
|
+
country?: string | null;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Country where the business is registered
|
|
730
|
+
*/
|
|
731
|
+
countryOfRegistration?: string | null;
|
|
732
|
+
|
|
733
|
+
entityType?: 'PRIVATE_PROFIT' | 'PUBLIC_PROFIT' | 'NON_PROFIT' | 'SOLE_PROPRIETOR' | 'GOVERNMENT' | null;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Legal business name
|
|
737
|
+
*/
|
|
738
|
+
legalName?: string | null;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Postal/ZIP code
|
|
742
|
+
*/
|
|
743
|
+
postalCode?: string | null;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* State/province code
|
|
747
|
+
*/
|
|
748
|
+
state?: string | null;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Street address
|
|
752
|
+
*/
|
|
753
|
+
street?: string | null;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Tax ID/EIN number
|
|
757
|
+
*/
|
|
758
|
+
taxId?: string | null;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Type of tax ID (e.g., us_ein, ca_bn)
|
|
762
|
+
*/
|
|
763
|
+
taxIdType?: string | null;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Business website URL
|
|
767
|
+
*/
|
|
768
|
+
url?: string | null;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Compliance and TCR information for brand registration
|
|
773
|
+
*/
|
|
774
|
+
export interface SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo {
|
|
775
|
+
brandRelationship: TcrBrandRelationship;
|
|
776
|
+
|
|
777
|
+
vertical: TcrVertical;
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* List of destination countries for messaging
|
|
781
|
+
*/
|
|
782
|
+
destinationCountries?: Array<DestinationCountry> | null;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Expected daily messaging volume
|
|
786
|
+
*/
|
|
787
|
+
expectedMessagingVolume?: string | null;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Whether this is a TCR (Campaign Registry) application
|
|
791
|
+
*/
|
|
792
|
+
isTcrApplication?: boolean | null;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Additional notes about the business or use case
|
|
796
|
+
*/
|
|
797
|
+
notes?: string | null;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Phone number prefix for messaging (e.g., "+1")
|
|
801
|
+
*/
|
|
802
|
+
phoneNumberPrefix?: string | null;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Primary messaging use case description
|
|
806
|
+
*/
|
|
807
|
+
primaryUseCase?: string | null;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Contact information for brand KYC
|
|
812
|
+
*/
|
|
813
|
+
export interface SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo {
|
|
814
|
+
/**
|
|
815
|
+
* Primary contact name (required)
|
|
816
|
+
*/
|
|
817
|
+
name: string;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Business/brand name
|
|
821
|
+
*/
|
|
822
|
+
businessName?: string | null;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Contact email address
|
|
826
|
+
*/
|
|
827
|
+
email?: string | null;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Contact phone number in E.164 format
|
|
831
|
+
*/
|
|
832
|
+
phone?: string | null;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Contact phone country code (e.g., "1" for US)
|
|
836
|
+
*/
|
|
837
|
+
phoneCountryCode?: string | null;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Contact's role in the business
|
|
841
|
+
*/
|
|
842
|
+
role?: string | null;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export type TcrBrandRelationship =
|
|
846
|
+
| 'BASIC_ACCOUNT'
|
|
847
|
+
| 'MEDIUM_ACCOUNT'
|
|
848
|
+
| 'LARGE_ACCOUNT'
|
|
849
|
+
| 'SMALL_ACCOUNT'
|
|
850
|
+
| 'KEY_ACCOUNT';
|
|
851
|
+
|
|
852
|
+
export type TcrVertical =
|
|
853
|
+
| 'PROFESSIONAL'
|
|
854
|
+
| 'REAL_ESTATE'
|
|
855
|
+
| 'HEALTHCARE'
|
|
856
|
+
| 'HUMAN_RESOURCES'
|
|
857
|
+
| 'ENERGY'
|
|
858
|
+
| 'ENTERTAINMENT'
|
|
859
|
+
| 'RETAIL'
|
|
860
|
+
| 'TRANSPORTATION'
|
|
861
|
+
| 'AGRICULTURE'
|
|
862
|
+
| 'INSURANCE'
|
|
863
|
+
| 'POSTAL'
|
|
864
|
+
| 'EDUCATION'
|
|
865
|
+
| 'HOSPITALITY'
|
|
866
|
+
| 'FINANCIAL'
|
|
867
|
+
| 'POLITICAL'
|
|
868
|
+
| 'GAMBLING'
|
|
869
|
+
| 'LEGAL'
|
|
870
|
+
| 'CONSTRUCTION'
|
|
871
|
+
| 'NGO'
|
|
872
|
+
| 'MANUFACTURING'
|
|
873
|
+
| 'GOVERNMENT'
|
|
874
|
+
| 'TECHNOLOGY'
|
|
875
|
+
| 'COMMUNICATION';
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Standard API response envelope for all v3 endpoints
|
|
879
|
+
*/
|
|
880
|
+
export interface ProfileListResponse {
|
|
881
|
+
/**
|
|
882
|
+
* List of profiles response
|
|
883
|
+
*/
|
|
884
|
+
data?: ProfileListResponse.Data | null;
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* Error information
|
|
888
|
+
*/
|
|
889
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Request and response metadata
|
|
893
|
+
*/
|
|
894
|
+
meta?: WebhooksAPI.APIMeta;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Indicates whether the request was successful
|
|
898
|
+
*/
|
|
899
|
+
success?: boolean;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export namespace ProfileListResponse {
|
|
903
|
+
/**
|
|
904
|
+
* List of profiles response
|
|
905
|
+
*/
|
|
906
|
+
export interface Data {
|
|
907
|
+
/**
|
|
908
|
+
* List of profiles in the organization
|
|
909
|
+
*/
|
|
910
|
+
profiles?: Array<ProfilesAPI.ProfileDetail>;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export type ProfileCompleteResponse = unknown;
|
|
915
|
+
|
|
916
|
+
export interface ProfileCreateParams {
|
|
917
|
+
/**
|
|
918
|
+
* Body param: Whether contacts are shared across profiles (default: false)
|
|
919
|
+
*/
|
|
920
|
+
allow_contact_sharing?: boolean;
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Body param: Whether templates are shared across profiles (default: false)
|
|
924
|
+
*/
|
|
925
|
+
allow_template_sharing?: boolean;
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Body param: Billing contact information for a profile. Required when
|
|
929
|
+
* billing_model is "profile" or "profile_and_organization".
|
|
930
|
+
*/
|
|
931
|
+
billing_contact?: BillingContactInfo | null;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Body param: Billing model: profile, organization, or profile_and_organization
|
|
935
|
+
* (default: profile).
|
|
936
|
+
*
|
|
937
|
+
* - "organization": the organization's billing details are used; no profile-level
|
|
938
|
+
* billing info needed.
|
|
939
|
+
* - "profile": the profile is billed independently; billing_contact is required.
|
|
940
|
+
* - "profile_and_organization": the profile is billed first with the organization
|
|
941
|
+
* as fallback; billing_contact is required.
|
|
942
|
+
*/
|
|
943
|
+
billing_model?: string | null;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Body param: Brand and KYC data grouped into contact, business, and compliance
|
|
947
|
+
* sections
|
|
948
|
+
*/
|
|
949
|
+
brand?: BrandsBrandData | null;
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Body param: Profile description (optional)
|
|
953
|
+
*/
|
|
954
|
+
description?: string | null;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Body param: Profile icon URL (optional)
|
|
958
|
+
*/
|
|
959
|
+
icon?: string | null;
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Body param: Whether this profile inherits contacts from organization (default:
|
|
963
|
+
* true)
|
|
964
|
+
*/
|
|
965
|
+
inherit_contacts?: boolean | null;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Body param: Whether this profile inherits TCR brand from organization (default:
|
|
969
|
+
* true)
|
|
970
|
+
*/
|
|
971
|
+
inherit_tcr_brand?: boolean | null;
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Body param: Whether this profile inherits TCR campaign from organization
|
|
975
|
+
* (default: true)
|
|
976
|
+
*/
|
|
977
|
+
inherit_tcr_campaign?: boolean | null;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Body param: Whether this profile inherits templates from organization (default:
|
|
981
|
+
* true)
|
|
982
|
+
*/
|
|
983
|
+
inherit_templates?: boolean | null;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Body param: Profile name (required)
|
|
987
|
+
*/
|
|
988
|
+
name?: string;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Body param: Payment card details for a profile. Accepted when billing_model is
|
|
992
|
+
* "profile" or "profile_and_organization". These details are not stored on our
|
|
993
|
+
* servers and will be forwarded to the payment processor.
|
|
994
|
+
*/
|
|
995
|
+
payment_details?: PaymentDetails | null;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
999
|
+
* effects Useful for testing integrations without actual execution
|
|
1000
|
+
*/
|
|
1001
|
+
sandbox?: boolean;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
|
|
1005
|
+
* contain only letters, numbers, and spaces, and include at least one letter.
|
|
1006
|
+
* Example: "SALES", "Mkt 2", "Support1".
|
|
1007
|
+
*/
|
|
1008
|
+
short_name?: string | null;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Body param: Direct WhatsApp Business Account credentials for a profile. Use this
|
|
1012
|
+
* when the profile should have its own WhatsApp Business Account instead of
|
|
1013
|
+
* inheriting from the organization. Credentials must be obtained from Meta
|
|
1014
|
+
* Business Manager by creating a System User with whatsapp_business_messaging and
|
|
1015
|
+
* whatsapp_business_management scopes.
|
|
1016
|
+
*/
|
|
1017
|
+
whatsapp_business_account?: ProfileCreateParams.WhatsappBusinessAccount | null;
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
1021
|
+
* alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
1022
|
+
* hours per key per customer.
|
|
1023
|
+
*/
|
|
1024
|
+
'Idempotency-Key'?: string;
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
1028
|
+
* organization API keys can use this header. The profile must belong to the
|
|
1029
|
+
* calling organization.
|
|
1030
|
+
*/
|
|
1031
|
+
'x-profile-id'?: string;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
export namespace ProfileCreateParams {
|
|
1035
|
+
/**
|
|
1036
|
+
* Direct WhatsApp Business Account credentials for a profile. Use this when the
|
|
1037
|
+
* profile should have its own WhatsApp Business Account instead of inheriting from
|
|
1038
|
+
* the organization. Credentials must be obtained from Meta Business Manager by
|
|
1039
|
+
* creating a System User with whatsapp_business_messaging and
|
|
1040
|
+
* whatsapp_business_management scopes.
|
|
1041
|
+
*/
|
|
1042
|
+
export interface WhatsappBusinessAccount {
|
|
1043
|
+
/**
|
|
1044
|
+
* System User access token with whatsapp_business_messaging and
|
|
1045
|
+
* whatsapp_business_management permissions. This value is stored securely and
|
|
1046
|
+
* never returned in API responses.
|
|
1047
|
+
*/
|
|
1048
|
+
access_token: string;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* WhatsApp Business Account ID from Meta Business Manager
|
|
1052
|
+
*/
|
|
1053
|
+
waba_id: string;
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Phone Number ID of an existing number already registered under this WABA in Meta
|
|
1057
|
+
* Business Manager. Optional — when omitted, a number will be provisioned from our
|
|
1058
|
+
* pool and registered in the WABA during the onboarding flow. When provided, the
|
|
1059
|
+
* number must already exist in the WABA.
|
|
1060
|
+
*/
|
|
1061
|
+
phone_number_id?: string | null;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
export interface ProfileRetrieveParams {
|
|
1066
|
+
/**
|
|
1067
|
+
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
1068
|
+
* can use this header. The profile must belong to the calling organization.
|
|
1069
|
+
*/
|
|
1070
|
+
'x-profile-id'?: string;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
export interface ProfileUpdateParams {
|
|
1074
|
+
/**
|
|
1075
|
+
* Body param: Whether contacts are shared across profiles (optional)
|
|
1076
|
+
*/
|
|
1077
|
+
allow_contact_sharing?: boolean | null;
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Body param: Whether number changes are allowed during onboarding (optional)
|
|
1081
|
+
*/
|
|
1082
|
+
allow_number_change_during_onboarding?: boolean | null;
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Body param: Whether templates are shared across profiles (optional)
|
|
1086
|
+
*/
|
|
1087
|
+
allow_template_sharing?: boolean | null;
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Body param: Billing contact information for a profile. Required when
|
|
1091
|
+
* billing_model is "profile" or "profile_and_organization".
|
|
1092
|
+
*/
|
|
1093
|
+
billing_contact?: BillingContactInfo | null;
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* Body param: Billing model: profile, organization, or profile_and_organization
|
|
1097
|
+
* (optional).
|
|
1098
|
+
*
|
|
1099
|
+
* - "organization": the organization's billing details are used; no profile-level
|
|
1100
|
+
* billing info needed.
|
|
1101
|
+
* - "profile": the profile is billed independently; billing_contact is required.
|
|
1102
|
+
* - "profile_and_organization": the profile is billed first with the organization
|
|
1103
|
+
* as fallback; billing_contact is required.
|
|
1104
|
+
*/
|
|
1105
|
+
billing_model?: string | null;
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* Body param: Brand and KYC data grouped into contact, business, and compliance
|
|
1109
|
+
* sections
|
|
1110
|
+
*/
|
|
1111
|
+
brand?: BrandsBrandData | null;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Body param: Profile description (optional)
|
|
1115
|
+
*/
|
|
1116
|
+
description?: string | null;
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Body param: Profile icon URL (optional)
|
|
1120
|
+
*/
|
|
1121
|
+
icon?: string | null;
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* Body param: Whether this profile inherits contacts from organization (optional)
|
|
1125
|
+
*/
|
|
1126
|
+
inherit_contacts?: boolean | null;
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Body param: Whether this profile inherits TCR brand from organization (optional)
|
|
1130
|
+
*/
|
|
1131
|
+
inherit_tcr_brand?: boolean | null;
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* Body param: Whether this profile inherits TCR campaign from organization
|
|
1135
|
+
* (optional)
|
|
1136
|
+
*/
|
|
1137
|
+
inherit_tcr_campaign?: boolean | null;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Body param: Whether this profile inherits templates from organization (optional)
|
|
1141
|
+
*/
|
|
1142
|
+
inherit_templates?: boolean | null;
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Body param: Profile name (optional)
|
|
1146
|
+
*/
|
|
1147
|
+
name?: string | null;
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Body param: Payment card details for a profile. Accepted when billing_model is
|
|
1151
|
+
* "profile" or "profile_and_organization". These details are not stored on our
|
|
1152
|
+
* servers and will be forwarded to the payment processor.
|
|
1153
|
+
*/
|
|
1154
|
+
payment_details?: PaymentDetails | null;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
1158
|
+
* effects Useful for testing integrations without actual execution
|
|
1159
|
+
*/
|
|
1160
|
+
sandbox?: boolean;
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Body param: Direct phone number for SMS sending (optional)
|
|
1164
|
+
*/
|
|
1165
|
+
sending_phone_number?: string | null;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Body param: Reference to another profile to use for SMS/Telnyx configuration
|
|
1169
|
+
* (optional)
|
|
1170
|
+
*/
|
|
1171
|
+
sending_phone_number_profile_id?: string | null;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Body param: Reference to another profile to use for WhatsApp configuration
|
|
1175
|
+
* (optional)
|
|
1176
|
+
*/
|
|
1177
|
+
sending_whatsapp_number_profile_id?: string | null;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
|
|
1181
|
+
* contain only letters, numbers, and spaces, and include at least one letter.
|
|
1182
|
+
* Example: "SALES", "Mkt 2", "Support1".
|
|
1183
|
+
*/
|
|
1184
|
+
short_name?: string | null;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Body param: Direct phone number for WhatsApp sending (optional)
|
|
1188
|
+
*/
|
|
1189
|
+
whatsapp_phone_number?: string | null;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
1193
|
+
* alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
1194
|
+
* hours per key per customer.
|
|
1195
|
+
*/
|
|
1196
|
+
'Idempotency-Key'?: string;
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
1200
|
+
* organization API keys can use this header. The profile must belong to the
|
|
1201
|
+
* calling organization.
|
|
1202
|
+
*/
|
|
1203
|
+
'x-profile-id'?: string;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
export interface ProfileListParams {
|
|
1207
|
+
/**
|
|
1208
|
+
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
1209
|
+
* can use this header. The profile must belong to the calling organization.
|
|
1210
|
+
*/
|
|
1211
|
+
'x-profile-id'?: string;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
export interface ProfileDeleteParams {
|
|
1215
|
+
/**
|
|
1216
|
+
* Body param: Request to delete a profile
|
|
1217
|
+
*/
|
|
1218
|
+
body: ProfileDeleteParams.Body;
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
1222
|
+
* organization API keys can use this header. The profile must belong to the
|
|
1223
|
+
* calling organization.
|
|
1224
|
+
*/
|
|
1225
|
+
'x-profile-id'?: string;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
export namespace ProfileDeleteParams {
|
|
1229
|
+
/**
|
|
1230
|
+
* Request to delete a profile
|
|
1231
|
+
*/
|
|
1232
|
+
export interface Body extends WebhooksAPI.MutationRequest {}
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
export interface ProfileCompleteParams {
|
|
1236
|
+
/**
|
|
1237
|
+
* Body param: Webhook URL to call when profile completion finishes (success or
|
|
1238
|
+
* failure)
|
|
1239
|
+
*/
|
|
1240
|
+
webHookUrl: string;
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
1244
|
+
* effects Useful for testing integrations without actual execution
|
|
1245
|
+
*/
|
|
1246
|
+
sandbox?: boolean;
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
1250
|
+
* alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
1251
|
+
* hours per key per customer.
|
|
1252
|
+
*/
|
|
1253
|
+
'Idempotency-Key'?: string;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
1257
|
+
* organization API keys can use this header. The profile must belong to the
|
|
1258
|
+
* calling organization.
|
|
1259
|
+
*/
|
|
1260
|
+
'x-profile-id'?: string;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
Profiles.Campaigns = Campaigns;
|
|
1264
|
+
|
|
1265
|
+
export declare namespace Profiles {
|
|
1266
|
+
export {
|
|
1267
|
+
type APIResponseOfProfileDetail as APIResponseOfProfileDetail,
|
|
1268
|
+
type BillingContactInfo as BillingContactInfo,
|
|
1269
|
+
type BrandsBrandData as BrandsBrandData,
|
|
1270
|
+
type DestinationCountry as DestinationCountry,
|
|
1271
|
+
type PaymentDetails as PaymentDetails,
|
|
1272
|
+
type ProfileDetail as ProfileDetail,
|
|
1273
|
+
type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo,
|
|
1274
|
+
type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo,
|
|
1275
|
+
type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo,
|
|
1276
|
+
type TcrBrandRelationship as TcrBrandRelationship,
|
|
1277
|
+
type TcrVertical as TcrVertical,
|
|
1278
|
+
type ProfileListResponse as ProfileListResponse,
|
|
1279
|
+
type ProfileCompleteResponse as ProfileCompleteResponse,
|
|
1280
|
+
type ProfileCreateParams as ProfileCreateParams,
|
|
1281
|
+
type ProfileRetrieveParams as ProfileRetrieveParams,
|
|
1282
|
+
type ProfileUpdateParams as ProfileUpdateParams,
|
|
1283
|
+
type ProfileListParams as ProfileListParams,
|
|
1284
|
+
type ProfileDeleteParams as ProfileDeleteParams,
|
|
1285
|
+
type ProfileCompleteParams as ProfileCompleteParams,
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
export {
|
|
1289
|
+
Campaigns as Campaigns,
|
|
1290
|
+
type APIResponseOfTcrCampaignWithUseCases as APIResponseOfTcrCampaignWithUseCases,
|
|
1291
|
+
type BaseDto as BaseDto,
|
|
1292
|
+
type CampaignData as CampaignData,
|
|
1293
|
+
type MessagingUseCaseUs as MessagingUseCaseUs,
|
|
1294
|
+
type SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData as SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData,
|
|
1295
|
+
type TcrCampaignWithUseCases as TcrCampaignWithUseCases,
|
|
1296
|
+
type CampaignListResponse as CampaignListResponse,
|
|
1297
|
+
type CampaignCreateParams as CampaignCreateParams,
|
|
1298
|
+
type CampaignUpdateParams as CampaignUpdateParams,
|
|
1299
|
+
type CampaignListParams as CampaignListParams,
|
|
1300
|
+
type CampaignDeleteParams as CampaignDeleteParams,
|
|
1301
|
+
};
|
|
1302
|
+
}
|