@outseta/api-client 0.3.29 → 0.3.30
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/dist/index.js +66 -0
- package/package.json +1 -1
- package/src/generated/email/email.ts +261 -1
- package/src/generated/models/emailListAddEmailListBody.ts +7 -0
- package/src/generated/models/emailListGetAllEmailLists200.ts +8 -0
- package/src/generated/models/emailListGetAllEmailListsParams.ts +14 -0
- package/src/generated/models/emailListUpdateEmailListBody.ts +7 -0
- package/src/generated/models/index.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -1088,6 +1088,62 @@ var campaignSendTestCampaignEmail = async (campaignSendTestCampaignEmailBody, op
|
|
|
1088
1088
|
body: JSON.stringify(campaignSendTestCampaignEmailBody)
|
|
1089
1089
|
});
|
|
1090
1090
|
};
|
|
1091
|
+
var getEmailListGetAllEmailListsUrl = (params) => {
|
|
1092
|
+
const normalizedParams = new URLSearchParams;
|
|
1093
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1094
|
+
if (value !== undefined) {
|
|
1095
|
+
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1099
|
+
return stringifiedParams.length > 0 ? `/api/v1/email/lists?${stringifiedParams}` : `/api/v1/email/lists`;
|
|
1100
|
+
};
|
|
1101
|
+
var emailListGetAllEmailLists = async (params, options) => {
|
|
1102
|
+
return customFetch(getEmailListGetAllEmailListsUrl(params), {
|
|
1103
|
+
...options,
|
|
1104
|
+
method: "GET"
|
|
1105
|
+
});
|
|
1106
|
+
};
|
|
1107
|
+
var getEmailListAddEmailListUrl = () => {
|
|
1108
|
+
return `/api/v1/email/lists`;
|
|
1109
|
+
};
|
|
1110
|
+
var emailListAddEmailList = async (emailListAddEmailListBody, options) => {
|
|
1111
|
+
return customFetch(getEmailListAddEmailListUrl(), {
|
|
1112
|
+
...options,
|
|
1113
|
+
method: "POST",
|
|
1114
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1115
|
+
body: JSON.stringify(emailListAddEmailListBody)
|
|
1116
|
+
});
|
|
1117
|
+
};
|
|
1118
|
+
var getEmailListGetEmailListUrl = (emailListUid) => {
|
|
1119
|
+
return `/api/v1/email/lists/${emailListUid}`;
|
|
1120
|
+
};
|
|
1121
|
+
var emailListGetEmailList = async (emailListUid, options) => {
|
|
1122
|
+
return customFetch(getEmailListGetEmailListUrl(emailListUid), {
|
|
1123
|
+
...options,
|
|
1124
|
+
method: "GET"
|
|
1125
|
+
});
|
|
1126
|
+
};
|
|
1127
|
+
var getEmailListUpdateEmailListUrl = (emailListUid) => {
|
|
1128
|
+
return `/api/v1/email/lists/${emailListUid}`;
|
|
1129
|
+
};
|
|
1130
|
+
var emailListUpdateEmailList = async (emailListUid, emailListUpdateEmailListBody, options) => {
|
|
1131
|
+
return customFetch(getEmailListUpdateEmailListUrl(emailListUid), {
|
|
1132
|
+
...options,
|
|
1133
|
+
method: "PUT",
|
|
1134
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1135
|
+
body: JSON.stringify(emailListUpdateEmailListBody)
|
|
1136
|
+
});
|
|
1137
|
+
};
|
|
1138
|
+
var getEmailListDeleteEmailListUrl = (emailListUid) => {
|
|
1139
|
+
return `/api/v1/email/lists/${emailListUid}`;
|
|
1140
|
+
};
|
|
1141
|
+
var emailListDeleteEmailList = async (emailListUid, options) => {
|
|
1142
|
+
return customFetch(getEmailListDeleteEmailListUrl(emailListUid), {
|
|
1143
|
+
...options,
|
|
1144
|
+
method: "DELETE"
|
|
1145
|
+
});
|
|
1146
|
+
};
|
|
1091
1147
|
var getEmailListGetAllSubscriptionsUrl = (emailListUid, params) => {
|
|
1092
1148
|
const normalizedParams = new URLSearchParams;
|
|
1093
1149
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1956,9 +2012,14 @@ export {
|
|
|
1956
2012
|
getInvoiceGetAllInvoicesUrl,
|
|
1957
2013
|
getInvoiceDeleteInvoiceUrl,
|
|
1958
2014
|
getInvoiceAddInvoiceUrl,
|
|
2015
|
+
getEmailListUpdateEmailListUrl,
|
|
2016
|
+
getEmailListGetEmailListUrl,
|
|
1959
2017
|
getEmailListGetAllSubscriptionsUrl,
|
|
2018
|
+
getEmailListGetAllEmailListsUrl,
|
|
1960
2019
|
getEmailListDeleteSubscriptionUrl,
|
|
2020
|
+
getEmailListDeleteEmailListUrl,
|
|
1961
2021
|
getEmailListAddSubscriptionUrl,
|
|
2022
|
+
getEmailListAddEmailListUrl,
|
|
1962
2023
|
getDripCampaignUpdateDripCampaignUrl,
|
|
1963
2024
|
getDripCampaignUpdateDripCampaignMessageUrl,
|
|
1964
2025
|
getDripCampaignSendTestCampaignEmailUrl,
|
|
@@ -2012,9 +2073,14 @@ export {
|
|
|
2012
2073
|
getAccountCancelAccountUrl,
|
|
2013
2074
|
getAccountAddPersonToAccountUrl,
|
|
2014
2075
|
getAccountAddAccountUrl,
|
|
2076
|
+
emailListUpdateEmailList,
|
|
2077
|
+
emailListGetEmailList,
|
|
2015
2078
|
emailListGetAllSubscriptions,
|
|
2079
|
+
emailListGetAllEmailLists,
|
|
2016
2080
|
emailListDeleteSubscription,
|
|
2081
|
+
emailListDeleteEmailList,
|
|
2017
2082
|
emailListAddSubscription,
|
|
2083
|
+
emailListAddEmailList,
|
|
2018
2084
|
dripCampaignUpdateDripCampaignMessage,
|
|
2019
2085
|
dripCampaignUpdateDripCampaign,
|
|
2020
2086
|
dripCampaignSendTestCampaignEmail,
|
package/package.json
CHANGED
|
@@ -15,10 +15,15 @@ import type {
|
|
|
15
15
|
DripCampaignSendTestCampaignEmailBody,
|
|
16
16
|
DripCampaignUpdateDripCampaignBody,
|
|
17
17
|
DripCampaignUpdateDripCampaignMessageBody,
|
|
18
|
+
EmailList,
|
|
19
|
+
EmailListAddEmailListBody,
|
|
18
20
|
EmailListAddSubscriptionBody,
|
|
21
|
+
EmailListGetAllEmailLists200,
|
|
22
|
+
EmailListGetAllEmailListsParams,
|
|
19
23
|
EmailListGetAllSubscriptions200,
|
|
20
24
|
EmailListGetAllSubscriptionsParams,
|
|
21
|
-
EmailListPerson
|
|
25
|
+
EmailListPerson,
|
|
26
|
+
EmailListUpdateEmailListBody
|
|
22
27
|
} from '.././models';
|
|
23
28
|
|
|
24
29
|
import { customFetch } from '../../client';
|
|
@@ -1033,6 +1038,261 @@ export const campaignSendTestCampaignEmail = async (campaignSendTestCampaignEmai
|
|
|
1033
1038
|
);}
|
|
1034
1039
|
|
|
1035
1040
|
|
|
1041
|
+
/**
|
|
1042
|
+
* @summary Retrieve all email lists.
|
|
1043
|
+
*/
|
|
1044
|
+
export type emailListGetAllEmailListsResponse200 = {
|
|
1045
|
+
data: EmailListGetAllEmailLists200
|
|
1046
|
+
status: 200
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
export type emailListGetAllEmailListsResponse401 = {
|
|
1050
|
+
data: void
|
|
1051
|
+
status: 401
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
export type emailListGetAllEmailListsResponseSuccess = (emailListGetAllEmailListsResponse200) & {
|
|
1055
|
+
headers: Headers;
|
|
1056
|
+
};
|
|
1057
|
+
export type emailListGetAllEmailListsResponseError = (emailListGetAllEmailListsResponse401) & {
|
|
1058
|
+
headers: Headers;
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
export type emailListGetAllEmailListsResponse = (emailListGetAllEmailListsResponseSuccess | emailListGetAllEmailListsResponseError)
|
|
1062
|
+
|
|
1063
|
+
export const getEmailListGetAllEmailListsUrl = (params?: EmailListGetAllEmailListsParams,) => {
|
|
1064
|
+
const normalizedParams = new URLSearchParams();
|
|
1065
|
+
|
|
1066
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1067
|
+
|
|
1068
|
+
if (value !== undefined) {
|
|
1069
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString())
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1074
|
+
|
|
1075
|
+
return stringifiedParams.length > 0 ? `/api/v1/email/lists?${stringifiedParams}` : `/api/v1/email/lists`
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
export const emailListGetAllEmailLists = async (params?: EmailListGetAllEmailListsParams, options?: RequestInit): Promise<emailListGetAllEmailListsResponse> => {
|
|
1079
|
+
|
|
1080
|
+
return customFetch<emailListGetAllEmailListsResponse>(getEmailListGetAllEmailListsUrl(params),
|
|
1081
|
+
{
|
|
1082
|
+
...options,
|
|
1083
|
+
method: 'GET'
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
}
|
|
1087
|
+
);}
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Name is required and must be unique. Set RequiresDoubleOptIn to true to require new
|
|
1092
|
+
subscribers to confirm their subscription. WelcomeSubject and WelcomeBody configure an
|
|
1093
|
+
optional welcome email; use WelcomeFromName and WelcomeFromEmail to set its sender.
|
|
1094
|
+
* @summary Create an email list.
|
|
1095
|
+
*/
|
|
1096
|
+
export type emailListAddEmailListResponse200 = {
|
|
1097
|
+
data: EmailList
|
|
1098
|
+
status: 200
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export type emailListAddEmailListResponse401 = {
|
|
1102
|
+
data: void
|
|
1103
|
+
status: 401
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export type emailListAddEmailListResponseSuccess = (emailListAddEmailListResponse200) & {
|
|
1107
|
+
headers: Headers;
|
|
1108
|
+
};
|
|
1109
|
+
export type emailListAddEmailListResponseError = (emailListAddEmailListResponse401) & {
|
|
1110
|
+
headers: Headers;
|
|
1111
|
+
};
|
|
1112
|
+
|
|
1113
|
+
export type emailListAddEmailListResponse = (emailListAddEmailListResponseSuccess | emailListAddEmailListResponseError)
|
|
1114
|
+
|
|
1115
|
+
export const getEmailListAddEmailListUrl = () => {
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
return `/api/v1/email/lists`
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
export const emailListAddEmailList = async (emailListAddEmailListBody: NonReadonly<EmailListAddEmailListBody>, options?: RequestInit): Promise<emailListAddEmailListResponse> => {
|
|
1124
|
+
|
|
1125
|
+
return customFetch<emailListAddEmailListResponse>(getEmailListAddEmailListUrl(),
|
|
1126
|
+
{
|
|
1127
|
+
...options,
|
|
1128
|
+
method: 'POST',
|
|
1129
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
1130
|
+
body: JSON.stringify(
|
|
1131
|
+
emailListAddEmailListBody,)
|
|
1132
|
+
}
|
|
1133
|
+
);}
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* @summary Retrieve an email list.
|
|
1138
|
+
*/
|
|
1139
|
+
export type emailListGetEmailListResponse200 = {
|
|
1140
|
+
data: EmailList
|
|
1141
|
+
status: 200
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export type emailListGetEmailListResponse400 = {
|
|
1145
|
+
data: void
|
|
1146
|
+
status: 400
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
export type emailListGetEmailListResponse401 = {
|
|
1150
|
+
data: void
|
|
1151
|
+
status: 401
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
export type emailListGetEmailListResponse404 = {
|
|
1155
|
+
data: void
|
|
1156
|
+
status: 404
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
export type emailListGetEmailListResponseSuccess = (emailListGetEmailListResponse200) & {
|
|
1160
|
+
headers: Headers;
|
|
1161
|
+
};
|
|
1162
|
+
export type emailListGetEmailListResponseError = (emailListGetEmailListResponse400 | emailListGetEmailListResponse401 | emailListGetEmailListResponse404) & {
|
|
1163
|
+
headers: Headers;
|
|
1164
|
+
};
|
|
1165
|
+
|
|
1166
|
+
export type emailListGetEmailListResponse = (emailListGetEmailListResponseSuccess | emailListGetEmailListResponseError)
|
|
1167
|
+
|
|
1168
|
+
export const getEmailListGetEmailListUrl = (emailListUid: string | null,) => {
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
return `/api/v1/email/lists/${emailListUid}`
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export const emailListGetEmailList = async (emailListUid: string | null, options?: RequestInit): Promise<emailListGetEmailListResponse> => {
|
|
1177
|
+
|
|
1178
|
+
return customFetch<emailListGetEmailListResponse>(getEmailListGetEmailListUrl(emailListUid),
|
|
1179
|
+
{
|
|
1180
|
+
...options,
|
|
1181
|
+
method: 'GET'
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
}
|
|
1185
|
+
);}
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* The Uid may be omitted from the request body. If supplied, it must match the Uid in the URL.
|
|
1190
|
+
* @summary Update an email list.
|
|
1191
|
+
*/
|
|
1192
|
+
export type emailListUpdateEmailListResponse200 = {
|
|
1193
|
+
data: EmailList
|
|
1194
|
+
status: 200
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
export type emailListUpdateEmailListResponse400 = {
|
|
1198
|
+
data: void
|
|
1199
|
+
status: 400
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
export type emailListUpdateEmailListResponse401 = {
|
|
1203
|
+
data: void
|
|
1204
|
+
status: 401
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
export type emailListUpdateEmailListResponse404 = {
|
|
1208
|
+
data: void
|
|
1209
|
+
status: 404
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
export type emailListUpdateEmailListResponseSuccess = (emailListUpdateEmailListResponse200) & {
|
|
1213
|
+
headers: Headers;
|
|
1214
|
+
};
|
|
1215
|
+
export type emailListUpdateEmailListResponseError = (emailListUpdateEmailListResponse400 | emailListUpdateEmailListResponse401 | emailListUpdateEmailListResponse404) & {
|
|
1216
|
+
headers: Headers;
|
|
1217
|
+
};
|
|
1218
|
+
|
|
1219
|
+
export type emailListUpdateEmailListResponse = (emailListUpdateEmailListResponseSuccess | emailListUpdateEmailListResponseError)
|
|
1220
|
+
|
|
1221
|
+
export const getEmailListUpdateEmailListUrl = (emailListUid: string | null,) => {
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
return `/api/v1/email/lists/${emailListUid}`
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
export const emailListUpdateEmailList = async (emailListUid: string | null,
|
|
1230
|
+
emailListUpdateEmailListBody: NonReadonly<EmailListUpdateEmailListBody>, options?: RequestInit): Promise<emailListUpdateEmailListResponse> => {
|
|
1231
|
+
|
|
1232
|
+
return customFetch<emailListUpdateEmailListResponse>(getEmailListUpdateEmailListUrl(emailListUid),
|
|
1233
|
+
{
|
|
1234
|
+
...options,
|
|
1235
|
+
method: 'PUT',
|
|
1236
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
1237
|
+
body: JSON.stringify(
|
|
1238
|
+
emailListUpdateEmailListBody,)
|
|
1239
|
+
}
|
|
1240
|
+
);}
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* Deleting a list also removes all of its subscriptions.
|
|
1245
|
+
* @summary Delete an email list.
|
|
1246
|
+
*/
|
|
1247
|
+
export type emailListDeleteEmailListResponse200 = {
|
|
1248
|
+
data: Blob
|
|
1249
|
+
status: 200
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
export type emailListDeleteEmailListResponse400 = {
|
|
1253
|
+
data: void
|
|
1254
|
+
status: 400
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
export type emailListDeleteEmailListResponse401 = {
|
|
1258
|
+
data: void
|
|
1259
|
+
status: 401
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
export type emailListDeleteEmailListResponse404 = {
|
|
1263
|
+
data: void
|
|
1264
|
+
status: 404
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
export type emailListDeleteEmailListResponseSuccess = (emailListDeleteEmailListResponse200) & {
|
|
1268
|
+
headers: Headers;
|
|
1269
|
+
};
|
|
1270
|
+
export type emailListDeleteEmailListResponseError = (emailListDeleteEmailListResponse400 | emailListDeleteEmailListResponse401 | emailListDeleteEmailListResponse404) & {
|
|
1271
|
+
headers: Headers;
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1274
|
+
export type emailListDeleteEmailListResponse = (emailListDeleteEmailListResponseSuccess | emailListDeleteEmailListResponseError)
|
|
1275
|
+
|
|
1276
|
+
export const getEmailListDeleteEmailListUrl = (emailListUid: string | null,) => {
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
return `/api/v1/email/lists/${emailListUid}`
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
export const emailListDeleteEmailList = async (emailListUid: string | null, options?: RequestInit): Promise<emailListDeleteEmailListResponse> => {
|
|
1285
|
+
|
|
1286
|
+
return customFetch<emailListDeleteEmailListResponse>(getEmailListDeleteEmailListUrl(emailListUid),
|
|
1287
|
+
{
|
|
1288
|
+
...options,
|
|
1289
|
+
method: 'DELETE'
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
}
|
|
1293
|
+
);}
|
|
1294
|
+
|
|
1295
|
+
|
|
1036
1296
|
/**
|
|
1037
1297
|
* @summary Retrieve all subscribers to an email list.
|
|
1038
1298
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { LimitParameter } from './limitParameter';
|
|
3
|
+
import type { OffsetParameter } from './offsetParameter';
|
|
4
|
+
|
|
5
|
+
export type EmailListGetAllEmailListsParams = {
|
|
6
|
+
/**
|
|
7
|
+
* Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
|
|
8
|
+
*/
|
|
9
|
+
limit?: LimitParameter;
|
|
10
|
+
/**
|
|
11
|
+
* Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
|
|
12
|
+
*/
|
|
13
|
+
offset?: OffsetParameter;
|
|
14
|
+
};
|
|
@@ -378,8 +378,11 @@ export * from './dripCampaignUpdateDripCampaignMessageBody';
|
|
|
378
378
|
export * from './emailLink';
|
|
379
379
|
export * from './emailLinkAllOf';
|
|
380
380
|
export * from './emailList';
|
|
381
|
+
export * from './emailListAddEmailListBody';
|
|
381
382
|
export * from './emailListAddSubscriptionBody';
|
|
382
383
|
export * from './emailListAllOf';
|
|
384
|
+
export * from './emailListGetAllEmailLists200';
|
|
385
|
+
export * from './emailListGetAllEmailListsParams';
|
|
383
386
|
export * from './emailListGetAllSubscriptions200';
|
|
384
387
|
export * from './emailListGetAllSubscriptionsParams';
|
|
385
388
|
export * from './emailListPerson';
|
|
@@ -387,6 +390,7 @@ export * from './emailListPersonAllOf';
|
|
|
387
390
|
export * from './emailListPersonAllOfEmailList';
|
|
388
391
|
export * from './emailListPersonAllOfPerson';
|
|
389
392
|
export * from './emailListSubscriberStatus';
|
|
393
|
+
export * from './emailListUpdateEmailListBody';
|
|
390
394
|
export * from './emailSubscriptionsPayload';
|
|
391
395
|
export * from './entityType';
|
|
392
396
|
export * from './extendRenewalParams';
|