@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,5 +1,5 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
- import * as CampaignsAPI from "./campaigns.mjs";
2
+ import * as WebhooksAPI from "../webhooks.mjs";
3
3
  import { APIPromise } from "../../core/api-promise.mjs";
4
4
  import { RequestOptions } from "../../internal/request-options.mjs";
5
5
  /**
@@ -22,7 +22,7 @@ export declare class Campaigns extends APIResource {
22
22
  *
23
23
  * @deprecated
24
24
  */
25
- create(profileID: string, params: CampaignCreateParams, options?: RequestOptions): APIPromise<CampaignCreateResponse>;
25
+ create(profileID: string, params: CampaignCreateParams, options?: RequestOptions): APIPromise<APIResponseOfBrandCampaign>;
26
26
  /**
27
27
  * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
28
28
  * removed in a future release. It still behaves exactly as before, so nothing
@@ -35,7 +35,7 @@ export declare class Campaigns extends APIResource {
35
35
  *
36
36
  * @deprecated
37
37
  */
38
- update(campaignID: string, params: CampaignUpdateParams, options?: RequestOptions): APIPromise<CampaignUpdateResponse>;
38
+ update(campaignID: string, params: CampaignUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfBrandCampaign>;
39
39
  /**
40
40
  * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
41
41
  * removed in a future release. It still behaves exactly as before, so nothing
@@ -48,7 +48,7 @@ export declare class Campaigns extends APIResource {
48
48
  *
49
49
  * @deprecated
50
50
  */
51
- list(profileID: string, params?: CampaignListParams | null | undefined, options?: RequestOptions): APIPromise<CampaignListResponse>;
51
+ list(profileID: string, params?: CampaignListParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfListOfBrandCampaign>;
52
52
  /**
53
53
  * **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
54
54
  * removed in a future release. It still behaves exactly as before, so nothing
@@ -63,441 +63,210 @@ export declare class Campaigns extends APIResource {
63
63
  */
64
64
  delete(campaignID: string, params: CampaignDeleteParams, options?: RequestOptions): APIPromise<void>;
65
65
  }
66
- export type MessagingUseCaseUs = 'MARKETING' | 'ACCOUNT_NOTIFICATION' | 'CUSTOMER_CARE' | 'FRAUD_ALERT' | 'TWO_FA' | 'DELIVERY_NOTIFICATION' | 'SECURITY_ALERT' | 'M2M' | 'MIXED' | 'HIGHER_EDUCATION' | 'POLLING_VOTING' | 'PUBLIC_SERVICE_ANNOUNCEMENT' | 'LOW_VOLUME';
67
66
  /**
68
67
  * Standard API response envelope for all v3 endpoints
69
68
  */
70
- export interface CampaignCreateResponse {
69
+ export interface APIResponseOfBrandCampaign {
71
70
  /**
72
71
  * A 10DLC campaign registered for a brand.
73
72
  */
74
- data?: CampaignCreateResponse.Data | null;
73
+ data?: BrandCampaign | null;
75
74
  /**
76
75
  * Error information
77
76
  */
78
- error?: CampaignCreateResponse.Error | null;
77
+ error?: WebhooksAPI.ErrorDetail | null;
79
78
  /**
80
79
  * Request and response metadata
81
80
  */
82
- meta?: CampaignCreateResponse.Meta;
81
+ meta?: WebhooksAPI.APIMeta;
83
82
  /**
84
83
  * Indicates whether the request was successful
85
84
  */
86
85
  success?: boolean;
87
86
  }
88
- export declare namespace CampaignCreateResponse {
87
+ /**
88
+ * Standard API response envelope for all v3 endpoints
89
+ */
90
+ export interface APIResponseOfListOfBrandCampaign {
89
91
  /**
90
- * A 10DLC campaign registered for a brand.
92
+ * The response data (null if error)
91
93
  */
92
- interface Data {
93
- id?: string;
94
- billedDate?: string | null;
95
- brandId?: string | null;
96
- cost?: number | null;
97
- createdAt?: string;
98
- customerId?: string;
99
- /**
100
- * True once every carrier has completed its DCA election and the campaign is
101
- * operationally ready for traffic.
102
- */
103
- dcaElectionsComplete?: boolean | null;
104
- dcaElectionsCompletedAt?: string | null;
105
- description?: string;
106
- /**
107
- * True when the one-time campaign submission fee has already been charged.
108
- */
109
- hasSubmissionTransaction?: boolean;
110
- helpKeywords?: string | null;
111
- helpMessage?: string | null;
112
- messageFlow?: string | null;
113
- name?: string;
114
- optinKeywords?: string | null;
115
- optinMessage?: string | null;
116
- optoutKeywords?: string | null;
117
- optoutMessage?: string | null;
118
- privacyPolicyLink?: string | null;
119
- status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
120
- submittedAt?: string | null;
121
- submittedToTCR?: boolean;
122
- /**
123
- * The Campaign Registry identifier, once the campaign has been accepted.
124
- */
125
- tcrCampaignId?: string | null;
126
- /**
127
- * Surfaced so customers can see why a submission did not reach the registry.
128
- */
129
- tcrSyncError?: string | null;
130
- termsAndConditionsLink?: string | null;
131
- /**
132
- * Campaign type (for example KYC or App).
133
- */
134
- type?: string;
135
- updatedAt?: string | null;
136
- useCases?: Array<Data.UseCase>;
137
- /**
138
- * Expected messaging volume for this campaign — customer-supplied on
139
- * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
140
- * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
141
- * back the value they set.
142
- */
143
- volume?: string | null;
144
- }
145
- namespace Data {
146
- /**
147
- * Customer-facing use-case representation for the public v3 campaign contract.
148
- * Exists for the same reason as BrandCampaignV3Response: nesting the
149
- * TcrCampaignUseCase database entity in a public response means any column added
150
- * to that table silently becomes part of the customer-facing contract. This DTO is
151
- * an explicit allowlist, so a new column stays invisible until it is added here on
152
- * purpose. This mirrors exactly the fields the entity already serialized, so it
153
- * removes nothing from the current response shape. It only closes the future-leak
154
- * path.
155
- */
156
- interface UseCase {
157
- id?: string;
158
- campaignId?: string;
159
- createdAt?: string;
160
- customerId?: string;
161
- messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
162
- /**
163
- * Sample messages submitted to the registry for this use case.
164
- */
165
- sampleMessages?: Array<string>;
166
- updatedAt?: string | null;
167
- }
168
- }
94
+ data?: Array<BrandCampaign> | null;
169
95
  /**
170
96
  * Error information
171
97
  */
172
- interface Error {
173
- /**
174
- * Machine-readable error code (e.g., "RESOURCE_001")
175
- */
176
- code?: string;
177
- /**
178
- * Additional validation error details (field-level errors)
179
- */
180
- details?: {
181
- [key: string]: Array<string>;
182
- } | null;
183
- /**
184
- * URL to documentation about this error
185
- */
186
- doc_url?: string | null;
187
- /**
188
- * Human-readable error message
189
- */
190
- message?: string;
191
- }
98
+ error?: WebhooksAPI.ErrorDetail | null;
192
99
  /**
193
100
  * Request and response metadata
194
101
  */
195
- interface Meta {
196
- /**
197
- * Unique identifier for this request (for tracing and support)
198
- */
199
- request_id?: string;
200
- /**
201
- * Server timestamp when the response was generated
202
- */
203
- timestamp?: string;
204
- /**
205
- * API version used for this request
206
- */
207
- version?: string;
208
- }
102
+ meta?: WebhooksAPI.APIMeta;
103
+ /**
104
+ * Indicates whether the request was successful
105
+ */
106
+ success?: boolean;
209
107
  }
210
108
  /**
211
- * Standard API response envelope for all v3 endpoints
109
+ * A 10DLC campaign registered for a brand.
212
110
  */
213
- export interface CampaignUpdateResponse {
111
+ export interface BrandCampaign {
112
+ id?: string;
113
+ billedDate?: string | null;
114
+ brandId?: string | null;
115
+ cost?: number | null;
116
+ createdAt?: string;
117
+ customerId?: string;
118
+ /**
119
+ * True once every carrier has completed its DCA election and the campaign is
120
+ * operationally ready for traffic.
121
+ */
122
+ dcaElectionsComplete?: boolean | null;
123
+ dcaElectionsCompletedAt?: string | null;
124
+ description?: string;
125
+ /**
126
+ * True when the one-time campaign submission fee has already been charged.
127
+ */
128
+ hasSubmissionTransaction?: boolean;
129
+ helpKeywords?: string | null;
130
+ helpMessage?: string | null;
131
+ messageFlow?: string | null;
132
+ name?: string;
133
+ optinKeywords?: string | null;
134
+ optinMessage?: string | null;
135
+ optoutKeywords?: string | null;
136
+ optoutMessage?: string | null;
137
+ privacyPolicyLink?: string | null;
138
+ status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
139
+ submittedAt?: string | null;
140
+ submittedToTCR?: boolean;
141
+ /**
142
+ * The Campaign Registry identifier, once the campaign has been accepted.
143
+ */
144
+ tcrCampaignId?: string | null;
145
+ /**
146
+ * Surfaced so customers can see why a submission did not reach the registry.
147
+ */
148
+ tcrSyncError?: string | null;
149
+ termsAndConditionsLink?: string | null;
150
+ /**
151
+ * Campaign type (for example KYC or App).
152
+ */
153
+ type?: string;
154
+ updatedAt?: string | null;
155
+ useCases?: Array<CampaignUseCase>;
156
+ /**
157
+ * Expected messaging volume for this campaign — customer-supplied on
158
+ * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
159
+ * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
160
+ * back the value they set.
161
+ */
162
+ volume?: string | null;
163
+ }
164
+ /**
165
+ * Campaign data for create or update operation
166
+ */
167
+ export interface CampaignData {
214
168
  /**
215
- * A 10DLC campaign registered for a brand.
169
+ * Campaign description
216
170
  */
217
- data?: CampaignUpdateResponse.Data | null;
171
+ description: string;
218
172
  /**
219
- * Error information
173
+ * Campaign name
220
174
  */
221
- error?: CampaignUpdateResponse.Error | null;
175
+ name: string;
222
176
  /**
223
- * Request and response metadata
177
+ * Campaign type (e.g., "KYC", "App").
178
+ *
179
+ * Still required of a caller, and consulted by nothing. It named the signup path
180
+ * that produced the campaign, was written to a column no query filters on, no TCR
181
+ * payload carries and no fee or status decision reads, and is now defaulted at the
182
+ * entity instead. It stays required so that a request which was valid before is
183
+ * still valid — dropping it would be the client-visible change, not keeping it.
224
184
  */
225
- meta?: CampaignUpdateResponse.Meta;
185
+ type: string;
226
186
  /**
227
- * Indicates whether the request was successful
187
+ * List of use cases with sample messages
228
188
  */
229
- success?: boolean;
230
- }
231
- export declare namespace CampaignUpdateResponse {
189
+ useCases: Array<CampaignUseCaseData>;
232
190
  /**
233
- * A 10DLC campaign registered for a brand.
191
+ * Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
234
192
  */
235
- interface Data {
236
- id?: string;
237
- billedDate?: string | null;
238
- brandId?: string | null;
239
- cost?: number | null;
240
- createdAt?: string;
241
- customerId?: string;
242
- /**
243
- * True once every carrier has completed its DCA election and the campaign is
244
- * operationally ready for traffic.
245
- */
246
- dcaElectionsComplete?: boolean | null;
247
- dcaElectionsCompletedAt?: string | null;
248
- description?: string;
249
- /**
250
- * True when the one-time campaign submission fee has already been charged.
251
- */
252
- hasSubmissionTransaction?: boolean;
253
- helpKeywords?: string | null;
254
- helpMessage?: string | null;
255
- messageFlow?: string | null;
256
- name?: string;
257
- optinKeywords?: string | null;
258
- optinMessage?: string | null;
259
- optoutKeywords?: string | null;
260
- optoutMessage?: string | null;
261
- privacyPolicyLink?: string | null;
262
- status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
263
- submittedAt?: string | null;
264
- submittedToTCR?: boolean;
265
- /**
266
- * The Campaign Registry identifier, once the campaign has been accepted.
267
- */
268
- tcrCampaignId?: string | null;
269
- /**
270
- * Surfaced so customers can see why a submission did not reach the registry.
271
- */
272
- tcrSyncError?: string | null;
273
- termsAndConditionsLink?: string | null;
274
- /**
275
- * Campaign type (for example KYC or App).
276
- */
277
- type?: string;
278
- updatedAt?: string | null;
279
- useCases?: Array<Data.UseCase>;
280
- /**
281
- * Expected messaging volume for this campaign — customer-supplied on
282
- * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
283
- * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
284
- * back the value they set.
285
- */
286
- volume?: string | null;
287
- }
288
- namespace Data {
289
- /**
290
- * Customer-facing use-case representation for the public v3 campaign contract.
291
- * Exists for the same reason as BrandCampaignV3Response: nesting the
292
- * TcrCampaignUseCase database entity in a public response means any column added
293
- * to that table silently becomes part of the customer-facing contract. This DTO is
294
- * an explicit allowlist, so a new column stays invisible until it is added here on
295
- * purpose. This mirrors exactly the fields the entity already serialized, so it
296
- * removes nothing from the current response shape. It only closes the future-leak
297
- * path.
298
- */
299
- interface UseCase {
300
- id?: string;
301
- campaignId?: string;
302
- createdAt?: string;
303
- customerId?: string;
304
- messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
305
- /**
306
- * Sample messages submitted to the registry for this use case.
307
- */
308
- sampleMessages?: Array<string>;
309
- updatedAt?: string | null;
310
- }
311
- }
193
+ helpKeywords?: string | null;
312
194
  /**
313
- * Error information
195
+ * Message sent when user requests help
314
196
  */
315
- interface Error {
316
- /**
317
- * Machine-readable error code (e.g., "RESOURCE_001")
318
- */
319
- code?: string;
320
- /**
321
- * Additional validation error details (field-level errors)
322
- */
323
- details?: {
324
- [key: string]: Array<string>;
325
- } | null;
326
- /**
327
- * URL to documentation about this error
328
- */
329
- doc_url?: string | null;
330
- /**
331
- * Human-readable error message
332
- */
333
- message?: string;
334
- }
197
+ helpMessage?: string | null;
335
198
  /**
336
- * Request and response metadata
199
+ * Description of how messages flow in the campaign
337
200
  */
338
- interface Meta {
339
- /**
340
- * Unique identifier for this request (for tracing and support)
341
- */
342
- request_id?: string;
343
- /**
344
- * Server timestamp when the response was generated
345
- */
346
- timestamp?: string;
347
- /**
348
- * API version used for this request
349
- */
350
- version?: string;
351
- }
352
- }
353
- /**
354
- * Standard API response envelope for all v3 endpoints
355
- */
356
- export interface CampaignListResponse {
201
+ messageFlow?: string | null;
357
202
  /**
358
- * The response data (null if error)
203
+ * Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
359
204
  */
360
- data?: Array<CampaignListResponse.Data> | null;
205
+ optinKeywords?: string | null;
361
206
  /**
362
- * Error information
207
+ * Message sent when user opts in
363
208
  */
364
- error?: CampaignListResponse.Error | null;
209
+ optinMessage?: string | null;
365
210
  /**
366
- * Request and response metadata
211
+ * Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
367
212
  */
368
- meta?: CampaignListResponse.Meta;
213
+ optoutKeywords?: string | null;
369
214
  /**
370
- * Indicates whether the request was successful
215
+ * Message sent when user opts out
371
216
  */
372
- success?: boolean;
373
- }
374
- export declare namespace CampaignListResponse {
217
+ optoutMessage?: string | null;
375
218
  /**
376
- * A 10DLC campaign registered for a brand.
219
+ * URL to privacy policy
377
220
  */
378
- interface Data {
379
- id?: string;
380
- billedDate?: string | null;
381
- brandId?: string | null;
382
- cost?: number | null;
383
- createdAt?: string;
384
- customerId?: string;
385
- /**
386
- * True once every carrier has completed its DCA election and the campaign is
387
- * operationally ready for traffic.
388
- */
389
- dcaElectionsComplete?: boolean | null;
390
- dcaElectionsCompletedAt?: string | null;
391
- description?: string;
392
- /**
393
- * True when the one-time campaign submission fee has already been charged.
394
- */
395
- hasSubmissionTransaction?: boolean;
396
- helpKeywords?: string | null;
397
- helpMessage?: string | null;
398
- messageFlow?: string | null;
399
- name?: string;
400
- optinKeywords?: string | null;
401
- optinMessage?: string | null;
402
- optoutKeywords?: string | null;
403
- optoutMessage?: string | null;
404
- privacyPolicyLink?: string | null;
405
- status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
406
- submittedAt?: string | null;
407
- submittedToTCR?: boolean;
408
- /**
409
- * The Campaign Registry identifier, once the campaign has been accepted.
410
- */
411
- tcrCampaignId?: string | null;
412
- /**
413
- * Surfaced so customers can see why a submission did not reach the registry.
414
- */
415
- tcrSyncError?: string | null;
416
- termsAndConditionsLink?: string | null;
417
- /**
418
- * Campaign type (for example KYC or App).
419
- */
420
- type?: string;
421
- updatedAt?: string | null;
422
- useCases?: Array<Data.UseCase>;
423
- /**
424
- * Expected messaging volume for this campaign — customer-supplied on
425
- * create/update, and the input to both the TCR usecase classification (LOW_VOLUME
426
- * vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
427
- * back the value they set.
428
- */
429
- volume?: string | null;
430
- }
431
- namespace Data {
432
- /**
433
- * Customer-facing use-case representation for the public v3 campaign contract.
434
- * Exists for the same reason as BrandCampaignV3Response: nesting the
435
- * TcrCampaignUseCase database entity in a public response means any column added
436
- * to that table silently becomes part of the customer-facing contract. This DTO is
437
- * an explicit allowlist, so a new column stays invisible until it is added here on
438
- * purpose. This mirrors exactly the fields the entity already serialized, so it
439
- * removes nothing from the current response shape. It only closes the future-leak
440
- * path.
441
- */
442
- interface UseCase {
443
- id?: string;
444
- campaignId?: string;
445
- createdAt?: string;
446
- customerId?: string;
447
- messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
448
- /**
449
- * Sample messages submitted to the registry for this use case.
450
- */
451
- sampleMessages?: Array<string>;
452
- updatedAt?: string | null;
453
- }
454
- }
221
+ privacyPolicyLink?: string | null;
455
222
  /**
456
- * Error information
223
+ * URL to terms and conditions
457
224
  */
458
- interface Error {
459
- /**
460
- * Machine-readable error code (e.g., "RESOURCE_001")
461
- */
462
- code?: string;
463
- /**
464
- * Additional validation error details (field-level errors)
465
- */
466
- details?: {
467
- [key: string]: Array<string>;
468
- } | null;
469
- /**
470
- * URL to documentation about this error
471
- */
472
- doc_url?: string | null;
473
- /**
474
- * Human-readable error message
475
- */
476
- message?: string;
477
- }
225
+ termsAndConditionsLink?: string | null;
478
226
  /**
479
- * Request and response metadata
227
+ * Expected messaging volume for this campaign. Numeric string (e.g. "1999",
228
+ * "5000"). Values below 2000 bill at the low-volume tier.
480
229
  */
481
- interface Meta {
482
- /**
483
- * Unique identifier for this request (for tracing and support)
484
- */
485
- request_id?: string;
486
- /**
487
- * Server timestamp when the response was generated
488
- */
489
- timestamp?: string;
490
- /**
491
- * API version used for this request
492
- */
493
- version?: string;
494
- }
230
+ volume?: string | null;
495
231
  }
232
+ /**
233
+ * Customer-facing use-case representation for the public v3 campaign contract.
234
+ * Exists for the same reason as BrandCampaignV3Response: nesting the
235
+ * TcrCampaignUseCase database entity in a public response means any column added
236
+ * to that table silently becomes part of the customer-facing contract. This DTO is
237
+ * an explicit allowlist, so a new column stays invisible until it is added here on
238
+ * purpose. This mirrors exactly the fields the entity already serialized, so it
239
+ * removes nothing from the current response shape. It only closes the future-leak
240
+ * path.
241
+ */
242
+ export interface CampaignUseCase {
243
+ id?: string;
244
+ campaignId?: string;
245
+ createdAt?: string;
246
+ customerId?: string;
247
+ messagingUseCaseUs?: MessagingUseCaseUs;
248
+ /**
249
+ * Sample messages submitted to the registry for this use case.
250
+ */
251
+ sampleMessages?: Array<string>;
252
+ updatedAt?: string | null;
253
+ }
254
+ /**
255
+ * Campaign use case with sample messages
256
+ */
257
+ export interface CampaignUseCaseData {
258
+ messagingUseCaseUs: MessagingUseCaseUs;
259
+ /**
260
+ * Sample messages for this use case (1-5 messages, max 1024 characters each)
261
+ */
262
+ sampleMessages: Array<string>;
263
+ }
264
+ export type MessagingUseCaseUs = 'MARKETING' | 'ACCOUNT_NOTIFICATION' | 'CUSTOMER_CARE' | 'FRAUD_ALERT' | 'TWO_FA' | 'DELIVERY_NOTIFICATION' | 'SECURITY_ALERT' | 'M2M' | 'MIXED' | 'HIGHER_EDUCATION' | 'POLLING_VOTING' | 'PUBLIC_SERVICE_ANNOUNCEMENT' | 'LOW_VOLUME';
496
265
  export interface CampaignCreateParams {
497
266
  /**
498
267
  * Body param: Campaign data for create or update operation
499
268
  */
500
- campaign: CampaignCreateParams.Campaign;
269
+ campaign: CampaignData;
501
270
  /**
502
271
  * Body param: Sandbox flag - when true, the operation is simulated without side
503
272
  * effects Useful for testing integrations without actual execution
@@ -516,88 +285,6 @@ export interface CampaignCreateParams {
516
285
  */
517
286
  'x-profile-id'?: string;
518
287
  }
519
- export declare namespace CampaignCreateParams {
520
- /**
521
- * Campaign data for create or update operation
522
- */
523
- interface Campaign {
524
- /**
525
- * Campaign description
526
- */
527
- description: string;
528
- /**
529
- * Campaign name
530
- */
531
- name: string;
532
- /**
533
- * Campaign type (e.g., "KYC", "App").
534
- *
535
- * Still required of a caller, and consulted by nothing. It named the signup path
536
- * that produced the campaign, was written to a column no query filters on, no TCR
537
- * payload carries and no fee or status decision reads, and is now defaulted at the
538
- * entity instead. It stays required so that a request which was valid before is
539
- * still valid — dropping it would be the client-visible change, not keeping it.
540
- */
541
- type: string;
542
- /**
543
- * List of use cases with sample messages
544
- */
545
- useCases: Array<Campaign.UseCase>;
546
- /**
547
- * Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
548
- */
549
- helpKeywords?: string | null;
550
- /**
551
- * Message sent when user requests help
552
- */
553
- helpMessage?: string | null;
554
- /**
555
- * Description of how messages flow in the campaign
556
- */
557
- messageFlow?: string | null;
558
- /**
559
- * Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
560
- */
561
- optinKeywords?: string | null;
562
- /**
563
- * Message sent when user opts in
564
- */
565
- optinMessage?: string | null;
566
- /**
567
- * Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
568
- */
569
- optoutKeywords?: string | null;
570
- /**
571
- * Message sent when user opts out
572
- */
573
- optoutMessage?: string | null;
574
- /**
575
- * URL to privacy policy
576
- */
577
- privacyPolicyLink?: string | null;
578
- /**
579
- * URL to terms and conditions
580
- */
581
- termsAndConditionsLink?: string | null;
582
- /**
583
- * Expected messaging volume for this campaign. Numeric string (e.g. "1999",
584
- * "5000"). Values below 2000 bill at the low-volume tier.
585
- */
586
- volume?: string | null;
587
- }
588
- namespace Campaign {
589
- /**
590
- * Campaign use case with sample messages
591
- */
592
- interface UseCase {
593
- messagingUseCaseUs: CampaignsAPI.MessagingUseCaseUs;
594
- /**
595
- * Sample messages for this use case (1-5 messages, max 1024 characters each)
596
- */
597
- sampleMessages: Array<string>;
598
- }
599
- }
600
- }
601
288
  export interface CampaignUpdateParams {
602
289
  /**
603
290
  * Path param: Profile ID from route
@@ -606,7 +293,7 @@ export interface CampaignUpdateParams {
606
293
  /**
607
294
  * Body param: Campaign data for create or update operation
608
295
  */
609
- campaign: CampaignUpdateParams.Campaign;
296
+ campaign: CampaignData;
610
297
  /**
611
298
  * Body param: Sandbox flag - when true, the operation is simulated without side
612
299
  * effects Useful for testing integrations without actual execution
@@ -625,88 +312,6 @@ export interface CampaignUpdateParams {
625
312
  */
626
313
  'x-profile-id'?: string;
627
314
  }
628
- export declare namespace CampaignUpdateParams {
629
- /**
630
- * Campaign data for create or update operation
631
- */
632
- interface Campaign {
633
- /**
634
- * Campaign description
635
- */
636
- description: string;
637
- /**
638
- * Campaign name
639
- */
640
- name: string;
641
- /**
642
- * Campaign type (e.g., "KYC", "App").
643
- *
644
- * Still required of a caller, and consulted by nothing. It named the signup path
645
- * that produced the campaign, was written to a column no query filters on, no TCR
646
- * payload carries and no fee or status decision reads, and is now defaulted at the
647
- * entity instead. It stays required so that a request which was valid before is
648
- * still valid — dropping it would be the client-visible change, not keeping it.
649
- */
650
- type: string;
651
- /**
652
- * List of use cases with sample messages
653
- */
654
- useCases: Array<Campaign.UseCase>;
655
- /**
656
- * Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
657
- */
658
- helpKeywords?: string | null;
659
- /**
660
- * Message sent when user requests help
661
- */
662
- helpMessage?: string | null;
663
- /**
664
- * Description of how messages flow in the campaign
665
- */
666
- messageFlow?: string | null;
667
- /**
668
- * Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
669
- */
670
- optinKeywords?: string | null;
671
- /**
672
- * Message sent when user opts in
673
- */
674
- optinMessage?: string | null;
675
- /**
676
- * Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
677
- */
678
- optoutKeywords?: string | null;
679
- /**
680
- * Message sent when user opts out
681
- */
682
- optoutMessage?: string | null;
683
- /**
684
- * URL to privacy policy
685
- */
686
- privacyPolicyLink?: string | null;
687
- /**
688
- * URL to terms and conditions
689
- */
690
- termsAndConditionsLink?: string | null;
691
- /**
692
- * Expected messaging volume for this campaign. Numeric string (e.g. "1999",
693
- * "5000"). Values below 2000 bill at the low-volume tier.
694
- */
695
- volume?: string | null;
696
- }
697
- namespace Campaign {
698
- /**
699
- * Campaign use case with sample messages
700
- */
701
- interface UseCase {
702
- messagingUseCaseUs: CampaignsAPI.MessagingUseCaseUs;
703
- /**
704
- * Sample messages for this use case (1-5 messages, max 1024 characters each)
705
- */
706
- sampleMessages: Array<string>;
707
- }
708
- }
709
- }
710
315
  export interface CampaignListParams {
711
316
  /**
712
317
  * Profile UUID to scope the request to a child profile. Only organization API keys
@@ -732,6 +337,6 @@ export interface CampaignDeleteParams {
732
337
  'x-profile-id'?: string;
733
338
  }
734
339
  export declare namespace Campaigns {
735
- export { type MessagingUseCaseUs as MessagingUseCaseUs, type CampaignCreateResponse as CampaignCreateResponse, type CampaignUpdateResponse as CampaignUpdateResponse, type CampaignListResponse as CampaignListResponse, type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, type CampaignDeleteParams as CampaignDeleteParams, };
340
+ export { type APIResponseOfBrandCampaign as APIResponseOfBrandCampaign, type APIResponseOfListOfBrandCampaign as APIResponseOfListOfBrandCampaign, type BrandCampaign as BrandCampaign, type CampaignData as CampaignData, type CampaignUseCase as CampaignUseCase, type CampaignUseCaseData as CampaignUseCaseData, type MessagingUseCaseUs as MessagingUseCaseUs, type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, type CampaignDeleteParams as CampaignDeleteParams, };
736
341
  }
737
342
  //# sourceMappingURL=campaigns.d.mts.map