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