@seamapi/http 1.73.0 → 1.75.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 (78) hide show
  1. package/dist/connect.cjs +478 -5
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +169 -3
  4. package/dist/index.cjs +486 -5
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/access-grants/access-grants.d.ts +2 -0
  8. package/lib/seam/connect/routes/access-grants/access-grants.js +4 -0
  9. package/lib/seam/connect/routes/access-grants/access-grants.js.map +1 -1
  10. package/lib/seam/connect/routes/access-grants/index.d.ts +1 -0
  11. package/lib/seam/connect/routes/access-grants/index.js +1 -0
  12. package/lib/seam/connect/routes/access-grants/index.js.map +1 -1
  13. package/lib/seam/connect/routes/access-grants/unmanaged/index.d.ts +1 -0
  14. package/lib/seam/connect/routes/access-grants/unmanaged/index.js +6 -0
  15. package/lib/seam/connect/routes/access-grants/unmanaged/index.js.map +1 -0
  16. package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.d.ts +47 -0
  17. package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.js +107 -0
  18. package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.js.map +1 -0
  19. package/lib/seam/connect/routes/access-methods/access-methods.d.ts +2 -0
  20. package/lib/seam/connect/routes/access-methods/access-methods.js +4 -0
  21. package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
  22. package/lib/seam/connect/routes/access-methods/index.d.ts +1 -0
  23. package/lib/seam/connect/routes/access-methods/index.js +1 -0
  24. package/lib/seam/connect/routes/access-methods/index.js.map +1 -1
  25. package/lib/seam/connect/routes/access-methods/unmanaged/index.d.ts +1 -0
  26. package/lib/seam/connect/routes/access-methods/unmanaged/index.js +6 -0
  27. package/lib/seam/connect/routes/access-methods/unmanaged/index.js.map +1 -0
  28. package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.d.ts +47 -0
  29. package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.js +107 -0
  30. package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.js.map +1 -0
  31. package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +1 -0
  32. package/lib/seam/connect/routes/seam/customer/v1/index.js +1 -0
  33. package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
  34. package/lib/seam/connect/routes/seam/customer/v1/spaces/index.d.ts +1 -0
  35. package/lib/seam/connect/routes/seam/customer/v1/spaces/index.js +6 -0
  36. package/lib/seam/connect/routes/seam/customer/v1/spaces/index.js.map +1 -0
  37. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.d.ts +34 -0
  38. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.js +98 -0
  39. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.js.map +1 -0
  40. package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +2 -0
  41. package/lib/seam/connect/routes/seam/customer/v1/v1.js +4 -3
  42. package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
  43. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +13 -2
  44. package/lib/seam/connect/routes/seam-http-endpoints.js +53 -0
  45. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  46. package/lib/seam/connect/routes/user-identities/index.d.ts +1 -0
  47. package/lib/seam/connect/routes/user-identities/index.js +1 -0
  48. package/lib/seam/connect/routes/user-identities/index.js.map +1 -1
  49. package/lib/seam/connect/routes/user-identities/unmanaged/index.d.ts +1 -0
  50. package/lib/seam/connect/routes/user-identities/unmanaged/index.js +6 -0
  51. package/lib/seam/connect/routes/user-identities/unmanaged/index.js.map +1 -0
  52. package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.d.ts +47 -0
  53. package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.js +107 -0
  54. package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.js.map +1 -0
  55. package/lib/seam/connect/routes/user-identities/user-identities.d.ts +2 -0
  56. package/lib/seam/connect/routes/user-identities/user-identities.js +4 -0
  57. package/lib/seam/connect/routes/user-identities/user-identities.js.map +1 -1
  58. package/lib/version.d.ts +1 -1
  59. package/lib/version.js +1 -1
  60. package/package.json +3 -3
  61. package/src/lib/seam/connect/routes/access-grants/access-grants.ts +6 -0
  62. package/src/lib/seam/connect/routes/access-grants/index.ts +1 -0
  63. package/src/lib/seam/connect/routes/access-grants/unmanaged/index.ts +6 -0
  64. package/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +236 -0
  65. package/src/lib/seam/connect/routes/access-methods/access-methods.ts +6 -0
  66. package/src/lib/seam/connect/routes/access-methods/index.ts +1 -0
  67. package/src/lib/seam/connect/routes/access-methods/unmanaged/index.ts +6 -0
  68. package/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +237 -0
  69. package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +1 -0
  70. package/src/lib/seam/connect/routes/seam/customer/v1/spaces/index.ts +6 -0
  71. package/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts +201 -0
  72. package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +5 -5
  73. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +131 -0
  74. package/src/lib/seam/connect/routes/user-identities/index.ts +1 -0
  75. package/src/lib/seam/connect/routes/user-identities/unmanaged/index.ts +6 -0
  76. package/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +240 -0
  77. package/src/lib/seam/connect/routes/user-identities/user-identities.ts +8 -0
  78. package/src/lib/version.ts +1 -1
package/dist/connect.cjs CHANGED
@@ -1392,6 +1392,110 @@ var SeamHttpAccessCodes = class _SeamHttpAccessCodes {
1392
1392
  }
1393
1393
  };
1394
1394
 
1395
+ // src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts
1396
+ var SeamHttpAccessGrantsUnmanaged = class _SeamHttpAccessGrantsUnmanaged {
1397
+ client;
1398
+ defaults;
1399
+ ltsVersion = seamApiLtsVersion;
1400
+ static ltsVersion = seamApiLtsVersion;
1401
+ constructor(apiKeyOrOptions = {}) {
1402
+ const options = parseOptions(apiKeyOrOptions);
1403
+ this.client = "client" in options ? options.client : createClient(options);
1404
+ this.defaults = limitToSeamHttpRequestOptions(options);
1405
+ }
1406
+ static fromClient(client, options = {}) {
1407
+ const constructorOptions = { ...options, client };
1408
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
1409
+ throw new SeamHttpInvalidOptionsError("Missing client");
1410
+ }
1411
+ return new _SeamHttpAccessGrantsUnmanaged(constructorOptions);
1412
+ }
1413
+ static fromApiKey(apiKey, options = {}) {
1414
+ const constructorOptions = { ...options, apiKey };
1415
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
1416
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
1417
+ }
1418
+ return new _SeamHttpAccessGrantsUnmanaged(constructorOptions);
1419
+ }
1420
+ static fromClientSessionToken(clientSessionToken, options = {}) {
1421
+ const constructorOptions = { ...options, clientSessionToken };
1422
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
1423
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
1424
+ }
1425
+ return new _SeamHttpAccessGrantsUnmanaged(constructorOptions);
1426
+ }
1427
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
1428
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
1429
+ const clientOptions = parseOptions({ ...options, publishableKey });
1430
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
1431
+ throw new SeamHttpInvalidOptionsError(
1432
+ "The client option cannot be used with SeamHttpAccessGrantsUnmanaged.fromPublishableKey"
1433
+ );
1434
+ }
1435
+ const client = createClient(clientOptions);
1436
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
1437
+ const { token } = await clientSessions.getOrCreate({
1438
+ user_identifier_key: userIdentifierKey
1439
+ });
1440
+ return _SeamHttpAccessGrantsUnmanaged.fromClientSessionToken(token, options);
1441
+ }
1442
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
1443
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
1444
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
1445
+ throw new SeamHttpInvalidOptionsError(
1446
+ "Missing consoleSessionToken or workspaceId"
1447
+ );
1448
+ }
1449
+ return new _SeamHttpAccessGrantsUnmanaged(constructorOptions);
1450
+ }
1451
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
1452
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
1453
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
1454
+ throw new SeamHttpInvalidOptionsError(
1455
+ "Missing personalAccessToken or workspaceId"
1456
+ );
1457
+ }
1458
+ return new _SeamHttpAccessGrantsUnmanaged(constructorOptions);
1459
+ }
1460
+ createPaginator(request) {
1461
+ return new SeamPaginator(this, request);
1462
+ }
1463
+ async updateClientSessionToken(clientSessionToken) {
1464
+ const { headers } = this.client.defaults;
1465
+ const authHeaders = getAuthHeadersForClientSessionToken({
1466
+ clientSessionToken
1467
+ });
1468
+ for (const key of Object.keys(authHeaders)) {
1469
+ if (headers[key] == null) {
1470
+ throw new Error(
1471
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
1472
+ );
1473
+ }
1474
+ }
1475
+ this.client.defaults.headers = { ...headers, ...authHeaders };
1476
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1477
+ await clientSessions.get();
1478
+ }
1479
+ get(parameters, options = {}) {
1480
+ return new SeamHttpRequest(this, {
1481
+ pathname: "/access_grants/unmanaged/get",
1482
+ method: "POST",
1483
+ body: parameters,
1484
+ responseKey: "access_grant",
1485
+ options
1486
+ });
1487
+ }
1488
+ list(parameters, options = {}) {
1489
+ return new SeamHttpRequest(this, {
1490
+ pathname: "/access_grants/unmanaged/list",
1491
+ method: "POST",
1492
+ body: parameters,
1493
+ responseKey: "access_grants",
1494
+ options
1495
+ });
1496
+ }
1497
+ };
1498
+
1395
1499
  // src/lib/seam/connect/routes/access-grants/access-grants.ts
1396
1500
  var SeamHttpAccessGrants = class _SeamHttpAccessGrants {
1397
1501
  client;
@@ -1476,6 +1580,9 @@ var SeamHttpAccessGrants = class _SeamHttpAccessGrants {
1476
1580
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1477
1581
  await clientSessions.get();
1478
1582
  }
1583
+ get unmanaged() {
1584
+ return SeamHttpAccessGrantsUnmanaged.fromClient(this.client, this.defaults);
1585
+ }
1479
1586
  create(parameters, options = {}) {
1480
1587
  return new SeamHttpRequest(this, {
1481
1588
  pathname: "/access_grants/create",
@@ -1532,6 +1639,110 @@ var SeamHttpAccessGrants = class _SeamHttpAccessGrants {
1532
1639
  }
1533
1640
  };
1534
1641
 
1642
+ // src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts
1643
+ var SeamHttpAccessMethodsUnmanaged = class _SeamHttpAccessMethodsUnmanaged {
1644
+ client;
1645
+ defaults;
1646
+ ltsVersion = seamApiLtsVersion;
1647
+ static ltsVersion = seamApiLtsVersion;
1648
+ constructor(apiKeyOrOptions = {}) {
1649
+ const options = parseOptions(apiKeyOrOptions);
1650
+ this.client = "client" in options ? options.client : createClient(options);
1651
+ this.defaults = limitToSeamHttpRequestOptions(options);
1652
+ }
1653
+ static fromClient(client, options = {}) {
1654
+ const constructorOptions = { ...options, client };
1655
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
1656
+ throw new SeamHttpInvalidOptionsError("Missing client");
1657
+ }
1658
+ return new _SeamHttpAccessMethodsUnmanaged(constructorOptions);
1659
+ }
1660
+ static fromApiKey(apiKey, options = {}) {
1661
+ const constructorOptions = { ...options, apiKey };
1662
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
1663
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
1664
+ }
1665
+ return new _SeamHttpAccessMethodsUnmanaged(constructorOptions);
1666
+ }
1667
+ static fromClientSessionToken(clientSessionToken, options = {}) {
1668
+ const constructorOptions = { ...options, clientSessionToken };
1669
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
1670
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
1671
+ }
1672
+ return new _SeamHttpAccessMethodsUnmanaged(constructorOptions);
1673
+ }
1674
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
1675
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
1676
+ const clientOptions = parseOptions({ ...options, publishableKey });
1677
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
1678
+ throw new SeamHttpInvalidOptionsError(
1679
+ "The client option cannot be used with SeamHttpAccessMethodsUnmanaged.fromPublishableKey"
1680
+ );
1681
+ }
1682
+ const client = createClient(clientOptions);
1683
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
1684
+ const { token } = await clientSessions.getOrCreate({
1685
+ user_identifier_key: userIdentifierKey
1686
+ });
1687
+ return _SeamHttpAccessMethodsUnmanaged.fromClientSessionToken(token, options);
1688
+ }
1689
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
1690
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
1691
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
1692
+ throw new SeamHttpInvalidOptionsError(
1693
+ "Missing consoleSessionToken or workspaceId"
1694
+ );
1695
+ }
1696
+ return new _SeamHttpAccessMethodsUnmanaged(constructorOptions);
1697
+ }
1698
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
1699
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
1700
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
1701
+ throw new SeamHttpInvalidOptionsError(
1702
+ "Missing personalAccessToken or workspaceId"
1703
+ );
1704
+ }
1705
+ return new _SeamHttpAccessMethodsUnmanaged(constructorOptions);
1706
+ }
1707
+ createPaginator(request) {
1708
+ return new SeamPaginator(this, request);
1709
+ }
1710
+ async updateClientSessionToken(clientSessionToken) {
1711
+ const { headers } = this.client.defaults;
1712
+ const authHeaders = getAuthHeadersForClientSessionToken({
1713
+ clientSessionToken
1714
+ });
1715
+ for (const key of Object.keys(authHeaders)) {
1716
+ if (headers[key] == null) {
1717
+ throw new Error(
1718
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
1719
+ );
1720
+ }
1721
+ }
1722
+ this.client.defaults.headers = { ...headers, ...authHeaders };
1723
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1724
+ await clientSessions.get();
1725
+ }
1726
+ get(parameters, options = {}) {
1727
+ return new SeamHttpRequest(this, {
1728
+ pathname: "/access_methods/unmanaged/get",
1729
+ method: "POST",
1730
+ body: parameters,
1731
+ responseKey: "access_method",
1732
+ options
1733
+ });
1734
+ }
1735
+ list(parameters, options = {}) {
1736
+ return new SeamHttpRequest(this, {
1737
+ pathname: "/access_methods/unmanaged/list",
1738
+ method: "POST",
1739
+ body: parameters,
1740
+ responseKey: "access_methods",
1741
+ options
1742
+ });
1743
+ }
1744
+ };
1745
+
1535
1746
  // src/lib/seam/connect/routes/access-methods/access-methods.ts
1536
1747
  var SeamHttpAccessMethods = class _SeamHttpAccessMethods {
1537
1748
  client;
@@ -1616,6 +1827,9 @@ var SeamHttpAccessMethods = class _SeamHttpAccessMethods {
1616
1827
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1617
1828
  await clientSessions.get();
1618
1829
  }
1830
+ get unmanaged() {
1831
+ return SeamHttpAccessMethodsUnmanaged.fromClient(this.client, this.defaults);
1832
+ }
1619
1833
  delete(parameters, options = {}) {
1620
1834
  return new SeamHttpRequest(this, {
1621
1835
  pathname: "/access_methods/delete",
@@ -6322,19 +6536,109 @@ var SeamHttpSeamCustomerV1Settings = class _SeamHttpSeamCustomerV1Settings {
6322
6536
  }
6323
6537
  };
6324
6538
 
6325
- // src/lib/seam/connect/routes/seam/customer/v1/v1.ts
6326
- var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
6539
+ // src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts
6540
+ var SeamHttpSeamCustomerV1Spaces = class _SeamHttpSeamCustomerV1Spaces {
6327
6541
  client;
6328
6542
  defaults;
6329
6543
  ltsVersion = seamApiLtsVersion;
6330
6544
  static ltsVersion = seamApiLtsVersion;
6331
6545
  constructor(apiKeyOrOptions = {}) {
6332
6546
  const options = parseOptions(apiKeyOrOptions);
6333
- if (!options.isUndocumentedApiEnabled) {
6334
- throw new Error(
6335
- "Cannot use undocumented API without isUndocumentedApiEnabled"
6547
+ this.client = "client" in options ? options.client : createClient(options);
6548
+ this.defaults = limitToSeamHttpRequestOptions(options);
6549
+ }
6550
+ static fromClient(client, options = {}) {
6551
+ const constructorOptions = { ...options, client };
6552
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
6553
+ throw new SeamHttpInvalidOptionsError("Missing client");
6554
+ }
6555
+ return new _SeamHttpSeamCustomerV1Spaces(constructorOptions);
6556
+ }
6557
+ static fromApiKey(apiKey, options = {}) {
6558
+ const constructorOptions = { ...options, apiKey };
6559
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
6560
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
6561
+ }
6562
+ return new _SeamHttpSeamCustomerV1Spaces(constructorOptions);
6563
+ }
6564
+ static fromClientSessionToken(clientSessionToken, options = {}) {
6565
+ const constructorOptions = { ...options, clientSessionToken };
6566
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
6567
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
6568
+ }
6569
+ return new _SeamHttpSeamCustomerV1Spaces(constructorOptions);
6570
+ }
6571
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
6572
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
6573
+ const clientOptions = parseOptions({ ...options, publishableKey });
6574
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
6575
+ throw new SeamHttpInvalidOptionsError(
6576
+ "The client option cannot be used with SeamHttpSeamCustomerV1Spaces.fromPublishableKey"
6577
+ );
6578
+ }
6579
+ const client = createClient(clientOptions);
6580
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
6581
+ const { token } = await clientSessions.getOrCreate({
6582
+ user_identifier_key: userIdentifierKey
6583
+ });
6584
+ return _SeamHttpSeamCustomerV1Spaces.fromClientSessionToken(token, options);
6585
+ }
6586
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
6587
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
6588
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
6589
+ throw new SeamHttpInvalidOptionsError(
6590
+ "Missing consoleSessionToken or workspaceId"
6336
6591
  );
6337
6592
  }
6593
+ return new _SeamHttpSeamCustomerV1Spaces(constructorOptions);
6594
+ }
6595
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
6596
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
6597
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
6598
+ throw new SeamHttpInvalidOptionsError(
6599
+ "Missing personalAccessToken or workspaceId"
6600
+ );
6601
+ }
6602
+ return new _SeamHttpSeamCustomerV1Spaces(constructorOptions);
6603
+ }
6604
+ createPaginator(request) {
6605
+ return new SeamPaginator(this, request);
6606
+ }
6607
+ async updateClientSessionToken(clientSessionToken) {
6608
+ const { headers } = this.client.defaults;
6609
+ const authHeaders = getAuthHeadersForClientSessionToken({
6610
+ clientSessionToken
6611
+ });
6612
+ for (const key of Object.keys(authHeaders)) {
6613
+ if (headers[key] == null) {
6614
+ throw new Error(
6615
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
6616
+ );
6617
+ }
6618
+ }
6619
+ this.client.defaults.headers = { ...headers, ...authHeaders };
6620
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6621
+ await clientSessions.get();
6622
+ }
6623
+ create(parameters, options = {}) {
6624
+ return new SeamHttpRequest(this, {
6625
+ pathname: "/seam/customer/v1/spaces/create",
6626
+ method: "POST",
6627
+ body: parameters,
6628
+ responseKey: "space",
6629
+ options
6630
+ });
6631
+ }
6632
+ };
6633
+
6634
+ // src/lib/seam/connect/routes/seam/customer/v1/v1.ts
6635
+ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
6636
+ client;
6637
+ defaults;
6638
+ ltsVersion = seamApiLtsVersion;
6639
+ static ltsVersion = seamApiLtsVersion;
6640
+ constructor(apiKeyOrOptions = {}) {
6641
+ const options = parseOptions(apiKeyOrOptions);
6338
6642
  this.client = "client" in options ? options.client : createClient(options);
6339
6643
  this.defaults = limitToSeamHttpRequestOptions(options);
6340
6644
  }
@@ -6438,6 +6742,9 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
6438
6742
  get settings() {
6439
6743
  return SeamHttpSeamCustomerV1Settings.fromClient(this.client, this.defaults);
6440
6744
  }
6745
+ get spaces() {
6746
+ return SeamHttpSeamCustomerV1Spaces.fromClient(this.client, this.defaults);
6747
+ }
6441
6748
  };
6442
6749
 
6443
6750
  // src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts
@@ -7810,6 +8117,113 @@ var SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentitiesE
7810
8117
  }
7811
8118
  };
7812
8119
 
8120
+ // src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts
8121
+ var SeamHttpUserIdentitiesUnmanaged = class _SeamHttpUserIdentitiesUnmanaged {
8122
+ client;
8123
+ defaults;
8124
+ ltsVersion = seamApiLtsVersion;
8125
+ static ltsVersion = seamApiLtsVersion;
8126
+ constructor(apiKeyOrOptions = {}) {
8127
+ const options = parseOptions(apiKeyOrOptions);
8128
+ this.client = "client" in options ? options.client : createClient(options);
8129
+ this.defaults = limitToSeamHttpRequestOptions(options);
8130
+ }
8131
+ static fromClient(client, options = {}) {
8132
+ const constructorOptions = { ...options, client };
8133
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
8134
+ throw new SeamHttpInvalidOptionsError("Missing client");
8135
+ }
8136
+ return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
8137
+ }
8138
+ static fromApiKey(apiKey, options = {}) {
8139
+ const constructorOptions = { ...options, apiKey };
8140
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
8141
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
8142
+ }
8143
+ return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
8144
+ }
8145
+ static fromClientSessionToken(clientSessionToken, options = {}) {
8146
+ const constructorOptions = { ...options, clientSessionToken };
8147
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
8148
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
8149
+ }
8150
+ return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
8151
+ }
8152
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
8153
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
8154
+ const clientOptions = parseOptions({ ...options, publishableKey });
8155
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
8156
+ throw new SeamHttpInvalidOptionsError(
8157
+ "The client option cannot be used with SeamHttpUserIdentitiesUnmanaged.fromPublishableKey"
8158
+ );
8159
+ }
8160
+ const client = createClient(clientOptions);
8161
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
8162
+ const { token } = await clientSessions.getOrCreate({
8163
+ user_identifier_key: userIdentifierKey
8164
+ });
8165
+ return _SeamHttpUserIdentitiesUnmanaged.fromClientSessionToken(
8166
+ token,
8167
+ options
8168
+ );
8169
+ }
8170
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
8171
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
8172
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
8173
+ throw new SeamHttpInvalidOptionsError(
8174
+ "Missing consoleSessionToken or workspaceId"
8175
+ );
8176
+ }
8177
+ return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
8178
+ }
8179
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
8180
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
8181
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
8182
+ throw new SeamHttpInvalidOptionsError(
8183
+ "Missing personalAccessToken or workspaceId"
8184
+ );
8185
+ }
8186
+ return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
8187
+ }
8188
+ createPaginator(request) {
8189
+ return new SeamPaginator(this, request);
8190
+ }
8191
+ async updateClientSessionToken(clientSessionToken) {
8192
+ const { headers } = this.client.defaults;
8193
+ const authHeaders = getAuthHeadersForClientSessionToken({
8194
+ clientSessionToken
8195
+ });
8196
+ for (const key of Object.keys(authHeaders)) {
8197
+ if (headers[key] == null) {
8198
+ throw new Error(
8199
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
8200
+ );
8201
+ }
8202
+ }
8203
+ this.client.defaults.headers = { ...headers, ...authHeaders };
8204
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
8205
+ await clientSessions.get();
8206
+ }
8207
+ get(parameters, options = {}) {
8208
+ return new SeamHttpRequest(this, {
8209
+ pathname: "/user_identities/unmanaged/get",
8210
+ method: "POST",
8211
+ body: parameters,
8212
+ responseKey: "user_identity",
8213
+ options
8214
+ });
8215
+ }
8216
+ list(parameters, options = {}) {
8217
+ return new SeamHttpRequest(this, {
8218
+ pathname: "/user_identities/unmanaged/list",
8219
+ method: "POST",
8220
+ body: parameters,
8221
+ responseKey: "user_identities",
8222
+ options
8223
+ });
8224
+ }
8225
+ };
8226
+
7813
8227
  // src/lib/seam/connect/routes/user-identities/user-identities.ts
7814
8228
  var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
7815
8229
  client;
@@ -7900,6 +8314,12 @@ var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
7900
8314
  this.defaults
7901
8315
  );
7902
8316
  }
8317
+ get unmanaged() {
8318
+ return SeamHttpUserIdentitiesUnmanaged.fromClient(
8319
+ this.client,
8320
+ this.defaults
8321
+ );
8322
+ }
7903
8323
  addAcsUser(parameters, options = {}) {
7904
8324
  return new SeamHttpRequest(this, {
7905
8325
  pathname: "/user_identities/add_acs_user",
@@ -8855,6 +9275,20 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
8855
9275
  return seam.update(...args);
8856
9276
  };
8857
9277
  }
9278
+ get "/access_grants/unmanaged/get"() {
9279
+ const { client, defaults } = this;
9280
+ return function accessGrantsUnmanagedGet(...args) {
9281
+ const seam = SeamHttpAccessGrantsUnmanaged.fromClient(client, defaults);
9282
+ return seam.get(...args);
9283
+ };
9284
+ }
9285
+ get "/access_grants/unmanaged/list"() {
9286
+ const { client, defaults } = this;
9287
+ return function accessGrantsUnmanagedList(...args) {
9288
+ const seam = SeamHttpAccessGrantsUnmanaged.fromClient(client, defaults);
9289
+ return seam.list(...args);
9290
+ };
9291
+ }
8858
9292
  get "/access_methods/delete"() {
8859
9293
  const { client, defaults } = this;
8860
9294
  return function accessMethodsDelete(...args) {
@@ -8890,6 +9324,20 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
8890
9324
  return seam.list(...args);
8891
9325
  };
8892
9326
  }
9327
+ get "/access_methods/unmanaged/get"() {
9328
+ const { client, defaults } = this;
9329
+ return function accessMethodsUnmanagedGet(...args) {
9330
+ const seam = SeamHttpAccessMethodsUnmanaged.fromClient(client, defaults);
9331
+ return seam.get(...args);
9332
+ };
9333
+ }
9334
+ get "/access_methods/unmanaged/list"() {
9335
+ const { client, defaults } = this;
9336
+ return function accessMethodsUnmanagedList(...args) {
9337
+ const seam = SeamHttpAccessMethodsUnmanaged.fromClient(client, defaults);
9338
+ return seam.list(...args);
9339
+ };
9340
+ }
8893
9341
  get "/acs/access_groups/add_user"() {
8894
9342
  const { client, defaults } = this;
8895
9343
  return function acsAccessGroupsAddUser(...args) {
@@ -9886,6 +10334,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
9886
10334
  return seam.update(...args);
9887
10335
  };
9888
10336
  }
10337
+ get "/seam/customer/v1/spaces/create"() {
10338
+ const { client, defaults } = this;
10339
+ return function seamCustomerV1SpacesCreate(...args) {
10340
+ const seam = SeamHttpSeamCustomerV1Spaces.fromClient(client, defaults);
10341
+ return seam.create(...args);
10342
+ };
10343
+ }
9889
10344
  get "/seam/partner/v1/building_blocks/spaces/auto_map"() {
9890
10345
  const { client, defaults } = this;
9891
10346
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10362,6 +10817,20 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
10362
10817
  return seam.list(...args);
10363
10818
  };
10364
10819
  }
10820
+ get "/user_identities/unmanaged/get"() {
10821
+ const { client, defaults } = this;
10822
+ return function userIdentitiesUnmanagedGet(...args) {
10823
+ const seam = SeamHttpUserIdentitiesUnmanaged.fromClient(client, defaults);
10824
+ return seam.get(...args);
10825
+ };
10826
+ }
10827
+ get "/user_identities/unmanaged/list"() {
10828
+ const { client, defaults } = this;
10829
+ return function userIdentitiesUnmanagedList(...args) {
10830
+ const seam = SeamHttpUserIdentitiesUnmanaged.fromClient(client, defaults);
10831
+ return seam.list(...args);
10832
+ };
10833
+ }
10365
10834
  get "/webhooks/create"() {
10366
10835
  const { client, defaults } = this;
10367
10836
  return function webhooksCreate(...args) {
@@ -10631,7 +11100,9 @@ exports.SeamHttpAccessCodes = SeamHttpAccessCodes;
10631
11100
  exports.SeamHttpAccessCodesSimulate = SeamHttpAccessCodesSimulate;
10632
11101
  exports.SeamHttpAccessCodesUnmanaged = SeamHttpAccessCodesUnmanaged;
10633
11102
  exports.SeamHttpAccessGrants = SeamHttpAccessGrants;
11103
+ exports.SeamHttpAccessGrantsUnmanaged = SeamHttpAccessGrantsUnmanaged;
10634
11104
  exports.SeamHttpAccessMethods = SeamHttpAccessMethods;
11105
+ exports.SeamHttpAccessMethodsUnmanaged = SeamHttpAccessMethodsUnmanaged;
10635
11106
  exports.SeamHttpAcs = SeamHttpAcs;
10636
11107
  exports.SeamHttpAcsAccessGroups = SeamHttpAcsAccessGroups;
10637
11108
  exports.SeamHttpAcsAccessGroupsUnmanaged = SeamHttpAcsAccessGroupsUnmanaged;
@@ -10681,6 +11152,7 @@ exports.SeamHttpSeamCustomerV1Events = SeamHttpSeamCustomerV1Events;
10681
11152
  exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
10682
11153
  exports.SeamHttpSeamCustomerV1Reservations = SeamHttpSeamCustomerV1Reservations;
10683
11154
  exports.SeamHttpSeamCustomerV1Settings = SeamHttpSeamCustomerV1Settings;
11155
+ exports.SeamHttpSeamCustomerV1Spaces = SeamHttpSeamCustomerV1Spaces;
10684
11156
  exports.SeamHttpSeamPartnerV1BuildingBlocks = SeamHttpSeamPartnerV1BuildingBlocks;
10685
11157
  exports.SeamHttpSeamPartnerV1BuildingBlocksSpaces = SeamHttpSeamPartnerV1BuildingBlocksSpaces;
10686
11158
  exports.SeamHttpSpaces = SeamHttpSpaces;
@@ -10693,6 +11165,7 @@ exports.SeamHttpUnstablePartner = SeamHttpUnstablePartner;
10693
11165
  exports.SeamHttpUnstablePartnerBuildingBlocks = SeamHttpUnstablePartnerBuildingBlocks;
10694
11166
  exports.SeamHttpUserIdentities = SeamHttpUserIdentities;
10695
11167
  exports.SeamHttpUserIdentitiesEnrollmentAutomations = SeamHttpUserIdentitiesEnrollmentAutomations;
11168
+ exports.SeamHttpUserIdentitiesUnmanaged = SeamHttpUserIdentitiesUnmanaged;
10696
11169
  exports.SeamHttpWebhooks = SeamHttpWebhooks;
10697
11170
  exports.SeamHttpWithoutWorkspace = SeamHttpWithoutWorkspace;
10698
11171
  exports.SeamHttpWithoutWorkspaceInvalidOptionsError = SeamHttpWithoutWorkspaceInvalidOptionsError;