@quantum-hub/qhubctl 1.12.0 → 1.13.0

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.
Files changed (58) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/init.js +3 -4
  3. package/dist/lib/error.js +3 -2
  4. package/dist/lib/init-user-input.d.ts +2 -0
  5. package/dist/lib/init-user-input.js +4 -1
  6. package/dist/service/auth-service.d.ts +2 -2
  7. package/dist/service/quantum-hub-service.js +1 -1
  8. package/dist/service/user-service.d.ts +3 -3
  9. package/dist/service/user-service.js +9 -9
  10. package/package.json +1 -1
  11. package/dist/client/users/apis/AuthenticationApi.d.ts +0 -31
  12. package/dist/client/users/apis/AuthenticationApi.js +0 -46
  13. package/dist/client/users/apis/ExpertsApi.d.ts +0 -44
  14. package/dist/client/users/apis/ExpertsApi.js +0 -75
  15. package/dist/client/users/apis/SearchApi.d.ts +0 -46
  16. package/dist/client/users/apis/SearchApi.js +0 -97
  17. package/dist/client/users/apis/UserSettingsApi.d.ts +0 -139
  18. package/dist/client/users/apis/UserSettingsApi.js +0 -380
  19. package/dist/client/users/apis/UserSettingsPersonalAccessTokensApi.d.ts +0 -64
  20. package/dist/client/users/apis/UserSettingsPersonalAccessTokensApi.js +0 -147
  21. package/dist/client/users/apis/UsersApi.d.ts +0 -70
  22. package/dist/client/users/apis/UsersApi.js +0 -133
  23. package/dist/client/users/apis/index.d.ts +0 -6
  24. package/dist/client/users/apis/index.js +0 -8
  25. package/dist/client/users/index.d.ts +0 -3
  26. package/dist/client/users/index.js +0 -5
  27. package/dist/client/users/models/AccessTokenCreateRequest.d.ts +0 -51
  28. package/dist/client/users/models/AccessTokenCreateRequest.js +0 -53
  29. package/dist/client/users/models/AccessTokenDto.d.ts +0 -75
  30. package/dist/client/users/models/AccessTokenDto.js +0 -61
  31. package/dist/client/users/models/AccessTokensResponse.d.ts +0 -38
  32. package/dist/client/users/models/AccessTokensResponse.js +0 -41
  33. package/dist/client/users/models/DefaultAccessTokenResponse.d.ts +0 -31
  34. package/dist/client/users/models/DefaultAccessTokenResponse.js +0 -38
  35. package/dist/client/users/models/Language.d.ts +0 -31
  36. package/dist/client/users/models/Language.js +0 -38
  37. package/dist/client/users/models/PageUserDto.d.ts +0 -94
  38. package/dist/client/users/models/PageUserDto.js +0 -61
  39. package/dist/client/users/models/Pageable.d.ts +0 -43
  40. package/dist/client/users/models/Pageable.js +0 -42
  41. package/dist/client/users/models/PageableObject.d.ts +0 -62
  42. package/dist/client/users/models/PageableObject.js +0 -49
  43. package/dist/client/users/models/PersonalAccessTokenPrincipal.d.ts +0 -38
  44. package/dist/client/users/models/PersonalAccessTokenPrincipal.js +0 -41
  45. package/dist/client/users/models/Skill.d.ts +0 -31
  46. package/dist/client/users/models/Skill.js +0 -38
  47. package/dist/client/users/models/SortObject.d.ts +0 -43
  48. package/dist/client/users/models/SortObject.js +0 -42
  49. package/dist/client/users/models/UpdateUserRequest.d.ts +0 -61
  50. package/dist/client/users/models/UpdateUserRequest.js +0 -48
  51. package/dist/client/users/models/UserDto.d.ts +0 -111
  52. package/dist/client/users/models/UserDto.js +0 -66
  53. package/dist/client/users/models/UserOverviewDto.d.ts +0 -67
  54. package/dist/client/users/models/UserOverviewDto.js +0 -50
  55. package/dist/client/users/models/index.d.ts +0 -14
  56. package/dist/client/users/models/index.js +0 -16
  57. package/dist/client/users/runtime.d.ts +0 -181
  58. package/dist/client/users/runtime.js +0 -325
@@ -1,380 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Quantum Platform User Service API
5
- * Part of the OpenAPI specification for the Quantum Platform.
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: support-hub@kipu-quantum.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import * as runtime from '../runtime.js';
15
- import { LanguageToJSON, SkillToJSON, UpdateUserRequestToJSON, UserDtoFromJSON, } from '../models/index.js';
16
- /**
17
- *
18
- */
19
- export class UserSettingsApi extends runtime.BaseAPI {
20
- /**
21
- * Adds a new language to the currently logged-in user\'s profile.
22
- * Adds a new language to the currently logged-in user\'s profile.
23
- */
24
- async addLanguageRaw(requestParameters, initOverrides) {
25
- if (requestParameters['language'] == null) {
26
- throw new runtime.RequiredError('language', 'Required parameter "language" was null or undefined when calling addLanguage().');
27
- }
28
- const queryParameters = {};
29
- const headerParameters = {};
30
- headerParameters['Content-Type'] = 'application/json';
31
- if (this.configuration && this.configuration.apiKey) {
32
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
33
- }
34
- if (this.configuration && this.configuration.accessToken) {
35
- // oauth required
36
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
37
- }
38
- const response = await this.request({
39
- path: `/me/languages`,
40
- method: 'POST',
41
- headers: headerParameters,
42
- query: queryParameters,
43
- body: LanguageToJSON(requestParameters['language']),
44
- }, initOverrides);
45
- return new runtime.JSONApiResponse(response, (jsonValue) => UserDtoFromJSON(jsonValue));
46
- }
47
- /**
48
- * Adds a new language to the currently logged-in user\'s profile.
49
- * Adds a new language to the currently logged-in user\'s profile.
50
- */
51
- async addLanguage(requestParameters, initOverrides) {
52
- const response = await this.addLanguageRaw(requestParameters, initOverrides);
53
- return await response.value();
54
- }
55
- /**
56
- * Adds a new skill to the currently logged-in user\'s profile.
57
- * Adds a new skill to the currently logged-in user\'s profile.
58
- */
59
- async addSkillRaw(requestParameters, initOverrides) {
60
- if (requestParameters['skill'] == null) {
61
- throw new runtime.RequiredError('skill', 'Required parameter "skill" was null or undefined when calling addSkill().');
62
- }
63
- const queryParameters = {};
64
- const headerParameters = {};
65
- headerParameters['Content-Type'] = 'application/json';
66
- if (this.configuration && this.configuration.apiKey) {
67
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
68
- }
69
- if (this.configuration && this.configuration.accessToken) {
70
- // oauth required
71
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
72
- }
73
- const response = await this.request({
74
- path: `/me/skills`,
75
- method: 'POST',
76
- headers: headerParameters,
77
- query: queryParameters,
78
- body: SkillToJSON(requestParameters['skill']),
79
- }, initOverrides);
80
- return new runtime.JSONApiResponse(response, (jsonValue) => UserDtoFromJSON(jsonValue));
81
- }
82
- /**
83
- * Adds a new skill to the currently logged-in user\'s profile.
84
- * Adds a new skill to the currently logged-in user\'s profile.
85
- */
86
- async addSkill(requestParameters, initOverrides) {
87
- const response = await this.addSkillRaw(requestParameters, initOverrides);
88
- return await response.value();
89
- }
90
- /**
91
- * Deletes a language from the currently logged-in user\'s profile.
92
- * Deletes a language from the currently logged-in user\'s profile.
93
- */
94
- async deleteLanguageRaw(requestParameters, initOverrides) {
95
- if (requestParameters['isoCode'] == null) {
96
- throw new runtime.RequiredError('isoCode', 'Required parameter "isoCode" was null or undefined when calling deleteLanguage().');
97
- }
98
- const queryParameters = {};
99
- const headerParameters = {};
100
- if (this.configuration && this.configuration.apiKey) {
101
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
102
- }
103
- if (this.configuration && this.configuration.accessToken) {
104
- // oauth required
105
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
106
- }
107
- const response = await this.request({
108
- path: `/me/languages/{isoCode}`.replace(`{${"isoCode"}}`, encodeURIComponent(String(requestParameters['isoCode']))),
109
- method: 'DELETE',
110
- headers: headerParameters,
111
- query: queryParameters,
112
- }, initOverrides);
113
- return new runtime.VoidApiResponse(response);
114
- }
115
- /**
116
- * Deletes a language from the currently logged-in user\'s profile.
117
- * Deletes a language from the currently logged-in user\'s profile.
118
- */
119
- async deleteLanguage(requestParameters, initOverrides) {
120
- await this.deleteLanguageRaw(requestParameters, initOverrides);
121
- }
122
- /**
123
- * Deletes a skill from the currently logged-in user\'s profile.
124
- * Deletes a skill from the currently logged-in user\'s profile.
125
- */
126
- async deleteSkillRaw(requestParameters, initOverrides) {
127
- if (requestParameters['name'] == null) {
128
- throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling deleteSkill().');
129
- }
130
- const queryParameters = {};
131
- const headerParameters = {};
132
- if (this.configuration && this.configuration.apiKey) {
133
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
134
- }
135
- if (this.configuration && this.configuration.accessToken) {
136
- // oauth required
137
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
138
- }
139
- const response = await this.request({
140
- path: `/me/skills/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))),
141
- method: 'DELETE',
142
- headers: headerParameters,
143
- query: queryParameters,
144
- }, initOverrides);
145
- return new runtime.VoidApiResponse(response);
146
- }
147
- /**
148
- * Deletes a skill from the currently logged-in user\'s profile.
149
- * Deletes a skill from the currently logged-in user\'s profile.
150
- */
151
- async deleteSkill(requestParameters, initOverrides) {
152
- await this.deleteSkillRaw(requestParameters, initOverrides);
153
- }
154
- /**
155
- * Deletes the currently logged-in user.
156
- * Deletes the currently logged-in user.
157
- */
158
- async deleteUserRaw(initOverrides) {
159
- const queryParameters = {};
160
- const headerParameters = {};
161
- if (this.configuration && this.configuration.apiKey) {
162
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
163
- }
164
- if (this.configuration && this.configuration.accessToken) {
165
- // oauth required
166
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
167
- }
168
- const response = await this.request({
169
- path: `/me`,
170
- method: 'DELETE',
171
- headers: headerParameters,
172
- query: queryParameters,
173
- }, initOverrides);
174
- return new runtime.VoidApiResponse(response);
175
- }
176
- /**
177
- * Deletes the currently logged-in user.
178
- * Deletes the currently logged-in user.
179
- */
180
- async deleteUser(initOverrides) {
181
- await this.deleteUserRaw(initOverrides);
182
- }
183
- /**
184
- * Returns the user details of the currently logged-in user.
185
- * Returns the user details of the currently logged-in user.
186
- */
187
- async getUserRaw(initOverrides) {
188
- const queryParameters = {};
189
- const headerParameters = {};
190
- if (this.configuration && this.configuration.apiKey) {
191
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
192
- }
193
- if (this.configuration && this.configuration.accessToken) {
194
- // oauth required
195
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
196
- }
197
- const response = await this.request({
198
- path: `/me`,
199
- method: 'GET',
200
- headers: headerParameters,
201
- query: queryParameters,
202
- }, initOverrides);
203
- return new runtime.JSONApiResponse(response, (jsonValue) => UserDtoFromJSON(jsonValue));
204
- }
205
- /**
206
- * Returns the user details of the currently logged-in user.
207
- * Returns the user details of the currently logged-in user.
208
- */
209
- async getUser(initOverrides) {
210
- const response = await this.getUserRaw(initOverrides);
211
- return await response.value();
212
- }
213
- /**
214
- * Updates the background image (profile page) of the currently logged-in user.
215
- * Updates the background image (profile page) of the currently logged-in user.
216
- */
217
- async updateBackgroundImageRaw(requestParameters, initOverrides) {
218
- if (requestParameters['file'] == null) {
219
- throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling updateBackgroundImage().');
220
- }
221
- const queryParameters = {};
222
- const headerParameters = {};
223
- if (this.configuration && this.configuration.apiKey) {
224
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
225
- }
226
- if (this.configuration && this.configuration.accessToken) {
227
- // oauth required
228
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
229
- }
230
- const consumes = [
231
- { contentType: 'multipart/form-data' },
232
- ];
233
- // @ts-ignore: canConsumeForm may be unused
234
- const canConsumeForm = runtime.canConsumeForm(consumes);
235
- let formParams;
236
- let useForm = false;
237
- // use FormData to transmit files using content-type "multipart/form-data"
238
- useForm = canConsumeForm;
239
- if (useForm) {
240
- formParams = new FormData();
241
- }
242
- else {
243
- formParams = new URLSearchParams();
244
- }
245
- if (requestParameters['file'] != null) {
246
- formParams.append('file', requestParameters['file']);
247
- }
248
- const response = await this.request({
249
- path: `/me/background-image`,
250
- method: 'POST',
251
- headers: headerParameters,
252
- query: queryParameters,
253
- body: formParams,
254
- }, initOverrides);
255
- return new runtime.VoidApiResponse(response);
256
- }
257
- /**
258
- * Updates the background image (profile page) of the currently logged-in user.
259
- * Updates the background image (profile page) of the currently logged-in user.
260
- */
261
- async updateBackgroundImage(requestParameters, initOverrides) {
262
- await this.updateBackgroundImageRaw(requestParameters, initOverrides);
263
- }
264
- /**
265
- * Updates the notification settings of the currently logged-in user.
266
- * Updates the notification settings of the currently logged-in user.
267
- */
268
- async updateNotificationSettingsRaw(initOverrides) {
269
- const queryParameters = {};
270
- const headerParameters = {};
271
- if (this.configuration && this.configuration.apiKey) {
272
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
273
- }
274
- if (this.configuration && this.configuration.accessToken) {
275
- // oauth required
276
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
277
- }
278
- const response = await this.request({
279
- path: `/me/notification-settings`,
280
- method: 'PUT',
281
- headers: headerParameters,
282
- query: queryParameters,
283
- }, initOverrides);
284
- return new runtime.JSONApiResponse(response, (jsonValue) => UserDtoFromJSON(jsonValue));
285
- }
286
- /**
287
- * Updates the notification settings of the currently logged-in user.
288
- * Updates the notification settings of the currently logged-in user.
289
- */
290
- async updateNotificationSettings(initOverrides) {
291
- const response = await this.updateNotificationSettingsRaw(initOverrides);
292
- return await response.value();
293
- }
294
- /**
295
- * Updates the profile image of the currently logged-in user.
296
- * Updates the profile image of the currently logged-in user.
297
- */
298
- async updateProfileImageRaw(requestParameters, initOverrides) {
299
- if (requestParameters['file'] == null) {
300
- throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling updateProfileImage().');
301
- }
302
- const queryParameters = {};
303
- const headerParameters = {};
304
- if (this.configuration && this.configuration.apiKey) {
305
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
306
- }
307
- if (this.configuration && this.configuration.accessToken) {
308
- // oauth required
309
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
310
- }
311
- const consumes = [
312
- { contentType: 'multipart/form-data' },
313
- ];
314
- // @ts-ignore: canConsumeForm may be unused
315
- const canConsumeForm = runtime.canConsumeForm(consumes);
316
- let formParams;
317
- let useForm = false;
318
- // use FormData to transmit files using content-type "multipart/form-data"
319
- useForm = canConsumeForm;
320
- if (useForm) {
321
- formParams = new FormData();
322
- }
323
- else {
324
- formParams = new URLSearchParams();
325
- }
326
- if (requestParameters['file'] != null) {
327
- formParams.append('file', requestParameters['file']);
328
- }
329
- const response = await this.request({
330
- path: `/me/profile-image`,
331
- method: 'POST',
332
- headers: headerParameters,
333
- query: queryParameters,
334
- body: formParams,
335
- }, initOverrides);
336
- return new runtime.VoidApiResponse(response);
337
- }
338
- /**
339
- * Updates the profile image of the currently logged-in user.
340
- * Updates the profile image of the currently logged-in user.
341
- */
342
- async updateProfileImage(requestParameters, initOverrides) {
343
- await this.updateProfileImageRaw(requestParameters, initOverrides);
344
- }
345
- /**
346
- * Updates the user details of the currently logged-in user.
347
- * Updates the user details of the currently logged-in user.
348
- */
349
- async updateUserRaw(requestParameters, initOverrides) {
350
- if (requestParameters['updateUserRequest'] == null) {
351
- throw new runtime.RequiredError('updateUserRequest', 'Required parameter "updateUserRequest" was null or undefined when calling updateUser().');
352
- }
353
- const queryParameters = {};
354
- const headerParameters = {};
355
- headerParameters['Content-Type'] = 'application/json';
356
- if (this.configuration && this.configuration.apiKey) {
357
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
358
- }
359
- if (this.configuration && this.configuration.accessToken) {
360
- // oauth required
361
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
362
- }
363
- const response = await this.request({
364
- path: `/me`,
365
- method: 'PUT',
366
- headers: headerParameters,
367
- query: queryParameters,
368
- body: UpdateUserRequestToJSON(requestParameters['updateUserRequest']),
369
- }, initOverrides);
370
- return new runtime.JSONApiResponse(response, (jsonValue) => UserDtoFromJSON(jsonValue));
371
- }
372
- /**
373
- * Updates the user details of the currently logged-in user.
374
- * Updates the user details of the currently logged-in user.
375
- */
376
- async updateUser(requestParameters, initOverrides) {
377
- const response = await this.updateUserRaw(requestParameters, initOverrides);
378
- return await response.value();
379
- }
380
- }
@@ -1,64 +0,0 @@
1
- /**
2
- * Quantum Platform User Service API
3
- * Part of the OpenAPI specification for the Quantum Platform.
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: support-hub@kipu-quantum.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import * as runtime from '../runtime.js';
13
- import type { AccessTokenCreateRequest, AccessTokenDto, AccessTokensResponse, DefaultAccessTokenResponse } from '../models/index.js';
14
- export interface CreateAccessTokenRequest {
15
- accessTokenCreateRequest: AccessTokenCreateRequest;
16
- }
17
- export interface DeleteAccessTokenRequest {
18
- id: string;
19
- }
20
- /**
21
- *
22
- */
23
- export declare class UserSettingsPersonalAccessTokensApi extends runtime.BaseAPI {
24
- /**
25
- * Creates a new personal access token for the current user.
26
- * Creates a new personal access token for the current user.
27
- */
28
- createAccessTokenRaw(requestParameters: CreateAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessTokenDto>>;
29
- /**
30
- * Creates a new personal access token for the current user.
31
- * Creates a new personal access token for the current user.
32
- */
33
- createAccessToken(requestParameters: CreateAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessTokenDto>;
34
- /**
35
- * Deletes a personal access token of the current user.
36
- * Deletes a personal access token of the current user.
37
- */
38
- deleteAccessTokenRaw(requestParameters: DeleteAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
39
- /**
40
- * Deletes a personal access token of the current user.
41
- * Deletes a personal access token of the current user.
42
- */
43
- deleteAccessToken(requestParameters: DeleteAccessTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
44
- /**
45
- * Returns the personal access tokens of the current user.
46
- * Returns the personal access tokens of the current user.
47
- */
48
- getAccessTokensRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessTokensResponse>>;
49
- /**
50
- * Returns the personal access tokens of the current user.
51
- * Returns the personal access tokens of the current user.
52
- */
53
- getAccessTokens(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessTokensResponse>;
54
- /**
55
- * Updates the default personal access token of the current user.
56
- * Updates the default personal access token of the current user.
57
- */
58
- updateDefaultAccessTokenRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefaultAccessTokenResponse>>;
59
- /**
60
- * Updates the default personal access token of the current user.
61
- * Updates the default personal access token of the current user.
62
- */
63
- updateDefaultAccessToken(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DefaultAccessTokenResponse>;
64
- }
@@ -1,147 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Quantum Platform User Service API
5
- * Part of the OpenAPI specification for the Quantum Platform.
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: support-hub@kipu-quantum.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import * as runtime from '../runtime.js';
15
- import { AccessTokenCreateRequestToJSON, AccessTokenDtoFromJSON, AccessTokensResponseFromJSON, DefaultAccessTokenResponseFromJSON, } from '../models/index.js';
16
- /**
17
- *
18
- */
19
- export class UserSettingsPersonalAccessTokensApi extends runtime.BaseAPI {
20
- /**
21
- * Creates a new personal access token for the current user.
22
- * Creates a new personal access token for the current user.
23
- */
24
- async createAccessTokenRaw(requestParameters, initOverrides) {
25
- if (requestParameters['accessTokenCreateRequest'] == null) {
26
- throw new runtime.RequiredError('accessTokenCreateRequest', 'Required parameter "accessTokenCreateRequest" was null or undefined when calling createAccessToken().');
27
- }
28
- const queryParameters = {};
29
- const headerParameters = {};
30
- headerParameters['Content-Type'] = 'application/json';
31
- if (this.configuration && this.configuration.apiKey) {
32
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
33
- }
34
- if (this.configuration && this.configuration.accessToken) {
35
- // oauth required
36
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
37
- }
38
- const response = await this.request({
39
- path: `/me/access-tokens`,
40
- method: 'POST',
41
- headers: headerParameters,
42
- query: queryParameters,
43
- body: AccessTokenCreateRequestToJSON(requestParameters['accessTokenCreateRequest']),
44
- }, initOverrides);
45
- return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenDtoFromJSON(jsonValue));
46
- }
47
- /**
48
- * Creates a new personal access token for the current user.
49
- * Creates a new personal access token for the current user.
50
- */
51
- async createAccessToken(requestParameters, initOverrides) {
52
- const response = await this.createAccessTokenRaw(requestParameters, initOverrides);
53
- return await response.value();
54
- }
55
- /**
56
- * Deletes a personal access token of the current user.
57
- * Deletes a personal access token of the current user.
58
- */
59
- async deleteAccessTokenRaw(requestParameters, initOverrides) {
60
- if (requestParameters['id'] == null) {
61
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteAccessToken().');
62
- }
63
- const queryParameters = {};
64
- const headerParameters = {};
65
- if (this.configuration && this.configuration.apiKey) {
66
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
67
- }
68
- if (this.configuration && this.configuration.accessToken) {
69
- // oauth required
70
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
71
- }
72
- const response = await this.request({
73
- path: `/me/access-tokens/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
74
- method: 'DELETE',
75
- headers: headerParameters,
76
- query: queryParameters,
77
- }, initOverrides);
78
- return new runtime.VoidApiResponse(response);
79
- }
80
- /**
81
- * Deletes a personal access token of the current user.
82
- * Deletes a personal access token of the current user.
83
- */
84
- async deleteAccessToken(requestParameters, initOverrides) {
85
- await this.deleteAccessTokenRaw(requestParameters, initOverrides);
86
- }
87
- /**
88
- * Returns the personal access tokens of the current user.
89
- * Returns the personal access tokens of the current user.
90
- */
91
- async getAccessTokensRaw(initOverrides) {
92
- const queryParameters = {};
93
- const headerParameters = {};
94
- if (this.configuration && this.configuration.apiKey) {
95
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
96
- }
97
- if (this.configuration && this.configuration.accessToken) {
98
- // oauth required
99
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
100
- }
101
- const response = await this.request({
102
- path: `/me/access-tokens`,
103
- method: 'GET',
104
- headers: headerParameters,
105
- query: queryParameters,
106
- }, initOverrides);
107
- return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokensResponseFromJSON(jsonValue));
108
- }
109
- /**
110
- * Returns the personal access tokens of the current user.
111
- * Returns the personal access tokens of the current user.
112
- */
113
- async getAccessTokens(initOverrides) {
114
- const response = await this.getAccessTokensRaw(initOverrides);
115
- return await response.value();
116
- }
117
- /**
118
- * Updates the default personal access token of the current user.
119
- * Updates the default personal access token of the current user.
120
- */
121
- async updateDefaultAccessTokenRaw(initOverrides) {
122
- const queryParameters = {};
123
- const headerParameters = {};
124
- if (this.configuration && this.configuration.apiKey) {
125
- headerParameters["X-Auth-Token"] = await this.configuration.apiKey("X-Auth-Token"); // apiKey authentication
126
- }
127
- if (this.configuration && this.configuration.accessToken) {
128
- // oauth required
129
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", []);
130
- }
131
- const response = await this.request({
132
- path: `/me/access-tokens/default`,
133
- method: 'PUT',
134
- headers: headerParameters,
135
- query: queryParameters,
136
- }, initOverrides);
137
- return new runtime.JSONApiResponse(response, (jsonValue) => DefaultAccessTokenResponseFromJSON(jsonValue));
138
- }
139
- /**
140
- * Updates the default personal access token of the current user.
141
- * Updates the default personal access token of the current user.
142
- */
143
- async updateDefaultAccessToken(initOverrides) {
144
- const response = await this.updateDefaultAccessTokenRaw(initOverrides);
145
- return await response.value();
146
- }
147
- }
@@ -1,70 +0,0 @@
1
- /**
2
- * Quantum Platform User Service API
3
- * Part of the OpenAPI specification for the Quantum Platform.
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: support-hub@kipu-quantum.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import * as runtime from '../runtime.js';
13
- import type { UserOverviewDto } from '../models/index.js';
14
- export interface ExistsByIdRequest {
15
- id: string;
16
- }
17
- export interface FindByIdRequest {
18
- id: string;
19
- }
20
- export interface GetBackgroundImageRequest {
21
- id: string;
22
- }
23
- export interface GetProfileImageRequest {
24
- id: string;
25
- }
26
- /**
27
- *
28
- */
29
- export declare class UsersApi extends runtime.BaseAPI {
30
- /**
31
- * Checks if a user with the given id exists.
32
- * Checks if a user with the given id exists.
33
- */
34
- existsByIdRaw(requestParameters: ExistsByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
35
- /**
36
- * Checks if a user with the given id exists.
37
- * Checks if a user with the given id exists.
38
- */
39
- existsById(requestParameters: ExistsByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
40
- /**
41
- * Returns the user details of the user with the given id.
42
- * Returns the user details of the user with the given id.
43
- */
44
- findByIdRaw(requestParameters: FindByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserOverviewDto>>;
45
- /**
46
- * Returns the user details of the user with the given id.
47
- * Returns the user details of the user with the given id.
48
- */
49
- findById(requestParameters: FindByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserOverviewDto>;
50
- /**
51
- * Returns the current background image of the given user.
52
- * Returns the current background image of the given user.
53
- */
54
- getBackgroundImageRaw(requestParameters: GetBackgroundImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
55
- /**
56
- * Returns the current background image of the given user.
57
- * Returns the current background image of the given user.
58
- */
59
- getBackgroundImage(requestParameters: GetBackgroundImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
60
- /**
61
- * Returns the current profile image of the given user.
62
- * Returns the current profile image of the given user.
63
- */
64
- getProfileImageRaw(requestParameters: GetProfileImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
65
- /**
66
- * Returns the current profile image of the given user.
67
- * Returns the current profile image of the given user.
68
- */
69
- getProfileImage(requestParameters: GetProfileImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
70
- }