@sentdm/sentdm 0.25.3 → 0.26.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 +22 -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/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +3 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +3 -2
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +488 -68
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +488 -68
- 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 +113 -40
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +113 -40
- 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 +130 -9
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +130 -9
- 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 +42 -3
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +42 -3
- 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 +480 -147
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +480 -147
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +39 -41
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +39 -41
- 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 +1699 -391
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +1699 -391
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +3 -6
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +3 -6
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +993 -172
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +993 -172
- 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 +373 -46
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +373 -46
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -7
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -7
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +624 -110
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +624 -110
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +6 -7
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +6 -7
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +33 -68
- package/src/internal/utils/log.ts +2 -1
- package/src/resources/contacts.ts +567 -66
- package/src/resources/index.ts +17 -34
- package/src/resources/me.ts +132 -51
- package/src/resources/messages.ts +147 -9
- package/src/resources/numbers.ts +47 -3
- package/src/resources/profiles/campaigns.ts +668 -169
- package/src/resources/profiles/index.ts +5 -17
- package/src/resources/profiles/profiles.ts +2278 -545
- package/src/resources/templates.ts +1261 -206
- package/src/resources/users.ts +430 -47
- package/src/resources/webhooks.ts +742 -120
- 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,6 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as CampaignsAPI from "./campaigns.js";
|
|
3
|
-
import * as WebhooksAPI from "../webhooks.js";
|
|
4
2
|
import { APIPromise } from "../../core/api-promise.js";
|
|
5
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
4
|
/**
|
|
@@ -13,61 +11,59 @@ export declare class Campaigns extends APIResource {
|
|
|
13
11
|
*
|
|
14
12
|
* @example
|
|
15
13
|
* ```ts
|
|
16
|
-
* const
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* {
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* ],
|
|
34
|
-
* },
|
|
14
|
+
* const campaign = await client.profiles.campaigns.create(
|
|
15
|
+
* '770e8400-e29b-41d4-a716-446655440002',
|
|
16
|
+
* {
|
|
17
|
+
* campaign: {
|
|
18
|
+
* description:
|
|
19
|
+
* 'Appointment reminders and account notifications',
|
|
20
|
+
* name: 'Customer Notifications',
|
|
21
|
+
* type: 'App',
|
|
22
|
+
* useCases: [
|
|
23
|
+
* {
|
|
24
|
+
* messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
|
|
25
|
+
* sampleMessages: [
|
|
26
|
+
* 'Hi {name}, your appointment is confirmed for {date} at {time}.',
|
|
27
|
+
* 'Your order #{order_id} has been shipped. Track at {url}',
|
|
28
|
+
* ],
|
|
29
|
+
* },
|
|
30
|
+
* ],
|
|
35
31
|
* },
|
|
36
|
-
*
|
|
32
|
+
* },
|
|
33
|
+
* );
|
|
37
34
|
* ```
|
|
38
35
|
*/
|
|
39
|
-
create(profileID: string, params: CampaignCreateParams, options?: RequestOptions): APIPromise<
|
|
36
|
+
create(profileID: string, params: CampaignCreateParams, options?: RequestOptions): APIPromise<CampaignCreateResponse>;
|
|
40
37
|
/**
|
|
41
38
|
* Updates an existing campaign under the brand of the specified profile. Cannot
|
|
42
39
|
* update campaigns that have already been submitted to TCR.
|
|
43
40
|
*
|
|
44
41
|
* @example
|
|
45
42
|
* ```ts
|
|
46
|
-
* const
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* ],
|
|
65
|
-
* },
|
|
43
|
+
* const campaign = await client.profiles.campaigns.update(
|
|
44
|
+
* 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
|
|
45
|
+
* {
|
|
46
|
+
* profileId: '770e8400-e29b-41d4-a716-446655440002',
|
|
47
|
+
* campaign: {
|
|
48
|
+
* description:
|
|
49
|
+
* 'Updated appointment reminders and account notifications',
|
|
50
|
+
* name: 'Customer Notifications Updated',
|
|
51
|
+
* type: 'App',
|
|
52
|
+
* useCases: [
|
|
53
|
+
* {
|
|
54
|
+
* messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
|
|
55
|
+
* sampleMessages: [
|
|
56
|
+
* 'Hi {name}, your appointment is confirmed for {date} at {time}.',
|
|
57
|
+
* 'Your order #{order_id} has been shipped. Track at {url}',
|
|
58
|
+
* ],
|
|
59
|
+
* },
|
|
60
|
+
* ],
|
|
66
61
|
* },
|
|
67
|
-
*
|
|
62
|
+
* },
|
|
63
|
+
* );
|
|
68
64
|
* ```
|
|
69
65
|
*/
|
|
70
|
-
update(campaignID: string, params: CampaignUpdateParams, options?: RequestOptions): APIPromise<
|
|
66
|
+
update(campaignID: string, params: CampaignUpdateParams, options?: RequestOptions): APIPromise<CampaignUpdateResponse>;
|
|
71
67
|
/**
|
|
72
68
|
* Retrieves all campaigns linked to the profile's brand, including use cases and
|
|
73
69
|
* sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
|
|
@@ -97,136 +93,237 @@ export declare class Campaigns extends APIResource {
|
|
|
97
93
|
/**
|
|
98
94
|
* Standard API response envelope for all v3 endpoints
|
|
99
95
|
*/
|
|
100
|
-
export interface
|
|
96
|
+
export interface CampaignCreateResponse {
|
|
101
97
|
/**
|
|
102
98
|
* The response data (null if error)
|
|
103
99
|
*/
|
|
104
|
-
data?:
|
|
100
|
+
data?: CampaignCreateResponse.Data | null;
|
|
105
101
|
/**
|
|
106
102
|
* Error information
|
|
107
103
|
*/
|
|
108
|
-
error?:
|
|
104
|
+
error?: CampaignCreateResponse.Error | null;
|
|
109
105
|
/**
|
|
110
106
|
* Request and response metadata
|
|
111
107
|
*/
|
|
112
|
-
meta?:
|
|
108
|
+
meta?: CampaignCreateResponse.Meta;
|
|
113
109
|
/**
|
|
114
110
|
* Indicates whether the request was successful
|
|
115
111
|
*/
|
|
116
112
|
success?: boolean;
|
|
117
113
|
}
|
|
118
|
-
export
|
|
119
|
-
/**
|
|
120
|
-
* Unique identifier
|
|
121
|
-
*/
|
|
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 {
|
|
130
|
-
/**
|
|
131
|
-
* Campaign description
|
|
132
|
-
*/
|
|
133
|
-
description: string;
|
|
134
|
-
/**
|
|
135
|
-
* Campaign name
|
|
136
|
-
*/
|
|
137
|
-
name: string;
|
|
138
|
-
/**
|
|
139
|
-
* Campaign type (e.g., "KYC", "App")
|
|
140
|
-
*/
|
|
141
|
-
type: string;
|
|
142
|
-
/**
|
|
143
|
-
* List of use cases with sample messages
|
|
144
|
-
*/
|
|
145
|
-
useCases: Array<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData>;
|
|
114
|
+
export declare namespace CampaignCreateResponse {
|
|
146
115
|
/**
|
|
147
|
-
*
|
|
116
|
+
* The response data (null if error)
|
|
148
117
|
*/
|
|
149
|
-
|
|
118
|
+
interface Data {
|
|
119
|
+
/**
|
|
120
|
+
* Unique identifier
|
|
121
|
+
*/
|
|
122
|
+
id?: string;
|
|
123
|
+
billedDate?: string | null;
|
|
124
|
+
brandId?: string | null;
|
|
125
|
+
cost?: number | null;
|
|
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
|
+
}
|
|
150
170
|
/**
|
|
151
|
-
*
|
|
171
|
+
* Error information
|
|
152
172
|
*/
|
|
153
|
-
|
|
173
|
+
interface Error {
|
|
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
|
+
}
|
|
154
193
|
/**
|
|
155
|
-
*
|
|
194
|
+
* Request and response metadata
|
|
156
195
|
*/
|
|
157
|
-
|
|
196
|
+
interface Meta {
|
|
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 {
|
|
158
215
|
/**
|
|
159
|
-
*
|
|
216
|
+
* The response data (null if error)
|
|
160
217
|
*/
|
|
161
|
-
|
|
218
|
+
data?: CampaignUpdateResponse.Data | null;
|
|
162
219
|
/**
|
|
163
|
-
*
|
|
220
|
+
* Error information
|
|
164
221
|
*/
|
|
165
|
-
|
|
222
|
+
error?: CampaignUpdateResponse.Error | null;
|
|
166
223
|
/**
|
|
167
|
-
*
|
|
224
|
+
* Request and response metadata
|
|
168
225
|
*/
|
|
169
|
-
|
|
226
|
+
meta?: CampaignUpdateResponse.Meta;
|
|
170
227
|
/**
|
|
171
|
-
*
|
|
228
|
+
* Indicates whether the request was successful
|
|
172
229
|
*/
|
|
173
|
-
|
|
230
|
+
success?: boolean;
|
|
231
|
+
}
|
|
232
|
+
export declare namespace CampaignUpdateResponse {
|
|
174
233
|
/**
|
|
175
|
-
*
|
|
234
|
+
* The response data (null if error)
|
|
176
235
|
*/
|
|
177
|
-
|
|
236
|
+
interface Data {
|
|
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
|
+
}
|
|
178
288
|
/**
|
|
179
|
-
*
|
|
289
|
+
* Error information
|
|
180
290
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
291
|
+
interface Error {
|
|
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
|
+
}
|
|
189
311
|
/**
|
|
190
|
-
*
|
|
312
|
+
* Request and response metadata
|
|
191
313
|
*/
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
name?: string;
|
|
206
|
-
optinKeywords?: string | null;
|
|
207
|
-
optinMessage?: string | null;
|
|
208
|
-
optoutKeywords?: string | null;
|
|
209
|
-
optoutMessage?: string | null;
|
|
210
|
-
privacyPolicyLink?: string | null;
|
|
211
|
-
resellerId?: string | null;
|
|
212
|
-
sharingStatus?: 'PENDING' | 'ACCEPTED' | 'DECLINED' | null;
|
|
213
|
-
status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
|
|
214
|
-
submittedAt?: string | null;
|
|
215
|
-
submittedToTCR?: boolean;
|
|
216
|
-
tcrCampaignId?: string | null;
|
|
217
|
-
tcrSyncError?: string | null;
|
|
218
|
-
telnyxCampaignId?: string | null;
|
|
219
|
-
termsAndConditionsLink?: string | null;
|
|
220
|
-
type?: string;
|
|
221
|
-
upstreamCnpId?: string | null;
|
|
222
|
-
useCases?: Array<TcrCampaignWithUseCases.UseCase>;
|
|
223
|
-
}
|
|
224
|
-
export declare namespace TcrCampaignWithUseCases {
|
|
225
|
-
interface UseCase extends CampaignsAPI.BaseDto {
|
|
226
|
-
campaignId?: string;
|
|
227
|
-
customerId?: string;
|
|
228
|
-
messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
|
|
229
|
-
sampleMessages?: Array<string>;
|
|
314
|
+
interface Meta {
|
|
315
|
+
/**
|
|
316
|
+
* Unique identifier for this request (for tracing and support)
|
|
317
|
+
*/
|
|
318
|
+
request_id?: string;
|
|
319
|
+
/**
|
|
320
|
+
* Server timestamp when the response was generated
|
|
321
|
+
*/
|
|
322
|
+
timestamp?: string;
|
|
323
|
+
/**
|
|
324
|
+
* API version used for this request
|
|
325
|
+
*/
|
|
326
|
+
version?: string;
|
|
230
327
|
}
|
|
231
328
|
}
|
|
232
329
|
/**
|
|
@@ -236,25 +333,119 @@ export interface CampaignListResponse {
|
|
|
236
333
|
/**
|
|
237
334
|
* The response data (null if error)
|
|
238
335
|
*/
|
|
239
|
-
data?: Array<
|
|
336
|
+
data?: Array<CampaignListResponse.Data> | null;
|
|
240
337
|
/**
|
|
241
338
|
* Error information
|
|
242
339
|
*/
|
|
243
|
-
error?:
|
|
340
|
+
error?: CampaignListResponse.Error | null;
|
|
244
341
|
/**
|
|
245
342
|
* Request and response metadata
|
|
246
343
|
*/
|
|
247
|
-
meta?:
|
|
344
|
+
meta?: CampaignListResponse.Meta;
|
|
248
345
|
/**
|
|
249
346
|
* Indicates whether the request was successful
|
|
250
347
|
*/
|
|
251
348
|
success?: boolean;
|
|
252
349
|
}
|
|
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
|
+
}
|
|
253
444
|
export interface CampaignCreateParams {
|
|
254
445
|
/**
|
|
255
446
|
* Body param: Campaign data for create or update operation
|
|
256
447
|
*/
|
|
257
|
-
campaign:
|
|
448
|
+
campaign: CampaignCreateParams.Campaign;
|
|
258
449
|
/**
|
|
259
450
|
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
260
451
|
* effects Useful for testing integrations without actual execution
|
|
@@ -273,6 +464,77 @@ export interface CampaignCreateParams {
|
|
|
273
464
|
*/
|
|
274
465
|
'x-profile-id'?: string;
|
|
275
466
|
}
|
|
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
|
+
}
|
|
276
538
|
export interface CampaignUpdateParams {
|
|
277
539
|
/**
|
|
278
540
|
* Path param: Profile ID from route
|
|
@@ -281,7 +543,7 @@ export interface CampaignUpdateParams {
|
|
|
281
543
|
/**
|
|
282
544
|
* Body param: Campaign data for create or update operation
|
|
283
545
|
*/
|
|
284
|
-
campaign:
|
|
546
|
+
campaign: CampaignUpdateParams.Campaign;
|
|
285
547
|
/**
|
|
286
548
|
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
287
549
|
* effects Useful for testing integrations without actual execution
|
|
@@ -300,6 +562,77 @@ export interface CampaignUpdateParams {
|
|
|
300
562
|
*/
|
|
301
563
|
'x-profile-id'?: string;
|
|
302
564
|
}
|
|
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
|
+
}
|
|
303
636
|
export interface CampaignListParams {
|
|
304
637
|
/**
|
|
305
638
|
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
@@ -325,6 +658,6 @@ export interface CampaignDeleteParams {
|
|
|
325
658
|
'x-profile-id'?: string;
|
|
326
659
|
}
|
|
327
660
|
export declare namespace Campaigns {
|
|
328
|
-
export { type
|
|
661
|
+
export { 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, };
|
|
329
662
|
}
|
|
330
663
|
//# sourceMappingURL=campaigns.d.ts.map
|