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