smswire 0.1.0 → 0.2.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/README.md +58 -0
- package/dist/index.cjs +112 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1050 -115
- package/dist/index.d.ts +1050 -115
- package/dist/index.js +112 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -51,6 +51,7 @@ interface components {
|
|
|
51
51
|
};
|
|
52
52
|
BulkItem: {
|
|
53
53
|
body?: string | null;
|
|
54
|
+
language?: string | null;
|
|
54
55
|
metadata?: components["schemas"]["Metadata"] | null;
|
|
55
56
|
tags?: components["schemas"]["Tags"] | null;
|
|
56
57
|
to: string;
|
|
@@ -59,9 +60,13 @@ interface components {
|
|
|
59
60
|
};
|
|
60
61
|
BulkSendRequest: {
|
|
61
62
|
body?: string | null;
|
|
62
|
-
|
|
63
|
+
from?: string | null;
|
|
64
|
+
group_ids?: string[] | null;
|
|
65
|
+
language?: string | null;
|
|
66
|
+
messages?: components["schemas"]["BulkItem"][];
|
|
63
67
|
metadata?: components["schemas"]["Metadata"] | null;
|
|
64
68
|
name?: string | null;
|
|
69
|
+
phone?: string | null;
|
|
65
70
|
rate?: number | null;
|
|
66
71
|
send_at?: string | null;
|
|
67
72
|
sim?: number | null;
|
|
@@ -75,10 +80,261 @@ interface components {
|
|
|
75
80
|
/** @default [] */
|
|
76
81
|
rejected: components["schemas"]["RejectedItem"][];
|
|
77
82
|
};
|
|
83
|
+
/** @enum {string} */
|
|
84
|
+
CampaignApiStatus: "draft" | "scheduled" | "sending" | "paused" | "done" | "cancelled";
|
|
85
|
+
CampaignApiView: {
|
|
86
|
+
audience: {
|
|
87
|
+
/** @default [] */
|
|
88
|
+
group_ids: string[];
|
|
89
|
+
/** @default [] */
|
|
90
|
+
messages: {
|
|
91
|
+
to: string;
|
|
92
|
+
/** @default {} */
|
|
93
|
+
variables: {
|
|
94
|
+
[key: string]: string;
|
|
95
|
+
};
|
|
96
|
+
}[];
|
|
97
|
+
/** @default [] */
|
|
98
|
+
numbers: string[];
|
|
99
|
+
};
|
|
100
|
+
body: string;
|
|
101
|
+
consent: boolean;
|
|
102
|
+
created_at: string;
|
|
103
|
+
cron?: string | null;
|
|
104
|
+
exclude: {
|
|
105
|
+
/** @default [] */
|
|
106
|
+
group_ids: string[];
|
|
107
|
+
no_reply_to_campaign_id?: string | null;
|
|
108
|
+
recent_days?: number | null;
|
|
109
|
+
};
|
|
110
|
+
id: string;
|
|
111
|
+
language?: string | null;
|
|
112
|
+
/** @default [] */
|
|
113
|
+
languages: string[];
|
|
114
|
+
last_run_at?: string | null;
|
|
115
|
+
name: string;
|
|
116
|
+
next_run_at?: string | null;
|
|
117
|
+
quiet_hours?: {
|
|
118
|
+
end: string;
|
|
119
|
+
start: string;
|
|
120
|
+
timezone: string;
|
|
121
|
+
} | null;
|
|
122
|
+
rate: number;
|
|
123
|
+
runs: number;
|
|
124
|
+
sim?: number | null;
|
|
125
|
+
status: components["schemas"]["CampaignApiStatus"];
|
|
126
|
+
stop_footer?: string | null;
|
|
127
|
+
tags: string[];
|
|
128
|
+
timezone?: string | null;
|
|
129
|
+
total: number;
|
|
130
|
+
type: components["schemas"]["MessageType"];
|
|
131
|
+
};
|
|
132
|
+
CampaignAudienceRequest: {
|
|
133
|
+
/** @default [] */
|
|
134
|
+
group_ids?: string[];
|
|
135
|
+
/** @default [] */
|
|
136
|
+
messages?: {
|
|
137
|
+
to: string;
|
|
138
|
+
/** @default {} */
|
|
139
|
+
variables?: {
|
|
140
|
+
[key: string]: string;
|
|
141
|
+
};
|
|
142
|
+
}[];
|
|
143
|
+
/** @default [] */
|
|
144
|
+
numbers?: string[];
|
|
145
|
+
};
|
|
146
|
+
CampaignControlRequest: {
|
|
147
|
+
/** @enum {string} */
|
|
148
|
+
status: "running" | "paused";
|
|
149
|
+
};
|
|
150
|
+
CampaignExcludeRequest: {
|
|
151
|
+
/** @default [] */
|
|
152
|
+
group_ids?: string[];
|
|
153
|
+
no_reply_to_campaign_id?: string | null;
|
|
154
|
+
recent_days?: number | null;
|
|
155
|
+
};
|
|
156
|
+
CampaignList: {
|
|
157
|
+
data: components["schemas"]["CampaignApiView"][];
|
|
158
|
+
};
|
|
159
|
+
CampaignPreviewResponse: {
|
|
160
|
+
excluded: {
|
|
161
|
+
duplicate: number;
|
|
162
|
+
group: number;
|
|
163
|
+
recent: number;
|
|
164
|
+
replied: number;
|
|
165
|
+
};
|
|
166
|
+
recipients: number;
|
|
167
|
+
};
|
|
168
|
+
CampaignQuietHours: {
|
|
169
|
+
end: string;
|
|
170
|
+
start: string;
|
|
171
|
+
timezone: string;
|
|
172
|
+
};
|
|
173
|
+
CampaignRequest: {
|
|
174
|
+
/**
|
|
175
|
+
* @default {
|
|
176
|
+
* "group_ids": [],
|
|
177
|
+
* "numbers": [],
|
|
178
|
+
* "messages": []
|
|
179
|
+
* }
|
|
180
|
+
*/
|
|
181
|
+
audience?: components["schemas"]["CampaignAudienceRequest"];
|
|
182
|
+
/** @default */
|
|
183
|
+
body?: string;
|
|
184
|
+
/** @default false */
|
|
185
|
+
consent?: boolean;
|
|
186
|
+
cron?: string | null;
|
|
187
|
+
ends_at?: string | null;
|
|
188
|
+
/**
|
|
189
|
+
* @default {
|
|
190
|
+
* "group_ids": [],
|
|
191
|
+
* "recent_days": null,
|
|
192
|
+
* "no_reply_to_campaign_id": null
|
|
193
|
+
* }
|
|
194
|
+
*/
|
|
195
|
+
exclude?: components["schemas"]["CampaignExcludeRequest"];
|
|
196
|
+
from?: string | null;
|
|
197
|
+
language?: string | null;
|
|
198
|
+
max_runs?: number | null;
|
|
199
|
+
name: string;
|
|
200
|
+
phone?: string | null;
|
|
201
|
+
quiet_hours?: components["schemas"]["CampaignQuietHours"] | null;
|
|
202
|
+
/** @default 30 */
|
|
203
|
+
rate?: number;
|
|
204
|
+
send_at?: string | null;
|
|
205
|
+
sim?: number | null;
|
|
206
|
+
stop_footer?: string | null;
|
|
207
|
+
/** @default [] */
|
|
208
|
+
tags?: string[];
|
|
209
|
+
template?: string;
|
|
210
|
+
timezone?: string | null;
|
|
211
|
+
/** @default marketing */
|
|
212
|
+
type?: components["schemas"]["MessageType"];
|
|
213
|
+
};
|
|
214
|
+
CampaignResultsView: {
|
|
215
|
+
awaiting: number;
|
|
216
|
+
delivered: number;
|
|
217
|
+
delivery_rate?: number | null;
|
|
218
|
+
failed: number;
|
|
219
|
+
opt_outs: number;
|
|
220
|
+
parts: number;
|
|
221
|
+
replies: number;
|
|
222
|
+
runs: components["schemas"]["CampaignRunView"][];
|
|
223
|
+
waiting: number;
|
|
224
|
+
};
|
|
225
|
+
CampaignRunView: {
|
|
226
|
+
batch_id: string;
|
|
227
|
+
created_at: string;
|
|
228
|
+
delivered: number;
|
|
229
|
+
failed: number;
|
|
230
|
+
total: number;
|
|
231
|
+
};
|
|
232
|
+
CampaignSendResponse: {
|
|
233
|
+
/** @default 0 */
|
|
234
|
+
accepted: number;
|
|
235
|
+
batch_id?: string | null;
|
|
236
|
+
/** @default [] */
|
|
237
|
+
rejected: components["schemas"]["RejectedItem"][];
|
|
238
|
+
/** @enum {string} */
|
|
239
|
+
status: "queued" | "scheduled";
|
|
240
|
+
};
|
|
241
|
+
CampaignUpdate: {
|
|
242
|
+
audience?: components["schemas"]["CampaignAudienceRequest"];
|
|
243
|
+
body?: string;
|
|
244
|
+
consent?: boolean;
|
|
245
|
+
cron?: string | null;
|
|
246
|
+
ends_at?: string | null;
|
|
247
|
+
exclude?: components["schemas"]["CampaignExcludeRequest"];
|
|
248
|
+
from?: string | null;
|
|
249
|
+
language?: string | null;
|
|
250
|
+
max_runs?: number | null;
|
|
251
|
+
name?: string;
|
|
252
|
+
phone?: string | null;
|
|
253
|
+
quiet_hours?: components["schemas"]["CampaignQuietHours"] | null;
|
|
254
|
+
rate?: number;
|
|
255
|
+
send_at?: string | null;
|
|
256
|
+
sim?: number | null;
|
|
257
|
+
stop_footer?: string | null;
|
|
258
|
+
tags?: string[];
|
|
259
|
+
template?: string;
|
|
260
|
+
timezone?: string | null;
|
|
261
|
+
type?: components["schemas"]["MessageType"];
|
|
262
|
+
};
|
|
78
263
|
Error: {
|
|
79
264
|
error: string;
|
|
80
265
|
message: string;
|
|
81
266
|
};
|
|
267
|
+
GroupApiView: {
|
|
268
|
+
created_at: string;
|
|
269
|
+
id: string;
|
|
270
|
+
join_reply?: string | null;
|
|
271
|
+
/** @default [] */
|
|
272
|
+
keywords: string[];
|
|
273
|
+
name: string;
|
|
274
|
+
size: number;
|
|
275
|
+
};
|
|
276
|
+
GroupJoinedWebhookPayload: {
|
|
277
|
+
contact_id: string;
|
|
278
|
+
/** @constant */
|
|
279
|
+
event: "group.joined";
|
|
280
|
+
group_id: string;
|
|
281
|
+
group_name: string;
|
|
282
|
+
joined_at: string;
|
|
283
|
+
keyword: string;
|
|
284
|
+
message_id: string;
|
|
285
|
+
phone: string;
|
|
286
|
+
project_id: string;
|
|
287
|
+
};
|
|
288
|
+
/** @enum {string} */
|
|
289
|
+
GroupJoinSource: "manual" | "import" | "keyword" | "api";
|
|
290
|
+
GroupList: {
|
|
291
|
+
data: components["schemas"]["GroupApiView"][];
|
|
292
|
+
};
|
|
293
|
+
GroupMemberInput: {
|
|
294
|
+
fields?: {
|
|
295
|
+
[key: string]: string;
|
|
296
|
+
} | null;
|
|
297
|
+
language?: string | null;
|
|
298
|
+
name?: string | null;
|
|
299
|
+
phone: string;
|
|
300
|
+
};
|
|
301
|
+
GroupMemberPage: {
|
|
302
|
+
data: components["schemas"]["GroupMemberView"][];
|
|
303
|
+
next_cursor?: string | null;
|
|
304
|
+
};
|
|
305
|
+
GroupMembersRequest: {
|
|
306
|
+
members: components["schemas"]["GroupMemberInput"][];
|
|
307
|
+
};
|
|
308
|
+
GroupMembersResponse: {
|
|
309
|
+
added: number;
|
|
310
|
+
already: number;
|
|
311
|
+
invalid: {
|
|
312
|
+
index: number;
|
|
313
|
+
phone: string;
|
|
314
|
+
}[];
|
|
315
|
+
};
|
|
316
|
+
GroupMemberView: {
|
|
317
|
+
contact_id: string;
|
|
318
|
+
/** @default {} */
|
|
319
|
+
fields: {
|
|
320
|
+
[key: string]: string;
|
|
321
|
+
};
|
|
322
|
+
joined_at: string;
|
|
323
|
+
name?: string | null;
|
|
324
|
+
opted_out: boolean;
|
|
325
|
+
phone: string;
|
|
326
|
+
source: components["schemas"]["GroupJoinSource"];
|
|
327
|
+
};
|
|
328
|
+
GroupRequest: {
|
|
329
|
+
join_reply?: string | null;
|
|
330
|
+
keywords?: string[] | null;
|
|
331
|
+
name: string;
|
|
332
|
+
};
|
|
333
|
+
GroupUpdate: {
|
|
334
|
+
join_reply?: string | null;
|
|
335
|
+
keywords?: string[] | null;
|
|
336
|
+
name?: string;
|
|
337
|
+
};
|
|
82
338
|
InboundWebhookPayload: {
|
|
83
339
|
body: string;
|
|
84
340
|
/** @constant */
|
|
@@ -102,6 +358,7 @@ interface components {
|
|
|
102
358
|
delivered_at?: string | null;
|
|
103
359
|
error?: string | null;
|
|
104
360
|
id: string;
|
|
361
|
+
language?: string | null;
|
|
105
362
|
metadata?: {
|
|
106
363
|
[key: string]: unknown;
|
|
107
364
|
} | null;
|
|
@@ -124,8 +381,11 @@ interface components {
|
|
|
124
381
|
OtpFailure: "invalid" | "expired" | "too_many_attempts" | "already_used";
|
|
125
382
|
OtpRequest: {
|
|
126
383
|
body?: string | null;
|
|
384
|
+
from?: string | null;
|
|
385
|
+
language?: string | null;
|
|
127
386
|
/** @default 6 */
|
|
128
387
|
length?: number;
|
|
388
|
+
phone?: string | null;
|
|
129
389
|
sim?: number | null;
|
|
130
390
|
template?: string | null;
|
|
131
391
|
to: string;
|
|
@@ -146,6 +406,28 @@ interface components {
|
|
|
146
406
|
reason?: components["schemas"]["OtpFailure"] | null;
|
|
147
407
|
valid: boolean;
|
|
148
408
|
};
|
|
409
|
+
ProjectPhone: {
|
|
410
|
+
id: string;
|
|
411
|
+
name: string;
|
|
412
|
+
/** @default [] */
|
|
413
|
+
names: {
|
|
414
|
+
label?: string | null;
|
|
415
|
+
number?: string | null;
|
|
416
|
+
slot: number;
|
|
417
|
+
}[];
|
|
418
|
+
online: boolean;
|
|
419
|
+
/** @default [] */
|
|
420
|
+
sims: number[];
|
|
421
|
+
};
|
|
422
|
+
ProjectStatus: {
|
|
423
|
+
dashboard_url: string;
|
|
424
|
+
name: string;
|
|
425
|
+
phones: components["schemas"]["ProjectPhone"][];
|
|
426
|
+
project: string;
|
|
427
|
+
project_id: string;
|
|
428
|
+
ready: boolean;
|
|
429
|
+
workspace_id: string;
|
|
430
|
+
};
|
|
149
431
|
RejectedItem: {
|
|
150
432
|
index: number;
|
|
151
433
|
reason: string;
|
|
@@ -164,11 +446,14 @@ interface components {
|
|
|
164
446
|
/** @default true */
|
|
165
447
|
enabled?: boolean;
|
|
166
448
|
ends_at?: string | null;
|
|
449
|
+
from?: string | null;
|
|
167
450
|
group_ids?: string[] | null;
|
|
451
|
+
language?: string | null;
|
|
168
452
|
max_runs?: number | null;
|
|
169
453
|
messages?: components["schemas"]["ScheduleRecipient"][] | null;
|
|
170
454
|
metadata?: components["schemas"]["Metadata"] | null;
|
|
171
455
|
name?: string | null;
|
|
456
|
+
phone?: string | null;
|
|
172
457
|
rate?: number | null;
|
|
173
458
|
sim?: number | null;
|
|
174
459
|
tags?: components["schemas"]["Tags"] | null;
|
|
@@ -194,6 +479,7 @@ interface components {
|
|
|
194
479
|
cron?: string | null;
|
|
195
480
|
enabled?: boolean | null;
|
|
196
481
|
ends_at?: string | null;
|
|
482
|
+
language?: string | null;
|
|
197
483
|
max_runs?: number | null;
|
|
198
484
|
name?: string | null;
|
|
199
485
|
template?: string | null;
|
|
@@ -207,6 +493,7 @@ interface components {
|
|
|
207
493
|
enabled: boolean;
|
|
208
494
|
ends_at?: string | null;
|
|
209
495
|
id: string;
|
|
496
|
+
language?: string | null;
|
|
210
497
|
last_run?: components["schemas"]["ScheduleRunView"] | null;
|
|
211
498
|
last_run_at?: string | null;
|
|
212
499
|
max_runs?: number | null;
|
|
@@ -227,7 +514,10 @@ interface components {
|
|
|
227
514
|
};
|
|
228
515
|
SendMessageRequest: {
|
|
229
516
|
body?: string | null;
|
|
517
|
+
from?: string | null;
|
|
518
|
+
language?: string | null;
|
|
230
519
|
metadata?: components["schemas"]["Metadata"] | null;
|
|
520
|
+
phone?: string | null;
|
|
231
521
|
send_at?: string | null;
|
|
232
522
|
sim?: number | null;
|
|
233
523
|
tags?: components["schemas"]["Tags"] | null;
|
|
@@ -283,7 +573,7 @@ interface components {
|
|
|
283
573
|
"application/json": components["schemas"]["Error"];
|
|
284
574
|
};
|
|
285
575
|
};
|
|
286
|
-
/** @description `rate_limited`, `daily_limit_reached`, `monthly_limit_reached` or `too_many_otp_requests`. */
|
|
576
|
+
/** @description `too_many_requests` (this key's requests a minute), `rate_limited`, `daily_limit_reached`, `monthly_limit_reached` or `too_many_otp_requests`. */
|
|
287
577
|
TooManyRequests: {
|
|
288
578
|
headers: {
|
|
289
579
|
/** @description Seconds until trying again makes sense. */
|
|
@@ -313,28 +603,9 @@ interface components {
|
|
|
313
603
|
pathItems: never;
|
|
314
604
|
}
|
|
315
605
|
interface operations {
|
|
316
|
-
|
|
606
|
+
listCampaigns: {
|
|
317
607
|
parameters: {
|
|
318
|
-
query?:
|
|
319
|
-
/** @description Only this batch. */
|
|
320
|
-
batch_id?: string;
|
|
321
|
-
/** @description `next_cursor` from the previous page. */
|
|
322
|
-
cursor?: string;
|
|
323
|
-
/** @description Received at or after (ISO 8601). */
|
|
324
|
-
from?: string;
|
|
325
|
-
/** @description Page size. */
|
|
326
|
-
limit?: number;
|
|
327
|
-
/** @description Only this status. */
|
|
328
|
-
status?: components["schemas"]["MessageStatus"];
|
|
329
|
-
/** @description Only messages with this tag. */
|
|
330
|
-
tag?: string;
|
|
331
|
-
/** @description Recipient number, or part of it. */
|
|
332
|
-
to?: string;
|
|
333
|
-
/** @description Only this type. */
|
|
334
|
-
type?: components["schemas"]["MessageType"];
|
|
335
|
-
/** @description Received before (ISO 8601). */
|
|
336
|
-
until?: string;
|
|
337
|
-
};
|
|
608
|
+
query?: never;
|
|
338
609
|
header?: never;
|
|
339
610
|
path: {
|
|
340
611
|
/** @description The project's slug. */
|
|
@@ -344,13 +615,13 @@ interface operations {
|
|
|
344
615
|
};
|
|
345
616
|
requestBody?: never;
|
|
346
617
|
responses: {
|
|
347
|
-
/** @description
|
|
618
|
+
/** @description All of them. */
|
|
348
619
|
200: {
|
|
349
620
|
headers: {
|
|
350
621
|
[name: string]: unknown;
|
|
351
622
|
};
|
|
352
623
|
content: {
|
|
353
|
-
"application/json": components["schemas"]["
|
|
624
|
+
"application/json": components["schemas"]["CampaignList"];
|
|
354
625
|
};
|
|
355
626
|
};
|
|
356
627
|
400: components["responses"]["BadRequest"];
|
|
@@ -359,13 +630,10 @@ interface operations {
|
|
|
359
630
|
429: components["responses"]["TooManyRequests"];
|
|
360
631
|
};
|
|
361
632
|
};
|
|
362
|
-
|
|
633
|
+
createCampaign: {
|
|
363
634
|
parameters: {
|
|
364
635
|
query?: never;
|
|
365
|
-
header?:
|
|
366
|
-
/** @description Repeating a request with the same key returns the first message instead of sending again. */
|
|
367
|
-
"Idempotency-Key"?: string;
|
|
368
|
-
};
|
|
636
|
+
header?: never;
|
|
369
637
|
path: {
|
|
370
638
|
/** @description The project's slug. */
|
|
371
639
|
project: components["parameters"]["Project"];
|
|
@@ -374,19 +642,17 @@ interface operations {
|
|
|
374
642
|
};
|
|
375
643
|
requestBody: {
|
|
376
644
|
content: {
|
|
377
|
-
"application/json": components["schemas"]["
|
|
645
|
+
"application/json": components["schemas"]["CampaignRequest"];
|
|
378
646
|
};
|
|
379
647
|
};
|
|
380
648
|
responses: {
|
|
381
|
-
/** @description
|
|
382
|
-
|
|
649
|
+
/** @description Created, as a draft. */
|
|
650
|
+
201: {
|
|
383
651
|
headers: {
|
|
384
|
-
/** @description `true` when this is a replay of an earlier request. */
|
|
385
|
-
"Idempotent-Replayed"?: string;
|
|
386
652
|
[name: string]: unknown;
|
|
387
653
|
};
|
|
388
654
|
content: {
|
|
389
|
-
"application/json": components["schemas"]["
|
|
655
|
+
"application/json": components["schemas"]["CampaignApiView"];
|
|
390
656
|
};
|
|
391
657
|
};
|
|
392
658
|
400: components["responses"]["BadRequest"];
|
|
@@ -395,12 +661,12 @@ interface operations {
|
|
|
395
661
|
429: components["responses"]["TooManyRequests"];
|
|
396
662
|
};
|
|
397
663
|
};
|
|
398
|
-
|
|
664
|
+
getCampaign: {
|
|
399
665
|
parameters: {
|
|
400
666
|
query?: never;
|
|
401
667
|
header?: never;
|
|
402
668
|
path: {
|
|
403
|
-
/** @description
|
|
669
|
+
/** @description Campaign id. */
|
|
404
670
|
id: string;
|
|
405
671
|
/** @description The project's slug. */
|
|
406
672
|
project: components["parameters"]["Project"];
|
|
@@ -409,13 +675,13 @@ interface operations {
|
|
|
409
675
|
};
|
|
410
676
|
requestBody?: never;
|
|
411
677
|
responses: {
|
|
412
|
-
/** @description The
|
|
678
|
+
/** @description The campaign. */
|
|
413
679
|
200: {
|
|
414
680
|
headers: {
|
|
415
681
|
[name: string]: unknown;
|
|
416
682
|
};
|
|
417
683
|
content: {
|
|
418
|
-
"application/json": components["schemas"]["
|
|
684
|
+
"application/json": components["schemas"]["CampaignApiView"];
|
|
419
685
|
};
|
|
420
686
|
};
|
|
421
687
|
400: components["responses"]["BadRequest"];
|
|
@@ -424,12 +690,12 @@ interface operations {
|
|
|
424
690
|
429: components["responses"]["TooManyRequests"];
|
|
425
691
|
};
|
|
426
692
|
};
|
|
427
|
-
|
|
693
|
+
deleteCampaign: {
|
|
428
694
|
parameters: {
|
|
429
695
|
query?: never;
|
|
430
696
|
header?: never;
|
|
431
697
|
path: {
|
|
432
|
-
/** @description
|
|
698
|
+
/** @description Campaign id. */
|
|
433
699
|
id: string;
|
|
434
700
|
/** @description The project's slug. */
|
|
435
701
|
project: components["parameters"]["Project"];
|
|
@@ -438,14 +704,12 @@ interface operations {
|
|
|
438
704
|
};
|
|
439
705
|
requestBody?: never;
|
|
440
706
|
responses: {
|
|
441
|
-
/** @description
|
|
442
|
-
|
|
707
|
+
/** @description Deleted. */
|
|
708
|
+
204: {
|
|
443
709
|
headers: {
|
|
444
710
|
[name: string]: unknown;
|
|
445
711
|
};
|
|
446
|
-
content
|
|
447
|
-
"application/json": components["schemas"]["MessageView"];
|
|
448
|
-
};
|
|
712
|
+
content?: never;
|
|
449
713
|
};
|
|
450
714
|
400: components["responses"]["BadRequest"];
|
|
451
715
|
401: components["responses"]["Unauthorized"];
|
|
@@ -453,11 +717,13 @@ interface operations {
|
|
|
453
717
|
429: components["responses"]["TooManyRequests"];
|
|
454
718
|
};
|
|
455
719
|
};
|
|
456
|
-
|
|
720
|
+
updateCampaign: {
|
|
457
721
|
parameters: {
|
|
458
722
|
query?: never;
|
|
459
723
|
header?: never;
|
|
460
724
|
path: {
|
|
725
|
+
/** @description Campaign id. */
|
|
726
|
+
id: string;
|
|
461
727
|
/** @description The project's slug. */
|
|
462
728
|
project: components["parameters"]["Project"];
|
|
463
729
|
};
|
|
@@ -465,17 +731,17 @@ interface operations {
|
|
|
465
731
|
};
|
|
466
732
|
requestBody: {
|
|
467
733
|
content: {
|
|
468
|
-
"application/json": components["schemas"]["
|
|
734
|
+
"application/json": components["schemas"]["CampaignUpdate"];
|
|
469
735
|
};
|
|
470
736
|
};
|
|
471
737
|
responses: {
|
|
472
|
-
/** @description
|
|
473
|
-
|
|
738
|
+
/** @description The updated campaign. */
|
|
739
|
+
200: {
|
|
474
740
|
headers: {
|
|
475
741
|
[name: string]: unknown;
|
|
476
742
|
};
|
|
477
743
|
content: {
|
|
478
|
-
"application/json": components["schemas"]["
|
|
744
|
+
"application/json": components["schemas"]["CampaignApiView"];
|
|
479
745
|
};
|
|
480
746
|
};
|
|
481
747
|
400: components["responses"]["BadRequest"];
|
|
@@ -484,29 +750,27 @@ interface operations {
|
|
|
484
750
|
429: components["responses"]["TooManyRequests"];
|
|
485
751
|
};
|
|
486
752
|
};
|
|
487
|
-
|
|
753
|
+
cancelCampaign: {
|
|
488
754
|
parameters: {
|
|
489
755
|
query?: never;
|
|
490
756
|
header?: never;
|
|
491
757
|
path: {
|
|
758
|
+
/** @description Campaign id. */
|
|
759
|
+
id: string;
|
|
492
760
|
/** @description The project's slug. */
|
|
493
761
|
project: components["parameters"]["Project"];
|
|
494
762
|
};
|
|
495
763
|
cookie?: never;
|
|
496
764
|
};
|
|
497
|
-
requestBody
|
|
498
|
-
content: {
|
|
499
|
-
"application/json": components["schemas"]["OtpRequest"];
|
|
500
|
-
};
|
|
501
|
-
};
|
|
765
|
+
requestBody?: never;
|
|
502
766
|
responses: {
|
|
503
|
-
/** @description
|
|
504
|
-
|
|
767
|
+
/** @description The campaign. */
|
|
768
|
+
200: {
|
|
505
769
|
headers: {
|
|
506
770
|
[name: string]: unknown;
|
|
507
771
|
};
|
|
508
772
|
content: {
|
|
509
|
-
"application/json": components["schemas"]["
|
|
773
|
+
"application/json": components["schemas"]["CampaignApiView"];
|
|
510
774
|
};
|
|
511
775
|
};
|
|
512
776
|
400: components["responses"]["BadRequest"];
|
|
@@ -515,11 +779,13 @@ interface operations {
|
|
|
515
779
|
429: components["responses"]["TooManyRequests"];
|
|
516
780
|
};
|
|
517
781
|
};
|
|
518
|
-
|
|
782
|
+
controlCampaign: {
|
|
519
783
|
parameters: {
|
|
520
784
|
query?: never;
|
|
521
785
|
header?: never;
|
|
522
786
|
path: {
|
|
787
|
+
/** @description Campaign id. */
|
|
788
|
+
id: string;
|
|
523
789
|
/** @description The project's slug. */
|
|
524
790
|
project: components["parameters"]["Project"];
|
|
525
791
|
};
|
|
@@ -527,17 +793,17 @@ interface operations {
|
|
|
527
793
|
};
|
|
528
794
|
requestBody: {
|
|
529
795
|
content: {
|
|
530
|
-
"application/json": components["schemas"]["
|
|
796
|
+
"application/json": components["schemas"]["CampaignControlRequest"];
|
|
531
797
|
};
|
|
532
798
|
};
|
|
533
799
|
responses: {
|
|
534
|
-
/** @description
|
|
800
|
+
/** @description The campaign. */
|
|
535
801
|
200: {
|
|
536
802
|
headers: {
|
|
537
803
|
[name: string]: unknown;
|
|
538
804
|
};
|
|
539
805
|
content: {
|
|
540
|
-
"application/json": components["schemas"]["
|
|
806
|
+
"application/json": components["schemas"]["CampaignApiView"];
|
|
541
807
|
};
|
|
542
808
|
};
|
|
543
809
|
400: components["responses"]["BadRequest"];
|
|
@@ -546,11 +812,13 @@ interface operations {
|
|
|
546
812
|
429: components["responses"]["TooManyRequests"];
|
|
547
813
|
};
|
|
548
814
|
};
|
|
549
|
-
|
|
815
|
+
previewCampaign: {
|
|
550
816
|
parameters: {
|
|
551
817
|
query?: never;
|
|
552
818
|
header?: never;
|
|
553
819
|
path: {
|
|
820
|
+
/** @description Campaign id. */
|
|
821
|
+
id: string;
|
|
554
822
|
/** @description The project's slug. */
|
|
555
823
|
project: components["parameters"]["Project"];
|
|
556
824
|
};
|
|
@@ -558,13 +826,13 @@ interface operations {
|
|
|
558
826
|
};
|
|
559
827
|
requestBody?: never;
|
|
560
828
|
responses: {
|
|
561
|
-
/** @description
|
|
829
|
+
/** @description The count, and what each rule took out. */
|
|
562
830
|
200: {
|
|
563
831
|
headers: {
|
|
564
832
|
[name: string]: unknown;
|
|
565
833
|
};
|
|
566
834
|
content: {
|
|
567
|
-
"application/json": components["schemas"]["
|
|
835
|
+
"application/json": components["schemas"]["CampaignPreviewResponse"];
|
|
568
836
|
};
|
|
569
837
|
};
|
|
570
838
|
400: components["responses"]["BadRequest"];
|
|
@@ -573,29 +841,27 @@ interface operations {
|
|
|
573
841
|
429: components["responses"]["TooManyRequests"];
|
|
574
842
|
};
|
|
575
843
|
};
|
|
576
|
-
|
|
844
|
+
campaignResults: {
|
|
577
845
|
parameters: {
|
|
578
846
|
query?: never;
|
|
579
847
|
header?: never;
|
|
580
848
|
path: {
|
|
849
|
+
/** @description Campaign id. */
|
|
850
|
+
id: string;
|
|
581
851
|
/** @description The project's slug. */
|
|
582
852
|
project: components["parameters"]["Project"];
|
|
583
853
|
};
|
|
584
854
|
cookie?: never;
|
|
585
855
|
};
|
|
586
|
-
requestBody
|
|
587
|
-
content: {
|
|
588
|
-
"application/json": components["schemas"]["ScheduleRequest"];
|
|
589
|
-
};
|
|
590
|
-
};
|
|
856
|
+
requestBody?: never;
|
|
591
857
|
responses: {
|
|
592
|
-
/** @description
|
|
593
|
-
|
|
858
|
+
/** @description The results. */
|
|
859
|
+
200: {
|
|
594
860
|
headers: {
|
|
595
861
|
[name: string]: unknown;
|
|
596
862
|
};
|
|
597
863
|
content: {
|
|
598
|
-
"application/json": components["schemas"]["
|
|
864
|
+
"application/json": components["schemas"]["CampaignResultsView"];
|
|
599
865
|
};
|
|
600
866
|
};
|
|
601
867
|
400: components["responses"]["BadRequest"];
|
|
@@ -604,12 +870,12 @@ interface operations {
|
|
|
604
870
|
429: components["responses"]["TooManyRequests"];
|
|
605
871
|
};
|
|
606
872
|
};
|
|
607
|
-
|
|
873
|
+
sendCampaign: {
|
|
608
874
|
parameters: {
|
|
609
875
|
query?: never;
|
|
610
876
|
header?: never;
|
|
611
877
|
path: {
|
|
612
|
-
/** @description
|
|
878
|
+
/** @description Campaign id. */
|
|
613
879
|
id: string;
|
|
614
880
|
/** @description The project's slug. */
|
|
615
881
|
project: components["parameters"]["Project"];
|
|
@@ -618,13 +884,13 @@ interface operations {
|
|
|
618
884
|
};
|
|
619
885
|
requestBody?: never;
|
|
620
886
|
responses: {
|
|
621
|
-
/** @description
|
|
622
|
-
|
|
887
|
+
/** @description Started. */
|
|
888
|
+
202: {
|
|
623
889
|
headers: {
|
|
624
890
|
[name: string]: unknown;
|
|
625
891
|
};
|
|
626
892
|
content: {
|
|
627
|
-
"application/json": components["schemas"]["
|
|
893
|
+
"application/json": components["schemas"]["CampaignSendResponse"];
|
|
628
894
|
};
|
|
629
895
|
};
|
|
630
896
|
400: components["responses"]["BadRequest"];
|
|
@@ -633,13 +899,11 @@ interface operations {
|
|
|
633
899
|
429: components["responses"]["TooManyRequests"];
|
|
634
900
|
};
|
|
635
901
|
};
|
|
636
|
-
|
|
902
|
+
listGroups: {
|
|
637
903
|
parameters: {
|
|
638
904
|
query?: never;
|
|
639
905
|
header?: never;
|
|
640
906
|
path: {
|
|
641
|
-
/** @description Schedule id. */
|
|
642
|
-
id: string;
|
|
643
907
|
/** @description The project's slug. */
|
|
644
908
|
project: components["parameters"]["Project"];
|
|
645
909
|
};
|
|
@@ -647,12 +911,14 @@ interface operations {
|
|
|
647
911
|
};
|
|
648
912
|
requestBody?: never;
|
|
649
913
|
responses: {
|
|
650
|
-
/** @description
|
|
651
|
-
|
|
914
|
+
/** @description All of them. */
|
|
915
|
+
200: {
|
|
652
916
|
headers: {
|
|
653
917
|
[name: string]: unknown;
|
|
654
918
|
};
|
|
655
|
-
content
|
|
919
|
+
content: {
|
|
920
|
+
"application/json": components["schemas"]["GroupList"];
|
|
921
|
+
};
|
|
656
922
|
};
|
|
657
923
|
400: components["responses"]["BadRequest"];
|
|
658
924
|
401: components["responses"]["Unauthorized"];
|
|
@@ -660,13 +926,11 @@ interface operations {
|
|
|
660
926
|
429: components["responses"]["TooManyRequests"];
|
|
661
927
|
};
|
|
662
928
|
};
|
|
663
|
-
|
|
929
|
+
createGroup: {
|
|
664
930
|
parameters: {
|
|
665
931
|
query?: never;
|
|
666
932
|
header?: never;
|
|
667
933
|
path: {
|
|
668
|
-
/** @description Schedule id. */
|
|
669
|
-
id: string;
|
|
670
934
|
/** @description The project's slug. */
|
|
671
935
|
project: components["parameters"]["Project"];
|
|
672
936
|
};
|
|
@@ -674,17 +938,46 @@ interface operations {
|
|
|
674
938
|
};
|
|
675
939
|
requestBody: {
|
|
676
940
|
content: {
|
|
677
|
-
"application/json": components["schemas"]["
|
|
941
|
+
"application/json": components["schemas"]["GroupRequest"];
|
|
678
942
|
};
|
|
679
943
|
};
|
|
680
944
|
responses: {
|
|
681
|
-
/** @description
|
|
945
|
+
/** @description Created. */
|
|
946
|
+
201: {
|
|
947
|
+
headers: {
|
|
948
|
+
[name: string]: unknown;
|
|
949
|
+
};
|
|
950
|
+
content: {
|
|
951
|
+
"application/json": components["schemas"]["GroupApiView"];
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
400: components["responses"]["BadRequest"];
|
|
955
|
+
401: components["responses"]["Unauthorized"];
|
|
956
|
+
404: components["responses"]["NotFound"];
|
|
957
|
+
429: components["responses"]["TooManyRequests"];
|
|
958
|
+
};
|
|
959
|
+
};
|
|
960
|
+
getGroup: {
|
|
961
|
+
parameters: {
|
|
962
|
+
query?: never;
|
|
963
|
+
header?: never;
|
|
964
|
+
path: {
|
|
965
|
+
/** @description Group id. */
|
|
966
|
+
id: string;
|
|
967
|
+
/** @description The project's slug. */
|
|
968
|
+
project: components["parameters"]["Project"];
|
|
969
|
+
};
|
|
970
|
+
cookie?: never;
|
|
971
|
+
};
|
|
972
|
+
requestBody?: never;
|
|
973
|
+
responses: {
|
|
974
|
+
/** @description The group. */
|
|
682
975
|
200: {
|
|
683
976
|
headers: {
|
|
684
977
|
[name: string]: unknown;
|
|
685
978
|
};
|
|
686
979
|
content: {
|
|
687
|
-
"application/json": components["schemas"]["
|
|
980
|
+
"application/json": components["schemas"]["GroupApiView"];
|
|
688
981
|
};
|
|
689
982
|
};
|
|
690
983
|
400: components["responses"]["BadRequest"];
|
|
@@ -693,34 +986,616 @@ interface operations {
|
|
|
693
986
|
429: components["responses"]["TooManyRequests"];
|
|
694
987
|
};
|
|
695
988
|
};
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
989
|
+
deleteGroup: {
|
|
990
|
+
parameters: {
|
|
991
|
+
query?: never;
|
|
992
|
+
header?: never;
|
|
993
|
+
path: {
|
|
994
|
+
/** @description Group id. */
|
|
995
|
+
id: string;
|
|
996
|
+
/** @description The project's slug. */
|
|
997
|
+
project: components["parameters"]["Project"];
|
|
998
|
+
};
|
|
999
|
+
cookie?: never;
|
|
1000
|
+
};
|
|
1001
|
+
requestBody?: never;
|
|
1002
|
+
responses: {
|
|
1003
|
+
/** @description Deleted. */
|
|
1004
|
+
204: {
|
|
1005
|
+
headers: {
|
|
1006
|
+
[name: string]: unknown;
|
|
1007
|
+
};
|
|
1008
|
+
content?: never;
|
|
1009
|
+
};
|
|
1010
|
+
400: components["responses"]["BadRequest"];
|
|
1011
|
+
401: components["responses"]["Unauthorized"];
|
|
1012
|
+
404: components["responses"]["NotFound"];
|
|
1013
|
+
429: components["responses"]["TooManyRequests"];
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
updateGroup: {
|
|
1017
|
+
parameters: {
|
|
1018
|
+
query?: never;
|
|
1019
|
+
header?: never;
|
|
1020
|
+
path: {
|
|
1021
|
+
/** @description Group id. */
|
|
1022
|
+
id: string;
|
|
1023
|
+
/** @description The project's slug. */
|
|
1024
|
+
project: components["parameters"]["Project"];
|
|
1025
|
+
};
|
|
1026
|
+
cookie?: never;
|
|
1027
|
+
};
|
|
1028
|
+
requestBody: {
|
|
1029
|
+
content: {
|
|
1030
|
+
"application/json": components["schemas"]["GroupUpdate"];
|
|
1031
|
+
};
|
|
1032
|
+
};
|
|
1033
|
+
responses: {
|
|
1034
|
+
/** @description The updated group. */
|
|
1035
|
+
200: {
|
|
1036
|
+
headers: {
|
|
1037
|
+
[name: string]: unknown;
|
|
1038
|
+
};
|
|
1039
|
+
content: {
|
|
1040
|
+
"application/json": components["schemas"]["GroupApiView"];
|
|
1041
|
+
};
|
|
1042
|
+
};
|
|
1043
|
+
400: components["responses"]["BadRequest"];
|
|
1044
|
+
401: components["responses"]["Unauthorized"];
|
|
1045
|
+
404: components["responses"]["NotFound"];
|
|
1046
|
+
429: components["responses"]["TooManyRequests"];
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
listGroupMembers: {
|
|
1050
|
+
parameters: {
|
|
1051
|
+
query?: {
|
|
1052
|
+
/** @description next_cursor from the previous page. */
|
|
1053
|
+
cursor?: string;
|
|
1054
|
+
/** @description 1-200, default 50. */
|
|
1055
|
+
limit?: number;
|
|
1056
|
+
};
|
|
1057
|
+
header?: never;
|
|
1058
|
+
path: {
|
|
1059
|
+
/** @description Group id. */
|
|
1060
|
+
id: string;
|
|
1061
|
+
/** @description The project's slug. */
|
|
1062
|
+
project: components["parameters"]["Project"];
|
|
1063
|
+
};
|
|
1064
|
+
cookie?: never;
|
|
1065
|
+
};
|
|
1066
|
+
requestBody?: never;
|
|
1067
|
+
responses: {
|
|
1068
|
+
/** @description One page. */
|
|
1069
|
+
200: {
|
|
1070
|
+
headers: {
|
|
1071
|
+
[name: string]: unknown;
|
|
1072
|
+
};
|
|
1073
|
+
content: {
|
|
1074
|
+
"application/json": components["schemas"]["GroupMemberPage"];
|
|
1075
|
+
};
|
|
1076
|
+
};
|
|
1077
|
+
400: components["responses"]["BadRequest"];
|
|
1078
|
+
401: components["responses"]["Unauthorized"];
|
|
1079
|
+
404: components["responses"]["NotFound"];
|
|
1080
|
+
429: components["responses"]["TooManyRequests"];
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
addGroupMembers: {
|
|
1084
|
+
parameters: {
|
|
1085
|
+
query?: never;
|
|
1086
|
+
header?: never;
|
|
1087
|
+
path: {
|
|
1088
|
+
/** @description Group id. */
|
|
1089
|
+
id: string;
|
|
1090
|
+
/** @description The project's slug. */
|
|
1091
|
+
project: components["parameters"]["Project"];
|
|
1092
|
+
};
|
|
1093
|
+
cookie?: never;
|
|
1094
|
+
};
|
|
1095
|
+
requestBody: {
|
|
1096
|
+
content: {
|
|
1097
|
+
"application/json": components["schemas"]["GroupMembersRequest"];
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
responses: {
|
|
1101
|
+
/** @description How many were added. */
|
|
1102
|
+
200: {
|
|
1103
|
+
headers: {
|
|
1104
|
+
[name: string]: unknown;
|
|
1105
|
+
};
|
|
1106
|
+
content: {
|
|
1107
|
+
"application/json": components["schemas"]["GroupMembersResponse"];
|
|
1108
|
+
};
|
|
1109
|
+
};
|
|
1110
|
+
400: components["responses"]["BadRequest"];
|
|
1111
|
+
401: components["responses"]["Unauthorized"];
|
|
1112
|
+
404: components["responses"]["NotFound"];
|
|
1113
|
+
429: components["responses"]["TooManyRequests"];
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
removeGroupMember: {
|
|
1117
|
+
parameters: {
|
|
1118
|
+
query?: never;
|
|
1119
|
+
header?: never;
|
|
1120
|
+
path: {
|
|
1121
|
+
/** @description Group id. */
|
|
1122
|
+
id: string;
|
|
1123
|
+
/** @description The number, URL-encoded (`%2B14155550123`). */
|
|
1124
|
+
phone: string;
|
|
1125
|
+
/** @description The project's slug. */
|
|
1126
|
+
project: components["parameters"]["Project"];
|
|
1127
|
+
};
|
|
1128
|
+
cookie?: never;
|
|
1129
|
+
};
|
|
1130
|
+
requestBody?: never;
|
|
1131
|
+
responses: {
|
|
1132
|
+
/** @description Removed. */
|
|
1133
|
+
204: {
|
|
1134
|
+
headers: {
|
|
1135
|
+
[name: string]: unknown;
|
|
1136
|
+
};
|
|
1137
|
+
content?: never;
|
|
1138
|
+
};
|
|
1139
|
+
400: components["responses"]["BadRequest"];
|
|
1140
|
+
401: components["responses"]["Unauthorized"];
|
|
1141
|
+
404: components["responses"]["NotFound"];
|
|
1142
|
+
429: components["responses"]["TooManyRequests"];
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1145
|
+
listMessages: {
|
|
1146
|
+
parameters: {
|
|
1147
|
+
query?: {
|
|
1148
|
+
/** @description Only this batch. */
|
|
1149
|
+
batch_id?: string;
|
|
1150
|
+
/** @description `next_cursor` from the previous page. */
|
|
1151
|
+
cursor?: string;
|
|
1152
|
+
/** @description Received at or after (ISO 8601). */
|
|
1153
|
+
from?: string;
|
|
1154
|
+
/** @description Page size. */
|
|
1155
|
+
limit?: number;
|
|
1156
|
+
/** @description Only this status. */
|
|
1157
|
+
status?: components["schemas"]["MessageStatus"];
|
|
1158
|
+
/** @description Only messages with this tag. */
|
|
1159
|
+
tag?: string;
|
|
1160
|
+
/** @description Recipient number, or part of it. */
|
|
1161
|
+
to?: string;
|
|
1162
|
+
/** @description Only this type. */
|
|
1163
|
+
type?: components["schemas"]["MessageType"];
|
|
1164
|
+
/** @description Received before (ISO 8601). */
|
|
1165
|
+
until?: string;
|
|
1166
|
+
};
|
|
1167
|
+
header?: never;
|
|
1168
|
+
path: {
|
|
1169
|
+
/** @description The project's slug. */
|
|
1170
|
+
project: components["parameters"]["Project"];
|
|
1171
|
+
};
|
|
1172
|
+
cookie?: never;
|
|
1173
|
+
};
|
|
1174
|
+
requestBody?: never;
|
|
1175
|
+
responses: {
|
|
1176
|
+
/** @description One page. */
|
|
1177
|
+
200: {
|
|
1178
|
+
headers: {
|
|
1179
|
+
[name: string]: unknown;
|
|
1180
|
+
};
|
|
1181
|
+
content: {
|
|
1182
|
+
"application/json": components["schemas"]["MessagePage"];
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1185
|
+
400: components["responses"]["BadRequest"];
|
|
1186
|
+
401: components["responses"]["Unauthorized"];
|
|
1187
|
+
404: components["responses"]["NotFound"];
|
|
1188
|
+
429: components["responses"]["TooManyRequests"];
|
|
1189
|
+
};
|
|
1190
|
+
};
|
|
1191
|
+
sendMessage: {
|
|
1192
|
+
parameters: {
|
|
1193
|
+
query?: never;
|
|
1194
|
+
header?: {
|
|
1195
|
+
/** @description Repeating a request with the same key returns the first message instead of sending again. */
|
|
1196
|
+
"Idempotency-Key"?: string;
|
|
1197
|
+
};
|
|
1198
|
+
path: {
|
|
1199
|
+
/** @description The project's slug. */
|
|
1200
|
+
project: components["parameters"]["Project"];
|
|
1201
|
+
};
|
|
1202
|
+
cookie?: never;
|
|
1203
|
+
};
|
|
1204
|
+
requestBody: {
|
|
1205
|
+
content: {
|
|
1206
|
+
"application/json": components["schemas"]["SendMessageRequest"];
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
responses: {
|
|
1210
|
+
/** @description Queued for the phone. */
|
|
1211
|
+
202: {
|
|
1212
|
+
headers: {
|
|
1213
|
+
/** @description `true` when this is a replay of an earlier request. */
|
|
1214
|
+
"Idempotent-Replayed"?: string;
|
|
1215
|
+
[name: string]: unknown;
|
|
1216
|
+
};
|
|
1217
|
+
content: {
|
|
1218
|
+
"application/json": components["schemas"]["MessageView"];
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
1221
|
+
400: components["responses"]["BadRequest"];
|
|
1222
|
+
401: components["responses"]["Unauthorized"];
|
|
1223
|
+
404: components["responses"]["NotFound"];
|
|
1224
|
+
429: components["responses"]["TooManyRequests"];
|
|
1225
|
+
};
|
|
1226
|
+
};
|
|
1227
|
+
getMessage: {
|
|
1228
|
+
parameters: {
|
|
1229
|
+
query?: never;
|
|
1230
|
+
header?: never;
|
|
1231
|
+
path: {
|
|
1232
|
+
/** @description Message id (`msg_…`). */
|
|
1233
|
+
id: string;
|
|
1234
|
+
/** @description The project's slug. */
|
|
1235
|
+
project: components["parameters"]["Project"];
|
|
1236
|
+
};
|
|
1237
|
+
cookie?: never;
|
|
1238
|
+
};
|
|
1239
|
+
requestBody?: never;
|
|
1240
|
+
responses: {
|
|
1241
|
+
/** @description The message. */
|
|
1242
|
+
200: {
|
|
1243
|
+
headers: {
|
|
1244
|
+
[name: string]: unknown;
|
|
1245
|
+
};
|
|
1246
|
+
content: {
|
|
1247
|
+
"application/json": components["schemas"]["MessageView"];
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
400: components["responses"]["BadRequest"];
|
|
1251
|
+
401: components["responses"]["Unauthorized"];
|
|
1252
|
+
404: components["responses"]["NotFound"];
|
|
1253
|
+
429: components["responses"]["TooManyRequests"];
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
cancelMessage: {
|
|
1257
|
+
parameters: {
|
|
1258
|
+
query?: never;
|
|
1259
|
+
header?: never;
|
|
1260
|
+
path: {
|
|
1261
|
+
/** @description Message id (`msg_…`). */
|
|
1262
|
+
id: string;
|
|
1263
|
+
/** @description The project's slug. */
|
|
1264
|
+
project: components["parameters"]["Project"];
|
|
1265
|
+
};
|
|
1266
|
+
cookie?: never;
|
|
1267
|
+
};
|
|
1268
|
+
requestBody?: never;
|
|
1269
|
+
responses: {
|
|
1270
|
+
/** @description The cancelled message. */
|
|
1271
|
+
200: {
|
|
1272
|
+
headers: {
|
|
1273
|
+
[name: string]: unknown;
|
|
1274
|
+
};
|
|
1275
|
+
content: {
|
|
1276
|
+
"application/json": components["schemas"]["MessageView"];
|
|
1277
|
+
};
|
|
1278
|
+
};
|
|
1279
|
+
400: components["responses"]["BadRequest"];
|
|
1280
|
+
401: components["responses"]["Unauthorized"];
|
|
1281
|
+
404: components["responses"]["NotFound"];
|
|
1282
|
+
429: components["responses"]["TooManyRequests"];
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
sendBulk: {
|
|
1286
|
+
parameters: {
|
|
1287
|
+
query?: never;
|
|
1288
|
+
header?: never;
|
|
1289
|
+
path: {
|
|
1290
|
+
/** @description The project's slug. */
|
|
1291
|
+
project: components["parameters"]["Project"];
|
|
1292
|
+
};
|
|
1293
|
+
cookie?: never;
|
|
1294
|
+
};
|
|
1295
|
+
requestBody: {
|
|
1296
|
+
content: {
|
|
1297
|
+
"application/json": components["schemas"]["BulkSendRequest"];
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
responses: {
|
|
1301
|
+
/** @description Batch queued. */
|
|
1302
|
+
202: {
|
|
1303
|
+
headers: {
|
|
1304
|
+
[name: string]: unknown;
|
|
1305
|
+
};
|
|
1306
|
+
content: {
|
|
1307
|
+
"application/json": components["schemas"]["BulkSendResponse"];
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
400: components["responses"]["BadRequest"];
|
|
1311
|
+
401: components["responses"]["Unauthorized"];
|
|
1312
|
+
404: components["responses"]["NotFound"];
|
|
1313
|
+
429: components["responses"]["TooManyRequests"];
|
|
1314
|
+
};
|
|
1315
|
+
};
|
|
1316
|
+
sendOtp: {
|
|
1317
|
+
parameters: {
|
|
1318
|
+
query?: never;
|
|
1319
|
+
header?: never;
|
|
1320
|
+
path: {
|
|
1321
|
+
/** @description The project's slug. */
|
|
1322
|
+
project: components["parameters"]["Project"];
|
|
1323
|
+
};
|
|
1324
|
+
cookie?: never;
|
|
1325
|
+
};
|
|
1326
|
+
requestBody: {
|
|
1327
|
+
content: {
|
|
1328
|
+
"application/json": components["schemas"]["OtpRequest"];
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
responses: {
|
|
1332
|
+
/** @description Code sent. */
|
|
1333
|
+
202: {
|
|
1334
|
+
headers: {
|
|
1335
|
+
[name: string]: unknown;
|
|
1336
|
+
};
|
|
1337
|
+
content: {
|
|
1338
|
+
"application/json": components["schemas"]["OtpResponse"];
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
400: components["responses"]["BadRequest"];
|
|
1342
|
+
401: components["responses"]["Unauthorized"];
|
|
1343
|
+
404: components["responses"]["NotFound"];
|
|
1344
|
+
429: components["responses"]["TooManyRequests"];
|
|
1345
|
+
};
|
|
1346
|
+
};
|
|
1347
|
+
verifyOtp: {
|
|
1348
|
+
parameters: {
|
|
1349
|
+
query?: never;
|
|
1350
|
+
header?: never;
|
|
1351
|
+
path: {
|
|
1352
|
+
/** @description The project's slug. */
|
|
1353
|
+
project: components["parameters"]["Project"];
|
|
1354
|
+
};
|
|
1355
|
+
cookie?: never;
|
|
1356
|
+
};
|
|
1357
|
+
requestBody: {
|
|
1358
|
+
content: {
|
|
1359
|
+
"application/json": components["schemas"]["OtpVerifyRequest"];
|
|
1360
|
+
};
|
|
1361
|
+
};
|
|
1362
|
+
responses: {
|
|
1363
|
+
/** @description Whether the code is right, and why not. */
|
|
1364
|
+
200: {
|
|
1365
|
+
headers: {
|
|
1366
|
+
[name: string]: unknown;
|
|
1367
|
+
};
|
|
1368
|
+
content: {
|
|
1369
|
+
"application/json": components["schemas"]["OtpVerifyResponse"];
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
400: components["responses"]["BadRequest"];
|
|
1373
|
+
401: components["responses"]["Unauthorized"];
|
|
1374
|
+
404: components["responses"]["NotFound"];
|
|
1375
|
+
429: components["responses"]["TooManyRequests"];
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
listSchedules: {
|
|
1379
|
+
parameters: {
|
|
1380
|
+
query?: never;
|
|
1381
|
+
header?: never;
|
|
1382
|
+
path: {
|
|
1383
|
+
/** @description The project's slug. */
|
|
1384
|
+
project: components["parameters"]["Project"];
|
|
1385
|
+
};
|
|
1386
|
+
cookie?: never;
|
|
1387
|
+
};
|
|
1388
|
+
requestBody?: never;
|
|
1389
|
+
responses: {
|
|
1390
|
+
/** @description All of them. */
|
|
1391
|
+
200: {
|
|
1392
|
+
headers: {
|
|
1393
|
+
[name: string]: unknown;
|
|
1394
|
+
};
|
|
1395
|
+
content: {
|
|
1396
|
+
"application/json": components["schemas"]["SchedulePage"];
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
400: components["responses"]["BadRequest"];
|
|
1400
|
+
401: components["responses"]["Unauthorized"];
|
|
1401
|
+
404: components["responses"]["NotFound"];
|
|
1402
|
+
429: components["responses"]["TooManyRequests"];
|
|
1403
|
+
};
|
|
1404
|
+
};
|
|
1405
|
+
createSchedule: {
|
|
1406
|
+
parameters: {
|
|
1407
|
+
query?: never;
|
|
1408
|
+
header?: never;
|
|
1409
|
+
path: {
|
|
1410
|
+
/** @description The project's slug. */
|
|
1411
|
+
project: components["parameters"]["Project"];
|
|
1412
|
+
};
|
|
1413
|
+
cookie?: never;
|
|
1414
|
+
};
|
|
1415
|
+
requestBody: {
|
|
1416
|
+
content: {
|
|
1417
|
+
"application/json": components["schemas"]["ScheduleRequest"];
|
|
1418
|
+
};
|
|
1419
|
+
};
|
|
1420
|
+
responses: {
|
|
1421
|
+
/** @description Created. */
|
|
1422
|
+
201: {
|
|
1423
|
+
headers: {
|
|
1424
|
+
[name: string]: unknown;
|
|
1425
|
+
};
|
|
1426
|
+
content: {
|
|
1427
|
+
"application/json": components["schemas"]["ScheduleView"];
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1430
|
+
400: components["responses"]["BadRequest"];
|
|
1431
|
+
401: components["responses"]["Unauthorized"];
|
|
1432
|
+
404: components["responses"]["NotFound"];
|
|
1433
|
+
429: components["responses"]["TooManyRequests"];
|
|
1434
|
+
};
|
|
1435
|
+
};
|
|
1436
|
+
getSchedule: {
|
|
1437
|
+
parameters: {
|
|
1438
|
+
query?: never;
|
|
1439
|
+
header?: never;
|
|
1440
|
+
path: {
|
|
1441
|
+
/** @description Schedule id. */
|
|
1442
|
+
id: string;
|
|
1443
|
+
/** @description The project's slug. */
|
|
1444
|
+
project: components["parameters"]["Project"];
|
|
1445
|
+
};
|
|
1446
|
+
cookie?: never;
|
|
1447
|
+
};
|
|
1448
|
+
requestBody?: never;
|
|
1449
|
+
responses: {
|
|
1450
|
+
/** @description The schedule. */
|
|
1451
|
+
200: {
|
|
1452
|
+
headers: {
|
|
1453
|
+
[name: string]: unknown;
|
|
1454
|
+
};
|
|
1455
|
+
content: {
|
|
1456
|
+
"application/json": components["schemas"]["ScheduleView"];
|
|
1457
|
+
};
|
|
1458
|
+
};
|
|
1459
|
+
400: components["responses"]["BadRequest"];
|
|
1460
|
+
401: components["responses"]["Unauthorized"];
|
|
1461
|
+
404: components["responses"]["NotFound"];
|
|
1462
|
+
429: components["responses"]["TooManyRequests"];
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
deleteSchedule: {
|
|
1466
|
+
parameters: {
|
|
1467
|
+
query?: never;
|
|
1468
|
+
header?: never;
|
|
1469
|
+
path: {
|
|
1470
|
+
/** @description Schedule id. */
|
|
1471
|
+
id: string;
|
|
1472
|
+
/** @description The project's slug. */
|
|
1473
|
+
project: components["parameters"]["Project"];
|
|
1474
|
+
};
|
|
1475
|
+
cookie?: never;
|
|
1476
|
+
};
|
|
1477
|
+
requestBody?: never;
|
|
1478
|
+
responses: {
|
|
1479
|
+
/** @description Deleted. */
|
|
1480
|
+
204: {
|
|
1481
|
+
headers: {
|
|
1482
|
+
[name: string]: unknown;
|
|
1483
|
+
};
|
|
1484
|
+
content?: never;
|
|
1485
|
+
};
|
|
1486
|
+
400: components["responses"]["BadRequest"];
|
|
1487
|
+
401: components["responses"]["Unauthorized"];
|
|
1488
|
+
404: components["responses"]["NotFound"];
|
|
1489
|
+
429: components["responses"]["TooManyRequests"];
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
updateSchedule: {
|
|
1493
|
+
parameters: {
|
|
1494
|
+
query?: never;
|
|
1495
|
+
header?: never;
|
|
1496
|
+
path: {
|
|
1497
|
+
/** @description Schedule id. */
|
|
1498
|
+
id: string;
|
|
1499
|
+
/** @description The project's slug. */
|
|
1500
|
+
project: components["parameters"]["Project"];
|
|
1501
|
+
};
|
|
1502
|
+
cookie?: never;
|
|
1503
|
+
};
|
|
1504
|
+
requestBody: {
|
|
1505
|
+
content: {
|
|
1506
|
+
"application/json": components["schemas"]["ScheduleUpdate"];
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1509
|
+
responses: {
|
|
1510
|
+
/** @description The updated schedule. */
|
|
1511
|
+
200: {
|
|
1512
|
+
headers: {
|
|
1513
|
+
[name: string]: unknown;
|
|
1514
|
+
};
|
|
1515
|
+
content: {
|
|
1516
|
+
"application/json": components["schemas"]["ScheduleView"];
|
|
1517
|
+
};
|
|
1518
|
+
};
|
|
1519
|
+
400: components["responses"]["BadRequest"];
|
|
1520
|
+
401: components["responses"]["Unauthorized"];
|
|
1521
|
+
404: components["responses"]["NotFound"];
|
|
1522
|
+
429: components["responses"]["TooManyRequests"];
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1525
|
+
getStatus: {
|
|
1526
|
+
parameters: {
|
|
1527
|
+
query?: never;
|
|
1528
|
+
header?: never;
|
|
1529
|
+
path: {
|
|
1530
|
+
/** @description The project's slug. */
|
|
1531
|
+
project: components["parameters"]["Project"];
|
|
1532
|
+
};
|
|
1533
|
+
cookie?: never;
|
|
1534
|
+
};
|
|
1535
|
+
requestBody?: never;
|
|
1536
|
+
responses: {
|
|
1537
|
+
/** @description The status. */
|
|
1538
|
+
200: {
|
|
1539
|
+
headers: {
|
|
1540
|
+
[name: string]: unknown;
|
|
1541
|
+
};
|
|
1542
|
+
content: {
|
|
1543
|
+
"application/json": components["schemas"]["ProjectStatus"];
|
|
1544
|
+
};
|
|
1545
|
+
};
|
|
1546
|
+
400: components["responses"]["BadRequest"];
|
|
1547
|
+
401: components["responses"]["Unauthorized"];
|
|
1548
|
+
404: components["responses"]["NotFound"];
|
|
1549
|
+
429: components["responses"]["TooManyRequests"];
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
type S = components['schemas'];
|
|
1555
|
+
type MessageType = S['MessageType'];
|
|
1556
|
+
type MessageStatus = S['MessageStatus'];
|
|
1557
|
+
type SendMessageParams = S['SendMessageRequest'];
|
|
1558
|
+
type BulkItem = S['BulkItem'];
|
|
1559
|
+
type SendBulkParams = S['BulkSendRequest'];
|
|
1560
|
+
type Message = S['MessageView'];
|
|
1561
|
+
type MessagePage = S['MessagePage'];
|
|
1562
|
+
type BulkResult = S['BulkSendResponse'];
|
|
1563
|
+
type RejectedItem = S['RejectedItem'];
|
|
1564
|
+
type ListMessagesParams = NonNullable<operations['listMessages']['parameters']['query']>;
|
|
1565
|
+
type SendOtpParams = S['OtpRequest'];
|
|
1566
|
+
type Otp = S['OtpResponse'];
|
|
1567
|
+
type VerifyOtpParams = S['OtpVerifyRequest'];
|
|
1568
|
+
type OtpVerification = S['OtpVerifyResponse'];
|
|
1569
|
+
type OtpFailure = S['OtpFailure'];
|
|
714
1570
|
type CreateScheduleParams = S['ScheduleRequest'];
|
|
715
1571
|
type UpdateScheduleParams = S['ScheduleUpdate'];
|
|
716
1572
|
type Schedule = S['ScheduleView'];
|
|
717
1573
|
type ScheduleRun = S['ScheduleRunView'];
|
|
718
1574
|
type SchedulePage = S['SchedulePage'];
|
|
1575
|
+
type CreateCampaignParams = S['CampaignRequest'];
|
|
1576
|
+
type UpdateCampaignParams = S['CampaignUpdate'];
|
|
1577
|
+
type Campaign = S['CampaignApiView'];
|
|
1578
|
+
type CampaignList = S['CampaignList'];
|
|
1579
|
+
type CampaignStatus = S['CampaignApiStatus'];
|
|
1580
|
+
type CampaignRun = S['CampaignRunView'];
|
|
1581
|
+
type CampaignResults = S['CampaignResultsView'];
|
|
1582
|
+
type CampaignPreview = S['CampaignPreviewResponse'];
|
|
1583
|
+
type CampaignSendResult = S['CampaignSendResponse'];
|
|
1584
|
+
type CreateGroupParams = S['GroupRequest'];
|
|
1585
|
+
type UpdateGroupParams = S['GroupUpdate'];
|
|
1586
|
+
type Group = S['GroupApiView'];
|
|
1587
|
+
type GroupList = S['GroupList'];
|
|
1588
|
+
type GroupMemberInput = S['GroupMemberInput'];
|
|
1589
|
+
type GroupMember = S['GroupMemberView'];
|
|
1590
|
+
type GroupMemberPage = S['GroupMemberPage'];
|
|
1591
|
+
type AddMembersResult = S['GroupMembersResponse'];
|
|
1592
|
+
type ListMembersParams = NonNullable<operations['listGroupMembers']['parameters']['query']>;
|
|
719
1593
|
type StatusEvent = S['StatusWebhookPayload'];
|
|
720
1594
|
type ReceivedEvent = S['InboundWebhookPayload'];
|
|
1595
|
+
type GroupJoinedEvent = S['GroupJoinedWebhookPayload'];
|
|
721
1596
|
type AlertEvent = S['AlertWebhookPayload'];
|
|
722
1597
|
/** Anything POSTed to a webhook; narrow on `event`. */
|
|
723
|
-
type WebhookEvent = StatusEvent | ReceivedEvent | AlertEvent;
|
|
1598
|
+
type WebhookEvent = StatusEvent | ReceivedEvent | GroupJoinedEvent | AlertEvent;
|
|
724
1599
|
|
|
725
1600
|
type Call = <T>(req: Request) => Promise<T>;
|
|
726
1601
|
interface SendOptions {
|
|
@@ -758,6 +1633,64 @@ declare class OneTimeCodes {
|
|
|
758
1633
|
verify(params: VerifyOtpParams): Promise<OtpVerification>;
|
|
759
1634
|
}
|
|
760
1635
|
|
|
1636
|
+
/**
|
|
1637
|
+
* Campaigns: a send with a name, an audience, who to leave out and when. A campaign is made as a
|
|
1638
|
+
* draft and nothing goes out until `send`, so an audience can be built up over several calls and
|
|
1639
|
+
* checked with `preview` first. Each run is an ordinary batch.
|
|
1640
|
+
*/
|
|
1641
|
+
declare class Campaigns {
|
|
1642
|
+
private readonly call;
|
|
1643
|
+
private readonly base;
|
|
1644
|
+
constructor(call: Call, base: string);
|
|
1645
|
+
/**
|
|
1646
|
+
* Makes a draft. Marketing needs `consent: true` -- that the recipients agreed to hear from
|
|
1647
|
+
* you -- and `stop_footer` ends every marketing message with your opt-out line. With `cron` it
|
|
1648
|
+
* repeats instead of sending once.
|
|
1649
|
+
*/
|
|
1650
|
+
create(params: CreateCampaignParams): Promise<Campaign>;
|
|
1651
|
+
list(): Promise<CampaignList>;
|
|
1652
|
+
get(id: string): Promise<Campaign>;
|
|
1653
|
+
/** Absent fields stay as they are, and the change reaches the runs still to come. */
|
|
1654
|
+
update(id: string, params: UpdateCampaignParams): Promise<Campaign>;
|
|
1655
|
+
/** The campaign goes; its runs stay in the message log. */
|
|
1656
|
+
delete(id: string): Promise<void>;
|
|
1657
|
+
/** Who it would reach right now: groups read, duplicates dropped, exclusions applied. */
|
|
1658
|
+
preview(id: string): Promise<CampaignPreview>;
|
|
1659
|
+
/** How it did: delivery, SMS parts, replies and the opt-outs it cost. */
|
|
1660
|
+
results(id: string): Promise<CampaignResults>;
|
|
1661
|
+
/** Starts it: `queued` with a batch, or `scheduled` when it waits for its time or its cron. */
|
|
1662
|
+
send(id: string): Promise<CampaignSendResult>;
|
|
1663
|
+
/** Holds every run still going, or lets them carry on. */
|
|
1664
|
+
control(id: string, status: 'running' | 'paused'): Promise<Campaign>;
|
|
1665
|
+
/** Stops it for good: what is still on the server is cancelled and refunded. */
|
|
1666
|
+
cancel(id: string): Promise<Campaign>;
|
|
1667
|
+
private one;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
/** The workspace's contact groups: every project's key sees the same ones. */
|
|
1671
|
+
declare class Groups {
|
|
1672
|
+
private readonly call;
|
|
1673
|
+
private readonly base;
|
|
1674
|
+
constructor(call: Call, base: string);
|
|
1675
|
+
/** With `keywords`, someone who texts one of them (the whole text) to a workspace phone joins. */
|
|
1676
|
+
create(params: CreateGroupParams): Promise<Group>;
|
|
1677
|
+
list(): Promise<GroupList>;
|
|
1678
|
+
get(id: string): Promise<Group>;
|
|
1679
|
+
/** Absent fields stay as they are; `keywords: []` turns joining by text off. */
|
|
1680
|
+
update(id: string, params: UpdateGroupParams): Promise<Group>;
|
|
1681
|
+
/** The group goes; its contacts stay. */
|
|
1682
|
+
delete(id: string): Promise<void>;
|
|
1683
|
+
/** One page of members, alphabetically; pass `next_cursor` back as `cursor` for the next. */
|
|
1684
|
+
listMembers(id: string, params?: ListMembersParams): Promise<GroupMemberPage>;
|
|
1685
|
+
/** Every member, fetching pages as you iterate. */
|
|
1686
|
+
listAllMembers(id: string, params?: Omit<ListMembersParams, 'cursor'>): AsyncGenerator<GroupMember>;
|
|
1687
|
+
/** Adds people by number; new numbers become contacts (a given name replaces theirs, fields merge). */
|
|
1688
|
+
addMembers(id: string, members: GroupMemberInput[]): Promise<AddMembersResult>;
|
|
1689
|
+
/** Takes the number out of the group; the contact stays. */
|
|
1690
|
+
removeMember(id: string, phone: string): Promise<void>;
|
|
1691
|
+
private one;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
761
1694
|
declare class Schedules {
|
|
762
1695
|
private readonly call;
|
|
763
1696
|
private readonly base;
|
|
@@ -787,7 +1720,7 @@ declare const SIGNATURE_HEADER = "X-SMSWire-Signature";
|
|
|
787
1720
|
*/
|
|
788
1721
|
declare function verifyWebhook(rawBody: string | Uint8Array | ArrayBuffer, signature: string | null | undefined, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
|
|
789
1722
|
|
|
790
|
-
declare const VERSION = "0.
|
|
1723
|
+
declare const VERSION = "0.2.0";
|
|
791
1724
|
interface ClientOptions {
|
|
792
1725
|
/** The project's API key (`smswire_live_…`). Defaults to SMSWIRE_KEY. */
|
|
793
1726
|
apiKey?: string;
|
|
@@ -810,10 +1743,12 @@ declare class SMSWire {
|
|
|
810
1743
|
readonly messages: Messages;
|
|
811
1744
|
readonly otp: OneTimeCodes;
|
|
812
1745
|
readonly schedules: Schedules;
|
|
1746
|
+
readonly groups: Groups;
|
|
1747
|
+
readonly campaigns: Campaigns;
|
|
813
1748
|
readonly webhooks: {
|
|
814
1749
|
verify(rawBody: string | Uint8Array | ArrayBuffer, signature: string | null | undefined, options?: VerifyOptions): Promise<WebhookEvent>;
|
|
815
1750
|
};
|
|
816
1751
|
constructor(options?: ClientOptions);
|
|
817
1752
|
}
|
|
818
1753
|
|
|
819
|
-
export { type AlertEvent, type BulkItem, type BulkResult, type ClientOptions, type CreateScheduleParams, type ListMessagesParams, type Message, type MessagePage, type MessageStatus, type MessageType, type Otp, type OtpFailure, type OtpVerification, type ReceivedEvent, type RejectedItem, SIGNATURE_HEADER, SMSWire, SMSWireError, SMSWireSignatureError, type Schedule, type SchedulePage, type ScheduleRun, type SendBulkParams, type SendMessageParams, type SendOptions, type SendOtpParams, type StatusEvent, type UpdateScheduleParams, VERSION, type VerifyOptions, type VerifyOtpParams, type WebhookEvent, SMSWire as default, verifyWebhook };
|
|
1754
|
+
export { type AddMembersResult, type AlertEvent, type BulkItem, type BulkResult, type Campaign, type CampaignList, type CampaignPreview, type CampaignResults, type CampaignRun, type CampaignSendResult, type CampaignStatus, type ClientOptions, type CreateCampaignParams, type CreateGroupParams, type CreateScheduleParams, type Group, type GroupJoinedEvent, type GroupList, type GroupMember, type GroupMemberInput, type GroupMemberPage, type ListMembersParams, type ListMessagesParams, type Message, type MessagePage, type MessageStatus, type MessageType, type Otp, type OtpFailure, type OtpVerification, type ReceivedEvent, type RejectedItem, SIGNATURE_HEADER, SMSWire, SMSWireError, SMSWireSignatureError, type Schedule, type SchedulePage, type ScheduleRun, type SendBulkParams, type SendMessageParams, type SendOptions, type SendOtpParams, type StatusEvent, type UpdateCampaignParams, type UpdateGroupParams, type UpdateScheduleParams, VERSION, type VerifyOptions, type VerifyOtpParams, type WebhookEvent, SMSWire as default, verifyWebhook };
|