@dfns/sdk 0.2.3-rc.1 → 0.2.4
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/baseAuthApi.d.ts +113 -0
- package/baseAuthApi.js +97 -0
- package/codegen/Assets/AssetsClient.d.ts +13 -0
- package/codegen/Assets/AssetsClient.js +93 -0
- package/codegen/Assets/DelegatedAssetsClient.d.ts +16 -0
- package/codegen/Assets/DelegatedAssetsClient.js +124 -0
- package/codegen/Assets/index.d.ts +3 -0
- package/codegen/Assets/index.js +19 -0
- package/codegen/Assets/types.d.ts +37 -0
- package/codegen/Assets/types.js +2 -0
- package/codegen/Auth/AuthClient.d.ts +50 -0
- package/codegen/Auth/AuthClient.js +518 -0
- package/codegen/Auth/DelegatedAuthClient.d.ts +78 -0
- package/codegen/Auth/DelegatedAuthClient.js +936 -0
- package/codegen/Auth/index.d.ts +3 -0
- package/codegen/Auth/index.js +19 -0
- package/codegen/Auth/types.d.ts +177 -0
- package/codegen/Auth/types.js +2 -0
- package/codegen/Blockchains/BlockchainsClient.d.ts +7 -0
- package/codegen/Blockchains/BlockchainsClient.js +23 -0
- package/codegen/Blockchains/DelegatedBlockchainsClient.d.ts +7 -0
- package/codegen/Blockchains/DelegatedBlockchainsClient.js +23 -0
- package/codegen/Blockchains/index.d.ts +3 -0
- package/codegen/Blockchains/index.js +19 -0
- package/codegen/Blockchains/types.d.ts +6 -0
- package/codegen/Blockchains/types.js +2 -0
- package/codegen/Callbacks/CallbacksClient.d.ts +12 -0
- package/codegen/Callbacks/CallbacksClient.js +78 -0
- package/codegen/Callbacks/DelegatedCallbacksClient.d.ts +15 -0
- package/codegen/Callbacks/DelegatedCallbacksClient.js +110 -0
- package/codegen/Callbacks/index.d.ts +3 -0
- package/codegen/Callbacks/index.js +19 -0
- package/codegen/Callbacks/{types.ts → types.d.ts} +18 -26
- package/codegen/Callbacks/types.js +2 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +11 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +61 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.js +45 -0
- package/codegen/PolicyExecution/index.d.ts +3 -0
- package/codegen/PolicyExecution/index.js +19 -0
- package/codegen/PolicyExecution/types.d.ts +18 -0
- package/codegen/PolicyExecution/types.js +2 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +25 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +240 -0
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +18 -0
- package/codegen/PolicyManagement/PolicyManagementClient.js +146 -0
- package/codegen/PolicyManagement/index.d.ts +3 -0
- package/codegen/PolicyManagement/index.js +19 -0
- package/codegen/PolicyManagement/{types.ts → types.d.ts} +40 -56
- package/codegen/PolicyManagement/types.js +2 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.js +189 -0
- package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
- package/codegen/PublicKeys/PublicKeysClient.js +128 -0
- package/codegen/PublicKeys/index.d.ts +3 -0
- package/codegen/PublicKeys/index.js +19 -0
- package/codegen/PublicKeys/types.d.ts +51 -0
- package/codegen/PublicKeys/types.js +2 -0
- package/codegen/Signers/DelegatedSignersClient.d.ts +7 -0
- package/codegen/Signers/DelegatedSignersClient.js +22 -0
- package/codegen/Signers/SignersClient.d.ts +7 -0
- package/codegen/Signers/SignersClient.js +22 -0
- package/codegen/Signers/index.d.ts +3 -0
- package/codegen/Signers/index.js +19 -0
- package/codegen/Signers/types.d.ts +2 -0
- package/codegen/Signers/types.js +2 -0
- package/codegen/Wallets/DelegatedWalletsClient.d.ts +32 -0
- package/codegen/Wallets/DelegatedWalletsClient.js +325 -0
- package/codegen/Wallets/WalletsClient.d.ts +24 -0
- package/codegen/Wallets/WalletsClient.js +219 -0
- package/codegen/Wallets/index.d.ts +3 -0
- package/codegen/Wallets/index.js +19 -0
- package/codegen/Wallets/types.d.ts +101 -0
- package/codegen/Wallets/types.js +2 -0
- package/codegen/datamodel/ApiKeys/errors.d.ts +6 -0
- package/codegen/datamodel/ApiKeys/errors.js +15 -0
- package/codegen/datamodel/ApiKeys/index.d.ts +3 -0
- package/codegen/datamodel/ApiKeys/index.js +19 -0
- package/codegen/datamodel/ApiKeys/responses.d.ts +25 -0
- package/codegen/datamodel/ApiKeys/responses.js +2 -0
- package/codegen/datamodel/ApiKeys/types.d.ts +32 -0
- package/codegen/datamodel/ApiKeys/types.js +11 -0
- package/codegen/datamodel/Assets/errors.d.ts +11 -0
- package/codegen/datamodel/Assets/errors.js +17 -0
- package/codegen/datamodel/Assets/index.d.ts +3 -0
- package/codegen/datamodel/Assets/index.js +19 -0
- package/codegen/datamodel/Assets/responses.d.ts +47 -0
- package/codegen/datamodel/Assets/responses.js +2 -0
- package/codegen/datamodel/Assets/types.d.ts +225 -0
- package/codegen/datamodel/Assets/types.js +75 -0
- package/codegen/datamodel/Auth/errors.js +1 -0
- package/codegen/datamodel/Auth/index.d.ts +2 -0
- package/codegen/datamodel/Auth/index.js +18 -0
- package/codegen/datamodel/Auth/responses.d.ts +358 -0
- package/codegen/datamodel/Auth/responses.js +2 -0
- package/codegen/datamodel/Auth/types.d.ts +615 -0
- package/codegen/datamodel/Auth/types.js +127 -0
- package/codegen/datamodel/BlockchainIndexing/errors.js +1 -0
- package/codegen/datamodel/BlockchainIndexing/index.d.ts +1 -0
- package/codegen/datamodel/BlockchainIndexing/index.js +17 -0
- package/codegen/datamodel/BlockchainIndexing/{responses.ts → responses.d.ts} +5 -10
- package/codegen/datamodel/BlockchainIndexing/responses.js +2 -0
- package/codegen/datamodel/BlockchainIndexing/types.js +1 -0
- package/codegen/datamodel/Blockchains/errors.js +1 -0
- package/codegen/datamodel/Blockchains/index.d.ts +2 -0
- package/codegen/datamodel/Blockchains/index.js +18 -0
- package/codegen/datamodel/Blockchains/responses.d.ts +12 -0
- package/codegen/datamodel/Blockchains/responses.js +2 -0
- package/codegen/datamodel/Blockchains/types.d.ts +270 -0
- package/codegen/datamodel/Blockchains/types.js +53 -0
- package/codegen/datamodel/Callbacks/errors.js +1 -0
- package/codegen/datamodel/Callbacks/index.d.ts +2 -0
- package/codegen/datamodel/Callbacks/index.js +18 -0
- package/codegen/datamodel/Callbacks/responses.d.ts +36 -0
- package/codegen/datamodel/Callbacks/responses.js +2 -0
- package/codegen/datamodel/Callbacks/types.d.ts +43 -0
- package/codegen/datamodel/Callbacks/types.js +39 -0
- package/codegen/datamodel/Foundations/errors.d.ts +131 -0
- package/codegen/datamodel/Foundations/errors.js +182 -0
- package/codegen/datamodel/Foundations/index.d.ts +2 -0
- package/codegen/datamodel/Foundations/index.js +18 -0
- package/codegen/datamodel/Foundations/responses.js +1 -0
- package/codegen/datamodel/Foundations/types.d.ts +9759 -0
- package/codegen/datamodel/Foundations/types.js +57755 -0
- package/codegen/datamodel/Orgs/errors.js +1 -0
- package/codegen/datamodel/Orgs/index.d.ts +2 -0
- package/codegen/datamodel/Orgs/index.js +18 -0
- package/codegen/datamodel/Orgs/responses.d.ts +45 -0
- package/codegen/datamodel/Orgs/responses.js +2 -0
- package/codegen/datamodel/Orgs/types.d.ts +240 -0
- package/codegen/datamodel/Orgs/types.js +39 -0
- package/codegen/datamodel/Permissions/errors.js +1 -0
- package/codegen/datamodel/Permissions/index.d.ts +2 -0
- package/codegen/datamodel/Permissions/index.js +18 -0
- package/codegen/datamodel/Permissions/responses.d.ts +75 -0
- package/codegen/datamodel/Permissions/responses.js +2 -0
- package/codegen/datamodel/Permissions/types.d.ts +93 -0
- package/codegen/datamodel/Permissions/types.js +43 -0
- package/codegen/datamodel/PolicyExecution/errors.d.ts +11 -0
- package/codegen/datamodel/PolicyExecution/errors.js +17 -0
- package/codegen/datamodel/PolicyExecution/index.d.ts +3 -0
- package/codegen/datamodel/PolicyExecution/index.js +19 -0
- package/codegen/datamodel/PolicyExecution/responses.d.ts +19 -0
- package/codegen/datamodel/PolicyExecution/responses.js +2 -0
- package/codegen/datamodel/PolicyExecution/types.d.ts +60 -0
- package/codegen/datamodel/PolicyExecution/types.js +17 -0
- package/codegen/datamodel/PolicyManagement/errors.js +1 -0
- package/codegen/datamodel/PolicyManagement/index.d.ts +2 -0
- package/codegen/datamodel/PolicyManagement/index.js +18 -0
- package/codegen/datamodel/PolicyManagement/responses.d.ts +83 -0
- package/codegen/datamodel/PolicyManagement/responses.js +2 -0
- package/codegen/datamodel/PolicyManagement/types.d.ts +391 -0
- package/codegen/datamodel/PolicyManagement/types.js +95 -0
- package/codegen/datamodel/PublicKeys/errors.js +1 -0
- package/codegen/datamodel/PublicKeys/index.d.ts +2 -0
- package/codegen/datamodel/PublicKeys/index.js +18 -0
- package/codegen/datamodel/PublicKeys/responses.d.ts +56 -0
- package/codegen/datamodel/PublicKeys/responses.js +2 -0
- package/codegen/datamodel/PublicKeys/types.d.ts +223 -0
- package/codegen/datamodel/PublicKeys/types.js +59 -0
- package/codegen/datamodel/Signers/errors.js +1 -0
- package/codegen/datamodel/Signers/index.d.ts +2 -0
- package/codegen/datamodel/Signers/index.js +18 -0
- package/codegen/datamodel/Signers/responses.d.ts +27 -0
- package/codegen/datamodel/Signers/responses.js +2 -0
- package/codegen/datamodel/Signers/types.d.ts +21 -0
- package/codegen/datamodel/Signers/types.js +2 -0
- package/codegen/datamodel/Wallets/errors.js +1 -0
- package/codegen/datamodel/Wallets/index.d.ts +2 -0
- package/codegen/datamodel/Wallets/index.js +18 -0
- package/codegen/datamodel/Wallets/responses.d.ts +92 -0
- package/codegen/datamodel/Wallets/responses.js +2 -0
- package/codegen/datamodel/Wallets/types.d.ts +677 -0
- package/codegen/datamodel/Wallets/types.js +251 -0
- package/dfnsApiClient.d.ts +39 -0
- package/dfnsApiClient.js +63 -0
- package/dfnsAuthenticator.d.ts +17 -0
- package/dfnsAuthenticator.js +29 -0
- package/dfnsDelegatedApiClient.d.ts +38 -0
- package/dfnsDelegatedApiClient.js +63 -0
- package/dfnsError.d.ts +5 -0
- package/dfnsError.js +11 -0
- package/generated/permissions/client.d.ts +14 -0
- package/generated/permissions/client.js +104 -0
- package/generated/permissions/delegatedClient.d.ts +20 -0
- package/generated/permissions/delegatedClient.js +180 -0
- package/generated/permissions/index.d.ts +3 -0
- package/generated/permissions/index.js +19 -0
- package/generated/permissions/types.d.ts +225 -0
- package/generated/permissions/types.js +2 -0
- package/generated/policies/client.d.ts +13 -0
- package/generated/policies/client.js +92 -0
- package/generated/policies/delegatedClient.d.ts +18 -0
- package/generated/policies/delegatedClient.js +153 -0
- package/generated/policies/index.d.ts +3 -0
- package/generated/policies/index.js +19 -0
- package/generated/policies/{types.ts → types.d.ts} +409 -39
- package/generated/policies/types.js +2 -0
- package/generated/signers/client.d.ts +7 -0
- package/generated/signers/client.js +22 -0
- package/generated/signers/delegatedClient.d.ts +7 -0
- package/generated/signers/delegatedClient.js +22 -0
- package/generated/signers/index.d.ts +3 -0
- package/generated/signers/index.js +19 -0
- package/generated/signers/{types.ts → types.d.ts} +0 -1
- package/generated/signers/types.js +2 -0
- package/generated/wallets/client.d.ts +25 -0
- package/generated/wallets/client.js +228 -0
- package/generated/wallets/delegatedClient.d.ts +34 -0
- package/generated/wallets/delegatedClient.js +349 -0
- package/generated/wallets/index.d.ts +3 -0
- package/generated/wallets/index.js +19 -0
- package/generated/wallets/{types.ts → types.d.ts} +68 -109
- package/generated/wallets/types.js +2 -0
- package/generated/webhooks/client.d.ts +14 -0
- package/generated/webhooks/client.js +103 -0
- package/generated/webhooks/delegatedClient.d.ts +19 -0
- package/generated/webhooks/delegatedClient.js +164 -0
- package/generated/webhooks/index.d.ts +3 -0
- package/generated/webhooks/index.js +19 -0
- package/generated/webhooks/{types.ts → types.d.ts} +16 -34
- package/generated/webhooks/types.js +2 -0
- package/index.d.ts +7 -0
- package/index.js +23 -0
- package/package.json +8 -1
- package/signer.d.ts +52 -0
- package/signer.js +2 -0
- package/store.d.ts +79 -0
- package/store.js +2 -0
- package/types/policies.d.ts +1 -0
- package/types/policies.js +17 -0
- package/types/signers.d.ts +1 -0
- package/types/signers.js +17 -0
- package/types/wallets.d.ts +1 -0
- package/types/wallets.js +17 -0
- package/types/webhooks.d.ts +1 -0
- package/types/webhooks.js +17 -0
- package/utils/base64.d.ts +3 -0
- package/utils/base64.js +20 -0
- package/utils/fetch.d.ts +12 -0
- package/utils/fetch.js +94 -0
- package/utils/index.d.ts +4 -0
- package/utils/index.js +20 -0
- package/utils/nonce.d.ts +1 -0
- package/utils/nonce.js +12 -0
- package/utils/url.d.ts +4 -0
- package/utils/url.js +16 -0
- package/baseAuthApi.ts +0 -236
- package/codegen/Assets/AssetsClient.ts +0 -137
- package/codegen/Assets/DelegatedAssetsClient.ts +0 -201
- package/codegen/Assets/index.ts +0 -3
- package/codegen/Assets/types.ts +0 -45
- package/codegen/Auth/AuthClient.ts +0 -729
- package/codegen/Auth/DelegatedAuthClient.ts +0 -1508
- package/codegen/Auth/index.ts +0 -3
- package/codegen/Auth/types.ts +0 -262
- package/codegen/Blockchains/BlockchainsClient.ts +0 -25
- package/codegen/Blockchains/DelegatedBlockchainsClient.ts +0 -25
- package/codegen/Blockchains/index.ts +0 -3
- package/codegen/Blockchains/types.ts +0 -8
- package/codegen/Callbacks/CallbacksClient.ts +0 -107
- package/codegen/Callbacks/DelegatedCallbacksClient.ts +0 -172
- package/codegen/Callbacks/index.ts +0 -3
- package/codegen/Permissions/DelegatedPermissionsClient.ts +0 -468
- package/codegen/Permissions/PermissionsClient.ts +0 -223
- package/codegen/Permissions/index.ts +0 -3
- package/codegen/Permissions/types.ts +0 -82
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.ts +0 -99
- package/codegen/PolicyExecution/PolicyExecutionClient.ts +0 -63
- package/codegen/PolicyExecution/index.ts +0 -3
- package/codegen/PolicyExecution/types.ts +0 -24
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.ts +0 -384
- package/codegen/PolicyManagement/PolicyManagementClient.ts +0 -205
- package/codegen/PolicyManagement/index.ts +0 -3
- package/codegen/PublicKeys/DelegatedPublicKeysClient.ts +0 -299
- package/codegen/PublicKeys/PublicKeysClient.ts +0 -179
- package/codegen/PublicKeys/index.ts +0 -3
- package/codegen/PublicKeys/types.ts +0 -68
- package/codegen/Signers/DelegatedSignersClient.ts +0 -22
- package/codegen/Signers/SignersClient.ts +0 -22
- package/codegen/Signers/index.ts +0 -3
- package/codegen/Signers/types.ts +0 -3
- package/codegen/Wallets/DelegatedWalletsClient.ts +0 -511
- package/codegen/Wallets/WalletsClient.ts +0 -310
- package/codegen/Wallets/index.ts +0 -3
- package/codegen/Wallets/types.ts +0 -137
- package/codegen/datamodel/ApiKeys/errors.ts +0 -9
- package/codegen/datamodel/ApiKeys/index.ts +0 -3
- package/codegen/datamodel/ApiKeys/responses.ts +0 -68
- package/codegen/datamodel/ApiKeys/types.ts +0 -81
- package/codegen/datamodel/Assets/errors.ts +0 -24
- package/codegen/datamodel/Assets/index.ts +0 -3
- package/codegen/datamodel/Assets/responses.ts +0 -146
- package/codegen/datamodel/Assets/types.ts +0 -417
- package/codegen/datamodel/Auth/index.ts +0 -2
- package/codegen/datamodel/Auth/responses.ts +0 -1110
- package/codegen/datamodel/Auth/types.ts +0 -1404
- package/codegen/datamodel/BlockchainIndexing/index.ts +0 -1
- package/codegen/datamodel/Blockchains/index.ts +0 -2
- package/codegen/datamodel/Blockchains/responses.ts +0 -41
- package/codegen/datamodel/Blockchains/types.ts +0 -695
- package/codegen/datamodel/Callbacks/index.ts +0 -2
- package/codegen/datamodel/Callbacks/responses.ts +0 -110
- package/codegen/datamodel/Callbacks/types.ts +0 -100
- package/codegen/datamodel/Foundations/errors.ts +0 -299
- package/codegen/datamodel/Foundations/index.ts +0 -2
- package/codegen/datamodel/Foundations/types.ts +0 -57921
- package/codegen/datamodel/Orgs/index.ts +0 -2
- package/codegen/datamodel/Orgs/responses.ts +0 -104
- package/codegen/datamodel/Orgs/types.ts +0 -322
- package/codegen/datamodel/Permissions/index.ts +0 -2
- package/codegen/datamodel/Permissions/responses.ts +0 -258
- package/codegen/datamodel/Permissions/types.ts +0 -221
- package/codegen/datamodel/PolicyExecution/errors.ts +0 -24
- package/codegen/datamodel/PolicyExecution/index.ts +0 -3
- package/codegen/datamodel/PolicyExecution/responses.ts +0 -59
- package/codegen/datamodel/PolicyExecution/types.ts +0 -122
- package/codegen/datamodel/PolicyManagement/index.ts +0 -2
- package/codegen/datamodel/PolicyManagement/responses.ts +0 -255
- package/codegen/datamodel/PolicyManagement/types.ts +0 -711
- package/codegen/datamodel/PublicKeys/index.ts +0 -2
- package/codegen/datamodel/PublicKeys/responses.ts +0 -190
- package/codegen/datamodel/PublicKeys/types.ts +0 -558
- package/codegen/datamodel/Signers/index.ts +0 -2
- package/codegen/datamodel/Signers/responses.ts +0 -64
- package/codegen/datamodel/Signers/types.ts +0 -31
- package/codegen/datamodel/Wallets/errors.ts +0 -0
- package/codegen/datamodel/Wallets/index.ts +0 -2
- package/codegen/datamodel/Wallets/responses.ts +0 -318
- package/codegen/datamodel/Wallets/types.ts +0 -1268
- package/dfnsApiClient.ts +0 -76
- package/dfnsAuthenticator.ts +0 -59
- package/dfnsDelegatedApiClient.ts +0 -75
- package/dfnsError.ts +0 -5
- package/generated/permissions/client.ts +0 -125
- package/generated/permissions/delegatedClient.ts +0 -266
- package/generated/permissions/index.ts +0 -3
- package/generated/permissions/types.ts +0 -202
- package/generated/policies/client.ts +0 -110
- package/generated/policies/delegatedClient.ts +0 -223
- package/generated/policies/index.ts +0 -3
- package/generated/signers/client.ts +0 -22
- package/generated/signers/delegatedClient.ts +0 -23
- package/generated/signers/index.ts +0 -3
- package/generated/wallets/client.ts +0 -282
- package/generated/wallets/delegatedClient.ts +0 -507
- package/generated/wallets/index.ts +0 -3
- package/generated/webhooks/client.ts +0 -124
- package/generated/webhooks/delegatedClient.ts +0 -237
- package/generated/webhooks/index.ts +0 -3
- package/index.ts +0 -7
- package/project.json +0 -14
- package/signer.ts +0 -60
- package/store.ts +0 -99
- package/tsconfig.json +0 -7
- package/typedoc.json +0 -21
- package/types/policies.ts +0 -1
- package/types/signers.ts +0 -1
- package/types/wallets.ts +0 -1
- package/types/webhooks.ts +0 -1
- package/utils/base64.ts +0 -19
- package/utils/fetch.ts +0 -130
- package/utils/index.ts +0 -4
- package/utils/nonce.ts +0 -12
- package/utils/url.ts +0 -19
- /package/{README.md → codegen/datamodel/Auth/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Auth/errors.ts → BlockchainIndexing/errors.d.ts} +0 -0
- /package/codegen/datamodel/BlockchainIndexing/{errors.ts → types.d.ts} +0 -0
- /package/codegen/datamodel/{BlockchainIndexing/types.ts → Blockchains/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Blockchains/errors.ts → Callbacks/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Callbacks/errors.ts → Foundations/responses.d.ts} +0 -0
- /package/codegen/datamodel/{Foundations/responses.ts → Orgs/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Orgs/errors.ts → Permissions/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Permissions/errors.ts → PolicyManagement/errors.d.ts} +0 -0
- /package/codegen/datamodel/{PolicyManagement/errors.ts → PublicKeys/errors.d.ts} +0 -0
- /package/codegen/datamodel/{PublicKeys/errors.ts → Signers/errors.d.ts} +0 -0
- /package/codegen/datamodel/{Signers/errors.ts → Wallets/errors.d.ts} +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedPolicyExecutionClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedPolicyExecutionClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async listPolicyControlExecutions(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-control-executions', {
|
|
13
|
+
path: {},
|
|
14
|
+
query: request.query ?? {},
|
|
15
|
+
});
|
|
16
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
17
|
+
method: 'GET',
|
|
18
|
+
apiOptions: this.apiOptions,
|
|
19
|
+
});
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async getPolicyControlExecutionById(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-control-executions/:policyControlExecutionId', {
|
|
24
|
+
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
25
|
+
query: {},
|
|
26
|
+
});
|
|
27
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
28
|
+
method: 'GET',
|
|
29
|
+
apiOptions: this.apiOptions,
|
|
30
|
+
});
|
|
31
|
+
return response.json();
|
|
32
|
+
}
|
|
33
|
+
async updatePolicyControlExecutionInit(request) {
|
|
34
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-control-executions/:policyControlExecutionId', {
|
|
35
|
+
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
36
|
+
query: {},
|
|
37
|
+
});
|
|
38
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
39
|
+
userActionHttpMethod: 'PUT',
|
|
40
|
+
userActionHttpPath: path,
|
|
41
|
+
userActionPayload: JSON.stringify(request.body),
|
|
42
|
+
userActionServerKind: 'Api',
|
|
43
|
+
}, this.apiOptions);
|
|
44
|
+
return challenge;
|
|
45
|
+
}
|
|
46
|
+
async updatePolicyControlExecutionComplete(request, signedChallenge) {
|
|
47
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-control-executions/:policyControlExecutionId', {
|
|
48
|
+
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
49
|
+
query: {},
|
|
50
|
+
});
|
|
51
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
52
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
53
|
+
method: 'PUT',
|
|
54
|
+
body: request.body,
|
|
55
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
56
|
+
apiOptions: this.apiOptions,
|
|
57
|
+
});
|
|
58
|
+
return response.json();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.DelegatedPolicyExecutionClient = DelegatedPolicyExecutionClient;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class PolicyExecutionClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
listPolicyControlExecutions(request: T.ListPolicyControlExecutionsRequest): Promise<T.ListPolicyControlExecutionsResponse>;
|
|
7
|
+
getPolicyControlExecutionById(request: T.GetPolicyControlExecutionByIdRequest): Promise<T.GetPolicyControlExecutionByIdResponse>;
|
|
8
|
+
updatePolicyControlExecution(request: T.UpdatePolicyControlExecutionRequest): Promise<T.UpdatePolicyControlExecutionResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolicyExecutionClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class PolicyExecutionClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async listPolicyControlExecutions(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-control-executions', {
|
|
12
|
+
path: {},
|
|
13
|
+
query: request.query ?? {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
16
|
+
method: 'GET',
|
|
17
|
+
apiOptions: this.apiOptions,
|
|
18
|
+
});
|
|
19
|
+
return response.json();
|
|
20
|
+
}
|
|
21
|
+
async getPolicyControlExecutionById(request) {
|
|
22
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-control-executions/:policyControlExecutionId', {
|
|
23
|
+
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
24
|
+
query: {},
|
|
25
|
+
});
|
|
26
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
27
|
+
method: 'GET',
|
|
28
|
+
apiOptions: this.apiOptions,
|
|
29
|
+
});
|
|
30
|
+
return response.json();
|
|
31
|
+
}
|
|
32
|
+
async updatePolicyControlExecution(request) {
|
|
33
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-control-executions/:policyControlExecutionId', {
|
|
34
|
+
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
35
|
+
query: {},
|
|
36
|
+
});
|
|
37
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
38
|
+
method: 'PUT',
|
|
39
|
+
body: request.body,
|
|
40
|
+
apiOptions: this.apiOptions,
|
|
41
|
+
});
|
|
42
|
+
return response.json();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.PolicyExecutionClient = PolicyExecutionClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DelegatedPolicyExecutionClient"), exports);
|
|
18
|
+
__exportStar(require("./PolicyExecutionClient"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as PolicyExecution from '../datamodel/PolicyExecution';
|
|
2
|
+
export type ListPolicyControlExecutionsRequest = {
|
|
3
|
+
query?: {
|
|
4
|
+
activityId: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export type ListPolicyControlExecutionsResponse = {
|
|
8
|
+
items: PolicyExecution.PolicyControlExecution[];
|
|
9
|
+
};
|
|
10
|
+
export type GetPolicyControlExecutionByIdRequest = {
|
|
11
|
+
policyControlExecutionId: string;
|
|
12
|
+
};
|
|
13
|
+
export type GetPolicyControlExecutionByIdResponse = PolicyExecution.PolicyControlExecution;
|
|
14
|
+
export type UpdatePolicyControlExecutionRequest = {
|
|
15
|
+
policyControlExecutionId: string;
|
|
16
|
+
body: PolicyExecution.UpdatePolicyControlExecutionInput;
|
|
17
|
+
};
|
|
18
|
+
export type UpdatePolicyControlExecutionResponse = PolicyExecution.PolicyControlExecution;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedPolicyManagementClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
createPolicyInit(request: T.CreatePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
createPolicyComplete(request: T.CreatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyResponse>;
|
|
9
|
+
getPolicyById(request: T.GetPolicyByIdRequest): Promise<T.GetPolicyByIdResponse>;
|
|
10
|
+
listPolicies(): Promise<T.ListPoliciesResponse>;
|
|
11
|
+
archivePolicyInit(request: T.ArchivePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
12
|
+
archivePolicyComplete(request: T.ArchivePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyResponse>;
|
|
13
|
+
createPolicyControlInit(request: T.CreatePolicyControlRequest): Promise<UserActionChallengeResponse>;
|
|
14
|
+
createPolicyControlComplete(request: T.CreatePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyControlResponse>;
|
|
15
|
+
getPolicyControlById(request: T.GetPolicyControlByIdRequest): Promise<T.GetPolicyControlByIdResponse>;
|
|
16
|
+
listPolicyControls(): Promise<T.ListPolicyControlsResponse>;
|
|
17
|
+
archivePolicyControlInit(request: T.ArchivePolicyControlRequest): Promise<UserActionChallengeResponse>;
|
|
18
|
+
archivePolicyControlComplete(request: T.ArchivePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyControlResponse>;
|
|
19
|
+
createPolicyRuleInit(request: T.CreatePolicyRuleRequest): Promise<UserActionChallengeResponse>;
|
|
20
|
+
createPolicyRuleComplete(request: T.CreatePolicyRuleRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyRuleResponse>;
|
|
21
|
+
getPolicyRuleById(request: T.GetPolicyRuleByIdRequest): Promise<T.GetPolicyRuleByIdResponse>;
|
|
22
|
+
listPolicyRules(request: T.ListPolicyRulesRequest): Promise<T.ListPolicyRulesResponse>;
|
|
23
|
+
archivePolicyRuleInit(request: T.ArchivePolicyRuleRequest): Promise<UserActionChallengeResponse>;
|
|
24
|
+
archivePolicyRuleComplete(request: T.ArchivePolicyRuleRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyRuleResponse>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedPolicyManagementClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedPolicyManagementClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async createPolicyInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
13
|
+
path: {},
|
|
14
|
+
query: {},
|
|
15
|
+
});
|
|
16
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
17
|
+
userActionHttpMethod: 'POST',
|
|
18
|
+
userActionHttpPath: path,
|
|
19
|
+
userActionPayload: JSON.stringify(request.body),
|
|
20
|
+
userActionServerKind: 'Api',
|
|
21
|
+
}, this.apiOptions);
|
|
22
|
+
return challenge;
|
|
23
|
+
}
|
|
24
|
+
async createPolicyComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
26
|
+
path: {},
|
|
27
|
+
query: {},
|
|
28
|
+
});
|
|
29
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
30
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
body: request.body,
|
|
33
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
34
|
+
apiOptions: this.apiOptions,
|
|
35
|
+
});
|
|
36
|
+
return response.json();
|
|
37
|
+
}
|
|
38
|
+
async getPolicyById(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
40
|
+
path: { policyId: request.policyId },
|
|
41
|
+
query: {},
|
|
42
|
+
});
|
|
43
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
44
|
+
method: 'GET',
|
|
45
|
+
apiOptions: this.apiOptions,
|
|
46
|
+
});
|
|
47
|
+
return response.json();
|
|
48
|
+
}
|
|
49
|
+
async listPolicies() {
|
|
50
|
+
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
51
|
+
path: {},
|
|
52
|
+
query: {},
|
|
53
|
+
});
|
|
54
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
55
|
+
method: 'GET',
|
|
56
|
+
apiOptions: this.apiOptions,
|
|
57
|
+
});
|
|
58
|
+
return response.json();
|
|
59
|
+
}
|
|
60
|
+
async archivePolicyInit(request) {
|
|
61
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
62
|
+
path: { policyId: request.policyId },
|
|
63
|
+
query: {},
|
|
64
|
+
});
|
|
65
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
66
|
+
userActionHttpMethod: 'DELETE',
|
|
67
|
+
userActionHttpPath: path,
|
|
68
|
+
userActionPayload: JSON.stringify({}),
|
|
69
|
+
userActionServerKind: 'Api',
|
|
70
|
+
}, this.apiOptions);
|
|
71
|
+
return challenge;
|
|
72
|
+
}
|
|
73
|
+
async archivePolicyComplete(request, signedChallenge) {
|
|
74
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
75
|
+
path: { policyId: request.policyId },
|
|
76
|
+
query: {},
|
|
77
|
+
});
|
|
78
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
79
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
80
|
+
method: 'DELETE',
|
|
81
|
+
body: {},
|
|
82
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
83
|
+
apiOptions: this.apiOptions,
|
|
84
|
+
});
|
|
85
|
+
return response.json();
|
|
86
|
+
}
|
|
87
|
+
async createPolicyControlInit(request) {
|
|
88
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
89
|
+
path: {},
|
|
90
|
+
query: {},
|
|
91
|
+
});
|
|
92
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
93
|
+
userActionHttpMethod: 'POST',
|
|
94
|
+
userActionHttpPath: path,
|
|
95
|
+
userActionPayload: JSON.stringify(request.body),
|
|
96
|
+
userActionServerKind: 'Api',
|
|
97
|
+
}, this.apiOptions);
|
|
98
|
+
return challenge;
|
|
99
|
+
}
|
|
100
|
+
async createPolicyControlComplete(request, signedChallenge) {
|
|
101
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
102
|
+
path: {},
|
|
103
|
+
query: {},
|
|
104
|
+
});
|
|
105
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
106
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
107
|
+
method: 'POST',
|
|
108
|
+
body: request.body,
|
|
109
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
110
|
+
apiOptions: this.apiOptions,
|
|
111
|
+
});
|
|
112
|
+
return response.json();
|
|
113
|
+
}
|
|
114
|
+
async getPolicyControlById(request) {
|
|
115
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
116
|
+
path: { policyControlId: request.policyControlId },
|
|
117
|
+
query: {},
|
|
118
|
+
});
|
|
119
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
120
|
+
method: 'GET',
|
|
121
|
+
apiOptions: this.apiOptions,
|
|
122
|
+
});
|
|
123
|
+
return response.json();
|
|
124
|
+
}
|
|
125
|
+
async listPolicyControls() {
|
|
126
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
127
|
+
path: {},
|
|
128
|
+
query: {},
|
|
129
|
+
});
|
|
130
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
131
|
+
method: 'GET',
|
|
132
|
+
apiOptions: this.apiOptions,
|
|
133
|
+
});
|
|
134
|
+
return response.json();
|
|
135
|
+
}
|
|
136
|
+
async archivePolicyControlInit(request) {
|
|
137
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
138
|
+
path: { policyControlId: request.policyControlId },
|
|
139
|
+
query: {},
|
|
140
|
+
});
|
|
141
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
142
|
+
userActionHttpMethod: 'DELETE',
|
|
143
|
+
userActionHttpPath: path,
|
|
144
|
+
userActionPayload: JSON.stringify({}),
|
|
145
|
+
userActionServerKind: 'Api',
|
|
146
|
+
}, this.apiOptions);
|
|
147
|
+
return challenge;
|
|
148
|
+
}
|
|
149
|
+
async archivePolicyControlComplete(request, signedChallenge) {
|
|
150
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
151
|
+
path: { policyControlId: request.policyControlId },
|
|
152
|
+
query: {},
|
|
153
|
+
});
|
|
154
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
155
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
156
|
+
method: 'DELETE',
|
|
157
|
+
body: {},
|
|
158
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
159
|
+
apiOptions: this.apiOptions,
|
|
160
|
+
});
|
|
161
|
+
return response.json();
|
|
162
|
+
}
|
|
163
|
+
async createPolicyRuleInit(request) {
|
|
164
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules', {
|
|
165
|
+
path: {},
|
|
166
|
+
query: {},
|
|
167
|
+
});
|
|
168
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
169
|
+
userActionHttpMethod: 'POST',
|
|
170
|
+
userActionHttpPath: path,
|
|
171
|
+
userActionPayload: JSON.stringify(request.body),
|
|
172
|
+
userActionServerKind: 'Api',
|
|
173
|
+
}, this.apiOptions);
|
|
174
|
+
return challenge;
|
|
175
|
+
}
|
|
176
|
+
async createPolicyRuleComplete(request, signedChallenge) {
|
|
177
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules', {
|
|
178
|
+
path: {},
|
|
179
|
+
query: {},
|
|
180
|
+
});
|
|
181
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
182
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
183
|
+
method: 'POST',
|
|
184
|
+
body: request.body,
|
|
185
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
186
|
+
apiOptions: this.apiOptions,
|
|
187
|
+
});
|
|
188
|
+
return response.json();
|
|
189
|
+
}
|
|
190
|
+
async getPolicyRuleById(request) {
|
|
191
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
192
|
+
path: { policyRuleId: request.policyRuleId },
|
|
193
|
+
query: {},
|
|
194
|
+
});
|
|
195
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
196
|
+
method: 'GET',
|
|
197
|
+
apiOptions: this.apiOptions,
|
|
198
|
+
});
|
|
199
|
+
return response.json();
|
|
200
|
+
}
|
|
201
|
+
async listPolicyRules(request) {
|
|
202
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules', {
|
|
203
|
+
path: {},
|
|
204
|
+
query: request.query ?? {},
|
|
205
|
+
});
|
|
206
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
207
|
+
method: 'GET',
|
|
208
|
+
apiOptions: this.apiOptions,
|
|
209
|
+
});
|
|
210
|
+
return response.json();
|
|
211
|
+
}
|
|
212
|
+
async archivePolicyRuleInit(request) {
|
|
213
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
214
|
+
path: { policyRuleId: request.policyRuleId },
|
|
215
|
+
query: {},
|
|
216
|
+
});
|
|
217
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
218
|
+
userActionHttpMethod: 'DELETE',
|
|
219
|
+
userActionHttpPath: path,
|
|
220
|
+
userActionPayload: JSON.stringify({}),
|
|
221
|
+
userActionServerKind: 'Api',
|
|
222
|
+
}, this.apiOptions);
|
|
223
|
+
return challenge;
|
|
224
|
+
}
|
|
225
|
+
async archivePolicyRuleComplete(request, signedChallenge) {
|
|
226
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
227
|
+
path: { policyRuleId: request.policyRuleId },
|
|
228
|
+
query: {},
|
|
229
|
+
});
|
|
230
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
231
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
232
|
+
method: 'DELETE',
|
|
233
|
+
body: {},
|
|
234
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
235
|
+
apiOptions: this.apiOptions,
|
|
236
|
+
});
|
|
237
|
+
return response.json();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
exports.DelegatedPolicyManagementClient = DelegatedPolicyManagementClient;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class PolicyManagementClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
createPolicy(request: T.CreatePolicyRequest): Promise<T.CreatePolicyResponse>;
|
|
7
|
+
getPolicyById(request: T.GetPolicyByIdRequest): Promise<T.GetPolicyByIdResponse>;
|
|
8
|
+
listPolicies(): Promise<T.ListPoliciesResponse>;
|
|
9
|
+
archivePolicy(request: T.ArchivePolicyRequest): Promise<T.ArchivePolicyResponse>;
|
|
10
|
+
createPolicyControl(request: T.CreatePolicyControlRequest): Promise<T.CreatePolicyControlResponse>;
|
|
11
|
+
getPolicyControlById(request: T.GetPolicyControlByIdRequest): Promise<T.GetPolicyControlByIdResponse>;
|
|
12
|
+
listPolicyControls(): Promise<T.ListPolicyControlsResponse>;
|
|
13
|
+
archivePolicyControl(request: T.ArchivePolicyControlRequest): Promise<T.ArchivePolicyControlResponse>;
|
|
14
|
+
createPolicyRule(request: T.CreatePolicyRuleRequest): Promise<T.CreatePolicyRuleResponse>;
|
|
15
|
+
getPolicyRuleById(request: T.GetPolicyRuleByIdRequest): Promise<T.GetPolicyRuleByIdResponse>;
|
|
16
|
+
listPolicyRules(request: T.ListPolicyRulesRequest): Promise<T.ListPolicyRulesResponse>;
|
|
17
|
+
archivePolicyRule(request: T.ArchivePolicyRuleRequest): Promise<T.ArchivePolicyRuleResponse>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolicyManagementClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class PolicyManagementClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async createPolicy(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
12
|
+
path: {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: request.body,
|
|
18
|
+
apiOptions: this.apiOptions,
|
|
19
|
+
});
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async getPolicyById(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
24
|
+
path: { policyId: request.policyId },
|
|
25
|
+
query: {},
|
|
26
|
+
});
|
|
27
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
28
|
+
method: 'GET',
|
|
29
|
+
apiOptions: this.apiOptions,
|
|
30
|
+
});
|
|
31
|
+
return response.json();
|
|
32
|
+
}
|
|
33
|
+
async listPolicies() {
|
|
34
|
+
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
35
|
+
path: {},
|
|
36
|
+
query: {},
|
|
37
|
+
});
|
|
38
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
39
|
+
method: 'GET',
|
|
40
|
+
apiOptions: this.apiOptions,
|
|
41
|
+
});
|
|
42
|
+
return response.json();
|
|
43
|
+
}
|
|
44
|
+
async archivePolicy(request) {
|
|
45
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
46
|
+
path: { policyId: request.policyId },
|
|
47
|
+
query: {},
|
|
48
|
+
});
|
|
49
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
50
|
+
method: 'DELETE',
|
|
51
|
+
apiOptions: this.apiOptions,
|
|
52
|
+
});
|
|
53
|
+
return response.json();
|
|
54
|
+
}
|
|
55
|
+
async createPolicyControl(request) {
|
|
56
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
57
|
+
path: {},
|
|
58
|
+
query: {},
|
|
59
|
+
});
|
|
60
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
body: request.body,
|
|
63
|
+
apiOptions: this.apiOptions,
|
|
64
|
+
});
|
|
65
|
+
return response.json();
|
|
66
|
+
}
|
|
67
|
+
async getPolicyControlById(request) {
|
|
68
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
69
|
+
path: { policyControlId: request.policyControlId },
|
|
70
|
+
query: {},
|
|
71
|
+
});
|
|
72
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
73
|
+
method: 'GET',
|
|
74
|
+
apiOptions: this.apiOptions,
|
|
75
|
+
});
|
|
76
|
+
return response.json();
|
|
77
|
+
}
|
|
78
|
+
async listPolicyControls() {
|
|
79
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
80
|
+
path: {},
|
|
81
|
+
query: {},
|
|
82
|
+
});
|
|
83
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
84
|
+
method: 'GET',
|
|
85
|
+
apiOptions: this.apiOptions,
|
|
86
|
+
});
|
|
87
|
+
return response.json();
|
|
88
|
+
}
|
|
89
|
+
async archivePolicyControl(request) {
|
|
90
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
91
|
+
path: { policyControlId: request.policyControlId },
|
|
92
|
+
query: {},
|
|
93
|
+
});
|
|
94
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
95
|
+
method: 'DELETE',
|
|
96
|
+
apiOptions: this.apiOptions,
|
|
97
|
+
});
|
|
98
|
+
return response.json();
|
|
99
|
+
}
|
|
100
|
+
async createPolicyRule(request) {
|
|
101
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules', {
|
|
102
|
+
path: {},
|
|
103
|
+
query: {},
|
|
104
|
+
});
|
|
105
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
106
|
+
method: 'POST',
|
|
107
|
+
body: request.body,
|
|
108
|
+
apiOptions: this.apiOptions,
|
|
109
|
+
});
|
|
110
|
+
return response.json();
|
|
111
|
+
}
|
|
112
|
+
async getPolicyRuleById(request) {
|
|
113
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
114
|
+
path: { policyRuleId: request.policyRuleId },
|
|
115
|
+
query: {},
|
|
116
|
+
});
|
|
117
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
118
|
+
method: 'GET',
|
|
119
|
+
apiOptions: this.apiOptions,
|
|
120
|
+
});
|
|
121
|
+
return response.json();
|
|
122
|
+
}
|
|
123
|
+
async listPolicyRules(request) {
|
|
124
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules', {
|
|
125
|
+
path: {},
|
|
126
|
+
query: request.query ?? {},
|
|
127
|
+
});
|
|
128
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
129
|
+
method: 'GET',
|
|
130
|
+
apiOptions: this.apiOptions,
|
|
131
|
+
});
|
|
132
|
+
return response.json();
|
|
133
|
+
}
|
|
134
|
+
async archivePolicyRule(request) {
|
|
135
|
+
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
136
|
+
path: { policyRuleId: request.policyRuleId },
|
|
137
|
+
query: {},
|
|
138
|
+
});
|
|
139
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
140
|
+
method: 'DELETE',
|
|
141
|
+
apiOptions: this.apiOptions,
|
|
142
|
+
});
|
|
143
|
+
return response.json();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.PolicyManagementClient = PolicyManagementClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DelegatedPolicyManagementClient"), exports);
|
|
18
|
+
__exportStar(require("./PolicyManagementClient"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|