@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/resources/blasts.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as MessagesAPI from "./messages.mjs";
|
|
3
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
4
|
export declare class Blasts extends APIResource {
|
|
@@ -45,11 +44,8 @@ export declare namespace Blast {
|
|
|
45
44
|
url?: string;
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
export interface BlastParams {
|
|
52
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
47
|
+
export interface BlastCreateParams {
|
|
48
|
+
attachments?: Array<BlastCreateParams.Attachment>;
|
|
53
49
|
/**
|
|
54
50
|
* The message body.
|
|
55
51
|
*/
|
|
@@ -76,35 +72,18 @@ export interface BlastParams {
|
|
|
76
72
|
*/
|
|
77
73
|
to?: Array<string>;
|
|
78
74
|
}
|
|
79
|
-
export
|
|
80
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
81
|
-
/**
|
|
82
|
-
* The message body.
|
|
83
|
-
*/
|
|
84
|
-
body?: string;
|
|
85
|
-
/**
|
|
86
|
-
* @deprecated Deprecated. Use `to` instead.
|
|
87
|
-
*/
|
|
88
|
-
contacts?: Array<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Optional name for the blast.
|
|
91
|
-
*/
|
|
92
|
-
name?: string;
|
|
75
|
+
export declare namespace BlastCreateParams {
|
|
93
76
|
/**
|
|
94
|
-
*
|
|
95
|
-
*/
|
|
96
|
-
segments?: Array<string>;
|
|
97
|
-
/**
|
|
98
|
-
* When to send the blast. If not provided, sends immediately.
|
|
99
|
-
*/
|
|
100
|
-
send_at?: string;
|
|
101
|
-
/**
|
|
102
|
-
* List of recipients to whom the blast should be sent. This can be a combination
|
|
103
|
-
* of contact IDs, segment IDs, and phone numbers.
|
|
77
|
+
* Params for creating an attachment
|
|
104
78
|
*/
|
|
105
|
-
|
|
79
|
+
interface Attachment {
|
|
80
|
+
/**
|
|
81
|
+
* The URL of the attachment.
|
|
82
|
+
*/
|
|
83
|
+
url: string;
|
|
84
|
+
}
|
|
106
85
|
}
|
|
107
86
|
export declare namespace Blasts {
|
|
108
|
-
export { type Blast as Blast, type
|
|
87
|
+
export { type Blast as Blast, type BlastCreateParams as BlastCreateParams };
|
|
109
88
|
}
|
|
110
89
|
//# sourceMappingURL=blasts.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blasts.d.mts","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,
|
|
1
|
+
{"version":3,"file":"blasts.d.mts","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,E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,CAAC;IAC9B,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC7E"}
|
package/resources/blasts.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as MessagesAPI from "./messages.js";
|
|
3
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
4
|
export declare class Blasts extends APIResource {
|
|
@@ -45,11 +44,8 @@ export declare namespace Blast {
|
|
|
45
44
|
url?: string;
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
export interface BlastParams {
|
|
52
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
47
|
+
export interface BlastCreateParams {
|
|
48
|
+
attachments?: Array<BlastCreateParams.Attachment>;
|
|
53
49
|
/**
|
|
54
50
|
* The message body.
|
|
55
51
|
*/
|
|
@@ -76,35 +72,18 @@ export interface BlastParams {
|
|
|
76
72
|
*/
|
|
77
73
|
to?: Array<string>;
|
|
78
74
|
}
|
|
79
|
-
export
|
|
80
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
81
|
-
/**
|
|
82
|
-
* The message body.
|
|
83
|
-
*/
|
|
84
|
-
body?: string;
|
|
85
|
-
/**
|
|
86
|
-
* @deprecated Deprecated. Use `to` instead.
|
|
87
|
-
*/
|
|
88
|
-
contacts?: Array<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Optional name for the blast.
|
|
91
|
-
*/
|
|
92
|
-
name?: string;
|
|
75
|
+
export declare namespace BlastCreateParams {
|
|
93
76
|
/**
|
|
94
|
-
*
|
|
95
|
-
*/
|
|
96
|
-
segments?: Array<string>;
|
|
97
|
-
/**
|
|
98
|
-
* When to send the blast. If not provided, sends immediately.
|
|
99
|
-
*/
|
|
100
|
-
send_at?: string;
|
|
101
|
-
/**
|
|
102
|
-
* List of recipients to whom the blast should be sent. This can be a combination
|
|
103
|
-
* of contact IDs, segment IDs, and phone numbers.
|
|
77
|
+
* Params for creating an attachment
|
|
104
78
|
*/
|
|
105
|
-
|
|
79
|
+
interface Attachment {
|
|
80
|
+
/**
|
|
81
|
+
* The URL of the attachment.
|
|
82
|
+
*/
|
|
83
|
+
url: string;
|
|
84
|
+
}
|
|
106
85
|
}
|
|
107
86
|
export declare namespace Blasts {
|
|
108
|
-
export { type Blast as Blast, type
|
|
87
|
+
export { type Blast as Blast, type BlastCreateParams as BlastCreateParams };
|
|
109
88
|
}
|
|
110
89
|
//# sourceMappingURL=blasts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blasts.d.ts","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,
|
|
1
|
+
{"version":3,"file":"blasts.d.ts","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;CAGhG;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,WAAW,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEtC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,KAAK,CAAC;IACrB,UAAiB,UAAU;QACzB;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAElD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACpB;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;KACb;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC7E"}
|
package/resources/blasts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blasts.js","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"blasts.js","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAuB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF;AAdD,wBAcC"}
|
package/resources/blasts.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blasts.mjs","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"blasts.mjs","sourceRoot":"","sources":["../src/resources/blasts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAuB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF"}
|
|
@@ -139,208 +139,115 @@ export interface Campaign {
|
|
|
139
139
|
*/
|
|
140
140
|
terms_and_conditions_url?: string;
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
* with the organization's purpose.
|
|
250
|
-
*/
|
|
251
|
-
consent_flow: string;
|
|
252
|
-
/**
|
|
253
|
-
* An explanation of the organization's purpose and how it will be using text
|
|
254
|
-
* messaging to accomplish that purpose.
|
|
255
|
-
*/
|
|
256
|
-
description: string;
|
|
257
|
-
/**
|
|
258
|
-
* An array of 2-5 strings with examples of the messages that will be sent from
|
|
259
|
-
* this campaign. Typically the first sample should be a compliance message like
|
|
260
|
-
* `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
|
|
261
|
-
* These samples don't necessarily need to be the only templates that will be used
|
|
262
|
-
* for the campaign, but they should reflect the purpose of the messages that will
|
|
263
|
-
* be sent. Any variable content can be reflected by wrapping it in square brackets
|
|
264
|
-
* like `[customer name]`.
|
|
265
|
-
*/
|
|
266
|
-
message_samples: Array<string>;
|
|
267
|
-
/**
|
|
268
|
-
* The URL of the privacy policy for the brand in question. This may be a shared
|
|
269
|
-
* privacy policy if it's the policy that is displayed to end users when they opt
|
|
270
|
-
* in to messaging.
|
|
271
|
-
*/
|
|
272
|
-
privacy_policy_url: string;
|
|
273
|
-
/**
|
|
274
|
-
* A list containing 1-5 types of messages that will be sent with this campaign.
|
|
275
|
-
*
|
|
276
|
-
* The following use cases are typically available to all brands:
|
|
277
|
-
*
|
|
278
|
-
* - `account_notification` - For sending reminders, alerts, and general
|
|
279
|
-
* account-related notifications like booking confirmations or appointment
|
|
280
|
-
* reminders.
|
|
281
|
-
* - `customer_care` - For account support, troubleshooting, and general customer
|
|
282
|
-
* service communication.
|
|
283
|
-
* - `delivery_notification` - For notifying customers about the status of product
|
|
284
|
-
* or service deliveries.
|
|
285
|
-
* - `fraud_alert` - For warning customers about suspicious or potentially
|
|
286
|
-
* fraudulent activity.
|
|
287
|
-
* - `higher_education` - For messaging related to colleges, universities, and
|
|
288
|
-
* school districts outside of K–12.
|
|
289
|
-
* - `marketing` - For promotional or advertising messages intended to market
|
|
290
|
-
* products or services.
|
|
291
|
-
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
292
|
-
* - `public_service_announcement` - For raising awareness about social issues or
|
|
293
|
-
* important public information.
|
|
294
|
-
* - `security_alert` - For alerts related to potential security breaches or
|
|
295
|
-
* compromised systems requiring user action.
|
|
296
|
-
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
297
|
-
* codes for login or password reset.
|
|
298
|
-
*
|
|
299
|
-
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
300
|
-
*/
|
|
301
|
-
use_cases: Array<'account_notification' | 'customer_care' | 'delivery_notification' | 'fraud_alert' | 'higher_education' | 'marketing' | 'polling_voting' | 'public_service_announcement' | 'security_alert' | 'two_factor_authentication'>;
|
|
302
|
-
/**
|
|
303
|
-
* This will be one of the following:
|
|
304
|
-
*
|
|
305
|
-
* - `low` - The campaign will be allowed to send up to 2000 SMS segments to
|
|
306
|
-
* T-Mobile customers each day. In this case your platform will be charged for
|
|
307
|
-
* the setup fee for a low volume number upon receipt of the API request.
|
|
308
|
-
* - `high` - The campaign will be allowed to send up to 200k SMS segments to
|
|
309
|
-
* T-Mobile customers each day, depending on the trust score assigned by The
|
|
310
|
-
* Campaign Registry. Your platform will be charged for the setup fee for a high
|
|
311
|
-
* volume number upon receipt of the API request, and phone numbers will be
|
|
312
|
-
* charged as high volume numbers going forward.
|
|
313
|
-
*/
|
|
314
|
-
volume: 'high' | 'low';
|
|
315
|
-
/**
|
|
316
|
-
* A list of properties that this campaign should include. These properties can be
|
|
317
|
-
* any of the following values:
|
|
318
|
-
*
|
|
319
|
-
* - `links` - whether the campaign might send links in messages
|
|
320
|
-
* - `phone_numbers` - whether the campaign might send phone numbers in messages
|
|
321
|
-
* - `age_gated` - whether the campaign contains age gated content (controlled
|
|
322
|
-
* substances or adult content)
|
|
323
|
-
* - `direct_lending` - whether the campaign contains content related to direct
|
|
324
|
-
* lending or other loan arrangements
|
|
325
|
-
*/
|
|
326
|
-
includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
327
|
-
/**
|
|
328
|
-
* A sample link that might be sent by this campaign. If links from other domains
|
|
329
|
-
* are sent through this campaign, they are much more likely to be filtered by the
|
|
330
|
-
* carriers. If link shortening is enabled for the account, the link shortener URL
|
|
331
|
-
* will be used instead of what is provided. Reach out to support if you would like
|
|
332
|
-
* to disable automatic link shortening.
|
|
333
|
-
*/
|
|
334
|
-
link_sample?: string;
|
|
335
|
-
/**
|
|
336
|
-
* The URL of the terms and conditions presented to end users when they opt in to
|
|
337
|
-
* messaging. These terms and conditions may be shared among all of a platform's
|
|
338
|
-
* customers if they're the terms that are presented to end users when they opt in
|
|
339
|
-
* to messaging.
|
|
340
|
-
*/
|
|
341
|
-
terms_and_conditions_url?: string;
|
|
142
|
+
export type CampaignCreateParams = CampaignCreateParams.StandardCampaignParams | CampaignCreateParams.ExternalCampaignParams;
|
|
143
|
+
export declare namespace CampaignCreateParams {
|
|
144
|
+
interface StandardCampaignParams {
|
|
145
|
+
/**
|
|
146
|
+
* A string explaining the method through which end users will opt in to receive
|
|
147
|
+
* messages from the brand. Typically this should include URLs for opt-in forms or
|
|
148
|
+
* screenshots that might be helpful in explaining the flow to someone unfamiliar
|
|
149
|
+
* with the organization's purpose.
|
|
150
|
+
*/
|
|
151
|
+
consent_flow: string;
|
|
152
|
+
/**
|
|
153
|
+
* An explanation of the organization's purpose and how it will be using text
|
|
154
|
+
* messaging to accomplish that purpose.
|
|
155
|
+
*/
|
|
156
|
+
description: string;
|
|
157
|
+
/**
|
|
158
|
+
* An array of 2-5 strings with examples of the messages that will be sent from
|
|
159
|
+
* this campaign. Typically the first sample should be a compliance message like
|
|
160
|
+
* `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
|
|
161
|
+
* These samples don't necessarily need to be the only templates that will be used
|
|
162
|
+
* for the campaign, but they should reflect the purpose of the messages that will
|
|
163
|
+
* be sent. Any variable content can be reflected by wrapping it in square brackets
|
|
164
|
+
* like `[customer name]`.
|
|
165
|
+
*/
|
|
166
|
+
message_samples: Array<string>;
|
|
167
|
+
/**
|
|
168
|
+
* The URL of the privacy policy for the brand in question. This may be a shared
|
|
169
|
+
* privacy policy if it's the policy that is displayed to end users when they opt
|
|
170
|
+
* in to messaging.
|
|
171
|
+
*/
|
|
172
|
+
privacy_policy_url: string;
|
|
173
|
+
/**
|
|
174
|
+
* A list containing 1-5 types of messages that will be sent with this campaign.
|
|
175
|
+
*
|
|
176
|
+
* The following use cases are typically available to all brands:
|
|
177
|
+
*
|
|
178
|
+
* - `account_notification` - For sending reminders, alerts, and general
|
|
179
|
+
* account-related notifications like booking confirmations or appointment
|
|
180
|
+
* reminders.
|
|
181
|
+
* - `customer_care` - For account support, troubleshooting, and general customer
|
|
182
|
+
* service communication.
|
|
183
|
+
* - `delivery_notification` - For notifying customers about the status of product
|
|
184
|
+
* or service deliveries.
|
|
185
|
+
* - `fraud_alert` - For warning customers about suspicious or potentially
|
|
186
|
+
* fraudulent activity.
|
|
187
|
+
* - `higher_education` - For messaging related to colleges, universities, and
|
|
188
|
+
* school districts outside of K–12.
|
|
189
|
+
* - `marketing` - For promotional or advertising messages intended to market
|
|
190
|
+
* products or services.
|
|
191
|
+
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
192
|
+
* - `public_service_announcement` - For raising awareness about social issues or
|
|
193
|
+
* important public information.
|
|
194
|
+
* - `security_alert` - For alerts related to potential security breaches or
|
|
195
|
+
* compromised systems requiring user action.
|
|
196
|
+
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
197
|
+
* codes for login or password reset.
|
|
198
|
+
*
|
|
199
|
+
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
200
|
+
*/
|
|
201
|
+
use_cases: Array<'account_notification' | 'customer_care' | 'delivery_notification' | 'fraud_alert' | 'higher_education' | 'marketing' | 'polling_voting' | 'public_service_announcement' | 'security_alert' | 'two_factor_authentication'>;
|
|
202
|
+
/**
|
|
203
|
+
* This will be one of the following:
|
|
204
|
+
*
|
|
205
|
+
* - `low` - The campaign will be allowed to send up to 2000 SMS segments to
|
|
206
|
+
* T-Mobile customers each day. In this case your platform will be charged for
|
|
207
|
+
* the setup fee for a low volume number upon receipt of the API request.
|
|
208
|
+
* - `high` - The campaign will be allowed to send up to 200k SMS segments to
|
|
209
|
+
* T-Mobile customers each day, depending on the trust score assigned by The
|
|
210
|
+
* Campaign Registry. Your platform will be charged for the setup fee for a high
|
|
211
|
+
* volume number upon receipt of the API request, and phone numbers will be
|
|
212
|
+
* charged as high volume numbers going forward.
|
|
213
|
+
*/
|
|
214
|
+
volume: 'high' | 'low';
|
|
215
|
+
/**
|
|
216
|
+
* A list of properties that this campaign should include. These properties can be
|
|
217
|
+
* any of the following values:
|
|
218
|
+
*
|
|
219
|
+
* - `links` - whether the campaign might send links in messages
|
|
220
|
+
* - `phone_numbers` - whether the campaign might send phone numbers in messages
|
|
221
|
+
* - `age_gated` - whether the campaign contains age gated content (controlled
|
|
222
|
+
* substances or adult content)
|
|
223
|
+
* - `direct_lending` - whether the campaign contains content related to direct
|
|
224
|
+
* lending or other loan arrangements
|
|
225
|
+
*/
|
|
226
|
+
includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
227
|
+
/**
|
|
228
|
+
* A sample link that might be sent by this campaign. If links from other domains
|
|
229
|
+
* are sent through this campaign, they are much more likely to be filtered by the
|
|
230
|
+
* carriers. If link shortening is enabled for the account, the link shortener URL
|
|
231
|
+
* will be used instead of what is provided. Reach out to support if you would like
|
|
232
|
+
* to disable automatic link shortening.
|
|
233
|
+
*/
|
|
234
|
+
link_sample?: string;
|
|
235
|
+
/**
|
|
236
|
+
* The URL of the terms and conditions presented to end users when they opt in to
|
|
237
|
+
* messaging. These terms and conditions may be shared among all of a platform's
|
|
238
|
+
* customers if they're the terms that are presented to end users when they opt in
|
|
239
|
+
* to messaging.
|
|
240
|
+
*/
|
|
241
|
+
terms_and_conditions_url?: string;
|
|
242
|
+
}
|
|
243
|
+
interface ExternalCampaignParams {
|
|
244
|
+
/**
|
|
245
|
+
* The Campaign Registry (TCR) ID for the externally registered campaign
|
|
246
|
+
*/
|
|
247
|
+
tcr_id: string;
|
|
248
|
+
}
|
|
342
249
|
}
|
|
343
250
|
export declare namespace Campaigns {
|
|
344
|
-
export { type Campaign as Campaign, type
|
|
251
|
+
export { type Campaign as Campaign, type CampaignCreateParams as CampaignCreateParams };
|
|
345
252
|
}
|
|
346
253
|
//# sourceMappingURL=campaigns.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaigns.d.mts","sourceRoot":"","sources":["../src/resources/campaigns.ts"],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