@dfns/sdk 0.2.2 → 0.2.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/baseAuthApi.ts +236 -0
- package/codegen/Assets/AssetsClient.ts +137 -0
- package/codegen/Assets/DelegatedAssetsClient.ts +201 -0
- package/codegen/Assets/index.ts +3 -0
- package/codegen/Assets/types.ts +45 -0
- package/codegen/Auth/AuthClient.ts +729 -0
- package/codegen/Auth/DelegatedAuthClient.ts +1508 -0
- package/codegen/Auth/index.ts +3 -0
- package/codegen/Auth/types.ts +262 -0
- package/codegen/Blockchains/BlockchainsClient.ts +25 -0
- package/codegen/Blockchains/DelegatedBlockchainsClient.ts +25 -0
- package/codegen/Blockchains/index.ts +3 -0
- package/codegen/Blockchains/types.ts +8 -0
- package/codegen/Callbacks/CallbacksClient.ts +107 -0
- package/codegen/Callbacks/DelegatedCallbacksClient.ts +172 -0
- package/codegen/Callbacks/index.ts +3 -0
- package/codegen/Callbacks/{types.d.ts → types.ts} +26 -18
- package/codegen/Permissions/DelegatedPermissionsClient.ts +468 -0
- package/codegen/Permissions/PermissionsClient.ts +223 -0
- package/codegen/Permissions/index.ts +3 -0
- package/codegen/Permissions/types.ts +82 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.ts +99 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.ts +63 -0
- package/codegen/PolicyExecution/index.ts +3 -0
- package/codegen/PolicyExecution/types.ts +24 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.ts +384 -0
- package/codegen/PolicyManagement/PolicyManagementClient.ts +205 -0
- package/codegen/PolicyManagement/index.ts +3 -0
- package/codegen/PolicyManagement/{types.d.ts → types.ts} +56 -40
- package/codegen/PublicKeys/DelegatedPublicKeysClient.ts +299 -0
- package/codegen/PublicKeys/PublicKeysClient.ts +179 -0
- package/codegen/PublicKeys/index.ts +3 -0
- package/codegen/PublicKeys/types.ts +68 -0
- package/codegen/Signers/DelegatedSignersClient.ts +22 -0
- package/codegen/Signers/SignersClient.ts +22 -0
- package/codegen/Signers/index.ts +3 -0
- package/codegen/Signers/types.ts +3 -0
- package/codegen/Wallets/DelegatedWalletsClient.ts +511 -0
- package/codegen/Wallets/WalletsClient.ts +310 -0
- package/codegen/Wallets/index.ts +3 -0
- package/codegen/Wallets/types.ts +137 -0
- package/codegen/datamodel/ApiKeys/errors.ts +9 -0
- package/codegen/datamodel/ApiKeys/index.ts +3 -0
- package/codegen/datamodel/ApiKeys/responses.ts +68 -0
- package/codegen/datamodel/ApiKeys/types.ts +81 -0
- package/codegen/datamodel/Assets/errors.ts +24 -0
- package/codegen/datamodel/Assets/index.ts +3 -0
- package/codegen/datamodel/Assets/responses.ts +146 -0
- package/codegen/datamodel/Assets/types.ts +417 -0
- package/codegen/datamodel/Auth/index.ts +2 -0
- package/codegen/datamodel/Auth/responses.ts +1110 -0
- package/codegen/datamodel/Auth/types.ts +1404 -0
- package/codegen/datamodel/BlockchainIndexing/index.ts +1 -0
- package/codegen/datamodel/BlockchainIndexing/{responses.d.ts → responses.ts} +10 -5
- package/codegen/datamodel/Blockchains/index.ts +2 -0
- package/codegen/datamodel/Blockchains/responses.ts +41 -0
- package/codegen/datamodel/Blockchains/types.ts +695 -0
- package/codegen/datamodel/Callbacks/index.ts +2 -0
- package/codegen/datamodel/Callbacks/responses.ts +110 -0
- package/codegen/datamodel/Callbacks/types.ts +100 -0
- package/codegen/datamodel/Foundations/errors.ts +299 -0
- package/codegen/datamodel/Foundations/index.ts +2 -0
- package/codegen/datamodel/Foundations/types.ts +57921 -0
- package/codegen/datamodel/Orgs/index.ts +2 -0
- package/codegen/datamodel/Orgs/responses.ts +104 -0
- package/codegen/datamodel/Orgs/types.ts +322 -0
- package/codegen/datamodel/Permissions/index.ts +2 -0
- package/codegen/datamodel/Permissions/responses.ts +258 -0
- package/codegen/datamodel/Permissions/types.ts +221 -0
- package/codegen/datamodel/PolicyExecution/errors.ts +24 -0
- package/codegen/datamodel/PolicyExecution/index.ts +3 -0
- package/codegen/datamodel/PolicyExecution/responses.ts +59 -0
- package/codegen/datamodel/PolicyExecution/types.ts +122 -0
- package/codegen/datamodel/PolicyManagement/index.ts +2 -0
- package/codegen/datamodel/PolicyManagement/responses.ts +255 -0
- package/codegen/datamodel/PolicyManagement/types.ts +711 -0
- package/codegen/datamodel/PublicKeys/index.ts +2 -0
- package/codegen/datamodel/PublicKeys/responses.ts +190 -0
- package/codegen/datamodel/PublicKeys/types.ts +558 -0
- package/codegen/datamodel/Signers/index.ts +2 -0
- package/codegen/datamodel/Signers/responses.ts +64 -0
- package/codegen/datamodel/Signers/types.ts +31 -0
- package/codegen/datamodel/Wallets/errors.ts +0 -0
- package/codegen/datamodel/Wallets/index.ts +2 -0
- package/codegen/datamodel/Wallets/responses.ts +318 -0
- package/codegen/datamodel/Wallets/types.ts +1268 -0
- package/dfnsApiClient.ts +76 -0
- package/dfnsAuthenticator.ts +59 -0
- package/dfnsDelegatedApiClient.ts +75 -0
- package/dfnsError.ts +5 -0
- package/generated/permissions/client.ts +125 -0
- package/generated/permissions/delegatedClient.ts +266 -0
- package/generated/permissions/index.ts +3 -0
- package/generated/permissions/types.ts +202 -0
- package/generated/policies/client.ts +110 -0
- package/generated/policies/delegatedClient.ts +223 -0
- package/generated/policies/index.ts +3 -0
- package/generated/policies/{types.d.ts → types.ts} +29 -17
- package/generated/signers/client.ts +22 -0
- package/generated/signers/delegatedClient.ts +23 -0
- package/generated/signers/index.ts +3 -0
- package/generated/signers/{types.d.ts → types.ts} +1 -0
- package/generated/wallets/client.ts +282 -0
- package/generated/wallets/delegatedClient.ts +507 -0
- package/generated/wallets/index.ts +3 -0
- package/generated/wallets/{types.d.ts → types.ts} +120 -48
- package/generated/webhooks/client.ts +124 -0
- package/generated/webhooks/delegatedClient.ts +237 -0
- package/generated/webhooks/index.ts +3 -0
- package/generated/webhooks/{types.d.ts → types.ts} +34 -16
- package/index.ts +7 -0
- package/package.json +1 -8
- package/project.json +14 -0
- package/signer.ts +60 -0
- package/store.ts +99 -0
- package/tsconfig.json +7 -0
- package/typedoc.json +21 -0
- package/types/policies.ts +1 -0
- package/types/signers.ts +1 -0
- package/types/wallets.ts +1 -0
- package/types/webhooks.ts +1 -0
- package/utils/base64.ts +19 -0
- package/utils/fetch.ts +130 -0
- package/utils/index.ts +4 -0
- package/utils/nonce.ts +12 -0
- package/utils/url.ts +19 -0
- package/baseAuthApi.d.ts +0 -113
- package/baseAuthApi.js +0 -97
- package/codegen/Assets/AssetsClient.d.ts +0 -13
- package/codegen/Assets/AssetsClient.js +0 -93
- package/codegen/Assets/DelegatedAssetsClient.d.ts +0 -16
- package/codegen/Assets/DelegatedAssetsClient.js +0 -124
- package/codegen/Assets/index.d.ts +0 -3
- package/codegen/Assets/index.js +0 -19
- package/codegen/Assets/types.d.ts +0 -37
- package/codegen/Assets/types.js +0 -2
- package/codegen/Auth/AuthClient.d.ts +0 -50
- package/codegen/Auth/AuthClient.js +0 -518
- package/codegen/Auth/DelegatedAuthClient.d.ts +0 -78
- package/codegen/Auth/DelegatedAuthClient.js +0 -936
- package/codegen/Auth/index.d.ts +0 -3
- package/codegen/Auth/index.js +0 -19
- package/codegen/Auth/types.d.ts +0 -177
- package/codegen/Auth/types.js +0 -2
- package/codegen/Blockchains/BlockchainsClient.d.ts +0 -7
- package/codegen/Blockchains/BlockchainsClient.js +0 -23
- package/codegen/Blockchains/DelegatedBlockchainsClient.d.ts +0 -7
- package/codegen/Blockchains/DelegatedBlockchainsClient.js +0 -23
- package/codegen/Blockchains/index.d.ts +0 -3
- package/codegen/Blockchains/index.js +0 -19
- package/codegen/Blockchains/types.d.ts +0 -6
- package/codegen/Blockchains/types.js +0 -2
- package/codegen/Callbacks/CallbacksClient.d.ts +0 -12
- package/codegen/Callbacks/CallbacksClient.js +0 -78
- package/codegen/Callbacks/DelegatedCallbacksClient.d.ts +0 -15
- package/codegen/Callbacks/DelegatedCallbacksClient.js +0 -110
- package/codegen/Callbacks/index.d.ts +0 -3
- package/codegen/Callbacks/index.js +0 -19
- package/codegen/Callbacks/types.js +0 -2
- package/codegen/Permissions/DelegatedPermissionsClient.d.ts +0 -27
- package/codegen/Permissions/DelegatedPermissionsClient.js +0 -284
- package/codegen/Permissions/PermissionsClient.d.ts +0 -18
- package/codegen/Permissions/PermissionsClient.js +0 -156
- package/codegen/Permissions/index.d.ts +0 -3
- package/codegen/Permissions/index.js +0 -19
- package/codegen/Permissions/types.d.ts +0 -62
- package/codegen/Permissions/types.js +0 -2
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +0 -11
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +0 -61
- package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +0 -9
- package/codegen/PolicyExecution/PolicyExecutionClient.js +0 -45
- package/codegen/PolicyExecution/index.d.ts +0 -3
- package/codegen/PolicyExecution/index.js +0 -19
- package/codegen/PolicyExecution/types.d.ts +0 -18
- package/codegen/PolicyExecution/types.js +0 -2
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +0 -25
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +0 -240
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +0 -18
- package/codegen/PolicyManagement/PolicyManagementClient.js +0 -146
- package/codegen/PolicyManagement/index.d.ts +0 -3
- package/codegen/PolicyManagement/index.js +0 -19
- package/codegen/PolicyManagement/types.js +0 -2
- package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +0 -21
- package/codegen/PublicKeys/DelegatedPublicKeysClient.js +0 -189
- package/codegen/PublicKeys/PublicKeysClient.d.ts +0 -16
- package/codegen/PublicKeys/PublicKeysClient.js +0 -128
- package/codegen/PublicKeys/index.d.ts +0 -3
- package/codegen/PublicKeys/index.js +0 -19
- package/codegen/PublicKeys/types.d.ts +0 -51
- package/codegen/PublicKeys/types.js +0 -2
- package/codegen/Signers/DelegatedSignersClient.d.ts +0 -7
- package/codegen/Signers/DelegatedSignersClient.js +0 -22
- package/codegen/Signers/SignersClient.d.ts +0 -7
- package/codegen/Signers/SignersClient.js +0 -22
- package/codegen/Signers/index.d.ts +0 -3
- package/codegen/Signers/index.js +0 -19
- package/codegen/Signers/types.d.ts +0 -2
- package/codegen/Signers/types.js +0 -2
- package/codegen/Wallets/DelegatedWalletsClient.d.ts +0 -32
- package/codegen/Wallets/DelegatedWalletsClient.js +0 -325
- package/codegen/Wallets/WalletsClient.d.ts +0 -24
- package/codegen/Wallets/WalletsClient.js +0 -219
- package/codegen/Wallets/index.d.ts +0 -3
- package/codegen/Wallets/index.js +0 -19
- package/codegen/Wallets/types.d.ts +0 -101
- package/codegen/Wallets/types.js +0 -2
- package/codegen/datamodel/ApiKeys/errors.d.ts +0 -6
- package/codegen/datamodel/ApiKeys/errors.js +0 -15
- package/codegen/datamodel/ApiKeys/index.d.ts +0 -3
- package/codegen/datamodel/ApiKeys/index.js +0 -19
- package/codegen/datamodel/ApiKeys/responses.d.ts +0 -25
- package/codegen/datamodel/ApiKeys/responses.js +0 -2
- package/codegen/datamodel/ApiKeys/types.d.ts +0 -32
- package/codegen/datamodel/ApiKeys/types.js +0 -11
- package/codegen/datamodel/Assets/errors.d.ts +0 -11
- package/codegen/datamodel/Assets/errors.js +0 -17
- package/codegen/datamodel/Assets/index.d.ts +0 -3
- package/codegen/datamodel/Assets/index.js +0 -19
- package/codegen/datamodel/Assets/responses.d.ts +0 -47
- package/codegen/datamodel/Assets/responses.js +0 -2
- package/codegen/datamodel/Assets/types.d.ts +0 -225
- package/codegen/datamodel/Assets/types.js +0 -75
- package/codegen/datamodel/Auth/errors.js +0 -1
- package/codegen/datamodel/Auth/index.d.ts +0 -2
- package/codegen/datamodel/Auth/index.js +0 -18
- package/codegen/datamodel/Auth/responses.d.ts +0 -358
- package/codegen/datamodel/Auth/responses.js +0 -2
- package/codegen/datamodel/Auth/types.d.ts +0 -615
- package/codegen/datamodel/Auth/types.js +0 -127
- package/codegen/datamodel/BlockchainIndexing/errors.js +0 -1
- package/codegen/datamodel/BlockchainIndexing/index.d.ts +0 -1
- package/codegen/datamodel/BlockchainIndexing/index.js +0 -17
- package/codegen/datamodel/BlockchainIndexing/responses.js +0 -2
- package/codegen/datamodel/BlockchainIndexing/types.js +0 -1
- package/codegen/datamodel/Blockchains/errors.js +0 -1
- package/codegen/datamodel/Blockchains/index.d.ts +0 -2
- package/codegen/datamodel/Blockchains/index.js +0 -18
- package/codegen/datamodel/Blockchains/responses.d.ts +0 -12
- package/codegen/datamodel/Blockchains/responses.js +0 -2
- package/codegen/datamodel/Blockchains/types.d.ts +0 -270
- package/codegen/datamodel/Blockchains/types.js +0 -53
- package/codegen/datamodel/Callbacks/errors.js +0 -1
- package/codegen/datamodel/Callbacks/index.d.ts +0 -2
- package/codegen/datamodel/Callbacks/index.js +0 -18
- package/codegen/datamodel/Callbacks/responses.d.ts +0 -36
- package/codegen/datamodel/Callbacks/responses.js +0 -2
- package/codegen/datamodel/Callbacks/types.d.ts +0 -43
- package/codegen/datamodel/Callbacks/types.js +0 -39
- package/codegen/datamodel/Foundations/errors.d.ts +0 -131
- package/codegen/datamodel/Foundations/errors.js +0 -182
- package/codegen/datamodel/Foundations/index.d.ts +0 -2
- package/codegen/datamodel/Foundations/index.js +0 -18
- package/codegen/datamodel/Foundations/responses.js +0 -1
- package/codegen/datamodel/Foundations/types.d.ts +0 -9759
- package/codegen/datamodel/Foundations/types.js +0 -57755
- package/codegen/datamodel/Orgs/errors.js +0 -1
- package/codegen/datamodel/Orgs/index.d.ts +0 -2
- package/codegen/datamodel/Orgs/index.js +0 -18
- package/codegen/datamodel/Orgs/responses.d.ts +0 -45
- package/codegen/datamodel/Orgs/responses.js +0 -2
- package/codegen/datamodel/Orgs/types.d.ts +0 -240
- package/codegen/datamodel/Orgs/types.js +0 -39
- package/codegen/datamodel/Permissions/errors.js +0 -1
- package/codegen/datamodel/Permissions/index.d.ts +0 -2
- package/codegen/datamodel/Permissions/index.js +0 -18
- package/codegen/datamodel/Permissions/responses.d.ts +0 -75
- package/codegen/datamodel/Permissions/responses.js +0 -2
- package/codegen/datamodel/Permissions/types.d.ts +0 -93
- package/codegen/datamodel/Permissions/types.js +0 -43
- package/codegen/datamodel/PolicyExecution/errors.d.ts +0 -11
- package/codegen/datamodel/PolicyExecution/errors.js +0 -17
- package/codegen/datamodel/PolicyExecution/index.d.ts +0 -3
- package/codegen/datamodel/PolicyExecution/index.js +0 -19
- package/codegen/datamodel/PolicyExecution/responses.d.ts +0 -19
- package/codegen/datamodel/PolicyExecution/responses.js +0 -2
- package/codegen/datamodel/PolicyExecution/types.d.ts +0 -60
- package/codegen/datamodel/PolicyExecution/types.js +0 -17
- package/codegen/datamodel/PolicyManagement/errors.js +0 -1
- package/codegen/datamodel/PolicyManagement/index.d.ts +0 -2
- package/codegen/datamodel/PolicyManagement/index.js +0 -18
- package/codegen/datamodel/PolicyManagement/responses.d.ts +0 -83
- package/codegen/datamodel/PolicyManagement/responses.js +0 -2
- package/codegen/datamodel/PolicyManagement/types.d.ts +0 -391
- package/codegen/datamodel/PolicyManagement/types.js +0 -95
- package/codegen/datamodel/PublicKeys/errors.js +0 -1
- package/codegen/datamodel/PublicKeys/index.d.ts +0 -2
- package/codegen/datamodel/PublicKeys/index.js +0 -18
- package/codegen/datamodel/PublicKeys/responses.d.ts +0 -56
- package/codegen/datamodel/PublicKeys/responses.js +0 -2
- package/codegen/datamodel/PublicKeys/types.d.ts +0 -223
- package/codegen/datamodel/PublicKeys/types.js +0 -59
- package/codegen/datamodel/Signers/errors.js +0 -1
- package/codegen/datamodel/Signers/index.d.ts +0 -2
- package/codegen/datamodel/Signers/index.js +0 -18
- package/codegen/datamodel/Signers/responses.d.ts +0 -27
- package/codegen/datamodel/Signers/responses.js +0 -2
- package/codegen/datamodel/Signers/types.d.ts +0 -21
- package/codegen/datamodel/Signers/types.js +0 -2
- package/codegen/datamodel/Wallets/errors.js +0 -1
- package/codegen/datamodel/Wallets/index.d.ts +0 -2
- package/codegen/datamodel/Wallets/index.js +0 -18
- package/codegen/datamodel/Wallets/responses.d.ts +0 -92
- package/codegen/datamodel/Wallets/responses.js +0 -2
- package/codegen/datamodel/Wallets/types.d.ts +0 -677
- package/codegen/datamodel/Wallets/types.js +0 -251
- package/dfnsApiClient.d.ts +0 -39
- package/dfnsApiClient.js +0 -63
- package/dfnsAuthenticator.d.ts +0 -17
- package/dfnsAuthenticator.js +0 -29
- package/dfnsDelegatedApiClient.d.ts +0 -38
- package/dfnsDelegatedApiClient.js +0 -63
- package/dfnsError.d.ts +0 -5
- package/dfnsError.js +0 -11
- package/generated/policies/client.d.ts +0 -13
- package/generated/policies/client.js +0 -92
- package/generated/policies/delegatedClient.d.ts +0 -18
- package/generated/policies/delegatedClient.js +0 -153
- package/generated/policies/index.d.ts +0 -3
- package/generated/policies/index.js +0 -19
- package/generated/policies/types.js +0 -2
- package/generated/signers/client.d.ts +0 -7
- package/generated/signers/client.js +0 -22
- package/generated/signers/delegatedClient.d.ts +0 -7
- package/generated/signers/delegatedClient.js +0 -22
- package/generated/signers/index.d.ts +0 -3
- package/generated/signers/index.js +0 -19
- package/generated/signers/types.js +0 -2
- package/generated/wallets/client.d.ts +0 -25
- package/generated/wallets/client.js +0 -228
- package/generated/wallets/delegatedClient.d.ts +0 -34
- package/generated/wallets/delegatedClient.js +0 -349
- package/generated/wallets/index.d.ts +0 -3
- package/generated/wallets/index.js +0 -19
- package/generated/wallets/types.js +0 -2
- package/generated/webhooks/client.d.ts +0 -14
- package/generated/webhooks/client.js +0 -103
- package/generated/webhooks/delegatedClient.d.ts +0 -19
- package/generated/webhooks/delegatedClient.js +0 -164
- package/generated/webhooks/index.d.ts +0 -3
- package/generated/webhooks/index.js +0 -19
- package/generated/webhooks/types.js +0 -2
- package/index.d.ts +0 -7
- package/index.js +0 -23
- package/signer.d.ts +0 -52
- package/signer.js +0 -2
- package/store.d.ts +0 -79
- package/store.js +0 -2
- package/types/policies.d.ts +0 -1
- package/types/policies.js +0 -17
- package/types/signers.d.ts +0 -1
- package/types/signers.js +0 -17
- package/types/wallets.d.ts +0 -1
- package/types/wallets.js +0 -17
- package/types/webhooks.d.ts +0 -1
- package/types/webhooks.js +0 -17
- package/utils/base64.d.ts +0 -3
- package/utils/base64.js +0 -20
- package/utils/fetch.d.ts +0 -12
- package/utils/fetch.js +0 -94
- package/utils/index.d.ts +0 -4
- package/utils/index.js +0 -20
- package/utils/nonce.d.ts +0 -1
- package/utils/nonce.js +0 -12
- package/utils/url.d.ts +0 -4
- package/utils/url.js +0 -16
- /package/{codegen/datamodel/Auth/errors.d.ts → README.md} +0 -0
- /package/codegen/datamodel/{BlockchainIndexing/errors.d.ts → Auth/errors.ts} +0 -0
- /package/codegen/datamodel/BlockchainIndexing/{types.d.ts → errors.ts} +0 -0
- /package/codegen/datamodel/{Blockchains/errors.d.ts → BlockchainIndexing/types.ts} +0 -0
- /package/codegen/datamodel/{Callbacks/errors.d.ts → Blockchains/errors.ts} +0 -0
- /package/codegen/datamodel/{Foundations/responses.d.ts → Callbacks/errors.ts} +0 -0
- /package/codegen/datamodel/{Orgs/errors.d.ts → Foundations/responses.ts} +0 -0
- /package/codegen/datamodel/{Permissions/errors.d.ts → Orgs/errors.ts} +0 -0
- /package/codegen/datamodel/{PolicyManagement/errors.d.ts → Permissions/errors.ts} +0 -0
- /package/codegen/datamodel/{PublicKeys/errors.d.ts → PolicyManagement/errors.ts} +0 -0
- /package/codegen/datamodel/{Signers/errors.d.ts → PublicKeys/errors.ts} +0 -0
- /package/codegen/datamodel/{Wallets/errors.d.ts → Signers/errors.ts} +0 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import * as Auth from '../datamodel/Auth'
|
|
2
|
+
import * as Foundations from '../datamodel/Foundations'
|
|
3
|
+
|
|
4
|
+
export type CreateDelegatedUserRegistrationRequest = {
|
|
5
|
+
body: Auth.CreateUserInput
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type CreateDelegatedUserRegistrationResponse =
|
|
9
|
+
Auth.UserRegistrationChallenge
|
|
10
|
+
|
|
11
|
+
export type CreateUserRegistrationRequest = {
|
|
12
|
+
body: Auth.CreateUserRegistrationInput
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type CreateUserRegistrationResponse = Auth.UserRegistration
|
|
16
|
+
|
|
17
|
+
export type CreateDelegatedUserLoginRequest = {
|
|
18
|
+
body: Auth.CreateDelegatedUserLoginInput
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type CreateDelegatedUserLoginResponse = Auth.UserLogin
|
|
22
|
+
|
|
23
|
+
export type CreateUserActionSignatureChallengeRequest = {
|
|
24
|
+
body: Auth.CreateUserActionSignatureChallengeInput
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type CreateUserActionSignatureChallengeResponse = Auth.UserLoginChallenge
|
|
28
|
+
|
|
29
|
+
export type CreateUserActionSignatureRequest = {
|
|
30
|
+
body: Auth.CreateUserLoginInput
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type CreateUserActionSignatureResponse = Auth.UserActionSignature
|
|
34
|
+
|
|
35
|
+
export type CreateUserCredentialChallengeRequest = {
|
|
36
|
+
body: Auth.CreateUserCredentialChallengeInput
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type CreateUserCredentialChallengeResponse = Auth.UserCredentialChallenge
|
|
40
|
+
|
|
41
|
+
export type CreateUserCredentialRequest = {
|
|
42
|
+
body: Auth.CreateUserCredentialInput
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type CreateUserCredentialResponse = Auth.CredentialInfo
|
|
46
|
+
|
|
47
|
+
export type ActivateCredentialRequest = {
|
|
48
|
+
body: Auth.ActivateCredentialInput
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type ActivateCredentialResponse = Auth.GenericSuccessMessage
|
|
52
|
+
|
|
53
|
+
export type DeactivateCredentialRequest = {
|
|
54
|
+
body: Auth.ActivateCredentialInput
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type DeactivateCredentialResponse = Auth.GenericSuccessMessage
|
|
58
|
+
|
|
59
|
+
export type ListUserCredentialsResponse = { items: Auth.CredentialInfo[] }
|
|
60
|
+
|
|
61
|
+
export type CreateUserActionSignatureFromCodeRequest = {
|
|
62
|
+
body: Auth.CreateUserLoginFromCodeInput
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type CreateUserActionSignatureFromCodeResponse = Auth.UserActionSignature
|
|
66
|
+
|
|
67
|
+
export type CreateCodeUserActionSignatureChallengeRequest = {
|
|
68
|
+
body: Auth.CreateCodeLoginChallengeInput
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type CreateCodeUserActionSignatureChallengeResponse =
|
|
72
|
+
Auth.UserLoginChallenge
|
|
73
|
+
|
|
74
|
+
export type CreateCodeUserActionSignatureRequest = {
|
|
75
|
+
body: Auth.CreateUserLoginInput
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type CreateCodeUserActionSignatureResponse = Auth.GenericSuccessMessage
|
|
79
|
+
|
|
80
|
+
export type ListPersonalAccessTokensResponse = {
|
|
81
|
+
items: Auth.AccessTokenInfoWithPublicKey[]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type CreatePersonalAccessTokenRequest = {
|
|
85
|
+
body: Auth.CreateAccessTokenInput
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type CreatePersonalAccessTokenResponse =
|
|
89
|
+
Auth.AccessTokenInfoWithPublicKey
|
|
90
|
+
|
|
91
|
+
export type GetPersonalAccessTokensRequest = {
|
|
92
|
+
tokenId: Foundations.EntityId
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type GetPersonalAccessTokensResponse = Auth.AccessTokenInfoWithPublicKey
|
|
96
|
+
|
|
97
|
+
export type UpdatePersonalAccessTokenRequest = {
|
|
98
|
+
tokenId: Foundations.EntityId
|
|
99
|
+
body: Auth.UpdateAccessTokenInput
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type UpdatePersonalAccessTokenResponse =
|
|
103
|
+
Auth.AccessTokenInfoWithPublicKey
|
|
104
|
+
|
|
105
|
+
export type ArchivePersonalAccessTokenRequest = {
|
|
106
|
+
tokenId: Foundations.EntityId
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type ArchivePersonalAccessTokenResponse =
|
|
110
|
+
Auth.AccessTokenInfoWithPublicKey
|
|
111
|
+
|
|
112
|
+
export type ActivatePersonalAccessTokenRequest = {
|
|
113
|
+
tokenId: Foundations.EntityId
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type ActivatePersonalAccessTokenResponse =
|
|
117
|
+
Auth.AccessTokenInfoWithPublicKey
|
|
118
|
+
|
|
119
|
+
export type DeactivatePersonalAccessTokenRequest = {
|
|
120
|
+
tokenId: Foundations.EntityId
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type DeactivatePersonalAccessTokenResponse =
|
|
124
|
+
Auth.AccessTokenInfoWithPublicKey
|
|
125
|
+
|
|
126
|
+
export type ListServiceAccountsResponse = {
|
|
127
|
+
items: Auth.UserAccessTokenInformation[]
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type CreateServiceAccountRequest = {
|
|
131
|
+
body: Auth.CreateAccessTokenInput
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type CreateServiceAccountResponse = Auth.UserAccessTokenInformation
|
|
135
|
+
|
|
136
|
+
export type GetServiceAccountRequest = {
|
|
137
|
+
serviceAccountId: Foundations.EntityId
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type GetServiceAccountResponse = Auth.UserAccessTokenInformation
|
|
141
|
+
|
|
142
|
+
export type UpdateServiceAccountRequest = {
|
|
143
|
+
serviceAccountId: Foundations.EntityId
|
|
144
|
+
body: Auth.UpdateAccessTokenInput
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type UpdateServiceAccountResponse = Auth.UserAccessTokenInformation
|
|
148
|
+
|
|
149
|
+
export type ArchiveServiceAccountRequest = {
|
|
150
|
+
serviceAccountId: Foundations.EntityId
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type ArchiveServiceAccountResponse = Auth.UserAccessTokenInformation
|
|
154
|
+
|
|
155
|
+
export type ActivateServiceAccountRequest = {
|
|
156
|
+
serviceAccountId: Foundations.EntityId
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type ActivateServiceAccountResponse = Auth.UserAccessTokenInformation
|
|
160
|
+
|
|
161
|
+
export type DeactivateServiceAccountRequest = {
|
|
162
|
+
serviceAccountId: Foundations.EntityId
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type DeactivateServiceAccountResponse = Auth.UserAccessTokenInformation
|
|
166
|
+
|
|
167
|
+
export type ListUsersResponse = { items: Auth.UserInfo[] }
|
|
168
|
+
|
|
169
|
+
export type CreateUserRequest = {
|
|
170
|
+
body: Auth.CreateUserInput
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export type CreateUserResponse = Auth.UserInfo
|
|
174
|
+
|
|
175
|
+
export type GetUserRequest = {
|
|
176
|
+
userId: Foundations.EntityId
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type GetUserResponse = Auth.UserInfo
|
|
180
|
+
|
|
181
|
+
export type UpdateUserRequest = {
|
|
182
|
+
userId: Foundations.EntityId
|
|
183
|
+
body: Auth.UpdateUserInput
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type UpdateUserResponse = Auth.UserInfo
|
|
187
|
+
|
|
188
|
+
export type ArchiveUserRequest = {
|
|
189
|
+
userId: Foundations.EntityId
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export type ArchiveUserResponse = Auth.UserInfo
|
|
193
|
+
|
|
194
|
+
export type ActivateUserRequest = {
|
|
195
|
+
userId: Foundations.EntityId
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export type ActivateUserResponse = Auth.UserInfo
|
|
199
|
+
|
|
200
|
+
export type DeactivateUserRequest = {
|
|
201
|
+
userId: Foundations.EntityId
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export type DeactivateUserResponse = Auth.UserInfo
|
|
205
|
+
|
|
206
|
+
export type ListApplicationsResponse = { items: Auth.AppInfoWithPublicKey[] }
|
|
207
|
+
|
|
208
|
+
export type CreateApplicationRequest = {
|
|
209
|
+
body: Auth.CreateApplicationInput
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type CreateApplicationResponse = Auth.AppInfoWithPublicKey
|
|
213
|
+
|
|
214
|
+
export type GetApplicationRequest = {
|
|
215
|
+
appId: Foundations.EntityId
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type GetApplicationResponse = Auth.AppInfoWithPublicKey
|
|
219
|
+
|
|
220
|
+
export type UpdateApplicationRequest = {
|
|
221
|
+
appId: Foundations.EntityId
|
|
222
|
+
body: Auth.UpdateApplicationInput
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type UpdateApplicationResponse = Auth.AppInfoWithPublicKey
|
|
226
|
+
|
|
227
|
+
export type ArchiveApplicationRequest = {
|
|
228
|
+
appId: Foundations.EntityId
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export type ArchiveApplicationResponse = Auth.AppInfoWithPublicKey
|
|
232
|
+
|
|
233
|
+
export type ActivateApplicationRequest = {
|
|
234
|
+
appId: Foundations.EntityId
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export type ActivateApplicationResponse = Auth.AppInfoWithPublicKey
|
|
238
|
+
|
|
239
|
+
export type DeactivateApplicationRequest = {
|
|
240
|
+
appId: Foundations.EntityId
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type DeactivateApplicationResponse = Auth.AppInfoWithPublicKey
|
|
244
|
+
|
|
245
|
+
export type CreateUserRecoveryRequest = {
|
|
246
|
+
body: Auth.CreateUserRecoveryInput
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export type CreateUserRecoveryResponse = Auth.UserRegistration
|
|
250
|
+
|
|
251
|
+
export type RestartDelegatedUserRegistrationRequest = {
|
|
252
|
+
body: Auth.CreateUserInput
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export type RestartDelegatedUserRegistrationResponse =
|
|
256
|
+
Auth.UserRegistrationChallenge
|
|
257
|
+
|
|
258
|
+
export type CreateDelegatedUserRecoveryRequest = {
|
|
259
|
+
body: Auth.CreateDelegatedUserRecoveryInput
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export type CreateDelegatedUserRecoveryResponse = Auth.UserRecoveryChallenge
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient'
|
|
2
|
+
import { simpleFetch } from '../../utils/fetch'
|
|
3
|
+
import { buildPathAndQuery } from '../../utils/url'
|
|
4
|
+
import * as T from './types'
|
|
5
|
+
|
|
6
|
+
export class BlockchainsClient {
|
|
7
|
+
constructor(private apiOptions: DfnsApiClientOptions) {}
|
|
8
|
+
|
|
9
|
+
async callViewFunction(
|
|
10
|
+
request: T.CallViewFunctionRequest
|
|
11
|
+
): Promise<T.CallViewFunctionResponse> {
|
|
12
|
+
const path = buildPathAndQuery('/blockchains/:network/call-read-function', {
|
|
13
|
+
path: { network: request.network },
|
|
14
|
+
query: {},
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const response = await simpleFetch(path, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
body: request.body,
|
|
20
|
+
apiOptions: this.apiOptions,
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
return response.json()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient'
|
|
2
|
+
import { simpleFetch } from '../../utils/fetch'
|
|
3
|
+
import { buildPathAndQuery } from '../../utils/url'
|
|
4
|
+
import * as T from './types'
|
|
5
|
+
|
|
6
|
+
export class DelegatedBlockchainsClient {
|
|
7
|
+
constructor(private apiOptions: DfnsDelegatedApiClientOptions) {}
|
|
8
|
+
|
|
9
|
+
async callViewFunction(
|
|
10
|
+
request: T.CallViewFunctionRequest
|
|
11
|
+
): Promise<T.CallViewFunctionResponse> {
|
|
12
|
+
const path = buildPathAndQuery('/blockchains/:network/call-read-function', {
|
|
13
|
+
path: { network: request.network },
|
|
14
|
+
query: {},
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const response = await simpleFetch(path, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
body: request.body,
|
|
20
|
+
apiOptions: this.apiOptions,
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
return response.json()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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 CallbacksClient {
|
|
7
|
+
constructor(private apiOptions: DfnsApiClientOptions) {}
|
|
8
|
+
|
|
9
|
+
async createCallbackSubscription(
|
|
10
|
+
request: T.CreateCallbackSubscriptionRequest
|
|
11
|
+
): Promise<T.CreateCallbackSubscriptionResponse> {
|
|
12
|
+
const path = buildPathAndQuery('/callback-subscriptions', {
|
|
13
|
+
path: {},
|
|
14
|
+
query: {},
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const response = await userActionFetch(path, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
body: request.body,
|
|
20
|
+
apiOptions: this.apiOptions,
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
return response.json()
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async getCallbackSubscriptionById(
|
|
27
|
+
request: T.GetCallbackSubscriptionByIdRequest
|
|
28
|
+
): Promise<T.GetCallbackSubscriptionByIdResponse> {
|
|
29
|
+
const path = buildPathAndQuery(
|
|
30
|
+
'/callback-subscriptions/:callbackSubscriptionId',
|
|
31
|
+
{
|
|
32
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
33
|
+
query: {},
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
const response = await simpleFetch(path, {
|
|
38
|
+
method: 'GET',
|
|
39
|
+
apiOptions: this.apiOptions,
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
return response.json()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async listCallbackSubscriptions(): Promise<T.ListCallbackSubscriptionsResponse> {
|
|
46
|
+
const path = buildPathAndQuery('/callback-subscriptions', {
|
|
47
|
+
path: {},
|
|
48
|
+
query: {},
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const response = await simpleFetch(path, {
|
|
52
|
+
method: 'GET',
|
|
53
|
+
apiOptions: this.apiOptions,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
return response.json()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async archiveCallbackSubscription(
|
|
60
|
+
request: T.ArchiveCallbackSubscriptionRequest
|
|
61
|
+
): Promise<T.ArchiveCallbackSubscriptionResponse> {
|
|
62
|
+
const path = buildPathAndQuery(
|
|
63
|
+
'/callback-subscriptions/:callbackSubscriptionId',
|
|
64
|
+
{
|
|
65
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
66
|
+
query: {},
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
const response = await userActionFetch(path, {
|
|
71
|
+
method: 'DELETE',
|
|
72
|
+
apiOptions: this.apiOptions,
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
return response.json()
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async getCallbackEventById(
|
|
79
|
+
request: T.GetCallbackEventByIdRequest
|
|
80
|
+
): Promise<T.GetCallbackEventByIdResponse> {
|
|
81
|
+
const path = buildPathAndQuery('/callback-events/:callbackEventId', {
|
|
82
|
+
path: { callbackEventId: request.callbackEventId },
|
|
83
|
+
query: {},
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const response = await simpleFetch(path, {
|
|
87
|
+
method: 'GET',
|
|
88
|
+
apiOptions: this.apiOptions,
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
return response.json()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async listCallbackEvents(): Promise<T.ListCallbackEventsResponse> {
|
|
95
|
+
const path = buildPathAndQuery('/callback-events', {
|
|
96
|
+
path: {},
|
|
97
|
+
query: {},
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
const response = await simpleFetch(path, {
|
|
101
|
+
method: 'GET',
|
|
102
|
+
apiOptions: this.apiOptions,
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
return response.json()
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
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 DelegatedCallbacksClient {
|
|
12
|
+
constructor(private apiOptions: DfnsDelegatedApiClientOptions) {}
|
|
13
|
+
|
|
14
|
+
async createCallbackSubscriptionInit(
|
|
15
|
+
request: T.CreateCallbackSubscriptionRequest
|
|
16
|
+
): Promise<UserActionChallengeResponse> {
|
|
17
|
+
const path = buildPathAndQuery('/callback-subscriptions', {
|
|
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 createCallbackSubscriptionComplete(
|
|
36
|
+
request: T.CreateCallbackSubscriptionRequest,
|
|
37
|
+
signedChallenge: SignUserActionChallengeRequest
|
|
38
|
+
): Promise<T.CreateCallbackSubscriptionResponse> {
|
|
39
|
+
const path = buildPathAndQuery('/callback-subscriptions', {
|
|
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 getCallbackSubscriptionById(
|
|
60
|
+
request: T.GetCallbackSubscriptionByIdRequest
|
|
61
|
+
): Promise<T.GetCallbackSubscriptionByIdResponse> {
|
|
62
|
+
const path = buildPathAndQuery(
|
|
63
|
+
'/callback-subscriptions/:callbackSubscriptionId',
|
|
64
|
+
{
|
|
65
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
66
|
+
query: {},
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
const response = await simpleFetch(path, {
|
|
71
|
+
method: 'GET',
|
|
72
|
+
apiOptions: this.apiOptions,
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
return response.json()
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async listCallbackSubscriptions(): Promise<T.ListCallbackSubscriptionsResponse> {
|
|
79
|
+
const path = buildPathAndQuery('/callback-subscriptions', {
|
|
80
|
+
path: {},
|
|
81
|
+
query: {},
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
const response = await simpleFetch(path, {
|
|
85
|
+
method: 'GET',
|
|
86
|
+
apiOptions: this.apiOptions,
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
return response.json()
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async archiveCallbackSubscriptionInit(
|
|
93
|
+
request: T.ArchiveCallbackSubscriptionRequest
|
|
94
|
+
): Promise<UserActionChallengeResponse> {
|
|
95
|
+
const path = buildPathAndQuery(
|
|
96
|
+
'/callback-subscriptions/:callbackSubscriptionId',
|
|
97
|
+
{
|
|
98
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
99
|
+
query: {},
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
const challenge = await BaseAuthApi.createUserActionChallenge(
|
|
104
|
+
{
|
|
105
|
+
userActionHttpMethod: 'DELETE',
|
|
106
|
+
userActionHttpPath: path,
|
|
107
|
+
userActionPayload: JSON.stringify({}),
|
|
108
|
+
userActionServerKind: 'Api',
|
|
109
|
+
},
|
|
110
|
+
this.apiOptions
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
return challenge
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async archiveCallbackSubscriptionComplete(
|
|
117
|
+
request: T.ArchiveCallbackSubscriptionRequest,
|
|
118
|
+
signedChallenge: SignUserActionChallengeRequest
|
|
119
|
+
): Promise<T.ArchiveCallbackSubscriptionResponse> {
|
|
120
|
+
const path = buildPathAndQuery(
|
|
121
|
+
'/callback-subscriptions/:callbackSubscriptionId',
|
|
122
|
+
{
|
|
123
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
124
|
+
query: {},
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
const { userAction } = await BaseAuthApi.signUserActionChallenge(
|
|
129
|
+
signedChallenge,
|
|
130
|
+
this.apiOptions
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
const response = await simpleFetch(path, {
|
|
134
|
+
method: 'DELETE',
|
|
135
|
+
body: {},
|
|
136
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
137
|
+
apiOptions: this.apiOptions,
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
return response.json()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async getCallbackEventById(
|
|
144
|
+
request: T.GetCallbackEventByIdRequest
|
|
145
|
+
): Promise<T.GetCallbackEventByIdResponse> {
|
|
146
|
+
const path = buildPathAndQuery('/callback-events/:callbackEventId', {
|
|
147
|
+
path: { callbackEventId: request.callbackEventId },
|
|
148
|
+
query: {},
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
const response = await simpleFetch(path, {
|
|
152
|
+
method: 'GET',
|
|
153
|
+
apiOptions: this.apiOptions,
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
return response.json()
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async listCallbackEvents(): Promise<T.ListCallbackEventsResponse> {
|
|
160
|
+
const path = buildPathAndQuery('/callback-events', {
|
|
161
|
+
path: {},
|
|
162
|
+
query: {},
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
const response = await simpleFetch(path, {
|
|
166
|
+
method: 'GET',
|
|
167
|
+
apiOptions: this.apiOptions,
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
return response.json()
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import * as Callbacks from '../datamodel/Callbacks'
|
|
1
|
+
import * as Callbacks from '../datamodel/Callbacks'
|
|
2
|
+
|
|
2
3
|
export type CreateCallbackSubscriptionRequest = {
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
4
|
+
body: Callbacks.CreateCallbackSubscriptionInput
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type CreateCallbackSubscriptionResponse = Callbacks.CallbackSubscription
|
|
8
|
+
|
|
6
9
|
export type GetCallbackSubscriptionByIdRequest = {
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
+
callbackSubscriptionId: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type GetCallbackSubscriptionByIdResponse = Callbacks.CallbackSubscription
|
|
14
|
+
|
|
10
15
|
export type ListCallbackSubscriptionsResponse = {
|
|
11
|
-
|
|
12
|
-
}
|
|
16
|
+
items: Callbacks.CallbackSubscription[]
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
export type ArchiveCallbackSubscriptionRequest = {
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
20
|
+
callbackSubscriptionId: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type ArchiveCallbackSubscriptionResponse = Callbacks.CallbackSubscription
|
|
24
|
+
|
|
17
25
|
export type GetCallbackEventByIdRequest = {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type
|
|
22
|
-
|
|
23
|
-
}
|
|
26
|
+
callbackEventId: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type GetCallbackEventByIdResponse = Callbacks.CallbackEvent
|
|
30
|
+
|
|
31
|
+
export type ListCallbackEventsResponse = { items: Callbacks.CallbackEvent[] }
|