mailmeteor 0.0.25 → 0.0.27

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 CHANGED
@@ -1010,6 +1010,22 @@ class HeyApiRegistry8 {
1010
1010
  }
1011
1011
  }
1012
1012
  class HeyApiRegistry9 {
1013
+ constructor() {
1014
+ this.defaultKey = 'default';
1015
+ this.instances = new Map();
1016
+ }
1017
+ get(key) {
1018
+ const instance = this.instances.get(key ?? this.defaultKey);
1019
+ if (!instance) {
1020
+ throw new Error(`No SDK client found. Create one with "new Integrations2()" to fix this error.`);
1021
+ }
1022
+ return instance;
1023
+ }
1024
+ set(value, key) {
1025
+ this.instances.set(key ?? this.defaultKey, value);
1026
+ }
1027
+ }
1028
+ class HeyApiRegistry10 {
1013
1029
  constructor() {
1014
1030
  this.defaultKey = 'default';
1015
1031
  this.instances = new Map();
@@ -1263,24 +1279,6 @@ class BillingSubscription extends HeyApiClient {
1263
1279
  }
1264
1280
  });
1265
1281
  }
1266
- checkout(parameters, options) {
1267
- const params = buildClientParams([parameters], [{ args: [
1268
- { in: 'body', key: 'price_id' },
1269
- { in: 'body', key: 'coupon' },
1270
- { in: 'body', key: 'currency' }
1271
- ] }]);
1272
- return (options?.client ?? this.client).post({
1273
- responseStyle: 'data',
1274
- url: '/billing/subscription/checkout',
1275
- ...options,
1276
- ...params,
1277
- headers: {
1278
- 'Content-Type': 'application/json',
1279
- ...options?.headers,
1280
- ...params.headers
1281
- }
1282
- });
1283
- }
1284
1282
  }
1285
1283
  class BillingSubscription2 extends HeyApiClient {
1286
1284
  constructor(args) {
@@ -1629,6 +1627,27 @@ class Billing2 extends HeyApiClient {
1629
1627
  }
1630
1628
  }
1631
1629
  Billing2.__registry = new HeyApiRegistry8();
1630
+ class Integrations extends HeyApiClient {
1631
+ retrieve(integration_id, options) {
1632
+ const params = buildClientParams([integration_id], [{ in: 'path', key: 'integration_id' }]);
1633
+ return (options?.client ?? this.client).get({
1634
+ responseStyle: 'data',
1635
+ url: '/integrations/{integration_id}',
1636
+ ...options,
1637
+ ...params
1638
+ });
1639
+ }
1640
+ }
1641
+ class Integrations2 extends HeyApiClient {
1642
+ constructor(args) {
1643
+ super(args);
1644
+ Integrations2.__registry.set(this, args?.key);
1645
+ }
1646
+ get integrations() {
1647
+ return this._integrations ?? (this._integrations = new Integrations({ client: this.client }));
1648
+ }
1649
+ }
1650
+ Integrations2.__registry = new HeyApiRegistry9();
1632
1651
  class Default extends HeyApiClient {
1633
1652
  constructor(args) {
1634
1653
  super(args);
@@ -1642,7 +1661,7 @@ class Default extends HeyApiClient {
1642
1661
  });
1643
1662
  }
1644
1663
  }
1645
- Default.__registry = new HeyApiRegistry9();
1664
+ Default.__registry = new HeyApiRegistry10();
1646
1665
 
1647
1666
  var types_gen = /*#__PURE__*/Object.freeze({
1648
1667
  __proto__: null
@@ -1683,6 +1702,7 @@ class Mailmeteor {
1683
1702
  this.organizationMembers = new OrganizationMembers({ client: this.client });
1684
1703
  this.users = new Users({ client: this.client });
1685
1704
  this.contacts = new Contacts({ client: this.client });
1705
+ this.integrations = new Integrations({ client: this.client });
1686
1706
  }
1687
1707
  setApiKey(key) {
1688
1708
  const currentConfig = this.client.getConfig();