@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,667 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthClient = void 0;
|
|
4
|
+
const fetch_1 = require("../../utils/fetch");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
6
|
+
class AuthClient {
|
|
7
|
+
constructor(apiOptions) {
|
|
8
|
+
this.apiOptions = apiOptions;
|
|
9
|
+
}
|
|
10
|
+
async createDelegatedUserRegistration(request) {
|
|
11
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated', {
|
|
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 createUserRegistration(request) {
|
|
23
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/registration', {
|
|
24
|
+
path: {},
|
|
25
|
+
query: {},
|
|
26
|
+
});
|
|
27
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
28
|
+
method: 'POST',
|
|
29
|
+
body: request.body,
|
|
30
|
+
apiOptions: this.apiOptions,
|
|
31
|
+
});
|
|
32
|
+
return response.json();
|
|
33
|
+
}
|
|
34
|
+
async createDelegatedUserLogin(request) {
|
|
35
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/login/delegated', {
|
|
36
|
+
path: {},
|
|
37
|
+
query: {},
|
|
38
|
+
});
|
|
39
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
body: request.body,
|
|
42
|
+
apiOptions: this.apiOptions,
|
|
43
|
+
});
|
|
44
|
+
return response.json();
|
|
45
|
+
}
|
|
46
|
+
async createUserActionSignatureChallenge(request) {
|
|
47
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/action/init', {
|
|
48
|
+
path: {},
|
|
49
|
+
query: {},
|
|
50
|
+
});
|
|
51
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
52
|
+
method: 'POST',
|
|
53
|
+
body: request.body,
|
|
54
|
+
apiOptions: this.apiOptions,
|
|
55
|
+
});
|
|
56
|
+
return response.json();
|
|
57
|
+
}
|
|
58
|
+
async createUserActionSignature(request) {
|
|
59
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/action', {
|
|
60
|
+
path: {},
|
|
61
|
+
query: {},
|
|
62
|
+
});
|
|
63
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
64
|
+
method: 'POST',
|
|
65
|
+
body: request.body,
|
|
66
|
+
apiOptions: this.apiOptions,
|
|
67
|
+
});
|
|
68
|
+
return response.json();
|
|
69
|
+
}
|
|
70
|
+
async createUserCredentialChallenge(request) {
|
|
71
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/credentials/init', {
|
|
72
|
+
path: {},
|
|
73
|
+
query: {},
|
|
74
|
+
});
|
|
75
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
body: request.body,
|
|
78
|
+
apiOptions: this.apiOptions,
|
|
79
|
+
});
|
|
80
|
+
return response.json();
|
|
81
|
+
}
|
|
82
|
+
async createUserCredential(request) {
|
|
83
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/credentials', {
|
|
84
|
+
path: {},
|
|
85
|
+
query: {},
|
|
86
|
+
});
|
|
87
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
88
|
+
method: 'POST',
|
|
89
|
+
body: request.body,
|
|
90
|
+
apiOptions: this.apiOptions,
|
|
91
|
+
});
|
|
92
|
+
return response.json();
|
|
93
|
+
}
|
|
94
|
+
async activateCredential(request) {
|
|
95
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/credentials/activate', {
|
|
96
|
+
path: {},
|
|
97
|
+
query: {},
|
|
98
|
+
});
|
|
99
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
100
|
+
method: 'PUT',
|
|
101
|
+
body: request.body,
|
|
102
|
+
apiOptions: this.apiOptions,
|
|
103
|
+
});
|
|
104
|
+
return response.json();
|
|
105
|
+
}
|
|
106
|
+
async deactivateCredential(request) {
|
|
107
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/credentials/deactivate', {
|
|
108
|
+
path: {},
|
|
109
|
+
query: {},
|
|
110
|
+
});
|
|
111
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
112
|
+
method: 'PUT',
|
|
113
|
+
body: request.body,
|
|
114
|
+
apiOptions: this.apiOptions,
|
|
115
|
+
});
|
|
116
|
+
return response.json();
|
|
117
|
+
}
|
|
118
|
+
async listUserCredentials() {
|
|
119
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/credentials', {
|
|
120
|
+
path: {},
|
|
121
|
+
query: {},
|
|
122
|
+
});
|
|
123
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
124
|
+
method: 'GET',
|
|
125
|
+
apiOptions: this.apiOptions,
|
|
126
|
+
});
|
|
127
|
+
return response.json();
|
|
128
|
+
}
|
|
129
|
+
async createUserActionSignatureFromCode(request) {
|
|
130
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/action/code/verify', {
|
|
131
|
+
path: {},
|
|
132
|
+
query: {},
|
|
133
|
+
});
|
|
134
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
135
|
+
method: 'POST',
|
|
136
|
+
body: request.body,
|
|
137
|
+
apiOptions: this.apiOptions,
|
|
138
|
+
});
|
|
139
|
+
return response.json();
|
|
140
|
+
}
|
|
141
|
+
async createCodeUserActionSignatureChallenge(request) {
|
|
142
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/action/code/init', {
|
|
143
|
+
path: {},
|
|
144
|
+
query: {},
|
|
145
|
+
});
|
|
146
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
147
|
+
method: 'POST',
|
|
148
|
+
body: request.body,
|
|
149
|
+
apiOptions: this.apiOptions,
|
|
150
|
+
});
|
|
151
|
+
return response.json();
|
|
152
|
+
}
|
|
153
|
+
async createCodeUserActionSignature(request) {
|
|
154
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/action/code', {
|
|
155
|
+
path: {},
|
|
156
|
+
query: {},
|
|
157
|
+
});
|
|
158
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
159
|
+
method: 'POST',
|
|
160
|
+
body: request.body,
|
|
161
|
+
apiOptions: this.apiOptions,
|
|
162
|
+
});
|
|
163
|
+
return response.json();
|
|
164
|
+
}
|
|
165
|
+
async listPersonalAccessTokens() {
|
|
166
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/pats', {
|
|
167
|
+
path: {},
|
|
168
|
+
query: {},
|
|
169
|
+
});
|
|
170
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
171
|
+
method: 'GET',
|
|
172
|
+
apiOptions: this.apiOptions,
|
|
173
|
+
});
|
|
174
|
+
return response.json();
|
|
175
|
+
}
|
|
176
|
+
async createPersonalAccessToken(request) {
|
|
177
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/pats', {
|
|
178
|
+
path: {},
|
|
179
|
+
query: {},
|
|
180
|
+
});
|
|
181
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
182
|
+
method: 'POST',
|
|
183
|
+
body: request.body,
|
|
184
|
+
apiOptions: this.apiOptions,
|
|
185
|
+
});
|
|
186
|
+
return response.json();
|
|
187
|
+
}
|
|
188
|
+
async getPersonalAccessTokens(request) {
|
|
189
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
|
|
190
|
+
path: { tokenId: request.tokenId },
|
|
191
|
+
query: {},
|
|
192
|
+
});
|
|
193
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
194
|
+
method: 'GET',
|
|
195
|
+
apiOptions: this.apiOptions,
|
|
196
|
+
});
|
|
197
|
+
return response.json();
|
|
198
|
+
}
|
|
199
|
+
async updatePersonalAccessToken(request) {
|
|
200
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
|
|
201
|
+
path: { tokenId: request.tokenId },
|
|
202
|
+
query: {},
|
|
203
|
+
});
|
|
204
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
205
|
+
method: 'PUT',
|
|
206
|
+
body: request.body,
|
|
207
|
+
apiOptions: this.apiOptions,
|
|
208
|
+
});
|
|
209
|
+
return response.json();
|
|
210
|
+
}
|
|
211
|
+
async archivePersonalAccessToken(request) {
|
|
212
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
|
|
213
|
+
path: { tokenId: request.tokenId },
|
|
214
|
+
query: {},
|
|
215
|
+
});
|
|
216
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
217
|
+
method: 'DELETE',
|
|
218
|
+
apiOptions: this.apiOptions,
|
|
219
|
+
});
|
|
220
|
+
return response.json();
|
|
221
|
+
}
|
|
222
|
+
async activatePersonalAccessToken(request) {
|
|
223
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId/activate', {
|
|
224
|
+
path: { tokenId: request.tokenId },
|
|
225
|
+
query: {},
|
|
226
|
+
});
|
|
227
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
228
|
+
method: 'PUT',
|
|
229
|
+
apiOptions: this.apiOptions,
|
|
230
|
+
});
|
|
231
|
+
return response.json();
|
|
232
|
+
}
|
|
233
|
+
async deactivatePersonalAccessToken(request) {
|
|
234
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId/deactivate', {
|
|
235
|
+
path: { tokenId: request.tokenId },
|
|
236
|
+
query: {},
|
|
237
|
+
});
|
|
238
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
239
|
+
method: 'PUT',
|
|
240
|
+
apiOptions: this.apiOptions,
|
|
241
|
+
});
|
|
242
|
+
return response.json();
|
|
243
|
+
}
|
|
244
|
+
async listServiceAccounts() {
|
|
245
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts', {
|
|
246
|
+
path: {},
|
|
247
|
+
query: {},
|
|
248
|
+
});
|
|
249
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
250
|
+
method: 'GET',
|
|
251
|
+
apiOptions: this.apiOptions,
|
|
252
|
+
});
|
|
253
|
+
return response.json();
|
|
254
|
+
}
|
|
255
|
+
async createServiceAccount(request) {
|
|
256
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts', {
|
|
257
|
+
path: {},
|
|
258
|
+
query: {},
|
|
259
|
+
});
|
|
260
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
261
|
+
method: 'POST',
|
|
262
|
+
body: request.body,
|
|
263
|
+
apiOptions: this.apiOptions,
|
|
264
|
+
});
|
|
265
|
+
return response.json();
|
|
266
|
+
}
|
|
267
|
+
async getServiceAccount(request) {
|
|
268
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
|
|
269
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
270
|
+
query: {},
|
|
271
|
+
});
|
|
272
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
273
|
+
method: 'GET',
|
|
274
|
+
apiOptions: this.apiOptions,
|
|
275
|
+
});
|
|
276
|
+
return response.json();
|
|
277
|
+
}
|
|
278
|
+
async updateServiceAccount(request) {
|
|
279
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
|
|
280
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
281
|
+
query: {},
|
|
282
|
+
});
|
|
283
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
284
|
+
method: 'PUT',
|
|
285
|
+
body: request.body,
|
|
286
|
+
apiOptions: this.apiOptions,
|
|
287
|
+
});
|
|
288
|
+
return response.json();
|
|
289
|
+
}
|
|
290
|
+
async archiveServiceAccount(request) {
|
|
291
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
|
|
292
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
293
|
+
query: {},
|
|
294
|
+
});
|
|
295
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
296
|
+
method: 'DELETE',
|
|
297
|
+
apiOptions: this.apiOptions,
|
|
298
|
+
});
|
|
299
|
+
return response.json();
|
|
300
|
+
}
|
|
301
|
+
async activateServiceAccount(request) {
|
|
302
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/activate', {
|
|
303
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
304
|
+
query: {},
|
|
305
|
+
});
|
|
306
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
307
|
+
method: 'PUT',
|
|
308
|
+
apiOptions: this.apiOptions,
|
|
309
|
+
});
|
|
310
|
+
return response.json();
|
|
311
|
+
}
|
|
312
|
+
async deactivateServiceAccount(request) {
|
|
313
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/deactivate', {
|
|
314
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
315
|
+
query: {},
|
|
316
|
+
});
|
|
317
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
318
|
+
method: 'PUT',
|
|
319
|
+
apiOptions: this.apiOptions,
|
|
320
|
+
});
|
|
321
|
+
return response.json();
|
|
322
|
+
}
|
|
323
|
+
async listServiceAccountTokens(request) {
|
|
324
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens', {
|
|
325
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
326
|
+
query: {},
|
|
327
|
+
});
|
|
328
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
329
|
+
method: 'GET',
|
|
330
|
+
apiOptions: this.apiOptions,
|
|
331
|
+
});
|
|
332
|
+
return response.json();
|
|
333
|
+
}
|
|
334
|
+
async createServiceAccountToken(request) {
|
|
335
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
|
|
336
|
+
path: { serviceAccountId: request.serviceAccountId },
|
|
337
|
+
query: {},
|
|
338
|
+
});
|
|
339
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
340
|
+
method: 'POST',
|
|
341
|
+
body: request.body,
|
|
342
|
+
apiOptions: this.apiOptions,
|
|
343
|
+
});
|
|
344
|
+
return response.json();
|
|
345
|
+
}
|
|
346
|
+
async getServiceAccountToken(request) {
|
|
347
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
348
|
+
path: {
|
|
349
|
+
serviceAccountId: request.serviceAccountId,
|
|
350
|
+
tokenId: request.tokenId,
|
|
351
|
+
},
|
|
352
|
+
query: {},
|
|
353
|
+
});
|
|
354
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
355
|
+
method: 'GET',
|
|
356
|
+
apiOptions: this.apiOptions,
|
|
357
|
+
});
|
|
358
|
+
return response.json();
|
|
359
|
+
}
|
|
360
|
+
async updateServiceAccountToken(request) {
|
|
361
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
362
|
+
path: {
|
|
363
|
+
serviceAccountId: request.serviceAccountId,
|
|
364
|
+
tokenId: request.tokenId,
|
|
365
|
+
},
|
|
366
|
+
query: {},
|
|
367
|
+
});
|
|
368
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
369
|
+
method: 'PUT',
|
|
370
|
+
body: request.body,
|
|
371
|
+
apiOptions: this.apiOptions,
|
|
372
|
+
});
|
|
373
|
+
return response.json();
|
|
374
|
+
}
|
|
375
|
+
async archiveServiceAccountToken(request) {
|
|
376
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
377
|
+
path: {
|
|
378
|
+
serviceAccountId: request.serviceAccountId,
|
|
379
|
+
tokenId: request.tokenId,
|
|
380
|
+
},
|
|
381
|
+
query: {},
|
|
382
|
+
});
|
|
383
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
384
|
+
method: 'DELETE',
|
|
385
|
+
apiOptions: this.apiOptions,
|
|
386
|
+
});
|
|
387
|
+
return response.json();
|
|
388
|
+
}
|
|
389
|
+
async activateServiceAccountToken(request) {
|
|
390
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/activate', {
|
|
391
|
+
path: {
|
|
392
|
+
serviceAccountId: request.serviceAccountId,
|
|
393
|
+
tokenId: request.tokenId,
|
|
394
|
+
},
|
|
395
|
+
query: {},
|
|
396
|
+
});
|
|
397
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
398
|
+
method: 'PUT',
|
|
399
|
+
apiOptions: this.apiOptions,
|
|
400
|
+
});
|
|
401
|
+
return response.json();
|
|
402
|
+
}
|
|
403
|
+
async deactivateServiceAccountToken(request) {
|
|
404
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/deactivate', {
|
|
405
|
+
path: {
|
|
406
|
+
serviceAccountId: request.serviceAccountId,
|
|
407
|
+
tokenId: request.tokenId,
|
|
408
|
+
},
|
|
409
|
+
query: {},
|
|
410
|
+
});
|
|
411
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
412
|
+
method: 'PUT',
|
|
413
|
+
apiOptions: this.apiOptions,
|
|
414
|
+
});
|
|
415
|
+
return response.json();
|
|
416
|
+
}
|
|
417
|
+
async listUsers() {
|
|
418
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/users', {
|
|
419
|
+
path: {},
|
|
420
|
+
query: {},
|
|
421
|
+
});
|
|
422
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
423
|
+
method: 'GET',
|
|
424
|
+
apiOptions: this.apiOptions,
|
|
425
|
+
});
|
|
426
|
+
return response.json();
|
|
427
|
+
}
|
|
428
|
+
async createUser(request) {
|
|
429
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/users', {
|
|
430
|
+
path: {},
|
|
431
|
+
query: {},
|
|
432
|
+
});
|
|
433
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
434
|
+
method: 'POST',
|
|
435
|
+
body: request.body,
|
|
436
|
+
apiOptions: this.apiOptions,
|
|
437
|
+
});
|
|
438
|
+
return response.json();
|
|
439
|
+
}
|
|
440
|
+
async getUser(request) {
|
|
441
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
|
|
442
|
+
path: { userId: request.userId },
|
|
443
|
+
query: {},
|
|
444
|
+
});
|
|
445
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
446
|
+
method: 'GET',
|
|
447
|
+
apiOptions: this.apiOptions,
|
|
448
|
+
});
|
|
449
|
+
return response.json();
|
|
450
|
+
}
|
|
451
|
+
async updateUser(request) {
|
|
452
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
|
|
453
|
+
path: { userId: request.userId },
|
|
454
|
+
query: {},
|
|
455
|
+
});
|
|
456
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
457
|
+
method: 'PUT',
|
|
458
|
+
body: request.body,
|
|
459
|
+
apiOptions: this.apiOptions,
|
|
460
|
+
});
|
|
461
|
+
return response.json();
|
|
462
|
+
}
|
|
463
|
+
async archiveUser(request) {
|
|
464
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
|
|
465
|
+
path: { userId: request.userId },
|
|
466
|
+
query: {},
|
|
467
|
+
});
|
|
468
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
469
|
+
method: 'DELETE',
|
|
470
|
+
apiOptions: this.apiOptions,
|
|
471
|
+
});
|
|
472
|
+
return response.json();
|
|
473
|
+
}
|
|
474
|
+
async activateUser(request) {
|
|
475
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId/activate', {
|
|
476
|
+
path: { userId: request.userId },
|
|
477
|
+
query: {},
|
|
478
|
+
});
|
|
479
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
480
|
+
method: 'PUT',
|
|
481
|
+
apiOptions: this.apiOptions,
|
|
482
|
+
});
|
|
483
|
+
return response.json();
|
|
484
|
+
}
|
|
485
|
+
async deactivateUser(request) {
|
|
486
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId/deactivate', {
|
|
487
|
+
path: { userId: request.userId },
|
|
488
|
+
query: {},
|
|
489
|
+
});
|
|
490
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
491
|
+
method: 'PUT',
|
|
492
|
+
apiOptions: this.apiOptions,
|
|
493
|
+
});
|
|
494
|
+
return response.json();
|
|
495
|
+
}
|
|
496
|
+
async listApplications() {
|
|
497
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps', {
|
|
498
|
+
path: {},
|
|
499
|
+
query: {},
|
|
500
|
+
});
|
|
501
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
502
|
+
method: 'GET',
|
|
503
|
+
apiOptions: this.apiOptions,
|
|
504
|
+
});
|
|
505
|
+
return response.json();
|
|
506
|
+
}
|
|
507
|
+
async createApplication(request) {
|
|
508
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps', {
|
|
509
|
+
path: {},
|
|
510
|
+
query: {},
|
|
511
|
+
});
|
|
512
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
513
|
+
method: 'POST',
|
|
514
|
+
body: request.body,
|
|
515
|
+
apiOptions: this.apiOptions,
|
|
516
|
+
});
|
|
517
|
+
return response.json();
|
|
518
|
+
}
|
|
519
|
+
async getApplication(request) {
|
|
520
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
|
|
521
|
+
path: { appId: request.appId },
|
|
522
|
+
query: {},
|
|
523
|
+
});
|
|
524
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
525
|
+
method: 'GET',
|
|
526
|
+
apiOptions: this.apiOptions,
|
|
527
|
+
});
|
|
528
|
+
return response.json();
|
|
529
|
+
}
|
|
530
|
+
async updateApplication(request) {
|
|
531
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
|
|
532
|
+
path: { appId: request.appId },
|
|
533
|
+
query: {},
|
|
534
|
+
});
|
|
535
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
536
|
+
method: 'PUT',
|
|
537
|
+
body: request.body,
|
|
538
|
+
apiOptions: this.apiOptions,
|
|
539
|
+
});
|
|
540
|
+
return response.json();
|
|
541
|
+
}
|
|
542
|
+
async archiveApplication(request) {
|
|
543
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
|
|
544
|
+
path: { appId: request.appId },
|
|
545
|
+
query: {},
|
|
546
|
+
});
|
|
547
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
548
|
+
method: 'DELETE',
|
|
549
|
+
apiOptions: this.apiOptions,
|
|
550
|
+
});
|
|
551
|
+
return response.json();
|
|
552
|
+
}
|
|
553
|
+
async activateApplication(request) {
|
|
554
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/activate', {
|
|
555
|
+
path: { appId: request.appId },
|
|
556
|
+
query: {},
|
|
557
|
+
});
|
|
558
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
559
|
+
method: 'PUT',
|
|
560
|
+
apiOptions: this.apiOptions,
|
|
561
|
+
});
|
|
562
|
+
return response.json();
|
|
563
|
+
}
|
|
564
|
+
async deactivateApplication(request) {
|
|
565
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/deactivate', {
|
|
566
|
+
path: { appId: request.appId },
|
|
567
|
+
query: {},
|
|
568
|
+
});
|
|
569
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
570
|
+
method: 'PUT',
|
|
571
|
+
apiOptions: this.apiOptions,
|
|
572
|
+
});
|
|
573
|
+
return response.json();
|
|
574
|
+
}
|
|
575
|
+
async listApplicationTokens(request) {
|
|
576
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', {
|
|
577
|
+
path: { appId: request.appId },
|
|
578
|
+
query: {},
|
|
579
|
+
});
|
|
580
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
581
|
+
method: 'GET',
|
|
582
|
+
apiOptions: this.apiOptions,
|
|
583
|
+
});
|
|
584
|
+
return response.json();
|
|
585
|
+
}
|
|
586
|
+
async createApplicationToken(request) {
|
|
587
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', {
|
|
588
|
+
path: { appId: request.appId },
|
|
589
|
+
query: {},
|
|
590
|
+
});
|
|
591
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
592
|
+
method: 'POST',
|
|
593
|
+
body: request.body,
|
|
594
|
+
apiOptions: this.apiOptions,
|
|
595
|
+
});
|
|
596
|
+
return response.json();
|
|
597
|
+
}
|
|
598
|
+
async getApplicationToken(request) {
|
|
599
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', {
|
|
600
|
+
path: { appId: request.appId, tokenId: request.tokenId },
|
|
601
|
+
query: {},
|
|
602
|
+
});
|
|
603
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
604
|
+
method: 'GET',
|
|
605
|
+
apiOptions: this.apiOptions,
|
|
606
|
+
});
|
|
607
|
+
return response.json();
|
|
608
|
+
}
|
|
609
|
+
async updateApplicationToken(request) {
|
|
610
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', {
|
|
611
|
+
path: { appId: request.appId, tokenId: request.tokenId },
|
|
612
|
+
query: {},
|
|
613
|
+
});
|
|
614
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
615
|
+
method: 'PUT',
|
|
616
|
+
body: request.body,
|
|
617
|
+
apiOptions: this.apiOptions,
|
|
618
|
+
});
|
|
619
|
+
return response.json();
|
|
620
|
+
}
|
|
621
|
+
async archiveApplicationToken(request) {
|
|
622
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId', {
|
|
623
|
+
path: { appId: request.appId, tokenId: request.tokenId },
|
|
624
|
+
query: {},
|
|
625
|
+
});
|
|
626
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
627
|
+
method: 'DELETE',
|
|
628
|
+
apiOptions: this.apiOptions,
|
|
629
|
+
});
|
|
630
|
+
return response.json();
|
|
631
|
+
}
|
|
632
|
+
async activateApplicationToken(request) {
|
|
633
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/activate', {
|
|
634
|
+
path: { appId: request.appId, tokenId: request.tokenId },
|
|
635
|
+
query: {},
|
|
636
|
+
});
|
|
637
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
638
|
+
method: 'PUT',
|
|
639
|
+
apiOptions: this.apiOptions,
|
|
640
|
+
});
|
|
641
|
+
return response.json();
|
|
642
|
+
}
|
|
643
|
+
async deactivateApplicationToken(request) {
|
|
644
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/deactivate', {
|
|
645
|
+
path: { appId: request.appId, tokenId: request.tokenId },
|
|
646
|
+
query: {},
|
|
647
|
+
});
|
|
648
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
649
|
+
method: 'PUT',
|
|
650
|
+
apiOptions: this.apiOptions,
|
|
651
|
+
});
|
|
652
|
+
return response.json();
|
|
653
|
+
}
|
|
654
|
+
async createUserRecovery(request) {
|
|
655
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/recover/user', {
|
|
656
|
+
path: {},
|
|
657
|
+
query: {},
|
|
658
|
+
});
|
|
659
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
660
|
+
method: 'POST',
|
|
661
|
+
body: request.body,
|
|
662
|
+
apiOptions: this.apiOptions,
|
|
663
|
+
});
|
|
664
|
+
return response.json();
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
exports.AuthClient = AuthClient;
|