@loopstack/hub-client 0.11.1 → 0.12.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/dist/esm/api.js CHANGED
@@ -26,10 +26,25 @@ import globalAxios from 'axios';
26
26
  import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
27
  // @ts-ignore
28
28
  import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
+ export const AddRoleDtoRoleEnum = {
30
+ RoleAdmin: 'ROLE_ADMIN',
31
+ RoleBeta: 'ROLE_BETA',
32
+ RoleUser: 'ROLE_USER'
33
+ };
34
+ export const RemoveRoleDtoRoleEnum = {
35
+ RoleAdmin: 'ROLE_ADMIN',
36
+ RoleBeta: 'ROLE_BETA',
37
+ RoleUser: 'ROLE_USER'
38
+ };
29
39
  export const UIPreferencesDtoThemeEnum = {
30
40
  Light: 'light',
31
41
  Dark: 'dark'
32
42
  };
43
+ export const UpdateUserRolesDtoRolesEnum = {
44
+ RoleAdmin: 'ROLE_ADMIN',
45
+ RoleBeta: 'ROLE_BETA',
46
+ RoleUser: 'ROLE_USER'
47
+ };
33
48
  export const WorkerSortByDtoFieldEnum = {
34
49
  Id: 'id',
35
50
  Url: 'url',
@@ -44,6 +59,675 @@ export const WorkerSortByDtoOrderEnum = {
44
59
  Asc: 'ASC',
45
60
  Desc: 'DESC'
46
61
  };
62
+ /**
63
+ * AdminApi - axios parameter creator
64
+ * @export
65
+ */
66
+ export const AdminApiAxiosParamCreator = function (configuration) {
67
+ return {
68
+ /**
69
+ *
70
+ * @summary Add a role to user
71
+ * @param {string} userId
72
+ * @param {AddRoleDto} addRoleDto
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ */
76
+ adminControllerAddRoleToUser: (userId_1, addRoleDto_1, ...args_1) => __awaiter(this, [userId_1, addRoleDto_1, ...args_1], void 0, function* (userId, addRoleDto, options = {}) {
77
+ // verify required parameter 'userId' is not null or undefined
78
+ assertParamExists('adminControllerAddRoleToUser', 'userId', userId);
79
+ // verify required parameter 'addRoleDto' is not null or undefined
80
+ assertParamExists('adminControllerAddRoleToUser', 'addRoleDto', addRoleDto);
81
+ const localVarPath = `/api/v1/admin/users/{userId}/roles/add`
82
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
83
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
84
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
85
+ let baseOptions;
86
+ if (configuration) {
87
+ baseOptions = configuration.baseOptions;
88
+ }
89
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
90
+ const localVarHeaderParameter = {};
91
+ const localVarQueryParameter = {};
92
+ localVarHeaderParameter['Content-Type'] = 'application/json';
93
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
94
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
96
+ localVarRequestOptions.data = serializeDataIfNeeded(addRoleDto, localVarRequestOptions, configuration);
97
+ return {
98
+ url: toPathString(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ }),
102
+ /**
103
+ *
104
+ * @summary Delete a user
105
+ * @param {string} userId
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ adminControllerDeleteUser: (userId_1, ...args_1) => __awaiter(this, [userId_1, ...args_1], void 0, function* (userId, options = {}) {
110
+ // verify required parameter 'userId' is not null or undefined
111
+ assertParamExists('adminControllerDeleteUser', 'userId', userId);
112
+ const localVarPath = `/api/v1/admin/users/{userId}`
113
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
114
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
115
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
116
+ let baseOptions;
117
+ if (configuration) {
118
+ baseOptions = configuration.baseOptions;
119
+ }
120
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
121
+ const localVarHeaderParameter = {};
122
+ const localVarQueryParameter = {};
123
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions,
129
+ };
130
+ }),
131
+ /**
132
+ *
133
+ * @summary Get all users with pagination
134
+ * @param {number} skip
135
+ * @param {number} take
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ adminControllerGetAllUsers: (skip_1, take_1, ...args_1) => __awaiter(this, [skip_1, take_1, ...args_1], void 0, function* (skip, take, options = {}) {
140
+ // verify required parameter 'skip' is not null or undefined
141
+ assertParamExists('adminControllerGetAllUsers', 'skip', skip);
142
+ // verify required parameter 'take' is not null or undefined
143
+ assertParamExists('adminControllerGetAllUsers', 'take', take);
144
+ const localVarPath = `/api/v1/admin/users`;
145
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
146
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
147
+ let baseOptions;
148
+ if (configuration) {
149
+ baseOptions = configuration.baseOptions;
150
+ }
151
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
152
+ const localVarHeaderParameter = {};
153
+ const localVarQueryParameter = {};
154
+ if (skip !== undefined) {
155
+ localVarQueryParameter['skip'] = skip;
156
+ }
157
+ if (take !== undefined) {
158
+ localVarQueryParameter['take'] = take;
159
+ }
160
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
161
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
162
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
163
+ return {
164
+ url: toPathString(localVarUrlObj),
165
+ options: localVarRequestOptions,
166
+ };
167
+ }),
168
+ /**
169
+ *
170
+ * @summary Get user by ID
171
+ * @param {string} userId
172
+ * @param {*} [options] Override http request option.
173
+ * @throws {RequiredError}
174
+ */
175
+ adminControllerGetUserById: (userId_1, ...args_1) => __awaiter(this, [userId_1, ...args_1], void 0, function* (userId, options = {}) {
176
+ // verify required parameter 'userId' is not null or undefined
177
+ assertParamExists('adminControllerGetUserById', 'userId', userId);
178
+ const localVarPath = `/api/v1/admin/users/{userId}`
179
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
180
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
181
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
182
+ let baseOptions;
183
+ if (configuration) {
184
+ baseOptions = configuration.baseOptions;
185
+ }
186
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
187
+ const localVarHeaderParameter = {};
188
+ const localVarQueryParameter = {};
189
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
190
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
192
+ return {
193
+ url: toPathString(localVarUrlObj),
194
+ options: localVarRequestOptions,
195
+ };
196
+ }),
197
+ /**
198
+ *
199
+ * @summary Remove a role from user
200
+ * @param {string} userId
201
+ * @param {RemoveRoleDto} removeRoleDto
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ adminControllerRemoveRoleFromUser: (userId_1, removeRoleDto_1, ...args_1) => __awaiter(this, [userId_1, removeRoleDto_1, ...args_1], void 0, function* (userId, removeRoleDto, options = {}) {
206
+ // verify required parameter 'userId' is not null or undefined
207
+ assertParamExists('adminControllerRemoveRoleFromUser', 'userId', userId);
208
+ // verify required parameter 'removeRoleDto' is not null or undefined
209
+ assertParamExists('adminControllerRemoveRoleFromUser', 'removeRoleDto', removeRoleDto);
210
+ const localVarPath = `/api/v1/admin/users/{userId}/roles/remove`
211
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
212
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
213
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
214
+ let baseOptions;
215
+ if (configuration) {
216
+ baseOptions = configuration.baseOptions;
217
+ }
218
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
219
+ const localVarHeaderParameter = {};
220
+ const localVarQueryParameter = {};
221
+ localVarHeaderParameter['Content-Type'] = 'application/json';
222
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
223
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
224
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
225
+ localVarRequestOptions.data = serializeDataIfNeeded(removeRoleDto, localVarRequestOptions, configuration);
226
+ return {
227
+ url: toPathString(localVarUrlObj),
228
+ options: localVarRequestOptions,
229
+ };
230
+ }),
231
+ /**
232
+ *
233
+ * @summary Search users by email or name
234
+ * @param {string} q
235
+ * @param {*} [options] Override http request option.
236
+ * @throws {RequiredError}
237
+ */
238
+ adminControllerSearchUsers: (q_1, ...args_1) => __awaiter(this, [q_1, ...args_1], void 0, function* (q, options = {}) {
239
+ // verify required parameter 'q' is not null or undefined
240
+ assertParamExists('adminControllerSearchUsers', 'q', q);
241
+ const localVarPath = `/api/v1/admin/users/search`;
242
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
243
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
244
+ let baseOptions;
245
+ if (configuration) {
246
+ baseOptions = configuration.baseOptions;
247
+ }
248
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
249
+ const localVarHeaderParameter = {};
250
+ const localVarQueryParameter = {};
251
+ if (q !== undefined) {
252
+ localVarQueryParameter['q'] = q;
253
+ }
254
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
255
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
256
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
257
+ return {
258
+ url: toPathString(localVarUrlObj),
259
+ options: localVarRequestOptions,
260
+ };
261
+ }),
262
+ /**
263
+ *
264
+ * @summary Toggle user access
265
+ * @param {string} userId
266
+ * @param {ToggleAccessDto} toggleAccessDto
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ adminControllerToggleUserAccess: (userId_1, toggleAccessDto_1, ...args_1) => __awaiter(this, [userId_1, toggleAccessDto_1, ...args_1], void 0, function* (userId, toggleAccessDto, options = {}) {
271
+ // verify required parameter 'userId' is not null or undefined
272
+ assertParamExists('adminControllerToggleUserAccess', 'userId', userId);
273
+ // verify required parameter 'toggleAccessDto' is not null or undefined
274
+ assertParamExists('adminControllerToggleUserAccess', 'toggleAccessDto', toggleAccessDto);
275
+ const localVarPath = `/api/v1/admin/users/{userId}/access`
276
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
277
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
278
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
279
+ let baseOptions;
280
+ if (configuration) {
281
+ baseOptions = configuration.baseOptions;
282
+ }
283
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
284
+ const localVarHeaderParameter = {};
285
+ const localVarQueryParameter = {};
286
+ localVarHeaderParameter['Content-Type'] = 'application/json';
287
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
288
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
289
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
290
+ localVarRequestOptions.data = serializeDataIfNeeded(toggleAccessDto, localVarRequestOptions, configuration);
291
+ return {
292
+ url: toPathString(localVarUrlObj),
293
+ options: localVarRequestOptions,
294
+ };
295
+ }),
296
+ /**
297
+ *
298
+ * @summary Toggle user active status
299
+ * @param {string} userId
300
+ * @param {ToggleActiveDto} toggleActiveDto
301
+ * @param {*} [options] Override http request option.
302
+ * @throws {RequiredError}
303
+ */
304
+ adminControllerToggleUserActive: (userId_1, toggleActiveDto_1, ...args_1) => __awaiter(this, [userId_1, toggleActiveDto_1, ...args_1], void 0, function* (userId, toggleActiveDto, options = {}) {
305
+ // verify required parameter 'userId' is not null or undefined
306
+ assertParamExists('adminControllerToggleUserActive', 'userId', userId);
307
+ // verify required parameter 'toggleActiveDto' is not null or undefined
308
+ assertParamExists('adminControllerToggleUserActive', 'toggleActiveDto', toggleActiveDto);
309
+ const localVarPath = `/api/v1/admin/users/{userId}/active`
310
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
311
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
312
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
313
+ let baseOptions;
314
+ if (configuration) {
315
+ baseOptions = configuration.baseOptions;
316
+ }
317
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
318
+ const localVarHeaderParameter = {};
319
+ const localVarQueryParameter = {};
320
+ localVarHeaderParameter['Content-Type'] = 'application/json';
321
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
322
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
323
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
324
+ localVarRequestOptions.data = serializeDataIfNeeded(toggleActiveDto, localVarRequestOptions, configuration);
325
+ return {
326
+ url: toPathString(localVarUrlObj),
327
+ options: localVarRequestOptions,
328
+ };
329
+ }),
330
+ /**
331
+ *
332
+ * @summary Update user roles (replace all)
333
+ * @param {string} userId
334
+ * @param {UpdateUserRolesDto} updateUserRolesDto
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ adminControllerUpdateUserRoles: (userId_1, updateUserRolesDto_1, ...args_1) => __awaiter(this, [userId_1, updateUserRolesDto_1, ...args_1], void 0, function* (userId, updateUserRolesDto, options = {}) {
339
+ // verify required parameter 'userId' is not null or undefined
340
+ assertParamExists('adminControllerUpdateUserRoles', 'userId', userId);
341
+ // verify required parameter 'updateUserRolesDto' is not null or undefined
342
+ assertParamExists('adminControllerUpdateUserRoles', 'updateUserRolesDto', updateUserRolesDto);
343
+ const localVarPath = `/api/v1/admin/users/{userId}/roles`
344
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
345
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
346
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
347
+ let baseOptions;
348
+ if (configuration) {
349
+ baseOptions = configuration.baseOptions;
350
+ }
351
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
352
+ const localVarHeaderParameter = {};
353
+ const localVarQueryParameter = {};
354
+ localVarHeaderParameter['Content-Type'] = 'application/json';
355
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
356
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
357
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
358
+ localVarRequestOptions.data = serializeDataIfNeeded(updateUserRolesDto, localVarRequestOptions, configuration);
359
+ return {
360
+ url: toPathString(localVarUrlObj),
361
+ options: localVarRequestOptions,
362
+ };
363
+ }),
364
+ };
365
+ };
366
+ /**
367
+ * AdminApi - functional programming interface
368
+ * @export
369
+ */
370
+ export const AdminApiFp = function (configuration) {
371
+ const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration);
372
+ return {
373
+ /**
374
+ *
375
+ * @summary Add a role to user
376
+ * @param {string} userId
377
+ * @param {AddRoleDto} addRoleDto
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ */
381
+ adminControllerAddRoleToUser(userId, addRoleDto, options) {
382
+ return __awaiter(this, void 0, void 0, function* () {
383
+ var _a, _b, _c;
384
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerAddRoleToUser(userId, addRoleDto, options);
385
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
386
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerAddRoleToUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
387
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
388
+ });
389
+ },
390
+ /**
391
+ *
392
+ * @summary Delete a user
393
+ * @param {string} userId
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ */
397
+ adminControllerDeleteUser(userId, options) {
398
+ return __awaiter(this, void 0, void 0, function* () {
399
+ var _a, _b, _c;
400
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerDeleteUser(userId, options);
401
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
402
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerDeleteUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
403
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
404
+ });
405
+ },
406
+ /**
407
+ *
408
+ * @summary Get all users with pagination
409
+ * @param {number} skip
410
+ * @param {number} take
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ adminControllerGetAllUsers(skip, take, options) {
415
+ return __awaiter(this, void 0, void 0, function* () {
416
+ var _a, _b, _c;
417
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerGetAllUsers(skip, take, options);
418
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
419
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerGetAllUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
420
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
421
+ });
422
+ },
423
+ /**
424
+ *
425
+ * @summary Get user by ID
426
+ * @param {string} userId
427
+ * @param {*} [options] Override http request option.
428
+ * @throws {RequiredError}
429
+ */
430
+ adminControllerGetUserById(userId, options) {
431
+ return __awaiter(this, void 0, void 0, function* () {
432
+ var _a, _b, _c;
433
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerGetUserById(userId, options);
434
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
435
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerGetUserById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
436
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
437
+ });
438
+ },
439
+ /**
440
+ *
441
+ * @summary Remove a role from user
442
+ * @param {string} userId
443
+ * @param {RemoveRoleDto} removeRoleDto
444
+ * @param {*} [options] Override http request option.
445
+ * @throws {RequiredError}
446
+ */
447
+ adminControllerRemoveRoleFromUser(userId, removeRoleDto, options) {
448
+ return __awaiter(this, void 0, void 0, function* () {
449
+ var _a, _b, _c;
450
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerRemoveRoleFromUser(userId, removeRoleDto, options);
451
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
452
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerRemoveRoleFromUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
453
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
454
+ });
455
+ },
456
+ /**
457
+ *
458
+ * @summary Search users by email or name
459
+ * @param {string} q
460
+ * @param {*} [options] Override http request option.
461
+ * @throws {RequiredError}
462
+ */
463
+ adminControllerSearchUsers(q, options) {
464
+ return __awaiter(this, void 0, void 0, function* () {
465
+ var _a, _b, _c;
466
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerSearchUsers(q, options);
467
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
468
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerSearchUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
469
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
470
+ });
471
+ },
472
+ /**
473
+ *
474
+ * @summary Toggle user access
475
+ * @param {string} userId
476
+ * @param {ToggleAccessDto} toggleAccessDto
477
+ * @param {*} [options] Override http request option.
478
+ * @throws {RequiredError}
479
+ */
480
+ adminControllerToggleUserAccess(userId, toggleAccessDto, options) {
481
+ return __awaiter(this, void 0, void 0, function* () {
482
+ var _a, _b, _c;
483
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerToggleUserAccess(userId, toggleAccessDto, options);
484
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
485
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerToggleUserAccess']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
486
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
487
+ });
488
+ },
489
+ /**
490
+ *
491
+ * @summary Toggle user active status
492
+ * @param {string} userId
493
+ * @param {ToggleActiveDto} toggleActiveDto
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ adminControllerToggleUserActive(userId, toggleActiveDto, options) {
498
+ return __awaiter(this, void 0, void 0, function* () {
499
+ var _a, _b, _c;
500
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerToggleUserActive(userId, toggleActiveDto, options);
501
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
502
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerToggleUserActive']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
503
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
504
+ });
505
+ },
506
+ /**
507
+ *
508
+ * @summary Update user roles (replace all)
509
+ * @param {string} userId
510
+ * @param {UpdateUserRolesDto} updateUserRolesDto
511
+ * @param {*} [options] Override http request option.
512
+ * @throws {RequiredError}
513
+ */
514
+ adminControllerUpdateUserRoles(userId, updateUserRolesDto, options) {
515
+ return __awaiter(this, void 0, void 0, function* () {
516
+ var _a, _b, _c;
517
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminControllerUpdateUserRoles(userId, updateUserRolesDto, options);
518
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
519
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminApi.adminControllerUpdateUserRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
520
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
521
+ });
522
+ },
523
+ };
524
+ };
525
+ /**
526
+ * AdminApi - factory interface
527
+ * @export
528
+ */
529
+ export const AdminApiFactory = function (configuration, basePath, axios) {
530
+ const localVarFp = AdminApiFp(configuration);
531
+ return {
532
+ /**
533
+ *
534
+ * @summary Add a role to user
535
+ * @param {AdminApiAdminControllerAddRoleToUserRequest} requestParameters Request parameters.
536
+ * @param {*} [options] Override http request option.
537
+ * @throws {RequiredError}
538
+ */
539
+ adminControllerAddRoleToUser(requestParameters, options) {
540
+ return localVarFp.adminControllerAddRoleToUser(requestParameters.userId, requestParameters.addRoleDto, options).then((request) => request(axios, basePath));
541
+ },
542
+ /**
543
+ *
544
+ * @summary Delete a user
545
+ * @param {AdminApiAdminControllerDeleteUserRequest} requestParameters Request parameters.
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ */
549
+ adminControllerDeleteUser(requestParameters, options) {
550
+ return localVarFp.adminControllerDeleteUser(requestParameters.userId, options).then((request) => request(axios, basePath));
551
+ },
552
+ /**
553
+ *
554
+ * @summary Get all users with pagination
555
+ * @param {AdminApiAdminControllerGetAllUsersRequest} requestParameters Request parameters.
556
+ * @param {*} [options] Override http request option.
557
+ * @throws {RequiredError}
558
+ */
559
+ adminControllerGetAllUsers(requestParameters, options) {
560
+ return localVarFp.adminControllerGetAllUsers(requestParameters.skip, requestParameters.take, options).then((request) => request(axios, basePath));
561
+ },
562
+ /**
563
+ *
564
+ * @summary Get user by ID
565
+ * @param {AdminApiAdminControllerGetUserByIdRequest} requestParameters Request parameters.
566
+ * @param {*} [options] Override http request option.
567
+ * @throws {RequiredError}
568
+ */
569
+ adminControllerGetUserById(requestParameters, options) {
570
+ return localVarFp.adminControllerGetUserById(requestParameters.userId, options).then((request) => request(axios, basePath));
571
+ },
572
+ /**
573
+ *
574
+ * @summary Remove a role from user
575
+ * @param {AdminApiAdminControllerRemoveRoleFromUserRequest} requestParameters Request parameters.
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ adminControllerRemoveRoleFromUser(requestParameters, options) {
580
+ return localVarFp.adminControllerRemoveRoleFromUser(requestParameters.userId, requestParameters.removeRoleDto, options).then((request) => request(axios, basePath));
581
+ },
582
+ /**
583
+ *
584
+ * @summary Search users by email or name
585
+ * @param {AdminApiAdminControllerSearchUsersRequest} requestParameters Request parameters.
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ */
589
+ adminControllerSearchUsers(requestParameters, options) {
590
+ return localVarFp.adminControllerSearchUsers(requestParameters.q, options).then((request) => request(axios, basePath));
591
+ },
592
+ /**
593
+ *
594
+ * @summary Toggle user access
595
+ * @param {AdminApiAdminControllerToggleUserAccessRequest} requestParameters Request parameters.
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ */
599
+ adminControllerToggleUserAccess(requestParameters, options) {
600
+ return localVarFp.adminControllerToggleUserAccess(requestParameters.userId, requestParameters.toggleAccessDto, options).then((request) => request(axios, basePath));
601
+ },
602
+ /**
603
+ *
604
+ * @summary Toggle user active status
605
+ * @param {AdminApiAdminControllerToggleUserActiveRequest} requestParameters Request parameters.
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ adminControllerToggleUserActive(requestParameters, options) {
610
+ return localVarFp.adminControllerToggleUserActive(requestParameters.userId, requestParameters.toggleActiveDto, options).then((request) => request(axios, basePath));
611
+ },
612
+ /**
613
+ *
614
+ * @summary Update user roles (replace all)
615
+ * @param {AdminApiAdminControllerUpdateUserRolesRequest} requestParameters Request parameters.
616
+ * @param {*} [options] Override http request option.
617
+ * @throws {RequiredError}
618
+ */
619
+ adminControllerUpdateUserRoles(requestParameters, options) {
620
+ return localVarFp.adminControllerUpdateUserRoles(requestParameters.userId, requestParameters.updateUserRolesDto, options).then((request) => request(axios, basePath));
621
+ },
622
+ };
623
+ };
624
+ /**
625
+ * AdminApi - object-oriented interface
626
+ * @export
627
+ * @class AdminApi
628
+ * @extends {BaseAPI}
629
+ */
630
+ export class AdminApi extends BaseAPI {
631
+ /**
632
+ *
633
+ * @summary Add a role to user
634
+ * @param {AdminApiAdminControllerAddRoleToUserRequest} requestParameters Request parameters.
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ * @memberof AdminApi
638
+ */
639
+ adminControllerAddRoleToUser(requestParameters, options) {
640
+ return AdminApiFp(this.configuration).adminControllerAddRoleToUser(requestParameters.userId, requestParameters.addRoleDto, options).then((request) => request(this.axios, this.basePath));
641
+ }
642
+ /**
643
+ *
644
+ * @summary Delete a user
645
+ * @param {AdminApiAdminControllerDeleteUserRequest} requestParameters Request parameters.
646
+ * @param {*} [options] Override http request option.
647
+ * @throws {RequiredError}
648
+ * @memberof AdminApi
649
+ */
650
+ adminControllerDeleteUser(requestParameters, options) {
651
+ return AdminApiFp(this.configuration).adminControllerDeleteUser(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
652
+ }
653
+ /**
654
+ *
655
+ * @summary Get all users with pagination
656
+ * @param {AdminApiAdminControllerGetAllUsersRequest} requestParameters Request parameters.
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ * @memberof AdminApi
660
+ */
661
+ adminControllerGetAllUsers(requestParameters, options) {
662
+ return AdminApiFp(this.configuration).adminControllerGetAllUsers(requestParameters.skip, requestParameters.take, options).then((request) => request(this.axios, this.basePath));
663
+ }
664
+ /**
665
+ *
666
+ * @summary Get user by ID
667
+ * @param {AdminApiAdminControllerGetUserByIdRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ * @memberof AdminApi
671
+ */
672
+ adminControllerGetUserById(requestParameters, options) {
673
+ return AdminApiFp(this.configuration).adminControllerGetUserById(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
674
+ }
675
+ /**
676
+ *
677
+ * @summary Remove a role from user
678
+ * @param {AdminApiAdminControllerRemoveRoleFromUserRequest} requestParameters Request parameters.
679
+ * @param {*} [options] Override http request option.
680
+ * @throws {RequiredError}
681
+ * @memberof AdminApi
682
+ */
683
+ adminControllerRemoveRoleFromUser(requestParameters, options) {
684
+ return AdminApiFp(this.configuration).adminControllerRemoveRoleFromUser(requestParameters.userId, requestParameters.removeRoleDto, options).then((request) => request(this.axios, this.basePath));
685
+ }
686
+ /**
687
+ *
688
+ * @summary Search users by email or name
689
+ * @param {AdminApiAdminControllerSearchUsersRequest} requestParameters Request parameters.
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ * @memberof AdminApi
693
+ */
694
+ adminControllerSearchUsers(requestParameters, options) {
695
+ return AdminApiFp(this.configuration).adminControllerSearchUsers(requestParameters.q, options).then((request) => request(this.axios, this.basePath));
696
+ }
697
+ /**
698
+ *
699
+ * @summary Toggle user access
700
+ * @param {AdminApiAdminControllerToggleUserAccessRequest} requestParameters Request parameters.
701
+ * @param {*} [options] Override http request option.
702
+ * @throws {RequiredError}
703
+ * @memberof AdminApi
704
+ */
705
+ adminControllerToggleUserAccess(requestParameters, options) {
706
+ return AdminApiFp(this.configuration).adminControllerToggleUserAccess(requestParameters.userId, requestParameters.toggleAccessDto, options).then((request) => request(this.axios, this.basePath));
707
+ }
708
+ /**
709
+ *
710
+ * @summary Toggle user active status
711
+ * @param {AdminApiAdminControllerToggleUserActiveRequest} requestParameters Request parameters.
712
+ * @param {*} [options] Override http request option.
713
+ * @throws {RequiredError}
714
+ * @memberof AdminApi
715
+ */
716
+ adminControllerToggleUserActive(requestParameters, options) {
717
+ return AdminApiFp(this.configuration).adminControllerToggleUserActive(requestParameters.userId, requestParameters.toggleActiveDto, options).then((request) => request(this.axios, this.basePath));
718
+ }
719
+ /**
720
+ *
721
+ * @summary Update user roles (replace all)
722
+ * @param {AdminApiAdminControllerUpdateUserRolesRequest} requestParameters Request parameters.
723
+ * @param {*} [options] Override http request option.
724
+ * @throws {RequiredError}
725
+ * @memberof AdminApi
726
+ */
727
+ adminControllerUpdateUserRoles(requestParameters, options) {
728
+ return AdminApiFp(this.configuration).adminControllerUpdateUserRoles(requestParameters.userId, requestParameters.updateUserRolesDto, options).then((request) => request(this.axios, this.basePath));
729
+ }
730
+ }
47
731
  /**
48
732
  * ApiV1AuthApi - axios parameter creator
49
733
  * @export
@@ -390,6 +1074,126 @@ export const ApiV1AuthApiAxiosParamCreator = function (configuration) {
390
1074
  options: localVarRequestOptions,
391
1075
  };
392
1076
  }),
1077
+ /**
1078
+ *
1079
+ * @summary Request password reset email
1080
+ * @param {RequestPasswordResetDto} requestPasswordResetDto
1081
+ * @param {*} [options] Override http request option.
1082
+ * @throws {RequiredError}
1083
+ */
1084
+ authControllerRequestPasswordReset: (requestPasswordResetDto_1, ...args_1) => __awaiter(this, [requestPasswordResetDto_1, ...args_1], void 0, function* (requestPasswordResetDto, options = {}) {
1085
+ // verify required parameter 'requestPasswordResetDto' is not null or undefined
1086
+ assertParamExists('authControllerRequestPasswordReset', 'requestPasswordResetDto', requestPasswordResetDto);
1087
+ const localVarPath = `/api/v1/auth/request-password-reset`;
1088
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1089
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1090
+ let baseOptions;
1091
+ if (configuration) {
1092
+ baseOptions = configuration.baseOptions;
1093
+ }
1094
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1095
+ const localVarHeaderParameter = {};
1096
+ const localVarQueryParameter = {};
1097
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1098
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1099
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1100
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1101
+ localVarRequestOptions.data = serializeDataIfNeeded(requestPasswordResetDto, localVarRequestOptions, configuration);
1102
+ return {
1103
+ url: toPathString(localVarUrlObj),
1104
+ options: localVarRequestOptions,
1105
+ };
1106
+ }),
1107
+ /**
1108
+ *
1109
+ * @summary Resend email verification
1110
+ * @param {ResendVerificationDto} resendVerificationDto
1111
+ * @param {*} [options] Override http request option.
1112
+ * @throws {RequiredError}
1113
+ */
1114
+ authControllerResendVerification: (resendVerificationDto_1, ...args_1) => __awaiter(this, [resendVerificationDto_1, ...args_1], void 0, function* (resendVerificationDto, options = {}) {
1115
+ // verify required parameter 'resendVerificationDto' is not null or undefined
1116
+ assertParamExists('authControllerResendVerification', 'resendVerificationDto', resendVerificationDto);
1117
+ const localVarPath = `/api/v1/auth/resend-verification`;
1118
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1119
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1120
+ let baseOptions;
1121
+ if (configuration) {
1122
+ baseOptions = configuration.baseOptions;
1123
+ }
1124
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1125
+ const localVarHeaderParameter = {};
1126
+ const localVarQueryParameter = {};
1127
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1128
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1129
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1130
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1131
+ localVarRequestOptions.data = serializeDataIfNeeded(resendVerificationDto, localVarRequestOptions, configuration);
1132
+ return {
1133
+ url: toPathString(localVarUrlObj),
1134
+ options: localVarRequestOptions,
1135
+ };
1136
+ }),
1137
+ /**
1138
+ *
1139
+ * @summary Reset password with token
1140
+ * @param {ResetPasswordDto} resetPasswordDto
1141
+ * @param {*} [options] Override http request option.
1142
+ * @throws {RequiredError}
1143
+ */
1144
+ authControllerResetPassword: (resetPasswordDto_1, ...args_1) => __awaiter(this, [resetPasswordDto_1, ...args_1], void 0, function* (resetPasswordDto, options = {}) {
1145
+ // verify required parameter 'resetPasswordDto' is not null or undefined
1146
+ assertParamExists('authControllerResetPassword', 'resetPasswordDto', resetPasswordDto);
1147
+ const localVarPath = `/api/v1/auth/reset-password`;
1148
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1149
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1150
+ let baseOptions;
1151
+ if (configuration) {
1152
+ baseOptions = configuration.baseOptions;
1153
+ }
1154
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1155
+ const localVarHeaderParameter = {};
1156
+ const localVarQueryParameter = {};
1157
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1158
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1159
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1160
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1161
+ localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordDto, localVarRequestOptions, configuration);
1162
+ return {
1163
+ url: toPathString(localVarUrlObj),
1164
+ options: localVarRequestOptions,
1165
+ };
1166
+ }),
1167
+ /**
1168
+ *
1169
+ * @summary Verify email address with token
1170
+ * @param {VerifyEmailDto} verifyEmailDto
1171
+ * @param {*} [options] Override http request option.
1172
+ * @throws {RequiredError}
1173
+ */
1174
+ authControllerVerifyEmail: (verifyEmailDto_1, ...args_1) => __awaiter(this, [verifyEmailDto_1, ...args_1], void 0, function* (verifyEmailDto, options = {}) {
1175
+ // verify required parameter 'verifyEmailDto' is not null or undefined
1176
+ assertParamExists('authControllerVerifyEmail', 'verifyEmailDto', verifyEmailDto);
1177
+ const localVarPath = `/api/v1/auth/verify-email`;
1178
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1179
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1180
+ let baseOptions;
1181
+ if (configuration) {
1182
+ baseOptions = configuration.baseOptions;
1183
+ }
1184
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1185
+ const localVarHeaderParameter = {};
1186
+ const localVarQueryParameter = {};
1187
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1188
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1189
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1190
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1191
+ localVarRequestOptions.data = serializeDataIfNeeded(verifyEmailDto, localVarRequestOptions, configuration);
1192
+ return {
1193
+ url: toPathString(localVarUrlObj),
1194
+ options: localVarRequestOptions,
1195
+ };
1196
+ }),
393
1197
  };
394
1198
  };
395
1199
  /**
@@ -597,6 +1401,70 @@ export const ApiV1AuthApiFp = function (configuration) {
597
1401
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
598
1402
  });
599
1403
  },
1404
+ /**
1405
+ *
1406
+ * @summary Request password reset email
1407
+ * @param {RequestPasswordResetDto} requestPasswordResetDto
1408
+ * @param {*} [options] Override http request option.
1409
+ * @throws {RequiredError}
1410
+ */
1411
+ authControllerRequestPasswordReset(requestPasswordResetDto, options) {
1412
+ return __awaiter(this, void 0, void 0, function* () {
1413
+ var _a, _b, _c;
1414
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authControllerRequestPasswordReset(requestPasswordResetDto, options);
1415
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1416
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApiV1AuthApi.authControllerRequestPasswordReset']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1417
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1418
+ });
1419
+ },
1420
+ /**
1421
+ *
1422
+ * @summary Resend email verification
1423
+ * @param {ResendVerificationDto} resendVerificationDto
1424
+ * @param {*} [options] Override http request option.
1425
+ * @throws {RequiredError}
1426
+ */
1427
+ authControllerResendVerification(resendVerificationDto, options) {
1428
+ return __awaiter(this, void 0, void 0, function* () {
1429
+ var _a, _b, _c;
1430
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authControllerResendVerification(resendVerificationDto, options);
1431
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1432
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApiV1AuthApi.authControllerResendVerification']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1433
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1434
+ });
1435
+ },
1436
+ /**
1437
+ *
1438
+ * @summary Reset password with token
1439
+ * @param {ResetPasswordDto} resetPasswordDto
1440
+ * @param {*} [options] Override http request option.
1441
+ * @throws {RequiredError}
1442
+ */
1443
+ authControllerResetPassword(resetPasswordDto, options) {
1444
+ return __awaiter(this, void 0, void 0, function* () {
1445
+ var _a, _b, _c;
1446
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authControllerResetPassword(resetPasswordDto, options);
1447
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1448
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApiV1AuthApi.authControllerResetPassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1449
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1450
+ });
1451
+ },
1452
+ /**
1453
+ *
1454
+ * @summary Verify email address with token
1455
+ * @param {VerifyEmailDto} verifyEmailDto
1456
+ * @param {*} [options] Override http request option.
1457
+ * @throws {RequiredError}
1458
+ */
1459
+ authControllerVerifyEmail(verifyEmailDto, options) {
1460
+ return __awaiter(this, void 0, void 0, function* () {
1461
+ var _a, _b, _c;
1462
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authControllerVerifyEmail(verifyEmailDto, options);
1463
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1464
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApiV1AuthApi.authControllerVerifyEmail']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1465
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1466
+ });
1467
+ },
600
1468
  };
601
1469
  };
602
1470
  /**
@@ -726,6 +1594,46 @@ export const ApiV1AuthApiFactory = function (configuration, basePath, axios) {
726
1594
  authControllerRegister(requestParameters, options) {
727
1595
  return localVarFp.authControllerRegister(requestParameters.body, options).then((request) => request(axios, basePath));
728
1596
  },
1597
+ /**
1598
+ *
1599
+ * @summary Request password reset email
1600
+ * @param {ApiV1AuthApiAuthControllerRequestPasswordResetRequest} requestParameters Request parameters.
1601
+ * @param {*} [options] Override http request option.
1602
+ * @throws {RequiredError}
1603
+ */
1604
+ authControllerRequestPasswordReset(requestParameters, options) {
1605
+ return localVarFp.authControllerRequestPasswordReset(requestParameters.requestPasswordResetDto, options).then((request) => request(axios, basePath));
1606
+ },
1607
+ /**
1608
+ *
1609
+ * @summary Resend email verification
1610
+ * @param {ApiV1AuthApiAuthControllerResendVerificationRequest} requestParameters Request parameters.
1611
+ * @param {*} [options] Override http request option.
1612
+ * @throws {RequiredError}
1613
+ */
1614
+ authControllerResendVerification(requestParameters, options) {
1615
+ return localVarFp.authControllerResendVerification(requestParameters.resendVerificationDto, options).then((request) => request(axios, basePath));
1616
+ },
1617
+ /**
1618
+ *
1619
+ * @summary Reset password with token
1620
+ * @param {ApiV1AuthApiAuthControllerResetPasswordRequest} requestParameters Request parameters.
1621
+ * @param {*} [options] Override http request option.
1622
+ * @throws {RequiredError}
1623
+ */
1624
+ authControllerResetPassword(requestParameters, options) {
1625
+ return localVarFp.authControllerResetPassword(requestParameters.resetPasswordDto, options).then((request) => request(axios, basePath));
1626
+ },
1627
+ /**
1628
+ *
1629
+ * @summary Verify email address with token
1630
+ * @param {ApiV1AuthApiAuthControllerVerifyEmailRequest} requestParameters Request parameters.
1631
+ * @param {*} [options] Override http request option.
1632
+ * @throws {RequiredError}
1633
+ */
1634
+ authControllerVerifyEmail(requestParameters, options) {
1635
+ return localVarFp.authControllerVerifyEmail(requestParameters.verifyEmailDto, options).then((request) => request(axios, basePath));
1636
+ },
729
1637
  };
730
1638
  };
731
1639
  /**
@@ -868,6 +1776,50 @@ export class ApiV1AuthApi extends BaseAPI {
868
1776
  authControllerRegister(requestParameters, options) {
869
1777
  return ApiV1AuthApiFp(this.configuration).authControllerRegister(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
870
1778
  }
1779
+ /**
1780
+ *
1781
+ * @summary Request password reset email
1782
+ * @param {ApiV1AuthApiAuthControllerRequestPasswordResetRequest} requestParameters Request parameters.
1783
+ * @param {*} [options] Override http request option.
1784
+ * @throws {RequiredError}
1785
+ * @memberof ApiV1AuthApi
1786
+ */
1787
+ authControllerRequestPasswordReset(requestParameters, options) {
1788
+ return ApiV1AuthApiFp(this.configuration).authControllerRequestPasswordReset(requestParameters.requestPasswordResetDto, options).then((request) => request(this.axios, this.basePath));
1789
+ }
1790
+ /**
1791
+ *
1792
+ * @summary Resend email verification
1793
+ * @param {ApiV1AuthApiAuthControllerResendVerificationRequest} requestParameters Request parameters.
1794
+ * @param {*} [options] Override http request option.
1795
+ * @throws {RequiredError}
1796
+ * @memberof ApiV1AuthApi
1797
+ */
1798
+ authControllerResendVerification(requestParameters, options) {
1799
+ return ApiV1AuthApiFp(this.configuration).authControllerResendVerification(requestParameters.resendVerificationDto, options).then((request) => request(this.axios, this.basePath));
1800
+ }
1801
+ /**
1802
+ *
1803
+ * @summary Reset password with token
1804
+ * @param {ApiV1AuthApiAuthControllerResetPasswordRequest} requestParameters Request parameters.
1805
+ * @param {*} [options] Override http request option.
1806
+ * @throws {RequiredError}
1807
+ * @memberof ApiV1AuthApi
1808
+ */
1809
+ authControllerResetPassword(requestParameters, options) {
1810
+ return ApiV1AuthApiFp(this.configuration).authControllerResetPassword(requestParameters.resetPasswordDto, options).then((request) => request(this.axios, this.basePath));
1811
+ }
1812
+ /**
1813
+ *
1814
+ * @summary Verify email address with token
1815
+ * @param {ApiV1AuthApiAuthControllerVerifyEmailRequest} requestParameters Request parameters.
1816
+ * @param {*} [options] Override http request option.
1817
+ * @throws {RequiredError}
1818
+ * @memberof ApiV1AuthApi
1819
+ */
1820
+ authControllerVerifyEmail(requestParameters, options) {
1821
+ return ApiV1AuthApiFp(this.configuration).authControllerVerifyEmail(requestParameters.verifyEmailDto, options).then((request) => request(this.axios, this.basePath));
1822
+ }
871
1823
  }
872
1824
  /**
873
1825
  * ApiV1SsoApi - axios parameter creator
@@ -1043,6 +1995,31 @@ export class ApiV1SsoApi extends BaseAPI {
1043
1995
  */
1044
1996
  export const ApiV1UserApiAxiosParamCreator = function (configuration) {
1045
1997
  return {
1998
+ /**
1999
+ *
2000
+ * @summary Soft delete current user account
2001
+ * @param {*} [options] Override http request option.
2002
+ * @throws {RequiredError}
2003
+ */
2004
+ userControllerDeleteAccount: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2005
+ const localVarPath = `/api/v1/user`;
2006
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2007
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2008
+ let baseOptions;
2009
+ if (configuration) {
2010
+ baseOptions = configuration.baseOptions;
2011
+ }
2012
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2013
+ const localVarHeaderParameter = {};
2014
+ const localVarQueryParameter = {};
2015
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2016
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2017
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2018
+ return {
2019
+ url: toPathString(localVarUrlObj),
2020
+ options: localVarRequestOptions,
2021
+ };
2022
+ }),
1046
2023
  /**
1047
2024
  *
1048
2025
  * @summary Get current user
@@ -1077,6 +2054,21 @@ export const ApiV1UserApiAxiosParamCreator = function (configuration) {
1077
2054
  export const ApiV1UserApiFp = function (configuration) {
1078
2055
  const localVarAxiosParamCreator = ApiV1UserApiAxiosParamCreator(configuration);
1079
2056
  return {
2057
+ /**
2058
+ *
2059
+ * @summary Soft delete current user account
2060
+ * @param {*} [options] Override http request option.
2061
+ * @throws {RequiredError}
2062
+ */
2063
+ userControllerDeleteAccount(options) {
2064
+ return __awaiter(this, void 0, void 0, function* () {
2065
+ var _a, _b, _c;
2066
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userControllerDeleteAccount(options);
2067
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2068
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ApiV1UserApi.userControllerDeleteAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2069
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2070
+ });
2071
+ },
1080
2072
  /**
1081
2073
  *
1082
2074
  * @summary Get current user
@@ -1101,6 +2093,15 @@ export const ApiV1UserApiFp = function (configuration) {
1101
2093
  export const ApiV1UserApiFactory = function (configuration, basePath, axios) {
1102
2094
  const localVarFp = ApiV1UserApiFp(configuration);
1103
2095
  return {
2096
+ /**
2097
+ *
2098
+ * @summary Soft delete current user account
2099
+ * @param {*} [options] Override http request option.
2100
+ * @throws {RequiredError}
2101
+ */
2102
+ userControllerDeleteAccount(options) {
2103
+ return localVarFp.userControllerDeleteAccount(options).then((request) => request(axios, basePath));
2104
+ },
1104
2105
  /**
1105
2106
  *
1106
2107
  * @summary Get current user
@@ -1119,6 +2120,16 @@ export const ApiV1UserApiFactory = function (configuration, basePath, axios) {
1119
2120
  * @extends {BaseAPI}
1120
2121
  */
1121
2122
  export class ApiV1UserApi extends BaseAPI {
2123
+ /**
2124
+ *
2125
+ * @summary Soft delete current user account
2126
+ * @param {*} [options] Override http request option.
2127
+ * @throws {RequiredError}
2128
+ * @memberof ApiV1UserApi
2129
+ */
2130
+ userControllerDeleteAccount(options) {
2131
+ return ApiV1UserApiFp(this.configuration).userControllerDeleteAccount(options).then((request) => request(this.axios, this.basePath));
2132
+ }
1122
2133
  /**
1123
2134
  *
1124
2135
  * @summary Get current user