@turnkey/sdk-browser 6.0.0 → 6.1.1
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 +83 -0
- package/dist/__generated__/sdk-client-base.d.ts +32 -0
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +543 -0
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +543 -0
- package/dist/__generated__/sdk-client-base.mjs.map +1 -1
- package/dist/__generated__/sdk_api_types.d.ts +80 -0
- package/dist/__generated__/sdk_api_types.d.ts.map +1 -1
- package/dist/__generated__/version.d.ts +1 -1
- package/dist/__generated__/version.js +1 -1
- package/dist/__generated__/version.mjs +1 -1
- package/dist/__inputs__/public_api.types.d.ts +596 -13
- 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
|
@@ -627,6 +627,68 @@ class TurnkeySDKClientBase {
|
|
|
627
627
|
url: fullUrl,
|
|
628
628
|
};
|
|
629
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
|
+
};
|
|
630
692
|
this.getUser = async (input) => {
|
|
631
693
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
632
694
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -1062,6 +1124,68 @@ class TurnkeySDKClientBase {
|
|
|
1062
1124
|
url: fullUrl,
|
|
1063
1125
|
};
|
|
1064
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
|
+
};
|
|
1065
1189
|
this.listUserTags = async (input = {}) => {
|
|
1066
1190
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1067
1191
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -1248,6 +1372,37 @@ class TurnkeySDKClientBase {
|
|
|
1248
1372
|
url: fullUrl,
|
|
1249
1373
|
};
|
|
1250
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
|
+
};
|
|
1251
1406
|
this.getWhoami = async (input = {}) => {
|
|
1252
1407
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1253
1408
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -1804,6 +1959,112 @@ class TurnkeySDKClientBase {
|
|
|
1804
1959
|
url: fullUrl,
|
|
1805
1960
|
};
|
|
1806
1961
|
};
|
|
1962
|
+
this.createTvcApp = async (input) => {
|
|
1963
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1964
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1965
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1966
|
+
return this.command("/public/v1/submit/create_tvc_app", {
|
|
1967
|
+
parameters: rest,
|
|
1968
|
+
organizationId: organizationId ??
|
|
1969
|
+
session?.organizationId ??
|
|
1970
|
+
this.config.organizationId,
|
|
1971
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1972
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_APP",
|
|
1973
|
+
}, "createTvcAppResult");
|
|
1974
|
+
};
|
|
1975
|
+
this.stampCreateTvcApp = async (input) => {
|
|
1976
|
+
if (!this.stamper) {
|
|
1977
|
+
return undefined;
|
|
1978
|
+
}
|
|
1979
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1980
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
1981
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1982
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_tvc_app";
|
|
1983
|
+
const bodyWithType = {
|
|
1984
|
+
parameters,
|
|
1985
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1986
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1987
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_APP",
|
|
1988
|
+
};
|
|
1989
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1990
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
1991
|
+
return {
|
|
1992
|
+
body: stringifiedBody,
|
|
1993
|
+
stamp: stamp,
|
|
1994
|
+
url: fullUrl,
|
|
1995
|
+
};
|
|
1996
|
+
};
|
|
1997
|
+
this.createTvcDeployment = async (input) => {
|
|
1998
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1999
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2000
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2001
|
+
return this.command("/public/v1/submit/create_tvc_deployment", {
|
|
2002
|
+
parameters: rest,
|
|
2003
|
+
organizationId: organizationId ??
|
|
2004
|
+
session?.organizationId ??
|
|
2005
|
+
this.config.organizationId,
|
|
2006
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2007
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
|
|
2008
|
+
}, "createTvcDeploymentResult");
|
|
2009
|
+
};
|
|
2010
|
+
this.stampCreateTvcDeployment = async (input) => {
|
|
2011
|
+
if (!this.stamper) {
|
|
2012
|
+
return undefined;
|
|
2013
|
+
}
|
|
2014
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2015
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2016
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2017
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_tvc_deployment";
|
|
2018
|
+
const bodyWithType = {
|
|
2019
|
+
parameters,
|
|
2020
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2021
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2022
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
|
|
2023
|
+
};
|
|
2024
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2025
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
2026
|
+
return {
|
|
2027
|
+
body: stringifiedBody,
|
|
2028
|
+
stamp: stamp,
|
|
2029
|
+
url: fullUrl,
|
|
2030
|
+
};
|
|
2031
|
+
};
|
|
2032
|
+
this.createTvcManifestApprovals = async (input) => {
|
|
2033
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2034
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2035
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2036
|
+
return this.command("/public/v1/submit/create_tvc_manifest_approvals", {
|
|
2037
|
+
parameters: rest,
|
|
2038
|
+
organizationId: organizationId ??
|
|
2039
|
+
session?.organizationId ??
|
|
2040
|
+
this.config.organizationId,
|
|
2041
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2042
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
|
|
2043
|
+
}, "createTvcManifestApprovalsResult");
|
|
2044
|
+
};
|
|
2045
|
+
this.stampCreateTvcManifestApprovals = async (input) => {
|
|
2046
|
+
if (!this.stamper) {
|
|
2047
|
+
return undefined;
|
|
2048
|
+
}
|
|
2049
|
+
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2050
|
+
const session = sessionData ? parseSession(sessionData) : null;
|
|
2051
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2052
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
2053
|
+
"/public/v1/submit/create_tvc_manifest_approvals";
|
|
2054
|
+
const bodyWithType = {
|
|
2055
|
+
parameters,
|
|
2056
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2057
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2058
|
+
type: "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
|
|
2059
|
+
};
|
|
2060
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2061
|
+
const stamp = await this.stamper.stamp(stringifiedBody);
|
|
2062
|
+
return {
|
|
2063
|
+
body: stringifiedBody,
|
|
2064
|
+
stamp: stamp,
|
|
2065
|
+
url: fullUrl,
|
|
2066
|
+
};
|
|
2067
|
+
};
|
|
1807
2068
|
this.createUserTag = async (input) => {
|
|
1808
2069
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
1809
2070
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -2401,6 +2662,77 @@ class TurnkeySDKClientBase {
|
|
|
2401
2662
|
url: fullUrl,
|
|
2402
2663
|
};
|
|
2403
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
|
+
};
|
|
2404
2736
|
this.deleteUserTags = async (input) => {
|
|
2405
2737
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
2406
2738
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -3344,6 +3676,41 @@ class TurnkeySDKClientBase {
|
|
|
3344
3676
|
url: fullUrl,
|
|
3345
3677
|
};
|
|
3346
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
|
+
};
|
|
3347
3714
|
this.setIpAllowlist = async (input) => {
|
|
3348
3715
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3349
3716
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -3414,6 +3781,41 @@ class TurnkeySDKClientBase {
|
|
|
3414
3781
|
url: fullUrl,
|
|
3415
3782
|
};
|
|
3416
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
|
+
};
|
|
3417
3819
|
this.signRawPayload = async (input) => {
|
|
3418
3820
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3419
3821
|
const session = sessionData ? parseSession(sessionData) : null;
|
|
@@ -3554,6 +3956,147 @@ class TurnkeySDKClientBase {
|
|
|
3554
3956
|
url: fullUrl,
|
|
3555
3957
|
};
|
|
3556
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
|
+
};
|
|
3557
4100
|
this.stampLogin = async (input) => {
|
|
3558
4101
|
const sessionData = await getStorageValue(StorageKeys.Session);
|
|
3559
4102
|
const session = sessionData ? parseSession(sessionData) : null;
|