@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
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import * as Permissions from '../datamodel/Permissions'
|
|
2
|
-
|
|
3
|
-
export type CreatePermissionRequest = {
|
|
4
|
-
body: Permissions.CreatePermissionInput
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type CreatePermissionResponse = Permissions.Permission
|
|
8
|
-
|
|
9
|
-
export type UpdatePermissionRequest = {
|
|
10
|
-
permissionId: string
|
|
11
|
-
body: Permissions.UpdatePermissionInput
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type UpdatePermissionResponse = Permissions.Permission
|
|
15
|
-
|
|
16
|
-
export type ArchivePermissionRequest = {
|
|
17
|
-
permissionId: string
|
|
18
|
-
body: Permissions.ArchivePermissionInput
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type ArchivePermissionResponse = Permissions.Permission
|
|
22
|
-
|
|
23
|
-
export type GetPermissionByIdRequest = {
|
|
24
|
-
permissionId: string
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type GetPermissionByIdResponse = Permissions.Permission
|
|
28
|
-
|
|
29
|
-
export type ListPermissionsResponse = { items: Permissions.Permission[] }
|
|
30
|
-
|
|
31
|
-
export type CreatePermissionPredicateRequest = {
|
|
32
|
-
permissionId: string
|
|
33
|
-
body: Permissions.CreatePermissionPredicateInput
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export type CreatePermissionPredicateResponse = Permissions.PermissionPredicate
|
|
37
|
-
|
|
38
|
-
export type UpdatePermissionPredicateRequest = {
|
|
39
|
-
permissionId: string
|
|
40
|
-
predicateId: string
|
|
41
|
-
body: Permissions.UpdatePermissionPredicateInput
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type UpdatePermissionPredicateResponse = Permissions.PermissionPredicate
|
|
45
|
-
|
|
46
|
-
export type ArchivePermissionPredicateRequest = {
|
|
47
|
-
permissionId: string
|
|
48
|
-
predicateId: string
|
|
49
|
-
body: Permissions.ArchivePermissionPredicateInput
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type ArchivePermissionPredicateResponse = Permissions.PermissionPredicate
|
|
53
|
-
|
|
54
|
-
export type ListPermissionPredicatesRequest = {
|
|
55
|
-
permissionId: string
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type ListPermissionPredicatesResponse = {
|
|
59
|
-
items: Permissions.PermissionPredicate[]
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type CreatePermissionAssignmentRequest = {
|
|
63
|
-
body: Permissions.CreatePermissionAssignmentInput
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export type CreatePermissionAssignmentResponse =
|
|
67
|
-
Permissions.PermissionAssignment
|
|
68
|
-
|
|
69
|
-
export type RevokePermissionAssignmentRequest = {
|
|
70
|
-
assignmentId: string
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type RevokePermissionAssignmentResponse =
|
|
74
|
-
Permissions.DeletionAcknowledgement
|
|
75
|
-
|
|
76
|
-
export type ListPermissionAssignmentsRequest = {
|
|
77
|
-
query?: { permissionId?: string; identityId?: string }
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type ListPermissionAssignmentsResponse = {
|
|
81
|
-
items: Permissions.PermissionAssignment[]
|
|
82
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseAuthApi,
|
|
3
|
-
SignUserActionChallengeRequest,
|
|
4
|
-
UserActionChallengeResponse,
|
|
5
|
-
} from '../../baseAuthApi'
|
|
6
|
-
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient'
|
|
7
|
-
import { simpleFetch } from '../../utils/fetch'
|
|
8
|
-
import { buildPathAndQuery } from '../../utils/url'
|
|
9
|
-
import * as T from './types'
|
|
10
|
-
|
|
11
|
-
export class DelegatedPolicyExecutionClient {
|
|
12
|
-
constructor(private apiOptions: DfnsDelegatedApiClientOptions) {}
|
|
13
|
-
|
|
14
|
-
async listPolicyControlExecutions(
|
|
15
|
-
request: T.ListPolicyControlExecutionsRequest
|
|
16
|
-
): Promise<T.ListPolicyControlExecutionsResponse> {
|
|
17
|
-
const path = buildPathAndQuery('/policies/policy-control-executions', {
|
|
18
|
-
path: {},
|
|
19
|
-
query: request.query ?? {},
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const response = await simpleFetch(path, {
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiOptions: this.apiOptions,
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
return response.json()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async getPolicyControlExecutionById(
|
|
31
|
-
request: T.GetPolicyControlExecutionByIdRequest
|
|
32
|
-
): Promise<T.GetPolicyControlExecutionByIdResponse> {
|
|
33
|
-
const path = buildPathAndQuery(
|
|
34
|
-
'/policies/policy-control-executions/:policyControlExecutionId',
|
|
35
|
-
{
|
|
36
|
-
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
37
|
-
query: {},
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
const response = await simpleFetch(path, {
|
|
42
|
-
method: 'GET',
|
|
43
|
-
apiOptions: this.apiOptions,
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
return response.json()
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async updatePolicyControlExecutionInit(
|
|
50
|
-
request: T.UpdatePolicyControlExecutionRequest
|
|
51
|
-
): Promise<UserActionChallengeResponse> {
|
|
52
|
-
const path = buildPathAndQuery(
|
|
53
|
-
'/policies/policy-control-executions/:policyControlExecutionId',
|
|
54
|
-
{
|
|
55
|
-
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
56
|
-
query: {},
|
|
57
|
-
}
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
61
|
-
{
|
|
62
|
-
userActionHttpMethod: 'PUT',
|
|
63
|
-
userActionHttpPath: path,
|
|
64
|
-
userActionPayload: JSON.stringify(request.body),
|
|
65
|
-
userActionServerKind: 'Api',
|
|
66
|
-
},
|
|
67
|
-
this.apiOptions
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
return challenge
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
async updatePolicyControlExecutionComplete(
|
|
74
|
-
request: T.UpdatePolicyControlExecutionRequest,
|
|
75
|
-
signedChallenge: SignUserActionChallengeRequest
|
|
76
|
-
): Promise<T.UpdatePolicyControlExecutionResponse> {
|
|
77
|
-
const path = buildPathAndQuery(
|
|
78
|
-
'/policies/policy-control-executions/:policyControlExecutionId',
|
|
79
|
-
{
|
|
80
|
-
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
81
|
-
query: {},
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
86
|
-
signedChallenge,
|
|
87
|
-
this.apiOptions
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
const response = await simpleFetch(path, {
|
|
91
|
-
method: 'PUT',
|
|
92
|
-
body: request.body,
|
|
93
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
94
|
-
apiOptions: this.apiOptions,
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
return response.json()
|
|
98
|
-
}
|
|
99
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { DfnsApiClientOptions } from '../../dfnsApiClient'
|
|
2
|
-
import { simpleFetch, userActionFetch } from '../../utils/fetch'
|
|
3
|
-
import { buildPathAndQuery } from '../../utils/url'
|
|
4
|
-
import * as T from './types'
|
|
5
|
-
|
|
6
|
-
export class PolicyExecutionClient {
|
|
7
|
-
constructor(private apiOptions: DfnsApiClientOptions) {}
|
|
8
|
-
|
|
9
|
-
async listPolicyControlExecutions(
|
|
10
|
-
request: T.ListPolicyControlExecutionsRequest
|
|
11
|
-
): Promise<T.ListPolicyControlExecutionsResponse> {
|
|
12
|
-
const path = buildPathAndQuery('/policies/policy-control-executions', {
|
|
13
|
-
path: {},
|
|
14
|
-
query: request.query ?? {},
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const response = await simpleFetch(path, {
|
|
18
|
-
method: 'GET',
|
|
19
|
-
apiOptions: this.apiOptions,
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
return response.json()
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async getPolicyControlExecutionById(
|
|
26
|
-
request: T.GetPolicyControlExecutionByIdRequest
|
|
27
|
-
): Promise<T.GetPolicyControlExecutionByIdResponse> {
|
|
28
|
-
const path = buildPathAndQuery(
|
|
29
|
-
'/policies/policy-control-executions/:policyControlExecutionId',
|
|
30
|
-
{
|
|
31
|
-
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
32
|
-
query: {},
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
const response = await simpleFetch(path, {
|
|
37
|
-
method: 'GET',
|
|
38
|
-
apiOptions: this.apiOptions,
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
return response.json()
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
async updatePolicyControlExecution(
|
|
45
|
-
request: T.UpdatePolicyControlExecutionRequest
|
|
46
|
-
): Promise<T.UpdatePolicyControlExecutionResponse> {
|
|
47
|
-
const path = buildPathAndQuery(
|
|
48
|
-
'/policies/policy-control-executions/:policyControlExecutionId',
|
|
49
|
-
{
|
|
50
|
-
path: { policyControlExecutionId: request.policyControlExecutionId },
|
|
51
|
-
query: {},
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
const response = await userActionFetch(path, {
|
|
56
|
-
method: 'PUT',
|
|
57
|
-
body: request.body,
|
|
58
|
-
apiOptions: this.apiOptions,
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
return response.json()
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as PolicyExecution from '../datamodel/PolicyExecution'
|
|
2
|
-
|
|
3
|
-
export type ListPolicyControlExecutionsRequest = {
|
|
4
|
-
query?: { activityId: string }
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type ListPolicyControlExecutionsResponse = {
|
|
8
|
-
items: PolicyExecution.PolicyControlExecution[]
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type GetPolicyControlExecutionByIdRequest = {
|
|
12
|
-
policyControlExecutionId: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type GetPolicyControlExecutionByIdResponse =
|
|
16
|
-
PolicyExecution.PolicyControlExecution
|
|
17
|
-
|
|
18
|
-
export type UpdatePolicyControlExecutionRequest = {
|
|
19
|
-
policyControlExecutionId: string
|
|
20
|
-
body: PolicyExecution.UpdatePolicyControlExecutionInput
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type UpdatePolicyControlExecutionResponse =
|
|
24
|
-
PolicyExecution.PolicyControlExecution
|
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseAuthApi,
|
|
3
|
-
SignUserActionChallengeRequest,
|
|
4
|
-
UserActionChallengeResponse,
|
|
5
|
-
} from '../../baseAuthApi'
|
|
6
|
-
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient'
|
|
7
|
-
import { simpleFetch } from '../../utils/fetch'
|
|
8
|
-
import { buildPathAndQuery } from '../../utils/url'
|
|
9
|
-
import * as T from './types'
|
|
10
|
-
|
|
11
|
-
export class DelegatedPolicyManagementClient {
|
|
12
|
-
constructor(private apiOptions: DfnsDelegatedApiClientOptions) {}
|
|
13
|
-
|
|
14
|
-
async createPolicyInit(
|
|
15
|
-
request: T.CreatePolicyRequest
|
|
16
|
-
): Promise<UserActionChallengeResponse> {
|
|
17
|
-
const path = buildPathAndQuery('/policies', {
|
|
18
|
-
path: {},
|
|
19
|
-
query: {},
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
23
|
-
{
|
|
24
|
-
userActionHttpMethod: 'POST',
|
|
25
|
-
userActionHttpPath: path,
|
|
26
|
-
userActionPayload: JSON.stringify(request.body),
|
|
27
|
-
userActionServerKind: 'Api',
|
|
28
|
-
},
|
|
29
|
-
this.apiOptions
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
return challenge
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async createPolicyComplete(
|
|
36
|
-
request: T.CreatePolicyRequest,
|
|
37
|
-
signedChallenge: SignUserActionChallengeRequest
|
|
38
|
-
): Promise<T.CreatePolicyResponse> {
|
|
39
|
-
const path = buildPathAndQuery('/policies', {
|
|
40
|
-
path: {},
|
|
41
|
-
query: {},
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
45
|
-
signedChallenge,
|
|
46
|
-
this.apiOptions
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
const response = await simpleFetch(path, {
|
|
50
|
-
method: 'POST',
|
|
51
|
-
body: request.body,
|
|
52
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
53
|
-
apiOptions: this.apiOptions,
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
return response.json()
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async getPolicyById(
|
|
60
|
-
request: T.GetPolicyByIdRequest
|
|
61
|
-
): Promise<T.GetPolicyByIdResponse> {
|
|
62
|
-
const path = buildPathAndQuery('/policies/:policyId', {
|
|
63
|
-
path: { policyId: request.policyId },
|
|
64
|
-
query: {},
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
const response = await simpleFetch(path, {
|
|
68
|
-
method: 'GET',
|
|
69
|
-
apiOptions: this.apiOptions,
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
return response.json()
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async listPolicies(): Promise<T.ListPoliciesResponse> {
|
|
76
|
-
const path = buildPathAndQuery('/policies', {
|
|
77
|
-
path: {},
|
|
78
|
-
query: {},
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
const response = await simpleFetch(path, {
|
|
82
|
-
method: 'GET',
|
|
83
|
-
apiOptions: this.apiOptions,
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
return response.json()
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
async archivePolicyInit(
|
|
90
|
-
request: T.ArchivePolicyRequest
|
|
91
|
-
): Promise<UserActionChallengeResponse> {
|
|
92
|
-
const path = buildPathAndQuery('/policies/:policyId', {
|
|
93
|
-
path: { policyId: request.policyId },
|
|
94
|
-
query: {},
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
98
|
-
{
|
|
99
|
-
userActionHttpMethod: 'DELETE',
|
|
100
|
-
userActionHttpPath: path,
|
|
101
|
-
userActionPayload: JSON.stringify({}),
|
|
102
|
-
userActionServerKind: 'Api',
|
|
103
|
-
},
|
|
104
|
-
this.apiOptions
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
return challenge
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
async archivePolicyComplete(
|
|
111
|
-
request: T.ArchivePolicyRequest,
|
|
112
|
-
signedChallenge: SignUserActionChallengeRequest
|
|
113
|
-
): Promise<T.ArchivePolicyResponse> {
|
|
114
|
-
const path = buildPathAndQuery('/policies/:policyId', {
|
|
115
|
-
path: { policyId: request.policyId },
|
|
116
|
-
query: {},
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
120
|
-
signedChallenge,
|
|
121
|
-
this.apiOptions
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
const response = await simpleFetch(path, {
|
|
125
|
-
method: 'DELETE',
|
|
126
|
-
body: {},
|
|
127
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
128
|
-
apiOptions: this.apiOptions,
|
|
129
|
-
})
|
|
130
|
-
|
|
131
|
-
return response.json()
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async createPolicyControlInit(
|
|
135
|
-
request: T.CreatePolicyControlRequest
|
|
136
|
-
): Promise<UserActionChallengeResponse> {
|
|
137
|
-
const path = buildPathAndQuery('/policies/policy-controls', {
|
|
138
|
-
path: {},
|
|
139
|
-
query: {},
|
|
140
|
-
})
|
|
141
|
-
|
|
142
|
-
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
143
|
-
{
|
|
144
|
-
userActionHttpMethod: 'POST',
|
|
145
|
-
userActionHttpPath: path,
|
|
146
|
-
userActionPayload: JSON.stringify(request.body),
|
|
147
|
-
userActionServerKind: 'Api',
|
|
148
|
-
},
|
|
149
|
-
this.apiOptions
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
return challenge
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
async createPolicyControlComplete(
|
|
156
|
-
request: T.CreatePolicyControlRequest,
|
|
157
|
-
signedChallenge: SignUserActionChallengeRequest
|
|
158
|
-
): Promise<T.CreatePolicyControlResponse> {
|
|
159
|
-
const path = buildPathAndQuery('/policies/policy-controls', {
|
|
160
|
-
path: {},
|
|
161
|
-
query: {},
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
165
|
-
signedChallenge,
|
|
166
|
-
this.apiOptions
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
const response = await simpleFetch(path, {
|
|
170
|
-
method: 'POST',
|
|
171
|
-
body: request.body,
|
|
172
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
173
|
-
apiOptions: this.apiOptions,
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
return response.json()
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
async getPolicyControlById(
|
|
180
|
-
request: T.GetPolicyControlByIdRequest
|
|
181
|
-
): Promise<T.GetPolicyControlByIdResponse> {
|
|
182
|
-
const path = buildPathAndQuery(
|
|
183
|
-
'/policies/policy-controls/:policyControlId',
|
|
184
|
-
{
|
|
185
|
-
path: { policyControlId: request.policyControlId },
|
|
186
|
-
query: {},
|
|
187
|
-
}
|
|
188
|
-
)
|
|
189
|
-
|
|
190
|
-
const response = await simpleFetch(path, {
|
|
191
|
-
method: 'GET',
|
|
192
|
-
apiOptions: this.apiOptions,
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
return response.json()
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
async listPolicyControls(): Promise<T.ListPolicyControlsResponse> {
|
|
199
|
-
const path = buildPathAndQuery('/policies/policy-controls', {
|
|
200
|
-
path: {},
|
|
201
|
-
query: {},
|
|
202
|
-
})
|
|
203
|
-
|
|
204
|
-
const response = await simpleFetch(path, {
|
|
205
|
-
method: 'GET',
|
|
206
|
-
apiOptions: this.apiOptions,
|
|
207
|
-
})
|
|
208
|
-
|
|
209
|
-
return response.json()
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
async archivePolicyControlInit(
|
|
213
|
-
request: T.ArchivePolicyControlRequest
|
|
214
|
-
): Promise<UserActionChallengeResponse> {
|
|
215
|
-
const path = buildPathAndQuery(
|
|
216
|
-
'/policies/policy-controls/:policyControlId',
|
|
217
|
-
{
|
|
218
|
-
path: { policyControlId: request.policyControlId },
|
|
219
|
-
query: {},
|
|
220
|
-
}
|
|
221
|
-
)
|
|
222
|
-
|
|
223
|
-
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
224
|
-
{
|
|
225
|
-
userActionHttpMethod: 'DELETE',
|
|
226
|
-
userActionHttpPath: path,
|
|
227
|
-
userActionPayload: JSON.stringify({}),
|
|
228
|
-
userActionServerKind: 'Api',
|
|
229
|
-
},
|
|
230
|
-
this.apiOptions
|
|
231
|
-
)
|
|
232
|
-
|
|
233
|
-
return challenge
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
async archivePolicyControlComplete(
|
|
237
|
-
request: T.ArchivePolicyControlRequest,
|
|
238
|
-
signedChallenge: SignUserActionChallengeRequest
|
|
239
|
-
): Promise<T.ArchivePolicyControlResponse> {
|
|
240
|
-
const path = buildPathAndQuery(
|
|
241
|
-
'/policies/policy-controls/:policyControlId',
|
|
242
|
-
{
|
|
243
|
-
path: { policyControlId: request.policyControlId },
|
|
244
|
-
query: {},
|
|
245
|
-
}
|
|
246
|
-
)
|
|
247
|
-
|
|
248
|
-
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
249
|
-
signedChallenge,
|
|
250
|
-
this.apiOptions
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
const response = await simpleFetch(path, {
|
|
254
|
-
method: 'DELETE',
|
|
255
|
-
body: {},
|
|
256
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
257
|
-
apiOptions: this.apiOptions,
|
|
258
|
-
})
|
|
259
|
-
|
|
260
|
-
return response.json()
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
async createPolicyRuleInit(
|
|
264
|
-
request: T.CreatePolicyRuleRequest
|
|
265
|
-
): Promise<UserActionChallengeResponse> {
|
|
266
|
-
const path = buildPathAndQuery('/policies/policy-rules', {
|
|
267
|
-
path: {},
|
|
268
|
-
query: {},
|
|
269
|
-
})
|
|
270
|
-
|
|
271
|
-
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
272
|
-
{
|
|
273
|
-
userActionHttpMethod: 'POST',
|
|
274
|
-
userActionHttpPath: path,
|
|
275
|
-
userActionPayload: JSON.stringify(request.body),
|
|
276
|
-
userActionServerKind: 'Api',
|
|
277
|
-
},
|
|
278
|
-
this.apiOptions
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
return challenge
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
async createPolicyRuleComplete(
|
|
285
|
-
request: T.CreatePolicyRuleRequest,
|
|
286
|
-
signedChallenge: SignUserActionChallengeRequest
|
|
287
|
-
): Promise<T.CreatePolicyRuleResponse> {
|
|
288
|
-
const path = buildPathAndQuery('/policies/policy-rules', {
|
|
289
|
-
path: {},
|
|
290
|
-
query: {},
|
|
291
|
-
})
|
|
292
|
-
|
|
293
|
-
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
294
|
-
signedChallenge,
|
|
295
|
-
this.apiOptions
|
|
296
|
-
)
|
|
297
|
-
|
|
298
|
-
const response = await simpleFetch(path, {
|
|
299
|
-
method: 'POST',
|
|
300
|
-
body: request.body,
|
|
301
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
302
|
-
apiOptions: this.apiOptions,
|
|
303
|
-
})
|
|
304
|
-
|
|
305
|
-
return response.json()
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
async getPolicyRuleById(
|
|
309
|
-
request: T.GetPolicyRuleByIdRequest
|
|
310
|
-
): Promise<T.GetPolicyRuleByIdResponse> {
|
|
311
|
-
const path = buildPathAndQuery('/policies/policy-rules/:policyRuleId', {
|
|
312
|
-
path: { policyRuleId: request.policyRuleId },
|
|
313
|
-
query: {},
|
|
314
|
-
})
|
|
315
|
-
|
|
316
|
-
const response = await simpleFetch(path, {
|
|
317
|
-
method: 'GET',
|
|
318
|
-
apiOptions: this.apiOptions,
|
|
319
|
-
})
|
|
320
|
-
|
|
321
|
-
return response.json()
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
async listPolicyRules(
|
|
325
|
-
request: T.ListPolicyRulesRequest
|
|
326
|
-
): Promise<T.ListPolicyRulesResponse> {
|
|
327
|
-
const path = buildPathAndQuery('/policies/policy-rules', {
|
|
328
|
-
path: {},
|
|
329
|
-
query: request.query ?? {},
|
|
330
|
-
})
|
|
331
|
-
|
|
332
|
-
const response = await simpleFetch(path, {
|
|
333
|
-
method: 'GET',
|
|
334
|
-
apiOptions: this.apiOptions,
|
|
335
|
-
})
|
|
336
|
-
|
|
337
|
-
return response.json()
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
async archivePolicyRuleInit(
|
|
341
|
-
request: T.ArchivePolicyRuleRequest
|
|
342
|
-
): Promise<UserActionChallengeResponse> {
|
|
343
|
-
const path = buildPathAndQuery('/policies/policy-rules/:policyRuleId', {
|
|
344
|
-
path: { policyRuleId: request.policyRuleId },
|
|
345
|
-
query: {},
|
|
346
|
-
})
|
|
347
|
-
|
|
348
|
-
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
349
|
-
{
|
|
350
|
-
userActionHttpMethod: 'DELETE',
|
|
351
|
-
userActionHttpPath: path,
|
|
352
|
-
userActionPayload: JSON.stringify({}),
|
|
353
|
-
userActionServerKind: 'Api',
|
|
354
|
-
},
|
|
355
|
-
this.apiOptions
|
|
356
|
-
)
|
|
357
|
-
|
|
358
|
-
return challenge
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
async archivePolicyRuleComplete(
|
|
362
|
-
request: T.ArchivePolicyRuleRequest,
|
|
363
|
-
signedChallenge: SignUserActionChallengeRequest
|
|
364
|
-
): Promise<T.ArchivePolicyRuleResponse> {
|
|
365
|
-
const path = buildPathAndQuery('/policies/policy-rules/:policyRuleId', {
|
|
366
|
-
path: { policyRuleId: request.policyRuleId },
|
|
367
|
-
query: {},
|
|
368
|
-
})
|
|
369
|
-
|
|
370
|
-
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
371
|
-
signedChallenge,
|
|
372
|
-
this.apiOptions
|
|
373
|
-
)
|
|
374
|
-
|
|
375
|
-
const response = await simpleFetch(path, {
|
|
376
|
-
method: 'DELETE',
|
|
377
|
-
body: {},
|
|
378
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
379
|
-
apiOptions: this.apiOptions,
|
|
380
|
-
})
|
|
381
|
-
|
|
382
|
-
return response.json()
|
|
383
|
-
}
|
|
384
|
-
}
|