@sentdm/sentdm 0.26.0 → 0.27.2
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 +24 -0
- package/client.d.mts +12 -12
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -12
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +48 -486
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +48 -486
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +3 -3
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +3 -3
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.mts +6 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -6
- 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 +40 -113
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +40 -113
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +7 -126
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -126
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +3 -42
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +3 -42
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +149 -480
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +149 -480
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +41 -39
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +41 -39
- 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 +391 -1699
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +391 -1699
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +6 -3
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +6 -3
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +176 -993
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +176 -993
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +3 -3
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +3 -3
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +46 -373
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -373
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +7 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +7 -3
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +110 -624
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +110 -624
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +7 -6
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +7 -6
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +68 -33
- package/src/resources/contacts.ts +49 -566
- package/src/resources/index.ts +34 -17
- package/src/resources/me.ts +51 -132
- package/src/resources/messages.ts +7 -141
- package/src/resources/numbers.ts +3 -47
- package/src/resources/profiles/campaigns.ts +172 -667
- package/src/resources/profiles/index.ts +17 -5
- package/src/resources/profiles/profiles.ts +549 -2282
- package/src/resources/templates.ts +206 -1256
- package/src/resources/users.ts +47 -430
- package/src/resources/webhooks.ts +120 -742
- 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,4 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as CampaignsAPI from "./campaigns.js";
|
|
3
|
+
import * as WebhooksAPI from "../webhooks.js";
|
|
2
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
3
5
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
6
|
/**
|
|
@@ -11,59 +13,61 @@ export declare class Campaigns extends APIResource {
|
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```ts
|
|
14
|
-
* const
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
16
|
+
* const apiResponseOfTcrCampaignWithUseCases =
|
|
17
|
+
* await client.profiles.campaigns.create(
|
|
18
|
+
* '770e8400-e29b-41d4-a716-446655440002',
|
|
19
|
+
* {
|
|
20
|
+
* campaign: {
|
|
21
|
+
* description:
|
|
22
|
+
* 'Appointment reminders and account notifications',
|
|
23
|
+
* name: 'Customer Notifications',
|
|
24
|
+
* type: 'App',
|
|
25
|
+
* useCases: [
|
|
26
|
+
* {
|
|
27
|
+
* messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
|
|
28
|
+
* sampleMessages: [
|
|
29
|
+
* 'Hi {name}, your appointment is confirmed for {date} at {time}.',
|
|
30
|
+
* 'Your order #{order_id} has been shipped. Track at {url}',
|
|
31
|
+
* ],
|
|
32
|
+
* },
|
|
33
|
+
* ],
|
|
34
|
+
* },
|
|
31
35
|
* },
|
|
32
|
-
*
|
|
33
|
-
* );
|
|
36
|
+
* );
|
|
34
37
|
* ```
|
|
35
38
|
*/
|
|
36
|
-
create(profileID: string, params: CampaignCreateParams, options?: RequestOptions): APIPromise<
|
|
39
|
+
create(profileID: string, params: CampaignCreateParams, options?: RequestOptions): APIPromise<APIResponseOfTcrCampaignWithUseCases>;
|
|
37
40
|
/**
|
|
38
41
|
* Updates an existing campaign under the brand of the specified profile. Cannot
|
|
39
42
|
* update campaigns that have already been submitted to TCR.
|
|
40
43
|
*
|
|
41
44
|
* @example
|
|
42
45
|
* ```ts
|
|
43
|
-
* const
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
46
|
+
* const apiResponseOfTcrCampaignWithUseCases =
|
|
47
|
+
* await client.profiles.campaigns.update(
|
|
48
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
|
|
49
|
+
* {
|
|
50
|
+
* profileId: '770e8400-e29b-41d4-a716-446655440002',
|
|
51
|
+
* campaign: {
|
|
52
|
+
* description:
|
|
53
|
+
* 'Updated appointment reminders and account notifications',
|
|
54
|
+
* name: 'Customer Notifications Updated',
|
|
55
|
+
* type: 'App',
|
|
56
|
+
* useCases: [
|
|
57
|
+
* {
|
|
58
|
+
* messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
|
|
59
|
+
* sampleMessages: [
|
|
60
|
+
* 'Hi {name}, your appointment is confirmed for {date} at {time}.',
|
|
61
|
+
* 'Your order #{order_id} has been shipped. Track at {url}',
|
|
62
|
+
* ],
|
|
63
|
+
* },
|
|
64
|
+
* ],
|
|
65
|
+
* },
|
|
61
66
|
* },
|
|
62
|
-
*
|
|
63
|
-
* );
|
|
67
|
+
* );
|
|
64
68
|
* ```
|
|
65
69
|
*/
|
|
66
|
-
update(campaignID: string, params: CampaignUpdateParams, options?: RequestOptions): APIPromise<
|
|
70
|
+
update(campaignID: string, params: CampaignUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfTcrCampaignWithUseCases>;
|
|
67
71
|
/**
|
|
68
72
|
* Retrieves all campaigns linked to the profile's brand, including use cases and
|
|
69
73
|
* sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
|
|
@@ -93,237 +97,138 @@ export declare class Campaigns extends APIResource {
|
|
|
93
97
|
/**
|
|
94
98
|
* Standard API response envelope for all v3 endpoints
|
|
95
99
|
*/
|
|
96
|
-
export interface
|
|
100
|
+
export interface APIResponseOfTcrCampaignWithUseCases {
|
|
97
101
|
/**
|
|
98
102
|
* The response data (null if error)
|
|
99
103
|
*/
|
|
100
|
-
data?:
|
|
104
|
+
data?: TcrCampaignWithUseCases | null;
|
|
101
105
|
/**
|
|
102
106
|
* Error information
|
|
103
107
|
*/
|
|
104
|
-
error?:
|
|
108
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
105
109
|
/**
|
|
106
110
|
* Request and response metadata
|
|
107
111
|
*/
|
|
108
|
-
meta?:
|
|
112
|
+
meta?: WebhooksAPI.APIMeta;
|
|
109
113
|
/**
|
|
110
114
|
* Indicates whether the request was successful
|
|
111
115
|
*/
|
|
112
116
|
success?: boolean;
|
|
113
117
|
}
|
|
114
|
-
export
|
|
118
|
+
export interface BaseDto {
|
|
115
119
|
/**
|
|
116
|
-
*
|
|
120
|
+
* Unique identifier
|
|
117
121
|
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
createdAt?: string;
|
|
127
|
-
cspId?: string | null;
|
|
128
|
-
customerId?: string;
|
|
129
|
-
dcaElectionsComplete?: boolean;
|
|
130
|
-
dcaElectionsCompletedAt?: string | null;
|
|
131
|
-
description?: string;
|
|
132
|
-
helpKeywords?: string | null;
|
|
133
|
-
helpMessage?: string | null;
|
|
134
|
-
kycSubmissionFormId?: string | null;
|
|
135
|
-
messageFlow?: string | null;
|
|
136
|
-
name?: string;
|
|
137
|
-
optinKeywords?: string | null;
|
|
138
|
-
optinMessage?: string | null;
|
|
139
|
-
optoutKeywords?: string | null;
|
|
140
|
-
optoutMessage?: string | null;
|
|
141
|
-
privacyPolicyLink?: string | null;
|
|
142
|
-
resellerId?: string | null;
|
|
143
|
-
sharingStatus?: 'PENDING' | 'ACCEPTED' | 'DECLINED' | null;
|
|
144
|
-
status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
|
|
145
|
-
submittedAt?: string | null;
|
|
146
|
-
submittedToTCR?: boolean;
|
|
147
|
-
tcrCampaignId?: string | null;
|
|
148
|
-
tcrSyncError?: string | null;
|
|
149
|
-
telnyxCampaignId?: string | null;
|
|
150
|
-
termsAndConditionsLink?: string | null;
|
|
151
|
-
type?: string;
|
|
152
|
-
updatedAt?: string | null;
|
|
153
|
-
upstreamCnpId?: string | null;
|
|
154
|
-
useCases?: Array<Data.UseCase>;
|
|
155
|
-
}
|
|
156
|
-
namespace Data {
|
|
157
|
-
interface UseCase {
|
|
158
|
-
/**
|
|
159
|
-
* Unique identifier
|
|
160
|
-
*/
|
|
161
|
-
id?: string;
|
|
162
|
-
campaignId?: string;
|
|
163
|
-
createdAt?: string;
|
|
164
|
-
customerId?: string;
|
|
165
|
-
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';
|
|
166
|
-
sampleMessages?: Array<string>;
|
|
167
|
-
updatedAt?: string | null;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
122
|
+
id?: string;
|
|
123
|
+
createdAt?: string;
|
|
124
|
+
updatedAt?: string | null;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Campaign data for create or update operation
|
|
128
|
+
*/
|
|
129
|
+
export interface CampaignData {
|
|
170
130
|
/**
|
|
171
|
-
*
|
|
131
|
+
* Campaign description
|
|
172
132
|
*/
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
176
|
-
*/
|
|
177
|
-
code?: string;
|
|
178
|
-
/**
|
|
179
|
-
* Additional validation error details (field-level errors)
|
|
180
|
-
*/
|
|
181
|
-
details?: {
|
|
182
|
-
[key: string]: Array<string>;
|
|
183
|
-
} | null;
|
|
184
|
-
/**
|
|
185
|
-
* URL to documentation about this error
|
|
186
|
-
*/
|
|
187
|
-
doc_url?: string | null;
|
|
188
|
-
/**
|
|
189
|
-
* Human-readable error message
|
|
190
|
-
*/
|
|
191
|
-
message?: string;
|
|
192
|
-
}
|
|
133
|
+
description: string;
|
|
193
134
|
/**
|
|
194
|
-
*
|
|
135
|
+
* Campaign name
|
|
195
136
|
*/
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Unique identifier for this request (for tracing and support)
|
|
199
|
-
*/
|
|
200
|
-
request_id?: string;
|
|
201
|
-
/**
|
|
202
|
-
* Server timestamp when the response was generated
|
|
203
|
-
*/
|
|
204
|
-
timestamp?: string;
|
|
205
|
-
/**
|
|
206
|
-
* API version used for this request
|
|
207
|
-
*/
|
|
208
|
-
version?: string;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Standard API response envelope for all v3 endpoints
|
|
213
|
-
*/
|
|
214
|
-
export interface CampaignUpdateResponse {
|
|
137
|
+
name: string;
|
|
215
138
|
/**
|
|
216
|
-
*
|
|
139
|
+
* Campaign type (e.g., "KYC", "App")
|
|
217
140
|
*/
|
|
218
|
-
|
|
141
|
+
type: string;
|
|
219
142
|
/**
|
|
220
|
-
*
|
|
143
|
+
* List of use cases with sample messages
|
|
221
144
|
*/
|
|
222
|
-
|
|
145
|
+
useCases: Array<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData>;
|
|
223
146
|
/**
|
|
224
|
-
*
|
|
147
|
+
* Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
|
|
225
148
|
*/
|
|
226
|
-
|
|
149
|
+
helpKeywords?: string | null;
|
|
227
150
|
/**
|
|
228
|
-
*
|
|
151
|
+
* Message sent when user requests help
|
|
229
152
|
*/
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
export declare namespace CampaignUpdateResponse {
|
|
153
|
+
helpMessage?: string | null;
|
|
233
154
|
/**
|
|
234
|
-
*
|
|
155
|
+
* Description of how messages flow in the campaign
|
|
235
156
|
*/
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Unique identifier
|
|
239
|
-
*/
|
|
240
|
-
id?: string;
|
|
241
|
-
billedDate?: string | null;
|
|
242
|
-
brandId?: string | null;
|
|
243
|
-
cost?: number | null;
|
|
244
|
-
createdAt?: string;
|
|
245
|
-
cspId?: string | null;
|
|
246
|
-
customerId?: string;
|
|
247
|
-
dcaElectionsComplete?: boolean;
|
|
248
|
-
dcaElectionsCompletedAt?: string | null;
|
|
249
|
-
description?: string;
|
|
250
|
-
helpKeywords?: string | null;
|
|
251
|
-
helpMessage?: string | null;
|
|
252
|
-
kycSubmissionFormId?: string | null;
|
|
253
|
-
messageFlow?: string | null;
|
|
254
|
-
name?: string;
|
|
255
|
-
optinKeywords?: string | null;
|
|
256
|
-
optinMessage?: string | null;
|
|
257
|
-
optoutKeywords?: string | null;
|
|
258
|
-
optoutMessage?: string | null;
|
|
259
|
-
privacyPolicyLink?: string | null;
|
|
260
|
-
resellerId?: string | null;
|
|
261
|
-
sharingStatus?: 'PENDING' | 'ACCEPTED' | 'DECLINED' | null;
|
|
262
|
-
status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
|
|
263
|
-
submittedAt?: string | null;
|
|
264
|
-
submittedToTCR?: boolean;
|
|
265
|
-
tcrCampaignId?: string | null;
|
|
266
|
-
tcrSyncError?: string | null;
|
|
267
|
-
telnyxCampaignId?: string | null;
|
|
268
|
-
termsAndConditionsLink?: string | null;
|
|
269
|
-
type?: string;
|
|
270
|
-
updatedAt?: string | null;
|
|
271
|
-
upstreamCnpId?: string | null;
|
|
272
|
-
useCases?: Array<Data.UseCase>;
|
|
273
|
-
}
|
|
274
|
-
namespace Data {
|
|
275
|
-
interface UseCase {
|
|
276
|
-
/**
|
|
277
|
-
* Unique identifier
|
|
278
|
-
*/
|
|
279
|
-
id?: string;
|
|
280
|
-
campaignId?: string;
|
|
281
|
-
createdAt?: string;
|
|
282
|
-
customerId?: string;
|
|
283
|
-
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';
|
|
284
|
-
sampleMessages?: Array<string>;
|
|
285
|
-
updatedAt?: string | null;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
157
|
+
messageFlow?: string | null;
|
|
288
158
|
/**
|
|
289
|
-
*
|
|
159
|
+
* Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
|
|
290
160
|
*/
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
294
|
-
*/
|
|
295
|
-
code?: string;
|
|
296
|
-
/**
|
|
297
|
-
* Additional validation error details (field-level errors)
|
|
298
|
-
*/
|
|
299
|
-
details?: {
|
|
300
|
-
[key: string]: Array<string>;
|
|
301
|
-
} | null;
|
|
302
|
-
/**
|
|
303
|
-
* URL to documentation about this error
|
|
304
|
-
*/
|
|
305
|
-
doc_url?: string | null;
|
|
306
|
-
/**
|
|
307
|
-
* Human-readable error message
|
|
308
|
-
*/
|
|
309
|
-
message?: string;
|
|
310
|
-
}
|
|
161
|
+
optinKeywords?: string | null;
|
|
311
162
|
/**
|
|
312
|
-
*
|
|
163
|
+
* Message sent when user opts in
|
|
164
|
+
*/
|
|
165
|
+
optinMessage?: string | null;
|
|
166
|
+
/**
|
|
167
|
+
* Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
|
|
168
|
+
*/
|
|
169
|
+
optoutKeywords?: string | null;
|
|
170
|
+
/**
|
|
171
|
+
* Message sent when user opts out
|
|
172
|
+
*/
|
|
173
|
+
optoutMessage?: string | null;
|
|
174
|
+
/**
|
|
175
|
+
* URL to privacy policy
|
|
313
176
|
*/
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
177
|
+
privacyPolicyLink?: string | null;
|
|
178
|
+
/**
|
|
179
|
+
* URL to terms and conditions
|
|
180
|
+
*/
|
|
181
|
+
termsAndConditionsLink?: string | null;
|
|
182
|
+
}
|
|
183
|
+
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';
|
|
184
|
+
/**
|
|
185
|
+
* Campaign use case with sample messages
|
|
186
|
+
*/
|
|
187
|
+
export interface SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData {
|
|
188
|
+
messagingUseCaseUs: MessagingUseCaseUs;
|
|
189
|
+
/**
|
|
190
|
+
* Sample messages for this use case (1-5 messages, max 1024 characters each)
|
|
191
|
+
*/
|
|
192
|
+
sampleMessages: Array<string>;
|
|
193
|
+
}
|
|
194
|
+
export interface TcrCampaignWithUseCases extends BaseDto {
|
|
195
|
+
billedDate?: string | null;
|
|
196
|
+
brandId?: string | null;
|
|
197
|
+
cost?: number | null;
|
|
198
|
+
cspId?: string | null;
|
|
199
|
+
customerId?: string;
|
|
200
|
+
dcaElectionsComplete?: boolean;
|
|
201
|
+
dcaElectionsCompletedAt?: string | null;
|
|
202
|
+
description?: string;
|
|
203
|
+
helpKeywords?: string | null;
|
|
204
|
+
helpMessage?: string | null;
|
|
205
|
+
kycSubmissionFormId?: string | null;
|
|
206
|
+
messageFlow?: string | null;
|
|
207
|
+
name?: string;
|
|
208
|
+
optinKeywords?: string | null;
|
|
209
|
+
optinMessage?: string | null;
|
|
210
|
+
optoutKeywords?: string | null;
|
|
211
|
+
optoutMessage?: string | null;
|
|
212
|
+
privacyPolicyLink?: string | null;
|
|
213
|
+
resellerId?: string | null;
|
|
214
|
+
sharingStatus?: 'PENDING' | 'ACCEPTED' | 'DECLINED' | null;
|
|
215
|
+
status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
|
|
216
|
+
submittedAt?: string | null;
|
|
217
|
+
submittedToTCR?: boolean;
|
|
218
|
+
tcrCampaignId?: string | null;
|
|
219
|
+
tcrSyncError?: string | null;
|
|
220
|
+
telnyxCampaignId?: string | null;
|
|
221
|
+
termsAndConditionsLink?: string | null;
|
|
222
|
+
type?: string;
|
|
223
|
+
upstreamCnpId?: string | null;
|
|
224
|
+
useCases?: Array<TcrCampaignWithUseCases.UseCase>;
|
|
225
|
+
}
|
|
226
|
+
export declare namespace TcrCampaignWithUseCases {
|
|
227
|
+
interface UseCase extends CampaignsAPI.BaseDto {
|
|
228
|
+
campaignId?: string;
|
|
229
|
+
customerId?: string;
|
|
230
|
+
messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
|
|
231
|
+
sampleMessages?: Array<string>;
|
|
327
232
|
}
|
|
328
233
|
}
|
|
329
234
|
/**
|
|
@@ -333,119 +238,25 @@ export interface CampaignListResponse {
|
|
|
333
238
|
/**
|
|
334
239
|
* The response data (null if error)
|
|
335
240
|
*/
|
|
336
|
-
data?: Array<
|
|
241
|
+
data?: Array<TcrCampaignWithUseCases> | null;
|
|
337
242
|
/**
|
|
338
243
|
* Error information
|
|
339
244
|
*/
|
|
340
|
-
error?:
|
|
245
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
341
246
|
/**
|
|
342
247
|
* Request and response metadata
|
|
343
248
|
*/
|
|
344
|
-
meta?:
|
|
249
|
+
meta?: WebhooksAPI.APIMeta;
|
|
345
250
|
/**
|
|
346
251
|
* Indicates whether the request was successful
|
|
347
252
|
*/
|
|
348
253
|
success?: boolean;
|
|
349
254
|
}
|
|
350
|
-
export declare namespace CampaignListResponse {
|
|
351
|
-
interface Data {
|
|
352
|
-
/**
|
|
353
|
-
* Unique identifier
|
|
354
|
-
*/
|
|
355
|
-
id?: string;
|
|
356
|
-
billedDate?: string | null;
|
|
357
|
-
brandId?: string | null;
|
|
358
|
-
cost?: number | null;
|
|
359
|
-
createdAt?: string;
|
|
360
|
-
cspId?: string | null;
|
|
361
|
-
customerId?: string;
|
|
362
|
-
dcaElectionsComplete?: boolean;
|
|
363
|
-
dcaElectionsCompletedAt?: string | null;
|
|
364
|
-
description?: string;
|
|
365
|
-
helpKeywords?: string | null;
|
|
366
|
-
helpMessage?: string | null;
|
|
367
|
-
kycSubmissionFormId?: string | null;
|
|
368
|
-
messageFlow?: string | null;
|
|
369
|
-
name?: string;
|
|
370
|
-
optinKeywords?: string | null;
|
|
371
|
-
optinMessage?: string | null;
|
|
372
|
-
optoutKeywords?: string | null;
|
|
373
|
-
optoutMessage?: string | null;
|
|
374
|
-
privacyPolicyLink?: string | null;
|
|
375
|
-
resellerId?: string | null;
|
|
376
|
-
sharingStatus?: 'PENDING' | 'ACCEPTED' | 'DECLINED' | null;
|
|
377
|
-
status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
|
|
378
|
-
submittedAt?: string | null;
|
|
379
|
-
submittedToTCR?: boolean;
|
|
380
|
-
tcrCampaignId?: string | null;
|
|
381
|
-
tcrSyncError?: string | null;
|
|
382
|
-
telnyxCampaignId?: string | null;
|
|
383
|
-
termsAndConditionsLink?: string | null;
|
|
384
|
-
type?: string;
|
|
385
|
-
updatedAt?: string | null;
|
|
386
|
-
upstreamCnpId?: string | null;
|
|
387
|
-
useCases?: Array<Data.UseCase>;
|
|
388
|
-
}
|
|
389
|
-
namespace Data {
|
|
390
|
-
interface UseCase {
|
|
391
|
-
/**
|
|
392
|
-
* Unique identifier
|
|
393
|
-
*/
|
|
394
|
-
id?: string;
|
|
395
|
-
campaignId?: string;
|
|
396
|
-
createdAt?: string;
|
|
397
|
-
customerId?: string;
|
|
398
|
-
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';
|
|
399
|
-
sampleMessages?: Array<string>;
|
|
400
|
-
updatedAt?: string | null;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* Error information
|
|
405
|
-
*/
|
|
406
|
-
interface Error {
|
|
407
|
-
/**
|
|
408
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
409
|
-
*/
|
|
410
|
-
code?: string;
|
|
411
|
-
/**
|
|
412
|
-
* Additional validation error details (field-level errors)
|
|
413
|
-
*/
|
|
414
|
-
details?: {
|
|
415
|
-
[key: string]: Array<string>;
|
|
416
|
-
} | null;
|
|
417
|
-
/**
|
|
418
|
-
* URL to documentation about this error
|
|
419
|
-
*/
|
|
420
|
-
doc_url?: string | null;
|
|
421
|
-
/**
|
|
422
|
-
* Human-readable error message
|
|
423
|
-
*/
|
|
424
|
-
message?: string;
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Request and response metadata
|
|
428
|
-
*/
|
|
429
|
-
interface Meta {
|
|
430
|
-
/**
|
|
431
|
-
* Unique identifier for this request (for tracing and support)
|
|
432
|
-
*/
|
|
433
|
-
request_id?: string;
|
|
434
|
-
/**
|
|
435
|
-
* Server timestamp when the response was generated
|
|
436
|
-
*/
|
|
437
|
-
timestamp?: string;
|
|
438
|
-
/**
|
|
439
|
-
* API version used for this request
|
|
440
|
-
*/
|
|
441
|
-
version?: string;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
255
|
export interface CampaignCreateParams {
|
|
445
256
|
/**
|
|
446
257
|
* Body param: Campaign data for create or update operation
|
|
447
258
|
*/
|
|
448
|
-
campaign:
|
|
259
|
+
campaign: CampaignData;
|
|
449
260
|
/**
|
|
450
261
|
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
451
262
|
* effects Useful for testing integrations without actual execution
|
|
@@ -464,77 +275,6 @@ export interface CampaignCreateParams {
|
|
|
464
275
|
*/
|
|
465
276
|
'x-profile-id'?: string;
|
|
466
277
|
}
|
|
467
|
-
export declare namespace CampaignCreateParams {
|
|
468
|
-
/**
|
|
469
|
-
* Campaign data for create or update operation
|
|
470
|
-
*/
|
|
471
|
-
interface Campaign {
|
|
472
|
-
/**
|
|
473
|
-
* Campaign description
|
|
474
|
-
*/
|
|
475
|
-
description: string;
|
|
476
|
-
/**
|
|
477
|
-
* Campaign name
|
|
478
|
-
*/
|
|
479
|
-
name: string;
|
|
480
|
-
/**
|
|
481
|
-
* Campaign type (e.g., "KYC", "App")
|
|
482
|
-
*/
|
|
483
|
-
type: string;
|
|
484
|
-
/**
|
|
485
|
-
* List of use cases with sample messages
|
|
486
|
-
*/
|
|
487
|
-
useCases: Array<Campaign.UseCase>;
|
|
488
|
-
/**
|
|
489
|
-
* Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
|
|
490
|
-
*/
|
|
491
|
-
helpKeywords?: string | null;
|
|
492
|
-
/**
|
|
493
|
-
* Message sent when user requests help
|
|
494
|
-
*/
|
|
495
|
-
helpMessage?: string | null;
|
|
496
|
-
/**
|
|
497
|
-
* Description of how messages flow in the campaign
|
|
498
|
-
*/
|
|
499
|
-
messageFlow?: string | null;
|
|
500
|
-
/**
|
|
501
|
-
* Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
|
|
502
|
-
*/
|
|
503
|
-
optinKeywords?: string | null;
|
|
504
|
-
/**
|
|
505
|
-
* Message sent when user opts in
|
|
506
|
-
*/
|
|
507
|
-
optinMessage?: string | null;
|
|
508
|
-
/**
|
|
509
|
-
* Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
|
|
510
|
-
*/
|
|
511
|
-
optoutKeywords?: string | null;
|
|
512
|
-
/**
|
|
513
|
-
* Message sent when user opts out
|
|
514
|
-
*/
|
|
515
|
-
optoutMessage?: string | null;
|
|
516
|
-
/**
|
|
517
|
-
* URL to privacy policy
|
|
518
|
-
*/
|
|
519
|
-
privacyPolicyLink?: string | null;
|
|
520
|
-
/**
|
|
521
|
-
* URL to terms and conditions
|
|
522
|
-
*/
|
|
523
|
-
termsAndConditionsLink?: string | null;
|
|
524
|
-
}
|
|
525
|
-
namespace Campaign {
|
|
526
|
-
/**
|
|
527
|
-
* Campaign use case with sample messages
|
|
528
|
-
*/
|
|
529
|
-
interface UseCase {
|
|
530
|
-
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';
|
|
531
|
-
/**
|
|
532
|
-
* Sample messages for this use case (1-5 messages, max 1024 characters each)
|
|
533
|
-
*/
|
|
534
|
-
sampleMessages: Array<string>;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
278
|
export interface CampaignUpdateParams {
|
|
539
279
|
/**
|
|
540
280
|
* Path param: Profile ID from route
|
|
@@ -543,7 +283,7 @@ export interface CampaignUpdateParams {
|
|
|
543
283
|
/**
|
|
544
284
|
* Body param: Campaign data for create or update operation
|
|
545
285
|
*/
|
|
546
|
-
campaign:
|
|
286
|
+
campaign: CampaignData;
|
|
547
287
|
/**
|
|
548
288
|
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
549
289
|
* effects Useful for testing integrations without actual execution
|
|
@@ -562,77 +302,6 @@ export interface CampaignUpdateParams {
|
|
|
562
302
|
*/
|
|
563
303
|
'x-profile-id'?: string;
|
|
564
304
|
}
|
|
565
|
-
export declare namespace CampaignUpdateParams {
|
|
566
|
-
/**
|
|
567
|
-
* Campaign data for create or update operation
|
|
568
|
-
*/
|
|
569
|
-
interface Campaign {
|
|
570
|
-
/**
|
|
571
|
-
* Campaign description
|
|
572
|
-
*/
|
|
573
|
-
description: string;
|
|
574
|
-
/**
|
|
575
|
-
* Campaign name
|
|
576
|
-
*/
|
|
577
|
-
name: string;
|
|
578
|
-
/**
|
|
579
|
-
* Campaign type (e.g., "KYC", "App")
|
|
580
|
-
*/
|
|
581
|
-
type: string;
|
|
582
|
-
/**
|
|
583
|
-
* List of use cases with sample messages
|
|
584
|
-
*/
|
|
585
|
-
useCases: Array<Campaign.UseCase>;
|
|
586
|
-
/**
|
|
587
|
-
* Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
|
|
588
|
-
*/
|
|
589
|
-
helpKeywords?: string | null;
|
|
590
|
-
/**
|
|
591
|
-
* Message sent when user requests help
|
|
592
|
-
*/
|
|
593
|
-
helpMessage?: string | null;
|
|
594
|
-
/**
|
|
595
|
-
* Description of how messages flow in the campaign
|
|
596
|
-
*/
|
|
597
|
-
messageFlow?: string | null;
|
|
598
|
-
/**
|
|
599
|
-
* Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
|
|
600
|
-
*/
|
|
601
|
-
optinKeywords?: string | null;
|
|
602
|
-
/**
|
|
603
|
-
* Message sent when user opts in
|
|
604
|
-
*/
|
|
605
|
-
optinMessage?: string | null;
|
|
606
|
-
/**
|
|
607
|
-
* Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
|
|
608
|
-
*/
|
|
609
|
-
optoutKeywords?: string | null;
|
|
610
|
-
/**
|
|
611
|
-
* Message sent when user opts out
|
|
612
|
-
*/
|
|
613
|
-
optoutMessage?: string | null;
|
|
614
|
-
/**
|
|
615
|
-
* URL to privacy policy
|
|
616
|
-
*/
|
|
617
|
-
privacyPolicyLink?: string | null;
|
|
618
|
-
/**
|
|
619
|
-
* URL to terms and conditions
|
|
620
|
-
*/
|
|
621
|
-
termsAndConditionsLink?: string | null;
|
|
622
|
-
}
|
|
623
|
-
namespace Campaign {
|
|
624
|
-
/**
|
|
625
|
-
* Campaign use case with sample messages
|
|
626
|
-
*/
|
|
627
|
-
interface UseCase {
|
|
628
|
-
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';
|
|
629
|
-
/**
|
|
630
|
-
* Sample messages for this use case (1-5 messages, max 1024 characters each)
|
|
631
|
-
*/
|
|
632
|
-
sampleMessages: Array<string>;
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
305
|
export interface CampaignListParams {
|
|
637
306
|
/**
|
|
638
307
|
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
@@ -658,6 +327,6 @@ export interface CampaignDeleteParams {
|
|
|
658
327
|
'x-profile-id'?: string;
|
|
659
328
|
}
|
|
660
329
|
export declare namespace Campaigns {
|
|
661
|
-
export { type
|
|
330
|
+
export { type APIResponseOfTcrCampaignWithUseCases as APIResponseOfTcrCampaignWithUseCases, type BaseDto as BaseDto, type CampaignData as CampaignData, type MessagingUseCaseUs as MessagingUseCaseUs, type SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData as SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData, type TcrCampaignWithUseCases as TcrCampaignWithUseCases, type CampaignListResponse as CampaignListResponse, type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, type CampaignDeleteParams as CampaignDeleteParams, };
|
|
662
331
|
}
|
|
663
332
|
//# sourceMappingURL=campaigns.d.ts.map
|