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