@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,729 @@
|
|
|
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 AuthClient {
|
|
7
|
+
constructor(private apiOptions: DfnsApiClientOptions) {}
|
|
8
|
+
|
|
9
|
+
async createDelegatedUserRegistration(
|
|
10
|
+
request: T.CreateDelegatedUserRegistrationRequest
|
|
11
|
+
): Promise<T.CreateDelegatedUserRegistrationResponse> {
|
|
12
|
+
const path = buildPathAndQuery('/auth/registration/delegated', {
|
|
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 createUserRegistration(
|
|
27
|
+
request: T.CreateUserRegistrationRequest
|
|
28
|
+
): Promise<T.CreateUserRegistrationResponse> {
|
|
29
|
+
const path = buildPathAndQuery('/auth/registration', {
|
|
30
|
+
path: {},
|
|
31
|
+
query: {},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const response = await simpleFetch(path, {
|
|
35
|
+
method: 'POST',
|
|
36
|
+
body: request.body,
|
|
37
|
+
apiOptions: this.apiOptions,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
return response.json()
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async createDelegatedUserLogin(
|
|
44
|
+
request: T.CreateDelegatedUserLoginRequest
|
|
45
|
+
): Promise<T.CreateDelegatedUserLoginResponse> {
|
|
46
|
+
const path = buildPathAndQuery('/auth/login/delegated', {
|
|
47
|
+
path: {},
|
|
48
|
+
query: {},
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const response = await userActionFetch(path, {
|
|
52
|
+
method: 'POST',
|
|
53
|
+
body: request.body,
|
|
54
|
+
apiOptions: this.apiOptions,
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
return response.json()
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async createUserActionSignatureChallenge(
|
|
61
|
+
request: T.CreateUserActionSignatureChallengeRequest
|
|
62
|
+
): Promise<T.CreateUserActionSignatureChallengeResponse> {
|
|
63
|
+
const path = buildPathAndQuery('/auth/action/init', {
|
|
64
|
+
path: {},
|
|
65
|
+
query: {},
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
const response = await simpleFetch(path, {
|
|
69
|
+
method: 'POST',
|
|
70
|
+
body: request.body,
|
|
71
|
+
apiOptions: this.apiOptions,
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
return response.json()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async createUserActionSignature(
|
|
78
|
+
request: T.CreateUserActionSignatureRequest
|
|
79
|
+
): Promise<T.CreateUserActionSignatureResponse> {
|
|
80
|
+
const path = buildPathAndQuery('/auth/action', {
|
|
81
|
+
path: {},
|
|
82
|
+
query: {},
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
const response = await simpleFetch(path, {
|
|
86
|
+
method: 'POST',
|
|
87
|
+
body: request.body,
|
|
88
|
+
apiOptions: this.apiOptions,
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
return response.json()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async createUserCredentialChallenge(
|
|
95
|
+
request: T.CreateUserCredentialChallengeRequest
|
|
96
|
+
): Promise<T.CreateUserCredentialChallengeResponse> {
|
|
97
|
+
const path = buildPathAndQuery('/auth/credentials/init', {
|
|
98
|
+
path: {},
|
|
99
|
+
query: {},
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
const response = await simpleFetch(path, {
|
|
103
|
+
method: 'POST',
|
|
104
|
+
body: request.body,
|
|
105
|
+
apiOptions: this.apiOptions,
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
return response.json()
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async createUserCredential(
|
|
112
|
+
request: T.CreateUserCredentialRequest
|
|
113
|
+
): Promise<T.CreateUserCredentialResponse> {
|
|
114
|
+
const path = buildPathAndQuery('/auth/credentials', {
|
|
115
|
+
path: {},
|
|
116
|
+
query: {},
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
const response = await userActionFetch(path, {
|
|
120
|
+
method: 'POST',
|
|
121
|
+
body: request.body,
|
|
122
|
+
apiOptions: this.apiOptions,
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
return response.json()
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async activateCredential(
|
|
129
|
+
request: T.ActivateCredentialRequest
|
|
130
|
+
): Promise<T.ActivateCredentialResponse> {
|
|
131
|
+
const path = buildPathAndQuery('/auth/credentials/activate', {
|
|
132
|
+
path: {},
|
|
133
|
+
query: {},
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
const response = await userActionFetch(path, {
|
|
137
|
+
method: 'PUT',
|
|
138
|
+
body: request.body,
|
|
139
|
+
apiOptions: this.apiOptions,
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
return response.json()
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async deactivateCredential(
|
|
146
|
+
request: T.DeactivateCredentialRequest
|
|
147
|
+
): Promise<T.DeactivateCredentialResponse> {
|
|
148
|
+
const path = buildPathAndQuery('/auth/credentials/deactivate', {
|
|
149
|
+
path: {},
|
|
150
|
+
query: {},
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
const response = await userActionFetch(path, {
|
|
154
|
+
method: 'PUT',
|
|
155
|
+
body: request.body,
|
|
156
|
+
apiOptions: this.apiOptions,
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
return response.json()
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
async listUserCredentials(): Promise<T.ListUserCredentialsResponse> {
|
|
163
|
+
const path = buildPathAndQuery('/auth/credentials', {
|
|
164
|
+
path: {},
|
|
165
|
+
query: {},
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
const response = await simpleFetch(path, {
|
|
169
|
+
method: 'GET',
|
|
170
|
+
apiOptions: this.apiOptions,
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
return response.json()
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async createUserActionSignatureFromCode(
|
|
177
|
+
request: T.CreateUserActionSignatureFromCodeRequest
|
|
178
|
+
): Promise<T.CreateUserActionSignatureFromCodeResponse> {
|
|
179
|
+
const path = buildPathAndQuery('/auth/action/code/verify', {
|
|
180
|
+
path: {},
|
|
181
|
+
query: {},
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
const response = await simpleFetch(path, {
|
|
185
|
+
method: 'POST',
|
|
186
|
+
body: request.body,
|
|
187
|
+
apiOptions: this.apiOptions,
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
return response.json()
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
async createCodeUserActionSignatureChallenge(
|
|
194
|
+
request: T.CreateCodeUserActionSignatureChallengeRequest
|
|
195
|
+
): Promise<T.CreateCodeUserActionSignatureChallengeResponse> {
|
|
196
|
+
const path = buildPathAndQuery('/auth/action/code/init', {
|
|
197
|
+
path: {},
|
|
198
|
+
query: {},
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
const response = await simpleFetch(path, {
|
|
202
|
+
method: 'POST',
|
|
203
|
+
body: request.body,
|
|
204
|
+
apiOptions: this.apiOptions,
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
return response.json()
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
async createCodeUserActionSignature(
|
|
211
|
+
request: T.CreateCodeUserActionSignatureRequest
|
|
212
|
+
): Promise<T.CreateCodeUserActionSignatureResponse> {
|
|
213
|
+
const path = buildPathAndQuery('/auth/action/code', {
|
|
214
|
+
path: {},
|
|
215
|
+
query: {},
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
const response = await simpleFetch(path, {
|
|
219
|
+
method: 'POST',
|
|
220
|
+
body: request.body,
|
|
221
|
+
apiOptions: this.apiOptions,
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
return response.json()
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
async listPersonalAccessTokens(): Promise<T.ListPersonalAccessTokensResponse> {
|
|
228
|
+
const path = buildPathAndQuery('/auth/pats', {
|
|
229
|
+
path: {},
|
|
230
|
+
query: {},
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
const response = await simpleFetch(path, {
|
|
234
|
+
method: 'GET',
|
|
235
|
+
apiOptions: this.apiOptions,
|
|
236
|
+
})
|
|
237
|
+
|
|
238
|
+
return response.json()
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
async createPersonalAccessToken(
|
|
242
|
+
request: T.CreatePersonalAccessTokenRequest
|
|
243
|
+
): Promise<T.CreatePersonalAccessTokenResponse> {
|
|
244
|
+
const path = buildPathAndQuery('/auth/pats', {
|
|
245
|
+
path: {},
|
|
246
|
+
query: {},
|
|
247
|
+
})
|
|
248
|
+
|
|
249
|
+
const response = await userActionFetch(path, {
|
|
250
|
+
method: 'POST',
|
|
251
|
+
body: request.body,
|
|
252
|
+
apiOptions: this.apiOptions,
|
|
253
|
+
})
|
|
254
|
+
|
|
255
|
+
return response.json()
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
async getPersonalAccessTokens(
|
|
259
|
+
request: T.GetPersonalAccessTokensRequest
|
|
260
|
+
): Promise<T.GetPersonalAccessTokensResponse> {
|
|
261
|
+
const path = buildPathAndQuery('/auth/pats/:tokenId', {
|
|
262
|
+
path: { tokenId: request.tokenId },
|
|
263
|
+
query: {},
|
|
264
|
+
})
|
|
265
|
+
|
|
266
|
+
const response = await simpleFetch(path, {
|
|
267
|
+
method: 'GET',
|
|
268
|
+
apiOptions: this.apiOptions,
|
|
269
|
+
})
|
|
270
|
+
|
|
271
|
+
return response.json()
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
async updatePersonalAccessToken(
|
|
275
|
+
request: T.UpdatePersonalAccessTokenRequest
|
|
276
|
+
): Promise<T.UpdatePersonalAccessTokenResponse> {
|
|
277
|
+
const path = buildPathAndQuery('/auth/pats/:tokenId', {
|
|
278
|
+
path: { tokenId: request.tokenId },
|
|
279
|
+
query: {},
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
const response = await userActionFetch(path, {
|
|
283
|
+
method: 'PUT',
|
|
284
|
+
body: request.body,
|
|
285
|
+
apiOptions: this.apiOptions,
|
|
286
|
+
})
|
|
287
|
+
|
|
288
|
+
return response.json()
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
async archivePersonalAccessToken(
|
|
292
|
+
request: T.ArchivePersonalAccessTokenRequest
|
|
293
|
+
): Promise<T.ArchivePersonalAccessTokenResponse> {
|
|
294
|
+
const path = buildPathAndQuery('/auth/pats/:tokenId', {
|
|
295
|
+
path: { tokenId: request.tokenId },
|
|
296
|
+
query: {},
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
const response = await userActionFetch(path, {
|
|
300
|
+
method: 'DELETE',
|
|
301
|
+
apiOptions: this.apiOptions,
|
|
302
|
+
})
|
|
303
|
+
|
|
304
|
+
return response.json()
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
async activatePersonalAccessToken(
|
|
308
|
+
request: T.ActivatePersonalAccessTokenRequest
|
|
309
|
+
): Promise<T.ActivatePersonalAccessTokenResponse> {
|
|
310
|
+
const path = buildPathAndQuery('/auth/pats/:tokenId/activate', {
|
|
311
|
+
path: { tokenId: request.tokenId },
|
|
312
|
+
query: {},
|
|
313
|
+
})
|
|
314
|
+
|
|
315
|
+
const response = await userActionFetch(path, {
|
|
316
|
+
method: 'PUT',
|
|
317
|
+
apiOptions: this.apiOptions,
|
|
318
|
+
})
|
|
319
|
+
|
|
320
|
+
return response.json()
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
async deactivatePersonalAccessToken(
|
|
324
|
+
request: T.DeactivatePersonalAccessTokenRequest
|
|
325
|
+
): Promise<T.DeactivatePersonalAccessTokenResponse> {
|
|
326
|
+
const path = buildPathAndQuery('/auth/pats/:tokenId/deactivate', {
|
|
327
|
+
path: { tokenId: request.tokenId },
|
|
328
|
+
query: {},
|
|
329
|
+
})
|
|
330
|
+
|
|
331
|
+
const response = await userActionFetch(path, {
|
|
332
|
+
method: 'PUT',
|
|
333
|
+
apiOptions: this.apiOptions,
|
|
334
|
+
})
|
|
335
|
+
|
|
336
|
+
return response.json()
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
async listServiceAccounts(): Promise<T.ListServiceAccountsResponse> {
|
|
340
|
+
const path = buildPathAndQuery('/auth/service-accounts', {
|
|
341
|
+
path: {},
|
|
342
|
+
query: {},
|
|
343
|
+
})
|
|
344
|
+
|
|
345
|
+
const response = await simpleFetch(path, {
|
|
346
|
+
method: 'GET',
|
|
347
|
+
apiOptions: this.apiOptions,
|
|
348
|
+
})
|
|
349
|
+
|
|
350
|
+
return response.json()
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
async createServiceAccount(
|
|
354
|
+
request: T.CreateServiceAccountRequest
|
|
355
|
+
): Promise<T.CreateServiceAccountResponse> {
|
|
356
|
+
const path = buildPathAndQuery('/auth/service-accounts', {
|
|
357
|
+
path: {},
|
|
358
|
+
query: {},
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
const response = await userActionFetch(path, {
|
|
362
|
+
method: 'POST',
|
|
363
|
+
body: request.body,
|
|
364
|
+
apiOptions: this.apiOptions,
|
|
365
|
+
})
|
|
366
|
+
|
|
367
|
+
return response.json()
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
async getServiceAccount(
|
|
371
|
+
request: T.GetServiceAccountRequest
|
|
372
|
+
): Promise<T.GetServiceAccountResponse> {
|
|
373
|
+
const path = buildPathAndQuery('/auth/service-accounts/:serviceAccountId', {
|
|
374
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
375
|
+
query: {},
|
|
376
|
+
})
|
|
377
|
+
|
|
378
|
+
const response = await simpleFetch(path, {
|
|
379
|
+
method: 'GET',
|
|
380
|
+
apiOptions: this.apiOptions,
|
|
381
|
+
})
|
|
382
|
+
|
|
383
|
+
return response.json()
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
async updateServiceAccount(
|
|
387
|
+
request: T.UpdateServiceAccountRequest
|
|
388
|
+
): Promise<T.UpdateServiceAccountResponse> {
|
|
389
|
+
const path = buildPathAndQuery('/auth/service-accounts/:serviceAccountId', {
|
|
390
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
391
|
+
query: {},
|
|
392
|
+
})
|
|
393
|
+
|
|
394
|
+
const response = await userActionFetch(path, {
|
|
395
|
+
method: 'PUT',
|
|
396
|
+
body: request.body,
|
|
397
|
+
apiOptions: this.apiOptions,
|
|
398
|
+
})
|
|
399
|
+
|
|
400
|
+
return response.json()
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
async archiveServiceAccount(
|
|
404
|
+
request: T.ArchiveServiceAccountRequest
|
|
405
|
+
): Promise<T.ArchiveServiceAccountResponse> {
|
|
406
|
+
const path = buildPathAndQuery('/auth/service-accounts/:serviceAccountId', {
|
|
407
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
408
|
+
query: {},
|
|
409
|
+
})
|
|
410
|
+
|
|
411
|
+
const response = await userActionFetch(path, {
|
|
412
|
+
method: 'DELETE',
|
|
413
|
+
apiOptions: this.apiOptions,
|
|
414
|
+
})
|
|
415
|
+
|
|
416
|
+
return response.json()
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
async activateServiceAccount(
|
|
420
|
+
request: T.ActivateServiceAccountRequest
|
|
421
|
+
): Promise<T.ActivateServiceAccountResponse> {
|
|
422
|
+
const path = buildPathAndQuery(
|
|
423
|
+
'/auth/service-accounts/:serviceAccountId/activate',
|
|
424
|
+
{
|
|
425
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
426
|
+
query: {},
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
const response = await userActionFetch(path, {
|
|
431
|
+
method: 'PUT',
|
|
432
|
+
apiOptions: this.apiOptions,
|
|
433
|
+
})
|
|
434
|
+
|
|
435
|
+
return response.json()
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
async deactivateServiceAccount(
|
|
439
|
+
request: T.DeactivateServiceAccountRequest
|
|
440
|
+
): Promise<T.DeactivateServiceAccountResponse> {
|
|
441
|
+
const path = buildPathAndQuery(
|
|
442
|
+
'/auth/service-accounts/:serviceAccountId/deactivate',
|
|
443
|
+
{
|
|
444
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
445
|
+
query: {},
|
|
446
|
+
}
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
const response = await userActionFetch(path, {
|
|
450
|
+
method: 'PUT',
|
|
451
|
+
apiOptions: this.apiOptions,
|
|
452
|
+
})
|
|
453
|
+
|
|
454
|
+
return response.json()
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
async listUsers(): Promise<T.ListUsersResponse> {
|
|
458
|
+
const path = buildPathAndQuery('/auth/users', {
|
|
459
|
+
path: {},
|
|
460
|
+
query: {},
|
|
461
|
+
})
|
|
462
|
+
|
|
463
|
+
const response = await simpleFetch(path, {
|
|
464
|
+
method: 'GET',
|
|
465
|
+
apiOptions: this.apiOptions,
|
|
466
|
+
})
|
|
467
|
+
|
|
468
|
+
return response.json()
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
async createUser(
|
|
472
|
+
request: T.CreateUserRequest
|
|
473
|
+
): Promise<T.CreateUserResponse> {
|
|
474
|
+
const path = buildPathAndQuery('/auth/users', {
|
|
475
|
+
path: {},
|
|
476
|
+
query: {},
|
|
477
|
+
})
|
|
478
|
+
|
|
479
|
+
const response = await userActionFetch(path, {
|
|
480
|
+
method: 'POST',
|
|
481
|
+
body: request.body,
|
|
482
|
+
apiOptions: this.apiOptions,
|
|
483
|
+
})
|
|
484
|
+
|
|
485
|
+
return response.json()
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
async getUser(request: T.GetUserRequest): Promise<T.GetUserResponse> {
|
|
489
|
+
const path = buildPathAndQuery('/auth/users/:userId', {
|
|
490
|
+
path: { userId: request.userId },
|
|
491
|
+
query: {},
|
|
492
|
+
})
|
|
493
|
+
|
|
494
|
+
const response = await simpleFetch(path, {
|
|
495
|
+
method: 'GET',
|
|
496
|
+
apiOptions: this.apiOptions,
|
|
497
|
+
})
|
|
498
|
+
|
|
499
|
+
return response.json()
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
async updateUser(
|
|
503
|
+
request: T.UpdateUserRequest
|
|
504
|
+
): Promise<T.UpdateUserResponse> {
|
|
505
|
+
const path = buildPathAndQuery('/auth/users/:userId', {
|
|
506
|
+
path: { userId: request.userId },
|
|
507
|
+
query: {},
|
|
508
|
+
})
|
|
509
|
+
|
|
510
|
+
const response = await userActionFetch(path, {
|
|
511
|
+
method: 'PUT',
|
|
512
|
+
body: request.body,
|
|
513
|
+
apiOptions: this.apiOptions,
|
|
514
|
+
})
|
|
515
|
+
|
|
516
|
+
return response.json()
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
async archiveUser(
|
|
520
|
+
request: T.ArchiveUserRequest
|
|
521
|
+
): Promise<T.ArchiveUserResponse> {
|
|
522
|
+
const path = buildPathAndQuery('/auth/users/:userId', {
|
|
523
|
+
path: { userId: request.userId },
|
|
524
|
+
query: {},
|
|
525
|
+
})
|
|
526
|
+
|
|
527
|
+
const response = await userActionFetch(path, {
|
|
528
|
+
method: 'DELETE',
|
|
529
|
+
apiOptions: this.apiOptions,
|
|
530
|
+
})
|
|
531
|
+
|
|
532
|
+
return response.json()
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
async activateUser(
|
|
536
|
+
request: T.ActivateUserRequest
|
|
537
|
+
): Promise<T.ActivateUserResponse> {
|
|
538
|
+
const path = buildPathAndQuery('/auth/users/:userId/activate', {
|
|
539
|
+
path: { userId: request.userId },
|
|
540
|
+
query: {},
|
|
541
|
+
})
|
|
542
|
+
|
|
543
|
+
const response = await userActionFetch(path, {
|
|
544
|
+
method: 'PUT',
|
|
545
|
+
apiOptions: this.apiOptions,
|
|
546
|
+
})
|
|
547
|
+
|
|
548
|
+
return response.json()
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
async deactivateUser(
|
|
552
|
+
request: T.DeactivateUserRequest
|
|
553
|
+
): Promise<T.DeactivateUserResponse> {
|
|
554
|
+
const path = buildPathAndQuery('/auth/users/:userId/deactivate', {
|
|
555
|
+
path: { userId: request.userId },
|
|
556
|
+
query: {},
|
|
557
|
+
})
|
|
558
|
+
|
|
559
|
+
const response = await userActionFetch(path, {
|
|
560
|
+
method: 'PUT',
|
|
561
|
+
apiOptions: this.apiOptions,
|
|
562
|
+
})
|
|
563
|
+
|
|
564
|
+
return response.json()
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
async listApplications(): Promise<T.ListApplicationsResponse> {
|
|
568
|
+
const path = buildPathAndQuery('/auth/apps', {
|
|
569
|
+
path: {},
|
|
570
|
+
query: {},
|
|
571
|
+
})
|
|
572
|
+
|
|
573
|
+
const response = await simpleFetch(path, {
|
|
574
|
+
method: 'GET',
|
|
575
|
+
apiOptions: this.apiOptions,
|
|
576
|
+
})
|
|
577
|
+
|
|
578
|
+
return response.json()
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
async createApplication(
|
|
582
|
+
request: T.CreateApplicationRequest
|
|
583
|
+
): Promise<T.CreateApplicationResponse> {
|
|
584
|
+
const path = buildPathAndQuery('/auth/apps', {
|
|
585
|
+
path: {},
|
|
586
|
+
query: {},
|
|
587
|
+
})
|
|
588
|
+
|
|
589
|
+
const response = await userActionFetch(path, {
|
|
590
|
+
method: 'POST',
|
|
591
|
+
body: request.body,
|
|
592
|
+
apiOptions: this.apiOptions,
|
|
593
|
+
})
|
|
594
|
+
|
|
595
|
+
return response.json()
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
async getApplication(
|
|
599
|
+
request: T.GetApplicationRequest
|
|
600
|
+
): Promise<T.GetApplicationResponse> {
|
|
601
|
+
const path = buildPathAndQuery('/auth/apps/:appId', {
|
|
602
|
+
path: { appId: request.appId },
|
|
603
|
+
query: {},
|
|
604
|
+
})
|
|
605
|
+
|
|
606
|
+
const response = await simpleFetch(path, {
|
|
607
|
+
method: 'GET',
|
|
608
|
+
apiOptions: this.apiOptions,
|
|
609
|
+
})
|
|
610
|
+
|
|
611
|
+
return response.json()
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
async updateApplication(
|
|
615
|
+
request: T.UpdateApplicationRequest
|
|
616
|
+
): Promise<T.UpdateApplicationResponse> {
|
|
617
|
+
const path = buildPathAndQuery('/auth/apps/:appId', {
|
|
618
|
+
path: { appId: request.appId },
|
|
619
|
+
query: {},
|
|
620
|
+
})
|
|
621
|
+
|
|
622
|
+
const response = await userActionFetch(path, {
|
|
623
|
+
method: 'PUT',
|
|
624
|
+
body: request.body,
|
|
625
|
+
apiOptions: this.apiOptions,
|
|
626
|
+
})
|
|
627
|
+
|
|
628
|
+
return response.json()
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
async archiveApplication(
|
|
632
|
+
request: T.ArchiveApplicationRequest
|
|
633
|
+
): Promise<T.ArchiveApplicationResponse> {
|
|
634
|
+
const path = buildPathAndQuery('/auth/apps/:appId', {
|
|
635
|
+
path: { appId: request.appId },
|
|
636
|
+
query: {},
|
|
637
|
+
})
|
|
638
|
+
|
|
639
|
+
const response = await userActionFetch(path, {
|
|
640
|
+
method: 'DELETE',
|
|
641
|
+
apiOptions: this.apiOptions,
|
|
642
|
+
})
|
|
643
|
+
|
|
644
|
+
return response.json()
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
async activateApplication(
|
|
648
|
+
request: T.ActivateApplicationRequest
|
|
649
|
+
): Promise<T.ActivateApplicationResponse> {
|
|
650
|
+
const path = buildPathAndQuery('/auth/apps/:appId/activate', {
|
|
651
|
+
path: { appId: request.appId },
|
|
652
|
+
query: {},
|
|
653
|
+
})
|
|
654
|
+
|
|
655
|
+
const response = await userActionFetch(path, {
|
|
656
|
+
method: 'PUT',
|
|
657
|
+
apiOptions: this.apiOptions,
|
|
658
|
+
})
|
|
659
|
+
|
|
660
|
+
return response.json()
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
async deactivateApplication(
|
|
664
|
+
request: T.DeactivateApplicationRequest
|
|
665
|
+
): Promise<T.DeactivateApplicationResponse> {
|
|
666
|
+
const path = buildPathAndQuery('/auth/apps/:appId/deactivate', {
|
|
667
|
+
path: { appId: request.appId },
|
|
668
|
+
query: {},
|
|
669
|
+
})
|
|
670
|
+
|
|
671
|
+
const response = await userActionFetch(path, {
|
|
672
|
+
method: 'PUT',
|
|
673
|
+
apiOptions: this.apiOptions,
|
|
674
|
+
})
|
|
675
|
+
|
|
676
|
+
return response.json()
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
async createUserRecovery(
|
|
680
|
+
request: T.CreateUserRecoveryRequest
|
|
681
|
+
): Promise<T.CreateUserRecoveryResponse> {
|
|
682
|
+
const path = buildPathAndQuery('/auth/recover/user', {
|
|
683
|
+
path: {},
|
|
684
|
+
query: {},
|
|
685
|
+
})
|
|
686
|
+
|
|
687
|
+
const response = await simpleFetch(path, {
|
|
688
|
+
method: 'POST',
|
|
689
|
+
body: request.body,
|
|
690
|
+
apiOptions: this.apiOptions,
|
|
691
|
+
})
|
|
692
|
+
|
|
693
|
+
return response.json()
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
async restartDelegatedUserRegistration(
|
|
697
|
+
request: T.RestartDelegatedUserRegistrationRequest
|
|
698
|
+
): Promise<T.RestartDelegatedUserRegistrationResponse> {
|
|
699
|
+
const path = buildPathAndQuery('/auth/registration/delegated/restart', {
|
|
700
|
+
path: {},
|
|
701
|
+
query: {},
|
|
702
|
+
})
|
|
703
|
+
|
|
704
|
+
const response = await userActionFetch(path, {
|
|
705
|
+
method: 'POST',
|
|
706
|
+
body: request.body,
|
|
707
|
+
apiOptions: this.apiOptions,
|
|
708
|
+
})
|
|
709
|
+
|
|
710
|
+
return response.json()
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
async createDelegatedUserRecovery(
|
|
714
|
+
request: T.CreateDelegatedUserRecoveryRequest
|
|
715
|
+
): Promise<T.CreateDelegatedUserRecoveryResponse> {
|
|
716
|
+
const path = buildPathAndQuery('/auth/recover/user/delegated', {
|
|
717
|
+
path: {},
|
|
718
|
+
query: {},
|
|
719
|
+
})
|
|
720
|
+
|
|
721
|
+
const response = await userActionFetch(path, {
|
|
722
|
+
method: 'POST',
|
|
723
|
+
body: request.body,
|
|
724
|
+
apiOptions: this.apiOptions,
|
|
725
|
+
})
|
|
726
|
+
|
|
727
|
+
return response.json()
|
|
728
|
+
}
|
|
729
|
+
}
|