ch-admin-api-client-typescript 5.50.2 → 5.53.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.
@@ -0,0 +1,730 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * CloudHospital Admin Api
6
+ * CloudHospital application with Swagger, Swashbuckle, and API versioning.
7
+ *
8
+ * The version of the OpenAPI document: 1
9
+ * Contact: developer@icloudhospital.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
+ if (ar || !(i in from)) {
80
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
+ ar[i] = from[i];
82
+ }
83
+ }
84
+ return to.concat(ar || Array.prototype.slice.call(from));
85
+ };
86
+ var __importDefault = (this && this.__importDefault) || function (mod) {
87
+ return (mod && mod.__esModule) ? mod : { "default": mod };
88
+ };
89
+ Object.defineProperty(exports, "__esModule", { value: true });
90
+ exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = void 0;
91
+ var axios_1 = __importDefault(require("axios"));
92
+ // Some imports not used depending on template conditions
93
+ // @ts-ignore
94
+ var common_1 = require("../common");
95
+ // @ts-ignore
96
+ var base_1 = require("../base");
97
+ /**
98
+ * UsersApi - axios parameter creator
99
+ * @export
100
+ */
101
+ var UsersApiAxiosParamCreator = function (configuration) {
102
+ var _this = this;
103
+ return {
104
+ /**
105
+ *
106
+ * @summary Get users (Auth policies: RequireLocalManagerRole)
107
+ * @param {string} [name]
108
+ * @param {string} [email]
109
+ * @param {string} [role]
110
+ * @param {string} [hospitalId]
111
+ * @param {boolean} [showHidden]
112
+ * @param {number} [page]
113
+ * @param {number} [limit]
114
+ * @param {Date} [lastRetrieved]
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ apiV1UsersGet: function (name_1, email_1, role_1, hospitalId_1, showHidden_1, page_1, limit_1, lastRetrieved_1) {
119
+ var args_1 = [];
120
+ for (var _i = 8; _i < arguments.length; _i++) {
121
+ args_1[_i - 8] = arguments[_i];
122
+ }
123
+ return __awaiter(_this, __spreadArray([name_1, email_1, role_1, hospitalId_1, showHidden_1, page_1, limit_1, lastRetrieved_1], args_1, true), void 0, function (name, email, role, hospitalId, showHidden, page, limit, lastRetrieved, options) {
124
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
125
+ if (options === void 0) { options = {}; }
126
+ return __generator(this, function (_a) {
127
+ switch (_a.label) {
128
+ case 0:
129
+ localVarPath = "/api/v1/users";
130
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
131
+ if (configuration) {
132
+ baseOptions = configuration.baseOptions;
133
+ }
134
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
135
+ localVarHeaderParameter = {};
136
+ localVarQueryParameter = {};
137
+ // authentication oauth2 required
138
+ // oauth required
139
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
140
+ case 1:
141
+ // authentication oauth2 required
142
+ // oauth required
143
+ _a.sent();
144
+ if (name !== undefined) {
145
+ localVarQueryParameter['Name'] = name;
146
+ }
147
+ if (email !== undefined) {
148
+ localVarQueryParameter['Email'] = email;
149
+ }
150
+ if (role !== undefined) {
151
+ localVarQueryParameter['Role'] = role;
152
+ }
153
+ if (hospitalId !== undefined) {
154
+ localVarQueryParameter['HospitalId'] = hospitalId;
155
+ }
156
+ if (showHidden !== undefined) {
157
+ localVarQueryParameter['ShowHidden'] = showHidden;
158
+ }
159
+ if (page !== undefined) {
160
+ localVarQueryParameter['page'] = page;
161
+ }
162
+ if (limit !== undefined) {
163
+ localVarQueryParameter['limit'] = limit;
164
+ }
165
+ if (lastRetrieved !== undefined) {
166
+ localVarQueryParameter['lastRetrieved'] = (lastRetrieved instanceof Date) ?
167
+ lastRetrieved.toISOString() :
168
+ lastRetrieved;
169
+ }
170
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
171
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
173
+ return [2 /*return*/, {
174
+ url: (0, common_1.toPathString)(localVarUrlObj),
175
+ options: localVarRequestOptions,
176
+ }];
177
+ }
178
+ });
179
+ });
180
+ },
181
+ /**
182
+ *
183
+ * @summary Delete user (Auth policies: RequireLocalManagerRole)
184
+ * @param {string} id
185
+ * @param {boolean} [isPermanent]
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ */
189
+ apiV1UsersIdDelete: function (id_1, isPermanent_1) {
190
+ var args_1 = [];
191
+ for (var _i = 2; _i < arguments.length; _i++) {
192
+ args_1[_i - 2] = arguments[_i];
193
+ }
194
+ return __awaiter(_this, __spreadArray([id_1, isPermanent_1], args_1, true), void 0, function (id, isPermanent, options) {
195
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
196
+ if (options === void 0) { options = {}; }
197
+ return __generator(this, function (_a) {
198
+ switch (_a.label) {
199
+ case 0:
200
+ // verify required parameter 'id' is not null or undefined
201
+ (0, common_1.assertParamExists)('apiV1UsersIdDelete', 'id', id);
202
+ localVarPath = "/api/v1/users/{id}"
203
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
204
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
205
+ if (configuration) {
206
+ baseOptions = configuration.baseOptions;
207
+ }
208
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
209
+ localVarHeaderParameter = {};
210
+ localVarQueryParameter = {};
211
+ // authentication oauth2 required
212
+ // oauth required
213
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
214
+ case 1:
215
+ // authentication oauth2 required
216
+ // oauth required
217
+ _a.sent();
218
+ if (isPermanent !== undefined) {
219
+ localVarQueryParameter['isPermanent'] = isPermanent;
220
+ }
221
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
222
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
223
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
224
+ return [2 /*return*/, {
225
+ url: (0, common_1.toPathString)(localVarUrlObj),
226
+ options: localVarRequestOptions,
227
+ }];
228
+ }
229
+ });
230
+ });
231
+ },
232
+ /**
233
+ *
234
+ * @summary Get user by id (Auth policies: RequireLocalManagerRole)
235
+ * @param {string} id
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ */
239
+ apiV1UsersIdGet: function (id_1) {
240
+ var args_1 = [];
241
+ for (var _i = 1; _i < arguments.length; _i++) {
242
+ args_1[_i - 1] = arguments[_i];
243
+ }
244
+ return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
245
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
246
+ if (options === void 0) { options = {}; }
247
+ return __generator(this, function (_a) {
248
+ switch (_a.label) {
249
+ case 0:
250
+ // verify required parameter 'id' is not null or undefined
251
+ (0, common_1.assertParamExists)('apiV1UsersIdGet', 'id', id);
252
+ localVarPath = "/api/v1/users/{id}"
253
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
254
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
255
+ if (configuration) {
256
+ baseOptions = configuration.baseOptions;
257
+ }
258
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
259
+ localVarHeaderParameter = {};
260
+ localVarQueryParameter = {};
261
+ // authentication oauth2 required
262
+ // oauth required
263
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
264
+ case 1:
265
+ // authentication oauth2 required
266
+ // oauth required
267
+ _a.sent();
268
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
269
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
271
+ return [2 /*return*/, {
272
+ url: (0, common_1.toPathString)(localVarUrlObj),
273
+ options: localVarRequestOptions,
274
+ }];
275
+ }
276
+ });
277
+ });
278
+ },
279
+ /**
280
+ *
281
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
282
+ * @param {string} id
283
+ * @param {UpdateUserCommand} [updateUserCommand]
284
+ * @param {*} [options] Override http request option.
285
+ * @throws {RequiredError}
286
+ */
287
+ apiV1UsersIdPut: function (id_1, updateUserCommand_1) {
288
+ var args_1 = [];
289
+ for (var _i = 2; _i < arguments.length; _i++) {
290
+ args_1[_i - 2] = arguments[_i];
291
+ }
292
+ return __awaiter(_this, __spreadArray([id_1, updateUserCommand_1], args_1, true), void 0, function (id, updateUserCommand, options) {
293
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
294
+ if (options === void 0) { options = {}; }
295
+ return __generator(this, function (_a) {
296
+ switch (_a.label) {
297
+ case 0:
298
+ // verify required parameter 'id' is not null or undefined
299
+ (0, common_1.assertParamExists)('apiV1UsersIdPut', 'id', id);
300
+ localVarPath = "/api/v1/users/{id}"
301
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
302
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
303
+ if (configuration) {
304
+ baseOptions = configuration.baseOptions;
305
+ }
306
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
307
+ localVarHeaderParameter = {};
308
+ localVarQueryParameter = {};
309
+ // authentication oauth2 required
310
+ // oauth required
311
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
312
+ case 1:
313
+ // authentication oauth2 required
314
+ // oauth required
315
+ _a.sent();
316
+ localVarHeaderParameter['Content-Type'] = 'application/json';
317
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
318
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
319
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
320
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateUserCommand, localVarRequestOptions, configuration);
321
+ return [2 /*return*/, {
322
+ url: (0, common_1.toPathString)(localVarUrlObj),
323
+ options: localVarRequestOptions,
324
+ }];
325
+ }
326
+ });
327
+ });
328
+ },
329
+ /**
330
+ *
331
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
332
+ * @param {string} id
333
+ * @param {*} [options] Override http request option.
334
+ * @throws {RequiredError}
335
+ */
336
+ apiV1UsersIdReactivatePut: function (id_1) {
337
+ var args_1 = [];
338
+ for (var _i = 1; _i < arguments.length; _i++) {
339
+ args_1[_i - 1] = arguments[_i];
340
+ }
341
+ return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
342
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
343
+ if (options === void 0) { options = {}; }
344
+ return __generator(this, function (_a) {
345
+ switch (_a.label) {
346
+ case 0:
347
+ // verify required parameter 'id' is not null or undefined
348
+ (0, common_1.assertParamExists)('apiV1UsersIdReactivatePut', 'id', id);
349
+ localVarPath = "/api/v1/users/{id}/reactivate"
350
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
351
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
352
+ if (configuration) {
353
+ baseOptions = configuration.baseOptions;
354
+ }
355
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
356
+ localVarHeaderParameter = {};
357
+ localVarQueryParameter = {};
358
+ // authentication oauth2 required
359
+ // oauth required
360
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
361
+ case 1:
362
+ // authentication oauth2 required
363
+ // oauth required
364
+ _a.sent();
365
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
366
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
367
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
368
+ return [2 /*return*/, {
369
+ url: (0, common_1.toPathString)(localVarUrlObj),
370
+ options: localVarRequestOptions,
371
+ }];
372
+ }
373
+ });
374
+ });
375
+ },
376
+ /**
377
+ *
378
+ * @summary Create user (Auth policies: RequireLocalManagerRole)
379
+ * @param {CreateUserCommand} [createUserCommand]
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ apiV1UsersPost: function (createUserCommand_1) {
384
+ var args_1 = [];
385
+ for (var _i = 1; _i < arguments.length; _i++) {
386
+ args_1[_i - 1] = arguments[_i];
387
+ }
388
+ return __awaiter(_this, __spreadArray([createUserCommand_1], args_1, true), void 0, function (createUserCommand, options) {
389
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
390
+ if (options === void 0) { options = {}; }
391
+ return __generator(this, function (_a) {
392
+ switch (_a.label) {
393
+ case 0:
394
+ localVarPath = "/api/v1/users";
395
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
396
+ if (configuration) {
397
+ baseOptions = configuration.baseOptions;
398
+ }
399
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
400
+ localVarHeaderParameter = {};
401
+ localVarQueryParameter = {};
402
+ // authentication oauth2 required
403
+ // oauth required
404
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
405
+ case 1:
406
+ // authentication oauth2 required
407
+ // oauth required
408
+ _a.sent();
409
+ localVarHeaderParameter['Content-Type'] = 'application/json';
410
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
411
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
412
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
413
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createUserCommand, localVarRequestOptions, configuration);
414
+ return [2 /*return*/, {
415
+ url: (0, common_1.toPathString)(localVarUrlObj),
416
+ options: localVarRequestOptions,
417
+ }];
418
+ }
419
+ });
420
+ });
421
+ },
422
+ };
423
+ };
424
+ exports.UsersApiAxiosParamCreator = UsersApiAxiosParamCreator;
425
+ /**
426
+ * UsersApi - functional programming interface
427
+ * @export
428
+ */
429
+ var UsersApiFp = function (configuration) {
430
+ var localVarAxiosParamCreator = (0, exports.UsersApiAxiosParamCreator)(configuration);
431
+ return {
432
+ /**
433
+ *
434
+ * @summary Get users (Auth policies: RequireLocalManagerRole)
435
+ * @param {string} [name]
436
+ * @param {string} [email]
437
+ * @param {string} [role]
438
+ * @param {string} [hospitalId]
439
+ * @param {boolean} [showHidden]
440
+ * @param {number} [page]
441
+ * @param {number} [limit]
442
+ * @param {Date} [lastRetrieved]
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ apiV1UsersGet: function (name, email, role, hospitalId, showHidden, page, limit, lastRetrieved, options) {
447
+ return __awaiter(this, void 0, void 0, function () {
448
+ var localVarAxiosArgs;
449
+ return __generator(this, function (_a) {
450
+ switch (_a.label) {
451
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1UsersGet(name, email, role, hospitalId, showHidden, page, limit, lastRetrieved, options)];
452
+ case 1:
453
+ localVarAxiosArgs = _a.sent();
454
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
455
+ }
456
+ });
457
+ });
458
+ },
459
+ /**
460
+ *
461
+ * @summary Delete user (Auth policies: RequireLocalManagerRole)
462
+ * @param {string} id
463
+ * @param {boolean} [isPermanent]
464
+ * @param {*} [options] Override http request option.
465
+ * @throws {RequiredError}
466
+ */
467
+ apiV1UsersIdDelete: function (id, isPermanent, options) {
468
+ return __awaiter(this, void 0, void 0, function () {
469
+ var localVarAxiosArgs;
470
+ return __generator(this, function (_a) {
471
+ switch (_a.label) {
472
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1UsersIdDelete(id, isPermanent, options)];
473
+ case 1:
474
+ localVarAxiosArgs = _a.sent();
475
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
476
+ }
477
+ });
478
+ });
479
+ },
480
+ /**
481
+ *
482
+ * @summary Get user by id (Auth policies: RequireLocalManagerRole)
483
+ * @param {string} id
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ */
487
+ apiV1UsersIdGet: function (id, options) {
488
+ return __awaiter(this, void 0, void 0, function () {
489
+ var localVarAxiosArgs;
490
+ return __generator(this, function (_a) {
491
+ switch (_a.label) {
492
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1UsersIdGet(id, options)];
493
+ case 1:
494
+ localVarAxiosArgs = _a.sent();
495
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
496
+ }
497
+ });
498
+ });
499
+ },
500
+ /**
501
+ *
502
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
503
+ * @param {string} id
504
+ * @param {UpdateUserCommand} [updateUserCommand]
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ apiV1UsersIdPut: function (id, updateUserCommand, options) {
509
+ return __awaiter(this, void 0, void 0, function () {
510
+ var localVarAxiosArgs;
511
+ return __generator(this, function (_a) {
512
+ switch (_a.label) {
513
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1UsersIdPut(id, updateUserCommand, options)];
514
+ case 1:
515
+ localVarAxiosArgs = _a.sent();
516
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
517
+ }
518
+ });
519
+ });
520
+ },
521
+ /**
522
+ *
523
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
524
+ * @param {string} id
525
+ * @param {*} [options] Override http request option.
526
+ * @throws {RequiredError}
527
+ */
528
+ apiV1UsersIdReactivatePut: function (id, options) {
529
+ return __awaiter(this, void 0, void 0, function () {
530
+ var localVarAxiosArgs;
531
+ return __generator(this, function (_a) {
532
+ switch (_a.label) {
533
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1UsersIdReactivatePut(id, options)];
534
+ case 1:
535
+ localVarAxiosArgs = _a.sent();
536
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
537
+ }
538
+ });
539
+ });
540
+ },
541
+ /**
542
+ *
543
+ * @summary Create user (Auth policies: RequireLocalManagerRole)
544
+ * @param {CreateUserCommand} [createUserCommand]
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ apiV1UsersPost: function (createUserCommand, options) {
549
+ return __awaiter(this, void 0, void 0, function () {
550
+ var localVarAxiosArgs;
551
+ return __generator(this, function (_a) {
552
+ switch (_a.label) {
553
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1UsersPost(createUserCommand, options)];
554
+ case 1:
555
+ localVarAxiosArgs = _a.sent();
556
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
557
+ }
558
+ });
559
+ });
560
+ },
561
+ };
562
+ };
563
+ exports.UsersApiFp = UsersApiFp;
564
+ /**
565
+ * UsersApi - factory interface
566
+ * @export
567
+ */
568
+ var UsersApiFactory = function (configuration, basePath, axios) {
569
+ var localVarFp = (0, exports.UsersApiFp)(configuration);
570
+ return {
571
+ /**
572
+ *
573
+ * @summary Get users (Auth policies: RequireLocalManagerRole)
574
+ * @param {string} [name]
575
+ * @param {string} [email]
576
+ * @param {string} [role]
577
+ * @param {string} [hospitalId]
578
+ * @param {boolean} [showHidden]
579
+ * @param {number} [page]
580
+ * @param {number} [limit]
581
+ * @param {Date} [lastRetrieved]
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ */
585
+ apiV1UsersGet: function (name, email, role, hospitalId, showHidden, page, limit, lastRetrieved, options) {
586
+ return localVarFp.apiV1UsersGet(name, email, role, hospitalId, showHidden, page, limit, lastRetrieved, options).then(function (request) { return request(axios, basePath); });
587
+ },
588
+ /**
589
+ *
590
+ * @summary Delete user (Auth policies: RequireLocalManagerRole)
591
+ * @param {string} id
592
+ * @param {boolean} [isPermanent]
593
+ * @param {*} [options] Override http request option.
594
+ * @throws {RequiredError}
595
+ */
596
+ apiV1UsersIdDelete: function (id, isPermanent, options) {
597
+ return localVarFp.apiV1UsersIdDelete(id, isPermanent, options).then(function (request) { return request(axios, basePath); });
598
+ },
599
+ /**
600
+ *
601
+ * @summary Get user by id (Auth policies: RequireLocalManagerRole)
602
+ * @param {string} id
603
+ * @param {*} [options] Override http request option.
604
+ * @throws {RequiredError}
605
+ */
606
+ apiV1UsersIdGet: function (id, options) {
607
+ return localVarFp.apiV1UsersIdGet(id, options).then(function (request) { return request(axios, basePath); });
608
+ },
609
+ /**
610
+ *
611
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
612
+ * @param {string} id
613
+ * @param {UpdateUserCommand} [updateUserCommand]
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ */
617
+ apiV1UsersIdPut: function (id, updateUserCommand, options) {
618
+ return localVarFp.apiV1UsersIdPut(id, updateUserCommand, options).then(function (request) { return request(axios, basePath); });
619
+ },
620
+ /**
621
+ *
622
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
623
+ * @param {string} id
624
+ * @param {*} [options] Override http request option.
625
+ * @throws {RequiredError}
626
+ */
627
+ apiV1UsersIdReactivatePut: function (id, options) {
628
+ return localVarFp.apiV1UsersIdReactivatePut(id, options).then(function (request) { return request(axios, basePath); });
629
+ },
630
+ /**
631
+ *
632
+ * @summary Create user (Auth policies: RequireLocalManagerRole)
633
+ * @param {CreateUserCommand} [createUserCommand]
634
+ * @param {*} [options] Override http request option.
635
+ * @throws {RequiredError}
636
+ */
637
+ apiV1UsersPost: function (createUserCommand, options) {
638
+ return localVarFp.apiV1UsersPost(createUserCommand, options).then(function (request) { return request(axios, basePath); });
639
+ },
640
+ };
641
+ };
642
+ exports.UsersApiFactory = UsersApiFactory;
643
+ /**
644
+ * UsersApi - object-oriented interface
645
+ * @export
646
+ * @class UsersApi
647
+ * @extends {BaseAPI}
648
+ */
649
+ var UsersApi = /** @class */ (function (_super) {
650
+ __extends(UsersApi, _super);
651
+ function UsersApi() {
652
+ return _super !== null && _super.apply(this, arguments) || this;
653
+ }
654
+ /**
655
+ *
656
+ * @summary Get users (Auth policies: RequireLocalManagerRole)
657
+ * @param {UsersApiApiV1UsersGetRequest} requestParameters Request parameters.
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ * @memberof UsersApi
661
+ */
662
+ UsersApi.prototype.apiV1UsersGet = function (requestParameters, options) {
663
+ var _this = this;
664
+ if (requestParameters === void 0) { requestParameters = {}; }
665
+ return (0, exports.UsersApiFp)(this.configuration).apiV1UsersGet(requestParameters.name, requestParameters.email, requestParameters.role, requestParameters.hospitalId, requestParameters.showHidden, requestParameters.page, requestParameters.limit, requestParameters.lastRetrieved, options).then(function (request) { return request(_this.axios, _this.basePath); });
666
+ };
667
+ /**
668
+ *
669
+ * @summary Delete user (Auth policies: RequireLocalManagerRole)
670
+ * @param {UsersApiApiV1UsersIdDeleteRequest} requestParameters Request parameters.
671
+ * @param {*} [options] Override http request option.
672
+ * @throws {RequiredError}
673
+ * @memberof UsersApi
674
+ */
675
+ UsersApi.prototype.apiV1UsersIdDelete = function (requestParameters, options) {
676
+ var _this = this;
677
+ return (0, exports.UsersApiFp)(this.configuration).apiV1UsersIdDelete(requestParameters.id, requestParameters.isPermanent, options).then(function (request) { return request(_this.axios, _this.basePath); });
678
+ };
679
+ /**
680
+ *
681
+ * @summary Get user by id (Auth policies: RequireLocalManagerRole)
682
+ * @param {UsersApiApiV1UsersIdGetRequest} requestParameters Request parameters.
683
+ * @param {*} [options] Override http request option.
684
+ * @throws {RequiredError}
685
+ * @memberof UsersApi
686
+ */
687
+ UsersApi.prototype.apiV1UsersIdGet = function (requestParameters, options) {
688
+ var _this = this;
689
+ return (0, exports.UsersApiFp)(this.configuration).apiV1UsersIdGet(requestParameters.id, options).then(function (request) { return request(_this.axios, _this.basePath); });
690
+ };
691
+ /**
692
+ *
693
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
694
+ * @param {UsersApiApiV1UsersIdPutRequest} requestParameters Request parameters.
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ * @memberof UsersApi
698
+ */
699
+ UsersApi.prototype.apiV1UsersIdPut = function (requestParameters, options) {
700
+ var _this = this;
701
+ return (0, exports.UsersApiFp)(this.configuration).apiV1UsersIdPut(requestParameters.id, requestParameters.updateUserCommand, options).then(function (request) { return request(_this.axios, _this.basePath); });
702
+ };
703
+ /**
704
+ *
705
+ * @summary Reactivate user (Auth policies: RequireLocalManagerRole)
706
+ * @param {UsersApiApiV1UsersIdReactivatePutRequest} requestParameters Request parameters.
707
+ * @param {*} [options] Override http request option.
708
+ * @throws {RequiredError}
709
+ * @memberof UsersApi
710
+ */
711
+ UsersApi.prototype.apiV1UsersIdReactivatePut = function (requestParameters, options) {
712
+ var _this = this;
713
+ return (0, exports.UsersApiFp)(this.configuration).apiV1UsersIdReactivatePut(requestParameters.id, options).then(function (request) { return request(_this.axios, _this.basePath); });
714
+ };
715
+ /**
716
+ *
717
+ * @summary Create user (Auth policies: RequireLocalManagerRole)
718
+ * @param {UsersApiApiV1UsersPostRequest} requestParameters Request parameters.
719
+ * @param {*} [options] Override http request option.
720
+ * @throws {RequiredError}
721
+ * @memberof UsersApi
722
+ */
723
+ UsersApi.prototype.apiV1UsersPost = function (requestParameters, options) {
724
+ var _this = this;
725
+ if (requestParameters === void 0) { requestParameters = {}; }
726
+ return (0, exports.UsersApiFp)(this.configuration).apiV1UsersPost(requestParameters.createUserCommand, options).then(function (request) { return request(_this.axios, _this.basePath); });
727
+ };
728
+ return UsersApi;
729
+ }(base_1.BaseAPI));
730
+ exports.UsersApi = UsersApi;