@sentdm/sentdm 0.35.0 → 0.37.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 (108) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/client.d.mts +14 -14
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +14 -14
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/contacts.d.mts +85 -589
  10. package/resources/contacts.d.mts.map +1 -1
  11. package/resources/contacts.d.ts +85 -589
  12. package/resources/contacts.d.ts.map +1 -1
  13. package/resources/contacts.js +4 -4
  14. package/resources/contacts.js.map +1 -1
  15. package/resources/contacts.mjs +4 -4
  16. package/resources/contacts.mjs.map +1 -1
  17. package/resources/conversations.d.mts +69 -328
  18. package/resources/conversations.d.mts.map +1 -1
  19. package/resources/conversations.d.ts +69 -328
  20. package/resources/conversations.d.ts.map +1 -1
  21. package/resources/conversations.js +10 -8
  22. package/resources/conversations.js.map +1 -1
  23. package/resources/conversations.mjs +10 -8
  24. package/resources/conversations.mjs.map +1 -1
  25. package/resources/index.d.mts +7 -7
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +7 -7
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs.map +1 -1
  31. package/resources/me.d.mts +81 -129
  32. package/resources/me.d.mts.map +1 -1
  33. package/resources/me.d.ts +81 -129
  34. package/resources/me.d.ts.map +1 -1
  35. package/resources/me.js +11 -0
  36. package/resources/me.js.map +1 -1
  37. package/resources/me.mjs +11 -0
  38. package/resources/me.mjs.map +1 -1
  39. package/resources/messages.d.mts +8 -171
  40. package/resources/messages.d.mts.map +1 -1
  41. package/resources/messages.d.ts +8 -171
  42. package/resources/messages.d.ts.map +1 -1
  43. package/resources/messages.js.map +1 -1
  44. package/resources/messages.mjs.map +1 -1
  45. package/resources/numbers.d.mts +3 -42
  46. package/resources/numbers.d.mts.map +1 -1
  47. package/resources/numbers.d.ts +3 -42
  48. package/resources/numbers.d.ts.map +1 -1
  49. package/resources/numbers.js.map +1 -1
  50. package/resources/numbers.mjs.map +1 -1
  51. package/resources/profiles/campaigns.d.mts +149 -544
  52. package/resources/profiles/campaigns.d.mts.map +1 -1
  53. package/resources/profiles/campaigns.d.ts +149 -544
  54. package/resources/profiles/campaigns.d.ts.map +1 -1
  55. package/resources/profiles/index.d.mts +2 -2
  56. package/resources/profiles/index.d.mts.map +1 -1
  57. package/resources/profiles/index.d.ts +2 -2
  58. package/resources/profiles/index.d.ts.map +1 -1
  59. package/resources/profiles/index.js.map +1 -1
  60. package/resources/profiles/index.mjs.map +1 -1
  61. package/resources/profiles/profiles.d.mts +411 -1821
  62. package/resources/profiles/profiles.d.mts.map +1 -1
  63. package/resources/profiles/profiles.d.ts +411 -1821
  64. package/resources/profiles/profiles.d.ts.map +1 -1
  65. package/resources/profiles/profiles.js.map +1 -1
  66. package/resources/profiles/profiles.mjs.map +1 -1
  67. package/resources/templates.d.mts +84 -486
  68. package/resources/templates.d.mts.map +1 -1
  69. package/resources/templates.d.ts +84 -486
  70. package/resources/templates.d.ts.map +1 -1
  71. package/resources/templates.js +3 -3
  72. package/resources/templates.js.map +1 -1
  73. package/resources/templates.mjs +3 -3
  74. package/resources/templates.mjs.map +1 -1
  75. package/resources/users.d.mts +47 -437
  76. package/resources/users.d.mts.map +1 -1
  77. package/resources/users.d.ts +47 -437
  78. package/resources/users.d.ts.map +1 -1
  79. package/resources/users.js +3 -3
  80. package/resources/users.js.map +1 -1
  81. package/resources/users.mjs +3 -3
  82. package/resources/users.mjs.map +1 -1
  83. package/resources/webhooks.d.mts +189 -768
  84. package/resources/webhooks.d.mts.map +1 -1
  85. package/resources/webhooks.d.ts +189 -768
  86. package/resources/webhooks.d.ts.map +1 -1
  87. package/resources/webhooks.js +7 -6
  88. package/resources/webhooks.js.map +1 -1
  89. package/resources/webhooks.mjs +7 -6
  90. package/resources/webhooks.mjs.map +1 -1
  91. package/src/client.ts +52 -39
  92. package/src/resources/contacts.ts +88 -678
  93. package/src/resources/conversations.ts +77 -393
  94. package/src/resources/index.ts +26 -20
  95. package/src/resources/me.ts +94 -148
  96. package/src/resources/messages.ts +8 -194
  97. package/src/resources/numbers.ts +3 -47
  98. package/src/resources/profiles/campaigns.ts +174 -673
  99. package/src/resources/profiles/index.ts +14 -6
  100. package/src/resources/profiles/profiles.ts +529 -2216
  101. package/src/resources/templates.ts +100 -572
  102. package/src/resources/users.ts +48 -505
  103. package/src/resources/webhooks.ts +297 -996
  104. package/src/version.ts +1 -1
  105. package/version.d.mts +1 -1
  106. package/version.d.ts +1 -1
  107. package/version.js +1 -1
  108. package/version.mjs +1 -1
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as CampaignsAPI from './campaigns';
4
+ import * as WebhooksAPI from '../webhooks';
5
5
  import { APIPromise } from '../../core/api-promise';
6
6
  import { buildHeaders } from '../../internal/headers';
7
7
  import { RequestOptions } from '../../internal/request-options';
@@ -31,7 +31,7 @@ export class Campaigns extends APIResource {
31
31
  profileID: string,
32
32
  params: CampaignCreateParams,
33
33
  options?: RequestOptions,
34
- ): APIPromise<CampaignCreateResponse> {
34
+ ): APIPromise<APIResponseOfBrandCampaign> {
35
35
  const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
36
36
  return this._client.post(path`/v3/profiles/${profileID}/campaigns`, {
37
37
  body,
@@ -62,7 +62,7 @@ export class Campaigns extends APIResource {
62
62
  campaignID: string,
63
63
  params: CampaignUpdateParams,
64
64
  options?: RequestOptions,
65
- ): APIPromise<CampaignUpdateResponse> {
65
+ ): APIPromise<APIResponseOfBrandCampaign> {
66
66
  const { profileId, 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
67
67
  return this._client.put(path`/v3/profiles/${profileId}/campaigns/${campaignID}`, {
68
68
  body,
@@ -93,7 +93,7 @@ export class Campaigns extends APIResource {
93
93
  profileID: string,
94
94
  params: CampaignListParams | null | undefined = {},
95
95
  options?: RequestOptions,
96
- ): APIPromise<CampaignListResponse> {
96
+ ): APIPromise<APIResponseOfListOfBrandCampaign> {
97
97
  const { 'x-profile-id': xProfileID } = params ?? {};
98
98
  return this._client.get(path`/v3/profiles/${profileID}/campaigns`, {
99
99
  ...options,
@@ -129,39 +129,24 @@ export class Campaigns extends APIResource {
129
129
  }
130
130
  }
131
131
 
132
- export type MessagingUseCaseUs =
133
- | 'MARKETING'
134
- | 'ACCOUNT_NOTIFICATION'
135
- | 'CUSTOMER_CARE'
136
- | 'FRAUD_ALERT'
137
- | 'TWO_FA'
138
- | 'DELIVERY_NOTIFICATION'
139
- | 'SECURITY_ALERT'
140
- | 'M2M'
141
- | 'MIXED'
142
- | 'HIGHER_EDUCATION'
143
- | 'POLLING_VOTING'
144
- | 'PUBLIC_SERVICE_ANNOUNCEMENT'
145
- | 'LOW_VOLUME';
146
-
147
132
  /**
148
133
  * Standard API response envelope for all v3 endpoints
149
134
  */
150
- export interface CampaignCreateResponse {
135
+ export interface APIResponseOfBrandCampaign {
151
136
  /**
152
137
  * A 10DLC campaign registered for a brand.
153
138
  */
154
- data?: CampaignCreateResponse.Data | null;
139
+ data?: BrandCampaign | null;
155
140
 
156
141
  /**
157
142
  * Error information
158
143
  */
159
- error?: CampaignCreateResponse.Error | null;
144
+ error?: WebhooksAPI.ErrorDetail | null;
160
145
 
161
146
  /**
162
147
  * Request and response metadata
163
148
  */
164
- meta?: CampaignCreateResponse.Meta;
149
+ meta?: WebhooksAPI.APIMeta;
165
150
 
166
151
  /**
167
152
  * Indicates whether the request was successful
@@ -169,187 +154,24 @@ export interface CampaignCreateResponse {
169
154
  success?: boolean;
170
155
  }
171
156
 
172
- export namespace CampaignCreateResponse {
173
- /**
174
- * A 10DLC campaign registered for a brand.
175
- */
176
- export interface Data {
177
- id?: string;
178
-
179
- billedDate?: string | null;
180
-
181
- brandId?: string | null;
182
-
183
- cost?: number | null;
184
-
185
- createdAt?: string;
186
-
187
- customerId?: string;
188
-
189
- /**
190
- * True once every carrier has completed its DCA election and the campaign is
191
- * operationally ready for traffic.
192
- */
193
- dcaElectionsComplete?: boolean | null;
194
-
195
- dcaElectionsCompletedAt?: string | null;
196
-
197
- description?: string;
198
-
199
- /**
200
- * True when the one-time campaign submission fee has already been charged.
201
- */
202
- hasSubmissionTransaction?: boolean;
203
-
204
- helpKeywords?: string | null;
205
-
206
- helpMessage?: string | null;
207
-
208
- messageFlow?: string | null;
209
-
210
- name?: string;
211
-
212
- optinKeywords?: string | null;
213
-
214
- optinMessage?: string | null;
215
-
216
- optoutKeywords?: string | null;
217
-
218
- optoutMessage?: string | null;
219
-
220
- privacyPolicyLink?: string | null;
221
-
222
- status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
223
-
224
- submittedAt?: string | null;
225
-
226
- submittedToTCR?: boolean;
227
-
228
- /**
229
- * The Campaign Registry identifier, once the campaign has been accepted.
230
- */
231
- tcrCampaignId?: string | null;
232
-
233
- /**
234
- * Surfaced so customers can see why a submission did not reach the registry.
235
- */
236
- tcrSyncError?: string | null;
237
-
238
- termsAndConditionsLink?: string | null;
239
-
240
- /**
241
- * Campaign type (for example KYC or App).
242
- */
243
- type?: string;
244
-
245
- updatedAt?: string | null;
246
-
247
- useCases?: Array<Data.UseCase>;
248
-
249
- /**
250
- * Expected messaging volume for this campaign — customer-supplied on
251
- * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
252
- * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
253
- * back the value they set.
254
- */
255
- volume?: string | null;
256
- }
257
-
258
- export namespace Data {
259
- /**
260
- * Customer-facing use-case representation for the public v3 campaign contract.
261
- * Exists for the same reason as BrandCampaignV3Response: nesting the
262
- * TcrCampaignUseCase database entity in a public response means any column added
263
- * to that table silently becomes part of the customer-facing contract. This DTO is
264
- * an explicit allowlist, so a new column stays invisible until it is added here on
265
- * purpose. This mirrors exactly the fields the entity already serialized, so it
266
- * removes nothing from the current response shape. It only closes the future-leak
267
- * path.
268
- */
269
- export interface UseCase {
270
- id?: string;
271
-
272
- campaignId?: string;
273
-
274
- createdAt?: string;
275
-
276
- customerId?: string;
277
-
278
- messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
279
-
280
- /**
281
- * Sample messages submitted to the registry for this use case.
282
- */
283
- sampleMessages?: Array<string>;
284
-
285
- updatedAt?: string | null;
286
- }
287
- }
288
-
289
- /**
290
- * Error information
291
- */
292
- export interface Error {
293
- /**
294
- * Machine-readable error code (e.g., "RESOURCE_001")
295
- */
296
- code?: string;
297
-
298
- /**
299
- * Additional validation error details (field-level errors)
300
- */
301
- details?: { [key: string]: Array<string> } | null;
302
-
303
- /**
304
- * URL to documentation about this error
305
- */
306
- doc_url?: string | null;
307
-
308
- /**
309
- * Human-readable error message
310
- */
311
- message?: string;
312
- }
313
-
314
- /**
315
- * Request and response metadata
316
- */
317
- export interface Meta {
318
- /**
319
- * Unique identifier for this request (for tracing and support)
320
- */
321
- request_id?: string;
322
-
323
- /**
324
- * Server timestamp when the response was generated
325
- */
326
- timestamp?: string;
327
-
328
- /**
329
- * API version used for this request
330
- */
331
- version?: string;
332
- }
333
- }
334
-
335
157
  /**
336
158
  * Standard API response envelope for all v3 endpoints
337
159
  */
338
- export interface CampaignUpdateResponse {
160
+ export interface APIResponseOfListOfBrandCampaign {
339
161
  /**
340
- * A 10DLC campaign registered for a brand.
162
+ * The response data (null if error)
341
163
  */
342
- data?: CampaignUpdateResponse.Data | null;
164
+ data?: Array<BrandCampaign> | null;
343
165
 
344
166
  /**
345
167
  * Error information
346
168
  */
347
- error?: CampaignUpdateResponse.Error | null;
169
+ error?: WebhooksAPI.ErrorDetail | null;
348
170
 
349
171
  /**
350
172
  * Request and response metadata
351
173
  */
352
- meta?: CampaignUpdateResponse.Meta;
174
+ meta?: WebhooksAPI.APIMeta;
353
175
 
354
176
  /**
355
177
  * Indicates whether the request was successful
@@ -357,362 +179,234 @@ export interface CampaignUpdateResponse {
357
179
  success?: boolean;
358
180
  }
359
181
 
360
- export namespace CampaignUpdateResponse {
361
- /**
362
- * A 10DLC campaign registered for a brand.
363
- */
364
- export interface Data {
365
- id?: string;
366
-
367
- billedDate?: string | null;
368
-
369
- brandId?: string | null;
370
-
371
- cost?: number | null;
372
-
373
- createdAt?: string;
374
-
375
- customerId?: string;
376
-
377
- /**
378
- * True once every carrier has completed its DCA election and the campaign is
379
- * operationally ready for traffic.
380
- */
381
- dcaElectionsComplete?: boolean | null;
382
-
383
- dcaElectionsCompletedAt?: string | null;
384
-
385
- description?: string;
386
-
387
- /**
388
- * True when the one-time campaign submission fee has already been charged.
389
- */
390
- hasSubmissionTransaction?: boolean;
391
-
392
- helpKeywords?: string | null;
393
-
394
- helpMessage?: string | null;
182
+ /**
183
+ * A 10DLC campaign registered for a brand.
184
+ */
185
+ export interface BrandCampaign {
186
+ id?: string;
395
187
 
396
- messageFlow?: string | null;
188
+ billedDate?: string | null;
397
189
 
398
- name?: string;
190
+ brandId?: string | null;
399
191
 
400
- optinKeywords?: string | null;
192
+ cost?: number | null;
401
193
 
402
- optinMessage?: string | null;
194
+ createdAt?: string;
403
195
 
404
- optoutKeywords?: string | null;
196
+ customerId?: string;
405
197
 
406
- optoutMessage?: string | null;
198
+ /**
199
+ * True once every carrier has completed its DCA election and the campaign is
200
+ * operationally ready for traffic.
201
+ */
202
+ dcaElectionsComplete?: boolean | null;
407
203
 
408
- privacyPolicyLink?: string | null;
204
+ dcaElectionsCompletedAt?: string | null;
409
205
 
410
- status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
206
+ description?: string;
411
207
 
412
- submittedAt?: string | null;
208
+ /**
209
+ * True when the one-time campaign submission fee has already been charged.
210
+ */
211
+ hasSubmissionTransaction?: boolean;
413
212
 
414
- submittedToTCR?: boolean;
213
+ helpKeywords?: string | null;
415
214
 
416
- /**
417
- * The Campaign Registry identifier, once the campaign has been accepted.
418
- */
419
- tcrCampaignId?: string | null;
215
+ helpMessage?: string | null;
420
216
 
421
- /**
422
- * Surfaced so customers can see why a submission did not reach the registry.
423
- */
424
- tcrSyncError?: string | null;
217
+ messageFlow?: string | null;
425
218
 
426
- termsAndConditionsLink?: string | null;
219
+ name?: string;
427
220
 
428
- /**
429
- * Campaign type (for example KYC or App).
430
- */
431
- type?: string;
221
+ optinKeywords?: string | null;
432
222
 
433
- updatedAt?: string | null;
223
+ optinMessage?: string | null;
434
224
 
435
- useCases?: Array<Data.UseCase>;
225
+ optoutKeywords?: string | null;
436
226
 
437
- /**
438
- * Expected messaging volume for this campaign — customer-supplied on
439
- * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
440
- * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
441
- * back the value they set.
442
- */
443
- volume?: string | null;
444
- }
227
+ optoutMessage?: string | null;
445
228
 
446
- export namespace Data {
447
- /**
448
- * Customer-facing use-case representation for the public v3 campaign contract.
449
- * Exists for the same reason as BrandCampaignV3Response: nesting the
450
- * TcrCampaignUseCase database entity in a public response means any column added
451
- * to that table silently becomes part of the customer-facing contract. This DTO is
452
- * an explicit allowlist, so a new column stays invisible until it is added here on
453
- * purpose. This mirrors exactly the fields the entity already serialized, so it
454
- * removes nothing from the current response shape. It only closes the future-leak
455
- * path.
456
- */
457
- export interface UseCase {
458
- id?: string;
229
+ privacyPolicyLink?: string | null;
459
230
 
460
- campaignId?: string;
231
+ status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
461
232
 
462
- createdAt?: string;
233
+ submittedAt?: string | null;
463
234
 
464
- customerId?: string;
235
+ submittedToTCR?: boolean;
465
236
 
466
- messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
237
+ /**
238
+ * The Campaign Registry identifier, once the campaign has been accepted.
239
+ */
240
+ tcrCampaignId?: string | null;
467
241
 
468
- /**
469
- * Sample messages submitted to the registry for this use case.
470
- */
471
- sampleMessages?: Array<string>;
242
+ /**
243
+ * Surfaced so customers can see why a submission did not reach the registry.
244
+ */
245
+ tcrSyncError?: string | null;
472
246
 
473
- updatedAt?: string | null;
474
- }
475
- }
247
+ termsAndConditionsLink?: string | null;
476
248
 
477
249
  /**
478
- * Error information
250
+ * Campaign type (for example KYC or App).
479
251
  */
480
- export interface Error {
481
- /**
482
- * Machine-readable error code (e.g., "RESOURCE_001")
483
- */
484
- code?: string;
485
-
486
- /**
487
- * Additional validation error details (field-level errors)
488
- */
489
- details?: { [key: string]: Array<string> } | null;
490
-
491
- /**
492
- * URL to documentation about this error
493
- */
494
- doc_url?: string | null;
495
-
496
- /**
497
- * Human-readable error message
498
- */
499
- message?: string;
500
- }
252
+ type?: string;
253
+
254
+ updatedAt?: string | null;
255
+
256
+ useCases?: Array<CampaignUseCase>;
501
257
 
502
258
  /**
503
- * Request and response metadata
259
+ * Expected messaging volume for this campaign — customer-supplied on
260
+ * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
261
+ * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
262
+ * back the value they set.
504
263
  */
505
- export interface Meta {
506
- /**
507
- * Unique identifier for this request (for tracing and support)
508
- */
509
- request_id?: string;
510
-
511
- /**
512
- * Server timestamp when the response was generated
513
- */
514
- timestamp?: string;
515
-
516
- /**
517
- * API version used for this request
518
- */
519
- version?: string;
520
- }
264
+ volume?: string | null;
521
265
  }
522
266
 
523
267
  /**
524
- * Standard API response envelope for all v3 endpoints
268
+ * Campaign data for create or update operation
525
269
  */
526
- export interface CampaignListResponse {
270
+ export interface CampaignData {
527
271
  /**
528
- * The response data (null if error)
272
+ * Campaign description
529
273
  */
530
- data?: Array<CampaignListResponse.Data> | null;
274
+ description: string;
531
275
 
532
276
  /**
533
- * Error information
277
+ * Campaign name
534
278
  */
535
- error?: CampaignListResponse.Error | null;
279
+ name: string;
536
280
 
537
281
  /**
538
- * Request and response metadata
282
+ * Campaign type (e.g., "KYC", "App").
283
+ *
284
+ * Still required of a caller, and consulted by nothing. It named the signup path
285
+ * that produced the campaign, was written to a column no query filters on, no TCR
286
+ * payload carries and no fee or status decision reads, and is now defaulted at the
287
+ * entity instead. It stays required so that a request which was valid before is
288
+ * still valid — dropping it would be the client-visible change, not keeping it.
539
289
  */
540
- meta?: CampaignListResponse.Meta;
290
+ type: string;
541
291
 
542
292
  /**
543
- * Indicates whether the request was successful
293
+ * List of use cases with sample messages
544
294
  */
545
- success?: boolean;
546
- }
295
+ useCases: Array<CampaignUseCaseData>;
547
296
 
548
- export namespace CampaignListResponse {
549
297
  /**
550
- * A 10DLC campaign registered for a brand.
298
+ * Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
551
299
  */
552
- export interface Data {
553
- id?: string;
554
-
555
- billedDate?: string | null;
556
-
557
- brandId?: string | null;
558
-
559
- cost?: number | null;
560
-
561
- createdAt?: string;
562
-
563
- customerId?: string;
564
-
565
- /**
566
- * True once every carrier has completed its DCA election and the campaign is
567
- * operationally ready for traffic.
568
- */
569
- dcaElectionsComplete?: boolean | null;
570
-
571
- dcaElectionsCompletedAt?: string | null;
572
-
573
- description?: string;
300
+ helpKeywords?: string | null;
574
301
 
575
- /**
576
- * True when the one-time campaign submission fee has already been charged.
577
- */
578
- hasSubmissionTransaction?: boolean;
579
-
580
- helpKeywords?: string | null;
581
-
582
- helpMessage?: string | null;
583
-
584
- messageFlow?: string | null;
585
-
586
- name?: string;
587
-
588
- optinKeywords?: string | null;
589
-
590
- optinMessage?: string | null;
591
-
592
- optoutKeywords?: string | null;
593
-
594
- optoutMessage?: string | null;
595
-
596
- privacyPolicyLink?: string | null;
597
-
598
- status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
599
-
600
- submittedAt?: string | null;
601
-
602
- submittedToTCR?: boolean;
603
-
604
- /**
605
- * The Campaign Registry identifier, once the campaign has been accepted.
606
- */
607
- tcrCampaignId?: string | null;
302
+ /**
303
+ * Message sent when user requests help
304
+ */
305
+ helpMessage?: string | null;
608
306
 
609
- /**
610
- * Surfaced so customers can see why a submission did not reach the registry.
611
- */
612
- tcrSyncError?: string | null;
307
+ /**
308
+ * Description of how messages flow in the campaign
309
+ */
310
+ messageFlow?: string | null;
613
311
 
614
- termsAndConditionsLink?: string | null;
312
+ /**
313
+ * Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
314
+ */
315
+ optinKeywords?: string | null;
615
316
 
616
- /**
617
- * Campaign type (for example KYC or App).
618
- */
619
- type?: string;
317
+ /**
318
+ * Message sent when user opts in
319
+ */
320
+ optinMessage?: string | null;
620
321
 
621
- updatedAt?: string | null;
322
+ /**
323
+ * Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
324
+ */
325
+ optoutKeywords?: string | null;
622
326
 
623
- useCases?: Array<Data.UseCase>;
327
+ /**
328
+ * Message sent when user opts out
329
+ */
330
+ optoutMessage?: string | null;
624
331
 
625
- /**
626
- * Expected messaging volume for this campaign — customer-supplied on
627
- * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
628
- * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
629
- * back the value they set.
630
- */
631
- volume?: string | null;
632
- }
332
+ /**
333
+ * URL to privacy policy
334
+ */
335
+ privacyPolicyLink?: string | null;
633
336
 
634
- export namespace Data {
635
- /**
636
- * Customer-facing use-case representation for the public v3 campaign contract.
637
- * Exists for the same reason as BrandCampaignV3Response: nesting the
638
- * TcrCampaignUseCase database entity in a public response means any column added
639
- * to that table silently becomes part of the customer-facing contract. This DTO is
640
- * an explicit allowlist, so a new column stays invisible until it is added here on
641
- * purpose. This mirrors exactly the fields the entity already serialized, so it
642
- * removes nothing from the current response shape. It only closes the future-leak
643
- * path.
644
- */
645
- export interface UseCase {
646
- id?: string;
337
+ /**
338
+ * URL to terms and conditions
339
+ */
340
+ termsAndConditionsLink?: string | null;
647
341
 
648
- campaignId?: string;
342
+ /**
343
+ * Expected messaging volume for this campaign. Numeric string (e.g. "1999",
344
+ * "5000"). Values below 2000 bill at the low-volume tier.
345
+ */
346
+ volume?: string | null;
347
+ }
649
348
 
650
- createdAt?: string;
349
+ /**
350
+ * Customer-facing use-case representation for the public v3 campaign contract.
351
+ * Exists for the same reason as BrandCampaignV3Response: nesting the
352
+ * TcrCampaignUseCase database entity in a public response means any column added
353
+ * to that table silently becomes part of the customer-facing contract. This DTO is
354
+ * an explicit allowlist, so a new column stays invisible until it is added here on
355
+ * purpose. This mirrors exactly the fields the entity already serialized, so it
356
+ * removes nothing from the current response shape. It only closes the future-leak
357
+ * path.
358
+ */
359
+ export interface CampaignUseCase {
360
+ id?: string;
651
361
 
652
- customerId?: string;
362
+ campaignId?: string;
653
363
 
654
- messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
364
+ createdAt?: string;
655
365
 
656
- /**
657
- * Sample messages submitted to the registry for this use case.
658
- */
659
- sampleMessages?: Array<string>;
366
+ customerId?: string;
660
367
 
661
- updatedAt?: string | null;
662
- }
663
- }
368
+ messagingUseCaseUs?: MessagingUseCaseUs;
664
369
 
665
370
  /**
666
- * Error information
371
+ * Sample messages submitted to the registry for this use case.
667
372
  */
668
- export interface Error {
669
- /**
670
- * Machine-readable error code (e.g., "RESOURCE_001")
671
- */
672
- code?: string;
673
-
674
- /**
675
- * Additional validation error details (field-level errors)
676
- */
677
- details?: { [key: string]: Array<string> } | null;
678
-
679
- /**
680
- * URL to documentation about this error
681
- */
682
- doc_url?: string | null;
683
-
684
- /**
685
- * Human-readable error message
686
- */
687
- message?: string;
688
- }
373
+ sampleMessages?: Array<string>;
374
+
375
+ updatedAt?: string | null;
376
+ }
377
+
378
+ /**
379
+ * Campaign use case with sample messages
380
+ */
381
+ export interface CampaignUseCaseData {
382
+ messagingUseCaseUs: MessagingUseCaseUs;
689
383
 
690
384
  /**
691
- * Request and response metadata
385
+ * Sample messages for this use case (1-5 messages, max 1024 characters each)
692
386
  */
693
- export interface Meta {
694
- /**
695
- * Unique identifier for this request (for tracing and support)
696
- */
697
- request_id?: string;
698
-
699
- /**
700
- * Server timestamp when the response was generated
701
- */
702
- timestamp?: string;
703
-
704
- /**
705
- * API version used for this request
706
- */
707
- version?: string;
708
- }
387
+ sampleMessages: Array<string>;
709
388
  }
710
389
 
390
+ export type MessagingUseCaseUs =
391
+ | 'MARKETING'
392
+ | 'ACCOUNT_NOTIFICATION'
393
+ | 'CUSTOMER_CARE'
394
+ | 'FRAUD_ALERT'
395
+ | 'TWO_FA'
396
+ | 'DELIVERY_NOTIFICATION'
397
+ | 'SECURITY_ALERT'
398
+ | 'M2M'
399
+ | 'MIXED'
400
+ | 'HIGHER_EDUCATION'
401
+ | 'POLLING_VOTING'
402
+ | 'PUBLIC_SERVICE_ANNOUNCEMENT'
403
+ | 'LOW_VOLUME';
404
+
711
405
  export interface CampaignCreateParams {
712
406
  /**
713
407
  * Body param: Campaign data for create or update operation
714
408
  */
715
- campaign: CampaignCreateParams.Campaign;
409
+ campaign: CampaignData;
716
410
 
717
411
  /**
718
412
  * Body param: Sandbox flag - when true, the operation is simulated without side
@@ -735,104 +429,6 @@ export interface CampaignCreateParams {
735
429
  'x-profile-id'?: string;
736
430
  }
737
431
 
738
- export namespace CampaignCreateParams {
739
- /**
740
- * Campaign data for create or update operation
741
- */
742
- export interface Campaign {
743
- /**
744
- * Campaign description
745
- */
746
- description: string;
747
-
748
- /**
749
- * Campaign name
750
- */
751
- name: string;
752
-
753
- /**
754
- * Campaign type (e.g., "KYC", "App").
755
- *
756
- * Still required of a caller, and consulted by nothing. It named the signup path
757
- * that produced the campaign, was written to a column no query filters on, no TCR
758
- * payload carries and no fee or status decision reads, and is now defaulted at the
759
- * entity instead. It stays required so that a request which was valid before is
760
- * still valid — dropping it would be the client-visible change, not keeping it.
761
- */
762
- type: string;
763
-
764
- /**
765
- * List of use cases with sample messages
766
- */
767
- useCases: Array<Campaign.UseCase>;
768
-
769
- /**
770
- * Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
771
- */
772
- helpKeywords?: string | null;
773
-
774
- /**
775
- * Message sent when user requests help
776
- */
777
- helpMessage?: string | null;
778
-
779
- /**
780
- * Description of how messages flow in the campaign
781
- */
782
- messageFlow?: string | null;
783
-
784
- /**
785
- * Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
786
- */
787
- optinKeywords?: string | null;
788
-
789
- /**
790
- * Message sent when user opts in
791
- */
792
- optinMessage?: string | null;
793
-
794
- /**
795
- * Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
796
- */
797
- optoutKeywords?: string | null;
798
-
799
- /**
800
- * Message sent when user opts out
801
- */
802
- optoutMessage?: string | null;
803
-
804
- /**
805
- * URL to privacy policy
806
- */
807
- privacyPolicyLink?: string | null;
808
-
809
- /**
810
- * URL to terms and conditions
811
- */
812
- termsAndConditionsLink?: string | null;
813
-
814
- /**
815
- * Expected messaging volume for this campaign. Numeric string (e.g. "1999",
816
- * "5000"). Values below 2000 bill at the low-volume tier.
817
- */
818
- volume?: string | null;
819
- }
820
-
821
- export namespace Campaign {
822
- /**
823
- * Campaign use case with sample messages
824
- */
825
- export interface UseCase {
826
- messagingUseCaseUs: CampaignsAPI.MessagingUseCaseUs;
827
-
828
- /**
829
- * Sample messages for this use case (1-5 messages, max 1024 characters each)
830
- */
831
- sampleMessages: Array<string>;
832
- }
833
- }
834
- }
835
-
836
432
  export interface CampaignUpdateParams {
837
433
  /**
838
434
  * Path param: Profile ID from route
@@ -842,7 +438,7 @@ export interface CampaignUpdateParams {
842
438
  /**
843
439
  * Body param: Campaign data for create or update operation
844
440
  */
845
- campaign: CampaignUpdateParams.Campaign;
441
+ campaign: CampaignData;
846
442
 
847
443
  /**
848
444
  * Body param: Sandbox flag - when true, the operation is simulated without side
@@ -865,104 +461,6 @@ export interface CampaignUpdateParams {
865
461
  'x-profile-id'?: string;
866
462
  }
867
463
 
868
- export namespace CampaignUpdateParams {
869
- /**
870
- * Campaign data for create or update operation
871
- */
872
- export interface Campaign {
873
- /**
874
- * Campaign description
875
- */
876
- description: string;
877
-
878
- /**
879
- * Campaign name
880
- */
881
- name: string;
882
-
883
- /**
884
- * Campaign type (e.g., "KYC", "App").
885
- *
886
- * Still required of a caller, and consulted by nothing. It named the signup path
887
- * that produced the campaign, was written to a column no query filters on, no TCR
888
- * payload carries and no fee or status decision reads, and is now defaulted at the
889
- * entity instead. It stays required so that a request which was valid before is
890
- * still valid — dropping it would be the client-visible change, not keeping it.
891
- */
892
- type: string;
893
-
894
- /**
895
- * List of use cases with sample messages
896
- */
897
- useCases: Array<Campaign.UseCase>;
898
-
899
- /**
900
- * Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
901
- */
902
- helpKeywords?: string | null;
903
-
904
- /**
905
- * Message sent when user requests help
906
- */
907
- helpMessage?: string | null;
908
-
909
- /**
910
- * Description of how messages flow in the campaign
911
- */
912
- messageFlow?: string | null;
913
-
914
- /**
915
- * Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
916
- */
917
- optinKeywords?: string | null;
918
-
919
- /**
920
- * Message sent when user opts in
921
- */
922
- optinMessage?: string | null;
923
-
924
- /**
925
- * Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
926
- */
927
- optoutKeywords?: string | null;
928
-
929
- /**
930
- * Message sent when user opts out
931
- */
932
- optoutMessage?: string | null;
933
-
934
- /**
935
- * URL to privacy policy
936
- */
937
- privacyPolicyLink?: string | null;
938
-
939
- /**
940
- * URL to terms and conditions
941
- */
942
- termsAndConditionsLink?: string | null;
943
-
944
- /**
945
- * Expected messaging volume for this campaign. Numeric string (e.g. "1999",
946
- * "5000"). Values below 2000 bill at the low-volume tier.
947
- */
948
- volume?: string | null;
949
- }
950
-
951
- export namespace Campaign {
952
- /**
953
- * Campaign use case with sample messages
954
- */
955
- export interface UseCase {
956
- messagingUseCaseUs: CampaignsAPI.MessagingUseCaseUs;
957
-
958
- /**
959
- * Sample messages for this use case (1-5 messages, max 1024 characters each)
960
- */
961
- sampleMessages: Array<string>;
962
- }
963
- }
964
- }
965
-
966
464
  export interface CampaignListParams {
967
465
  /**
968
466
  * Profile UUID to scope the request to a child profile. Only organization API keys
@@ -993,10 +491,13 @@ export interface CampaignDeleteParams {
993
491
 
994
492
  export declare namespace Campaigns {
995
493
  export {
494
+ type APIResponseOfBrandCampaign as APIResponseOfBrandCampaign,
495
+ type APIResponseOfListOfBrandCampaign as APIResponseOfListOfBrandCampaign,
496
+ type BrandCampaign as BrandCampaign,
497
+ type CampaignData as CampaignData,
498
+ type CampaignUseCase as CampaignUseCase,
499
+ type CampaignUseCaseData as CampaignUseCaseData,
996
500
  type MessagingUseCaseUs as MessagingUseCaseUs,
997
- type CampaignCreateResponse as CampaignCreateResponse,
998
- type CampaignUpdateResponse as CampaignUpdateResponse,
999
- type CampaignListResponse as CampaignListResponse,
1000
501
  type CampaignCreateParams as CampaignCreateParams,
1001
502
  type CampaignUpdateParams as CampaignUpdateParams,
1002
503
  type CampaignListParams as CampaignListParams,