@turnkey/sdk-browser 5.16.1 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +294 -4
- package/dist/__clients__/browser-clients.d.ts +2 -0
- package/dist/__clients__/browser-clients.d.ts.map +1 -1
- package/dist/__clients__/browser-clients.js +3 -0
- package/dist/__clients__/browser-clients.js.map +1 -1
- package/dist/__clients__/browser-clients.mjs +4 -1
- package/dist/__clients__/browser-clients.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +38 -2
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +703 -94
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +703 -94
- package/dist/__generated__/sdk-client-base.mjs.map +1 -1
- package/dist/__generated__/sdk_api_types.d.ts +98 -8
- package/dist/__generated__/sdk_api_types.d.ts.map +1 -1
- package/dist/__generated__/version.d.ts +1 -1
- package/dist/__generated__/version.d.ts.map +1 -1
- package/dist/__generated__/version.js +1 -1
- package/dist/__generated__/version.mjs +1 -1
- package/dist/__inputs__/public_api.types.d.ts +1462 -33
- package/dist/__inputs__/public_api.types.d.ts.map +1 -1
- package/dist/__tests__/utils-test.d.ts +2 -0
- package/dist/__tests__/utils-test.d.ts.map +1 -0
- package/package.json +9 -9
|
@@ -255,6 +255,37 @@ class TurnkeySDKClientBase {
|
|
|
255
255
|
url: fullUrl,
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
|
+
this.getIpAllowlist = async (input) => {
|
|
259
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
260
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
261
|
+
return this.request("/public/v1/query/get_ip_allowlist", {
|
|
262
|
+
...input,
|
|
263
|
+
organizationId: input.organizationId ??
|
|
264
|
+
session?.organizationId ??
|
|
265
|
+
this.config.organizationId,
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
this.stampGetIpAllowlist = async (input) => {
|
|
269
|
+
if (!this.stamper) {
|
|
270
|
+
return undefined;
|
|
271
|
+
}
|
|
272
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
273
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
274
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_ip_allowlist";
|
|
275
|
+
const body = {
|
|
276
|
+
...input,
|
|
277
|
+
organizationId: input.organizationId ??
|
|
278
|
+
session?.organizationId ??
|
|
279
|
+
this.config.organizationId,
|
|
280
|
+
};
|
|
281
|
+
const stringifiedBody = JSON.stringify(body);
|
|
282
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
283
|
+
return {
|
|
284
|
+
body: stringifiedBody,
|
|
285
|
+
stamp: stamp,
|
|
286
|
+
url: fullUrl,
|
|
287
|
+
};
|
|
288
|
+
};
|
|
258
289
|
this.getLatestBootProof = async (input) => {
|
|
259
290
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
260
291
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -596,6 +627,68 @@ class TurnkeySDKClientBase {
|
|
|
596
627
|
url: fullUrl,
|
|
597
628
|
};
|
|
598
629
|
};
|
|
630
|
+
this.getTvcApp = async (input) => {
|
|
631
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
632
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
633
|
+
return this.request("/public/v1/query/get_tvc_app", {
|
|
634
|
+
...input,
|
|
635
|
+
organizationId: input.organizationId ??
|
|
636
|
+
session?.organizationId ??
|
|
637
|
+
this.config.organizationId,
|
|
638
|
+
});
|
|
639
|
+
};
|
|
640
|
+
this.stampGetTvcApp = async (input) => {
|
|
641
|
+
if (!this.stamper) {
|
|
642
|
+
return undefined;
|
|
643
|
+
}
|
|
644
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
645
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
646
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_app";
|
|
647
|
+
const body = {
|
|
648
|
+
...input,
|
|
649
|
+
organizationId: input.organizationId ??
|
|
650
|
+
session?.organizationId ??
|
|
651
|
+
this.config.organizationId,
|
|
652
|
+
};
|
|
653
|
+
const stringifiedBody = JSON.stringify(body);
|
|
654
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
655
|
+
return {
|
|
656
|
+
body: stringifiedBody,
|
|
657
|
+
stamp: stamp,
|
|
658
|
+
url: fullUrl,
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
this.getTvcDeployment = async (input) => {
|
|
662
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
663
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
664
|
+
return this.request("/public/v1/query/get_tvc_deployment", {
|
|
665
|
+
...input,
|
|
666
|
+
organizationId: input.organizationId ??
|
|
667
|
+
session?.organizationId ??
|
|
668
|
+
this.config.organizationId,
|
|
669
|
+
});
|
|
670
|
+
};
|
|
671
|
+
this.stampGetTvcDeployment = async (input) => {
|
|
672
|
+
if (!this.stamper) {
|
|
673
|
+
return undefined;
|
|
674
|
+
}
|
|
675
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
676
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
677
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_tvc_deployment";
|
|
678
|
+
const body = {
|
|
679
|
+
...input,
|
|
680
|
+
organizationId: input.organizationId ??
|
|
681
|
+
session?.organizationId ??
|
|
682
|
+
this.config.organizationId,
|
|
683
|
+
};
|
|
684
|
+
const stringifiedBody = JSON.stringify(body);
|
|
685
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
686
|
+
return {
|
|
687
|
+
body: stringifiedBody,
|
|
688
|
+
stamp: stamp,
|
|
689
|
+
url: fullUrl,
|
|
690
|
+
};
|
|
691
|
+
};
|
|
599
692
|
this.getUser = async (input) => {
|
|
600
693
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
601
694
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -1031,6 +1124,68 @@ class TurnkeySDKClientBase {
|
|
|
1031
1124
|
url: fullUrl,
|
|
1032
1125
|
};
|
|
1033
1126
|
};
|
|
1127
|
+
this.getTvcAppDeployments = async (input) => {
|
|
1128
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1129
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1130
|
+
return this.request("/public/v1/query/list_tvc_app_deployments", {
|
|
1131
|
+
...input,
|
|
1132
|
+
organizationId: input.organizationId ??
|
|
1133
|
+
session?.organizationId ??
|
|
1134
|
+
this.config.organizationId,
|
|
1135
|
+
});
|
|
1136
|
+
};
|
|
1137
|
+
this.stampGetTvcAppDeployments = async (input) => {
|
|
1138
|
+
if (!this.stamper) {
|
|
1139
|
+
return undefined;
|
|
1140
|
+
}
|
|
1141
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1142
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1143
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_tvc_app_deployments";
|
|
1144
|
+
const body = {
|
|
1145
|
+
...input,
|
|
1146
|
+
organizationId: input.organizationId ??
|
|
1147
|
+
session?.organizationId ??
|
|
1148
|
+
this.config.organizationId,
|
|
1149
|
+
};
|
|
1150
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1151
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
1152
|
+
return {
|
|
1153
|
+
body: stringifiedBody,
|
|
1154
|
+
stamp: stamp,
|
|
1155
|
+
url: fullUrl,
|
|
1156
|
+
};
|
|
1157
|
+
};
|
|
1158
|
+
this.getTvcApps = async (input) => {
|
|
1159
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1160
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1161
|
+
return this.request("/public/v1/query/list_tvc_apps", {
|
|
1162
|
+
...input,
|
|
1163
|
+
organizationId: input.organizationId ??
|
|
1164
|
+
session?.organizationId ??
|
|
1165
|
+
this.config.organizationId,
|
|
1166
|
+
});
|
|
1167
|
+
};
|
|
1168
|
+
this.stampGetTvcApps = async (input) => {
|
|
1169
|
+
if (!this.stamper) {
|
|
1170
|
+
return undefined;
|
|
1171
|
+
}
|
|
1172
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1173
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1174
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_tvc_apps";
|
|
1175
|
+
const body = {
|
|
1176
|
+
...input,
|
|
1177
|
+
organizationId: input.organizationId ??
|
|
1178
|
+
session?.organizationId ??
|
|
1179
|
+
this.config.organizationId,
|
|
1180
|
+
};
|
|
1181
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1182
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
1183
|
+
return {
|
|
1184
|
+
body: stringifiedBody,
|
|
1185
|
+
stamp: stamp,
|
|
1186
|
+
url: fullUrl,
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1034
1189
|
this.listUserTags = async (input = {}) => {
|
|
1035
1190
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1036
1191
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -1217,6 +1372,37 @@ class TurnkeySDKClientBase {
|
|
|
1217
1372
|
url: fullUrl,
|
|
1218
1373
|
};
|
|
1219
1374
|
};
|
|
1375
|
+
this.validateTvcImage = async (input) => {
|
|
1376
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1377
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1378
|
+
return this.request("/public/v1/query/validate_tvc_image", {
|
|
1379
|
+
...input,
|
|
1380
|
+
organizationId: input.organizationId ??
|
|
1381
|
+
session?.organizationId ??
|
|
1382
|
+
this.config.organizationId,
|
|
1383
|
+
});
|
|
1384
|
+
};
|
|
1385
|
+
this.stampValidateTvcImage = async (input) => {
|
|
1386
|
+
if (!this.stamper) {
|
|
1387
|
+
return undefined;
|
|
1388
|
+
}
|
|
1389
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1390
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1391
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/validate_tvc_image";
|
|
1392
|
+
const body = {
|
|
1393
|
+
...input,
|
|
1394
|
+
organizationId: input.organizationId ??
|
|
1395
|
+
session?.organizationId ??
|
|
1396
|
+
this.config.organizationId,
|
|
1397
|
+
};
|
|
1398
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1399
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
1400
|
+
return {
|
|
1401
|
+
body: stringifiedBody,
|
|
1402
|
+
stamp: stamp,
|
|
1403
|
+
url: fullUrl,
|
|
1404
|
+
};
|
|
1405
|
+
};
|
|
1220
1406
|
this.getWhoami = async (input = {}) => {
|
|
1221
1407
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1222
1408
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -1316,41 +1502,6 @@ class TurnkeySDKClientBase {
|
|
|
1316
1502
|
url: fullUrl,
|
|
1317
1503
|
};
|
|
1318
1504
|
};
|
|
1319
|
-
this.createApiOnlyUsers = async (input) => {
|
|
1320
|
-
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1321
|
-
const session = sessionData ? parseSession(sessionData) : null;
|
|
1322
|
-
const { organizationId, timestampMs, ...rest } = input;
|
|
1323
|
-
return this.command("/public/v1/submit/create_api_only_users", {
|
|
1324
|
-
parameters: rest,
|
|
1325
|
-
organizationId: organizationId ??
|
|
1326
|
-
session?.organizationId ??
|
|
1327
|
-
this.config.organizationId,
|
|
1328
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
1329
|
-
type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
|
|
1330
|
-
}, "createApiOnlyUsersResult");
|
|
1331
|
-
};
|
|
1332
|
-
this.stampCreateApiOnlyUsers = async (input) => {
|
|
1333
|
-
if (!this.stamper) {
|
|
1334
|
-
return undefined;
|
|
1335
|
-
}
|
|
1336
|
-
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1337
|
-
const session = sessionData ? parseSession(sessionData) : null;
|
|
1338
|
-
const { organizationId, timestampMs, ...parameters } = input;
|
|
1339
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users";
|
|
1340
|
-
const bodyWithType = {
|
|
1341
|
-
parameters,
|
|
1342
|
-
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1343
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
1344
|
-
type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
|
|
1345
|
-
};
|
|
1346
|
-
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1347
|
-
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
1348
|
-
return {
|
|
1349
|
-
body: stringifiedBody,
|
|
1350
|
-
stamp: stamp,
|
|
1351
|
-
url: fullUrl,
|
|
1352
|
-
};
|
|
1353
|
-
};
|
|
1354
1505
|
this.createAuthenticators = async (input) => {
|
|
1355
1506
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1356
1507
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -1502,8 +1653,8 @@ class TurnkeySDKClientBase {
|
|
|
1502
1653
|
session?.organizationId ??
|
|
1503
1654
|
this.config.organizationId,
|
|
1504
1655
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1505
|
-
type: "
|
|
1506
|
-
}, "
|
|
1656
|
+
type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2",
|
|
1657
|
+
}, "createOauthProvidersResultV2");
|
|
1507
1658
|
};
|
|
1508
1659
|
this.stampCreateOauthProviders = async (input) => {
|
|
1509
1660
|
if (!this.stamper) {
|
|
@@ -1517,7 +1668,7 @@ class TurnkeySDKClientBase {
|
|
|
1517
1668
|
parameters,
|
|
1518
1669
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1519
1670
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1520
|
-
type: "
|
|
1671
|
+
type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2",
|
|
1521
1672
|
};
|
|
1522
1673
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1523
1674
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -1783,8 +1934,8 @@ class TurnkeySDKClientBase {
|
|
|
1783
1934
|
session?.organizationId ??
|
|
1784
1935
|
this.config.organizationId,
|
|
1785
1936
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1786
|
-
type: "
|
|
1787
|
-
}, "
|
|
1937
|
+
type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8",
|
|
1938
|
+
}, "createSubOrganizationResultV8");
|
|
1788
1939
|
};
|
|
1789
1940
|
this.stampCreateSubOrganization = async (input) => {
|
|
1790
1941
|
if (!this.stamper) {
|
|
@@ -1798,7 +1949,7 @@ class TurnkeySDKClientBase {
|
|
|
1798
1949
|
parameters,
|
|
1799
1950
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1800
1951
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1801
|
-
type: "
|
|
1952
|
+
type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8",
|
|
1802
1953
|
};
|
|
1803
1954
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1804
1955
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -1808,32 +1959,32 @@ class TurnkeySDKClientBase {
|
|
|
1808
1959
|
url: fullUrl,
|
|
1809
1960
|
};
|
|
1810
1961
|
};
|
|
1811
|
-
this.
|
|
1962
|
+
this.createTvcApp = async (input) => {
|
|
1812
1963
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1813
1964
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1814
1965
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1815
|
-
return this.command("/public/v1/submit/
|
|
1966
|
+
return this.command("/public/v1/submit/create_tvc_app", {
|
|
1816
1967
|
parameters: rest,
|
|
1817
1968
|
organizationId: organizationId ??
|
|
1818
1969
|
session?.organizationId ??
|
|
1819
1970
|
this.config.organizationId,
|
|
1820
1971
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1821
|
-
type: "
|
|
1822
|
-
}, "
|
|
1972
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_APP",
|
|
1973
|
+
}, "createTvcAppResult");
|
|
1823
1974
|
};
|
|
1824
|
-
this.
|
|
1975
|
+
this.stampCreateTvcApp = async (input) => {
|
|
1825
1976
|
if (!this.stamper) {
|
|
1826
1977
|
return undefined;
|
|
1827
1978
|
}
|
|
1828
1979
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1829
1980
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1830
1981
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
1831
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
1982
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_tvc_app";
|
|
1832
1983
|
const bodyWithType = {
|
|
1833
1984
|
parameters,
|
|
1834
1985
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1835
1986
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1836
|
-
type: "
|
|
1987
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_APP",
|
|
1837
1988
|
};
|
|
1838
1989
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1839
1990
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -1843,32 +1994,32 @@ class TurnkeySDKClientBase {
|
|
|
1843
1994
|
url: fullUrl,
|
|
1844
1995
|
};
|
|
1845
1996
|
};
|
|
1846
|
-
this.
|
|
1997
|
+
this.createTvcDeployment = async (input) => {
|
|
1847
1998
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1848
1999
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1849
2000
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1850
|
-
return this.command("/public/v1/submit/
|
|
2001
|
+
return this.command("/public/v1/submit/create_tvc_deployment", {
|
|
1851
2002
|
parameters: rest,
|
|
1852
2003
|
organizationId: organizationId ??
|
|
1853
2004
|
session?.organizationId ??
|
|
1854
2005
|
this.config.organizationId,
|
|
1855
2006
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1856
|
-
type: "
|
|
1857
|
-
}, "
|
|
2007
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
|
|
2008
|
+
}, "createTvcDeploymentResult");
|
|
1858
2009
|
};
|
|
1859
|
-
this.
|
|
2010
|
+
this.stampCreateTvcDeployment = async (input) => {
|
|
1860
2011
|
if (!this.stamper) {
|
|
1861
2012
|
return undefined;
|
|
1862
2013
|
}
|
|
1863
2014
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1864
2015
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1865
2016
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
1866
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
2017
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_tvc_deployment";
|
|
1867
2018
|
const bodyWithType = {
|
|
1868
2019
|
parameters,
|
|
1869
2020
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1870
2021
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1871
|
-
type: "
|
|
2022
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
|
|
1872
2023
|
};
|
|
1873
2024
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1874
2025
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -1878,32 +2029,33 @@ class TurnkeySDKClientBase {
|
|
|
1878
2029
|
url: fullUrl,
|
|
1879
2030
|
};
|
|
1880
2031
|
};
|
|
1881
|
-
this.
|
|
2032
|
+
this.createTvcManifestApprovals = async (input) => {
|
|
1882
2033
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1883
2034
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1884
2035
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1885
|
-
return this.command("/public/v1/submit/
|
|
2036
|
+
return this.command("/public/v1/submit/create_tvc_manifest_approvals", {
|
|
1886
2037
|
parameters: rest,
|
|
1887
2038
|
organizationId: organizationId ??
|
|
1888
2039
|
session?.organizationId ??
|
|
1889
2040
|
this.config.organizationId,
|
|
1890
2041
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1891
|
-
type: "
|
|
1892
|
-
}, "
|
|
2042
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
|
|
2043
|
+
}, "createTvcManifestApprovalsResult");
|
|
1893
2044
|
};
|
|
1894
|
-
this.
|
|
2045
|
+
this.stampCreateTvcManifestApprovals = async (input) => {
|
|
1895
2046
|
if (!this.stamper) {
|
|
1896
2047
|
return undefined;
|
|
1897
2048
|
}
|
|
1898
2049
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1899
2050
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1900
2051
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
1901
|
-
const fullUrl = this.config.apiBaseUrl +
|
|
2052
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
2053
|
+
"/public/v1/submit/create_tvc_manifest_approvals";
|
|
1902
2054
|
const bodyWithType = {
|
|
1903
2055
|
parameters,
|
|
1904
2056
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1905
2057
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1906
|
-
type: "
|
|
2058
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
|
|
1907
2059
|
};
|
|
1908
2060
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1909
2061
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -1913,32 +2065,32 @@ class TurnkeySDKClientBase {
|
|
|
1913
2065
|
url: fullUrl,
|
|
1914
2066
|
};
|
|
1915
2067
|
};
|
|
1916
|
-
this.
|
|
2068
|
+
this.createUserTag = async (input) => {
|
|
1917
2069
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1918
2070
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1919
2071
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1920
|
-
return this.command("/public/v1/submit/
|
|
2072
|
+
return this.command("/public/v1/submit/create_user_tag", {
|
|
1921
2073
|
parameters: rest,
|
|
1922
2074
|
organizationId: organizationId ??
|
|
1923
2075
|
session?.organizationId ??
|
|
1924
2076
|
this.config.organizationId,
|
|
1925
2077
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1926
|
-
type: "
|
|
1927
|
-
}, "
|
|
2078
|
+
type: "ACTIVITY_TYPE_CREATE_USER_TAG",
|
|
2079
|
+
}, "createUserTagResult");
|
|
1928
2080
|
};
|
|
1929
|
-
this.
|
|
2081
|
+
this.stampCreateUserTag = async (input) => {
|
|
1930
2082
|
if (!this.stamper) {
|
|
1931
2083
|
return undefined;
|
|
1932
2084
|
}
|
|
1933
2085
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1934
2086
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1935
2087
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
1936
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
2088
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag";
|
|
1937
2089
|
const bodyWithType = {
|
|
1938
2090
|
parameters,
|
|
1939
2091
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1940
2092
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1941
|
-
type: "
|
|
2093
|
+
type: "ACTIVITY_TYPE_CREATE_USER_TAG",
|
|
1942
2094
|
};
|
|
1943
2095
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1944
2096
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -1948,32 +2100,32 @@ class TurnkeySDKClientBase {
|
|
|
1948
2100
|
url: fullUrl,
|
|
1949
2101
|
};
|
|
1950
2102
|
};
|
|
1951
|
-
this.
|
|
2103
|
+
this.createUsers = async (input) => {
|
|
1952
2104
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1953
2105
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1954
2106
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1955
|
-
return this.command("/public/v1/submit/
|
|
2107
|
+
return this.command("/public/v1/submit/create_users", {
|
|
1956
2108
|
parameters: rest,
|
|
1957
2109
|
organizationId: organizationId ??
|
|
1958
2110
|
session?.organizationId ??
|
|
1959
2111
|
this.config.organizationId,
|
|
1960
2112
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1961
|
-
type: "
|
|
1962
|
-
}, "
|
|
2113
|
+
type: "ACTIVITY_TYPE_CREATE_USERS_V4",
|
|
2114
|
+
}, "createUsersResult");
|
|
1963
2115
|
};
|
|
1964
|
-
this.
|
|
2116
|
+
this.stampCreateUsers = async (input) => {
|
|
1965
2117
|
if (!this.stamper) {
|
|
1966
2118
|
return undefined;
|
|
1967
2119
|
}
|
|
1968
2120
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1969
2121
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1970
2122
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
1971
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
2123
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users";
|
|
1972
2124
|
const bodyWithType = {
|
|
1973
2125
|
parameters,
|
|
1974
2126
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1975
2127
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1976
|
-
type: "
|
|
2128
|
+
type: "ACTIVITY_TYPE_CREATE_USERS_V4",
|
|
1977
2129
|
};
|
|
1978
2130
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1979
2131
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -1983,32 +2135,32 @@ class TurnkeySDKClientBase {
|
|
|
1983
2135
|
url: fullUrl,
|
|
1984
2136
|
};
|
|
1985
2137
|
};
|
|
1986
|
-
this.
|
|
2138
|
+
this.createWallet = async (input) => {
|
|
1987
2139
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1988
2140
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
1989
2141
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1990
|
-
return this.command("/public/v1/submit/
|
|
2142
|
+
return this.command("/public/v1/submit/create_wallet", {
|
|
1991
2143
|
parameters: rest,
|
|
1992
2144
|
organizationId: organizationId ??
|
|
1993
2145
|
session?.organizationId ??
|
|
1994
2146
|
this.config.organizationId,
|
|
1995
2147
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1996
|
-
type: "
|
|
1997
|
-
}, "
|
|
2148
|
+
type: "ACTIVITY_TYPE_CREATE_WALLET",
|
|
2149
|
+
}, "createWalletResult");
|
|
1998
2150
|
};
|
|
1999
|
-
this.
|
|
2151
|
+
this.stampCreateWallet = async (input) => {
|
|
2000
2152
|
if (!this.stamper) {
|
|
2001
2153
|
return undefined;
|
|
2002
2154
|
}
|
|
2003
2155
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2004
2156
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
2005
2157
|
const { organizationId, timestampMs, ...parameters } = input;
|
|
2006
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/
|
|
2158
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet";
|
|
2007
2159
|
const bodyWithType = {
|
|
2008
2160
|
parameters,
|
|
2009
2161
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2010
2162
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2011
|
-
type: "
|
|
2163
|
+
type: "ACTIVITY_TYPE_CREATE_WALLET",
|
|
2012
2164
|
};
|
|
2013
2165
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2014
2166
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -2018,18 +2170,123 @@ class TurnkeySDKClientBase {
|
|
|
2018
2170
|
url: fullUrl,
|
|
2019
2171
|
};
|
|
2020
2172
|
};
|
|
2021
|
-
this.
|
|
2173
|
+
this.createWalletAccounts = async (input) => {
|
|
2022
2174
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2023
2175
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
2024
2176
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2025
|
-
return this.command("/public/v1/submit/
|
|
2177
|
+
return this.command("/public/v1/submit/create_wallet_accounts", {
|
|
2026
2178
|
parameters: rest,
|
|
2027
2179
|
organizationId: organizationId ??
|
|
2028
2180
|
session?.organizationId ??
|
|
2029
2181
|
this.config.organizationId,
|
|
2030
2182
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2031
|
-
type: "
|
|
2032
|
-
}, "
|
|
2183
|
+
type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
|
|
2184
|
+
}, "createWalletAccountsResult");
|
|
2185
|
+
};
|
|
2186
|
+
this.stampCreateWalletAccounts = async (input) => {
|
|
2187
|
+
if (!this.stamper) {
|
|
2188
|
+
return undefined;
|
|
2189
|
+
}
|
|
2190
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2191
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2192
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2193
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts";
|
|
2194
|
+
const bodyWithType = {
|
|
2195
|
+
parameters,
|
|
2196
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2197
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2198
|
+
type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
|
|
2199
|
+
};
|
|
2200
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2201
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
2202
|
+
return {
|
|
2203
|
+
body: stringifiedBody,
|
|
2204
|
+
stamp: stamp,
|
|
2205
|
+
url: fullUrl,
|
|
2206
|
+
};
|
|
2207
|
+
};
|
|
2208
|
+
this.createWebhookEndpoint = async (input) => {
|
|
2209
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2210
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2211
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2212
|
+
return this.command("/public/v1/submit/create_webhook_endpoint", {
|
|
2213
|
+
parameters: rest,
|
|
2214
|
+
organizationId: organizationId ??
|
|
2215
|
+
session?.organizationId ??
|
|
2216
|
+
this.config.organizationId,
|
|
2217
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2218
|
+
type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
|
|
2219
|
+
}, "createWebhookEndpointResult");
|
|
2220
|
+
};
|
|
2221
|
+
this.stampCreateWebhookEndpoint = async (input) => {
|
|
2222
|
+
if (!this.stamper) {
|
|
2223
|
+
return undefined;
|
|
2224
|
+
}
|
|
2225
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2226
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2227
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2228
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_webhook_endpoint";
|
|
2229
|
+
const bodyWithType = {
|
|
2230
|
+
parameters,
|
|
2231
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2232
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2233
|
+
type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
|
|
2234
|
+
};
|
|
2235
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2236
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
2237
|
+
return {
|
|
2238
|
+
body: stringifiedBody,
|
|
2239
|
+
stamp: stamp,
|
|
2240
|
+
url: fullUrl,
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
this.deleteApiKeys = async (input) => {
|
|
2244
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2245
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2246
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2247
|
+
return this.command("/public/v1/submit/delete_api_keys", {
|
|
2248
|
+
parameters: rest,
|
|
2249
|
+
organizationId: organizationId ??
|
|
2250
|
+
session?.organizationId ??
|
|
2251
|
+
this.config.organizationId,
|
|
2252
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2253
|
+
type: "ACTIVITY_TYPE_DELETE_API_KEYS",
|
|
2254
|
+
}, "deleteApiKeysResult");
|
|
2255
|
+
};
|
|
2256
|
+
this.stampDeleteApiKeys = async (input) => {
|
|
2257
|
+
if (!this.stamper) {
|
|
2258
|
+
return undefined;
|
|
2259
|
+
}
|
|
2260
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2261
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2262
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2263
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys";
|
|
2264
|
+
const bodyWithType = {
|
|
2265
|
+
parameters,
|
|
2266
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2267
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2268
|
+
type: "ACTIVITY_TYPE_DELETE_API_KEYS",
|
|
2269
|
+
};
|
|
2270
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2271
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
2272
|
+
return {
|
|
2273
|
+
body: stringifiedBody,
|
|
2274
|
+
stamp: stamp,
|
|
2275
|
+
url: fullUrl,
|
|
2276
|
+
};
|
|
2277
|
+
};
|
|
2278
|
+
this.deleteAuthenticators = async (input) => {
|
|
2279
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2280
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2281
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2282
|
+
return this.command("/public/v1/submit/delete_authenticators", {
|
|
2283
|
+
parameters: rest,
|
|
2284
|
+
organizationId: organizationId ??
|
|
2285
|
+
session?.organizationId ??
|
|
2286
|
+
this.config.organizationId,
|
|
2287
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2288
|
+
type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
|
|
2289
|
+
}, "deleteAuthenticatorsResult");
|
|
2033
2290
|
};
|
|
2034
2291
|
this.stampDeleteAuthenticators = async (input) => {
|
|
2035
2292
|
if (!this.stamper) {
|
|
@@ -2405,6 +2662,77 @@ class TurnkeySDKClientBase {
|
|
|
2405
2662
|
url: fullUrl,
|
|
2406
2663
|
};
|
|
2407
2664
|
};
|
|
2665
|
+
this.deleteTvcAppAndDeployments = async (input) => {
|
|
2666
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2667
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2668
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2669
|
+
return this.command("/public/v1/submit/delete_tvc_app_and_deployments", {
|
|
2670
|
+
parameters: rest,
|
|
2671
|
+
organizationId: organizationId ??
|
|
2672
|
+
session?.organizationId ??
|
|
2673
|
+
this.config.organizationId,
|
|
2674
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2675
|
+
type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
|
|
2676
|
+
}, "deleteTvcAppAndDeploymentsResult");
|
|
2677
|
+
};
|
|
2678
|
+
this.stampDeleteTvcAppAndDeployments = async (input) => {
|
|
2679
|
+
if (!this.stamper) {
|
|
2680
|
+
return undefined;
|
|
2681
|
+
}
|
|
2682
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2683
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2684
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2685
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
2686
|
+
"/public/v1/submit/delete_tvc_app_and_deployments";
|
|
2687
|
+
const bodyWithType = {
|
|
2688
|
+
parameters,
|
|
2689
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2690
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2691
|
+
type: "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
|
|
2692
|
+
};
|
|
2693
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2694
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
2695
|
+
return {
|
|
2696
|
+
body: stringifiedBody,
|
|
2697
|
+
stamp: stamp,
|
|
2698
|
+
url: fullUrl,
|
|
2699
|
+
};
|
|
2700
|
+
};
|
|
2701
|
+
this.deleteTvcDeployment = async (input) => {
|
|
2702
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2703
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2704
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2705
|
+
return this.command("/public/v1/submit/delete_tvc_deployment", {
|
|
2706
|
+
parameters: rest,
|
|
2707
|
+
organizationId: organizationId ??
|
|
2708
|
+
session?.organizationId ??
|
|
2709
|
+
this.config.organizationId,
|
|
2710
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2711
|
+
type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
|
|
2712
|
+
}, "deleteTvcDeploymentResult");
|
|
2713
|
+
};
|
|
2714
|
+
this.stampDeleteTvcDeployment = async (input) => {
|
|
2715
|
+
if (!this.stamper) {
|
|
2716
|
+
return undefined;
|
|
2717
|
+
}
|
|
2718
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2719
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2720
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2721
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_tvc_deployment";
|
|
2722
|
+
const bodyWithType = {
|
|
2723
|
+
parameters,
|
|
2724
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2725
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2726
|
+
type: "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
|
|
2727
|
+
};
|
|
2728
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2729
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
2730
|
+
return {
|
|
2731
|
+
body: stringifiedBody,
|
|
2732
|
+
stamp: stamp,
|
|
2733
|
+
url: fullUrl,
|
|
2734
|
+
};
|
|
2735
|
+
};
|
|
2408
2736
|
this.deleteUserTags = async (input) => {
|
|
2409
2737
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2410
2738
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -2940,8 +3268,8 @@ class TurnkeySDKClientBase {
|
|
|
2940
3268
|
session?.organizationId ??
|
|
2941
3269
|
this.config.organizationId,
|
|
2942
3270
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2943
|
-
type: "
|
|
2944
|
-
}, "
|
|
3271
|
+
type: "ACTIVITY_TYPE_INIT_OTP_V3",
|
|
3272
|
+
}, "initOtpResultV2");
|
|
2945
3273
|
};
|
|
2946
3274
|
this.stampInitOtp = async (input) => {
|
|
2947
3275
|
if (!this.stamper) {
|
|
@@ -2955,7 +3283,7 @@ class TurnkeySDKClientBase {
|
|
|
2955
3283
|
parameters,
|
|
2956
3284
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2957
3285
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2958
|
-
type: "
|
|
3286
|
+
type: "ACTIVITY_TYPE_INIT_OTP_V3",
|
|
2959
3287
|
};
|
|
2960
3288
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2961
3289
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -3185,7 +3513,7 @@ class TurnkeySDKClientBase {
|
|
|
3185
3513
|
session?.organizationId ??
|
|
3186
3514
|
this.config.organizationId,
|
|
3187
3515
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3188
|
-
type: "
|
|
3516
|
+
type: "ACTIVITY_TYPE_OTP_LOGIN_V2",
|
|
3189
3517
|
}, "otpLoginResult");
|
|
3190
3518
|
};
|
|
3191
3519
|
this.stampOtpLogin = async (input) => {
|
|
@@ -3200,7 +3528,7 @@ class TurnkeySDKClientBase {
|
|
|
3200
3528
|
parameters,
|
|
3201
3529
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3202
3530
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3203
|
-
type: "
|
|
3531
|
+
type: "ACTIVITY_TYPE_OTP_LOGIN_V2",
|
|
3204
3532
|
};
|
|
3205
3533
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3206
3534
|
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
@@ -3278,6 +3606,41 @@ class TurnkeySDKClientBase {
|
|
|
3278
3606
|
url: fullUrl,
|
|
3279
3607
|
};
|
|
3280
3608
|
};
|
|
3609
|
+
this.removeIpAllowlist = async (input) => {
|
|
3610
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3611
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3612
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3613
|
+
return this.command("/public/v1/submit/remove_ip_allowlist", {
|
|
3614
|
+
parameters: rest,
|
|
3615
|
+
organizationId: organizationId ??
|
|
3616
|
+
session?.organizationId ??
|
|
3617
|
+
this.config.organizationId,
|
|
3618
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3619
|
+
type: "ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST",
|
|
3620
|
+
}, "removeIpAllowlistResult");
|
|
3621
|
+
};
|
|
3622
|
+
this.stampRemoveIpAllowlist = async (input) => {
|
|
3623
|
+
if (!this.stamper) {
|
|
3624
|
+
return undefined;
|
|
3625
|
+
}
|
|
3626
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3627
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3628
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3629
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/remove_ip_allowlist";
|
|
3630
|
+
const bodyWithType = {
|
|
3631
|
+
parameters,
|
|
3632
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3633
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3634
|
+
type: "ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST",
|
|
3635
|
+
};
|
|
3636
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3637
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
3638
|
+
return {
|
|
3639
|
+
body: stringifiedBody,
|
|
3640
|
+
stamp: stamp,
|
|
3641
|
+
url: fullUrl,
|
|
3642
|
+
};
|
|
3643
|
+
};
|
|
3281
3644
|
this.removeOrganizationFeature = async (input) => {
|
|
3282
3645
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3283
3646
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -3313,6 +3676,76 @@ class TurnkeySDKClientBase {
|
|
|
3313
3676
|
url: fullUrl,
|
|
3314
3677
|
};
|
|
3315
3678
|
};
|
|
3679
|
+
this.restoreTvcDeployment = async (input) => {
|
|
3680
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3681
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3682
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3683
|
+
return this.command("/public/v1/submit/restore_tvc_deployment", {
|
|
3684
|
+
parameters: rest,
|
|
3685
|
+
organizationId: organizationId ??
|
|
3686
|
+
session?.organizationId ??
|
|
3687
|
+
this.config.organizationId,
|
|
3688
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3689
|
+
type: "ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT",
|
|
3690
|
+
}, "restoreTvcDeploymentResult");
|
|
3691
|
+
};
|
|
3692
|
+
this.stampRestoreTvcDeployment = async (input) => {
|
|
3693
|
+
if (!this.stamper) {
|
|
3694
|
+
return undefined;
|
|
3695
|
+
}
|
|
3696
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3697
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3698
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3699
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/restore_tvc_deployment";
|
|
3700
|
+
const bodyWithType = {
|
|
3701
|
+
parameters,
|
|
3702
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3703
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3704
|
+
type: "ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT",
|
|
3705
|
+
};
|
|
3706
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3707
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
3708
|
+
return {
|
|
3709
|
+
body: stringifiedBody,
|
|
3710
|
+
stamp: stamp,
|
|
3711
|
+
url: fullUrl,
|
|
3712
|
+
};
|
|
3713
|
+
};
|
|
3714
|
+
this.setIpAllowlist = async (input) => {
|
|
3715
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3716
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3717
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3718
|
+
return this.command("/public/v1/submit/set_ip_allowlist", {
|
|
3719
|
+
parameters: rest,
|
|
3720
|
+
organizationId: organizationId ??
|
|
3721
|
+
session?.organizationId ??
|
|
3722
|
+
this.config.organizationId,
|
|
3723
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3724
|
+
type: "ACTIVITY_TYPE_SET_IP_ALLOWLIST",
|
|
3725
|
+
}, "setIpAllowlistResult");
|
|
3726
|
+
};
|
|
3727
|
+
this.stampSetIpAllowlist = async (input) => {
|
|
3728
|
+
if (!this.stamper) {
|
|
3729
|
+
return undefined;
|
|
3730
|
+
}
|
|
3731
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3732
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3733
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3734
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_ip_allowlist";
|
|
3735
|
+
const bodyWithType = {
|
|
3736
|
+
parameters,
|
|
3737
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3738
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3739
|
+
type: "ACTIVITY_TYPE_SET_IP_ALLOWLIST",
|
|
3740
|
+
};
|
|
3741
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3742
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
3743
|
+
return {
|
|
3744
|
+
body: stringifiedBody,
|
|
3745
|
+
stamp: stamp,
|
|
3746
|
+
url: fullUrl,
|
|
3747
|
+
};
|
|
3748
|
+
};
|
|
3316
3749
|
this.setOrganizationFeature = async (input) => {
|
|
3317
3750
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3318
3751
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -3348,6 +3781,41 @@ class TurnkeySDKClientBase {
|
|
|
3348
3781
|
url: fullUrl,
|
|
3349
3782
|
};
|
|
3350
3783
|
};
|
|
3784
|
+
this.updateTvcAppLiveDeployment = async (input) => {
|
|
3785
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3786
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3787
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3788
|
+
return this.command("/public/v1/submit/set_tvc_app_live_deployment", {
|
|
3789
|
+
parameters: rest,
|
|
3790
|
+
organizationId: organizationId ??
|
|
3791
|
+
session?.organizationId ??
|
|
3792
|
+
this.config.organizationId,
|
|
3793
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3794
|
+
type: "ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT",
|
|
3795
|
+
}, "updateTvcAppLiveDeploymentResult");
|
|
3796
|
+
};
|
|
3797
|
+
this.stampUpdateTvcAppLiveDeployment = async (input) => {
|
|
3798
|
+
if (!this.stamper) {
|
|
3799
|
+
return undefined;
|
|
3800
|
+
}
|
|
3801
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3802
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3803
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3804
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_tvc_app_live_deployment";
|
|
3805
|
+
const bodyWithType = {
|
|
3806
|
+
parameters,
|
|
3807
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3808
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3809
|
+
type: "ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT",
|
|
3810
|
+
};
|
|
3811
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3812
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
3813
|
+
return {
|
|
3814
|
+
body: stringifiedBody,
|
|
3815
|
+
stamp: stamp,
|
|
3816
|
+
url: fullUrl,
|
|
3817
|
+
};
|
|
3818
|
+
};
|
|
3351
3819
|
this.signRawPayload = async (input) => {
|
|
3352
3820
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3353
3821
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -3488,6 +3956,147 @@ class TurnkeySDKClientBase {
|
|
|
3488
3956
|
url: fullUrl,
|
|
3489
3957
|
};
|
|
3490
3958
|
};
|
|
3959
|
+
this.sparkClaimTransfer = async (input) => {
|
|
3960
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3961
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3962
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3963
|
+
return this.command("/public/v1/submit/spark_claim_transfer", {
|
|
3964
|
+
parameters: rest,
|
|
3965
|
+
organizationId: organizationId ??
|
|
3966
|
+
session?.organizationId ??
|
|
3967
|
+
this.config.organizationId,
|
|
3968
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3969
|
+
type: "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
|
|
3970
|
+
}, "sparkClaimTransferResult");
|
|
3971
|
+
};
|
|
3972
|
+
this.stampSparkClaimTransfer = async (input) => {
|
|
3973
|
+
if (!this.stamper) {
|
|
3974
|
+
return undefined;
|
|
3975
|
+
}
|
|
3976
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3977
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3978
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3979
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/spark_claim_transfer";
|
|
3980
|
+
const bodyWithType = {
|
|
3981
|
+
parameters,
|
|
3982
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3983
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3984
|
+
type: "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
|
|
3985
|
+
};
|
|
3986
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3987
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
3988
|
+
return {
|
|
3989
|
+
body: stringifiedBody,
|
|
3990
|
+
stamp: stamp,
|
|
3991
|
+
url: fullUrl,
|
|
3992
|
+
};
|
|
3993
|
+
};
|
|
3994
|
+
this.sparkPrepareLightningReceive = async (input) => {
|
|
3995
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3996
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
3997
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3998
|
+
return this.command("/public/v1/submit/spark_prepare_lightning_receive", {
|
|
3999
|
+
parameters: rest,
|
|
4000
|
+
organizationId: organizationId ??
|
|
4001
|
+
session?.organizationId ??
|
|
4002
|
+
this.config.organizationId,
|
|
4003
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4004
|
+
type: "ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE",
|
|
4005
|
+
}, "sparkPrepareLightningReceiveResult");
|
|
4006
|
+
};
|
|
4007
|
+
this.stampSparkPrepareLightningReceive = async (input) => {
|
|
4008
|
+
if (!this.stamper) {
|
|
4009
|
+
return undefined;
|
|
4010
|
+
}
|
|
4011
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
4012
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
4013
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4014
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
4015
|
+
"/public/v1/submit/spark_prepare_lightning_receive";
|
|
4016
|
+
const bodyWithType = {
|
|
4017
|
+
parameters,
|
|
4018
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4019
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4020
|
+
type: "ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE",
|
|
4021
|
+
};
|
|
4022
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4023
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
4024
|
+
return {
|
|
4025
|
+
body: stringifiedBody,
|
|
4026
|
+
stamp: stamp,
|
|
4027
|
+
url: fullUrl,
|
|
4028
|
+
};
|
|
4029
|
+
};
|
|
4030
|
+
this.sparkPrepareTransfer = async (input) => {
|
|
4031
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
4032
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
4033
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
4034
|
+
return this.command("/public/v1/submit/spark_prepare_transfer", {
|
|
4035
|
+
parameters: rest,
|
|
4036
|
+
organizationId: organizationId ??
|
|
4037
|
+
session?.organizationId ??
|
|
4038
|
+
this.config.organizationId,
|
|
4039
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4040
|
+
type: "ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER",
|
|
4041
|
+
}, "sparkPrepareTransferResult");
|
|
4042
|
+
};
|
|
4043
|
+
this.stampSparkPrepareTransfer = async (input) => {
|
|
4044
|
+
if (!this.stamper) {
|
|
4045
|
+
return undefined;
|
|
4046
|
+
}
|
|
4047
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
4048
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
4049
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4050
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/spark_prepare_transfer";
|
|
4051
|
+
const bodyWithType = {
|
|
4052
|
+
parameters,
|
|
4053
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4054
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4055
|
+
type: "ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER",
|
|
4056
|
+
};
|
|
4057
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4058
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
4059
|
+
return {
|
|
4060
|
+
body: stringifiedBody,
|
|
4061
|
+
stamp: stamp,
|
|
4062
|
+
url: fullUrl,
|
|
4063
|
+
};
|
|
4064
|
+
};
|
|
4065
|
+
this.sparkSignFrost = async (input) => {
|
|
4066
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
4067
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
4068
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
4069
|
+
return this.command("/public/v1/submit/spark_sign_frost", {
|
|
4070
|
+
parameters: rest,
|
|
4071
|
+
organizationId: organizationId ??
|
|
4072
|
+
session?.organizationId ??
|
|
4073
|
+
this.config.organizationId,
|
|
4074
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4075
|
+
type: "ACTIVITY_TYPE_SPARK_SIGN_FROST",
|
|
4076
|
+
}, "sparkSignFrostResult");
|
|
4077
|
+
};
|
|
4078
|
+
this.stampSparkSignFrost = async (input) => {
|
|
4079
|
+
if (!this.stamper) {
|
|
4080
|
+
return undefined;
|
|
4081
|
+
}
|
|
4082
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
4083
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
4084
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
4085
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/spark_sign_frost";
|
|
4086
|
+
const bodyWithType = {
|
|
4087
|
+
parameters,
|
|
4088
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4089
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
4090
|
+
type: "ACTIVITY_TYPE_SPARK_SIGN_FROST",
|
|
4091
|
+
};
|
|
4092
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4093
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
4094
|
+
return {
|
|
4095
|
+
body: stringifiedBody,
|
|
4096
|
+
stamp: stamp,
|
|
4097
|
+
url: fullUrl,
|
|
4098
|
+
};
|
|
4099
|
+
};
|
|
3491
4100
|
this.stampLogin = async (input) => {
|
|
3492
4101
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3493
4102
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -3989,7 +4598,7 @@ class TurnkeySDKClientBase {
|
|
|
3989
4598
|
session?.organizationId ??
|
|
3990
4599
|
this.config.organizationId,
|
|
3991
4600
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3992
|
-
type: "
|
|
4601
|
+
type: "ACTIVITY_TYPE_VERIFY_OTP_V2",
|
|
3993
4602
|
}, "verifyOtpResult");
|
|
3994
4603
|
};
|
|
3995
4604
|
this.stampVerifyOtp = async (input) => {
|
|
@@ -4004,7 +4613,7 @@ class TurnkeySDKClientBase {
|
|
|
4004
4613
|
parameters,
|
|
4005
4614
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
4006
4615
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
4007
|
-
type: "
|
|
4616
|
+
type: "ACTIVITY_TYPE_VERIFY_OTP_V2",
|
|
4008
4617
|
};
|
|
4009
4618
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
4010
4619
|
const stamp = await this.stamper.stamp(stringifiedBody);
|