mailmeteor 0.0.3 → 0.0.4
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 +270 -151
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +860 -514
- package/dist/index.mjs +270 -151
- 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 +111 -71
- package/dist/types/generated-sdk/sdk.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/types.gen.d.ts +741 -489
- package/dist/types/generated-sdk/types.gen.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -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 BillingAddons2()" to fix this error.`);
|
|
971
955
|
}
|
|
972
956
|
return instance;
|
|
973
957
|
}
|
|
@@ -976,6 +960,38 @@ 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 BillingSubscription2()" 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 Billing2()" 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 {
|
|
979
995
|
constructor() {
|
|
980
996
|
this.defaultKey = 'default';
|
|
981
997
|
this.instances = new Map();
|
|
@@ -991,19 +1007,21 @@ class HeyApiRegistry6 {
|
|
|
991
1007
|
this.instances.set(key ?? this.defaultKey, value);
|
|
992
1008
|
}
|
|
993
1009
|
}
|
|
994
|
-
class
|
|
995
|
-
|
|
1010
|
+
class Users extends HeyApiClient {
|
|
1011
|
+
getCurrentOrganization(userId, options) {
|
|
1012
|
+
const params = buildClientParams([userId], [{ in: 'path', key: 'userId' }]);
|
|
996
1013
|
return (options?.client ?? this.client).get({
|
|
997
1014
|
responseStyle: 'data',
|
|
998
|
-
url: '/
|
|
999
|
-
...options
|
|
1015
|
+
url: '/users/{userId}/current_organization',
|
|
1016
|
+
...options,
|
|
1017
|
+
...params
|
|
1000
1018
|
});
|
|
1001
1019
|
}
|
|
1002
|
-
|
|
1003
|
-
const params = buildClientParams([parameters], [{
|
|
1020
|
+
setCurrentOrganization(user_id, parameters, options) {
|
|
1021
|
+
const params = buildClientParams([user_id, parameters], [{ in: 'path', key: 'user_id' }, { args: [{ in: 'body', key: 'organization_id' }] }]);
|
|
1004
1022
|
return (options?.client ?? this.client).post({
|
|
1005
1023
|
responseStyle: 'data',
|
|
1006
|
-
url: '/
|
|
1024
|
+
url: '/users/{user_id}/current_organization',
|
|
1007
1025
|
...options,
|
|
1008
1026
|
...params,
|
|
1009
1027
|
headers: {
|
|
@@ -1013,20 +1031,11 @@ class BillingAddons extends HeyApiClient {
|
|
|
1013
1031
|
}
|
|
1014
1032
|
});
|
|
1015
1033
|
}
|
|
1016
|
-
|
|
1017
|
-
const params = buildClientParams([parameters], [{ args: [{ in: '
|
|
1018
|
-
return (options?.client ?? this.client).get({
|
|
1019
|
-
responseStyle: 'data',
|
|
1020
|
-
url: '/billing/addons/{addon}',
|
|
1021
|
-
...options,
|
|
1022
|
-
...params
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
update(parameters, options) {
|
|
1026
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'addon' }, { in: 'body', key: 'quantity' }] }]);
|
|
1034
|
+
watchMailbox(user_id, parameters, options) {
|
|
1035
|
+
const params = buildClientParams([user_id, parameters], [{ in: 'path', key: 'user_id' }, { args: [{ in: 'body', key: 'provider' }, { in: 'body', key: 'force' }] }]);
|
|
1027
1036
|
return (options?.client ?? this.client).post({
|
|
1028
1037
|
responseStyle: 'data',
|
|
1029
|
-
url: '/
|
|
1038
|
+
url: '/users/{user_id}/watch_mailbox',
|
|
1030
1039
|
...options,
|
|
1031
1040
|
...params,
|
|
1032
1041
|
headers: {
|
|
@@ -1036,30 +1045,41 @@ class BillingAddons extends HeyApiClient {
|
|
|
1036
1045
|
}
|
|
1037
1046
|
});
|
|
1038
1047
|
}
|
|
1048
|
+
deleteAction(user_id, action_id, options) {
|
|
1049
|
+
const params = buildClientParams([user_id, action_id], [{ in: 'path', key: 'user_id' }, { in: 'path', key: 'action_id' }]);
|
|
1050
|
+
return (options?.client ?? this.client).delete({
|
|
1051
|
+
responseStyle: 'data',
|
|
1052
|
+
url: '/users/{user_id}/actions/{action_id}',
|
|
1053
|
+
...options,
|
|
1054
|
+
...params
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1039
1057
|
}
|
|
1040
|
-
class
|
|
1058
|
+
class Users2 extends HeyApiClient {
|
|
1041
1059
|
constructor(args) {
|
|
1042
1060
|
super(args);
|
|
1043
|
-
|
|
1061
|
+
Users2.__registry.set(this, args?.key);
|
|
1044
1062
|
}
|
|
1045
|
-
get
|
|
1046
|
-
return this.
|
|
1063
|
+
get users() {
|
|
1064
|
+
return this._users ?? (this._users = new Users({ client: this.client }));
|
|
1047
1065
|
}
|
|
1048
1066
|
}
|
|
1049
|
-
|
|
1050
|
-
class
|
|
1051
|
-
|
|
1067
|
+
Users2.__registry = new HeyApiRegistry();
|
|
1068
|
+
class OrganizationMember extends HeyApiClient {
|
|
1069
|
+
list(organization_id, parameters, options) {
|
|
1070
|
+
const params = buildClientParams([organization_id, parameters], [{ in: 'path', key: 'organization_id' }, { args: [{ in: 'query', key: 'limit' }, { in: 'query', key: 'starting_after' }] }]);
|
|
1052
1071
|
return (options?.client ?? this.client).get({
|
|
1053
1072
|
responseStyle: 'data',
|
|
1054
|
-
url: '/
|
|
1055
|
-
...options
|
|
1073
|
+
url: '/organizations/{organization_id}/members',
|
|
1074
|
+
...options,
|
|
1075
|
+
...params
|
|
1056
1076
|
});
|
|
1057
1077
|
}
|
|
1058
|
-
|
|
1059
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: '
|
|
1078
|
+
create(organization_id, parameters, options) {
|
|
1079
|
+
const params = buildClientParams([organization_id, parameters], [{ in: 'path', key: 'organization_id' }, { args: [{ in: 'body', key: 'email' }, { in: 'body', key: 'role' }] }]);
|
|
1060
1080
|
return (options?.client ?? this.client).post({
|
|
1061
1081
|
responseStyle: 'data',
|
|
1062
|
-
url: '/
|
|
1082
|
+
url: '/organizations/{organization_id}/members',
|
|
1063
1083
|
...options,
|
|
1064
1084
|
...params,
|
|
1065
1085
|
headers: {
|
|
@@ -1069,11 +1089,28 @@ class BillingSubscription extends HeyApiClient {
|
|
|
1069
1089
|
}
|
|
1070
1090
|
});
|
|
1071
1091
|
}
|
|
1072
|
-
|
|
1073
|
-
const params = buildClientParams([
|
|
1074
|
-
return (options?.client ?? this.client).
|
|
1092
|
+
delete(organization_id, member_id, options) {
|
|
1093
|
+
const params = buildClientParams([organization_id, member_id], [{ in: 'path', key: 'organization_id' }, { in: 'path', key: 'member_id' }]);
|
|
1094
|
+
return (options?.client ?? this.client).delete({
|
|
1075
1095
|
responseStyle: 'data',
|
|
1076
|
-
url: '/
|
|
1096
|
+
url: '/organizations/{organization_id}/members/{member_id}',
|
|
1097
|
+
...options,
|
|
1098
|
+
...params
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
update(organization_id, member_id, parameters, options) {
|
|
1102
|
+
const params = buildClientParams([
|
|
1103
|
+
organization_id,
|
|
1104
|
+
member_id,
|
|
1105
|
+
parameters
|
|
1106
|
+
], [
|
|
1107
|
+
{ in: 'path', key: 'organization_id' },
|
|
1108
|
+
{ in: 'path', key: 'member_id' },
|
|
1109
|
+
{ args: [{ in: 'body', key: 'role' }] }
|
|
1110
|
+
]);
|
|
1111
|
+
return (options?.client ?? this.client).patch({
|
|
1112
|
+
responseStyle: 'data',
|
|
1113
|
+
url: '/organizations/{organization_id}/members/{member_id}',
|
|
1077
1114
|
...options,
|
|
1078
1115
|
...params,
|
|
1079
1116
|
headers: {
|
|
@@ -1084,59 +1121,17 @@ class BillingSubscription extends HeyApiClient {
|
|
|
1084
1121
|
});
|
|
1085
1122
|
}
|
|
1086
1123
|
}
|
|
1087
|
-
class
|
|
1088
|
-
constructor(args) {
|
|
1089
|
-
super(args);
|
|
1090
|
-
BillingSubscription2.__registry.set(this, args?.key);
|
|
1091
|
-
}
|
|
1092
|
-
get billingSubscription() {
|
|
1093
|
-
return this._billingSubscription ?? (this._billingSubscription = new BillingSubscription({ client: this.client }));
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
BillingSubscription2.__registry = new HeyApiRegistry2();
|
|
1097
|
-
class Billing extends HeyApiClient {
|
|
1098
|
-
getPrices(parameters, options) {
|
|
1099
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'currency' }] }]);
|
|
1100
|
-
return (options?.client ?? this.client).get({
|
|
1101
|
-
responseStyle: 'data',
|
|
1102
|
-
url: '/billing/prices',
|
|
1103
|
-
...options,
|
|
1104
|
-
...params
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
|
-
class Billing2 extends HeyApiClient {
|
|
1124
|
+
class OrganizationMembers extends HeyApiClient {
|
|
1109
1125
|
constructor(args) {
|
|
1110
1126
|
super(args);
|
|
1111
|
-
|
|
1127
|
+
OrganizationMembers.__registry.set(this, args?.key);
|
|
1112
1128
|
}
|
|
1113
|
-
get
|
|
1114
|
-
return this.
|
|
1129
|
+
get organizationMember() {
|
|
1130
|
+
return this._organizationMember ?? (this._organizationMember = new OrganizationMember({ client: this.client }));
|
|
1115
1131
|
}
|
|
1116
1132
|
}
|
|
1117
|
-
|
|
1133
|
+
OrganizationMembers.__registry = new HeyApiRegistry2();
|
|
1118
1134
|
class Organization extends HeyApiClient {
|
|
1119
|
-
getCurrent(options) {
|
|
1120
|
-
return (options?.client ?? this.client).get({
|
|
1121
|
-
responseStyle: 'data',
|
|
1122
|
-
url: '/organizations/current',
|
|
1123
|
-
...options
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
setCurrent(parameters, options) {
|
|
1127
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'organization_id' }] }]);
|
|
1128
|
-
return (options?.client ?? this.client).put({
|
|
1129
|
-
responseStyle: 'data',
|
|
1130
|
-
url: '/organizations/current',
|
|
1131
|
-
...options,
|
|
1132
|
-
...params,
|
|
1133
|
-
headers: {
|
|
1134
|
-
'Content-Type': 'application/json',
|
|
1135
|
-
...options?.headers,
|
|
1136
|
-
...params.headers
|
|
1137
|
-
}
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
1135
|
list(options) {
|
|
1141
1136
|
return (options?.client ?? this.client).get({
|
|
1142
1137
|
responseStyle: 'data',
|
|
@@ -1158,8 +1153,8 @@ class Organization extends HeyApiClient {
|
|
|
1158
1153
|
}
|
|
1159
1154
|
});
|
|
1160
1155
|
}
|
|
1161
|
-
delete(
|
|
1162
|
-
const params = buildClientParams([
|
|
1156
|
+
delete(organization_id, options) {
|
|
1157
|
+
const params = buildClientParams([organization_id], [{ in: 'path', key: 'organization_id' }]);
|
|
1163
1158
|
return (options?.client ?? this.client).delete({
|
|
1164
1159
|
responseStyle: 'data',
|
|
1165
1160
|
url: '/organizations/{organization_id}',
|
|
@@ -1167,8 +1162,8 @@ class Organization extends HeyApiClient {
|
|
|
1167
1162
|
...params
|
|
1168
1163
|
});
|
|
1169
1164
|
}
|
|
1170
|
-
retrieve(
|
|
1171
|
-
const params = buildClientParams([
|
|
1165
|
+
retrieve(organization_id, options) {
|
|
1166
|
+
const params = buildClientParams([organization_id], [{ in: 'path', key: 'organization_id' }]);
|
|
1172
1167
|
return (options?.client ?? this.client).get({
|
|
1173
1168
|
responseStyle: 'data',
|
|
1174
1169
|
url: '/organizations/{organization_id}',
|
|
@@ -1176,8 +1171,8 @@ class Organization extends HeyApiClient {
|
|
|
1176
1171
|
...params
|
|
1177
1172
|
});
|
|
1178
1173
|
}
|
|
1179
|
-
update(parameters, options) {
|
|
1180
|
-
const params = buildClientParams([parameters], [{
|
|
1174
|
+
update(organization_id, parameters, options) {
|
|
1175
|
+
const params = buildClientParams([organization_id, parameters], [{ in: 'path', key: 'organization_id' }, { args: [{ in: 'body', key: 'name' }] }]);
|
|
1181
1176
|
return (options?.client ?? this.client).patch({
|
|
1182
1177
|
responseStyle: 'data',
|
|
1183
1178
|
url: '/organizations/{organization_id}',
|
|
@@ -1200,30 +1195,87 @@ class Organizations extends HeyApiClient {
|
|
|
1200
1195
|
return this._organization ?? (this._organization = new Organization({ client: this.client }));
|
|
1201
1196
|
}
|
|
1202
1197
|
}
|
|
1203
|
-
Organizations.__registry = new
|
|
1204
|
-
class
|
|
1205
|
-
|
|
1198
|
+
Organizations.__registry = new HeyApiRegistry3();
|
|
1199
|
+
class ContactLists extends HeyApiClient {
|
|
1200
|
+
create(parameters, options) {
|
|
1206
1201
|
const params = buildClientParams([parameters], [{ args: [
|
|
1207
|
-
{ in: '
|
|
1208
|
-
{ in: '
|
|
1209
|
-
{ in: '
|
|
1202
|
+
{ in: 'body', key: 'owner' },
|
|
1203
|
+
{ in: 'body', key: 'name' },
|
|
1204
|
+
{ in: 'body', key: 'metadata' }
|
|
1210
1205
|
] }]);
|
|
1206
|
+
return (options?.client ?? this.client).post({
|
|
1207
|
+
responseStyle: 'data',
|
|
1208
|
+
url: '/contact_lists',
|
|
1209
|
+
...options,
|
|
1210
|
+
...params,
|
|
1211
|
+
headers: {
|
|
1212
|
+
'Content-Type': 'application/json',
|
|
1213
|
+
...options?.headers,
|
|
1214
|
+
...params.headers
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
remove(contact_list_id, parameters, options) {
|
|
1219
|
+
const params = buildClientParams([contact_list_id, parameters], [{ in: 'path', key: 'contact_list_id' }, { args: [{ in: 'body', key: 'remove_contacts' }] }]);
|
|
1220
|
+
return (options?.client ?? this.client).delete({
|
|
1221
|
+
responseStyle: 'data',
|
|
1222
|
+
url: '/contact_lists/{contact_list_id}',
|
|
1223
|
+
...options,
|
|
1224
|
+
...params,
|
|
1225
|
+
headers: {
|
|
1226
|
+
'Content-Type': 'application/json',
|
|
1227
|
+
...options?.headers,
|
|
1228
|
+
...params.headers
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
retrieve(contact_list_id, options) {
|
|
1233
|
+
const params = buildClientParams([contact_list_id], [{ in: 'path', key: 'contact_list_id' }]);
|
|
1211
1234
|
return (options?.client ?? this.client).get({
|
|
1212
1235
|
responseStyle: 'data',
|
|
1213
|
-
url: '/
|
|
1236
|
+
url: '/contact_lists/{contact_list_id}',
|
|
1214
1237
|
...options,
|
|
1215
1238
|
...params
|
|
1216
1239
|
});
|
|
1217
1240
|
}
|
|
1218
|
-
|
|
1219
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1241
|
+
update(contact_list_id, parameters, options) {
|
|
1242
|
+
const params = buildClientParams([contact_list_id, parameters], [{ in: 'path', key: 'contact_list_id' }, { args: [{ in: 'body', key: 'name' }, { in: 'body', key: 'metadata' }] }]);
|
|
1243
|
+
return (options?.client ?? this.client).patch({
|
|
1244
|
+
responseStyle: 'data',
|
|
1245
|
+
url: '/contact_lists/{contact_list_id}',
|
|
1246
|
+
...options,
|
|
1247
|
+
...params,
|
|
1248
|
+
headers: {
|
|
1249
|
+
'Content-Type': 'application/json',
|
|
1250
|
+
...options?.headers,
|
|
1251
|
+
...params.headers
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
class ContactLists2 extends HeyApiClient {
|
|
1257
|
+
constructor(args) {
|
|
1258
|
+
super(args);
|
|
1259
|
+
ContactLists2.__registry.set(this, args?.key);
|
|
1260
|
+
}
|
|
1261
|
+
get contactLists() {
|
|
1262
|
+
return this._contactLists ?? (this._contactLists = new ContactLists({ client: this.client }));
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
ContactLists2.__registry = new HeyApiRegistry4();
|
|
1266
|
+
class BillingAddons extends HeyApiClient {
|
|
1267
|
+
getAddons(options) {
|
|
1268
|
+
return (options?.client ?? this.client).get({
|
|
1269
|
+
responseStyle: 'data',
|
|
1270
|
+
url: '/billing/addons',
|
|
1271
|
+
...options
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
previewUpdate(addon, parameters, options) {
|
|
1275
|
+
const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
|
|
1224
1276
|
return (options?.client ?? this.client).post({
|
|
1225
1277
|
responseStyle: 'data',
|
|
1226
|
-
url: '/
|
|
1278
|
+
url: '/billing/addons/{addon}/preview',
|
|
1227
1279
|
...options,
|
|
1228
1280
|
...params,
|
|
1229
1281
|
headers: {
|
|
@@ -1233,24 +1285,67 @@ class OrganizationMember extends HeyApiClient {
|
|
|
1233
1285
|
}
|
|
1234
1286
|
});
|
|
1235
1287
|
}
|
|
1236
|
-
|
|
1237
|
-
const params = buildClientParams([
|
|
1238
|
-
return (options?.client ?? this.client).
|
|
1288
|
+
getAddonUsages(addon, options) {
|
|
1289
|
+
const params = buildClientParams([addon], [{ in: 'path', key: 'addon' }]);
|
|
1290
|
+
return (options?.client ?? this.client).get({
|
|
1239
1291
|
responseStyle: 'data',
|
|
1240
|
-
url: '/
|
|
1292
|
+
url: '/billing/addons/{addon}',
|
|
1241
1293
|
...options,
|
|
1242
1294
|
...params
|
|
1243
1295
|
});
|
|
1244
1296
|
}
|
|
1297
|
+
update(addon, parameters, options) {
|
|
1298
|
+
const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
|
|
1299
|
+
return (options?.client ?? this.client).post({
|
|
1300
|
+
responseStyle: 'data',
|
|
1301
|
+
url: '/billing/addons/{addon}',
|
|
1302
|
+
...options,
|
|
1303
|
+
...params,
|
|
1304
|
+
headers: {
|
|
1305
|
+
'Content-Type': 'application/json',
|
|
1306
|
+
...options?.headers,
|
|
1307
|
+
...params.headers
|
|
1308
|
+
}
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
class BillingAddons2 extends HeyApiClient {
|
|
1313
|
+
constructor(args) {
|
|
1314
|
+
super(args);
|
|
1315
|
+
BillingAddons2.__registry.set(this, args?.key);
|
|
1316
|
+
}
|
|
1317
|
+
get billingAddons() {
|
|
1318
|
+
return this._billingAddons ?? (this._billingAddons = new BillingAddons({ client: this.client }));
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
BillingAddons2.__registry = new HeyApiRegistry5();
|
|
1322
|
+
class BillingSubscription extends HeyApiClient {
|
|
1323
|
+
get(options) {
|
|
1324
|
+
return (options?.client ?? this.client).get({
|
|
1325
|
+
responseStyle: 'data',
|
|
1326
|
+
url: '/billing/subscription',
|
|
1327
|
+
...options
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1245
1330
|
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({
|
|
1331
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'plan' }, { in: 'body', key: 'billing_period' }] }]);
|
|
1332
|
+
return (options?.client ?? this.client).post({
|
|
1252
1333
|
responseStyle: 'data',
|
|
1253
|
-
url: '/
|
|
1334
|
+
url: '/billing/subscription',
|
|
1335
|
+
...options,
|
|
1336
|
+
...params,
|
|
1337
|
+
headers: {
|
|
1338
|
+
'Content-Type': 'application/json',
|
|
1339
|
+
...options?.headers,
|
|
1340
|
+
...params.headers
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
}
|
|
1344
|
+
previewUpdate(parameters, options) {
|
|
1345
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'plan' }, { in: 'body', key: 'billing_period' }] }]);
|
|
1346
|
+
return (options?.client ?? this.client).post({
|
|
1347
|
+
responseStyle: 'data',
|
|
1348
|
+
url: '/billing/subscription/preview',
|
|
1254
1349
|
...options,
|
|
1255
1350
|
...params,
|
|
1256
1351
|
headers: {
|
|
@@ -1261,16 +1356,37 @@ class OrganizationMember extends HeyApiClient {
|
|
|
1261
1356
|
});
|
|
1262
1357
|
}
|
|
1263
1358
|
}
|
|
1264
|
-
class
|
|
1359
|
+
class BillingSubscription2 extends HeyApiClient {
|
|
1265
1360
|
constructor(args) {
|
|
1266
1361
|
super(args);
|
|
1267
|
-
|
|
1362
|
+
BillingSubscription2.__registry.set(this, args?.key);
|
|
1268
1363
|
}
|
|
1269
|
-
get
|
|
1270
|
-
return this.
|
|
1364
|
+
get billingSubscription() {
|
|
1365
|
+
return this._billingSubscription ?? (this._billingSubscription = new BillingSubscription({ client: this.client }));
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
BillingSubscription2.__registry = new HeyApiRegistry6();
|
|
1369
|
+
class Billing extends HeyApiClient {
|
|
1370
|
+
getPrices(parameters, options) {
|
|
1371
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'currency' }] }]);
|
|
1372
|
+
return (options?.client ?? this.client).get({
|
|
1373
|
+
responseStyle: 'data',
|
|
1374
|
+
url: '/billing/prices',
|
|
1375
|
+
...options,
|
|
1376
|
+
...params
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
class Billing2 extends HeyApiClient {
|
|
1381
|
+
constructor(args) {
|
|
1382
|
+
super(args);
|
|
1383
|
+
Billing2.__registry.set(this, args?.key);
|
|
1384
|
+
}
|
|
1385
|
+
get billing() {
|
|
1386
|
+
return this._billing ?? (this._billing = new Billing({ client: this.client }));
|
|
1271
1387
|
}
|
|
1272
1388
|
}
|
|
1273
|
-
|
|
1389
|
+
Billing2.__registry = new HeyApiRegistry7();
|
|
1274
1390
|
class Default extends HeyApiClient {
|
|
1275
1391
|
constructor(args) {
|
|
1276
1392
|
super(args);
|
|
@@ -1284,7 +1400,7 @@ class Default extends HeyApiClient {
|
|
|
1284
1400
|
});
|
|
1285
1401
|
}
|
|
1286
1402
|
}
|
|
1287
|
-
Default.__registry = new
|
|
1403
|
+
Default.__registry = new HeyApiRegistry8();
|
|
1288
1404
|
|
|
1289
1405
|
var types_gen = /*#__PURE__*/Object.freeze({
|
|
1290
1406
|
__proto__: null
|
|
@@ -1292,7 +1408,7 @@ var types_gen = /*#__PURE__*/Object.freeze({
|
|
|
1292
1408
|
|
|
1293
1409
|
class Mailmeteor {
|
|
1294
1410
|
constructor(key, config) {
|
|
1295
|
-
const baseUrl = config?.baseUrl || "https://
|
|
1411
|
+
const baseUrl = config?.baseUrl || "https://mailmeteor-emailservice-dev.appspot.com/v1";
|
|
1296
1412
|
this.client = createClient(createConfig({
|
|
1297
1413
|
baseUrl,
|
|
1298
1414
|
headers: {
|
|
@@ -1302,6 +1418,9 @@ class Mailmeteor {
|
|
|
1302
1418
|
this.billingAddons = new BillingAddons({ client: this.client });
|
|
1303
1419
|
this.billingSubscription = new BillingSubscription({ client: this.client });
|
|
1304
1420
|
this.billing = new Billing({ client: this.client });
|
|
1421
|
+
this.contactLists = new ContactLists({ client: this.client });
|
|
1422
|
+
this.organizations = new Organizations({ client: this.client });
|
|
1423
|
+
this.users = new Users({ client: this.client });
|
|
1305
1424
|
}
|
|
1306
1425
|
setApiKey(key) {
|
|
1307
1426
|
const currentConfig = this.client.getConfig();
|