@unsent/sdk 0.25.2 → 0.25.5
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 +177 -103
- package/dist/index.d.mts +408 -18
- package/dist/index.d.ts +408 -18
- package/dist/index.js +84 -1
- package/dist/index.mjs +83 -1
- package/package.json +2 -3
- package/.eslintrc.cjs +0 -10
package/dist/index.d.mts
CHANGED
|
@@ -36,9 +36,9 @@ interface paths {
|
|
|
36
36
|
"application/json": {
|
|
37
37
|
/**
|
|
38
38
|
* @description The ID of the domain
|
|
39
|
-
* @example
|
|
39
|
+
* @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
|
|
40
40
|
*/
|
|
41
|
-
id:
|
|
41
|
+
id: string;
|
|
42
42
|
/**
|
|
43
43
|
* @description The name of the domain
|
|
44
44
|
* @example example.com
|
|
@@ -46,9 +46,9 @@ interface paths {
|
|
|
46
46
|
name: string;
|
|
47
47
|
/**
|
|
48
48
|
* @description The ID of the team
|
|
49
|
-
* @example
|
|
49
|
+
* @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
|
|
50
50
|
*/
|
|
51
|
-
teamId:
|
|
51
|
+
teamId: string;
|
|
52
52
|
/** @enum {string} */
|
|
53
53
|
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
54
54
|
/** @default us-east-1 */
|
|
@@ -133,9 +133,9 @@ interface paths {
|
|
|
133
133
|
"application/json": {
|
|
134
134
|
/**
|
|
135
135
|
* @description The ID of the domain
|
|
136
|
-
* @example
|
|
136
|
+
* @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
|
|
137
137
|
*/
|
|
138
|
-
id:
|
|
138
|
+
id: string;
|
|
139
139
|
/**
|
|
140
140
|
* @description The name of the domain
|
|
141
141
|
* @example example.com
|
|
@@ -143,9 +143,9 @@ interface paths {
|
|
|
143
143
|
name: string;
|
|
144
144
|
/**
|
|
145
145
|
* @description The ID of the team
|
|
146
|
-
* @example
|
|
146
|
+
* @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
|
|
147
147
|
*/
|
|
148
|
-
teamId:
|
|
148
|
+
teamId: string;
|
|
149
149
|
/** @enum {string} */
|
|
150
150
|
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
151
151
|
/** @default us-east-1 */
|
|
@@ -223,7 +223,7 @@ interface paths {
|
|
|
223
223
|
query?: never;
|
|
224
224
|
header?: never;
|
|
225
225
|
path: {
|
|
226
|
-
id:
|
|
226
|
+
id: string;
|
|
227
227
|
};
|
|
228
228
|
cookie?: never;
|
|
229
229
|
};
|
|
@@ -283,7 +283,7 @@ interface paths {
|
|
|
283
283
|
query?: never;
|
|
284
284
|
header?: never;
|
|
285
285
|
path: {
|
|
286
|
-
id:
|
|
286
|
+
id: string;
|
|
287
287
|
};
|
|
288
288
|
cookie?: never;
|
|
289
289
|
};
|
|
@@ -298,9 +298,9 @@ interface paths {
|
|
|
298
298
|
"application/json": {
|
|
299
299
|
/**
|
|
300
300
|
* @description The ID of the domain
|
|
301
|
-
* @example
|
|
301
|
+
* @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
|
|
302
302
|
*/
|
|
303
|
-
id:
|
|
303
|
+
id: string;
|
|
304
304
|
/**
|
|
305
305
|
* @description The name of the domain
|
|
306
306
|
* @example example.com
|
|
@@ -308,9 +308,9 @@ interface paths {
|
|
|
308
308
|
name: string;
|
|
309
309
|
/**
|
|
310
310
|
* @description The ID of the team
|
|
311
|
-
* @example
|
|
311
|
+
* @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
|
|
312
312
|
*/
|
|
313
|
-
teamId:
|
|
313
|
+
teamId: string;
|
|
314
314
|
/** @enum {string} */
|
|
315
315
|
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
316
316
|
/** @default us-east-1 */
|
|
@@ -371,7 +371,49 @@ interface paths {
|
|
|
371
371
|
};
|
|
372
372
|
put?: never;
|
|
373
373
|
post?: never;
|
|
374
|
-
delete
|
|
374
|
+
delete: {
|
|
375
|
+
parameters: {
|
|
376
|
+
query?: never;
|
|
377
|
+
header?: never;
|
|
378
|
+
path: {
|
|
379
|
+
id: string;
|
|
380
|
+
};
|
|
381
|
+
cookie?: never;
|
|
382
|
+
};
|
|
383
|
+
requestBody?: never;
|
|
384
|
+
responses: {
|
|
385
|
+
/** @description Domain deleted successfully */
|
|
386
|
+
200: {
|
|
387
|
+
headers: {
|
|
388
|
+
[name: string]: unknown;
|
|
389
|
+
};
|
|
390
|
+
content: {
|
|
391
|
+
"application/json": {
|
|
392
|
+
success: boolean;
|
|
393
|
+
message: string;
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
/** @description Forbidden - API key doesn't have access */
|
|
398
|
+
403: {
|
|
399
|
+
headers: {
|
|
400
|
+
[name: string]: unknown;
|
|
401
|
+
};
|
|
402
|
+
content?: never;
|
|
403
|
+
};
|
|
404
|
+
/** @description Domain not found */
|
|
405
|
+
404: {
|
|
406
|
+
headers: {
|
|
407
|
+
[name: string]: unknown;
|
|
408
|
+
};
|
|
409
|
+
content: {
|
|
410
|
+
"application/json": {
|
|
411
|
+
error: string;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
375
417
|
options?: never;
|
|
376
418
|
head?: never;
|
|
377
419
|
patch?: never;
|
|
@@ -403,7 +445,7 @@ interface paths {
|
|
|
403
445
|
content: {
|
|
404
446
|
"application/json": {
|
|
405
447
|
id: string;
|
|
406
|
-
teamId:
|
|
448
|
+
teamId: string;
|
|
407
449
|
to: string | string[];
|
|
408
450
|
replyTo?: string | string[];
|
|
409
451
|
cc?: string | string[];
|
|
@@ -509,7 +551,7 @@ interface paths {
|
|
|
509
551
|
latestStatus: "SCHEDULED" | "QUEUED" | "SENT" | "DELIVERY_DELAYED" | "BOUNCED" | "REJECTED" | "RENDERING_FAILURE" | "DELIVERED" | "OPENED" | "CLICKED" | "COMPLAINED" | "FAILED" | "CANCELLED" | "SUPPRESSED" | null;
|
|
510
552
|
/** Format: date-time */
|
|
511
553
|
scheduledAt: string | null;
|
|
512
|
-
domainId:
|
|
554
|
+
domainId: string | null;
|
|
513
555
|
}[];
|
|
514
556
|
count: number;
|
|
515
557
|
};
|
|
@@ -919,6 +961,282 @@ interface paths {
|
|
|
919
961
|
};
|
|
920
962
|
trace?: never;
|
|
921
963
|
};
|
|
964
|
+
"/v1/campaigns": {
|
|
965
|
+
parameters: {
|
|
966
|
+
query?: never;
|
|
967
|
+
header?: never;
|
|
968
|
+
path?: never;
|
|
969
|
+
cookie?: never;
|
|
970
|
+
};
|
|
971
|
+
get?: never;
|
|
972
|
+
put?: never;
|
|
973
|
+
post: {
|
|
974
|
+
parameters: {
|
|
975
|
+
query?: never;
|
|
976
|
+
header?: never;
|
|
977
|
+
path?: never;
|
|
978
|
+
cookie?: never;
|
|
979
|
+
};
|
|
980
|
+
requestBody: {
|
|
981
|
+
content: {
|
|
982
|
+
"application/json": {
|
|
983
|
+
name: string;
|
|
984
|
+
from: string;
|
|
985
|
+
subject: string;
|
|
986
|
+
previewText?: string;
|
|
987
|
+
contactBookId: string;
|
|
988
|
+
content?: string;
|
|
989
|
+
html?: string;
|
|
990
|
+
replyTo?: string | string[];
|
|
991
|
+
cc?: string | string[];
|
|
992
|
+
bcc?: string | string[];
|
|
993
|
+
sendNow?: boolean;
|
|
994
|
+
/** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
|
|
995
|
+
scheduledAt?: string;
|
|
996
|
+
batchSize?: number;
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
responses: {
|
|
1001
|
+
/** @description Create a campaign */
|
|
1002
|
+
200: {
|
|
1003
|
+
headers: {
|
|
1004
|
+
[name: string]: unknown;
|
|
1005
|
+
};
|
|
1006
|
+
content: {
|
|
1007
|
+
"application/json": {
|
|
1008
|
+
id: string;
|
|
1009
|
+
name: string;
|
|
1010
|
+
from: string;
|
|
1011
|
+
subject: string;
|
|
1012
|
+
previewText: string | null;
|
|
1013
|
+
contactBookId: string | null;
|
|
1014
|
+
html: string | null;
|
|
1015
|
+
content: string | null;
|
|
1016
|
+
status: string;
|
|
1017
|
+
/** Format: date-time */
|
|
1018
|
+
scheduledAt: string | null;
|
|
1019
|
+
batchSize: number;
|
|
1020
|
+
batchWindowMinutes: number;
|
|
1021
|
+
total: number;
|
|
1022
|
+
sent: number;
|
|
1023
|
+
delivered: number;
|
|
1024
|
+
opened: number;
|
|
1025
|
+
clicked: number;
|
|
1026
|
+
unsubscribed: number;
|
|
1027
|
+
bounced: number;
|
|
1028
|
+
hardBounced: number;
|
|
1029
|
+
complained: number;
|
|
1030
|
+
replyTo: string[];
|
|
1031
|
+
cc: string[];
|
|
1032
|
+
bcc: string[];
|
|
1033
|
+
/** Format: date-time */
|
|
1034
|
+
createdAt: string;
|
|
1035
|
+
/** Format: date-time */
|
|
1036
|
+
updatedAt: string;
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
delete?: never;
|
|
1043
|
+
options?: never;
|
|
1044
|
+
head?: never;
|
|
1045
|
+
patch?: never;
|
|
1046
|
+
trace?: never;
|
|
1047
|
+
};
|
|
1048
|
+
"/v1/campaigns/{campaignId}": {
|
|
1049
|
+
parameters: {
|
|
1050
|
+
query?: never;
|
|
1051
|
+
header?: never;
|
|
1052
|
+
path?: never;
|
|
1053
|
+
cookie?: never;
|
|
1054
|
+
};
|
|
1055
|
+
get: {
|
|
1056
|
+
parameters: {
|
|
1057
|
+
query?: never;
|
|
1058
|
+
header?: never;
|
|
1059
|
+
path: {
|
|
1060
|
+
campaignId: string;
|
|
1061
|
+
};
|
|
1062
|
+
cookie?: never;
|
|
1063
|
+
};
|
|
1064
|
+
requestBody?: never;
|
|
1065
|
+
responses: {
|
|
1066
|
+
/** @description Get campaign details */
|
|
1067
|
+
200: {
|
|
1068
|
+
headers: {
|
|
1069
|
+
[name: string]: unknown;
|
|
1070
|
+
};
|
|
1071
|
+
content: {
|
|
1072
|
+
"application/json": {
|
|
1073
|
+
id: string;
|
|
1074
|
+
name: string;
|
|
1075
|
+
from: string;
|
|
1076
|
+
subject: string;
|
|
1077
|
+
previewText: string | null;
|
|
1078
|
+
contactBookId: string | null;
|
|
1079
|
+
html: string | null;
|
|
1080
|
+
content: string | null;
|
|
1081
|
+
status: string;
|
|
1082
|
+
/** Format: date-time */
|
|
1083
|
+
scheduledAt: string | null;
|
|
1084
|
+
batchSize: number;
|
|
1085
|
+
batchWindowMinutes: number;
|
|
1086
|
+
total: number;
|
|
1087
|
+
sent: number;
|
|
1088
|
+
delivered: number;
|
|
1089
|
+
opened: number;
|
|
1090
|
+
clicked: number;
|
|
1091
|
+
unsubscribed: number;
|
|
1092
|
+
bounced: number;
|
|
1093
|
+
hardBounced: number;
|
|
1094
|
+
complained: number;
|
|
1095
|
+
replyTo: string[];
|
|
1096
|
+
cc: string[];
|
|
1097
|
+
bcc: string[];
|
|
1098
|
+
/** Format: date-time */
|
|
1099
|
+
createdAt: string;
|
|
1100
|
+
/** Format: date-time */
|
|
1101
|
+
updatedAt: string;
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
put?: never;
|
|
1108
|
+
post?: never;
|
|
1109
|
+
delete?: never;
|
|
1110
|
+
options?: never;
|
|
1111
|
+
head?: never;
|
|
1112
|
+
patch?: never;
|
|
1113
|
+
trace?: never;
|
|
1114
|
+
};
|
|
1115
|
+
"/v1/campaigns/{campaignId}/schedule": {
|
|
1116
|
+
parameters: {
|
|
1117
|
+
query?: never;
|
|
1118
|
+
header?: never;
|
|
1119
|
+
path?: never;
|
|
1120
|
+
cookie?: never;
|
|
1121
|
+
};
|
|
1122
|
+
get?: never;
|
|
1123
|
+
put?: never;
|
|
1124
|
+
post: {
|
|
1125
|
+
parameters: {
|
|
1126
|
+
query?: never;
|
|
1127
|
+
header?: never;
|
|
1128
|
+
path: {
|
|
1129
|
+
campaignId: string;
|
|
1130
|
+
};
|
|
1131
|
+
cookie?: never;
|
|
1132
|
+
};
|
|
1133
|
+
requestBody: {
|
|
1134
|
+
content: {
|
|
1135
|
+
"application/json": {
|
|
1136
|
+
/** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
|
|
1137
|
+
scheduledAt?: string;
|
|
1138
|
+
batchSize?: number;
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
responses: {
|
|
1143
|
+
/** @description Schedule a campaign */
|
|
1144
|
+
200: {
|
|
1145
|
+
headers: {
|
|
1146
|
+
[name: string]: unknown;
|
|
1147
|
+
};
|
|
1148
|
+
content: {
|
|
1149
|
+
"application/json": {
|
|
1150
|
+
success: boolean;
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
delete?: never;
|
|
1157
|
+
options?: never;
|
|
1158
|
+
head?: never;
|
|
1159
|
+
patch?: never;
|
|
1160
|
+
trace?: never;
|
|
1161
|
+
};
|
|
1162
|
+
"/v1/campaigns/{campaignId}/pause": {
|
|
1163
|
+
parameters: {
|
|
1164
|
+
query?: never;
|
|
1165
|
+
header?: never;
|
|
1166
|
+
path?: never;
|
|
1167
|
+
cookie?: never;
|
|
1168
|
+
};
|
|
1169
|
+
get?: never;
|
|
1170
|
+
put?: never;
|
|
1171
|
+
post: {
|
|
1172
|
+
parameters: {
|
|
1173
|
+
query?: never;
|
|
1174
|
+
header?: never;
|
|
1175
|
+
path: {
|
|
1176
|
+
campaignId: string;
|
|
1177
|
+
};
|
|
1178
|
+
cookie?: never;
|
|
1179
|
+
};
|
|
1180
|
+
requestBody?: never;
|
|
1181
|
+
responses: {
|
|
1182
|
+
/** @description Pause a campaign */
|
|
1183
|
+
200: {
|
|
1184
|
+
headers: {
|
|
1185
|
+
[name: string]: unknown;
|
|
1186
|
+
};
|
|
1187
|
+
content: {
|
|
1188
|
+
"application/json": {
|
|
1189
|
+
success: boolean;
|
|
1190
|
+
};
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
delete?: never;
|
|
1196
|
+
options?: never;
|
|
1197
|
+
head?: never;
|
|
1198
|
+
patch?: never;
|
|
1199
|
+
trace?: never;
|
|
1200
|
+
};
|
|
1201
|
+
"/v1/campaigns/{campaignId}/resume": {
|
|
1202
|
+
parameters: {
|
|
1203
|
+
query?: never;
|
|
1204
|
+
header?: never;
|
|
1205
|
+
path?: never;
|
|
1206
|
+
cookie?: never;
|
|
1207
|
+
};
|
|
1208
|
+
get?: never;
|
|
1209
|
+
put?: never;
|
|
1210
|
+
post: {
|
|
1211
|
+
parameters: {
|
|
1212
|
+
query?: never;
|
|
1213
|
+
header?: never;
|
|
1214
|
+
path: {
|
|
1215
|
+
campaignId: string;
|
|
1216
|
+
};
|
|
1217
|
+
cookie?: never;
|
|
1218
|
+
};
|
|
1219
|
+
requestBody?: never;
|
|
1220
|
+
responses: {
|
|
1221
|
+
/** @description Resume a campaign */
|
|
1222
|
+
200: {
|
|
1223
|
+
headers: {
|
|
1224
|
+
[name: string]: unknown;
|
|
1225
|
+
};
|
|
1226
|
+
content: {
|
|
1227
|
+
"application/json": {
|
|
1228
|
+
success: boolean;
|
|
1229
|
+
};
|
|
1230
|
+
};
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1234
|
+
delete?: never;
|
|
1235
|
+
options?: never;
|
|
1236
|
+
head?: never;
|
|
1237
|
+
patch?: never;
|
|
1238
|
+
trace?: never;
|
|
1239
|
+
};
|
|
922
1240
|
}
|
|
923
1241
|
|
|
924
1242
|
type CreateContactPayload = paths["/v1/contactBooks/{contactBookId}/contacts"]["post"]["requestBody"]["content"]["application/json"];
|
|
@@ -1018,11 +1336,83 @@ declare class Emails {
|
|
|
1018
1336
|
cancel(id: string): Promise<CancelEmailResponse>;
|
|
1019
1337
|
}
|
|
1020
1338
|
|
|
1339
|
+
type CreateDomainPayload = paths["/v1/domains"]["post"]["requestBody"]["content"]["application/json"];
|
|
1340
|
+
type CreateDomainResponse = {
|
|
1341
|
+
data: CreateDomainResponseSuccess | null;
|
|
1342
|
+
error: ErrorResponse | null;
|
|
1343
|
+
};
|
|
1344
|
+
type CreateDomainResponseSuccess = paths["/v1/domains"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
1345
|
+
type GetDomainsResponse = {
|
|
1346
|
+
data: GetDomainsResponseSuccess | null;
|
|
1347
|
+
error: ErrorResponse | null;
|
|
1348
|
+
};
|
|
1349
|
+
type GetDomainsResponseSuccess = paths["/v1/domains"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
1350
|
+
type VerifyDomainResponse = {
|
|
1351
|
+
data: VerifyDomainResponseSuccess | null;
|
|
1352
|
+
error: ErrorResponse | null;
|
|
1353
|
+
};
|
|
1354
|
+
type VerifyDomainResponseSuccess = paths["/v1/domains/{id}/verify"]["put"]["responses"]["200"]["content"]["application/json"];
|
|
1355
|
+
type GetDomainResponse = {
|
|
1356
|
+
data: GetDomainResponseSuccess | null;
|
|
1357
|
+
error: ErrorResponse | null;
|
|
1358
|
+
};
|
|
1359
|
+
type GetDomainResponseSuccess = paths["/v1/domains/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
1360
|
+
type DeleteDomainResponse = {
|
|
1361
|
+
data: DeleteDomainResponseSuccess | null;
|
|
1362
|
+
error: ErrorResponse | null;
|
|
1363
|
+
};
|
|
1364
|
+
type DeleteDomainResponseSuccess = paths["/v1/domains/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
|
|
1365
|
+
declare class Domains {
|
|
1366
|
+
private readonly unsent;
|
|
1367
|
+
constructor(unsent: unsent);
|
|
1368
|
+
list(): Promise<GetDomainsResponse>;
|
|
1369
|
+
create(payload: CreateDomainPayload): Promise<CreateDomainResponse>;
|
|
1370
|
+
verify(id: number): Promise<VerifyDomainResponse>;
|
|
1371
|
+
get(id: number): Promise<GetDomainResponse>;
|
|
1372
|
+
delete(id: number): Promise<DeleteDomainResponse>;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
type CreateCampaignPayload = paths["/v1/campaigns"]["post"]["requestBody"]["content"]["application/json"];
|
|
1376
|
+
type CreateCampaignResponseSuccess = paths["/v1/campaigns"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
1377
|
+
type CreateCampaignResponse = {
|
|
1378
|
+
data: CreateCampaignResponseSuccess | null;
|
|
1379
|
+
error: ErrorResponse | null;
|
|
1380
|
+
};
|
|
1381
|
+
type GetCampaignResponseSuccess = paths["/v1/campaigns/{campaignId}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
1382
|
+
type GetCampaignResponse = {
|
|
1383
|
+
data: GetCampaignResponseSuccess | null;
|
|
1384
|
+
error: ErrorResponse | null;
|
|
1385
|
+
};
|
|
1386
|
+
type ScheduleCampaignPayload = paths["/v1/campaigns/{campaignId}/schedule"]["post"]["requestBody"]["content"]["application/json"];
|
|
1387
|
+
type ScheduleCampaignResponseSuccess = paths["/v1/campaigns/{campaignId}/schedule"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
1388
|
+
type ScheduleCampaignResponse = {
|
|
1389
|
+
data: ScheduleCampaignResponseSuccess | null;
|
|
1390
|
+
error: ErrorResponse | null;
|
|
1391
|
+
};
|
|
1392
|
+
type CampaignActionResponseSuccess = {
|
|
1393
|
+
success: boolean;
|
|
1394
|
+
};
|
|
1395
|
+
type CampaignActionResponse = {
|
|
1396
|
+
data: CampaignActionResponseSuccess | null;
|
|
1397
|
+
error: ErrorResponse | null;
|
|
1398
|
+
};
|
|
1399
|
+
declare class Campaigns {
|
|
1400
|
+
private readonly unsent;
|
|
1401
|
+
constructor(unsent: unsent);
|
|
1402
|
+
create(payload: CreateCampaignPayload): Promise<CreateCampaignResponse>;
|
|
1403
|
+
get(campaignId: string): Promise<GetCampaignResponse>;
|
|
1404
|
+
schedule(campaignId: string, payload: ScheduleCampaignPayload): Promise<ScheduleCampaignResponse>;
|
|
1405
|
+
pause(campaignId: string): Promise<CampaignActionResponse>;
|
|
1406
|
+
resume(campaignId: string): Promise<CampaignActionResponse>;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1021
1409
|
declare class unsent {
|
|
1022
1410
|
readonly key?: string | undefined;
|
|
1023
1411
|
private readonly headers;
|
|
1412
|
+
readonly domains: Domains;
|
|
1024
1413
|
readonly emails: Emails;
|
|
1025
1414
|
readonly contacts: Contacts;
|
|
1415
|
+
readonly campaigns: Campaigns;
|
|
1026
1416
|
url: string;
|
|
1027
1417
|
constructor(key?: string | undefined, url?: string);
|
|
1028
1418
|
fetchRequest<T>(path: string, options?: {}): Promise<{
|
|
@@ -1051,4 +1441,4 @@ declare class unsent {
|
|
|
1051
1441
|
}>;
|
|
1052
1442
|
}
|
|
1053
1443
|
|
|
1054
|
-
export { unsent };
|
|
1444
|
+
export { Campaigns as campaigns, unsent };
|