@turnkey/http 3.17.1 → 3.18.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.
@@ -81,6 +81,31 @@ class TurnkeyClient {
81
81
  url: fullUrl,
82
82
  };
83
83
  };
84
+ /**
85
+ * Get live runtime status for a TVC App from the cluster.
86
+ *
87
+ * Sign the provided `TGetAppStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_app_status).
88
+ *
89
+ * See also {@link stampGetAppStatus}.
90
+ */
91
+ this.getAppStatus = async (input) => {
92
+ return this.request("/public/v1/query/get_app_status", input);
93
+ };
94
+ /**
95
+ * Produce a `SignedRequest` from `TGetAppStatusBody` by using the client's `stamp` function.
96
+ *
97
+ * See also {@link GetAppStatus}.
98
+ */
99
+ this.stampGetAppStatus = async (input) => {
100
+ const fullUrl = this.config.baseUrl + "/public/v1/query/get_app_status";
101
+ const body = JSON.stringify(input);
102
+ const stamp = await this.stamper.stamp(body);
103
+ return {
104
+ body: body,
105
+ stamp: stamp,
106
+ url: fullUrl,
107
+ };
108
+ };
84
109
  /**
85
110
  * Get details about an authenticator.
86
111
  *
@@ -306,31 +331,6 @@ class TurnkeyClient {
306
331
  url: fullUrl,
307
332
  };
308
333
  };
309
- /**
310
- * Get details about an organization.
311
- *
312
- * Sign the provided `TGetOrganizationBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_organization).
313
- *
314
- * See also {@link stampGetOrganization}.
315
- */
316
- this.getOrganization = async (input) => {
317
- return this.request("/public/v1/query/get_organization", input);
318
- };
319
- /**
320
- * Produce a `SignedRequest` from `TGetOrganizationBody` by using the client's `stamp` function.
321
- *
322
- * See also {@link GetOrganization}.
323
- */
324
- this.stampGetOrganization = async (input) => {
325
- const fullUrl = this.config.baseUrl + "/public/v1/query/get_organization";
326
- const body = JSON.stringify(input);
327
- const stamp = await this.stamper.stamp(body);
328
- return {
329
- body: body,
330
- stamp: stamp,
331
- url: fullUrl,
332
- };
333
- };
334
334
  /**
335
335
  * Get quorum settings and features for an organization.
336
336
  *
@@ -481,56 +481,6 @@ class TurnkeyClient {
481
481
  url: fullUrl,
482
482
  };
483
483
  };
484
- /**
485
- * Get details about a single TVC App
486
- *
487
- * Sign the provided `TGetTvcAppBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_tvc_app).
488
- *
489
- * See also {@link stampGetTvcApp}.
490
- */
491
- this.getTvcApp = async (input) => {
492
- return this.request("/public/v1/query/get_tvc_app", input);
493
- };
494
- /**
495
- * Produce a `SignedRequest` from `TGetTvcAppBody` by using the client's `stamp` function.
496
- *
497
- * See also {@link GetTvcApp}.
498
- */
499
- this.stampGetTvcApp = async (input) => {
500
- const fullUrl = this.config.baseUrl + "/public/v1/query/get_tvc_app";
501
- const body = JSON.stringify(input);
502
- const stamp = await this.stamper.stamp(body);
503
- return {
504
- body: body,
505
- stamp: stamp,
506
- url: fullUrl,
507
- };
508
- };
509
- /**
510
- * Get details about a single TVC Deployment
511
- *
512
- * Sign the provided `TGetTvcDeploymentBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_tvc_deployment).
513
- *
514
- * See also {@link stampGetTvcDeployment}.
515
- */
516
- this.getTvcDeployment = async (input) => {
517
- return this.request("/public/v1/query/get_tvc_deployment", input);
518
- };
519
- /**
520
- * Produce a `SignedRequest` from `TGetTvcDeploymentBody` by using the client's `stamp` function.
521
- *
522
- * See also {@link GetTvcDeployment}.
523
- */
524
- this.stampGetTvcDeployment = async (input) => {
525
- const fullUrl = this.config.baseUrl + "/public/v1/query/get_tvc_deployment";
526
- const body = JSON.stringify(input);
527
- const stamp = await this.stamper.stamp(body);
528
- return {
529
- body: body,
530
- stamp: stamp,
531
- url: fullUrl,
532
- };
533
- };
534
484
  /**
535
485
  * Get details about a user.
536
486
  *
@@ -607,7 +557,7 @@ class TurnkeyClient {
607
557
  };
608
558
  };
609
559
  /**
610
- * Get non-zero balances of supported assets for a single wallet account address on the specified network.
560
+ * Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. This feature is in beta - please contact support for access.
611
561
  *
612
562
  * Sign the provided `TGetWalletAddressBalancesBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_wallet_address_balances).
613
563
  *
@@ -857,7 +807,7 @@ class TurnkeyClient {
857
807
  };
858
808
  };
859
809
  /**
860
- * List supported assets for the specified network
810
+ * List supported assets for the specified network. This feature is in beta - please contact support for access.
861
811
  *
862
812
  * Sign the provided `TListSupportedAssetsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_supported_assets).
863
813
  *
@@ -881,56 +831,6 @@ class TurnkeyClient {
881
831
  url: fullUrl,
882
832
  };
883
833
  };
884
- /**
885
- * List all deployments for a given TVC App
886
- *
887
- * Sign the provided `TGetTvcAppDeploymentsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_tvc_app_deployments).
888
- *
889
- * See also {@link stampGetTvcAppDeployments}.
890
- */
891
- this.getTvcAppDeployments = async (input) => {
892
- return this.request("/public/v1/query/list_tvc_app_deployments", input);
893
- };
894
- /**
895
- * Produce a `SignedRequest` from `TGetTvcAppDeploymentsBody` by using the client's `stamp` function.
896
- *
897
- * See also {@link GetTvcAppDeployments}.
898
- */
899
- this.stampGetTvcAppDeployments = async (input) => {
900
- const fullUrl = this.config.baseUrl + "/public/v1/query/list_tvc_app_deployments";
901
- const body = JSON.stringify(input);
902
- const stamp = await this.stamper.stamp(body);
903
- return {
904
- body: body,
905
- stamp: stamp,
906
- url: fullUrl,
907
- };
908
- };
909
- /**
910
- * List all TVC Apps within an organization.
911
- *
912
- * Sign the provided `TGetTvcAppsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_tvc_apps).
913
- *
914
- * See also {@link stampGetTvcApps}.
915
- */
916
- this.getTvcApps = async (input) => {
917
- return this.request("/public/v1/query/list_tvc_apps", input);
918
- };
919
- /**
920
- * Produce a `SignedRequest` from `TGetTvcAppsBody` by using the client's `stamp` function.
921
- *
922
- * See also {@link GetTvcApps}.
923
- */
924
- this.stampGetTvcApps = async (input) => {
925
- const fullUrl = this.config.baseUrl + "/public/v1/query/list_tvc_apps";
926
- const body = JSON.stringify(input);
927
- const stamp = await this.stamper.stamp(body);
928
- return {
929
- body: body,
930
- stamp: stamp,
931
- url: fullUrl,
932
- };
933
- };
934
834
  /**
935
835
  * List all user tags within an organization.
936
836
  *
@@ -1056,6 +956,31 @@ class TurnkeyClient {
1056
956
  url: fullUrl,
1057
957
  };
1058
958
  };
959
+ /**
960
+ * List webhook endpoints within an organization.
961
+ *
962
+ * Sign the provided `TListWebhookEndpointsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_webhook_endpoints).
963
+ *
964
+ * See also {@link stampListWebhookEndpoints}.
965
+ */
966
+ this.listWebhookEndpoints = async (input) => {
967
+ return this.request("/public/v1/query/list_webhook_endpoints", input);
968
+ };
969
+ /**
970
+ * Produce a `SignedRequest` from `TListWebhookEndpointsBody` by using the client's `stamp` function.
971
+ *
972
+ * See also {@link ListWebhookEndpoints}.
973
+ */
974
+ this.stampListWebhookEndpoints = async (input) => {
975
+ const fullUrl = this.config.baseUrl + "/public/v1/query/list_webhook_endpoints";
976
+ const body = JSON.stringify(input);
977
+ const stamp = await this.stamper.stamp(body);
978
+ return {
979
+ body: body,
980
+ stamp: stamp,
981
+ url: fullUrl,
982
+ };
983
+ };
1059
984
  /**
1060
985
  * Get basic information about your current API or WebAuthN user and their organization. Affords sub-organization look ups via parent organization for WebAuthN or API key users.
1061
986
  *
@@ -1481,81 +1406,6 @@ class TurnkeyClient {
1481
1406
  url: fullUrl,
1482
1407
  };
1483
1408
  };
1484
- /**
1485
- * Create a new TVC application
1486
- *
1487
- * Sign the provided `TCreateTvcAppBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_app).
1488
- *
1489
- * See also {@link stampCreateTvcApp}.
1490
- */
1491
- this.createTvcApp = async (input) => {
1492
- return this.request("/public/v1/submit/create_tvc_app", input);
1493
- };
1494
- /**
1495
- * Produce a `SignedRequest` from `TCreateTvcAppBody` by using the client's `stamp` function.
1496
- *
1497
- * See also {@link CreateTvcApp}.
1498
- */
1499
- this.stampCreateTvcApp = async (input) => {
1500
- const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_app";
1501
- const body = JSON.stringify(input);
1502
- const stamp = await this.stamper.stamp(body);
1503
- return {
1504
- body: body,
1505
- stamp: stamp,
1506
- url: fullUrl,
1507
- };
1508
- };
1509
- /**
1510
- * Create a new TVC Deployment
1511
- *
1512
- * Sign the provided `TCreateTvcDeploymentBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_deployment).
1513
- *
1514
- * See also {@link stampCreateTvcDeployment}.
1515
- */
1516
- this.createTvcDeployment = async (input) => {
1517
- return this.request("/public/v1/submit/create_tvc_deployment", input);
1518
- };
1519
- /**
1520
- * Produce a `SignedRequest` from `TCreateTvcDeploymentBody` by using the client's `stamp` function.
1521
- *
1522
- * See also {@link CreateTvcDeployment}.
1523
- */
1524
- this.stampCreateTvcDeployment = async (input) => {
1525
- const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_deployment";
1526
- const body = JSON.stringify(input);
1527
- const stamp = await this.stamper.stamp(body);
1528
- return {
1529
- body: body,
1530
- stamp: stamp,
1531
- url: fullUrl,
1532
- };
1533
- };
1534
- /**
1535
- * Post one or more manifest approvals for a TVC Manifest
1536
- *
1537
- * Sign the provided `TCreateTvcManifestApprovalsBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_manifest_approvals).
1538
- *
1539
- * See also {@link stampCreateTvcManifestApprovals}.
1540
- */
1541
- this.createTvcManifestApprovals = async (input) => {
1542
- return this.request("/public/v1/submit/create_tvc_manifest_approvals", input);
1543
- };
1544
- /**
1545
- * Produce a `SignedRequest` from `TCreateTvcManifestApprovalsBody` by using the client's `stamp` function.
1546
- *
1547
- * See also {@link CreateTvcManifestApprovals}.
1548
- */
1549
- this.stampCreateTvcManifestApprovals = async (input) => {
1550
- const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_manifest_approvals";
1551
- const body = JSON.stringify(input);
1552
- const stamp = await this.stamper.stamp(body);
1553
- return {
1554
- body: body,
1555
- stamp: stamp,
1556
- url: fullUrl,
1557
- };
1558
- };
1559
1409
  /**
1560
1410
  * Create a user tag and add it to users.
1561
1411
  *
@@ -1656,6 +1506,31 @@ class TurnkeyClient {
1656
1506
  url: fullUrl,
1657
1507
  };
1658
1508
  };
1509
+ /**
1510
+ * Create a webhook endpoint for an organization.
1511
+ *
1512
+ * Sign the provided `TCreateWebhookEndpointBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_webhook_endpoint).
1513
+ *
1514
+ * See also {@link stampCreateWebhookEndpoint}.
1515
+ */
1516
+ this.createWebhookEndpoint = async (input) => {
1517
+ return this.request("/public/v1/submit/create_webhook_endpoint", input);
1518
+ };
1519
+ /**
1520
+ * Produce a `SignedRequest` from `TCreateWebhookEndpointBody` by using the client's `stamp` function.
1521
+ *
1522
+ * See also {@link CreateWebhookEndpoint}.
1523
+ */
1524
+ this.stampCreateWebhookEndpoint = async (input) => {
1525
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/create_webhook_endpoint";
1526
+ const body = JSON.stringify(input);
1527
+ const stamp = await this.stamper.stamp(body);
1528
+ return {
1529
+ body: body,
1530
+ stamp: stamp,
1531
+ url: fullUrl,
1532
+ };
1533
+ };
1659
1534
  /**
1660
1535
  * Remove api keys from a user.
1661
1536
  *
@@ -2057,22 +1932,22 @@ class TurnkeyClient {
2057
1932
  };
2058
1933
  };
2059
1934
  /**
2060
- * Authenticate a user via email.
1935
+ * Delete a webhook endpoint for an organization.
2061
1936
  *
2062
- * Sign the provided `TEmailAuthBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/email_auth).
1937
+ * Sign the provided `TDeleteWebhookEndpointBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/delete_webhook_endpoint).
2063
1938
  *
2064
- * See also {@link stampEmailAuth}.
1939
+ * See also {@link stampDeleteWebhookEndpoint}.
2065
1940
  */
2066
- this.emailAuth = async (input) => {
2067
- return this.request("/public/v1/submit/email_auth", input);
1941
+ this.deleteWebhookEndpoint = async (input) => {
1942
+ return this.request("/public/v1/submit/delete_webhook_endpoint", input);
2068
1943
  };
2069
1944
  /**
2070
- * Produce a `SignedRequest` from `TEmailAuthBody` by using the client's `stamp` function.
1945
+ * Produce a `SignedRequest` from `TDeleteWebhookEndpointBody` by using the client's `stamp` function.
2071
1946
  *
2072
- * See also {@link EmailAuth}.
1947
+ * See also {@link DeleteWebhookEndpoint}.
2073
1948
  */
2074
- this.stampEmailAuth = async (input) => {
2075
- const fullUrl = this.config.baseUrl + "/public/v1/submit/email_auth";
1949
+ this.stampDeleteWebhookEndpoint = async (input) => {
1950
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/delete_webhook_endpoint";
2076
1951
  const body = JSON.stringify(input);
2077
1952
  const stamp = await this.stamper.stamp(body);
2078
1953
  return {
@@ -2082,22 +1957,22 @@ class TurnkeyClient {
2082
1957
  };
2083
1958
  };
2084
1959
  /**
2085
- * Submit a raw transaction (serialized and signed) for broadcasting to the network.
1960
+ * Authenticate a user via email.
2086
1961
  *
2087
- * Sign the provided `TEthSendRawTransactionBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/eth_send_raw_transaction).
1962
+ * Sign the provided `TEmailAuthBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/email_auth).
2088
1963
  *
2089
- * See also {@link stampEthSendRawTransaction}.
1964
+ * See also {@link stampEmailAuth}.
2090
1965
  */
2091
- this.ethSendRawTransaction = async (input) => {
2092
- return this.request("/public/v1/submit/eth_send_raw_transaction", input);
1966
+ this.emailAuth = async (input) => {
1967
+ return this.request("/public/v1/submit/email_auth", input);
2093
1968
  };
2094
1969
  /**
2095
- * Produce a `SignedRequest` from `TEthSendRawTransactionBody` by using the client's `stamp` function.
1970
+ * Produce a `SignedRequest` from `TEmailAuthBody` by using the client's `stamp` function.
2096
1971
  *
2097
- * See also {@link EthSendRawTransaction}.
1972
+ * See also {@link EmailAuth}.
2098
1973
  */
2099
- this.stampEthSendRawTransaction = async (input) => {
2100
- const fullUrl = this.config.baseUrl + "/public/v1/submit/eth_send_raw_transaction";
1974
+ this.stampEmailAuth = async (input) => {
1975
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/email_auth";
2101
1976
  const body = JSON.stringify(input);
2102
1977
  const stamp = await this.stamper.stamp(body);
2103
1978
  return {
@@ -2806,6 +2681,31 @@ class TurnkeyClient {
2806
2681
  url: fullUrl,
2807
2682
  };
2808
2683
  };
2684
+ /**
2685
+ * Update the name of an organization.
2686
+ *
2687
+ * Sign the provided `TUpdateOrganizationNameBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/update_organization_name).
2688
+ *
2689
+ * See also {@link stampUpdateOrganizationName}.
2690
+ */
2691
+ this.updateOrganizationName = async (input) => {
2692
+ return this.request("/public/v1/submit/update_organization_name", input);
2693
+ };
2694
+ /**
2695
+ * Produce a `SignedRequest` from `TUpdateOrganizationNameBody` by using the client's `stamp` function.
2696
+ *
2697
+ * See also {@link UpdateOrganizationName}.
2698
+ */
2699
+ this.stampUpdateOrganizationName = async (input) => {
2700
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/update_organization_name";
2701
+ const body = JSON.stringify(input);
2702
+ const stamp = await this.stamper.stamp(body);
2703
+ return {
2704
+ body: body,
2705
+ stamp: stamp,
2706
+ url: fullUrl,
2707
+ };
2708
+ };
2809
2709
  /**
2810
2710
  * Update an existing policy.
2811
2711
  *
@@ -3032,47 +2932,22 @@ class TurnkeyClient {
3032
2932
  };
3033
2933
  };
3034
2934
  /**
3035
- * Verify a generic OTP.
2935
+ * Update a webhook endpoint for an organization.
3036
2936
  *
3037
- * Sign the provided `TVerifyOtpBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/verify_otp).
2937
+ * Sign the provided `TUpdateWebhookEndpointBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/update_webhook_endpoint).
3038
2938
  *
3039
- * See also {@link stampVerifyOtp}.
2939
+ * See also {@link stampUpdateWebhookEndpoint}.
3040
2940
  */
3041
- this.verifyOtp = async (input) => {
3042
- return this.request("/public/v1/submit/verify_otp", input);
3043
- };
3044
- /**
3045
- * Produce a `SignedRequest` from `TVerifyOtpBody` by using the client's `stamp` function.
3046
- *
3047
- * See also {@link VerifyOtp}.
3048
- */
3049
- this.stampVerifyOtp = async (input) => {
3050
- const fullUrl = this.config.baseUrl + "/public/v1/submit/verify_otp";
3051
- const body = JSON.stringify(input);
3052
- const stamp = await this.stamper.stamp(body);
3053
- return {
3054
- body: body,
3055
- stamp: stamp,
3056
- url: fullUrl,
3057
- };
3058
- };
3059
- /**
3060
- * Refresh feature flags by triggering a DB read to flush the in-memory cache.
3061
- *
3062
- * Sign the provided `TRefreshFeatureFlagsBody` with the client's `stamp` function, and submit the request (POST /tkhq/api/v1/refresh_feature_flags).
3063
- *
3064
- * See also {@link stampRefreshFeatureFlags}.
3065
- */
3066
- this.refreshFeatureFlags = async (input) => {
3067
- return this.request("/tkhq/api/v1/refresh_feature_flags", input);
2941
+ this.updateWebhookEndpoint = async (input) => {
2942
+ return this.request("/public/v1/submit/update_webhook_endpoint", input);
3068
2943
  };
3069
2944
  /**
3070
- * Produce a `SignedRequest` from `TRefreshFeatureFlagsBody` by using the client's `stamp` function.
2945
+ * Produce a `SignedRequest` from `TUpdateWebhookEndpointBody` by using the client's `stamp` function.
3071
2946
  *
3072
- * See also {@link RefreshFeatureFlags}.
2947
+ * See also {@link UpdateWebhookEndpoint}.
3073
2948
  */
3074
- this.stampRefreshFeatureFlags = async (input) => {
3075
- const fullUrl = this.config.baseUrl + "/tkhq/api/v1/refresh_feature_flags";
2949
+ this.stampUpdateWebhookEndpoint = async (input) => {
2950
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/update_webhook_endpoint";
3076
2951
  const body = JSON.stringify(input);
3077
2952
  const stamp = await this.stamper.stamp(body);
3078
2953
  return {
@@ -3082,22 +2957,22 @@ class TurnkeyClient {
3082
2957
  };
3083
2958
  };
3084
2959
  /**
3085
- * Set a rate local rate limit just on the current endpoint, for purposes of testing with Vivosuite.
2960
+ * Verify a generic OTP.
3086
2961
  *
3087
- * Sign the provided `TTestRateLimitsBody` with the client's `stamp` function, and submit the request (POST /tkhq/api/v1/test_rate_limits).
2962
+ * Sign the provided `TVerifyOtpBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/verify_otp).
3088
2963
  *
3089
- * See also {@link stampTestRateLimits}.
2964
+ * See also {@link stampVerifyOtp}.
3090
2965
  */
3091
- this.testRateLimits = async (input) => {
3092
- return this.request("/tkhq/api/v1/test_rate_limits", input);
2966
+ this.verifyOtp = async (input) => {
2967
+ return this.request("/public/v1/submit/verify_otp", input);
3093
2968
  };
3094
2969
  /**
3095
- * Produce a `SignedRequest` from `TTestRateLimitsBody` by using the client's `stamp` function.
2970
+ * Produce a `SignedRequest` from `TVerifyOtpBody` by using the client's `stamp` function.
3096
2971
  *
3097
- * See also {@link TestRateLimits}.
2972
+ * See also {@link VerifyOtp}.
3098
2973
  */
3099
- this.stampTestRateLimits = async (input) => {
3100
- const fullUrl = this.config.baseUrl + "/tkhq/api/v1/test_rate_limits";
2974
+ this.stampVerifyOtp = async (input) => {
2975
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/verify_otp";
3101
2976
  const body = JSON.stringify(input);
3102
2977
  const stamp = await this.stamper.stamp(body);
3103
2978
  return {