@turnkey/core 1.13.0 → 1.14.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/dist/__clients__/core.d.ts +1 -1
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +3 -4
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +3 -4
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +14 -0
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +183 -9
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +183 -9
- package/dist/__generated__/sdk-client-base.mjs.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/package.json +7 -7
|
@@ -99,6 +99,36 @@ class TurnkeySDKClientBase {
|
|
|
99
99
|
url: fullUrl,
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
+
this.getAppStatus = async (input, stampWith) => {
|
|
103
|
+
const session = await this.storageManager?.getActiveSession();
|
|
104
|
+
return this.request("/public/v1/query/get_app_status", {
|
|
105
|
+
...input,
|
|
106
|
+
organizationId: input.organizationId ??
|
|
107
|
+
session?.organizationId ??
|
|
108
|
+
this.config.organizationId,
|
|
109
|
+
}, stampWith);
|
|
110
|
+
};
|
|
111
|
+
this.stampGetAppStatus = async (input, stampWith) => {
|
|
112
|
+
const activeStamper = this.getStamper(stampWith);
|
|
113
|
+
if (!activeStamper) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
const session = await this.storageManager?.getActiveSession();
|
|
117
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_app_status";
|
|
118
|
+
const body = {
|
|
119
|
+
...input,
|
|
120
|
+
organizationId: input.organizationId ??
|
|
121
|
+
session?.organizationId ??
|
|
122
|
+
this.config.organizationId,
|
|
123
|
+
};
|
|
124
|
+
const stringifiedBody = JSON.stringify(body);
|
|
125
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
126
|
+
return {
|
|
127
|
+
body: stringifiedBody,
|
|
128
|
+
stamp: stamp,
|
|
129
|
+
url: fullUrl,
|
|
130
|
+
};
|
|
131
|
+
};
|
|
102
132
|
this.getAuthenticator = async (input, stampWith) => {
|
|
103
133
|
const session = await this.storageManager?.getActiveSession();
|
|
104
134
|
return this.request("/public/v1/query/get_authenticator", {
|
|
@@ -1120,6 +1150,36 @@ class TurnkeySDKClientBase {
|
|
|
1120
1150
|
url: fullUrl,
|
|
1121
1151
|
};
|
|
1122
1152
|
};
|
|
1153
|
+
this.listWebhookEndpoints = async (input, stampWith) => {
|
|
1154
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1155
|
+
return this.request("/public/v1/query/list_webhook_endpoints", {
|
|
1156
|
+
...input,
|
|
1157
|
+
organizationId: input.organizationId ??
|
|
1158
|
+
session?.organizationId ??
|
|
1159
|
+
this.config.organizationId,
|
|
1160
|
+
}, stampWith);
|
|
1161
|
+
};
|
|
1162
|
+
this.stampListWebhookEndpoints = async (input, stampWith) => {
|
|
1163
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1164
|
+
if (!activeStamper) {
|
|
1165
|
+
return undefined;
|
|
1166
|
+
}
|
|
1167
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1168
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_webhook_endpoints";
|
|
1169
|
+
const body = {
|
|
1170
|
+
...input,
|
|
1171
|
+
organizationId: input.organizationId ??
|
|
1172
|
+
session?.organizationId ??
|
|
1173
|
+
this.config.organizationId,
|
|
1174
|
+
};
|
|
1175
|
+
const stringifiedBody = JSON.stringify(body);
|
|
1176
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1177
|
+
return {
|
|
1178
|
+
body: stringifiedBody,
|
|
1179
|
+
stamp: stamp,
|
|
1180
|
+
url: fullUrl,
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1123
1183
|
this.getWhoami = async (input = {}, stampWith) => {
|
|
1124
1184
|
const session = await this.storageManager?.getActiveSession();
|
|
1125
1185
|
return this.request("/public/v1/query/whoami", {
|
|
@@ -1364,7 +1424,7 @@ class TurnkeySDKClientBase {
|
|
|
1364
1424
|
session?.organizationId ??
|
|
1365
1425
|
this.config.organizationId,
|
|
1366
1426
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1367
|
-
type: "
|
|
1427
|
+
type: "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL",
|
|
1368
1428
|
}, "createOauth2CredentialResult", stampWith);
|
|
1369
1429
|
};
|
|
1370
1430
|
this.stampCreateOauth2Credential = async (input, stampWith) => {
|
|
@@ -1379,7 +1439,7 @@ class TurnkeySDKClientBase {
|
|
|
1379
1439
|
parameters,
|
|
1380
1440
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1381
1441
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1382
|
-
type: "
|
|
1442
|
+
type: "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL",
|
|
1383
1443
|
};
|
|
1384
1444
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1385
1445
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -1603,7 +1663,7 @@ class TurnkeySDKClientBase {
|
|
|
1603
1663
|
this.config.organizationId,
|
|
1604
1664
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1605
1665
|
type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2",
|
|
1606
|
-
}, "
|
|
1666
|
+
}, "createReadWriteSessionResult", stampWith);
|
|
1607
1667
|
};
|
|
1608
1668
|
this.stampCreateReadWriteSession = async (input, stampWith) => {
|
|
1609
1669
|
const activeStamper = this.getStamper(stampWith);
|
|
@@ -1832,6 +1892,40 @@ class TurnkeySDKClientBase {
|
|
|
1832
1892
|
url: fullUrl,
|
|
1833
1893
|
};
|
|
1834
1894
|
};
|
|
1895
|
+
this.createWebhookEndpoint = async (input, stampWith) => {
|
|
1896
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1897
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1898
|
+
return this.activity("/public/v1/submit/create_webhook_endpoint", {
|
|
1899
|
+
parameters: rest,
|
|
1900
|
+
organizationId: organizationId ??
|
|
1901
|
+
session?.organizationId ??
|
|
1902
|
+
this.config.organizationId,
|
|
1903
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1904
|
+
type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
|
|
1905
|
+
}, "createWebhookEndpointResult", stampWith);
|
|
1906
|
+
};
|
|
1907
|
+
this.stampCreateWebhookEndpoint = async (input, stampWith) => {
|
|
1908
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1909
|
+
if (!activeStamper) {
|
|
1910
|
+
return undefined;
|
|
1911
|
+
}
|
|
1912
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1913
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1914
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_webhook_endpoint";
|
|
1915
|
+
const bodyWithType = {
|
|
1916
|
+
parameters,
|
|
1917
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1918
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1919
|
+
type: "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
|
|
1920
|
+
};
|
|
1921
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1922
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1923
|
+
return {
|
|
1924
|
+
body: stringifiedBody,
|
|
1925
|
+
stamp: stamp,
|
|
1926
|
+
url: fullUrl,
|
|
1927
|
+
};
|
|
1928
|
+
};
|
|
1835
1929
|
this.deleteApiKeys = async (input, stampWith) => {
|
|
1836
1930
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1837
1931
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -1978,7 +2072,7 @@ class TurnkeySDKClientBase {
|
|
|
1978
2072
|
session?.organizationId ??
|
|
1979
2073
|
this.config.organizationId,
|
|
1980
2074
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1981
|
-
type: "
|
|
2075
|
+
type: "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL",
|
|
1982
2076
|
}, "deleteOauth2CredentialResult", stampWith);
|
|
1983
2077
|
};
|
|
1984
2078
|
this.stampDeleteOauth2Credential = async (input, stampWith) => {
|
|
@@ -1993,7 +2087,7 @@ class TurnkeySDKClientBase {
|
|
|
1993
2087
|
parameters,
|
|
1994
2088
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1995
2089
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
1996
|
-
type: "
|
|
2090
|
+
type: "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL",
|
|
1997
2091
|
};
|
|
1998
2092
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1999
2093
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -2378,6 +2472,40 @@ class TurnkeySDKClientBase {
|
|
|
2378
2472
|
url: fullUrl,
|
|
2379
2473
|
};
|
|
2380
2474
|
};
|
|
2475
|
+
this.deleteWebhookEndpoint = async (input, stampWith) => {
|
|
2476
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2477
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2478
|
+
return this.activity("/public/v1/submit/delete_webhook_endpoint", {
|
|
2479
|
+
parameters: rest,
|
|
2480
|
+
organizationId: organizationId ??
|
|
2481
|
+
session?.organizationId ??
|
|
2482
|
+
this.config.organizationId,
|
|
2483
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2484
|
+
type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
|
|
2485
|
+
}, "deleteWebhookEndpointResult", stampWith);
|
|
2486
|
+
};
|
|
2487
|
+
this.stampDeleteWebhookEndpoint = async (input, stampWith) => {
|
|
2488
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2489
|
+
if (!activeStamper) {
|
|
2490
|
+
return undefined;
|
|
2491
|
+
}
|
|
2492
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2493
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2494
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_webhook_endpoint";
|
|
2495
|
+
const bodyWithType = {
|
|
2496
|
+
parameters,
|
|
2497
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2498
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2499
|
+
type: "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
|
|
2500
|
+
};
|
|
2501
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2502
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2503
|
+
return {
|
|
2504
|
+
body: stringifiedBody,
|
|
2505
|
+
stamp: stamp,
|
|
2506
|
+
url: fullUrl,
|
|
2507
|
+
};
|
|
2508
|
+
};
|
|
2381
2509
|
this.emailAuth = async (input, stampWith) => {
|
|
2382
2510
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2383
2511
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2863,7 +2991,7 @@ class TurnkeySDKClientBase {
|
|
|
2863
2991
|
session?.organizationId ??
|
|
2864
2992
|
this.config.organizationId,
|
|
2865
2993
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2866
|
-
type: "
|
|
2994
|
+
type: "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE",
|
|
2867
2995
|
}, "oauth2AuthenticateResult", stampWith);
|
|
2868
2996
|
};
|
|
2869
2997
|
this.stampOauth2Authenticate = async (input, stampWith) => {
|
|
@@ -2878,7 +3006,7 @@ class TurnkeySDKClientBase {
|
|
|
2878
3006
|
parameters,
|
|
2879
3007
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2880
3008
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
2881
|
-
type: "
|
|
3009
|
+
type: "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE",
|
|
2882
3010
|
};
|
|
2883
3011
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2884
3012
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -3340,7 +3468,7 @@ class TurnkeySDKClientBase {
|
|
|
3340
3468
|
session?.organizationId ??
|
|
3341
3469
|
this.config.organizationId,
|
|
3342
3470
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3343
|
-
type: "
|
|
3471
|
+
type: "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL",
|
|
3344
3472
|
}, "updateOauth2CredentialResult", stampWith);
|
|
3345
3473
|
};
|
|
3346
3474
|
this.stampUpdateOauth2Credential = async (input, stampWith) => {
|
|
@@ -3355,7 +3483,7 @@ class TurnkeySDKClientBase {
|
|
|
3355
3483
|
parameters,
|
|
3356
3484
|
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3357
3485
|
timestampMs: timestampMs ?? String(Date.now()),
|
|
3358
|
-
type: "
|
|
3486
|
+
type: "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL",
|
|
3359
3487
|
};
|
|
3360
3488
|
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3361
3489
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
@@ -3705,6 +3833,40 @@ class TurnkeySDKClientBase {
|
|
|
3705
3833
|
url: fullUrl,
|
|
3706
3834
|
};
|
|
3707
3835
|
};
|
|
3836
|
+
this.updateWebhookEndpoint = async (input, stampWith) => {
|
|
3837
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3838
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3839
|
+
return this.activity("/public/v1/submit/update_webhook_endpoint", {
|
|
3840
|
+
parameters: rest,
|
|
3841
|
+
organizationId: organizationId ??
|
|
3842
|
+
session?.organizationId ??
|
|
3843
|
+
this.config.organizationId,
|
|
3844
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3845
|
+
type: "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
|
|
3846
|
+
}, "updateWebhookEndpointResult", stampWith);
|
|
3847
|
+
};
|
|
3848
|
+
this.stampUpdateWebhookEndpoint = async (input, stampWith) => {
|
|
3849
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3850
|
+
if (!activeStamper) {
|
|
3851
|
+
return undefined;
|
|
3852
|
+
}
|
|
3853
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3854
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3855
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_webhook_endpoint";
|
|
3856
|
+
const bodyWithType = {
|
|
3857
|
+
parameters,
|
|
3858
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3859
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3860
|
+
type: "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
|
|
3861
|
+
};
|
|
3862
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3863
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3864
|
+
return {
|
|
3865
|
+
body: stringifiedBody,
|
|
3866
|
+
stamp: stamp,
|
|
3867
|
+
url: fullUrl,
|
|
3868
|
+
};
|
|
3869
|
+
};
|
|
3708
3870
|
this.verifyOtp = async (input, stampWith) => {
|
|
3709
3871
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3710
3872
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -3751,15 +3913,27 @@ class TurnkeySDKClientBase {
|
|
|
3751
3913
|
this.proxyInitOtp = async (input) => {
|
|
3752
3914
|
return this.authProxyRequest("/v1/otp_init", input);
|
|
3753
3915
|
};
|
|
3916
|
+
this.proxyInitOtpV2 = async (input) => {
|
|
3917
|
+
return this.authProxyRequest("/v1/otp_init_v2", input);
|
|
3918
|
+
};
|
|
3754
3919
|
this.proxyOtpLogin = async (input) => {
|
|
3755
3920
|
return this.authProxyRequest("/v1/otp_login", input);
|
|
3756
3921
|
};
|
|
3922
|
+
this.proxyOtpLoginV2 = async (input) => {
|
|
3923
|
+
return this.authProxyRequest("/v1/otp_login_v2", input);
|
|
3924
|
+
};
|
|
3757
3925
|
this.proxyVerifyOtp = async (input) => {
|
|
3758
3926
|
return this.authProxyRequest("/v1/otp_verify", input);
|
|
3759
3927
|
};
|
|
3928
|
+
this.proxyVerifyOtpV2 = async (input) => {
|
|
3929
|
+
return this.authProxyRequest("/v1/otp_verify_v2", input);
|
|
3930
|
+
};
|
|
3760
3931
|
this.proxySignup = async (input) => {
|
|
3761
3932
|
return this.authProxyRequest("/v1/signup", input);
|
|
3762
3933
|
};
|
|
3934
|
+
this.proxySignupV2 = async (input) => {
|
|
3935
|
+
return this.authProxyRequest("/v1/signup_v2", input);
|
|
3936
|
+
};
|
|
3763
3937
|
this.proxyGetWalletKitConfig = async (input) => {
|
|
3764
3938
|
return this.authProxyRequest("/v1/wallet_kit_config", input);
|
|
3765
3939
|
};
|