@dfns/sdk 0.1.0-alpha.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.d.ts +53 -0
- package/baseAuthApi.js +39 -0
- package/codegen/ApiKeys/ApiKeysClient.d.ts +10 -0
- package/codegen/ApiKeys/ApiKeysClient.js +56 -0
- package/codegen/ApiKeys/DelegatedApiKeysClient.d.ts +13 -0
- package/codegen/ApiKeys/DelegatedApiKeysClient.js +88 -0
- package/codegen/ApiKeys/index.d.ts +3 -0
- package/codegen/ApiKeys/index.js +19 -0
- package/codegen/ApiKeys/types.d.ts +16 -0
- package/codegen/ApiKeys/types.js +2 -0
- package/codegen/Assets/AssetsClient.d.ts +14 -0
- package/codegen/Assets/AssetsClient.js +105 -0
- package/codegen/Assets/DelegatedAssetsClient.d.ts +18 -0
- package/codegen/Assets/DelegatedAssetsClient.js +152 -0
- package/codegen/Assets/index.d.ts +3 -0
- package/codegen/Assets/index.js +19 -0
- package/codegen/Assets/types.d.ts +39 -0
- package/codegen/Assets/types.js +2 -0
- package/codegen/Auth/AuthClient.d.ts +62 -0
- package/codegen/Auth/AuthClient.js +667 -0
- package/codegen/Auth/DelegatedAuthClient.d.ts +98 -0
- package/codegen/Auth/DelegatedAuthClient.js +1223 -0
- package/codegen/Auth/index.d.ts +3 -0
- package/codegen/Auth/index.js +19 -0
- package/codegen/Auth/types.d.ts +243 -0
- package/codegen/Auth/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.d.ts +23 -0
- package/codegen/Callbacks/types.js +2 -0
- package/codegen/Permissions/DelegatedPermissionsClient.d.ts +28 -0
- package/codegen/Permissions/DelegatedPermissionsClient.js +297 -0
- package/codegen/Permissions/PermissionsClient.d.ts +19 -0
- package/codegen/Permissions/PermissionsClient.js +169 -0
- package/codegen/Permissions/index.d.ts +3 -0
- package/codegen/Permissions/index.js +19 -0
- package/codegen/Permissions/types.d.ts +71 -0
- package/codegen/Permissions/types.js +2 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +11 -0
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +62 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
- package/codegen/PolicyExecution/PolicyExecutionClient.js +46 -0
- package/codegen/PolicyExecution/index.d.ts +3 -0
- package/codegen/PolicyExecution/index.js +19 -0
- package/codegen/PolicyExecution/types.d.ts +16 -0
- package/codegen/PolicyExecution/types.js +2 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +31 -0
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +324 -0
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +21 -0
- package/codegen/PolicyManagement/PolicyManagementClient.js +185 -0
- package/codegen/PolicyManagement/index.d.ts +3 -0
- package/codegen/PolicyManagement/index.js +19 -0
- package/codegen/PolicyManagement/types.d.ts +91 -0
- package/codegen/PolicyManagement/types.js +2 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
- package/codegen/PublicKeys/DelegatedPublicKeysClient.js +191 -0
- package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
- package/codegen/PublicKeys/PublicKeysClient.js +130 -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/Wallets/DelegatedWalletsClient.d.ts +26 -0
- package/codegen/Wallets/DelegatedWalletsClient.js +249 -0
- package/codegen/Wallets/WalletsClient.d.ts +21 -0
- package/codegen/Wallets/WalletsClient.js +188 -0
- package/codegen/Wallets/index.d.ts +3 -0
- package/codegen/Wallets/index.js +19 -0
- package/codegen/Wallets/types.d.ts +87 -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 +45 -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/index.d.ts +2 -0
- package/codegen/datamodel/Auth/index.js +18 -0
- package/codegen/datamodel/Auth/responses.d.ts +348 -0
- package/codegen/datamodel/Auth/responses.js +2 -0
- package/codegen/datamodel/Auth/types.d.ts +610 -0
- package/codegen/datamodel/Auth/types.js +127 -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 +121 -0
- package/codegen/datamodel/Foundations/errors.js +169 -0
- package/codegen/datamodel/Foundations/index.d.ts +2 -0
- package/codegen/datamodel/Foundations/index.js +18 -0
- package/codegen/datamodel/Foundations/types.d.ts +9754 -0
- package/codegen/datamodel/Foundations/types.js +57741 -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 +106 -0
- package/codegen/datamodel/Permissions/types.js +65 -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 +17 -0
- package/codegen/datamodel/PolicyExecution/responses.js +2 -0
- package/codegen/datamodel/PolicyExecution/types.d.ts +45 -0
- package/codegen/datamodel/PolicyExecution/types.js +15 -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 +252 -0
- package/codegen/datamodel/PolicyManagement/types.js +81 -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 +222 -0
- package/codegen/datamodel/PublicKeys/types.js +59 -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 +77 -0
- package/codegen/datamodel/Wallets/responses.js +2 -0
- package/codegen/datamodel/Wallets/types.d.ts +261 -0
- package/codegen/datamodel/Wallets/types.js +89 -0
- package/dfnsApiClient.d.ts +27 -0
- package/dfnsApiClient.js +45 -0
- package/dfnsAuthenticator.d.ts +11 -0
- package/dfnsAuthenticator.js +18 -0
- package/dfnsDelegatedApiClient.d.ts +24 -0
- package/dfnsDelegatedApiClient.js +41 -0
- package/dfnsError.d.ts +5 -0
- package/dfnsError.js +11 -0
- package/index.d.ts +3 -0
- package/index.js +19 -0
- package/package.json +11 -0
- package/signer.d.ts +47 -0
- package/signer.js +2 -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 +89 -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 +15 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AuthClient"), exports);
|
|
18
|
+
__exportStar(require("./DelegatedAuthClient"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import * as Auth from '../datamodel/Auth';
|
|
2
|
+
import * as Foundations from '../datamodel/Foundations';
|
|
3
|
+
export type CreateDelegatedUserRegistrationRequest = {
|
|
4
|
+
body: Auth.CreateUserInput;
|
|
5
|
+
};
|
|
6
|
+
export type CreateDelegatedUserRegistrationResponse = Auth.UserRegistrationChallenge;
|
|
7
|
+
export type CreateUserRegistrationRequest = {
|
|
8
|
+
body: Auth.CreateUserRegistrationInput;
|
|
9
|
+
};
|
|
10
|
+
export type CreateUserRegistrationResponse = Auth.UserRegistration;
|
|
11
|
+
export type CreateDelegatedUserLoginRequest = {
|
|
12
|
+
body: Auth.CreateDelegatedUserLoginInput;
|
|
13
|
+
};
|
|
14
|
+
export type CreateDelegatedUserLoginResponse = Auth.UserLogin;
|
|
15
|
+
export type CreateUserActionSignatureChallengeRequest = {
|
|
16
|
+
body: Auth.CreateUserActionSignatureChallengeInput;
|
|
17
|
+
};
|
|
18
|
+
export type CreateUserActionSignatureChallengeResponse = Auth.UserLoginChallenge;
|
|
19
|
+
export type CreateUserActionSignatureRequest = {
|
|
20
|
+
body: Auth.CreateUserLoginInput;
|
|
21
|
+
};
|
|
22
|
+
export type CreateUserActionSignatureResponse = Auth.UserActionSignature;
|
|
23
|
+
export type CreateUserCredentialChallengeRequest = {
|
|
24
|
+
body: Auth.CreateUserCredentialChallengeInput;
|
|
25
|
+
};
|
|
26
|
+
export type CreateUserCredentialChallengeResponse = Auth.UserCredentialChallenge;
|
|
27
|
+
export type CreateUserCredentialRequest = {
|
|
28
|
+
body: Auth.CreateUserCredentialInput;
|
|
29
|
+
};
|
|
30
|
+
export type CreateUserCredentialResponse = Auth.CredentialInfo;
|
|
31
|
+
export type ActivateCredentialRequest = {
|
|
32
|
+
body: Auth.ActivateCredentialInput;
|
|
33
|
+
};
|
|
34
|
+
export type ActivateCredentialResponse = Auth.GenericSuccessMessage;
|
|
35
|
+
export type DeactivateCredentialRequest = {
|
|
36
|
+
body: Auth.ActivateCredentialInput;
|
|
37
|
+
};
|
|
38
|
+
export type DeactivateCredentialResponse = Auth.GenericSuccessMessage;
|
|
39
|
+
export type ListUserCredentialsResponse = {
|
|
40
|
+
items: Auth.CredentialInfo[];
|
|
41
|
+
};
|
|
42
|
+
export type CreateUserActionSignatureFromCodeRequest = {
|
|
43
|
+
body: Auth.CreateUserLoginFromCodeInput;
|
|
44
|
+
};
|
|
45
|
+
export type CreateUserActionSignatureFromCodeResponse = Auth.UserActionSignature;
|
|
46
|
+
export type CreateCodeUserActionSignatureChallengeRequest = {
|
|
47
|
+
body: Auth.CreateCodeLoginChallengeInput;
|
|
48
|
+
};
|
|
49
|
+
export type CreateCodeUserActionSignatureChallengeResponse = Auth.UserLoginChallenge;
|
|
50
|
+
export type CreateCodeUserActionSignatureRequest = {
|
|
51
|
+
body: Auth.CreateUserLoginInput;
|
|
52
|
+
};
|
|
53
|
+
export type CreateCodeUserActionSignatureResponse = Auth.GenericSuccessMessage;
|
|
54
|
+
export type ListPersonalAccessTokensResponse = {
|
|
55
|
+
items: Auth.AccessTokenInfoWithPublicKey[];
|
|
56
|
+
};
|
|
57
|
+
export type CreatePersonalAccessTokenRequest = {
|
|
58
|
+
body: Auth.CreateAccessTokenInput;
|
|
59
|
+
};
|
|
60
|
+
export type CreatePersonalAccessTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
61
|
+
export type GetPersonalAccessTokensRequest = {
|
|
62
|
+
tokenId: Foundations.EntityId;
|
|
63
|
+
};
|
|
64
|
+
export type GetPersonalAccessTokensResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
65
|
+
export type UpdatePersonalAccessTokenRequest = {
|
|
66
|
+
tokenId: Foundations.EntityId;
|
|
67
|
+
body: Auth.UpdateAccessTokenInput;
|
|
68
|
+
};
|
|
69
|
+
export type UpdatePersonalAccessTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
70
|
+
export type ArchivePersonalAccessTokenRequest = {
|
|
71
|
+
tokenId: Foundations.EntityId;
|
|
72
|
+
};
|
|
73
|
+
export type ArchivePersonalAccessTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
74
|
+
export type ActivatePersonalAccessTokenRequest = {
|
|
75
|
+
tokenId: Foundations.EntityId;
|
|
76
|
+
};
|
|
77
|
+
export type ActivatePersonalAccessTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
78
|
+
export type DeactivatePersonalAccessTokenRequest = {
|
|
79
|
+
tokenId: Foundations.EntityId;
|
|
80
|
+
};
|
|
81
|
+
export type DeactivatePersonalAccessTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
82
|
+
export type ListServiceAccountsResponse = {
|
|
83
|
+
items: Auth.UserAccessTokenInformation[];
|
|
84
|
+
};
|
|
85
|
+
export type CreateServiceAccountRequest = {
|
|
86
|
+
body: Auth.CreateAccessTokenInput;
|
|
87
|
+
};
|
|
88
|
+
export type CreateServiceAccountResponse = Auth.UserAccessTokenInformation;
|
|
89
|
+
export type GetServiceAccountRequest = {
|
|
90
|
+
serviceAccountId: Foundations.EntityId;
|
|
91
|
+
};
|
|
92
|
+
export type GetServiceAccountResponse = Auth.UserAccessTokenInformation;
|
|
93
|
+
export type UpdateServiceAccountRequest = {
|
|
94
|
+
serviceAccountId: Foundations.EntityId;
|
|
95
|
+
body: Auth.UpdateAccessTokenInput;
|
|
96
|
+
};
|
|
97
|
+
export type UpdateServiceAccountResponse = Auth.UserAccessTokenInformation;
|
|
98
|
+
export type ArchiveServiceAccountRequest = {
|
|
99
|
+
serviceAccountId: Foundations.EntityId;
|
|
100
|
+
};
|
|
101
|
+
export type ArchiveServiceAccountResponse = Auth.UserAccessTokenInformation;
|
|
102
|
+
export type ActivateServiceAccountRequest = {
|
|
103
|
+
serviceAccountId: Foundations.EntityId;
|
|
104
|
+
};
|
|
105
|
+
export type ActivateServiceAccountResponse = Auth.UserAccessTokenInformation;
|
|
106
|
+
export type DeactivateServiceAccountRequest = {
|
|
107
|
+
serviceAccountId: Foundations.EntityId;
|
|
108
|
+
};
|
|
109
|
+
export type DeactivateServiceAccountResponse = Auth.UserAccessTokenInformation;
|
|
110
|
+
export type ListServiceAccountTokensRequest = {
|
|
111
|
+
serviceAccountId: Foundations.EntityId;
|
|
112
|
+
};
|
|
113
|
+
export type ListServiceAccountTokensResponse = {
|
|
114
|
+
items: Auth.AccessTokenInfoWithPublicKey[];
|
|
115
|
+
};
|
|
116
|
+
export type CreateServiceAccountTokenRequest = {
|
|
117
|
+
serviceAccountId: Foundations.EntityId;
|
|
118
|
+
body: Auth.CreateAccessTokenInput;
|
|
119
|
+
};
|
|
120
|
+
export type CreateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
121
|
+
export type GetServiceAccountTokenRequest = {
|
|
122
|
+
serviceAccountId: Foundations.EntityId;
|
|
123
|
+
tokenId: Foundations.EntityId;
|
|
124
|
+
};
|
|
125
|
+
export type GetServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
126
|
+
export type UpdateServiceAccountTokenRequest = {
|
|
127
|
+
serviceAccountId: Foundations.EntityId;
|
|
128
|
+
tokenId: Foundations.EntityId;
|
|
129
|
+
body: Auth.UpdateAccessTokenInput;
|
|
130
|
+
};
|
|
131
|
+
export type UpdateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
132
|
+
export type ArchiveServiceAccountTokenRequest = {
|
|
133
|
+
serviceAccountId: Foundations.EntityId;
|
|
134
|
+
tokenId: Foundations.EntityId;
|
|
135
|
+
};
|
|
136
|
+
export type ArchiveServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
137
|
+
export type ActivateServiceAccountTokenRequest = {
|
|
138
|
+
serviceAccountId: Foundations.EntityId;
|
|
139
|
+
tokenId: Foundations.EntityId;
|
|
140
|
+
};
|
|
141
|
+
export type ActivateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
142
|
+
export type DeactivateServiceAccountTokenRequest = {
|
|
143
|
+
serviceAccountId: Foundations.EntityId;
|
|
144
|
+
tokenId: Foundations.EntityId;
|
|
145
|
+
};
|
|
146
|
+
export type DeactivateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
147
|
+
export type ListUsersResponse = {
|
|
148
|
+
items: Auth.UserInfo[];
|
|
149
|
+
};
|
|
150
|
+
export type CreateUserRequest = {
|
|
151
|
+
body: Auth.CreateUserInput;
|
|
152
|
+
};
|
|
153
|
+
export type CreateUserResponse = Auth.UserInfo;
|
|
154
|
+
export type GetUserRequest = {
|
|
155
|
+
userId: Foundations.EntityId;
|
|
156
|
+
};
|
|
157
|
+
export type GetUserResponse = Auth.UserInfo;
|
|
158
|
+
export type UpdateUserRequest = {
|
|
159
|
+
userId: Foundations.EntityId;
|
|
160
|
+
body: Auth.UpdateUserInput;
|
|
161
|
+
};
|
|
162
|
+
export type UpdateUserResponse = Auth.UserInfo;
|
|
163
|
+
export type ArchiveUserRequest = {
|
|
164
|
+
userId: Foundations.EntityId;
|
|
165
|
+
};
|
|
166
|
+
export type ArchiveUserResponse = Auth.UserInfo;
|
|
167
|
+
export type ActivateUserRequest = {
|
|
168
|
+
userId: Foundations.EntityId;
|
|
169
|
+
};
|
|
170
|
+
export type ActivateUserResponse = Auth.UserInfo;
|
|
171
|
+
export type DeactivateUserRequest = {
|
|
172
|
+
userId: Foundations.EntityId;
|
|
173
|
+
};
|
|
174
|
+
export type DeactivateUserResponse = Auth.UserInfo;
|
|
175
|
+
export type ListApplicationsResponse = {
|
|
176
|
+
items: Auth.AppInfoWithPublicKey[];
|
|
177
|
+
};
|
|
178
|
+
export type CreateApplicationRequest = {
|
|
179
|
+
body: Auth.CreateApplicationInput;
|
|
180
|
+
};
|
|
181
|
+
export type CreateApplicationResponse = Auth.AppInfoWithPublicKey;
|
|
182
|
+
export type GetApplicationRequest = {
|
|
183
|
+
appId: Foundations.EntityId;
|
|
184
|
+
};
|
|
185
|
+
export type GetApplicationResponse = Auth.AppInfoWithPublicKey;
|
|
186
|
+
export type UpdateApplicationRequest = {
|
|
187
|
+
appId: Foundations.EntityId;
|
|
188
|
+
body: Auth.UpdateApplicationInput;
|
|
189
|
+
};
|
|
190
|
+
export type UpdateApplicationResponse = Auth.AppInfoWithPublicKey;
|
|
191
|
+
export type ArchiveApplicationRequest = {
|
|
192
|
+
appId: Foundations.EntityId;
|
|
193
|
+
};
|
|
194
|
+
export type ArchiveApplicationResponse = Auth.AppInfoWithPublicKey;
|
|
195
|
+
export type ActivateApplicationRequest = {
|
|
196
|
+
appId: Foundations.EntityId;
|
|
197
|
+
};
|
|
198
|
+
export type ActivateApplicationResponse = Auth.AppInfoWithPublicKey;
|
|
199
|
+
export type DeactivateApplicationRequest = {
|
|
200
|
+
appId: Foundations.EntityId;
|
|
201
|
+
};
|
|
202
|
+
export type DeactivateApplicationResponse = Auth.AppInfoWithPublicKey;
|
|
203
|
+
export type ListApplicationTokensRequest = {
|
|
204
|
+
appId: Foundations.EntityId;
|
|
205
|
+
};
|
|
206
|
+
export type ListApplicationTokensResponse = {
|
|
207
|
+
items: Auth.AccessTokenInfoWithPublicKey[];
|
|
208
|
+
};
|
|
209
|
+
export type CreateApplicationTokenRequest = {
|
|
210
|
+
appId: Foundations.EntityId;
|
|
211
|
+
body: Auth.CreateAccessTokenInput;
|
|
212
|
+
};
|
|
213
|
+
export type CreateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
214
|
+
export type GetApplicationTokenRequest = {
|
|
215
|
+
appId: Foundations.EntityId;
|
|
216
|
+
tokenId: Foundations.EntityId;
|
|
217
|
+
};
|
|
218
|
+
export type GetApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
219
|
+
export type UpdateApplicationTokenRequest = {
|
|
220
|
+
appId: Foundations.EntityId;
|
|
221
|
+
tokenId: Foundations.EntityId;
|
|
222
|
+
body: Auth.UpdateAccessTokenInput;
|
|
223
|
+
};
|
|
224
|
+
export type UpdateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
225
|
+
export type ArchiveApplicationTokenRequest = {
|
|
226
|
+
appId: Foundations.EntityId;
|
|
227
|
+
tokenId: Foundations.EntityId;
|
|
228
|
+
};
|
|
229
|
+
export type ArchiveApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
230
|
+
export type ActivateApplicationTokenRequest = {
|
|
231
|
+
appId: Foundations.EntityId;
|
|
232
|
+
tokenId: Foundations.EntityId;
|
|
233
|
+
};
|
|
234
|
+
export type ActivateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
235
|
+
export type DeactivateApplicationTokenRequest = {
|
|
236
|
+
appId: Foundations.EntityId;
|
|
237
|
+
tokenId: Foundations.EntityId;
|
|
238
|
+
};
|
|
239
|
+
export type DeactivateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
240
|
+
export type CreateUserRecoveryRequest = {
|
|
241
|
+
body: Auth.CreateUserLoginChallengeInput;
|
|
242
|
+
};
|
|
243
|
+
export type CreateUserRecoveryResponse = Auth.UserRegistration;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../dfnsApiClient';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class CallbacksClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
createCallbackSubscription(request: T.CreateCallbackSubscriptionRequest): Promise<T.CreateCallbackSubscriptionResponse>;
|
|
7
|
+
getCallbackSubscriptionById(request: T.GetCallbackSubscriptionByIdRequest): Promise<T.GetCallbackSubscriptionByIdResponse>;
|
|
8
|
+
listCallbackSubscriptions(): Promise<T.ListCallbackSubscriptionsResponse>;
|
|
9
|
+
archiveCallbackSubscription(request: T.ArchiveCallbackSubscriptionRequest): Promise<T.ArchiveCallbackSubscriptionResponse>;
|
|
10
|
+
getCallbackEventById(request: T.GetCallbackEventByIdRequest): Promise<T.GetCallbackEventByIdResponse>;
|
|
11
|
+
listCallbackEvents(): Promise<T.ListCallbackEventsResponse>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CallbacksClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class CallbacksClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async createCallbackSubscription(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions', {
|
|
12
|
+
path: {},
|
|
13
|
+
query: {},
|
|
14
|
+
});
|
|
15
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: request.body,
|
|
18
|
+
apiOptions: this.apiOptions,
|
|
19
|
+
});
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async getCallbackSubscriptionById(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions/:callbackSubscriptionId', {
|
|
24
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
25
|
+
query: {},
|
|
26
|
+
});
|
|
27
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
28
|
+
method: 'GET',
|
|
29
|
+
apiOptions: this.apiOptions,
|
|
30
|
+
});
|
|
31
|
+
return response.json();
|
|
32
|
+
}
|
|
33
|
+
async listCallbackSubscriptions() {
|
|
34
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions', {
|
|
35
|
+
path: {},
|
|
36
|
+
query: {},
|
|
37
|
+
});
|
|
38
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
39
|
+
method: 'GET',
|
|
40
|
+
apiOptions: this.apiOptions,
|
|
41
|
+
});
|
|
42
|
+
return response.json();
|
|
43
|
+
}
|
|
44
|
+
async archiveCallbackSubscription(request) {
|
|
45
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions/:callbackSubscriptionId', {
|
|
46
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
47
|
+
query: {},
|
|
48
|
+
});
|
|
49
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
50
|
+
method: 'DELETE',
|
|
51
|
+
apiOptions: this.apiOptions,
|
|
52
|
+
});
|
|
53
|
+
return response.json();
|
|
54
|
+
}
|
|
55
|
+
async getCallbackEventById(request) {
|
|
56
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-events/:callbackEventId', {
|
|
57
|
+
path: { callbackEventId: request.callbackEventId },
|
|
58
|
+
query: {},
|
|
59
|
+
});
|
|
60
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
61
|
+
method: 'GET',
|
|
62
|
+
apiOptions: this.apiOptions,
|
|
63
|
+
});
|
|
64
|
+
return response.json();
|
|
65
|
+
}
|
|
66
|
+
async listCallbackEvents() {
|
|
67
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-events', {
|
|
68
|
+
path: {},
|
|
69
|
+
query: {},
|
|
70
|
+
});
|
|
71
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
72
|
+
method: 'GET',
|
|
73
|
+
apiOptions: this.apiOptions,
|
|
74
|
+
});
|
|
75
|
+
return response.json();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.CallbacksClient = CallbacksClient;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedCallbacksClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
createCallbackSubscriptionInit(request: T.CreateCallbackSubscriptionRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
createCallbackSubscriptionComplete(request: T.CreateCallbackSubscriptionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateCallbackSubscriptionResponse>;
|
|
9
|
+
getCallbackSubscriptionById(request: T.GetCallbackSubscriptionByIdRequest): Promise<T.GetCallbackSubscriptionByIdResponse>;
|
|
10
|
+
listCallbackSubscriptions(): Promise<T.ListCallbackSubscriptionsResponse>;
|
|
11
|
+
archiveCallbackSubscriptionInit(request: T.ArchiveCallbackSubscriptionRequest): Promise<UserActionChallengeResponse>;
|
|
12
|
+
archiveCallbackSubscriptionComplete(request: T.ArchiveCallbackSubscriptionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchiveCallbackSubscriptionResponse>;
|
|
13
|
+
getCallbackEventById(request: T.GetCallbackEventByIdRequest): Promise<T.GetCallbackEventByIdResponse>;
|
|
14
|
+
listCallbackEvents(): Promise<T.ListCallbackEventsResponse>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedCallbacksClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedCallbacksClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async createCallbackSubscriptionInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions', {
|
|
13
|
+
path: {},
|
|
14
|
+
query: {},
|
|
15
|
+
});
|
|
16
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
17
|
+
userActionHttpMethod: 'POST',
|
|
18
|
+
userActionHttpPath: path,
|
|
19
|
+
userActionPayload: JSON.stringify(request.body),
|
|
20
|
+
userActionServerKind: 'Api',
|
|
21
|
+
}, this.apiOptions);
|
|
22
|
+
return challenge;
|
|
23
|
+
}
|
|
24
|
+
async createCallbackSubscriptionComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions', {
|
|
26
|
+
path: {},
|
|
27
|
+
query: {},
|
|
28
|
+
});
|
|
29
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
30
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
body: request.body,
|
|
33
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
34
|
+
apiOptions: this.apiOptions,
|
|
35
|
+
});
|
|
36
|
+
return response.json();
|
|
37
|
+
}
|
|
38
|
+
async getCallbackSubscriptionById(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions/:callbackSubscriptionId', {
|
|
40
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
41
|
+
query: {},
|
|
42
|
+
});
|
|
43
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
44
|
+
method: 'GET',
|
|
45
|
+
apiOptions: this.apiOptions,
|
|
46
|
+
});
|
|
47
|
+
return response.json();
|
|
48
|
+
}
|
|
49
|
+
async listCallbackSubscriptions() {
|
|
50
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions', {
|
|
51
|
+
path: {},
|
|
52
|
+
query: {},
|
|
53
|
+
});
|
|
54
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
55
|
+
method: 'GET',
|
|
56
|
+
apiOptions: this.apiOptions,
|
|
57
|
+
});
|
|
58
|
+
return response.json();
|
|
59
|
+
}
|
|
60
|
+
async archiveCallbackSubscriptionInit(request) {
|
|
61
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions/:callbackSubscriptionId', {
|
|
62
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
63
|
+
query: {},
|
|
64
|
+
});
|
|
65
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
66
|
+
userActionHttpMethod: 'DELETE',
|
|
67
|
+
userActionHttpPath: path,
|
|
68
|
+
userActionPayload: JSON.stringify({}),
|
|
69
|
+
userActionServerKind: 'Api',
|
|
70
|
+
}, this.apiOptions);
|
|
71
|
+
return challenge;
|
|
72
|
+
}
|
|
73
|
+
async archiveCallbackSubscriptionComplete(request, signedChallenge) {
|
|
74
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-subscriptions/:callbackSubscriptionId', {
|
|
75
|
+
path: { callbackSubscriptionId: request.callbackSubscriptionId },
|
|
76
|
+
query: {},
|
|
77
|
+
});
|
|
78
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
79
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
80
|
+
method: 'DELETE',
|
|
81
|
+
body: {},
|
|
82
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
83
|
+
apiOptions: this.apiOptions,
|
|
84
|
+
});
|
|
85
|
+
return response.json();
|
|
86
|
+
}
|
|
87
|
+
async getCallbackEventById(request) {
|
|
88
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-events/:callbackEventId', {
|
|
89
|
+
path: { callbackEventId: request.callbackEventId },
|
|
90
|
+
query: {},
|
|
91
|
+
});
|
|
92
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
93
|
+
method: 'GET',
|
|
94
|
+
apiOptions: this.apiOptions,
|
|
95
|
+
});
|
|
96
|
+
return response.json();
|
|
97
|
+
}
|
|
98
|
+
async listCallbackEvents() {
|
|
99
|
+
const path = (0, url_1.buildPathAndQuery)('/callback-events', {
|
|
100
|
+
path: {},
|
|
101
|
+
query: {},
|
|
102
|
+
});
|
|
103
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
104
|
+
method: 'GET',
|
|
105
|
+
apiOptions: this.apiOptions,
|
|
106
|
+
});
|
|
107
|
+
return response.json();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.DelegatedCallbacksClient = DelegatedCallbacksClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CallbacksClient"), exports);
|
|
18
|
+
__exportStar(require("./DelegatedCallbacksClient"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as Callbacks from '../datamodel/Callbacks';
|
|
2
|
+
export type CreateCallbackSubscriptionRequest = {
|
|
3
|
+
body: Callbacks.CreateCallbackSubscriptionInput;
|
|
4
|
+
};
|
|
5
|
+
export type CreateCallbackSubscriptionResponse = Callbacks.CallbackSubscription;
|
|
6
|
+
export type GetCallbackSubscriptionByIdRequest = {
|
|
7
|
+
callbackSubscriptionId: string;
|
|
8
|
+
};
|
|
9
|
+
export type GetCallbackSubscriptionByIdResponse = Callbacks.CallbackSubscription;
|
|
10
|
+
export type ListCallbackSubscriptionsResponse = {
|
|
11
|
+
items: Callbacks.CallbackSubscription[];
|
|
12
|
+
};
|
|
13
|
+
export type ArchiveCallbackSubscriptionRequest = {
|
|
14
|
+
callbackSubscriptionId: string;
|
|
15
|
+
};
|
|
16
|
+
export type ArchiveCallbackSubscriptionResponse = Callbacks.CallbackSubscription;
|
|
17
|
+
export type GetCallbackEventByIdRequest = {
|
|
18
|
+
callbackEventId: string;
|
|
19
|
+
};
|
|
20
|
+
export type GetCallbackEventByIdResponse = Callbacks.CallbackEvent;
|
|
21
|
+
export type ListCallbackEventsResponse = {
|
|
22
|
+
items: Callbacks.CallbackEvent[];
|
|
23
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedPermissionsClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
createPermissionInit(request: T.CreatePermissionRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
createPermissionComplete(request: T.CreatePermissionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePermissionResponse>;
|
|
9
|
+
updatePermissionInit(request: T.UpdatePermissionRequest): Promise<UserActionChallengeResponse>;
|
|
10
|
+
updatePermissionComplete(request: T.UpdatePermissionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePermissionResponse>;
|
|
11
|
+
archivePermissionInit(request: T.ArchivePermissionRequest): Promise<UserActionChallengeResponse>;
|
|
12
|
+
archivePermissionComplete(request: T.ArchivePermissionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePermissionResponse>;
|
|
13
|
+
getPermissionById(request: T.GetPermissionByIdRequest): Promise<T.GetPermissionByIdResponse>;
|
|
14
|
+
listPermissions(): Promise<T.ListPermissionsResponse>;
|
|
15
|
+
createPermissionPredicateInit(request: T.CreatePermissionPredicateRequest): Promise<UserActionChallengeResponse>;
|
|
16
|
+
createPermissionPredicateComplete(request: T.CreatePermissionPredicateRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePermissionPredicateResponse>;
|
|
17
|
+
updatePermissionPredicateInit(request: T.UpdatePermissionPredicateRequest): Promise<UserActionChallengeResponse>;
|
|
18
|
+
updatePermissionPredicateComplete(request: T.UpdatePermissionPredicateRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePermissionPredicateResponse>;
|
|
19
|
+
archivePermissionPredicateInit(request: T.ArchivePermissionPredicateRequest): Promise<UserActionChallengeResponse>;
|
|
20
|
+
archivePermissionPredicateComplete(request: T.ArchivePermissionPredicateRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePermissionPredicateResponse>;
|
|
21
|
+
listPermissionPredicates(request: T.ListPermissionPredicatesRequest): Promise<T.ListPermissionPredicatesResponse>;
|
|
22
|
+
createPermissionAssignmentInit(request: T.CreatePermissionAssignmentRequest): Promise<UserActionChallengeResponse>;
|
|
23
|
+
createPermissionAssignmentComplete(request: T.CreatePermissionAssignmentRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePermissionAssignmentResponse>;
|
|
24
|
+
revokePermissionAssignmentInit(request: T.RevokePermissionAssignmentRequest): Promise<UserActionChallengeResponse>;
|
|
25
|
+
revokePermissionAssignmentComplete(request: T.RevokePermissionAssignmentRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.RevokePermissionAssignmentResponse>;
|
|
26
|
+
listPermissionAssignments(request: T.ListPermissionAssignmentsRequest): Promise<T.ListPermissionAssignmentsResponse>;
|
|
27
|
+
listPermissionsHistorical(request: T.ListPermissionsHistoricalRequest): Promise<T.ListPermissionsHistoricalResponse>;
|
|
28
|
+
}
|