@seamapi/http 1.72.0 → 1.74.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/connect.cjs +372 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +138 -3
- package/dist/index.cjs +378 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/access-grants/access-grants.d.ts +2 -0
- package/lib/seam/connect/routes/access-grants/access-grants.js +4 -0
- package/lib/seam/connect/routes/access-grants/access-grants.js.map +1 -1
- package/lib/seam/connect/routes/access-grants/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-grants/index.js +1 -0
- package/lib/seam/connect/routes/access-grants/index.js.map +1 -1
- package/lib/seam/connect/routes/access-grants/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-grants/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/access-grants/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.d.ts +47 -0
- package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.js +107 -0
- package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/access-methods/access-methods.d.ts +2 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js +4 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
- package/lib/seam/connect/routes/access-methods/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-methods/index.js +1 -0
- package/lib/seam/connect/routes/access-methods/index.js.map +1 -1
- package/lib/seam/connect/routes/access-methods/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-methods/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/access-methods/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.d.ts +47 -0
- package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.js +107 -0
- package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +11 -2
- package/lib/seam/connect/routes/seam-http-endpoints.js +45 -0
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/user-identities/index.d.ts +1 -0
- package/lib/seam/connect/routes/user-identities/index.js +1 -0
- package/lib/seam/connect/routes/user-identities/index.js.map +1 -1
- package/lib/seam/connect/routes/user-identities/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/user-identities/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/user-identities/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.d.ts +47 -0
- package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.js +107 -0
- package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/user-identities/user-identities.d.ts +2 -0
- package/lib/seam/connect/routes/user-identities/user-identities.js +4 -0
- package/lib/seam/connect/routes/user-identities/user-identities.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/connect/routes/access-grants/access-grants.ts +6 -0
- package/src/lib/seam/connect/routes/access-grants/index.ts +1 -0
- package/src/lib/seam/connect/routes/access-grants/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +236 -0
- package/src/lib/seam/connect/routes/access-methods/access-methods.ts +6 -0
- package/src/lib/seam/connect/routes/access-methods/index.ts +1 -0
- package/src/lib/seam/connect/routes/access-methods/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +237 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +112 -0
- package/src/lib/seam/connect/routes/user-identities/index.ts +1 -0
- package/src/lib/seam/connect/routes/user-identities/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +240 -0
- package/src/lib/seam/connect/routes/user-identities/user-identities.ts +8 -0
- 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",
|
|
@@ -7810,6 +8024,113 @@ var SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentitiesE
|
|
|
7810
8024
|
}
|
|
7811
8025
|
};
|
|
7812
8026
|
|
|
8027
|
+
// src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts
|
|
8028
|
+
var SeamHttpUserIdentitiesUnmanaged = class _SeamHttpUserIdentitiesUnmanaged {
|
|
8029
|
+
client;
|
|
8030
|
+
defaults;
|
|
8031
|
+
ltsVersion = seamApiLtsVersion;
|
|
8032
|
+
static ltsVersion = seamApiLtsVersion;
|
|
8033
|
+
constructor(apiKeyOrOptions = {}) {
|
|
8034
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
8035
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
8036
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
8037
|
+
}
|
|
8038
|
+
static fromClient(client, options = {}) {
|
|
8039
|
+
const constructorOptions = { ...options, client };
|
|
8040
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
8041
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
8042
|
+
}
|
|
8043
|
+
return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
|
|
8044
|
+
}
|
|
8045
|
+
static fromApiKey(apiKey, options = {}) {
|
|
8046
|
+
const constructorOptions = { ...options, apiKey };
|
|
8047
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
8048
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
8049
|
+
}
|
|
8050
|
+
return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
|
|
8051
|
+
}
|
|
8052
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
8053
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
8054
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
8055
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
8056
|
+
}
|
|
8057
|
+
return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
|
|
8058
|
+
}
|
|
8059
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
8060
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
8061
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
8062
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
8063
|
+
throw new SeamHttpInvalidOptionsError(
|
|
8064
|
+
"The client option cannot be used with SeamHttpUserIdentitiesUnmanaged.fromPublishableKey"
|
|
8065
|
+
);
|
|
8066
|
+
}
|
|
8067
|
+
const client = createClient(clientOptions);
|
|
8068
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
8069
|
+
const { token } = await clientSessions.getOrCreate({
|
|
8070
|
+
user_identifier_key: userIdentifierKey
|
|
8071
|
+
});
|
|
8072
|
+
return _SeamHttpUserIdentitiesUnmanaged.fromClientSessionToken(
|
|
8073
|
+
token,
|
|
8074
|
+
options
|
|
8075
|
+
);
|
|
8076
|
+
}
|
|
8077
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
8078
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
8079
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
8080
|
+
throw new SeamHttpInvalidOptionsError(
|
|
8081
|
+
"Missing consoleSessionToken or workspaceId"
|
|
8082
|
+
);
|
|
8083
|
+
}
|
|
8084
|
+
return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
|
|
8085
|
+
}
|
|
8086
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
8087
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
8088
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
8089
|
+
throw new SeamHttpInvalidOptionsError(
|
|
8090
|
+
"Missing personalAccessToken or workspaceId"
|
|
8091
|
+
);
|
|
8092
|
+
}
|
|
8093
|
+
return new _SeamHttpUserIdentitiesUnmanaged(constructorOptions);
|
|
8094
|
+
}
|
|
8095
|
+
createPaginator(request) {
|
|
8096
|
+
return new SeamPaginator(this, request);
|
|
8097
|
+
}
|
|
8098
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
8099
|
+
const { headers } = this.client.defaults;
|
|
8100
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
8101
|
+
clientSessionToken
|
|
8102
|
+
});
|
|
8103
|
+
for (const key of Object.keys(authHeaders)) {
|
|
8104
|
+
if (headers[key] == null) {
|
|
8105
|
+
throw new Error(
|
|
8106
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
8107
|
+
);
|
|
8108
|
+
}
|
|
8109
|
+
}
|
|
8110
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
8111
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
8112
|
+
await clientSessions.get();
|
|
8113
|
+
}
|
|
8114
|
+
get(parameters, options = {}) {
|
|
8115
|
+
return new SeamHttpRequest(this, {
|
|
8116
|
+
pathname: "/user_identities/unmanaged/get",
|
|
8117
|
+
method: "POST",
|
|
8118
|
+
body: parameters,
|
|
8119
|
+
responseKey: "user_identity",
|
|
8120
|
+
options
|
|
8121
|
+
});
|
|
8122
|
+
}
|
|
8123
|
+
list(parameters, options = {}) {
|
|
8124
|
+
return new SeamHttpRequest(this, {
|
|
8125
|
+
pathname: "/user_identities/unmanaged/list",
|
|
8126
|
+
method: "POST",
|
|
8127
|
+
body: parameters,
|
|
8128
|
+
responseKey: "user_identities",
|
|
8129
|
+
options
|
|
8130
|
+
});
|
|
8131
|
+
}
|
|
8132
|
+
};
|
|
8133
|
+
|
|
7813
8134
|
// src/lib/seam/connect/routes/user-identities/user-identities.ts
|
|
7814
8135
|
var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
|
|
7815
8136
|
client;
|
|
@@ -7900,6 +8221,12 @@ var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
|
|
|
7900
8221
|
this.defaults
|
|
7901
8222
|
);
|
|
7902
8223
|
}
|
|
8224
|
+
get unmanaged() {
|
|
8225
|
+
return SeamHttpUserIdentitiesUnmanaged.fromClient(
|
|
8226
|
+
this.client,
|
|
8227
|
+
this.defaults
|
|
8228
|
+
);
|
|
8229
|
+
}
|
|
7903
8230
|
addAcsUser(parameters, options = {}) {
|
|
7904
8231
|
return new SeamHttpRequest(this, {
|
|
7905
8232
|
pathname: "/user_identities/add_acs_user",
|
|
@@ -8855,6 +9182,20 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
8855
9182
|
return seam.update(...args);
|
|
8856
9183
|
};
|
|
8857
9184
|
}
|
|
9185
|
+
get "/access_grants/unmanaged/get"() {
|
|
9186
|
+
const { client, defaults } = this;
|
|
9187
|
+
return function accessGrantsUnmanagedGet(...args) {
|
|
9188
|
+
const seam = SeamHttpAccessGrantsUnmanaged.fromClient(client, defaults);
|
|
9189
|
+
return seam.get(...args);
|
|
9190
|
+
};
|
|
9191
|
+
}
|
|
9192
|
+
get "/access_grants/unmanaged/list"() {
|
|
9193
|
+
const { client, defaults } = this;
|
|
9194
|
+
return function accessGrantsUnmanagedList(...args) {
|
|
9195
|
+
const seam = SeamHttpAccessGrantsUnmanaged.fromClient(client, defaults);
|
|
9196
|
+
return seam.list(...args);
|
|
9197
|
+
};
|
|
9198
|
+
}
|
|
8858
9199
|
get "/access_methods/delete"() {
|
|
8859
9200
|
const { client, defaults } = this;
|
|
8860
9201
|
return function accessMethodsDelete(...args) {
|
|
@@ -8890,6 +9231,20 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
8890
9231
|
return seam.list(...args);
|
|
8891
9232
|
};
|
|
8892
9233
|
}
|
|
9234
|
+
get "/access_methods/unmanaged/get"() {
|
|
9235
|
+
const { client, defaults } = this;
|
|
9236
|
+
return function accessMethodsUnmanagedGet(...args) {
|
|
9237
|
+
const seam = SeamHttpAccessMethodsUnmanaged.fromClient(client, defaults);
|
|
9238
|
+
return seam.get(...args);
|
|
9239
|
+
};
|
|
9240
|
+
}
|
|
9241
|
+
get "/access_methods/unmanaged/list"() {
|
|
9242
|
+
const { client, defaults } = this;
|
|
9243
|
+
return function accessMethodsUnmanagedList(...args) {
|
|
9244
|
+
const seam = SeamHttpAccessMethodsUnmanaged.fromClient(client, defaults);
|
|
9245
|
+
return seam.list(...args);
|
|
9246
|
+
};
|
|
9247
|
+
}
|
|
8893
9248
|
get "/acs/access_groups/add_user"() {
|
|
8894
9249
|
const { client, defaults } = this;
|
|
8895
9250
|
return function acsAccessGroupsAddUser(...args) {
|
|
@@ -10362,6 +10717,20 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10362
10717
|
return seam.list(...args);
|
|
10363
10718
|
};
|
|
10364
10719
|
}
|
|
10720
|
+
get "/user_identities/unmanaged/get"() {
|
|
10721
|
+
const { client, defaults } = this;
|
|
10722
|
+
return function userIdentitiesUnmanagedGet(...args) {
|
|
10723
|
+
const seam = SeamHttpUserIdentitiesUnmanaged.fromClient(client, defaults);
|
|
10724
|
+
return seam.get(...args);
|
|
10725
|
+
};
|
|
10726
|
+
}
|
|
10727
|
+
get "/user_identities/unmanaged/list"() {
|
|
10728
|
+
const { client, defaults } = this;
|
|
10729
|
+
return function userIdentitiesUnmanagedList(...args) {
|
|
10730
|
+
const seam = SeamHttpUserIdentitiesUnmanaged.fromClient(client, defaults);
|
|
10731
|
+
return seam.list(...args);
|
|
10732
|
+
};
|
|
10733
|
+
}
|
|
10365
10734
|
get "/webhooks/create"() {
|
|
10366
10735
|
const { client, defaults } = this;
|
|
10367
10736
|
return function webhooksCreate(...args) {
|
|
@@ -10631,7 +11000,9 @@ exports.SeamHttpAccessCodes = SeamHttpAccessCodes;
|
|
|
10631
11000
|
exports.SeamHttpAccessCodesSimulate = SeamHttpAccessCodesSimulate;
|
|
10632
11001
|
exports.SeamHttpAccessCodesUnmanaged = SeamHttpAccessCodesUnmanaged;
|
|
10633
11002
|
exports.SeamHttpAccessGrants = SeamHttpAccessGrants;
|
|
11003
|
+
exports.SeamHttpAccessGrantsUnmanaged = SeamHttpAccessGrantsUnmanaged;
|
|
10634
11004
|
exports.SeamHttpAccessMethods = SeamHttpAccessMethods;
|
|
11005
|
+
exports.SeamHttpAccessMethodsUnmanaged = SeamHttpAccessMethodsUnmanaged;
|
|
10635
11006
|
exports.SeamHttpAcs = SeamHttpAcs;
|
|
10636
11007
|
exports.SeamHttpAcsAccessGroups = SeamHttpAcsAccessGroups;
|
|
10637
11008
|
exports.SeamHttpAcsAccessGroupsUnmanaged = SeamHttpAcsAccessGroupsUnmanaged;
|
|
@@ -10693,6 +11064,7 @@ exports.SeamHttpUnstablePartner = SeamHttpUnstablePartner;
|
|
|
10693
11064
|
exports.SeamHttpUnstablePartnerBuildingBlocks = SeamHttpUnstablePartnerBuildingBlocks;
|
|
10694
11065
|
exports.SeamHttpUserIdentities = SeamHttpUserIdentities;
|
|
10695
11066
|
exports.SeamHttpUserIdentitiesEnrollmentAutomations = SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
11067
|
+
exports.SeamHttpUserIdentitiesUnmanaged = SeamHttpUserIdentitiesUnmanaged;
|
|
10696
11068
|
exports.SeamHttpWebhooks = SeamHttpWebhooks;
|
|
10697
11069
|
exports.SeamHttpWithoutWorkspace = SeamHttpWithoutWorkspace;
|
|
10698
11070
|
exports.SeamHttpWithoutWorkspaceInvalidOptionsError = SeamHttpWithoutWorkspaceInvalidOptionsError;
|