@turnkey/http 3.18.0 → 4.0.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 +215 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.d.ts +225 -0
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.d.ts.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.js +375 -0
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.js.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.mjs +375 -0
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.mjs.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.d.ts +32334 -3632
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.d.ts.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.js +360 -0
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.js.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.mjs +331 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.mjs.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.types.d.ts +866 -20
- package/dist/__generated__/services/coordinator/public/v1/public_api.types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +3 -3
|
@@ -206,6 +206,31 @@ class TurnkeyClient {
|
|
|
206
206
|
url: fullUrl,
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
|
+
/**
|
|
210
|
+
* Get IP allowlist and rules for an organization.
|
|
211
|
+
*
|
|
212
|
+
* Sign the provided `TGetIpAllowlistBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_ip_allowlist).
|
|
213
|
+
*
|
|
214
|
+
* See also {@link stampGetIpAllowlist}.
|
|
215
|
+
*/
|
|
216
|
+
this.getIpAllowlist = async (input) => {
|
|
217
|
+
return this.request("/public/v1/query/get_ip_allowlist", input);
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Produce a `SignedRequest` from `TGetIpAllowlistBody` by using the client's `stamp` function.
|
|
221
|
+
*
|
|
222
|
+
* See also {@link GetIpAllowlist}.
|
|
223
|
+
*/
|
|
224
|
+
this.stampGetIpAllowlist = async (input) => {
|
|
225
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_ip_allowlist";
|
|
226
|
+
const body = JSON.stringify(input);
|
|
227
|
+
const stamp = await this.stamper.stamp(body);
|
|
228
|
+
return {
|
|
229
|
+
body: body,
|
|
230
|
+
stamp: stamp,
|
|
231
|
+
url: fullUrl,
|
|
232
|
+
};
|
|
233
|
+
};
|
|
209
234
|
/**
|
|
210
235
|
* Get the latest boot proof for a given enclave app name.
|
|
211
236
|
*
|
|
@@ -331,6 +356,31 @@ class TurnkeyClient {
|
|
|
331
356
|
url: fullUrl,
|
|
332
357
|
};
|
|
333
358
|
};
|
|
359
|
+
/**
|
|
360
|
+
* Get details about an organization.
|
|
361
|
+
*
|
|
362
|
+
* Sign the provided `TGetOrganizationBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_organization).
|
|
363
|
+
*
|
|
364
|
+
* See also {@link stampGetOrganization}.
|
|
365
|
+
*/
|
|
366
|
+
this.getOrganization = async (input) => {
|
|
367
|
+
return this.request("/public/v1/query/get_organization", input);
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* Produce a `SignedRequest` from `TGetOrganizationBody` by using the client's `stamp` function.
|
|
371
|
+
*
|
|
372
|
+
* See also {@link GetOrganization}.
|
|
373
|
+
*/
|
|
374
|
+
this.stampGetOrganization = async (input) => {
|
|
375
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_organization";
|
|
376
|
+
const body = JSON.stringify(input);
|
|
377
|
+
const stamp = await this.stamper.stamp(body);
|
|
378
|
+
return {
|
|
379
|
+
body: body,
|
|
380
|
+
stamp: stamp,
|
|
381
|
+
url: fullUrl,
|
|
382
|
+
};
|
|
383
|
+
};
|
|
334
384
|
/**
|
|
335
385
|
* Get quorum settings and features for an organization.
|
|
336
386
|
*
|
|
@@ -481,6 +531,56 @@ class TurnkeyClient {
|
|
|
481
531
|
url: fullUrl,
|
|
482
532
|
};
|
|
483
533
|
};
|
|
534
|
+
/**
|
|
535
|
+
* Get details about a single TVC App
|
|
536
|
+
*
|
|
537
|
+
* Sign the provided `TGetTvcAppBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_tvc_app).
|
|
538
|
+
*
|
|
539
|
+
* See also {@link stampGetTvcApp}.
|
|
540
|
+
*/
|
|
541
|
+
this.getTvcApp = async (input) => {
|
|
542
|
+
return this.request("/public/v1/query/get_tvc_app", input);
|
|
543
|
+
};
|
|
544
|
+
/**
|
|
545
|
+
* Produce a `SignedRequest` from `TGetTvcAppBody` by using the client's `stamp` function.
|
|
546
|
+
*
|
|
547
|
+
* See also {@link GetTvcApp}.
|
|
548
|
+
*/
|
|
549
|
+
this.stampGetTvcApp = async (input) => {
|
|
550
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_tvc_app";
|
|
551
|
+
const body = JSON.stringify(input);
|
|
552
|
+
const stamp = await this.stamper.stamp(body);
|
|
553
|
+
return {
|
|
554
|
+
body: body,
|
|
555
|
+
stamp: stamp,
|
|
556
|
+
url: fullUrl,
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Get details about a single TVC Deployment
|
|
561
|
+
*
|
|
562
|
+
* Sign the provided `TGetTvcDeploymentBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_tvc_deployment).
|
|
563
|
+
*
|
|
564
|
+
* See also {@link stampGetTvcDeployment}.
|
|
565
|
+
*/
|
|
566
|
+
this.getTvcDeployment = async (input) => {
|
|
567
|
+
return this.request("/public/v1/query/get_tvc_deployment", input);
|
|
568
|
+
};
|
|
569
|
+
/**
|
|
570
|
+
* Produce a `SignedRequest` from `TGetTvcDeploymentBody` by using the client's `stamp` function.
|
|
571
|
+
*
|
|
572
|
+
* See also {@link GetTvcDeployment}.
|
|
573
|
+
*/
|
|
574
|
+
this.stampGetTvcDeployment = async (input) => {
|
|
575
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_tvc_deployment";
|
|
576
|
+
const body = JSON.stringify(input);
|
|
577
|
+
const stamp = await this.stamper.stamp(body);
|
|
578
|
+
return {
|
|
579
|
+
body: body,
|
|
580
|
+
stamp: stamp,
|
|
581
|
+
url: fullUrl,
|
|
582
|
+
};
|
|
583
|
+
};
|
|
484
584
|
/**
|
|
485
585
|
* Get details about a user.
|
|
486
586
|
*
|
|
@@ -831,6 +931,56 @@ class TurnkeyClient {
|
|
|
831
931
|
url: fullUrl,
|
|
832
932
|
};
|
|
833
933
|
};
|
|
934
|
+
/**
|
|
935
|
+
* List all deployments for a given TVC App
|
|
936
|
+
*
|
|
937
|
+
* Sign the provided `TGetTvcAppDeploymentsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_tvc_app_deployments).
|
|
938
|
+
*
|
|
939
|
+
* See also {@link stampGetTvcAppDeployments}.
|
|
940
|
+
*/
|
|
941
|
+
this.getTvcAppDeployments = async (input) => {
|
|
942
|
+
return this.request("/public/v1/query/list_tvc_app_deployments", input);
|
|
943
|
+
};
|
|
944
|
+
/**
|
|
945
|
+
* Produce a `SignedRequest` from `TGetTvcAppDeploymentsBody` by using the client's `stamp` function.
|
|
946
|
+
*
|
|
947
|
+
* See also {@link GetTvcAppDeployments}.
|
|
948
|
+
*/
|
|
949
|
+
this.stampGetTvcAppDeployments = async (input) => {
|
|
950
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_tvc_app_deployments";
|
|
951
|
+
const body = JSON.stringify(input);
|
|
952
|
+
const stamp = await this.stamper.stamp(body);
|
|
953
|
+
return {
|
|
954
|
+
body: body,
|
|
955
|
+
stamp: stamp,
|
|
956
|
+
url: fullUrl,
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
/**
|
|
960
|
+
* List all TVC Apps within an organization.
|
|
961
|
+
*
|
|
962
|
+
* Sign the provided `TGetTvcAppsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_tvc_apps).
|
|
963
|
+
*
|
|
964
|
+
* See also {@link stampGetTvcApps}.
|
|
965
|
+
*/
|
|
966
|
+
this.getTvcApps = async (input) => {
|
|
967
|
+
return this.request("/public/v1/query/list_tvc_apps", input);
|
|
968
|
+
};
|
|
969
|
+
/**
|
|
970
|
+
* Produce a `SignedRequest` from `TGetTvcAppsBody` by using the client's `stamp` function.
|
|
971
|
+
*
|
|
972
|
+
* See also {@link GetTvcApps}.
|
|
973
|
+
*/
|
|
974
|
+
this.stampGetTvcApps = async (input) => {
|
|
975
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_tvc_apps";
|
|
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
|
+
};
|
|
834
984
|
/**
|
|
835
985
|
* List all user tags within an organization.
|
|
836
986
|
*
|
|
@@ -981,6 +1131,31 @@ class TurnkeyClient {
|
|
|
981
1131
|
url: fullUrl,
|
|
982
1132
|
};
|
|
983
1133
|
};
|
|
1134
|
+
/**
|
|
1135
|
+
* Validate a container image URL and pull secret for TVC deployment
|
|
1136
|
+
*
|
|
1137
|
+
* Sign the provided `TValidateTvcImageBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/validate_tvc_image).
|
|
1138
|
+
*
|
|
1139
|
+
* See also {@link stampValidateTvcImage}.
|
|
1140
|
+
*/
|
|
1141
|
+
this.validateTvcImage = async (input) => {
|
|
1142
|
+
return this.request("/public/v1/query/validate_tvc_image", input);
|
|
1143
|
+
};
|
|
1144
|
+
/**
|
|
1145
|
+
* Produce a `SignedRequest` from `TValidateTvcImageBody` by using the client's `stamp` function.
|
|
1146
|
+
*
|
|
1147
|
+
* See also {@link ValidateTvcImage}.
|
|
1148
|
+
*/
|
|
1149
|
+
this.stampValidateTvcImage = async (input) => {
|
|
1150
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/validate_tvc_image";
|
|
1151
|
+
const body = JSON.stringify(input);
|
|
1152
|
+
const stamp = await this.stamper.stamp(body);
|
|
1153
|
+
return {
|
|
1154
|
+
body: body,
|
|
1155
|
+
stamp: stamp,
|
|
1156
|
+
url: fullUrl,
|
|
1157
|
+
};
|
|
1158
|
+
};
|
|
984
1159
|
/**
|
|
985
1160
|
* 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.
|
|
986
1161
|
*
|
|
@@ -1406,6 +1581,81 @@ class TurnkeyClient {
|
|
|
1406
1581
|
url: fullUrl,
|
|
1407
1582
|
};
|
|
1408
1583
|
};
|
|
1584
|
+
/**
|
|
1585
|
+
* Create a new TVC application
|
|
1586
|
+
*
|
|
1587
|
+
* Sign the provided `TCreateTvcAppBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_app).
|
|
1588
|
+
*
|
|
1589
|
+
* See also {@link stampCreateTvcApp}.
|
|
1590
|
+
*/
|
|
1591
|
+
this.createTvcApp = async (input) => {
|
|
1592
|
+
return this.request("/public/v1/submit/create_tvc_app", input);
|
|
1593
|
+
};
|
|
1594
|
+
/**
|
|
1595
|
+
* Produce a `SignedRequest` from `TCreateTvcAppBody` by using the client's `stamp` function.
|
|
1596
|
+
*
|
|
1597
|
+
* See also {@link CreateTvcApp}.
|
|
1598
|
+
*/
|
|
1599
|
+
this.stampCreateTvcApp = async (input) => {
|
|
1600
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_app";
|
|
1601
|
+
const body = JSON.stringify(input);
|
|
1602
|
+
const stamp = await this.stamper.stamp(body);
|
|
1603
|
+
return {
|
|
1604
|
+
body: body,
|
|
1605
|
+
stamp: stamp,
|
|
1606
|
+
url: fullUrl,
|
|
1607
|
+
};
|
|
1608
|
+
};
|
|
1609
|
+
/**
|
|
1610
|
+
* Create a new TVC Deployment
|
|
1611
|
+
*
|
|
1612
|
+
* Sign the provided `TCreateTvcDeploymentBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_deployment).
|
|
1613
|
+
*
|
|
1614
|
+
* See also {@link stampCreateTvcDeployment}.
|
|
1615
|
+
*/
|
|
1616
|
+
this.createTvcDeployment = async (input) => {
|
|
1617
|
+
return this.request("/public/v1/submit/create_tvc_deployment", input);
|
|
1618
|
+
};
|
|
1619
|
+
/**
|
|
1620
|
+
* Produce a `SignedRequest` from `TCreateTvcDeploymentBody` by using the client's `stamp` function.
|
|
1621
|
+
*
|
|
1622
|
+
* See also {@link CreateTvcDeployment}.
|
|
1623
|
+
*/
|
|
1624
|
+
this.stampCreateTvcDeployment = async (input) => {
|
|
1625
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_deployment";
|
|
1626
|
+
const body = JSON.stringify(input);
|
|
1627
|
+
const stamp = await this.stamper.stamp(body);
|
|
1628
|
+
return {
|
|
1629
|
+
body: body,
|
|
1630
|
+
stamp: stamp,
|
|
1631
|
+
url: fullUrl,
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
/**
|
|
1635
|
+
* Post one or more manifest approvals for a TVC Manifest
|
|
1636
|
+
*
|
|
1637
|
+
* Sign the provided `TCreateTvcManifestApprovalsBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_manifest_approvals).
|
|
1638
|
+
*
|
|
1639
|
+
* See also {@link stampCreateTvcManifestApprovals}.
|
|
1640
|
+
*/
|
|
1641
|
+
this.createTvcManifestApprovals = async (input) => {
|
|
1642
|
+
return this.request("/public/v1/submit/create_tvc_manifest_approvals", input);
|
|
1643
|
+
};
|
|
1644
|
+
/**
|
|
1645
|
+
* Produce a `SignedRequest` from `TCreateTvcManifestApprovalsBody` by using the client's `stamp` function.
|
|
1646
|
+
*
|
|
1647
|
+
* See also {@link CreateTvcManifestApprovals}.
|
|
1648
|
+
*/
|
|
1649
|
+
this.stampCreateTvcManifestApprovals = async (input) => {
|
|
1650
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_manifest_approvals";
|
|
1651
|
+
const body = JSON.stringify(input);
|
|
1652
|
+
const stamp = await this.stamper.stamp(body);
|
|
1653
|
+
return {
|
|
1654
|
+
body: body,
|
|
1655
|
+
stamp: stamp,
|
|
1656
|
+
url: fullUrl,
|
|
1657
|
+
};
|
|
1658
|
+
};
|
|
1409
1659
|
/**
|
|
1410
1660
|
* Create a user tag and add it to users.
|
|
1411
1661
|
*
|
|
@@ -1981,6 +2231,31 @@ class TurnkeyClient {
|
|
|
1981
2231
|
url: fullUrl,
|
|
1982
2232
|
};
|
|
1983
2233
|
};
|
|
2234
|
+
/**
|
|
2235
|
+
* Submit a raw transaction (serialized and signed) for broadcasting to the network.
|
|
2236
|
+
*
|
|
2237
|
+
* Sign the provided `TEthSendRawTransactionBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/eth_send_raw_transaction).
|
|
2238
|
+
*
|
|
2239
|
+
* See also {@link stampEthSendRawTransaction}.
|
|
2240
|
+
*/
|
|
2241
|
+
this.ethSendRawTransaction = async (input) => {
|
|
2242
|
+
return this.request("/public/v1/submit/eth_send_raw_transaction", input);
|
|
2243
|
+
};
|
|
2244
|
+
/**
|
|
2245
|
+
* Produce a `SignedRequest` from `TEthSendRawTransactionBody` by using the client's `stamp` function.
|
|
2246
|
+
*
|
|
2247
|
+
* See also {@link EthSendRawTransaction}.
|
|
2248
|
+
*/
|
|
2249
|
+
this.stampEthSendRawTransaction = async (input) => {
|
|
2250
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/eth_send_raw_transaction";
|
|
2251
|
+
const body = JSON.stringify(input);
|
|
2252
|
+
const stamp = await this.stamper.stamp(body);
|
|
2253
|
+
return {
|
|
2254
|
+
body: body,
|
|
2255
|
+
stamp: stamp,
|
|
2256
|
+
url: fullUrl,
|
|
2257
|
+
};
|
|
2258
|
+
};
|
|
1984
2259
|
/**
|
|
1985
2260
|
* Submit a transaction intent describing an EVM transaction you would like to broadcast.
|
|
1986
2261
|
*
|
|
@@ -2456,6 +2731,31 @@ class TurnkeyClient {
|
|
|
2456
2731
|
url: fullUrl,
|
|
2457
2732
|
};
|
|
2458
2733
|
};
|
|
2734
|
+
/**
|
|
2735
|
+
* Delete IP allowlist and all associated rules for organization or API key. After removal, access will be determined by organization-level allowlist (for API keys) or allowed from all IPs (for organizations).
|
|
2736
|
+
*
|
|
2737
|
+
* Sign the provided `TRemoveIpAllowlistBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/remove_ip_allowlist).
|
|
2738
|
+
*
|
|
2739
|
+
* See also {@link stampRemoveIpAllowlist}.
|
|
2740
|
+
*/
|
|
2741
|
+
this.removeIpAllowlist = async (input) => {
|
|
2742
|
+
return this.request("/public/v1/submit/remove_ip_allowlist", input);
|
|
2743
|
+
};
|
|
2744
|
+
/**
|
|
2745
|
+
* Produce a `SignedRequest` from `TRemoveIpAllowlistBody` by using the client's `stamp` function.
|
|
2746
|
+
*
|
|
2747
|
+
* See also {@link RemoveIpAllowlist}.
|
|
2748
|
+
*/
|
|
2749
|
+
this.stampRemoveIpAllowlist = async (input) => {
|
|
2750
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/remove_ip_allowlist";
|
|
2751
|
+
const body = JSON.stringify(input);
|
|
2752
|
+
const stamp = await this.stamper.stamp(body);
|
|
2753
|
+
return {
|
|
2754
|
+
body: body,
|
|
2755
|
+
stamp: stamp,
|
|
2756
|
+
url: fullUrl,
|
|
2757
|
+
};
|
|
2758
|
+
};
|
|
2459
2759
|
/**
|
|
2460
2760
|
* Remove an organization feature. This activity must be approved by the current root quorum.
|
|
2461
2761
|
*
|
|
@@ -2481,6 +2781,31 @@ class TurnkeyClient {
|
|
|
2481
2781
|
url: fullUrl,
|
|
2482
2782
|
};
|
|
2483
2783
|
};
|
|
2784
|
+
/**
|
|
2785
|
+
* Create or update IP allowlist and rules for organization or API key. The IP allowlist restricts API access to specific CIDR blocks. Organization-level allowlists apply to all API keys unless overridden by a key-specific allowlist.
|
|
2786
|
+
*
|
|
2787
|
+
* Sign the provided `TSetIpAllowlistBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/set_ip_allowlist).
|
|
2788
|
+
*
|
|
2789
|
+
* See also {@link stampSetIpAllowlist}.
|
|
2790
|
+
*/
|
|
2791
|
+
this.setIpAllowlist = async (input) => {
|
|
2792
|
+
return this.request("/public/v1/submit/set_ip_allowlist", input);
|
|
2793
|
+
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Produce a `SignedRequest` from `TSetIpAllowlistBody` by using the client's `stamp` function.
|
|
2796
|
+
*
|
|
2797
|
+
* See also {@link SetIpAllowlist}.
|
|
2798
|
+
*/
|
|
2799
|
+
this.stampSetIpAllowlist = async (input) => {
|
|
2800
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/set_ip_allowlist";
|
|
2801
|
+
const body = JSON.stringify(input);
|
|
2802
|
+
const stamp = await this.stamper.stamp(body);
|
|
2803
|
+
return {
|
|
2804
|
+
body: body,
|
|
2805
|
+
stamp: stamp,
|
|
2806
|
+
url: fullUrl,
|
|
2807
|
+
};
|
|
2808
|
+
};
|
|
2484
2809
|
/**
|
|
2485
2810
|
* Set an organization feature. This activity must be approved by the current root quorum.
|
|
2486
2811
|
*
|
|
@@ -2981,6 +3306,56 @@ class TurnkeyClient {
|
|
|
2981
3306
|
url: fullUrl,
|
|
2982
3307
|
};
|
|
2983
3308
|
};
|
|
3309
|
+
/**
|
|
3310
|
+
* Refresh feature flags by triggering a DB read to flush the in-memory cache.
|
|
3311
|
+
*
|
|
3312
|
+
* Sign the provided `TRefreshFeatureFlagsBody` with the client's `stamp` function, and submit the request (POST /tkhq/api/v1/refresh_feature_flags).
|
|
3313
|
+
*
|
|
3314
|
+
* See also {@link stampRefreshFeatureFlags}.
|
|
3315
|
+
*/
|
|
3316
|
+
this.refreshFeatureFlags = async (input) => {
|
|
3317
|
+
return this.request("/tkhq/api/v1/refresh_feature_flags", input);
|
|
3318
|
+
};
|
|
3319
|
+
/**
|
|
3320
|
+
* Produce a `SignedRequest` from `TRefreshFeatureFlagsBody` by using the client's `stamp` function.
|
|
3321
|
+
*
|
|
3322
|
+
* See also {@link RefreshFeatureFlags}.
|
|
3323
|
+
*/
|
|
3324
|
+
this.stampRefreshFeatureFlags = async (input) => {
|
|
3325
|
+
const fullUrl = this.config.baseUrl + "/tkhq/api/v1/refresh_feature_flags";
|
|
3326
|
+
const body = JSON.stringify(input);
|
|
3327
|
+
const stamp = await this.stamper.stamp(body);
|
|
3328
|
+
return {
|
|
3329
|
+
body: body,
|
|
3330
|
+
stamp: stamp,
|
|
3331
|
+
url: fullUrl,
|
|
3332
|
+
};
|
|
3333
|
+
};
|
|
3334
|
+
/**
|
|
3335
|
+
* Set a rate local rate limit just on the current endpoint, for purposes of testing with Vivosuite.
|
|
3336
|
+
*
|
|
3337
|
+
* Sign the provided `TTestRateLimitsBody` with the client's `stamp` function, and submit the request (POST /tkhq/api/v1/test_rate_limits).
|
|
3338
|
+
*
|
|
3339
|
+
* See also {@link stampTestRateLimits}.
|
|
3340
|
+
*/
|
|
3341
|
+
this.testRateLimits = async (input) => {
|
|
3342
|
+
return this.request("/tkhq/api/v1/test_rate_limits", input);
|
|
3343
|
+
};
|
|
3344
|
+
/**
|
|
3345
|
+
* Produce a `SignedRequest` from `TTestRateLimitsBody` by using the client's `stamp` function.
|
|
3346
|
+
*
|
|
3347
|
+
* See also {@link TestRateLimits}.
|
|
3348
|
+
*/
|
|
3349
|
+
this.stampTestRateLimits = async (input) => {
|
|
3350
|
+
const fullUrl = this.config.baseUrl + "/tkhq/api/v1/test_rate_limits";
|
|
3351
|
+
const body = JSON.stringify(input);
|
|
3352
|
+
const stamp = await this.stamper.stamp(body);
|
|
3353
|
+
return {
|
|
3354
|
+
body: body,
|
|
3355
|
+
stamp: stamp,
|
|
3356
|
+
url: fullUrl,
|
|
3357
|
+
};
|
|
3358
|
+
};
|
|
2984
3359
|
if (!config.baseUrl) {
|
|
2985
3360
|
throw new Error(`Missing base URL. Please verify env vars.`);
|
|
2986
3361
|
}
|