@seamapi/http 1.26.0 → 1.27.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.
Files changed (60) hide show
  1. package/dist/connect.cjs +6 -681
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +13 -174
  4. package/lib/seam/connect/resolve-action-attempt.d.ts +16 -16
  5. package/lib/seam/connect/routes/acs-access-groups.d.ts +0 -2
  6. package/lib/seam/connect/routes/acs-access-groups.js +0 -4
  7. package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
  8. package/lib/seam/connect/routes/acs-credentials.d.ts +0 -6
  9. package/lib/seam/connect/routes/acs-credentials.js +0 -12
  10. package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
  11. package/lib/seam/connect/routes/acs-users.d.ts +0 -2
  12. package/lib/seam/connect/routes/acs-users.js +0 -4
  13. package/lib/seam/connect/routes/acs-users.js.map +1 -1
  14. package/lib/seam/connect/routes/acs.d.ts +0 -4
  15. package/lib/seam/connect/routes/acs.js +0 -8
  16. package/lib/seam/connect/routes/acs.js.map +1 -1
  17. package/lib/seam/connect/routes/devices.d.ts +0 -4
  18. package/lib/seam/connect/routes/devices.js +0 -8
  19. package/lib/seam/connect/routes/devices.js.map +1 -1
  20. package/lib/seam/connect/routes/index.d.ts +0 -6
  21. package/lib/seam/connect/routes/index.js +0 -6
  22. package/lib/seam/connect/routes/index.js.map +1 -1
  23. package/lib/seam/connect/routes/thermostats.d.ts +0 -4
  24. package/lib/seam/connect/routes/thermostats.js +0 -8
  25. package/lib/seam/connect/routes/thermostats.js.map +1 -1
  26. package/lib/version.d.ts +1 -1
  27. package/lib/version.js +1 -1
  28. package/package.json +3 -3
  29. package/src/lib/seam/connect/routes/acs-access-groups.ts +0 -8
  30. package/src/lib/seam/connect/routes/acs-credentials.ts +0 -31
  31. package/src/lib/seam/connect/routes/acs-users.ts +0 -5
  32. package/src/lib/seam/connect/routes/acs.ts +0 -13
  33. package/src/lib/seam/connect/routes/devices.ts +0 -17
  34. package/src/lib/seam/connect/routes/index.ts +0 -6
  35. package/src/lib/seam/connect/routes/thermostats.ts +0 -19
  36. package/src/lib/version.ts +1 -1
  37. package/lib/seam/connect/routes/acs-access-groups-unmanaged.d.ts +0 -27
  38. package/lib/seam/connect/routes/acs-access-groups-unmanaged.js +0 -100
  39. package/lib/seam/connect/routes/acs-access-groups-unmanaged.js.map +0 -1
  40. package/lib/seam/connect/routes/acs-credential-pools.d.ts +0 -23
  41. package/lib/seam/connect/routes/acs-credential-pools.js +0 -92
  42. package/lib/seam/connect/routes/acs-credential-pools.js.map +0 -1
  43. package/lib/seam/connect/routes/acs-credential-provisioning-automations.d.ts +0 -23
  44. package/lib/seam/connect/routes/acs-credential-provisioning-automations.js +0 -92
  45. package/lib/seam/connect/routes/acs-credential-provisioning-automations.js.map +0 -1
  46. package/lib/seam/connect/routes/acs-credentials-unmanaged.d.ts +0 -27
  47. package/lib/seam/connect/routes/acs-credentials-unmanaged.js +0 -100
  48. package/lib/seam/connect/routes/acs-credentials-unmanaged.js.map +0 -1
  49. package/lib/seam/connect/routes/acs-users-unmanaged.d.ts +0 -27
  50. package/lib/seam/connect/routes/acs-users-unmanaged.js +0 -100
  51. package/lib/seam/connect/routes/acs-users-unmanaged.js.map +0 -1
  52. package/lib/seam/connect/routes/unstable-locations.d.ts +0 -47
  53. package/lib/seam/connect/routes/unstable-locations.js +0 -140
  54. package/lib/seam/connect/routes/unstable-locations.js.map +0 -1
  55. package/src/lib/seam/connect/routes/acs-access-groups-unmanaged.ts +0 -209
  56. package/src/lib/seam/connect/routes/acs-credential-pools.ts +0 -183
  57. package/src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts +0 -189
  58. package/src/lib/seam/connect/routes/acs-credentials-unmanaged.ts +0 -206
  59. package/src/lib/seam/connect/routes/acs-users-unmanaged.ts +0 -203
  60. package/src/lib/seam/connect/routes/unstable-locations.ts +0 -303
package/dist/connect.cjs CHANGED
@@ -1332,107 +1332,6 @@ var SeamHttpAccessCodes = class _SeamHttpAccessCodes {
1332
1332
  }
1333
1333
  };
1334
1334
 
1335
- // src/lib/seam/connect/routes/acs-access-groups-unmanaged.ts
1336
- var SeamHttpAcsAccessGroupsUnmanaged = class _SeamHttpAcsAccessGroupsUnmanaged {
1337
- constructor(apiKeyOrOptions = {}) {
1338
- const options = parseOptions(apiKeyOrOptions);
1339
- this.client = "client" in options ? options.client : createClient(options);
1340
- this.defaults = limitToSeamHttpRequestOptions(options);
1341
- }
1342
- static fromClient(client, options = {}) {
1343
- const constructorOptions = { ...options, client };
1344
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
1345
- throw new SeamHttpInvalidOptionsError("Missing client");
1346
- }
1347
- return new _SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
1348
- }
1349
- static fromApiKey(apiKey, options = {}) {
1350
- const constructorOptions = { ...options, apiKey };
1351
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
1352
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
1353
- }
1354
- return new _SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
1355
- }
1356
- static fromClientSessionToken(clientSessionToken, options = {}) {
1357
- const constructorOptions = { ...options, clientSessionToken };
1358
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
1359
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
1360
- }
1361
- return new _SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
1362
- }
1363
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
1364
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
1365
- const clientOptions = parseOptions({ ...options, publishableKey });
1366
- if (isSeamHttpOptionsWithClient(clientOptions)) {
1367
- throw new SeamHttpInvalidOptionsError(
1368
- "The client option cannot be used with SeamHttp.fromPublishableKey"
1369
- );
1370
- }
1371
- const client = createClient(clientOptions);
1372
- const clientSessions = SeamHttpClientSessions.fromClient(client);
1373
- const { token } = await clientSessions.getOrCreate({
1374
- user_identifier_key: userIdentifierKey
1375
- });
1376
- return _SeamHttpAcsAccessGroupsUnmanaged.fromClientSessionToken(
1377
- token,
1378
- options
1379
- );
1380
- }
1381
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
1382
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
1383
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
1384
- throw new SeamHttpInvalidOptionsError(
1385
- "Missing consoleSessionToken or workspaceId"
1386
- );
1387
- }
1388
- return new _SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
1389
- }
1390
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
1391
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
1392
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
1393
- throw new SeamHttpInvalidOptionsError(
1394
- "Missing personalAccessToken or workspaceId"
1395
- );
1396
- }
1397
- return new _SeamHttpAcsAccessGroupsUnmanaged(constructorOptions);
1398
- }
1399
- createPaginator(request) {
1400
- return new SeamPaginator(this, request);
1401
- }
1402
- async updateClientSessionToken(clientSessionToken) {
1403
- const { headers } = this.client.defaults;
1404
- const authHeaders = getAuthHeadersForClientSessionToken({
1405
- clientSessionToken
1406
- });
1407
- for (const key of Object.keys(authHeaders)) {
1408
- if (headers[key] == null) {
1409
- throw new Error(
1410
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
1411
- );
1412
- }
1413
- }
1414
- this.client.defaults.headers = { ...headers, ...authHeaders };
1415
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1416
- await clientSessions.get();
1417
- }
1418
- get(body) {
1419
- return new SeamHttpRequest(this, {
1420
- pathname: "/acs/access_groups/unmanaged/get",
1421
- method: "post",
1422
- body,
1423
- responseKey: "acs_access_group"
1424
- });
1425
- }
1426
- list(body) {
1427
- return new SeamHttpRequest(this, {
1428
- pathname: "/acs/access_groups/unmanaged/list",
1429
- method: "post",
1430
- body,
1431
- responseKey: "acs_access_groups"
1432
- });
1433
- }
1434
- };
1435
-
1436
1335
  // src/lib/seam/connect/routes/acs-access-groups.ts
1437
1336
  var SeamHttpAcsAccessGroups = class _SeamHttpAcsAccessGroups {
1438
1337
  constructor(apiKeyOrOptions = {}) {
@@ -1513,12 +1412,6 @@ var SeamHttpAcsAccessGroups = class _SeamHttpAcsAccessGroups {
1513
1412
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1514
1413
  await clientSessions.get();
1515
1414
  }
1516
- get unmanaged() {
1517
- return SeamHttpAcsAccessGroupsUnmanaged.fromClient(
1518
- this.client,
1519
- this.defaults
1520
- );
1521
- }
1522
1415
  addUser(body) {
1523
1416
  return new SeamHttpRequest(this, {
1524
1417
  pathname: "/acs/access_groups/add_user",
@@ -1551,304 +1444,20 @@ var SeamHttpAcsAccessGroups = class _SeamHttpAcsAccessGroups {
1551
1444
  responseKey: "acs_entrances"
1552
1445
  });
1553
1446
  }
1554
- listUsers(body) {
1555
- return new SeamHttpRequest(this, {
1556
- pathname: "/acs/access_groups/list_users",
1557
- method: "post",
1558
- body,
1559
- responseKey: "acs_users"
1560
- });
1561
- }
1562
- removeUser(body) {
1563
- return new SeamHttpRequest(this, {
1564
- pathname: "/acs/access_groups/remove_user",
1565
- method: "post",
1566
- body,
1567
- responseKey: void 0
1568
- });
1569
- }
1570
- };
1571
-
1572
- // src/lib/seam/connect/routes/acs-credential-pools.ts
1573
- var SeamHttpAcsCredentialPools = class _SeamHttpAcsCredentialPools {
1574
- constructor(apiKeyOrOptions = {}) {
1575
- const options = parseOptions(apiKeyOrOptions);
1576
- this.client = "client" in options ? options.client : createClient(options);
1577
- this.defaults = limitToSeamHttpRequestOptions(options);
1578
- }
1579
- static fromClient(client, options = {}) {
1580
- const constructorOptions = { ...options, client };
1581
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
1582
- throw new SeamHttpInvalidOptionsError("Missing client");
1583
- }
1584
- return new _SeamHttpAcsCredentialPools(constructorOptions);
1585
- }
1586
- static fromApiKey(apiKey, options = {}) {
1587
- const constructorOptions = { ...options, apiKey };
1588
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
1589
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
1590
- }
1591
- return new _SeamHttpAcsCredentialPools(constructorOptions);
1592
- }
1593
- static fromClientSessionToken(clientSessionToken, options = {}) {
1594
- const constructorOptions = { ...options, clientSessionToken };
1595
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
1596
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
1597
- }
1598
- return new _SeamHttpAcsCredentialPools(constructorOptions);
1599
- }
1600
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
1601
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
1602
- const clientOptions = parseOptions({ ...options, publishableKey });
1603
- if (isSeamHttpOptionsWithClient(clientOptions)) {
1604
- throw new SeamHttpInvalidOptionsError(
1605
- "The client option cannot be used with SeamHttp.fromPublishableKey"
1606
- );
1607
- }
1608
- const client = createClient(clientOptions);
1609
- const clientSessions = SeamHttpClientSessions.fromClient(client);
1610
- const { token } = await clientSessions.getOrCreate({
1611
- user_identifier_key: userIdentifierKey
1612
- });
1613
- return _SeamHttpAcsCredentialPools.fromClientSessionToken(token, options);
1614
- }
1615
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
1616
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
1617
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
1618
- throw new SeamHttpInvalidOptionsError(
1619
- "Missing consoleSessionToken or workspaceId"
1620
- );
1621
- }
1622
- return new _SeamHttpAcsCredentialPools(constructorOptions);
1623
- }
1624
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
1625
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
1626
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
1627
- throw new SeamHttpInvalidOptionsError(
1628
- "Missing personalAccessToken or workspaceId"
1629
- );
1630
- }
1631
- return new _SeamHttpAcsCredentialPools(constructorOptions);
1632
- }
1633
- createPaginator(request) {
1634
- return new SeamPaginator(this, request);
1635
- }
1636
- async updateClientSessionToken(clientSessionToken) {
1637
- const { headers } = this.client.defaults;
1638
- const authHeaders = getAuthHeadersForClientSessionToken({
1639
- clientSessionToken
1640
- });
1641
- for (const key of Object.keys(authHeaders)) {
1642
- if (headers[key] == null) {
1643
- throw new Error(
1644
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
1645
- );
1646
- }
1647
- }
1648
- this.client.defaults.headers = { ...headers, ...authHeaders };
1649
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1650
- await clientSessions.get();
1651
- }
1652
- list(body) {
1653
- return new SeamHttpRequest(this, {
1654
- pathname: "/acs/credential_pools/list",
1655
- method: "post",
1656
- body,
1657
- responseKey: "acs_credential_pools"
1658
- });
1659
- }
1660
- };
1661
-
1662
- // src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts
1663
- var SeamHttpAcsCredentialProvisioningAutomations = class _SeamHttpAcsCredentialProvisioningAutomations {
1664
- constructor(apiKeyOrOptions = {}) {
1665
- const options = parseOptions(apiKeyOrOptions);
1666
- this.client = "client" in options ? options.client : createClient(options);
1667
- this.defaults = limitToSeamHttpRequestOptions(options);
1668
- }
1669
- static fromClient(client, options = {}) {
1670
- const constructorOptions = { ...options, client };
1671
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
1672
- throw new SeamHttpInvalidOptionsError("Missing client");
1673
- }
1674
- return new _SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
1675
- }
1676
- static fromApiKey(apiKey, options = {}) {
1677
- const constructorOptions = { ...options, apiKey };
1678
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
1679
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
1680
- }
1681
- return new _SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
1682
- }
1683
- static fromClientSessionToken(clientSessionToken, options = {}) {
1684
- const constructorOptions = { ...options, clientSessionToken };
1685
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
1686
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
1687
- }
1688
- return new _SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
1689
- }
1690
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
1691
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
1692
- const clientOptions = parseOptions({ ...options, publishableKey });
1693
- if (isSeamHttpOptionsWithClient(clientOptions)) {
1694
- throw new SeamHttpInvalidOptionsError(
1695
- "The client option cannot be used with SeamHttp.fromPublishableKey"
1696
- );
1697
- }
1698
- const client = createClient(clientOptions);
1699
- const clientSessions = SeamHttpClientSessions.fromClient(client);
1700
- const { token } = await clientSessions.getOrCreate({
1701
- user_identifier_key: userIdentifierKey
1702
- });
1703
- return _SeamHttpAcsCredentialProvisioningAutomations.fromClientSessionToken(
1704
- token,
1705
- options
1706
- );
1707
- }
1708
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
1709
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
1710
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
1711
- throw new SeamHttpInvalidOptionsError(
1712
- "Missing consoleSessionToken or workspaceId"
1713
- );
1714
- }
1715
- return new _SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
1716
- }
1717
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
1718
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
1719
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
1720
- throw new SeamHttpInvalidOptionsError(
1721
- "Missing personalAccessToken or workspaceId"
1722
- );
1723
- }
1724
- return new _SeamHttpAcsCredentialProvisioningAutomations(constructorOptions);
1725
- }
1726
- createPaginator(request) {
1727
- return new SeamPaginator(this, request);
1728
- }
1729
- async updateClientSessionToken(clientSessionToken) {
1730
- const { headers } = this.client.defaults;
1731
- const authHeaders = getAuthHeadersForClientSessionToken({
1732
- clientSessionToken
1733
- });
1734
- for (const key of Object.keys(authHeaders)) {
1735
- if (headers[key] == null) {
1736
- throw new Error(
1737
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
1738
- );
1739
- }
1740
- }
1741
- this.client.defaults.headers = { ...headers, ...authHeaders };
1742
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1743
- await clientSessions.get();
1744
- }
1745
- launch(body) {
1746
- return new SeamHttpRequest(this, {
1747
- pathname: "/acs/credential_provisioning_automations/launch",
1748
- method: "post",
1749
- body,
1750
- responseKey: "acs_credential_provisioning_automation"
1751
- });
1752
- }
1753
- };
1754
-
1755
- // src/lib/seam/connect/routes/acs-credentials-unmanaged.ts
1756
- var SeamHttpAcsCredentialsUnmanaged = class _SeamHttpAcsCredentialsUnmanaged {
1757
- constructor(apiKeyOrOptions = {}) {
1758
- const options = parseOptions(apiKeyOrOptions);
1759
- this.client = "client" in options ? options.client : createClient(options);
1760
- this.defaults = limitToSeamHttpRequestOptions(options);
1761
- }
1762
- static fromClient(client, options = {}) {
1763
- const constructorOptions = { ...options, client };
1764
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
1765
- throw new SeamHttpInvalidOptionsError("Missing client");
1766
- }
1767
- return new _SeamHttpAcsCredentialsUnmanaged(constructorOptions);
1768
- }
1769
- static fromApiKey(apiKey, options = {}) {
1770
- const constructorOptions = { ...options, apiKey };
1771
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
1772
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
1773
- }
1774
- return new _SeamHttpAcsCredentialsUnmanaged(constructorOptions);
1775
- }
1776
- static fromClientSessionToken(clientSessionToken, options = {}) {
1777
- const constructorOptions = { ...options, clientSessionToken };
1778
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
1779
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
1780
- }
1781
- return new _SeamHttpAcsCredentialsUnmanaged(constructorOptions);
1782
- }
1783
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
1784
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
1785
- const clientOptions = parseOptions({ ...options, publishableKey });
1786
- if (isSeamHttpOptionsWithClient(clientOptions)) {
1787
- throw new SeamHttpInvalidOptionsError(
1788
- "The client option cannot be used with SeamHttp.fromPublishableKey"
1789
- );
1790
- }
1791
- const client = createClient(clientOptions);
1792
- const clientSessions = SeamHttpClientSessions.fromClient(client);
1793
- const { token } = await clientSessions.getOrCreate({
1794
- user_identifier_key: userIdentifierKey
1795
- });
1796
- return _SeamHttpAcsCredentialsUnmanaged.fromClientSessionToken(
1797
- token,
1798
- options
1799
- );
1800
- }
1801
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
1802
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
1803
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
1804
- throw new SeamHttpInvalidOptionsError(
1805
- "Missing consoleSessionToken or workspaceId"
1806
- );
1807
- }
1808
- return new _SeamHttpAcsCredentialsUnmanaged(constructorOptions);
1809
- }
1810
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
1811
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
1812
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
1813
- throw new SeamHttpInvalidOptionsError(
1814
- "Missing personalAccessToken or workspaceId"
1815
- );
1816
- }
1817
- return new _SeamHttpAcsCredentialsUnmanaged(constructorOptions);
1818
- }
1819
- createPaginator(request) {
1820
- return new SeamPaginator(this, request);
1821
- }
1822
- async updateClientSessionToken(clientSessionToken) {
1823
- const { headers } = this.client.defaults;
1824
- const authHeaders = getAuthHeadersForClientSessionToken({
1825
- clientSessionToken
1826
- });
1827
- for (const key of Object.keys(authHeaders)) {
1828
- if (headers[key] == null) {
1829
- throw new Error(
1830
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
1831
- );
1832
- }
1833
- }
1834
- this.client.defaults.headers = { ...headers, ...authHeaders };
1835
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1836
- await clientSessions.get();
1837
- }
1838
- get(body) {
1447
+ listUsers(body) {
1839
1448
  return new SeamHttpRequest(this, {
1840
- pathname: "/acs/credentials/unmanaged/get",
1449
+ pathname: "/acs/access_groups/list_users",
1841
1450
  method: "post",
1842
1451
  body,
1843
- responseKey: "acs_credential"
1452
+ responseKey: "acs_users"
1844
1453
  });
1845
1454
  }
1846
- list(body) {
1455
+ removeUser(body) {
1847
1456
  return new SeamHttpRequest(this, {
1848
- pathname: "/acs/credentials/unmanaged/list",
1457
+ pathname: "/acs/access_groups/remove_user",
1849
1458
  method: "post",
1850
1459
  body,
1851
- responseKey: "acs_credentials"
1460
+ responseKey: void 0
1852
1461
  });
1853
1462
  }
1854
1463
  };
@@ -1933,12 +1542,6 @@ var SeamHttpAcsCredentials = class _SeamHttpAcsCredentials {
1933
1542
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1934
1543
  await clientSessions.get();
1935
1544
  }
1936
- get unmanaged() {
1937
- return SeamHttpAcsCredentialsUnmanaged.fromClient(
1938
- this.client,
1939
- this.defaults
1940
- );
1941
- }
1942
1545
  assign(body) {
1943
1546
  return new SeamHttpRequest(this, {
1944
1547
  pathname: "/acs/credentials/assign",
@@ -1955,14 +1558,6 @@ var SeamHttpAcsCredentials = class _SeamHttpAcsCredentials {
1955
1558
  responseKey: "acs_credential"
1956
1559
  });
1957
1560
  }
1958
- createOfflineCode(body) {
1959
- return new SeamHttpRequest(this, {
1960
- pathname: "/acs/credentials/create_offline_code",
1961
- method: "post",
1962
- body,
1963
- responseKey: "acs_credential"
1964
- });
1965
- }
1966
1561
  delete(body) {
1967
1562
  return new SeamHttpRequest(this, {
1968
1563
  pathname: "/acs/credentials/delete",
@@ -2458,104 +2053,6 @@ var SeamHttpAcsSystems = class _SeamHttpAcsSystems {
2458
2053
  }
2459
2054
  };
2460
2055
 
2461
- // src/lib/seam/connect/routes/acs-users-unmanaged.ts
2462
- var SeamHttpAcsUsersUnmanaged = class _SeamHttpAcsUsersUnmanaged {
2463
- constructor(apiKeyOrOptions = {}) {
2464
- const options = parseOptions(apiKeyOrOptions);
2465
- this.client = "client" in options ? options.client : createClient(options);
2466
- this.defaults = limitToSeamHttpRequestOptions(options);
2467
- }
2468
- static fromClient(client, options = {}) {
2469
- const constructorOptions = { ...options, client };
2470
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
2471
- throw new SeamHttpInvalidOptionsError("Missing client");
2472
- }
2473
- return new _SeamHttpAcsUsersUnmanaged(constructorOptions);
2474
- }
2475
- static fromApiKey(apiKey, options = {}) {
2476
- const constructorOptions = { ...options, apiKey };
2477
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
2478
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
2479
- }
2480
- return new _SeamHttpAcsUsersUnmanaged(constructorOptions);
2481
- }
2482
- static fromClientSessionToken(clientSessionToken, options = {}) {
2483
- const constructorOptions = { ...options, clientSessionToken };
2484
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
2485
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
2486
- }
2487
- return new _SeamHttpAcsUsersUnmanaged(constructorOptions);
2488
- }
2489
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
2490
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
2491
- const clientOptions = parseOptions({ ...options, publishableKey });
2492
- if (isSeamHttpOptionsWithClient(clientOptions)) {
2493
- throw new SeamHttpInvalidOptionsError(
2494
- "The client option cannot be used with SeamHttp.fromPublishableKey"
2495
- );
2496
- }
2497
- const client = createClient(clientOptions);
2498
- const clientSessions = SeamHttpClientSessions.fromClient(client);
2499
- const { token } = await clientSessions.getOrCreate({
2500
- user_identifier_key: userIdentifierKey
2501
- });
2502
- return _SeamHttpAcsUsersUnmanaged.fromClientSessionToken(token, options);
2503
- }
2504
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
2505
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
2506
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
2507
- throw new SeamHttpInvalidOptionsError(
2508
- "Missing consoleSessionToken or workspaceId"
2509
- );
2510
- }
2511
- return new _SeamHttpAcsUsersUnmanaged(constructorOptions);
2512
- }
2513
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
2514
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
2515
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
2516
- throw new SeamHttpInvalidOptionsError(
2517
- "Missing personalAccessToken or workspaceId"
2518
- );
2519
- }
2520
- return new _SeamHttpAcsUsersUnmanaged(constructorOptions);
2521
- }
2522
- createPaginator(request) {
2523
- return new SeamPaginator(this, request);
2524
- }
2525
- async updateClientSessionToken(clientSessionToken) {
2526
- const { headers } = this.client.defaults;
2527
- const authHeaders = getAuthHeadersForClientSessionToken({
2528
- clientSessionToken
2529
- });
2530
- for (const key of Object.keys(authHeaders)) {
2531
- if (headers[key] == null) {
2532
- throw new Error(
2533
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
2534
- );
2535
- }
2536
- }
2537
- this.client.defaults.headers = { ...headers, ...authHeaders };
2538
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2539
- await clientSessions.get();
2540
- }
2541
- get(body) {
2542
- return new SeamHttpRequest(this, {
2543
- pathname: "/acs/users/unmanaged/get",
2544
- method: "post",
2545
- body,
2546
- responseKey: "acs_user"
2547
- });
2548
- }
2549
- list(body) {
2550
- return new SeamHttpRequest(this, {
2551
- pathname: "/acs/users/unmanaged/list",
2552
- method: "post",
2553
- body,
2554
- responseKey: "acs_users"
2555
- });
2556
- }
2557
- };
2558
-
2559
2056
  // src/lib/seam/connect/routes/acs-users.ts
2560
2057
  var SeamHttpAcsUsers = class _SeamHttpAcsUsers {
2561
2058
  constructor(apiKeyOrOptions = {}) {
@@ -2636,9 +2133,6 @@ var SeamHttpAcsUsers = class _SeamHttpAcsUsers {
2636
2133
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2637
2134
  await clientSessions.get();
2638
2135
  }
2639
- get unmanaged() {
2640
- return SeamHttpAcsUsersUnmanaged.fromClient(this.client, this.defaults);
2641
- }
2642
2136
  addToAccessGroup(body) {
2643
2137
  return new SeamHttpRequest(this, {
2644
2138
  pathname: "/acs/users/add_to_access_group",
@@ -2812,15 +2306,6 @@ var SeamHttpAcs = class _SeamHttpAcs {
2812
2306
  get accessGroups() {
2813
2307
  return SeamHttpAcsAccessGroups.fromClient(this.client, this.defaults);
2814
2308
  }
2815
- get credentialPools() {
2816
- return SeamHttpAcsCredentialPools.fromClient(this.client, this.defaults);
2817
- }
2818
- get credentialProvisioningAutomations() {
2819
- return SeamHttpAcsCredentialProvisioningAutomations.fromClient(
2820
- this.client,
2821
- this.defaults
2822
- );
2823
- }
2824
2309
  get credentials() {
2825
2310
  return SeamHttpAcsCredentials.fromClient(this.client, this.defaults);
2826
2311
  }
@@ -3561,14 +3046,6 @@ var SeamHttpDevices = class _SeamHttpDevices {
3561
3046
  get simulate() {
3562
3047
  return SeamHttpDevicesSimulate.fromClient(this.client, this.defaults);
3563
3048
  }
3564
- delete(body) {
3565
- return new SeamHttpRequest(this, {
3566
- pathname: "/devices/delete",
3567
- method: "post",
3568
- body,
3569
- responseKey: void 0
3570
- });
3571
- }
3572
3049
  get(body) {
3573
3050
  return new SeamHttpRequest(this, {
3574
3051
  pathname: "/devices/get",
@@ -4768,14 +4245,6 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
4768
4245
  responseKey: void 0
4769
4246
  });
4770
4247
  }
4771
- get(body) {
4772
- return new SeamHttpRequest(this, {
4773
- pathname: "/thermostats/get",
4774
- method: "post",
4775
- body,
4776
- responseKey: "thermostat"
4777
- });
4778
- }
4779
4248
  heat(body, options = {}) {
4780
4249
  return new SeamHttpRequest(this, {
4781
4250
  pathname: "/thermostats/heat",
@@ -4855,144 +4324,6 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
4855
4324
  }
4856
4325
  };
4857
4326
 
4858
- // src/lib/seam/connect/routes/unstable-locations.ts
4859
- var SeamHttpUnstableLocations = class _SeamHttpUnstableLocations {
4860
- constructor(apiKeyOrOptions = {}) {
4861
- const options = parseOptions(apiKeyOrOptions);
4862
- this.client = "client" in options ? options.client : createClient(options);
4863
- this.defaults = limitToSeamHttpRequestOptions(options);
4864
- }
4865
- static fromClient(client, options = {}) {
4866
- const constructorOptions = { ...options, client };
4867
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
4868
- throw new SeamHttpInvalidOptionsError("Missing client");
4869
- }
4870
- return new _SeamHttpUnstableLocations(constructorOptions);
4871
- }
4872
- static fromApiKey(apiKey, options = {}) {
4873
- const constructorOptions = { ...options, apiKey };
4874
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
4875
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
4876
- }
4877
- return new _SeamHttpUnstableLocations(constructorOptions);
4878
- }
4879
- static fromClientSessionToken(clientSessionToken, options = {}) {
4880
- const constructorOptions = { ...options, clientSessionToken };
4881
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
4882
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
4883
- }
4884
- return new _SeamHttpUnstableLocations(constructorOptions);
4885
- }
4886
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
4887
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
4888
- const clientOptions = parseOptions({ ...options, publishableKey });
4889
- if (isSeamHttpOptionsWithClient(clientOptions)) {
4890
- throw new SeamHttpInvalidOptionsError(
4891
- "The client option cannot be used with SeamHttp.fromPublishableKey"
4892
- );
4893
- }
4894
- const client = createClient(clientOptions);
4895
- const clientSessions = SeamHttpClientSessions.fromClient(client);
4896
- const { token } = await clientSessions.getOrCreate({
4897
- user_identifier_key: userIdentifierKey
4898
- });
4899
- return _SeamHttpUnstableLocations.fromClientSessionToken(token, options);
4900
- }
4901
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
4902
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
4903
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
4904
- throw new SeamHttpInvalidOptionsError(
4905
- "Missing consoleSessionToken or workspaceId"
4906
- );
4907
- }
4908
- return new _SeamHttpUnstableLocations(constructorOptions);
4909
- }
4910
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
4911
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
4912
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
4913
- throw new SeamHttpInvalidOptionsError(
4914
- "Missing personalAccessToken or workspaceId"
4915
- );
4916
- }
4917
- return new _SeamHttpUnstableLocations(constructorOptions);
4918
- }
4919
- createPaginator(request) {
4920
- return new SeamPaginator(this, request);
4921
- }
4922
- async updateClientSessionToken(clientSessionToken) {
4923
- const { headers } = this.client.defaults;
4924
- const authHeaders = getAuthHeadersForClientSessionToken({
4925
- clientSessionToken
4926
- });
4927
- for (const key of Object.keys(authHeaders)) {
4928
- if (headers[key] == null) {
4929
- throw new Error(
4930
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
4931
- );
4932
- }
4933
- }
4934
- this.client.defaults.headers = { ...headers, ...authHeaders };
4935
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
4936
- await clientSessions.get();
4937
- }
4938
- addDevices(body) {
4939
- return new SeamHttpRequest(this, {
4940
- pathname: "/unstable_locations/add_devices",
4941
- method: "post",
4942
- body,
4943
- responseKey: void 0
4944
- });
4945
- }
4946
- create(body) {
4947
- return new SeamHttpRequest(this, {
4948
- pathname: "/unstable_locations/create",
4949
- method: "post",
4950
- body,
4951
- responseKey: "location"
4952
- });
4953
- }
4954
- delete(body) {
4955
- return new SeamHttpRequest(this, {
4956
- pathname: "/unstable_locations/delete",
4957
- method: "post",
4958
- body,
4959
- responseKey: void 0
4960
- });
4961
- }
4962
- get(body) {
4963
- return new SeamHttpRequest(this, {
4964
- pathname: "/unstable_locations/get",
4965
- method: "post",
4966
- body,
4967
- responseKey: "location"
4968
- });
4969
- }
4970
- list(body) {
4971
- return new SeamHttpRequest(this, {
4972
- pathname: "/unstable_locations/list",
4973
- method: "post",
4974
- body,
4975
- responseKey: "locations"
4976
- });
4977
- }
4978
- removeDevices(body) {
4979
- return new SeamHttpRequest(this, {
4980
- pathname: "/unstable_locations/remove_devices",
4981
- method: "post",
4982
- body,
4983
- responseKey: void 0
4984
- });
4985
- }
4986
- update(body) {
4987
- return new SeamHttpRequest(this, {
4988
- pathname: "/unstable_locations/update",
4989
- method: "post",
4990
- body,
4991
- responseKey: "location"
4992
- });
4993
- }
4994
- };
4995
-
4996
4327
  // src/lib/seam/connect/routes/user-identities-enrollment-automations.ts
4997
4328
  var SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentitiesEnrollmentAutomations {
4998
4329
  constructor(apiKeyOrOptions = {}) {
@@ -5714,17 +5045,12 @@ exports.SeamHttpAccessCodesSimulate = SeamHttpAccessCodesSimulate;
5714
5045
  exports.SeamHttpAccessCodesUnmanaged = SeamHttpAccessCodesUnmanaged;
5715
5046
  exports.SeamHttpAcs = SeamHttpAcs;
5716
5047
  exports.SeamHttpAcsAccessGroups = SeamHttpAcsAccessGroups;
5717
- exports.SeamHttpAcsAccessGroupsUnmanaged = SeamHttpAcsAccessGroupsUnmanaged;
5718
- exports.SeamHttpAcsCredentialPools = SeamHttpAcsCredentialPools;
5719
- exports.SeamHttpAcsCredentialProvisioningAutomations = SeamHttpAcsCredentialProvisioningAutomations;
5720
5048
  exports.SeamHttpAcsCredentials = SeamHttpAcsCredentials;
5721
- exports.SeamHttpAcsCredentialsUnmanaged = SeamHttpAcsCredentialsUnmanaged;
5722
5049
  exports.SeamHttpAcsEncoders = SeamHttpAcsEncoders;
5723
5050
  exports.SeamHttpAcsEncodersSimulate = SeamHttpAcsEncodersSimulate;
5724
5051
  exports.SeamHttpAcsEntrances = SeamHttpAcsEntrances;
5725
5052
  exports.SeamHttpAcsSystems = SeamHttpAcsSystems;
5726
5053
  exports.SeamHttpAcsUsers = SeamHttpAcsUsers;
5727
- exports.SeamHttpAcsUsersUnmanaged = SeamHttpAcsUsersUnmanaged;
5728
5054
  exports.SeamHttpActionAttempts = SeamHttpActionAttempts;
5729
5055
  exports.SeamHttpApiError = SeamHttpApiError;
5730
5056
  exports.SeamHttpBridges = SeamHttpBridges;
@@ -5752,7 +5078,6 @@ exports.SeamHttpThermostats = SeamHttpThermostats;
5752
5078
  exports.SeamHttpThermostatsSchedules = SeamHttpThermostatsSchedules;
5753
5079
  exports.SeamHttpThermostatsSimulate = SeamHttpThermostatsSimulate;
5754
5080
  exports.SeamHttpUnauthorizedError = SeamHttpUnauthorizedError;
5755
- exports.SeamHttpUnstableLocations = SeamHttpUnstableLocations;
5756
5081
  exports.SeamHttpUserIdentities = SeamHttpUserIdentities;
5757
5082
  exports.SeamHttpUserIdentitiesEnrollmentAutomations = SeamHttpUserIdentitiesEnrollmentAutomations;
5758
5083
  exports.SeamHttpWebhooks = SeamHttpWebhooks;