mailmeteor 0.0.3 → 0.0.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/dist/index.cjs +431 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1637 -481
- package/dist/index.mjs +431 -137
- package/dist/index.mjs.map +1 -1
- package/dist/types/generated-sdk/client/client.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/client/types.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/client/utils.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/auth.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/bodySerializer.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/params.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/pathSerializer.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/queryKeySerializer.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/types.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/core/utils.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/index.d.ts +2 -2
- package/dist/types/generated-sdk/index.d.ts.map +1 -1
- package/dist/types/generated-sdk/sdk.gen.d.ts +189 -71
- package/dist/types/generated-sdk/sdk.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/types.gen.d.ts +1393 -467
- package/dist/types/generated-sdk/types.gen.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/generated-sdk/client/client.gen.d.ts +0 -3
- package/dist/generated-sdk/client/client.gen.d.ts.map +0 -1
- package/dist/generated-sdk/client/index.d.ts +0 -9
- package/dist/generated-sdk/client/index.d.ts.map +0 -1
- package/dist/generated-sdk/client/types.gen.d.ts +0 -118
- package/dist/generated-sdk/client/types.gen.d.ts.map +0 -1
- package/dist/generated-sdk/client/utils.gen.d.ts +0 -34
- package/dist/generated-sdk/client/utils.gen.d.ts.map +0 -1
- package/dist/generated-sdk/client.gen.d.ts +0 -13
- package/dist/generated-sdk/client.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/auth.gen.d.ts +0 -19
- package/dist/generated-sdk/core/auth.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/bodySerializer.gen.d.ts +0 -26
- package/dist/generated-sdk/core/bodySerializer.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/params.gen.d.ts +0 -44
- package/dist/generated-sdk/core/params.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/pathSerializer.gen.d.ts +0 -34
- package/dist/generated-sdk/core/pathSerializer.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/queryKeySerializer.gen.d.ts +0 -19
- package/dist/generated-sdk/core/queryKeySerializer.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/serverSentEvents.gen.d.ts +0 -72
- package/dist/generated-sdk/core/serverSentEvents.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/types.gen.d.ts +0 -79
- package/dist/generated-sdk/core/types.gen.d.ts.map +0 -1
- package/dist/generated-sdk/core/utils.gen.d.ts +0 -20
- package/dist/generated-sdk/core/utils.gen.d.ts.map +0 -1
- package/dist/generated-sdk/index.d.ts +0 -4
- package/dist/generated-sdk/index.d.ts.map +0 -1
- package/dist/generated-sdk/sdk.gen.d.ts +0 -112
- package/dist/generated-sdk/sdk.gen.d.ts.map +0 -1
- package/dist/generated-sdk/types.gen.d.ts +0 -426
- package/dist/generated-sdk/types.gen.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const jsonBodySerializer = {
|
|
2
|
-
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === 'bigint' ? value.toString() : value),
|
|
2
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),
|
|
3
3
|
};
|
|
4
4
|
|
|
5
5
|
const extraPrefixesMap = {
|
|
@@ -104,8 +104,7 @@ const buildClientParams = (args, fields) => {
|
|
|
104
104
|
|
|
105
105
|
const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
|
|
106
106
|
let lastEventId;
|
|
107
|
-
const sleep = sseSleepFn ??
|
|
108
|
-
((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
107
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
109
108
|
const createStream = async function* () {
|
|
110
109
|
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
111
110
|
let attempt = 0;
|
|
@@ -138,9 +137,7 @@ const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransforme
|
|
|
138
137
|
throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
139
138
|
if (!response.body)
|
|
140
139
|
throw new Error('No body in SSE response');
|
|
141
|
-
const reader = response.body
|
|
142
|
-
.pipeThrough(new TextDecoderStream())
|
|
143
|
-
.getReader();
|
|
140
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
144
141
|
let buffer = '';
|
|
145
142
|
const abortHandler = () => {
|
|
146
143
|
try {
|
|
@@ -220,8 +217,7 @@ const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransforme
|
|
|
220
217
|
}
|
|
221
218
|
catch (error) {
|
|
222
219
|
onSseError?.(error);
|
|
223
|
-
if (sseMaxRetryAttempts !== undefined &&
|
|
224
|
-
attempt >= sseMaxRetryAttempts) {
|
|
220
|
+
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
225
221
|
break;
|
|
226
222
|
}
|
|
227
223
|
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
|
|
@@ -296,9 +292,7 @@ const serializeArrayParam = ({ allowReserved, explode, name, style, value, }) =>
|
|
|
296
292
|
});
|
|
297
293
|
})
|
|
298
294
|
.join(separator);
|
|
299
|
-
return style === 'label' || style === 'matrix'
|
|
300
|
-
? separator + joinedValues
|
|
301
|
-
: joinedValues;
|
|
295
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
302
296
|
};
|
|
303
297
|
const serializePrimitiveParam = ({ allowReserved, name, value, }) => {
|
|
304
298
|
if (value === undefined || value === null) {
|
|
@@ -316,11 +310,7 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
316
310
|
if (style !== 'deepObject' && !explode) {
|
|
317
311
|
let values = [];
|
|
318
312
|
Object.entries(value).forEach(([key, v]) => {
|
|
319
|
-
values = [
|
|
320
|
-
...values,
|
|
321
|
-
key,
|
|
322
|
-
allowReserved ? v : encodeURIComponent(v),
|
|
323
|
-
];
|
|
313
|
+
values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
|
|
324
314
|
});
|
|
325
315
|
const joinedValues = values.join(',');
|
|
326
316
|
switch (style) {
|
|
@@ -342,9 +332,7 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
342
332
|
value: v,
|
|
343
333
|
}))
|
|
344
334
|
.join(separator);
|
|
345
|
-
return style === 'label' || style === 'matrix'
|
|
346
|
-
? separator + joinedValues
|
|
347
|
-
: joinedValues;
|
|
335
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
348
336
|
};
|
|
349
337
|
|
|
350
338
|
const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
@@ -501,8 +489,7 @@ const getParseAs = (contentType) => {
|
|
|
501
489
|
if (!cleanContent) {
|
|
502
490
|
return;
|
|
503
491
|
}
|
|
504
|
-
if (cleanContent.startsWith('application/json') ||
|
|
505
|
-
cleanContent.endsWith('+json')) {
|
|
492
|
+
if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {
|
|
506
493
|
return 'json';
|
|
507
494
|
}
|
|
508
495
|
if (cleanContent === 'multipart/form-data') {
|
|
@@ -584,9 +571,7 @@ const mergeHeaders = (...headers) => {
|
|
|
584
571
|
if (!header) {
|
|
585
572
|
continue;
|
|
586
573
|
}
|
|
587
|
-
const iterator = header instanceof Headers
|
|
588
|
-
? headersEntries(header)
|
|
589
|
-
: Object.entries(header);
|
|
574
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
590
575
|
for (const [key, value] of iterator) {
|
|
591
576
|
if (value === null) {
|
|
592
577
|
mergedHeaders.delete(key);
|
|
@@ -750,8 +735,7 @@ const createClient = (config = {}) => {
|
|
|
750
735
|
const parseAs = (opts.parseAs === 'auto'
|
|
751
736
|
? getParseAs(response.headers.get('Content-Type'))
|
|
752
737
|
: opts.parseAs) ?? 'json';
|
|
753
|
-
if (response.status === 204 ||
|
|
754
|
-
response.headers.get('Content-Length') === '0') {
|
|
738
|
+
if (response.status === 204 || response.headers.get('Content-Length') === '0') {
|
|
755
739
|
let emptyData;
|
|
756
740
|
switch (parseAs) {
|
|
757
741
|
case 'arrayBuffer':
|
|
@@ -903,7 +887,7 @@ class HeyApiRegistry {
|
|
|
903
887
|
get(key) {
|
|
904
888
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
905
889
|
if (!instance) {
|
|
906
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
890
|
+
throw new Error(`No SDK client found. Create one with "new Users2()" to fix this error.`);
|
|
907
891
|
}
|
|
908
892
|
return instance;
|
|
909
893
|
}
|
|
@@ -919,7 +903,7 @@ class HeyApiRegistry2 {
|
|
|
919
903
|
get(key) {
|
|
920
904
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
921
905
|
if (!instance) {
|
|
922
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
906
|
+
throw new Error(`No SDK client found. Create one with "new OrganizationMembers()" to fix this error.`);
|
|
923
907
|
}
|
|
924
908
|
return instance;
|
|
925
909
|
}
|
|
@@ -935,7 +919,7 @@ class HeyApiRegistry3 {
|
|
|
935
919
|
get(key) {
|
|
936
920
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
937
921
|
if (!instance) {
|
|
938
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
922
|
+
throw new Error(`No SDK client found. Create one with "new Organizations()" to fix this error.`);
|
|
939
923
|
}
|
|
940
924
|
return instance;
|
|
941
925
|
}
|
|
@@ -951,7 +935,7 @@ class HeyApiRegistry4 {
|
|
|
951
935
|
get(key) {
|
|
952
936
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
953
937
|
if (!instance) {
|
|
954
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
938
|
+
throw new Error(`No SDK client found. Create one with "new ContactLists2()" to fix this error.`);
|
|
955
939
|
}
|
|
956
940
|
return instance;
|
|
957
941
|
}
|
|
@@ -967,7 +951,7 @@ class HeyApiRegistry5 {
|
|
|
967
951
|
get(key) {
|
|
968
952
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
969
953
|
if (!instance) {
|
|
970
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
954
|
+
throw new Error(`No SDK client found. Create one with "new Contacts2()" to fix this error.`);
|
|
971
955
|
}
|
|
972
956
|
return instance;
|
|
973
957
|
}
|
|
@@ -976,6 +960,54 @@ class HeyApiRegistry5 {
|
|
|
976
960
|
}
|
|
977
961
|
}
|
|
978
962
|
class HeyApiRegistry6 {
|
|
963
|
+
constructor() {
|
|
964
|
+
this.defaultKey = 'default';
|
|
965
|
+
this.instances = new Map();
|
|
966
|
+
}
|
|
967
|
+
get(key) {
|
|
968
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
969
|
+
if (!instance) {
|
|
970
|
+
throw new Error(`No SDK client found. Create one with "new BillingAddons2()" to fix this error.`);
|
|
971
|
+
}
|
|
972
|
+
return instance;
|
|
973
|
+
}
|
|
974
|
+
set(value, key) {
|
|
975
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
class HeyApiRegistry7 {
|
|
979
|
+
constructor() {
|
|
980
|
+
this.defaultKey = 'default';
|
|
981
|
+
this.instances = new Map();
|
|
982
|
+
}
|
|
983
|
+
get(key) {
|
|
984
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
985
|
+
if (!instance) {
|
|
986
|
+
throw new Error(`No SDK client found. Create one with "new BillingSubscription2()" to fix this error.`);
|
|
987
|
+
}
|
|
988
|
+
return instance;
|
|
989
|
+
}
|
|
990
|
+
set(value, key) {
|
|
991
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
class HeyApiRegistry8 {
|
|
995
|
+
constructor() {
|
|
996
|
+
this.defaultKey = 'default';
|
|
997
|
+
this.instances = new Map();
|
|
998
|
+
}
|
|
999
|
+
get(key) {
|
|
1000
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
1001
|
+
if (!instance) {
|
|
1002
|
+
throw new Error(`No SDK client found. Create one with "new Billing2()" to fix this error.`);
|
|
1003
|
+
}
|
|
1004
|
+
return instance;
|
|
1005
|
+
}
|
|
1006
|
+
set(value, key) {
|
|
1007
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
class HeyApiRegistry9 {
|
|
979
1011
|
constructor() {
|
|
980
1012
|
this.defaultKey = 'default';
|
|
981
1013
|
this.instances = new Map();
|
|
@@ -991,19 +1023,35 @@ class HeyApiRegistry6 {
|
|
|
991
1023
|
this.instances.set(key ?? this.defaultKey, value);
|
|
992
1024
|
}
|
|
993
1025
|
}
|
|
994
|
-
class
|
|
995
|
-
|
|
1026
|
+
class Users extends HeyApiClient {
|
|
1027
|
+
getCurrentOrganization(userId, options) {
|
|
1028
|
+
const params = buildClientParams([userId], [{ in: 'path', key: 'userId' }]);
|
|
996
1029
|
return (options?.client ?? this.client).get({
|
|
997
1030
|
responseStyle: 'data',
|
|
998
|
-
url: '/
|
|
999
|
-
...options
|
|
1031
|
+
url: '/users/{userId}/current_organization',
|
|
1032
|
+
...options,
|
|
1033
|
+
...params
|
|
1000
1034
|
});
|
|
1001
1035
|
}
|
|
1002
|
-
|
|
1003
|
-
const params = buildClientParams([parameters], [{
|
|
1036
|
+
setCurrentOrganization(user_id, parameters, options) {
|
|
1037
|
+
const params = buildClientParams([user_id, parameters], [{ in: 'path', key: 'user_id' }, { args: [{ in: 'body', key: 'organization_id' }] }]);
|
|
1004
1038
|
return (options?.client ?? this.client).post({
|
|
1005
1039
|
responseStyle: 'data',
|
|
1006
|
-
url: '/
|
|
1040
|
+
url: '/users/{user_id}/current_organization',
|
|
1041
|
+
...options,
|
|
1042
|
+
...params,
|
|
1043
|
+
headers: {
|
|
1044
|
+
'Content-Type': 'application/json',
|
|
1045
|
+
...options?.headers,
|
|
1046
|
+
...params.headers
|
|
1047
|
+
}
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
watchMailbox(user_id, parameters, options) {
|
|
1051
|
+
const params = buildClientParams([user_id, parameters], [{ in: 'path', key: 'user_id' }, { args: [{ in: 'body', key: 'provider' }, { in: 'body', key: 'force' }] }]);
|
|
1052
|
+
return (options?.client ?? this.client).post({
|
|
1053
|
+
responseStyle: 'data',
|
|
1054
|
+
url: '/users/{user_id}/watch_mailbox',
|
|
1007
1055
|
...options,
|
|
1008
1056
|
...params,
|
|
1009
1057
|
headers: {
|
|
@@ -1013,20 +1061,72 @@ class BillingAddons extends HeyApiClient {
|
|
|
1013
1061
|
}
|
|
1014
1062
|
});
|
|
1015
1063
|
}
|
|
1016
|
-
|
|
1017
|
-
const params = buildClientParams([
|
|
1064
|
+
deleteAction(user_id, action_id, options) {
|
|
1065
|
+
const params = buildClientParams([user_id, action_id], [{ in: 'path', key: 'user_id' }, { in: 'path', key: 'action_id' }]);
|
|
1066
|
+
return (options?.client ?? this.client).delete({
|
|
1067
|
+
responseStyle: 'data',
|
|
1068
|
+
url: '/users/{user_id}/actions/{action_id}',
|
|
1069
|
+
...options,
|
|
1070
|
+
...params
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
class Users2 extends HeyApiClient {
|
|
1075
|
+
constructor(args) {
|
|
1076
|
+
super(args);
|
|
1077
|
+
Users2.__registry.set(this, args?.key);
|
|
1078
|
+
}
|
|
1079
|
+
get users() {
|
|
1080
|
+
return this._users ?? (this._users = new Users({ client: this.client }));
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
Users2.__registry = new HeyApiRegistry();
|
|
1084
|
+
class OrganizationMember extends HeyApiClient {
|
|
1085
|
+
list(organization_id, parameters, options) {
|
|
1086
|
+
const params = buildClientParams([organization_id, parameters], [{ in: 'path', key: 'organization_id' }, { args: [{ in: 'query', key: 'limit' }, { in: 'query', key: 'starting_after' }] }]);
|
|
1018
1087
|
return (options?.client ?? this.client).get({
|
|
1019
1088
|
responseStyle: 'data',
|
|
1020
|
-
url: '/
|
|
1089
|
+
url: '/organizations/{organization_id}/members',
|
|
1021
1090
|
...options,
|
|
1022
1091
|
...params
|
|
1023
1092
|
});
|
|
1024
1093
|
}
|
|
1025
|
-
|
|
1026
|
-
const params = buildClientParams([parameters], [{ args: [{ in: '
|
|
1094
|
+
create(organization_id, parameters, options) {
|
|
1095
|
+
const params = buildClientParams([organization_id, parameters], [{ in: 'path', key: 'organization_id' }, { args: [{ in: 'body', key: 'email' }, { in: 'body', key: 'role' }] }]);
|
|
1027
1096
|
return (options?.client ?? this.client).post({
|
|
1028
1097
|
responseStyle: 'data',
|
|
1029
|
-
url: '/
|
|
1098
|
+
url: '/organizations/{organization_id}/members',
|
|
1099
|
+
...options,
|
|
1100
|
+
...params,
|
|
1101
|
+
headers: {
|
|
1102
|
+
'Content-Type': 'application/json',
|
|
1103
|
+
...options?.headers,
|
|
1104
|
+
...params.headers
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
delete(organization_id, member_id, options) {
|
|
1109
|
+
const params = buildClientParams([organization_id, member_id], [{ in: 'path', key: 'organization_id' }, { in: 'path', key: 'member_id' }]);
|
|
1110
|
+
return (options?.client ?? this.client).delete({
|
|
1111
|
+
responseStyle: 'data',
|
|
1112
|
+
url: '/organizations/{organization_id}/members/{member_id}',
|
|
1113
|
+
...options,
|
|
1114
|
+
...params
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
update(organization_id, member_id, parameters, options) {
|
|
1118
|
+
const params = buildClientParams([
|
|
1119
|
+
organization_id,
|
|
1120
|
+
member_id,
|
|
1121
|
+
parameters
|
|
1122
|
+
], [
|
|
1123
|
+
{ in: 'path', key: 'organization_id' },
|
|
1124
|
+
{ in: 'path', key: 'member_id' },
|
|
1125
|
+
{ args: [{ in: 'body', key: 'role' }] }
|
|
1126
|
+
]);
|
|
1127
|
+
return (options?.client ?? this.client).patch({
|
|
1128
|
+
responseStyle: 'data',
|
|
1129
|
+
url: '/organizations/{organization_id}/members/{member_id}',
|
|
1030
1130
|
...options,
|
|
1031
1131
|
...params,
|
|
1032
1132
|
headers: {
|
|
@@ -1037,29 +1137,29 @@ class BillingAddons extends HeyApiClient {
|
|
|
1037
1137
|
});
|
|
1038
1138
|
}
|
|
1039
1139
|
}
|
|
1040
|
-
class
|
|
1140
|
+
class OrganizationMembers extends HeyApiClient {
|
|
1041
1141
|
constructor(args) {
|
|
1042
1142
|
super(args);
|
|
1043
|
-
|
|
1143
|
+
OrganizationMembers.__registry.set(this, args?.key);
|
|
1044
1144
|
}
|
|
1045
|
-
get
|
|
1046
|
-
return this.
|
|
1145
|
+
get organizationMember() {
|
|
1146
|
+
return this._organizationMember ?? (this._organizationMember = new OrganizationMember({ client: this.client }));
|
|
1047
1147
|
}
|
|
1048
1148
|
}
|
|
1049
|
-
|
|
1050
|
-
class
|
|
1051
|
-
|
|
1149
|
+
OrganizationMembers.__registry = new HeyApiRegistry2();
|
|
1150
|
+
class Organization extends HeyApiClient {
|
|
1151
|
+
list(options) {
|
|
1052
1152
|
return (options?.client ?? this.client).get({
|
|
1053
1153
|
responseStyle: 'data',
|
|
1054
|
-
url: '/
|
|
1154
|
+
url: '/organizations',
|
|
1055
1155
|
...options
|
|
1056
1156
|
});
|
|
1057
1157
|
}
|
|
1058
|
-
|
|
1059
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: '
|
|
1158
|
+
create(parameters, options) {
|
|
1159
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'name' }] }]);
|
|
1060
1160
|
return (options?.client ?? this.client).post({
|
|
1061
1161
|
responseStyle: 'data',
|
|
1062
|
-
url: '/
|
|
1162
|
+
url: '/organizations',
|
|
1063
1163
|
...options,
|
|
1064
1164
|
...params,
|
|
1065
1165
|
headers: {
|
|
@@ -1069,11 +1169,29 @@ class BillingSubscription extends HeyApiClient {
|
|
|
1069
1169
|
}
|
|
1070
1170
|
});
|
|
1071
1171
|
}
|
|
1072
|
-
|
|
1073
|
-
const params = buildClientParams([
|
|
1074
|
-
return (options?.client ?? this.client).
|
|
1172
|
+
delete(organization_id, options) {
|
|
1173
|
+
const params = buildClientParams([organization_id], [{ in: 'path', key: 'organization_id' }]);
|
|
1174
|
+
return (options?.client ?? this.client).delete({
|
|
1075
1175
|
responseStyle: 'data',
|
|
1076
|
-
url: '/
|
|
1176
|
+
url: '/organizations/{organization_id}',
|
|
1177
|
+
...options,
|
|
1178
|
+
...params
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
retrieve(organization_id, options) {
|
|
1182
|
+
const params = buildClientParams([organization_id], [{ in: 'path', key: 'organization_id' }]);
|
|
1183
|
+
return (options?.client ?? this.client).get({
|
|
1184
|
+
responseStyle: 'data',
|
|
1185
|
+
url: '/organizations/{organization_id}',
|
|
1186
|
+
...options,
|
|
1187
|
+
...params
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
update(organization_id, parameters, options) {
|
|
1191
|
+
const params = buildClientParams([organization_id, parameters], [{ in: 'path', key: 'organization_id' }, { args: [{ in: 'body', key: 'name' }] }]);
|
|
1192
|
+
return (options?.client ?? this.client).patch({
|
|
1193
|
+
responseStyle: 'data',
|
|
1194
|
+
url: '/organizations/{organization_id}',
|
|
1077
1195
|
...options,
|
|
1078
1196
|
...params,
|
|
1079
1197
|
headers: {
|
|
@@ -1084,50 +1202,127 @@ class BillingSubscription extends HeyApiClient {
|
|
|
1084
1202
|
});
|
|
1085
1203
|
}
|
|
1086
1204
|
}
|
|
1087
|
-
class
|
|
1205
|
+
class Organizations extends HeyApiClient {
|
|
1088
1206
|
constructor(args) {
|
|
1089
1207
|
super(args);
|
|
1090
|
-
|
|
1208
|
+
Organizations.__registry.set(this, args?.key);
|
|
1091
1209
|
}
|
|
1092
|
-
get
|
|
1093
|
-
return this.
|
|
1210
|
+
get organization() {
|
|
1211
|
+
return this._organization ?? (this._organization = new Organization({ client: this.client }));
|
|
1094
1212
|
}
|
|
1095
1213
|
}
|
|
1096
|
-
|
|
1097
|
-
class
|
|
1098
|
-
|
|
1099
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
1214
|
+
Organizations.__registry = new HeyApiRegistry3();
|
|
1215
|
+
class ContactLists extends HeyApiClient {
|
|
1216
|
+
create(parameters, options) {
|
|
1217
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1218
|
+
{ in: 'body', key: 'owner' },
|
|
1219
|
+
{ in: 'body', key: 'name' },
|
|
1220
|
+
{ in: 'body', key: 'metadata' }
|
|
1221
|
+
] }]);
|
|
1222
|
+
return (options?.client ?? this.client).post({
|
|
1223
|
+
responseStyle: 'data',
|
|
1224
|
+
url: '/contact_lists',
|
|
1225
|
+
...options,
|
|
1226
|
+
...params,
|
|
1227
|
+
headers: {
|
|
1228
|
+
'Content-Type': 'application/json',
|
|
1229
|
+
...options?.headers,
|
|
1230
|
+
...params.headers
|
|
1231
|
+
}
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
remove(contact_list_id, parameters, options) {
|
|
1235
|
+
const params = buildClientParams([contact_list_id, parameters], [{ in: 'path', key: 'contact_list_id' }, { args: [{ in: 'body', key: 'remove_contacts' }] }]);
|
|
1236
|
+
return (options?.client ?? this.client).delete({
|
|
1237
|
+
responseStyle: 'data',
|
|
1238
|
+
url: '/contact_lists/{contact_list_id}',
|
|
1239
|
+
...options,
|
|
1240
|
+
...params,
|
|
1241
|
+
headers: {
|
|
1242
|
+
'Content-Type': 'application/json',
|
|
1243
|
+
...options?.headers,
|
|
1244
|
+
...params.headers
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
retrieve(contact_list_id, options) {
|
|
1249
|
+
const params = buildClientParams([contact_list_id], [{ in: 'path', key: 'contact_list_id' }]);
|
|
1100
1250
|
return (options?.client ?? this.client).get({
|
|
1101
1251
|
responseStyle: 'data',
|
|
1102
|
-
url: '/
|
|
1252
|
+
url: '/contact_lists/{contact_list_id}',
|
|
1103
1253
|
...options,
|
|
1104
1254
|
...params
|
|
1105
1255
|
});
|
|
1106
1256
|
}
|
|
1257
|
+
update(contact_list_id, parameters, options) {
|
|
1258
|
+
const params = buildClientParams([contact_list_id, parameters], [{ in: 'path', key: 'contact_list_id' }, { args: [{ in: 'body', key: 'name' }, { in: 'body', key: 'metadata' }] }]);
|
|
1259
|
+
return (options?.client ?? this.client).patch({
|
|
1260
|
+
responseStyle: 'data',
|
|
1261
|
+
url: '/contact_lists/{contact_list_id}',
|
|
1262
|
+
...options,
|
|
1263
|
+
...params,
|
|
1264
|
+
headers: {
|
|
1265
|
+
'Content-Type': 'application/json',
|
|
1266
|
+
...options?.headers,
|
|
1267
|
+
...params.headers
|
|
1268
|
+
}
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1107
1271
|
}
|
|
1108
|
-
class
|
|
1272
|
+
class ContactLists2 extends HeyApiClient {
|
|
1109
1273
|
constructor(args) {
|
|
1110
1274
|
super(args);
|
|
1111
|
-
|
|
1275
|
+
ContactLists2.__registry.set(this, args?.key);
|
|
1112
1276
|
}
|
|
1113
|
-
get
|
|
1114
|
-
return this.
|
|
1277
|
+
get contactLists() {
|
|
1278
|
+
return this._contactLists ?? (this._contactLists = new ContactLists({ client: this.client }));
|
|
1115
1279
|
}
|
|
1116
1280
|
}
|
|
1117
|
-
|
|
1118
|
-
class
|
|
1119
|
-
|
|
1281
|
+
ContactLists2.__registry = new HeyApiRegistry4();
|
|
1282
|
+
class Contacts extends HeyApiClient {
|
|
1283
|
+
delAll(parameters, options) {
|
|
1284
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'owner' }, { in: 'body', key: 'contact_list' }] }]);
|
|
1285
|
+
return (options?.client ?? this.client).delete({
|
|
1286
|
+
responseStyle: 'data',
|
|
1287
|
+
url: '/contacts',
|
|
1288
|
+
...options,
|
|
1289
|
+
...params,
|
|
1290
|
+
headers: {
|
|
1291
|
+
'Content-Type': 'application/json',
|
|
1292
|
+
...options?.headers,
|
|
1293
|
+
...params.headers
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
list(parameters, options) {
|
|
1298
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1299
|
+
{ in: 'query', key: 'owner' },
|
|
1300
|
+
{ in: 'query', key: 'limit' },
|
|
1301
|
+
{ in: 'query', key: 'email' },
|
|
1302
|
+
{ in: 'query', key: 'unsubscribed' },
|
|
1303
|
+
{ in: 'query', key: 'contact_list' }
|
|
1304
|
+
] }]);
|
|
1120
1305
|
return (options?.client ?? this.client).get({
|
|
1121
1306
|
responseStyle: 'data',
|
|
1122
|
-
url: '/
|
|
1123
|
-
...options
|
|
1307
|
+
url: '/contacts',
|
|
1308
|
+
...options,
|
|
1309
|
+
...params
|
|
1124
1310
|
});
|
|
1125
1311
|
}
|
|
1126
|
-
|
|
1127
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
1128
|
-
|
|
1312
|
+
create(parameters, options) {
|
|
1313
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1314
|
+
{ in: 'body', key: 'owner' },
|
|
1315
|
+
{ in: 'body', key: 'email' },
|
|
1316
|
+
{ in: 'body', key: 'blocked' },
|
|
1317
|
+
{ in: 'body', key: 'unsubscribed' },
|
|
1318
|
+
{ in: 'body', key: 'contact_lists' },
|
|
1319
|
+
{ in: 'body', key: 'properties' },
|
|
1320
|
+
{ in: 'body', key: 'notes' },
|
|
1321
|
+
{ in: 'body', key: 'metadata' }
|
|
1322
|
+
] }]);
|
|
1323
|
+
return (options?.client ?? this.client).post({
|
|
1129
1324
|
responseStyle: 'data',
|
|
1130
|
-
url: '/
|
|
1325
|
+
url: '/contacts',
|
|
1131
1326
|
...options,
|
|
1132
1327
|
...params,
|
|
1133
1328
|
headers: {
|
|
@@ -1137,18 +1332,25 @@ class Organization extends HeyApiClient {
|
|
|
1137
1332
|
}
|
|
1138
1333
|
});
|
|
1139
1334
|
}
|
|
1140
|
-
|
|
1141
|
-
|
|
1335
|
+
batchCreate(parameters, options) {
|
|
1336
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'contacts' }] }]);
|
|
1337
|
+
return (options?.client ?? this.client).post({
|
|
1142
1338
|
responseStyle: 'data',
|
|
1143
|
-
url: '/
|
|
1144
|
-
...options
|
|
1339
|
+
url: '/contacts/batch',
|
|
1340
|
+
...options,
|
|
1341
|
+
...params,
|
|
1342
|
+
headers: {
|
|
1343
|
+
'Content-Type': 'application/json',
|
|
1344
|
+
...options?.headers,
|
|
1345
|
+
...params.headers
|
|
1346
|
+
}
|
|
1145
1347
|
});
|
|
1146
1348
|
}
|
|
1147
|
-
|
|
1148
|
-
const params = buildClientParams([parameters], [{ args: [{
|
|
1349
|
+
batchCreate2(parameters, options) {
|
|
1350
|
+
const params = buildClientParams([parameters], [{ args: [{ key: 'body', map: 'body' }] }]);
|
|
1149
1351
|
return (options?.client ?? this.client).post({
|
|
1150
1352
|
responseStyle: 'data',
|
|
1151
|
-
url: '/
|
|
1353
|
+
url: '/contacts/batch_legacy',
|
|
1152
1354
|
...options,
|
|
1153
1355
|
...params,
|
|
1154
1356
|
headers: {
|
|
@@ -1158,29 +1360,36 @@ class Organization extends HeyApiClient {
|
|
|
1158
1360
|
}
|
|
1159
1361
|
});
|
|
1160
1362
|
}
|
|
1161
|
-
|
|
1162
|
-
const params = buildClientParams([
|
|
1363
|
+
del(contact_id, options) {
|
|
1364
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1163
1365
|
return (options?.client ?? this.client).delete({
|
|
1164
1366
|
responseStyle: 'data',
|
|
1165
|
-
url: '/
|
|
1367
|
+
url: '/contacts/{contact_id}',
|
|
1166
1368
|
...options,
|
|
1167
1369
|
...params
|
|
1168
1370
|
});
|
|
1169
1371
|
}
|
|
1170
|
-
retrieve(
|
|
1171
|
-
const params = buildClientParams([
|
|
1372
|
+
retrieve(contact_id, options) {
|
|
1373
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1172
1374
|
return (options?.client ?? this.client).get({
|
|
1173
1375
|
responseStyle: 'data',
|
|
1174
|
-
url: '/
|
|
1376
|
+
url: '/contacts/{contact_id}',
|
|
1175
1377
|
...options,
|
|
1176
1378
|
...params
|
|
1177
1379
|
});
|
|
1178
1380
|
}
|
|
1179
|
-
update(parameters, options) {
|
|
1180
|
-
const params = buildClientParams([parameters], [{
|
|
1381
|
+
update(contact_id, parameters, options) {
|
|
1382
|
+
const params = buildClientParams([contact_id, parameters], [{ in: 'path', key: 'contact_id' }, { args: [
|
|
1383
|
+
{ in: 'body', key: 'blocked' },
|
|
1384
|
+
{ in: 'body', key: 'unsubscribed' },
|
|
1385
|
+
{ in: 'body', key: 'contact_lists' },
|
|
1386
|
+
{ in: 'body', key: 'properties' },
|
|
1387
|
+
{ in: 'body', key: 'notes' },
|
|
1388
|
+
{ in: 'body', key: 'metadata' }
|
|
1389
|
+
] }]);
|
|
1181
1390
|
return (options?.client ?? this.client).patch({
|
|
1182
1391
|
responseStyle: 'data',
|
|
1183
|
-
url: '/
|
|
1392
|
+
url: '/contacts/{contact_id}',
|
|
1184
1393
|
...options,
|
|
1185
1394
|
...params,
|
|
1186
1395
|
headers: {
|
|
@@ -1190,40 +1399,57 @@ class Organization extends HeyApiClient {
|
|
|
1190
1399
|
}
|
|
1191
1400
|
});
|
|
1192
1401
|
}
|
|
1402
|
+
block(contact_id, options) {
|
|
1403
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1404
|
+
return (options?.client ?? this.client).post({
|
|
1405
|
+
responseStyle: 'data',
|
|
1406
|
+
url: '/contacts/{contact_id}/block',
|
|
1407
|
+
...options,
|
|
1408
|
+
...params
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1411
|
+
unblock(contact_id, options) {
|
|
1412
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1413
|
+
return (options?.client ?? this.client).post({
|
|
1414
|
+
responseStyle: 'data',
|
|
1415
|
+
url: '/contacts/{contact_id}/unblock',
|
|
1416
|
+
...options,
|
|
1417
|
+
...params
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
resubscribe(contact_id, options) {
|
|
1421
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1422
|
+
return (options?.client ?? this.client).post({
|
|
1423
|
+
responseStyle: 'data',
|
|
1424
|
+
url: '/contacts/{contact_id}/resubscribe',
|
|
1425
|
+
...options,
|
|
1426
|
+
...params
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1193
1429
|
}
|
|
1194
|
-
class
|
|
1430
|
+
class Contacts2 extends HeyApiClient {
|
|
1195
1431
|
constructor(args) {
|
|
1196
1432
|
super(args);
|
|
1197
|
-
|
|
1433
|
+
Contacts2.__registry.set(this, args?.key);
|
|
1198
1434
|
}
|
|
1199
|
-
get
|
|
1200
|
-
return this.
|
|
1435
|
+
get contacts() {
|
|
1436
|
+
return this._contacts ?? (this._contacts = new Contacts({ client: this.client }));
|
|
1201
1437
|
}
|
|
1202
1438
|
}
|
|
1203
|
-
|
|
1204
|
-
class
|
|
1205
|
-
|
|
1206
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
1207
|
-
{ in: 'path', key: 'organization_id' },
|
|
1208
|
-
{ in: 'query', key: 'limit' },
|
|
1209
|
-
{ in: 'query', key: 'starting_after' }
|
|
1210
|
-
] }]);
|
|
1439
|
+
Contacts2.__registry = new HeyApiRegistry5();
|
|
1440
|
+
class BillingAddons extends HeyApiClient {
|
|
1441
|
+
getAddons(options) {
|
|
1211
1442
|
return (options?.client ?? this.client).get({
|
|
1212
1443
|
responseStyle: 'data',
|
|
1213
|
-
url: '/
|
|
1214
|
-
...options
|
|
1215
|
-
...params
|
|
1444
|
+
url: '/billing/addons',
|
|
1445
|
+
...options
|
|
1216
1446
|
});
|
|
1217
1447
|
}
|
|
1218
|
-
|
|
1219
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
1220
|
-
{ in: 'path', key: 'organization_id' },
|
|
1221
|
-
{ in: 'body', key: 'email' },
|
|
1222
|
-
{ in: 'body', key: 'role' }
|
|
1223
|
-
] }]);
|
|
1448
|
+
previewUpdate(addon, parameters, options) {
|
|
1449
|
+
const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
|
|
1224
1450
|
return (options?.client ?? this.client).post({
|
|
1225
1451
|
responseStyle: 'data',
|
|
1226
|
-
url: '/
|
|
1452
|
+
url: '/billing/addons/{addon}/preview',
|
|
1227
1453
|
...options,
|
|
1228
1454
|
...params,
|
|
1229
1455
|
headers: {
|
|
@@ -1233,24 +1459,67 @@ class OrganizationMember extends HeyApiClient {
|
|
|
1233
1459
|
}
|
|
1234
1460
|
});
|
|
1235
1461
|
}
|
|
1236
|
-
|
|
1237
|
-
const params = buildClientParams([
|
|
1238
|
-
return (options?.client ?? this.client).
|
|
1462
|
+
getAddonUsages(addon, options) {
|
|
1463
|
+
const params = buildClientParams([addon], [{ in: 'path', key: 'addon' }]);
|
|
1464
|
+
return (options?.client ?? this.client).get({
|
|
1239
1465
|
responseStyle: 'data',
|
|
1240
|
-
url: '/
|
|
1466
|
+
url: '/billing/addons/{addon}',
|
|
1241
1467
|
...options,
|
|
1242
1468
|
...params
|
|
1243
1469
|
});
|
|
1244
1470
|
}
|
|
1471
|
+
update(addon, parameters, options) {
|
|
1472
|
+
const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
|
|
1473
|
+
return (options?.client ?? this.client).post({
|
|
1474
|
+
responseStyle: 'data',
|
|
1475
|
+
url: '/billing/addons/{addon}',
|
|
1476
|
+
...options,
|
|
1477
|
+
...params,
|
|
1478
|
+
headers: {
|
|
1479
|
+
'Content-Type': 'application/json',
|
|
1480
|
+
...options?.headers,
|
|
1481
|
+
...params.headers
|
|
1482
|
+
}
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
class BillingAddons2 extends HeyApiClient {
|
|
1487
|
+
constructor(args) {
|
|
1488
|
+
super(args);
|
|
1489
|
+
BillingAddons2.__registry.set(this, args?.key);
|
|
1490
|
+
}
|
|
1491
|
+
get billingAddons() {
|
|
1492
|
+
return this._billingAddons ?? (this._billingAddons = new BillingAddons({ client: this.client }));
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
BillingAddons2.__registry = new HeyApiRegistry6();
|
|
1496
|
+
class BillingSubscription extends HeyApiClient {
|
|
1497
|
+
get(options) {
|
|
1498
|
+
return (options?.client ?? this.client).get({
|
|
1499
|
+
responseStyle: 'data',
|
|
1500
|
+
url: '/billing/subscription',
|
|
1501
|
+
...options
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1245
1504
|
update(parameters, options) {
|
|
1246
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
1247
|
-
|
|
1248
|
-
{ in: 'path', key: 'member_id' },
|
|
1249
|
-
{ in: 'body', key: 'role' }
|
|
1250
|
-
] }]);
|
|
1251
|
-
return (options?.client ?? this.client).patch({
|
|
1505
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'plan' }, { in: 'body', key: 'billing_period' }] }]);
|
|
1506
|
+
return (options?.client ?? this.client).post({
|
|
1252
1507
|
responseStyle: 'data',
|
|
1253
|
-
url: '/
|
|
1508
|
+
url: '/billing/subscription',
|
|
1509
|
+
...options,
|
|
1510
|
+
...params,
|
|
1511
|
+
headers: {
|
|
1512
|
+
'Content-Type': 'application/json',
|
|
1513
|
+
...options?.headers,
|
|
1514
|
+
...params.headers
|
|
1515
|
+
}
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
previewUpdate(parameters, options) {
|
|
1519
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'plan' }, { in: 'body', key: 'billing_period' }] }]);
|
|
1520
|
+
return (options?.client ?? this.client).post({
|
|
1521
|
+
responseStyle: 'data',
|
|
1522
|
+
url: '/billing/subscription/preview',
|
|
1254
1523
|
...options,
|
|
1255
1524
|
...params,
|
|
1256
1525
|
headers: {
|
|
@@ -1261,16 +1530,37 @@ class OrganizationMember extends HeyApiClient {
|
|
|
1261
1530
|
});
|
|
1262
1531
|
}
|
|
1263
1532
|
}
|
|
1264
|
-
class
|
|
1533
|
+
class BillingSubscription2 extends HeyApiClient {
|
|
1265
1534
|
constructor(args) {
|
|
1266
1535
|
super(args);
|
|
1267
|
-
|
|
1536
|
+
BillingSubscription2.__registry.set(this, args?.key);
|
|
1268
1537
|
}
|
|
1269
|
-
get
|
|
1270
|
-
return this.
|
|
1538
|
+
get billingSubscription() {
|
|
1539
|
+
return this._billingSubscription ?? (this._billingSubscription = new BillingSubscription({ client: this.client }));
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
BillingSubscription2.__registry = new HeyApiRegistry7();
|
|
1543
|
+
class Billing extends HeyApiClient {
|
|
1544
|
+
getPrices(parameters, options) {
|
|
1545
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'currency' }] }]);
|
|
1546
|
+
return (options?.client ?? this.client).get({
|
|
1547
|
+
responseStyle: 'data',
|
|
1548
|
+
url: '/billing/prices',
|
|
1549
|
+
...options,
|
|
1550
|
+
...params
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
class Billing2 extends HeyApiClient {
|
|
1555
|
+
constructor(args) {
|
|
1556
|
+
super(args);
|
|
1557
|
+
Billing2.__registry.set(this, args?.key);
|
|
1558
|
+
}
|
|
1559
|
+
get billing() {
|
|
1560
|
+
return this._billing ?? (this._billing = new Billing({ client: this.client }));
|
|
1271
1561
|
}
|
|
1272
1562
|
}
|
|
1273
|
-
|
|
1563
|
+
Billing2.__registry = new HeyApiRegistry8();
|
|
1274
1564
|
class Default extends HeyApiClient {
|
|
1275
1565
|
constructor(args) {
|
|
1276
1566
|
super(args);
|
|
@@ -1284,7 +1574,7 @@ class Default extends HeyApiClient {
|
|
|
1284
1574
|
});
|
|
1285
1575
|
}
|
|
1286
1576
|
}
|
|
1287
|
-
Default.__registry = new
|
|
1577
|
+
Default.__registry = new HeyApiRegistry9();
|
|
1288
1578
|
|
|
1289
1579
|
var types_gen = /*#__PURE__*/Object.freeze({
|
|
1290
1580
|
__proto__: null
|
|
@@ -1292,7 +1582,7 @@ var types_gen = /*#__PURE__*/Object.freeze({
|
|
|
1292
1582
|
|
|
1293
1583
|
class Mailmeteor {
|
|
1294
1584
|
constructor(key, config) {
|
|
1295
|
-
const baseUrl = config?.baseUrl || "https://
|
|
1585
|
+
const baseUrl = config?.baseUrl || "https://mailmeteor-emailservice-dev.appspot.com/v1";
|
|
1296
1586
|
this.client = createClient(createConfig({
|
|
1297
1587
|
baseUrl,
|
|
1298
1588
|
headers: {
|
|
@@ -1302,6 +1592,10 @@ class Mailmeteor {
|
|
|
1302
1592
|
this.billingAddons = new BillingAddons({ client: this.client });
|
|
1303
1593
|
this.billingSubscription = new BillingSubscription({ client: this.client });
|
|
1304
1594
|
this.billing = new Billing({ client: this.client });
|
|
1595
|
+
this.contactLists = new ContactLists({ client: this.client });
|
|
1596
|
+
this.organizations = new Organizations({ client: this.client });
|
|
1597
|
+
this.users = new Users({ client: this.client });
|
|
1598
|
+
this.contacts = new Contacts({ client: this.client });
|
|
1305
1599
|
}
|
|
1306
1600
|
setApiKey(key) {
|
|
1307
1601
|
const currentConfig = this.client.getConfig();
|