@surgeapi/node 0.26.0 → 0.27.1
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 +44 -0
- package/client.d.mts +16 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -16
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- package/client.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +306 -191
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +306 -191
- package/resources/accounts.d.ts.map +1 -1
- package/resources/blasts.d.mts +11 -32
- package/resources/blasts.d.mts.map +1 -1
- package/resources/blasts.d.ts +11 -32
- package/resources/blasts.d.ts.map +1 -1
- package/resources/blasts.js.map +1 -1
- package/resources/blasts.mjs.map +1 -1
- package/resources/campaigns.d.mts +108 -201
- package/resources/campaigns.d.mts.map +1 -1
- package/resources/campaigns.d.ts +108 -201
- package/resources/campaigns.d.ts.map +1 -1
- package/resources/contacts.d.mts +1 -28
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +1 -28
- package/resources/contacts.d.ts.map +1 -1
- package/resources/index.d.mts +8 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +49 -81
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +49 -81
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +0 -30
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +0 -30
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/users.d.mts +1 -33
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +1 -33
- package/resources/users.d.ts.map +1 -1
- package/resources/verifications.d.mts +1 -19
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +1 -19
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +60 -41
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +60 -41
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +12 -43
- package/src/internal/to-file.ts +1 -1
- package/src/resources/accounts.ts +489 -284
- package/src/resources/blasts.ts +11 -42
- package/src/resources/campaigns.ts +121 -234
- package/src/resources/contacts.ts +0 -31
- package/src/resources/index.ts +8 -23
- package/src/resources/messages.ts +54 -99
- package/src/resources/phone-numbers.ts +0 -34
- package/src/resources/users.ts +0 -37
- package/src/resources/verifications.ts +1 -22
- package/src/resources/webhooks.ts +72 -39
- 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
package/src/resources/blasts.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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 MessagesAPI from './messages';
|
|
5
4
|
import { APIPromise } from '../core/api-promise';
|
|
6
5
|
import { RequestOptions } from '../internal/request-options';
|
|
7
6
|
import { path } from '../internal/utils/path';
|
|
@@ -58,11 +57,8 @@ export namespace Blast {
|
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
*/
|
|
64
|
-
export interface BlastParams {
|
|
65
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
60
|
+
export interface BlastCreateParams {
|
|
61
|
+
attachments?: Array<BlastCreateParams.Attachment>;
|
|
66
62
|
|
|
67
63
|
/**
|
|
68
64
|
* The message body.
|
|
@@ -96,45 +92,18 @@ export interface BlastParams {
|
|
|
96
92
|
to?: Array<string>;
|
|
97
93
|
}
|
|
98
94
|
|
|
99
|
-
export
|
|
100
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The message body.
|
|
104
|
-
*/
|
|
105
|
-
body?: string;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated Deprecated. Use `to` instead.
|
|
109
|
-
*/
|
|
110
|
-
contacts?: Array<string>;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Optional name for the blast.
|
|
114
|
-
*/
|
|
115
|
-
name?: string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @deprecated Deprecated. Use `to` instead.
|
|
119
|
-
*/
|
|
120
|
-
segments?: Array<string>;
|
|
121
|
-
|
|
95
|
+
export namespace BlastCreateParams {
|
|
122
96
|
/**
|
|
123
|
-
*
|
|
97
|
+
* Params for creating an attachment
|
|
124
98
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
to?: Array<string>;
|
|
99
|
+
export interface Attachment {
|
|
100
|
+
/**
|
|
101
|
+
* The URL of the attachment.
|
|
102
|
+
*/
|
|
103
|
+
url: string;
|
|
104
|
+
}
|
|
132
105
|
}
|
|
133
106
|
|
|
134
107
|
export declare namespace Blasts {
|
|
135
|
-
export {
|
|
136
|
-
type Blast as Blast,
|
|
137
|
-
type BlastParams as BlastParams,
|
|
138
|
-
type BlastCreateParams as BlastCreateParams,
|
|
139
|
-
};
|
|
108
|
+
export { type Blast as Blast, type BlastCreateParams as BlastCreateParams };
|
|
140
109
|
}
|
|
@@ -167,251 +167,138 @@ export interface Campaign {
|
|
|
167
167
|
terms_and_conditions_url?: string;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
export interface CampaignParams {
|
|
174
|
-
/**
|
|
175
|
-
* A string explaining the method through which end users will opt in to receive
|
|
176
|
-
* messages from the brand. Typically this should include URLs for opt-in forms or
|
|
177
|
-
* screenshots that might be helpful in explaining the flow to someone unfamiliar
|
|
178
|
-
* with the organization's purpose.
|
|
179
|
-
*/
|
|
180
|
-
consent_flow: string;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* An explanation of the organization's purpose and how it will be using text
|
|
184
|
-
* messaging to accomplish that purpose.
|
|
185
|
-
*/
|
|
186
|
-
description: string;
|
|
170
|
+
export type CampaignCreateParams =
|
|
171
|
+
| CampaignCreateParams.StandardCampaignParams
|
|
172
|
+
| CampaignCreateParams.ExternalCampaignParams;
|
|
187
173
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
message_samples: Array<string>;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* The URL of the privacy policy for the brand in question. This may be a shared
|
|
201
|
-
* privacy policy if it's the policy that is displayed to end users when they opt
|
|
202
|
-
* in to messaging.
|
|
203
|
-
*/
|
|
204
|
-
privacy_policy_url: string;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* A list containing 1-5 types of messages that will be sent with this campaign.
|
|
208
|
-
*
|
|
209
|
-
* The following use cases are typically available to all brands:
|
|
210
|
-
*
|
|
211
|
-
* - `account_notification` - For sending reminders, alerts, and general
|
|
212
|
-
* account-related notifications like booking confirmations or appointment
|
|
213
|
-
* reminders.
|
|
214
|
-
* - `customer_care` - For account support, troubleshooting, and general customer
|
|
215
|
-
* service communication.
|
|
216
|
-
* - `delivery_notification` - For notifying customers about the status of product
|
|
217
|
-
* or service deliveries.
|
|
218
|
-
* - `fraud_alert` - For warning customers about suspicious or potentially
|
|
219
|
-
* fraudulent activity.
|
|
220
|
-
* - `higher_education` - For messaging related to colleges, universities, and
|
|
221
|
-
* school districts outside of K–12.
|
|
222
|
-
* - `marketing` - For promotional or advertising messages intended to market
|
|
223
|
-
* products or services.
|
|
224
|
-
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
225
|
-
* - `public_service_announcement` - For raising awareness about social issues or
|
|
226
|
-
* important public information.
|
|
227
|
-
* - `security_alert` - For alerts related to potential security breaches or
|
|
228
|
-
* compromised systems requiring user action.
|
|
229
|
-
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
230
|
-
* codes for login or password reset.
|
|
231
|
-
*
|
|
232
|
-
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
233
|
-
*/
|
|
234
|
-
use_cases: Array<
|
|
235
|
-
| 'account_notification'
|
|
236
|
-
| 'customer_care'
|
|
237
|
-
| 'delivery_notification'
|
|
238
|
-
| 'fraud_alert'
|
|
239
|
-
| 'higher_education'
|
|
240
|
-
| 'marketing'
|
|
241
|
-
| 'polling_voting'
|
|
242
|
-
| 'public_service_announcement'
|
|
243
|
-
| 'security_alert'
|
|
244
|
-
| 'two_factor_authentication'
|
|
245
|
-
>;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* This will be one of the following:
|
|
249
|
-
*
|
|
250
|
-
* - `low` - The campaign will be allowed to send up to 2000 SMS segments to
|
|
251
|
-
* T-Mobile customers each day. In this case your platform will be charged for
|
|
252
|
-
* the setup fee for a low volume number upon receipt of the API request.
|
|
253
|
-
* - `high` - The campaign will be allowed to send up to 200k SMS segments to
|
|
254
|
-
* T-Mobile customers each day, depending on the trust score assigned by The
|
|
255
|
-
* Campaign Registry. Your platform will be charged for the setup fee for a high
|
|
256
|
-
* volume number upon receipt of the API request, and phone numbers will be
|
|
257
|
-
* charged as high volume numbers going forward.
|
|
258
|
-
*/
|
|
259
|
-
volume: 'high' | 'low';
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* A list of properties that this campaign should include. These properties can be
|
|
263
|
-
* any of the following values:
|
|
264
|
-
*
|
|
265
|
-
* - `links` - whether the campaign might send links in messages
|
|
266
|
-
* - `phone_numbers` - whether the campaign might send phone numbers in messages
|
|
267
|
-
* - `age_gated` - whether the campaign contains age gated content (controlled
|
|
268
|
-
* substances or adult content)
|
|
269
|
-
* - `direct_lending` - whether the campaign contains content related to direct
|
|
270
|
-
* lending or other loan arrangements
|
|
271
|
-
*/
|
|
272
|
-
includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* A sample link that might be sent by this campaign. If links from other domains
|
|
276
|
-
* are sent through this campaign, they are much more likely to be filtered by the
|
|
277
|
-
* carriers. If link shortening is enabled for the account, the link shortener URL
|
|
278
|
-
* will be used instead of what is provided. Reach out to support if you would like
|
|
279
|
-
* to disable automatic link shortening.
|
|
280
|
-
*/
|
|
281
|
-
link_sample?: string;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* The URL of the terms and conditions presented to end users when they opt in to
|
|
285
|
-
* messaging. These terms and conditions may be shared among all of a platform's
|
|
286
|
-
* customers if they're the terms that are presented to end users when they opt in
|
|
287
|
-
* to messaging.
|
|
288
|
-
*/
|
|
289
|
-
terms_and_conditions_url?: string;
|
|
290
|
-
}
|
|
174
|
+
export declare namespace CampaignCreateParams {
|
|
175
|
+
export interface StandardCampaignParams {
|
|
176
|
+
/**
|
|
177
|
+
* A string explaining the method through which end users will opt in to receive
|
|
178
|
+
* messages from the brand. Typically this should include URLs for opt-in forms or
|
|
179
|
+
* screenshots that might be helpful in explaining the flow to someone unfamiliar
|
|
180
|
+
* with the organization's purpose.
|
|
181
|
+
*/
|
|
182
|
+
consent_flow: string;
|
|
291
183
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
* with the organization's purpose.
|
|
298
|
-
*/
|
|
299
|
-
consent_flow: string;
|
|
184
|
+
/**
|
|
185
|
+
* An explanation of the organization's purpose and how it will be using text
|
|
186
|
+
* messaging to accomplish that purpose.
|
|
187
|
+
*/
|
|
188
|
+
description: string;
|
|
300
189
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
190
|
+
/**
|
|
191
|
+
* An array of 2-5 strings with examples of the messages that will be sent from
|
|
192
|
+
* this campaign. Typically the first sample should be a compliance message like
|
|
193
|
+
* `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
|
|
194
|
+
* These samples don't necessarily need to be the only templates that will be used
|
|
195
|
+
* for the campaign, but they should reflect the purpose of the messages that will
|
|
196
|
+
* be sent. Any variable content can be reflected by wrapping it in square brackets
|
|
197
|
+
* like `[customer name]`.
|
|
198
|
+
*/
|
|
199
|
+
message_samples: Array<string>;
|
|
306
200
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
* be sent. Any variable content can be reflected by wrapping it in square brackets
|
|
314
|
-
* like `[customer name]`.
|
|
315
|
-
*/
|
|
316
|
-
message_samples: Array<string>;
|
|
201
|
+
/**
|
|
202
|
+
* The URL of the privacy policy for the brand in question. This may be a shared
|
|
203
|
+
* privacy policy if it's the policy that is displayed to end users when they opt
|
|
204
|
+
* in to messaging.
|
|
205
|
+
*/
|
|
206
|
+
privacy_policy_url: string;
|
|
317
207
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
208
|
+
/**
|
|
209
|
+
* A list containing 1-5 types of messages that will be sent with this campaign.
|
|
210
|
+
*
|
|
211
|
+
* The following use cases are typically available to all brands:
|
|
212
|
+
*
|
|
213
|
+
* - `account_notification` - For sending reminders, alerts, and general
|
|
214
|
+
* account-related notifications like booking confirmations or appointment
|
|
215
|
+
* reminders.
|
|
216
|
+
* - `customer_care` - For account support, troubleshooting, and general customer
|
|
217
|
+
* service communication.
|
|
218
|
+
* - `delivery_notification` - For notifying customers about the status of product
|
|
219
|
+
* or service deliveries.
|
|
220
|
+
* - `fraud_alert` - For warning customers about suspicious or potentially
|
|
221
|
+
* fraudulent activity.
|
|
222
|
+
* - `higher_education` - For messaging related to colleges, universities, and
|
|
223
|
+
* school districts outside of K–12.
|
|
224
|
+
* - `marketing` - For promotional or advertising messages intended to market
|
|
225
|
+
* products or services.
|
|
226
|
+
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
227
|
+
* - `public_service_announcement` - For raising awareness about social issues or
|
|
228
|
+
* important public information.
|
|
229
|
+
* - `security_alert` - For alerts related to potential security breaches or
|
|
230
|
+
* compromised systems requiring user action.
|
|
231
|
+
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
232
|
+
* codes for login or password reset.
|
|
233
|
+
*
|
|
234
|
+
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
235
|
+
*/
|
|
236
|
+
use_cases: Array<
|
|
237
|
+
| 'account_notification'
|
|
238
|
+
| 'customer_care'
|
|
239
|
+
| 'delivery_notification'
|
|
240
|
+
| 'fraud_alert'
|
|
241
|
+
| 'higher_education'
|
|
242
|
+
| 'marketing'
|
|
243
|
+
| 'polling_voting'
|
|
244
|
+
| 'public_service_announcement'
|
|
245
|
+
| 'security_alert'
|
|
246
|
+
| 'two_factor_authentication'
|
|
247
|
+
>;
|
|
324
248
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
* fraudulent activity.
|
|
339
|
-
* - `higher_education` - For messaging related to colleges, universities, and
|
|
340
|
-
* school districts outside of K–12.
|
|
341
|
-
* - `marketing` - For promotional or advertising messages intended to market
|
|
342
|
-
* products or services.
|
|
343
|
-
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
344
|
-
* - `public_service_announcement` - For raising awareness about social issues or
|
|
345
|
-
* important public information.
|
|
346
|
-
* - `security_alert` - For alerts related to potential security breaches or
|
|
347
|
-
* compromised systems requiring user action.
|
|
348
|
-
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
349
|
-
* codes for login or password reset.
|
|
350
|
-
*
|
|
351
|
-
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
352
|
-
*/
|
|
353
|
-
use_cases: Array<
|
|
354
|
-
| 'account_notification'
|
|
355
|
-
| 'customer_care'
|
|
356
|
-
| 'delivery_notification'
|
|
357
|
-
| 'fraud_alert'
|
|
358
|
-
| 'higher_education'
|
|
359
|
-
| 'marketing'
|
|
360
|
-
| 'polling_voting'
|
|
361
|
-
| 'public_service_announcement'
|
|
362
|
-
| 'security_alert'
|
|
363
|
-
| 'two_factor_authentication'
|
|
364
|
-
>;
|
|
249
|
+
/**
|
|
250
|
+
* This will be one of the following:
|
|
251
|
+
*
|
|
252
|
+
* - `low` - The campaign will be allowed to send up to 2000 SMS segments to
|
|
253
|
+
* T-Mobile customers each day. In this case your platform will be charged for
|
|
254
|
+
* the setup fee for a low volume number upon receipt of the API request.
|
|
255
|
+
* - `high` - The campaign will be allowed to send up to 200k SMS segments to
|
|
256
|
+
* T-Mobile customers each day, depending on the trust score assigned by The
|
|
257
|
+
* Campaign Registry. Your platform will be charged for the setup fee for a high
|
|
258
|
+
* volume number upon receipt of the API request, and phone numbers will be
|
|
259
|
+
* charged as high volume numbers going forward.
|
|
260
|
+
*/
|
|
261
|
+
volume: 'high' | 'low';
|
|
365
262
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
volume: 'high' | 'low';
|
|
263
|
+
/**
|
|
264
|
+
* A list of properties that this campaign should include. These properties can be
|
|
265
|
+
* any of the following values:
|
|
266
|
+
*
|
|
267
|
+
* - `links` - whether the campaign might send links in messages
|
|
268
|
+
* - `phone_numbers` - whether the campaign might send phone numbers in messages
|
|
269
|
+
* - `age_gated` - whether the campaign contains age gated content (controlled
|
|
270
|
+
* substances or adult content)
|
|
271
|
+
* - `direct_lending` - whether the campaign contains content related to direct
|
|
272
|
+
* lending or other loan arrangements
|
|
273
|
+
*/
|
|
274
|
+
includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
379
275
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
* - `direct_lending` - whether the campaign contains content related to direct
|
|
389
|
-
* lending or other loan arrangements
|
|
390
|
-
*/
|
|
391
|
-
includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
276
|
+
/**
|
|
277
|
+
* A sample link that might be sent by this campaign. If links from other domains
|
|
278
|
+
* are sent through this campaign, they are much more likely to be filtered by the
|
|
279
|
+
* carriers. If link shortening is enabled for the account, the link shortener URL
|
|
280
|
+
* will be used instead of what is provided. Reach out to support if you would like
|
|
281
|
+
* to disable automatic link shortening.
|
|
282
|
+
*/
|
|
283
|
+
link_sample?: string;
|
|
392
284
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
285
|
+
/**
|
|
286
|
+
* The URL of the terms and conditions presented to end users when they opt in to
|
|
287
|
+
* messaging. These terms and conditions may be shared among all of a platform's
|
|
288
|
+
* customers if they're the terms that are presented to end users when they opt in
|
|
289
|
+
* to messaging.
|
|
290
|
+
*/
|
|
291
|
+
terms_and_conditions_url?: string;
|
|
292
|
+
}
|
|
401
293
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
terms_and_conditions_url?: string;
|
|
294
|
+
export interface ExternalCampaignParams {
|
|
295
|
+
/**
|
|
296
|
+
* The Campaign Registry (TCR) ID for the externally registered campaign
|
|
297
|
+
*/
|
|
298
|
+
tcr_id: string;
|
|
299
|
+
}
|
|
409
300
|
}
|
|
410
301
|
|
|
411
302
|
export declare namespace Campaigns {
|
|
412
|
-
export {
|
|
413
|
-
type Campaign as Campaign,
|
|
414
|
-
type CampaignParams as CampaignParams,
|
|
415
|
-
type CampaignCreateParams as CampaignCreateParams,
|
|
416
|
-
};
|
|
303
|
+
export { type Campaign as Campaign, type CampaignCreateParams as CampaignCreateParams };
|
|
417
304
|
}
|
|
@@ -87,36 +87,6 @@ export interface Contact {
|
|
|
87
87
|
metadata?: { [key: string]: string };
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
/**
|
|
91
|
-
* Parameters for creating a contact
|
|
92
|
-
*/
|
|
93
|
-
export interface ContactParams {
|
|
94
|
-
/**
|
|
95
|
-
* The contact's phone number in E.164 format.
|
|
96
|
-
*/
|
|
97
|
-
phone_number: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* The contact's email address.
|
|
101
|
-
*/
|
|
102
|
-
email?: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* The contact's first name.
|
|
106
|
-
*/
|
|
107
|
-
first_name?: string;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* The contact's last name.
|
|
111
|
-
*/
|
|
112
|
-
last_name?: string;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Set of key-value pairs that will be stored with the object.
|
|
116
|
-
*/
|
|
117
|
-
metadata?: { [key: string]: string };
|
|
118
|
-
}
|
|
119
|
-
|
|
120
90
|
export interface ContactCreateParams {
|
|
121
91
|
/**
|
|
122
92
|
* The contact's phone number in E.164 format.
|
|
@@ -174,7 +144,6 @@ export interface ContactUpdateParams {
|
|
|
174
144
|
export declare namespace Contacts {
|
|
175
145
|
export {
|
|
176
146
|
type Contact as Contact,
|
|
177
|
-
type ContactParams as ContactParams,
|
|
178
147
|
type ContactCreateParams as ContactCreateParams,
|
|
179
148
|
type ContactUpdateParams as ContactUpdateParams,
|
|
180
149
|
};
|
package/src/resources/index.ts
CHANGED
|
@@ -4,36 +4,20 @@ export * from './shared';
|
|
|
4
4
|
export {
|
|
5
5
|
Accounts,
|
|
6
6
|
type Account,
|
|
7
|
-
type AccountParams,
|
|
8
7
|
type AccountStatus,
|
|
9
|
-
type AccountUpdateParams,
|
|
10
8
|
type Organization,
|
|
11
|
-
type OrganizationParams,
|
|
12
9
|
type AccountCreateParams,
|
|
10
|
+
type AccountUpdateParams,
|
|
13
11
|
type AccountRetrieveStatusParams,
|
|
14
12
|
} from './accounts';
|
|
15
|
-
export { Blasts, type Blast, type
|
|
16
|
-
export { Campaigns, type Campaign, type
|
|
17
|
-
export {
|
|
18
|
-
|
|
19
|
-
type Contact,
|
|
20
|
-
type ContactParams,
|
|
21
|
-
type ContactCreateParams,
|
|
22
|
-
type ContactUpdateParams,
|
|
23
|
-
} from './contacts';
|
|
24
|
-
export {
|
|
25
|
-
Messages,
|
|
26
|
-
type AttachmentParams,
|
|
27
|
-
type Message,
|
|
28
|
-
type MessageParams,
|
|
29
|
-
type MessageCreateParams,
|
|
30
|
-
} from './messages';
|
|
13
|
+
export { Blasts, type Blast, type BlastCreateParams } from './blasts';
|
|
14
|
+
export { Campaigns, type Campaign, type CampaignCreateParams } from './campaigns';
|
|
15
|
+
export { Contacts, type Contact, type ContactCreateParams, type ContactUpdateParams } from './contacts';
|
|
16
|
+
export { Messages, type Message, type MessageCreateParams } from './messages';
|
|
31
17
|
export { PhoneNumbers, type PhoneNumber, type PhoneNumberPurchaseParams } from './phone-numbers';
|
|
32
18
|
export {
|
|
33
19
|
Users,
|
|
34
20
|
type User,
|
|
35
|
-
type UserParams,
|
|
36
|
-
type UserTokenParams,
|
|
37
21
|
type UserTokenResponse,
|
|
38
22
|
type UserCreateParams,
|
|
39
23
|
type UserUpdateParams,
|
|
@@ -43,14 +27,15 @@ export {
|
|
|
43
27
|
Verifications,
|
|
44
28
|
type Verification,
|
|
45
29
|
type VerificationCheck,
|
|
46
|
-
type VerificationCheckParams,
|
|
47
|
-
type VerificationParams,
|
|
48
30
|
type VerificationCreateParams,
|
|
31
|
+
type VerificationCheckParams,
|
|
49
32
|
} from './verifications';
|
|
50
33
|
export {
|
|
51
34
|
Webhooks,
|
|
52
35
|
type CallEndedWebhookEvent,
|
|
53
36
|
type CampaignApprovedWebhookEvent,
|
|
37
|
+
type ContactOptedInWebhookEvent,
|
|
38
|
+
type ContactOptedOutWebhookEvent,
|
|
54
39
|
type ConversationCreatedWebhookEvent,
|
|
55
40
|
type MessageDeliveredWebhookEvent,
|
|
56
41
|
type MessageFailedWebhookEvent,
|