@sentdm/sentdm 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/client.d.mts +53 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -22
- package/client.d.ts.map +1 -1
- package/client.js +39 -8
- package/client.js.map +1 -1
- package/client.mjs +39 -8
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +606 -89
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +606 -89
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +21 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +21 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +335 -69
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +335 -69
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +15 -10
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +15 -10
- package/resources/conversations.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +165 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +165 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +206 -27
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +206 -27
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +5 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +5 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +45 -4
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +45 -4
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js +3 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs +3 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +579 -209
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +579 -209
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +33 -64
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +33 -64
- package/resources/profiles/campaigns.mjs.map +1 -1
- package/resources/profiles/index.d.mts +2 -2
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts +2 -2
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.js.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +2006 -508
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -508
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +98 -75
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +98 -75
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +497 -84
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +497 -84
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +6 -4
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +6 -4
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +444 -43
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +444 -43
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +6 -4
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +6 -4
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +791 -190
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +791 -190
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -8
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -8
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +78 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +20 -26
- package/src/resources/me.ts +186 -52
- package/src/resources/messages.ts +230 -27
- package/src/resources/numbers.ts +50 -4
- package/src/resources/profiles/campaigns.ts +706 -232
- package/src/resources/profiles/index.ts +6 -14
- package/src/resources/profiles/profiles.ts +2421 -646
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +514 -44
- package/src/resources/webhooks.ts +964 -241
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,50 +1,37 @@
|
|
|
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
|
|
4
|
+
import * as CampaignsAPI from './campaigns';
|
|
5
5
|
import { APIPromise } from '../../core/api-promise';
|
|
6
6
|
import { buildHeaders } from '../../internal/headers';
|
|
7
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
8
|
import { path } from '../../internal/utils/path';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* **Deprecated — use Sender Profiles.**
|
|
12
|
+
*
|
|
13
|
+
* The original profile resource, kept because it has live callers. It still works, and its replacement is `/v3/sender-profiles`, which takes the identity and the campaign in one call instead of across three.
|
|
14
|
+
*
|
|
15
|
+
* New integrations should not start here.
|
|
12
16
|
*/
|
|
13
17
|
export class Campaigns extends APIResource {
|
|
14
18
|
/**
|
|
19
|
+
* **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
20
|
+
* removed in a future release. It still behaves exactly as before, so nothing
|
|
21
|
+
* needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
22
|
+
* which models a profile's markets, compliance, brand, campaigns and billing
|
|
23
|
+
* explicitly.
|
|
24
|
+
*
|
|
15
25
|
* Creates a new campaign scoped under the brand of the specified profile. Each
|
|
16
26
|
* campaign must include at least one use case with sample messages.
|
|
17
27
|
*
|
|
18
|
-
* @
|
|
19
|
-
* ```ts
|
|
20
|
-
* const apiResponseOfBrandCampaign =
|
|
21
|
-
* await client.profiles.campaigns.create(
|
|
22
|
-
* '770e8400-e29b-41d4-a716-446655440002',
|
|
23
|
-
* {
|
|
24
|
-
* campaign: {
|
|
25
|
-
* description:
|
|
26
|
-
* 'Appointment reminders and account notifications',
|
|
27
|
-
* name: 'Customer Notifications',
|
|
28
|
-
* type: 'App',
|
|
29
|
-
* useCases: [
|
|
30
|
-
* {
|
|
31
|
-
* messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
|
|
32
|
-
* sampleMessages: [
|
|
33
|
-
* 'Hi {name}, your appointment is confirmed for {date} at {time}.',
|
|
34
|
-
* 'Your order #{order_id} has been shipped. Track at {url}',
|
|
35
|
-
* ],
|
|
36
|
-
* },
|
|
37
|
-
* ],
|
|
38
|
-
* },
|
|
39
|
-
* },
|
|
40
|
-
* );
|
|
41
|
-
* ```
|
|
28
|
+
* @deprecated
|
|
42
29
|
*/
|
|
43
30
|
create(
|
|
44
31
|
profileID: string,
|
|
45
32
|
params: CampaignCreateParams,
|
|
46
33
|
options?: RequestOptions,
|
|
47
|
-
): APIPromise<
|
|
34
|
+
): APIPromise<CampaignCreateResponse> {
|
|
48
35
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
49
36
|
return this._client.post(path`/v3/profiles/${profileID}/campaigns`, {
|
|
50
37
|
body,
|
|
@@ -60,40 +47,22 @@ export class Campaigns extends APIResource {
|
|
|
60
47
|
}
|
|
61
48
|
|
|
62
49
|
/**
|
|
50
|
+
* **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
51
|
+
* removed in a future release. It still behaves exactly as before, so nothing
|
|
52
|
+
* needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
53
|
+
* which models a profile's markets, compliance, brand, campaigns and billing
|
|
54
|
+
* explicitly.
|
|
55
|
+
*
|
|
63
56
|
* Updates an existing campaign under the brand of the specified profile. Cannot
|
|
64
57
|
* update campaigns that have already been submitted to TCR.
|
|
65
58
|
*
|
|
66
|
-
* @
|
|
67
|
-
* ```ts
|
|
68
|
-
* const apiResponseOfBrandCampaign =
|
|
69
|
-
* await client.profiles.campaigns.update(
|
|
70
|
-
* 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
|
|
71
|
-
* {
|
|
72
|
-
* profileId: '770e8400-e29b-41d4-a716-446655440002',
|
|
73
|
-
* campaign: {
|
|
74
|
-
* description:
|
|
75
|
-
* 'Updated appointment reminders and account notifications',
|
|
76
|
-
* name: 'Customer Notifications Updated',
|
|
77
|
-
* type: 'App',
|
|
78
|
-
* useCases: [
|
|
79
|
-
* {
|
|
80
|
-
* messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
|
|
81
|
-
* sampleMessages: [
|
|
82
|
-
* 'Hi {name}, your appointment is confirmed for {date} at {time}.',
|
|
83
|
-
* 'Your order #{order_id} has been shipped. Track at {url}',
|
|
84
|
-
* ],
|
|
85
|
-
* },
|
|
86
|
-
* ],
|
|
87
|
-
* },
|
|
88
|
-
* },
|
|
89
|
-
* );
|
|
90
|
-
* ```
|
|
59
|
+
* @deprecated
|
|
91
60
|
*/
|
|
92
61
|
update(
|
|
93
62
|
campaignID: string,
|
|
94
63
|
params: CampaignUpdateParams,
|
|
95
64
|
options?: RequestOptions,
|
|
96
|
-
): APIPromise<
|
|
65
|
+
): APIPromise<CampaignUpdateResponse> {
|
|
97
66
|
const { profileId, 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
98
67
|
return this._client.put(path`/v3/profiles/${profileId}/campaigns/${campaignID}`, {
|
|
99
68
|
body,
|
|
@@ -109,22 +78,22 @@ export class Campaigns extends APIResource {
|
|
|
109
78
|
}
|
|
110
79
|
|
|
111
80
|
/**
|
|
81
|
+
* **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
82
|
+
* removed in a future release. It still behaves exactly as before, so nothing
|
|
83
|
+
* needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
84
|
+
* which models a profile's markets, compliance, brand, campaigns and billing
|
|
85
|
+
* explicitly.
|
|
86
|
+
*
|
|
112
87
|
* Retrieves all campaigns linked to the profile's brand, including use cases and
|
|
113
88
|
* sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
|
|
114
89
|
*
|
|
115
|
-
* @
|
|
116
|
-
* ```ts
|
|
117
|
-
* const apiResponseOfListOfBrandCampaign =
|
|
118
|
-
* await client.profiles.campaigns.list(
|
|
119
|
-
* '770e8400-e29b-41d4-a716-446655440002',
|
|
120
|
-
* );
|
|
121
|
-
* ```
|
|
90
|
+
* @deprecated
|
|
122
91
|
*/
|
|
123
92
|
list(
|
|
124
93
|
profileID: string,
|
|
125
94
|
params: CampaignListParams | null | undefined = {},
|
|
126
95
|
options?: RequestOptions,
|
|
127
|
-
): APIPromise<
|
|
96
|
+
): APIPromise<CampaignListResponse> {
|
|
128
97
|
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
129
98
|
return this._client.get(path`/v3/profiles/${profileID}/campaigns`, {
|
|
130
99
|
...options,
|
|
@@ -136,16 +105,16 @@ export class Campaigns extends APIResource {
|
|
|
136
105
|
}
|
|
137
106
|
|
|
138
107
|
/**
|
|
108
|
+
* **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
109
|
+
* removed in a future release. It still behaves exactly as before, so nothing
|
|
110
|
+
* needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
111
|
+
* which models a profile's markets, compliance, brand, campaigns and billing
|
|
112
|
+
* explicitly.
|
|
113
|
+
*
|
|
139
114
|
* Deletes a campaign by ID from the brand of the specified profile. The profile
|
|
140
115
|
* must belong to the authenticated organization.
|
|
141
116
|
*
|
|
142
|
-
* @
|
|
143
|
-
* ```ts
|
|
144
|
-
* await client.profiles.campaigns.delete(
|
|
145
|
-
* 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
|
|
146
|
-
* { profileId: '770e8400-e29b-41d4-a716-446655440002' },
|
|
147
|
-
* );
|
|
148
|
-
* ```
|
|
117
|
+
* @deprecated
|
|
149
118
|
*/
|
|
150
119
|
delete(campaignID: string, params: CampaignDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
151
120
|
const { profileId, 'x-profile-id': xProfileID, ...body } = params;
|
|
@@ -160,24 +129,39 @@ export class Campaigns extends APIResource {
|
|
|
160
129
|
}
|
|
161
130
|
}
|
|
162
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
|
+
|
|
163
147
|
/**
|
|
164
148
|
* Standard API response envelope for all v3 endpoints
|
|
165
149
|
*/
|
|
166
|
-
export interface
|
|
150
|
+
export interface CampaignCreateResponse {
|
|
167
151
|
/**
|
|
168
152
|
* A 10DLC campaign registered for a brand.
|
|
169
153
|
*/
|
|
170
|
-
data?:
|
|
154
|
+
data?: CampaignCreateResponse.Data | null;
|
|
171
155
|
|
|
172
156
|
/**
|
|
173
157
|
* Error information
|
|
174
158
|
*/
|
|
175
|
-
error?:
|
|
159
|
+
error?: CampaignCreateResponse.Error | null;
|
|
176
160
|
|
|
177
161
|
/**
|
|
178
162
|
* Request and response metadata
|
|
179
163
|
*/
|
|
180
|
-
meta?:
|
|
164
|
+
meta?: CampaignCreateResponse.Meta;
|
|
181
165
|
|
|
182
166
|
/**
|
|
183
167
|
* Indicates whether the request was successful
|
|
@@ -185,253 +169,550 @@ export interface APIResponseOfBrandCampaign {
|
|
|
185
169
|
success?: boolean;
|
|
186
170
|
}
|
|
187
171
|
|
|
188
|
-
|
|
189
|
-
* Standard API response envelope for all v3 endpoints
|
|
190
|
-
*/
|
|
191
|
-
export interface APIResponseOfListOfBrandCampaign {
|
|
172
|
+
export namespace CampaignCreateResponse {
|
|
192
173
|
/**
|
|
193
|
-
*
|
|
174
|
+
* A 10DLC campaign registered for a brand.
|
|
194
175
|
*/
|
|
195
|
-
|
|
176
|
+
export interface Data {
|
|
177
|
+
id?: string;
|
|
196
178
|
|
|
197
|
-
|
|
198
|
-
* Error information
|
|
199
|
-
*/
|
|
200
|
-
error?: WebhooksAPI.ErrorDetail | null;
|
|
179
|
+
billedDate?: string | null;
|
|
201
180
|
|
|
202
|
-
|
|
203
|
-
* Request and response metadata
|
|
204
|
-
*/
|
|
205
|
-
meta?: WebhooksAPI.APIMeta;
|
|
181
|
+
brandId?: string | null;
|
|
206
182
|
|
|
207
|
-
|
|
208
|
-
* Indicates whether the request was successful
|
|
209
|
-
*/
|
|
210
|
-
success?: boolean;
|
|
211
|
-
}
|
|
183
|
+
cost?: number | null;
|
|
212
184
|
|
|
213
|
-
|
|
214
|
-
* A 10DLC campaign registered for a brand.
|
|
215
|
-
*/
|
|
216
|
-
export interface BrandCampaign {
|
|
217
|
-
id?: string;
|
|
185
|
+
createdAt?: string;
|
|
218
186
|
|
|
219
|
-
|
|
187
|
+
customerId?: string;
|
|
220
188
|
|
|
221
|
-
|
|
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;
|
|
222
194
|
|
|
223
|
-
|
|
195
|
+
dcaElectionsCompletedAt?: string | null;
|
|
224
196
|
|
|
225
|
-
|
|
197
|
+
description?: string;
|
|
226
198
|
|
|
227
|
-
|
|
199
|
+
/**
|
|
200
|
+
* True when the one-time campaign submission fee has already been charged.
|
|
201
|
+
*/
|
|
202
|
+
hasSubmissionTransaction?: boolean;
|
|
228
203
|
|
|
229
|
-
|
|
230
|
-
* True once every carrier has completed its DCA election and the campaign is
|
|
231
|
-
* operationally ready for traffic.
|
|
232
|
-
*/
|
|
233
|
-
dcaElectionsComplete?: boolean | null;
|
|
204
|
+
helpKeywords?: string | null;
|
|
234
205
|
|
|
235
|
-
|
|
206
|
+
helpMessage?: string | null;
|
|
236
207
|
|
|
237
|
-
|
|
208
|
+
messageFlow?: string | null;
|
|
238
209
|
|
|
239
|
-
|
|
240
|
-
* True when the one-time campaign submission fee has already been charged.
|
|
241
|
-
*/
|
|
242
|
-
hasSubmissionTransaction?: boolean;
|
|
210
|
+
name?: string;
|
|
243
211
|
|
|
244
|
-
|
|
212
|
+
optinKeywords?: string | null;
|
|
245
213
|
|
|
246
|
-
|
|
214
|
+
optinMessage?: string | null;
|
|
247
215
|
|
|
248
|
-
|
|
216
|
+
optoutKeywords?: string | null;
|
|
249
217
|
|
|
250
|
-
|
|
218
|
+
optoutMessage?: string | null;
|
|
251
219
|
|
|
252
|
-
|
|
220
|
+
privacyPolicyLink?: string | null;
|
|
253
221
|
|
|
254
|
-
|
|
222
|
+
status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
|
|
255
223
|
|
|
256
|
-
|
|
224
|
+
submittedAt?: string | null;
|
|
257
225
|
|
|
258
|
-
|
|
226
|
+
submittedToTCR?: boolean;
|
|
259
227
|
|
|
260
|
-
|
|
228
|
+
/**
|
|
229
|
+
* The Campaign Registry identifier, once the campaign has been accepted.
|
|
230
|
+
*/
|
|
231
|
+
tcrCampaignId?: string | null;
|
|
261
232
|
|
|
262
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Surfaced so customers can see why a submission did not reach the registry.
|
|
235
|
+
*/
|
|
236
|
+
tcrSyncError?: string | null;
|
|
263
237
|
|
|
264
|
-
|
|
238
|
+
termsAndConditionsLink?: string | null;
|
|
265
239
|
|
|
266
|
-
|
|
240
|
+
/**
|
|
241
|
+
* Campaign type (for example KYC or App).
|
|
242
|
+
*/
|
|
243
|
+
type?: string;
|
|
267
244
|
|
|
268
|
-
|
|
269
|
-
* The Campaign Registry identifier, once the campaign has been accepted.
|
|
270
|
-
*/
|
|
271
|
-
tcrCampaignId?: string | null;
|
|
245
|
+
updatedAt?: string | null;
|
|
272
246
|
|
|
273
|
-
|
|
274
|
-
* Surfaced so customers can see why a submission did not reach the registry.
|
|
275
|
-
*/
|
|
276
|
-
tcrSyncError?: string | null;
|
|
247
|
+
useCases?: Array<Data.UseCase>;
|
|
277
248
|
|
|
278
|
-
|
|
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
|
+
}
|
|
279
257
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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;
|
|
284
271
|
|
|
285
|
-
|
|
272
|
+
campaignId?: string;
|
|
286
273
|
|
|
287
|
-
|
|
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
|
+
}
|
|
288
313
|
|
|
289
314
|
/**
|
|
290
|
-
*
|
|
291
|
-
* create/update, and the input to both the TCR usecase classification (LOW_VOLUME
|
|
292
|
-
* vs MIXED/specific) and the campaign fee tier. Surfaced so customers can read
|
|
293
|
-
* back the value they set.
|
|
315
|
+
* Request and response metadata
|
|
294
316
|
*/
|
|
295
|
-
|
|
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
|
+
}
|
|
296
333
|
}
|
|
297
334
|
|
|
298
335
|
/**
|
|
299
|
-
*
|
|
336
|
+
* Standard API response envelope for all v3 endpoints
|
|
300
337
|
*/
|
|
301
|
-
export interface
|
|
338
|
+
export interface CampaignUpdateResponse {
|
|
302
339
|
/**
|
|
303
|
-
*
|
|
340
|
+
* A 10DLC campaign registered for a brand.
|
|
304
341
|
*/
|
|
305
|
-
|
|
342
|
+
data?: CampaignUpdateResponse.Data | null;
|
|
306
343
|
|
|
307
344
|
/**
|
|
308
|
-
*
|
|
345
|
+
* Error information
|
|
309
346
|
*/
|
|
310
|
-
|
|
347
|
+
error?: CampaignUpdateResponse.Error | null;
|
|
311
348
|
|
|
312
349
|
/**
|
|
313
|
-
*
|
|
350
|
+
* Request and response metadata
|
|
314
351
|
*/
|
|
315
|
-
|
|
352
|
+
meta?: CampaignUpdateResponse.Meta;
|
|
316
353
|
|
|
317
354
|
/**
|
|
318
|
-
*
|
|
355
|
+
* Indicates whether the request was successful
|
|
319
356
|
*/
|
|
320
|
-
|
|
357
|
+
success?: boolean;
|
|
358
|
+
}
|
|
321
359
|
|
|
360
|
+
export namespace CampaignUpdateResponse {
|
|
322
361
|
/**
|
|
323
|
-
*
|
|
362
|
+
* A 10DLC campaign registered for a brand.
|
|
324
363
|
*/
|
|
325
|
-
|
|
364
|
+
export interface Data {
|
|
365
|
+
id?: string;
|
|
326
366
|
|
|
327
|
-
|
|
328
|
-
* Message sent when user requests help
|
|
329
|
-
*/
|
|
330
|
-
helpMessage?: string | null;
|
|
367
|
+
billedDate?: string | null;
|
|
331
368
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
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;
|
|
395
|
+
|
|
396
|
+
messageFlow?: string | null;
|
|
397
|
+
|
|
398
|
+
name?: string;
|
|
399
|
+
|
|
400
|
+
optinKeywords?: string | null;
|
|
401
|
+
|
|
402
|
+
optinMessage?: string | null;
|
|
403
|
+
|
|
404
|
+
optoutKeywords?: string | null;
|
|
405
|
+
|
|
406
|
+
optoutMessage?: string | null;
|
|
407
|
+
|
|
408
|
+
privacyPolicyLink?: string | null;
|
|
409
|
+
|
|
410
|
+
status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
|
|
411
|
+
|
|
412
|
+
submittedAt?: string | null;
|
|
413
|
+
|
|
414
|
+
submittedToTCR?: boolean;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* The Campaign Registry identifier, once the campaign has been accepted.
|
|
418
|
+
*/
|
|
419
|
+
tcrCampaignId?: string | null;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Surfaced so customers can see why a submission did not reach the registry.
|
|
423
|
+
*/
|
|
424
|
+
tcrSyncError?: string | null;
|
|
425
|
+
|
|
426
|
+
termsAndConditionsLink?: string | null;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Campaign type (for example KYC or App).
|
|
430
|
+
*/
|
|
431
|
+
type?: string;
|
|
432
|
+
|
|
433
|
+
updatedAt?: string | null;
|
|
434
|
+
|
|
435
|
+
useCases?: Array<Data.UseCase>;
|
|
436
|
+
|
|
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
|
+
}
|
|
445
|
+
|
|
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;
|
|
459
|
+
|
|
460
|
+
campaignId?: string;
|
|
461
|
+
|
|
462
|
+
createdAt?: string;
|
|
463
|
+
|
|
464
|
+
customerId?: string;
|
|
465
|
+
|
|
466
|
+
messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Sample messages submitted to the registry for this use case.
|
|
470
|
+
*/
|
|
471
|
+
sampleMessages?: Array<string>;
|
|
472
|
+
|
|
473
|
+
updatedAt?: string | null;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
336
476
|
|
|
337
477
|
/**
|
|
338
|
-
*
|
|
478
|
+
* Error information
|
|
339
479
|
*/
|
|
340
|
-
|
|
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
|
+
}
|
|
341
501
|
|
|
342
502
|
/**
|
|
343
|
-
*
|
|
503
|
+
* Request and response metadata
|
|
344
504
|
*/
|
|
345
|
-
|
|
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
|
+
}
|
|
521
|
+
}
|
|
346
522
|
|
|
523
|
+
/**
|
|
524
|
+
* Standard API response envelope for all v3 endpoints
|
|
525
|
+
*/
|
|
526
|
+
export interface CampaignListResponse {
|
|
347
527
|
/**
|
|
348
|
-
*
|
|
528
|
+
* The response data (null if error)
|
|
349
529
|
*/
|
|
350
|
-
|
|
530
|
+
data?: Array<CampaignListResponse.Data> | null;
|
|
351
531
|
|
|
352
532
|
/**
|
|
353
|
-
*
|
|
533
|
+
* Error information
|
|
354
534
|
*/
|
|
355
|
-
|
|
535
|
+
error?: CampaignListResponse.Error | null;
|
|
356
536
|
|
|
357
537
|
/**
|
|
358
|
-
*
|
|
538
|
+
* Request and response metadata
|
|
359
539
|
*/
|
|
360
|
-
|
|
540
|
+
meta?: CampaignListResponse.Meta;
|
|
361
541
|
|
|
362
542
|
/**
|
|
363
|
-
*
|
|
543
|
+
* Indicates whether the request was successful
|
|
364
544
|
*/
|
|
365
|
-
|
|
545
|
+
success?: boolean;
|
|
546
|
+
}
|
|
366
547
|
|
|
548
|
+
export namespace CampaignListResponse {
|
|
367
549
|
/**
|
|
368
|
-
*
|
|
369
|
-
* "5000"). Values below 2000 bill at the low-volume tier.
|
|
550
|
+
* A 10DLC campaign registered for a brand.
|
|
370
551
|
*/
|
|
371
|
-
|
|
372
|
-
|
|
552
|
+
export interface Data {
|
|
553
|
+
id?: string;
|
|
373
554
|
|
|
374
|
-
|
|
375
|
-
* Customer-facing use-case representation for the public v3 campaign contract.
|
|
376
|
-
* Exists for the same reason as BrandCampaignV3Response: nesting the
|
|
377
|
-
* TcrCampaignUseCase database entity in a public response means any column added
|
|
378
|
-
* to that table silently becomes part of the customer-facing contract. This DTO is
|
|
379
|
-
* an explicit allowlist, so a new column stays invisible until it is added here on
|
|
380
|
-
* purpose. This mirrors exactly the fields the entity already serialized, so it
|
|
381
|
-
* removes nothing from the current response shape. It only closes the future-leak
|
|
382
|
-
* path.
|
|
383
|
-
*/
|
|
384
|
-
export interface CampaignUseCase {
|
|
385
|
-
id?: string;
|
|
555
|
+
billedDate?: string | null;
|
|
386
556
|
|
|
387
|
-
|
|
557
|
+
brandId?: string | null;
|
|
388
558
|
|
|
389
|
-
|
|
559
|
+
cost?: number | null;
|
|
390
560
|
|
|
391
|
-
|
|
561
|
+
createdAt?: string;
|
|
392
562
|
|
|
393
|
-
|
|
563
|
+
customerId?: string;
|
|
394
564
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
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;
|
|
399
570
|
|
|
400
|
-
|
|
401
|
-
}
|
|
571
|
+
dcaElectionsCompletedAt?: string | null;
|
|
402
572
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
573
|
+
description?: string;
|
|
574
|
+
|
|
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;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Surfaced so customers can see why a submission did not reach the registry.
|
|
611
|
+
*/
|
|
612
|
+
tcrSyncError?: string | null;
|
|
613
|
+
|
|
614
|
+
termsAndConditionsLink?: string | null;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Campaign type (for example KYC or App).
|
|
618
|
+
*/
|
|
619
|
+
type?: string;
|
|
620
|
+
|
|
621
|
+
updatedAt?: string | null;
|
|
622
|
+
|
|
623
|
+
useCases?: Array<Data.UseCase>;
|
|
624
|
+
|
|
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
|
+
}
|
|
633
|
+
|
|
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;
|
|
647
|
+
|
|
648
|
+
campaignId?: string;
|
|
649
|
+
|
|
650
|
+
createdAt?: string;
|
|
651
|
+
|
|
652
|
+
customerId?: string;
|
|
653
|
+
|
|
654
|
+
messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Sample messages submitted to the registry for this use case.
|
|
658
|
+
*/
|
|
659
|
+
sampleMessages?: Array<string>;
|
|
660
|
+
|
|
661
|
+
updatedAt?: string | null;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
408
664
|
|
|
409
665
|
/**
|
|
410
|
-
*
|
|
666
|
+
* Error information
|
|
411
667
|
*/
|
|
412
|
-
|
|
413
|
-
|
|
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
|
+
}
|
|
414
689
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
690
|
+
/**
|
|
691
|
+
* Request and response metadata
|
|
692
|
+
*/
|
|
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
|
+
}
|
|
709
|
+
}
|
|
429
710
|
|
|
430
711
|
export interface CampaignCreateParams {
|
|
431
712
|
/**
|
|
432
713
|
* Body param: Campaign data for create or update operation
|
|
433
714
|
*/
|
|
434
|
-
campaign:
|
|
715
|
+
campaign: CampaignCreateParams.Campaign;
|
|
435
716
|
|
|
436
717
|
/**
|
|
437
718
|
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
@@ -454,6 +735,104 @@ export interface CampaignCreateParams {
|
|
|
454
735
|
'x-profile-id'?: string;
|
|
455
736
|
}
|
|
456
737
|
|
|
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
|
+
|
|
457
836
|
export interface CampaignUpdateParams {
|
|
458
837
|
/**
|
|
459
838
|
* Path param: Profile ID from route
|
|
@@ -463,7 +842,7 @@ export interface CampaignUpdateParams {
|
|
|
463
842
|
/**
|
|
464
843
|
* Body param: Campaign data for create or update operation
|
|
465
844
|
*/
|
|
466
|
-
campaign:
|
|
845
|
+
campaign: CampaignUpdateParams.Campaign;
|
|
467
846
|
|
|
468
847
|
/**
|
|
469
848
|
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
@@ -486,6 +865,104 @@ export interface CampaignUpdateParams {
|
|
|
486
865
|
'x-profile-id'?: string;
|
|
487
866
|
}
|
|
488
867
|
|
|
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
|
+
|
|
489
966
|
export interface CampaignListParams {
|
|
490
967
|
/**
|
|
491
968
|
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
@@ -516,13 +993,10 @@ export interface CampaignDeleteParams {
|
|
|
516
993
|
|
|
517
994
|
export declare namespace Campaigns {
|
|
518
995
|
export {
|
|
519
|
-
type APIResponseOfBrandCampaign as APIResponseOfBrandCampaign,
|
|
520
|
-
type APIResponseOfListOfBrandCampaign as APIResponseOfListOfBrandCampaign,
|
|
521
|
-
type BrandCampaign as BrandCampaign,
|
|
522
|
-
type CampaignData as CampaignData,
|
|
523
|
-
type CampaignUseCase as CampaignUseCase,
|
|
524
|
-
type CampaignUseCaseData as CampaignUseCaseData,
|
|
525
996
|
type MessagingUseCaseUs as MessagingUseCaseUs,
|
|
997
|
+
type CampaignCreateResponse as CampaignCreateResponse,
|
|
998
|
+
type CampaignUpdateResponse as CampaignUpdateResponse,
|
|
999
|
+
type CampaignListResponse as CampaignListResponse,
|
|
526
1000
|
type CampaignCreateParams as CampaignCreateParams,
|
|
527
1001
|
type CampaignUpdateParams as CampaignUpdateParams,
|
|
528
1002
|
type CampaignListParams as CampaignListParams,
|