mailmeteor 0.0.65 → 0.1.0

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.mjs CHANGED
@@ -951,7 +951,7 @@ class HeyApiRegistry5 {
951
951
  get(key) {
952
952
  const instance = this.instances.get(key ?? this.defaultKey);
953
953
  if (!instance) {
954
- throw new Error(`No SDK client found. Create one with "new ContactLists2()" to fix this error.`);
954
+ throw new Error(`No SDK client found. Create one with "new BillingAddons2()" to fix this error.`);
955
955
  }
956
956
  return instance;
957
957
  }
@@ -967,7 +967,7 @@ class HeyApiRegistry6 {
967
967
  get(key) {
968
968
  const instance = this.instances.get(key ?? this.defaultKey);
969
969
  if (!instance) {
970
- throw new Error(`No SDK client found. Create one with "new Contacts2()" to fix this error.`);
970
+ throw new Error(`No SDK client found. Create one with "new ContactLists2()" to fix this error.`);
971
971
  }
972
972
  return instance;
973
973
  }
@@ -983,7 +983,7 @@ class HeyApiRegistry7 {
983
983
  get(key) {
984
984
  const instance = this.instances.get(key ?? this.defaultKey);
985
985
  if (!instance) {
986
- throw new Error(`No SDK client found. Create one with "new BillingAddons2()" to fix this error.`);
986
+ throw new Error(`No SDK client found. Create one with "new Contacts2()" to fix this error.`);
987
987
  }
988
988
  return instance;
989
989
  }
@@ -1056,6 +1056,22 @@ class HeyApiRegistry11 {
1056
1056
  }
1057
1057
  }
1058
1058
  class HeyApiRegistry12 {
1059
+ constructor() {
1060
+ this.defaultKey = 'default';
1061
+ this.instances = new Map();
1062
+ }
1063
+ get(key) {
1064
+ const instance = this.instances.get(key ?? this.defaultKey);
1065
+ if (!instance) {
1066
+ throw new Error(`No SDK client found. Create one with "new Automations2()" to fix this error.`);
1067
+ }
1068
+ return instance;
1069
+ }
1070
+ set(value, key) {
1071
+ this.instances.set(key ?? this.defaultKey, value);
1072
+ }
1073
+ }
1074
+ class HeyApiRegistry13 {
1059
1075
  constructor() {
1060
1076
  this.defaultKey = 'default';
1061
1077
  this.instances = new Map();
@@ -1320,6 +1336,62 @@ class BillingSubscription2 extends HeyApiClient {
1320
1336
  }
1321
1337
  }
1322
1338
  BillingSubscription2.__registry = new HeyApiRegistry4();
1339
+ class BillingAddons extends HeyApiClient {
1340
+ getAddons(options) {
1341
+ return (options?.client ?? this.client).get({
1342
+ responseStyle: 'data',
1343
+ url: '/billing/addons',
1344
+ ...options
1345
+ });
1346
+ }
1347
+ previewUpdate(addon, parameters, options) {
1348
+ const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
1349
+ return (options?.client ?? this.client).post({
1350
+ responseStyle: 'data',
1351
+ url: '/billing/addons/{addon}/preview',
1352
+ ...options,
1353
+ ...params,
1354
+ headers: {
1355
+ 'Content-Type': 'application/json',
1356
+ ...options?.headers,
1357
+ ...params.headers
1358
+ }
1359
+ });
1360
+ }
1361
+ getAddonUsages(addon, options) {
1362
+ const params = buildClientParams([addon], [{ in: 'path', key: 'addon' }]);
1363
+ return (options?.client ?? this.client).get({
1364
+ responseStyle: 'data',
1365
+ url: '/billing/addons/{addon}',
1366
+ ...options,
1367
+ ...params
1368
+ });
1369
+ }
1370
+ update(addon, parameters, options) {
1371
+ const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
1372
+ return (options?.client ?? this.client).post({
1373
+ responseStyle: 'data',
1374
+ url: '/billing/addons/{addon}',
1375
+ ...options,
1376
+ ...params,
1377
+ headers: {
1378
+ 'Content-Type': 'application/json',
1379
+ ...options?.headers,
1380
+ ...params.headers
1381
+ }
1382
+ });
1383
+ }
1384
+ }
1385
+ class BillingAddons2 extends HeyApiClient {
1386
+ constructor(args) {
1387
+ super(args);
1388
+ BillingAddons2.__registry.set(this, args?.key);
1389
+ }
1390
+ get billingAddons() {
1391
+ return this._billingAddons ?? (this._billingAddons = new BillingAddons({ client: this.client }));
1392
+ }
1393
+ }
1394
+ BillingAddons2.__registry = new HeyApiRegistry5();
1323
1395
  class ContactLists extends HeyApiClient {
1324
1396
  create(parameters, options) {
1325
1397
  const params = buildClientParams([parameters], [{ args: [
@@ -1386,7 +1458,7 @@ class ContactLists2 extends HeyApiClient {
1386
1458
  return this._contactLists ?? (this._contactLists = new ContactLists({ client: this.client }));
1387
1459
  }
1388
1460
  }
1389
- ContactLists2.__registry = new HeyApiRegistry5();
1461
+ ContactLists2.__registry = new HeyApiRegistry6();
1390
1462
  class Contacts extends HeyApiClient {
1391
1463
  delAll(parameters, options) {
1392
1464
  const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'contact_list' }] }]);
@@ -1545,63 +1617,7 @@ class Contacts2 extends HeyApiClient {
1545
1617
  return this._contacts ?? (this._contacts = new Contacts({ client: this.client }));
1546
1618
  }
1547
1619
  }
1548
- Contacts2.__registry = new HeyApiRegistry6();
1549
- class BillingAddons extends HeyApiClient {
1550
- getAddons(options) {
1551
- return (options?.client ?? this.client).get({
1552
- responseStyle: 'data',
1553
- url: '/billing/addons',
1554
- ...options
1555
- });
1556
- }
1557
- previewUpdate(addon, parameters, options) {
1558
- const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
1559
- return (options?.client ?? this.client).post({
1560
- responseStyle: 'data',
1561
- url: '/billing/addons/{addon}/preview',
1562
- ...options,
1563
- ...params,
1564
- headers: {
1565
- 'Content-Type': 'application/json',
1566
- ...options?.headers,
1567
- ...params.headers
1568
- }
1569
- });
1570
- }
1571
- getAddonUsages(addon, options) {
1572
- const params = buildClientParams([addon], [{ in: 'path', key: 'addon' }]);
1573
- return (options?.client ?? this.client).get({
1574
- responseStyle: 'data',
1575
- url: '/billing/addons/{addon}',
1576
- ...options,
1577
- ...params
1578
- });
1579
- }
1580
- update(addon, parameters, options) {
1581
- const params = buildClientParams([addon, parameters], [{ in: 'path', key: 'addon' }, { args: [{ in: 'body', key: 'quantity' }] }]);
1582
- return (options?.client ?? this.client).post({
1583
- responseStyle: 'data',
1584
- url: '/billing/addons/{addon}',
1585
- ...options,
1586
- ...params,
1587
- headers: {
1588
- 'Content-Type': 'application/json',
1589
- ...options?.headers,
1590
- ...params.headers
1591
- }
1592
- });
1593
- }
1594
- }
1595
- class BillingAddons2 extends HeyApiClient {
1596
- constructor(args) {
1597
- super(args);
1598
- BillingAddons2.__registry.set(this, args?.key);
1599
- }
1600
- get billingAddons() {
1601
- return this._billingAddons ?? (this._billingAddons = new BillingAddons({ client: this.client }));
1602
- }
1603
- }
1604
- BillingAddons2.__registry = new HeyApiRegistry7();
1620
+ Contacts2.__registry = new HeyApiRegistry7();
1605
1621
  class PipelineConversations extends HeyApiClient {
1606
1622
  list(parameters, options) {
1607
1623
  const params = buildClientParams([parameters], [{ args: [
@@ -1693,7 +1709,7 @@ class PipelineConversations extends HeyApiClient {
1693
1709
  });
1694
1710
  }
1695
1711
  listMessages(pipeline_conversation_id, parameters, options) {
1696
- const params = buildClientParams([pipeline_conversation_id, parameters], [{ in: 'path', key: 'pipeline_conversation_id' }, { args: [{ in: 'query', key: 'owner' }] }]);
1712
+ const params = buildClientParams([pipeline_conversation_id, parameters], [{ in: 'path', key: 'pipeline_conversation_id' }, { args: [{ in: 'query', key: 'owner' }, { in: 'query', key: 'format' }] }]);
1697
1713
  return (options?.client ?? this.client).get({
1698
1714
  responseStyle: 'data',
1699
1715
  url: '/pipeline_conversations/{pipeline_conversation_id}/messages',
@@ -1842,13 +1858,26 @@ class Integrations extends HeyApiClient {
1842
1858
  ...params
1843
1859
  });
1844
1860
  }
1845
- disconnectAccount(integration_id, account_id, options) {
1846
- const params = buildClientParams([integration_id, account_id], [{ in: 'path', key: 'integration_id' }, { in: 'path', key: 'account_id' }]);
1861
+ disconnectAccount(integration_id, account_id, parameters, options) {
1862
+ const params = buildClientParams([
1863
+ integration_id,
1864
+ account_id,
1865
+ parameters
1866
+ ], [
1867
+ { in: 'path', key: 'integration_id' },
1868
+ { in: 'path', key: 'account_id' },
1869
+ { args: [{ in: 'body', key: 'reason' }] }
1870
+ ]);
1847
1871
  return (options?.client ?? this.client).post({
1848
1872
  responseStyle: 'data',
1849
1873
  url: '/integrations/{integration_id}/accounts/{account_id}/disconnect',
1850
1874
  ...options,
1851
- ...params
1875
+ ...params,
1876
+ headers: {
1877
+ 'Content-Type': 'application/json',
1878
+ ...options?.headers,
1879
+ ...params.headers
1880
+ }
1852
1881
  });
1853
1882
  }
1854
1883
  }
@@ -1901,6 +1930,72 @@ class Jobs2 extends HeyApiClient {
1901
1930
  }
1902
1931
  }
1903
1932
  Jobs2.__registry = new HeyApiRegistry11();
1933
+ class Automations extends HeyApiClient {
1934
+ create(parameters, options) {
1935
+ const params = buildClientParams([parameters], [{ args: [
1936
+ { in: 'body', key: 'owner' },
1937
+ { in: 'body', key: 'name' },
1938
+ { in: 'body', key: 'draft_definition' }
1939
+ ] }]);
1940
+ return (options?.client ?? this.client).post({
1941
+ responseStyle: 'data',
1942
+ url: '/automations',
1943
+ ...options,
1944
+ ...params,
1945
+ headers: {
1946
+ 'Content-Type': 'application/json',
1947
+ ...options?.headers,
1948
+ ...params.headers
1949
+ }
1950
+ });
1951
+ }
1952
+ del(automation_id, parameters, options) {
1953
+ const params = buildClientParams([automation_id, parameters], [{ in: 'path', key: 'automation_id' }, { args: [{ in: 'query', key: 'owner' }] }]);
1954
+ return (options?.client ?? this.client).delete({
1955
+ responseStyle: 'data',
1956
+ url: '/automations/{automation_id}',
1957
+ ...options,
1958
+ ...params
1959
+ });
1960
+ }
1961
+ retrieve(automation_id, parameters, options) {
1962
+ const params = buildClientParams([automation_id, parameters], [{ in: 'path', key: 'automation_id' }, { args: [{ in: 'query', key: 'owner' }] }]);
1963
+ return (options?.client ?? this.client).get({
1964
+ responseStyle: 'data',
1965
+ url: '/automations/{automation_id}',
1966
+ ...options,
1967
+ ...params
1968
+ });
1969
+ }
1970
+ update(automation_id, parameters, options) {
1971
+ const params = buildClientParams([automation_id, parameters], [{ in: 'path', key: 'automation_id' }, { args: [
1972
+ { in: 'body', key: 'owner' },
1973
+ { in: 'body', key: 'name' },
1974
+ { in: 'body', key: 'draft_definition' }
1975
+ ] }]);
1976
+ return (options?.client ?? this.client).patch({
1977
+ responseStyle: 'data',
1978
+ url: '/automations/{automation_id}',
1979
+ ...options,
1980
+ ...params,
1981
+ headers: {
1982
+ 'Content-Type': 'application/json',
1983
+ ...options?.headers,
1984
+ ...params.headers
1985
+ }
1986
+ });
1987
+ }
1988
+ }
1989
+ class Automations2 extends HeyApiClient {
1990
+ constructor(args) {
1991
+ super(args);
1992
+ Automations2.__registry.set(this, args?.key);
1993
+ }
1994
+ get automations() {
1995
+ return this._automations ?? (this._automations = new Automations({ client: this.client }));
1996
+ }
1997
+ }
1998
+ Automations2.__registry = new HeyApiRegistry12();
1904
1999
  class Default extends HeyApiClient {
1905
2000
  constructor(args) {
1906
2001
  super(args);
@@ -1914,7 +2009,7 @@ class Default extends HeyApiClient {
1914
2009
  });
1915
2010
  }
1916
2011
  }
1917
- Default.__registry = new HeyApiRegistry12();
2012
+ Default.__registry = new HeyApiRegistry13();
1918
2013
 
1919
2014
  function querySerializer(query) {
1920
2015
  const parts = [];