@sentdm/sentdm 0.7.2 → 0.15.0

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