ch-admin-api-client-typescript 5.36.83 → 5.37.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/lib/api/countries-api.d.ts +324 -0
  2. package/lib/api/countries-api.d.ts.map +1 -1
  3. package/lib/api/countries-api.js +485 -0
  4. package/lib/api/currencies-api.d.ts +422 -0
  5. package/lib/api/currencies-api.d.ts.map +1 -0
  6. package/lib/api/currencies-api.js +764 -0
  7. package/lib/api.d.ts +1 -0
  8. package/lib/api.d.ts.map +1 -1
  9. package/lib/api.js +1 -0
  10. package/lib/models/country-currencies-model.d.ts +33 -0
  11. package/lib/models/country-currencies-model.d.ts.map +1 -0
  12. package/lib/models/country-currencies-model.js +15 -0
  13. package/lib/models/country-currency-item-model.d.ts +55 -0
  14. package/lib/models/country-currency-item-model.d.ts.map +1 -0
  15. package/lib/models/country-currency-item-model.js +15 -0
  16. package/lib/models/country-currency-model.d.ts +55 -0
  17. package/lib/models/country-currency-model.d.ts.map +1 -0
  18. package/lib/models/country-currency-model.js +15 -0
  19. package/lib/models/create-currency-command.d.ts +37 -0
  20. package/lib/models/create-currency-command.d.ts.map +1 -0
  21. package/lib/models/create-currency-command.js +15 -0
  22. package/lib/models/currencies-model.d.ts +33 -0
  23. package/lib/models/currencies-model.d.ts.map +1 -0
  24. package/lib/models/currencies-model.js +15 -0
  25. package/lib/models/currency-item-model.d.ts +43 -0
  26. package/lib/models/currency-item-model.d.ts.map +1 -0
  27. package/lib/models/currency-item-model.js +15 -0
  28. package/lib/models/currency-model.d.ts +50 -0
  29. package/lib/models/currency-model.d.ts.map +1 -0
  30. package/lib/models/currency-model.js +15 -0
  31. package/lib/models/index.d.ts +11 -0
  32. package/lib/models/index.d.ts.map +1 -1
  33. package/lib/models/index.js +11 -0
  34. package/lib/models/save-country-currency-command.d.ts +25 -0
  35. package/lib/models/save-country-currency-command.d.ts.map +1 -0
  36. package/lib/models/save-country-currency-command.js +15 -0
  37. package/lib/models/sort-country-currencies-command.d.ts +26 -0
  38. package/lib/models/sort-country-currencies-command.d.ts.map +1 -0
  39. package/lib/models/sort-country-currencies-command.js +15 -0
  40. package/lib/models/sort-currencies-command.d.ts +26 -0
  41. package/lib/models/sort-currencies-command.d.ts.map +1 -0
  42. package/lib/models/sort-currencies-command.js +15 -0
  43. package/lib/models/update-currency-command.d.ts +37 -0
  44. package/lib/models/update-currency-command.d.ts.map +1 -0
  45. package/lib/models/update-currency-command.js +15 -0
  46. package/package.json +1 -1
  47. package/src/.openapi-generator/FILES +12 -0
  48. package/src/api/countries-api.ts +570 -0
  49. package/src/api/currencies-api.ts +751 -0
  50. package/src/api.ts +1 -0
  51. package/src/models/country-currencies-model.ts +42 -0
  52. package/src/models/country-currency-item-model.ts +60 -0
  53. package/src/models/country-currency-model.ts +60 -0
  54. package/src/models/create-currency-command.ts +42 -0
  55. package/src/models/currencies-model.ts +42 -0
  56. package/src/models/currency-item-model.ts +48 -0
  57. package/src/models/currency-model.ts +57 -0
  58. package/src/models/index.ts +11 -0
  59. package/src/models/save-country-currency-command.ts +30 -0
  60. package/src/models/sort-country-currencies-command.ts +33 -0
  61. package/src/models/sort-currencies-command.ts +33 -0
  62. package/src/models/update-currency-command.ts +42 -0
@@ -0,0 +1,764 @@
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;
52
+ return g = { next: verb(0), "throw": verb(1), "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 __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.CurrenciesApi = exports.CurrenciesApiFactory = exports.CurrenciesApiFp = exports.CurrenciesApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * CurrenciesApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var CurrenciesApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ *
97
+ * @summary Delete currency
98
+ * @param {string} currencyId
99
+ * @param {boolean} [isPermanent]
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ apiV1CurrenciesCurrencyIdDelete: function (currencyId, isPermanent, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'currencyId' is not null or undefined
111
+ (0, common_1.assertParamExists)('apiV1CurrenciesCurrencyIdDelete', 'currencyId', currencyId);
112
+ localVarPath = "/api/v1/currencies/{currencyId}"
113
+ .replace("{".concat("currencyId", "}"), encodeURIComponent(String(currencyId)));
114
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
115
+ if (configuration) {
116
+ baseOptions = configuration.baseOptions;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication oauth2 required
122
+ // oauth required
123
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
124
+ case 1:
125
+ // authentication oauth2 required
126
+ // oauth required
127
+ _a.sent();
128
+ if (isPermanent !== undefined) {
129
+ localVarQueryParameter['isPermanent'] = isPermanent;
130
+ }
131
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ return [2 /*return*/, {
135
+ url: (0, common_1.toPathString)(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ }];
138
+ }
139
+ });
140
+ });
141
+ },
142
+ /**
143
+ *
144
+ * @summary Get currency
145
+ * @param {string} currencyId
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ apiV1CurrenciesCurrencyIdGet: function (currencyId, options) {
150
+ if (options === void 0) { options = {}; }
151
+ return __awaiter(_this, void 0, void 0, function () {
152
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
153
+ return __generator(this, function (_a) {
154
+ switch (_a.label) {
155
+ case 0:
156
+ // verify required parameter 'currencyId' is not null or undefined
157
+ (0, common_1.assertParamExists)('apiV1CurrenciesCurrencyIdGet', 'currencyId', currencyId);
158
+ localVarPath = "/api/v1/currencies/{currencyId}"
159
+ .replace("{".concat("currencyId", "}"), encodeURIComponent(String(currencyId)));
160
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
161
+ if (configuration) {
162
+ baseOptions = configuration.baseOptions;
163
+ }
164
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
165
+ localVarHeaderParameter = {};
166
+ localVarQueryParameter = {};
167
+ // authentication oauth2 required
168
+ // oauth required
169
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
170
+ case 1:
171
+ // authentication oauth2 required
172
+ // oauth required
173
+ _a.sent();
174
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
175
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
176
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
177
+ return [2 /*return*/, {
178
+ url: (0, common_1.toPathString)(localVarUrlObj),
179
+ options: localVarRequestOptions,
180
+ }];
181
+ }
182
+ });
183
+ });
184
+ },
185
+ /**
186
+ *
187
+ * @summary Update currency
188
+ * @param {string} currencyId
189
+ * @param {UpdateCurrencyCommand} [updateCurrencyCommand]
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ apiV1CurrenciesCurrencyIdPut: function (currencyId, updateCurrencyCommand, options) {
194
+ if (options === void 0) { options = {}; }
195
+ return __awaiter(_this, void 0, void 0, function () {
196
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
197
+ return __generator(this, function (_a) {
198
+ switch (_a.label) {
199
+ case 0:
200
+ // verify required parameter 'currencyId' is not null or undefined
201
+ (0, common_1.assertParamExists)('apiV1CurrenciesCurrencyIdPut', 'currencyId', currencyId);
202
+ localVarPath = "/api/v1/currencies/{currencyId}"
203
+ .replace("{".concat("currencyId", "}"), encodeURIComponent(String(currencyId)));
204
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
205
+ if (configuration) {
206
+ baseOptions = configuration.baseOptions;
207
+ }
208
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, 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
+ localVarHeaderParameter['Content-Type'] = 'application/json';
219
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
220
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
221
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
222
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCurrencyCommand, localVarRequestOptions, configuration);
223
+ return [2 /*return*/, {
224
+ url: (0, common_1.toPathString)(localVarUrlObj),
225
+ options: localVarRequestOptions,
226
+ }];
227
+ }
228
+ });
229
+ });
230
+ },
231
+ /**
232
+ *
233
+ * @summary Reactivate currency
234
+ * @param {string} currencyId
235
+ * @param {*} [options] Override http request option.
236
+ * @throws {RequiredError}
237
+ */
238
+ apiV1CurrenciesCurrencyIdReactivatePut: function (currencyId, options) {
239
+ if (options === void 0) { options = {}; }
240
+ return __awaiter(_this, void 0, void 0, function () {
241
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
242
+ return __generator(this, function (_a) {
243
+ switch (_a.label) {
244
+ case 0:
245
+ // verify required parameter 'currencyId' is not null or undefined
246
+ (0, common_1.assertParamExists)('apiV1CurrenciesCurrencyIdReactivatePut', 'currencyId', currencyId);
247
+ localVarPath = "/api/v1/currencies/{currencyId}/reactivate"
248
+ .replace("{".concat("currencyId", "}"), encodeURIComponent(String(currencyId)));
249
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
250
+ if (configuration) {
251
+ baseOptions = configuration.baseOptions;
252
+ }
253
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
254
+ localVarHeaderParameter = {};
255
+ localVarQueryParameter = {};
256
+ // authentication oauth2 required
257
+ // oauth required
258
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
259
+ case 1:
260
+ // authentication oauth2 required
261
+ // oauth required
262
+ _a.sent();
263
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
264
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
265
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
266
+ return [2 /*return*/, {
267
+ url: (0, common_1.toPathString)(localVarUrlObj),
268
+ options: localVarRequestOptions,
269
+ }];
270
+ }
271
+ });
272
+ });
273
+ },
274
+ /**
275
+ *
276
+ * @summary Get currencies
277
+ * @param {string} [id]
278
+ * @param {string} [currencyCode]
279
+ * @param {number} [page]
280
+ * @param {number} [limit]
281
+ * @param {Date} [lastRetrieved]
282
+ * @param {*} [options] Override http request option.
283
+ * @throws {RequiredError}
284
+ */
285
+ apiV1CurrenciesGet: function (id, currencyCode, page, limit, lastRetrieved, options) {
286
+ if (options === void 0) { options = {}; }
287
+ return __awaiter(_this, void 0, void 0, function () {
288
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
289
+ return __generator(this, function (_a) {
290
+ switch (_a.label) {
291
+ case 0:
292
+ localVarPath = "/api/v1/currencies";
293
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
294
+ if (configuration) {
295
+ baseOptions = configuration.baseOptions;
296
+ }
297
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
298
+ localVarHeaderParameter = {};
299
+ localVarQueryParameter = {};
300
+ // authentication oauth2 required
301
+ // oauth required
302
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
303
+ case 1:
304
+ // authentication oauth2 required
305
+ // oauth required
306
+ _a.sent();
307
+ if (id !== undefined) {
308
+ localVarQueryParameter['Id'] = id;
309
+ }
310
+ if (currencyCode !== undefined) {
311
+ localVarQueryParameter['CurrencyCode'] = currencyCode;
312
+ }
313
+ if (page !== undefined) {
314
+ localVarQueryParameter['page'] = page;
315
+ }
316
+ if (limit !== undefined) {
317
+ localVarQueryParameter['limit'] = limit;
318
+ }
319
+ if (lastRetrieved !== undefined) {
320
+ localVarQueryParameter['lastRetrieved'] = (lastRetrieved instanceof Date) ?
321
+ lastRetrieved.toISOString() :
322
+ lastRetrieved;
323
+ }
324
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
325
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
326
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
327
+ return [2 /*return*/, {
328
+ url: (0, common_1.toPathString)(localVarUrlObj),
329
+ options: localVarRequestOptions,
330
+ }];
331
+ }
332
+ });
333
+ });
334
+ },
335
+ /**
336
+ *
337
+ * @summary Create currency
338
+ * @param {CreateCurrencyCommand} [createCurrencyCommand]
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ */
342
+ apiV1CurrenciesPost: function (createCurrencyCommand, options) {
343
+ if (options === void 0) { options = {}; }
344
+ return __awaiter(_this, void 0, void 0, function () {
345
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
346
+ return __generator(this, function (_a) {
347
+ switch (_a.label) {
348
+ case 0:
349
+ localVarPath = "/api/v1/currencies";
350
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
351
+ if (configuration) {
352
+ baseOptions = configuration.baseOptions;
353
+ }
354
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
355
+ localVarHeaderParameter = {};
356
+ localVarQueryParameter = {};
357
+ // authentication oauth2 required
358
+ // oauth required
359
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
360
+ case 1:
361
+ // authentication oauth2 required
362
+ // oauth required
363
+ _a.sent();
364
+ localVarHeaderParameter['Content-Type'] = 'application/json';
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
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCurrencyCommand, localVarRequestOptions, configuration);
369
+ return [2 /*return*/, {
370
+ url: (0, common_1.toPathString)(localVarUrlObj),
371
+ options: localVarRequestOptions,
372
+ }];
373
+ }
374
+ });
375
+ });
376
+ },
377
+ /**
378
+ *
379
+ * @summary Sort currencies
380
+ * @param {SortCurrenciesCommand} [sortCurrenciesCommand]
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ apiV1CurrenciesSortPut: function (sortCurrenciesCommand, options) {
385
+ if (options === void 0) { options = {}; }
386
+ return __awaiter(_this, void 0, void 0, function () {
387
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
388
+ return __generator(this, function (_a) {
389
+ switch (_a.label) {
390
+ case 0:
391
+ localVarPath = "/api/v1/currencies/sort";
392
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
393
+ if (configuration) {
394
+ baseOptions = configuration.baseOptions;
395
+ }
396
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
397
+ localVarHeaderParameter = {};
398
+ localVarQueryParameter = {};
399
+ // authentication oauth2 required
400
+ // oauth required
401
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)];
402
+ case 1:
403
+ // authentication oauth2 required
404
+ // oauth required
405
+ _a.sent();
406
+ localVarHeaderParameter['Content-Type'] = 'application/json';
407
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
408
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
409
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
410
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sortCurrenciesCommand, localVarRequestOptions, configuration);
411
+ return [2 /*return*/, {
412
+ url: (0, common_1.toPathString)(localVarUrlObj),
413
+ options: localVarRequestOptions,
414
+ }];
415
+ }
416
+ });
417
+ });
418
+ },
419
+ };
420
+ };
421
+ exports.CurrenciesApiAxiosParamCreator = CurrenciesApiAxiosParamCreator;
422
+ /**
423
+ * CurrenciesApi - functional programming interface
424
+ * @export
425
+ */
426
+ var CurrenciesApiFp = function (configuration) {
427
+ var localVarAxiosParamCreator = (0, exports.CurrenciesApiAxiosParamCreator)(configuration);
428
+ return {
429
+ /**
430
+ *
431
+ * @summary Delete currency
432
+ * @param {string} currencyId
433
+ * @param {boolean} [isPermanent]
434
+ * @param {*} [options] Override http request option.
435
+ * @throws {RequiredError}
436
+ */
437
+ apiV1CurrenciesCurrencyIdDelete: function (currencyId, isPermanent, options) {
438
+ return __awaiter(this, void 0, void 0, function () {
439
+ var localVarAxiosArgs;
440
+ return __generator(this, function (_a) {
441
+ switch (_a.label) {
442
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1CurrenciesCurrencyIdDelete(currencyId, isPermanent, options)];
443
+ case 1:
444
+ localVarAxiosArgs = _a.sent();
445
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
446
+ }
447
+ });
448
+ });
449
+ },
450
+ /**
451
+ *
452
+ * @summary Get currency
453
+ * @param {string} currencyId
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ apiV1CurrenciesCurrencyIdGet: function (currencyId, options) {
458
+ return __awaiter(this, void 0, void 0, function () {
459
+ var localVarAxiosArgs;
460
+ return __generator(this, function (_a) {
461
+ switch (_a.label) {
462
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1CurrenciesCurrencyIdGet(currencyId, options)];
463
+ case 1:
464
+ localVarAxiosArgs = _a.sent();
465
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
466
+ }
467
+ });
468
+ });
469
+ },
470
+ /**
471
+ *
472
+ * @summary Update currency
473
+ * @param {string} currencyId
474
+ * @param {UpdateCurrencyCommand} [updateCurrencyCommand]
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ */
478
+ apiV1CurrenciesCurrencyIdPut: function (currencyId, updateCurrencyCommand, options) {
479
+ return __awaiter(this, void 0, void 0, function () {
480
+ var localVarAxiosArgs;
481
+ return __generator(this, function (_a) {
482
+ switch (_a.label) {
483
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1CurrenciesCurrencyIdPut(currencyId, updateCurrencyCommand, options)];
484
+ case 1:
485
+ localVarAxiosArgs = _a.sent();
486
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
487
+ }
488
+ });
489
+ });
490
+ },
491
+ /**
492
+ *
493
+ * @summary Reactivate currency
494
+ * @param {string} currencyId
495
+ * @param {*} [options] Override http request option.
496
+ * @throws {RequiredError}
497
+ */
498
+ apiV1CurrenciesCurrencyIdReactivatePut: function (currencyId, options) {
499
+ return __awaiter(this, void 0, void 0, function () {
500
+ var localVarAxiosArgs;
501
+ return __generator(this, function (_a) {
502
+ switch (_a.label) {
503
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1CurrenciesCurrencyIdReactivatePut(currencyId, options)];
504
+ case 1:
505
+ localVarAxiosArgs = _a.sent();
506
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
507
+ }
508
+ });
509
+ });
510
+ },
511
+ /**
512
+ *
513
+ * @summary Get currencies
514
+ * @param {string} [id]
515
+ * @param {string} [currencyCode]
516
+ * @param {number} [page]
517
+ * @param {number} [limit]
518
+ * @param {Date} [lastRetrieved]
519
+ * @param {*} [options] Override http request option.
520
+ * @throws {RequiredError}
521
+ */
522
+ apiV1CurrenciesGet: function (id, currencyCode, page, limit, lastRetrieved, options) {
523
+ return __awaiter(this, void 0, void 0, function () {
524
+ var localVarAxiosArgs;
525
+ return __generator(this, function (_a) {
526
+ switch (_a.label) {
527
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1CurrenciesGet(id, currencyCode, page, limit, lastRetrieved, options)];
528
+ case 1:
529
+ localVarAxiosArgs = _a.sent();
530
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
531
+ }
532
+ });
533
+ });
534
+ },
535
+ /**
536
+ *
537
+ * @summary Create currency
538
+ * @param {CreateCurrencyCommand} [createCurrencyCommand]
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ apiV1CurrenciesPost: function (createCurrencyCommand, options) {
543
+ return __awaiter(this, void 0, void 0, function () {
544
+ var localVarAxiosArgs;
545
+ return __generator(this, function (_a) {
546
+ switch (_a.label) {
547
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1CurrenciesPost(createCurrencyCommand, options)];
548
+ case 1:
549
+ localVarAxiosArgs = _a.sent();
550
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
551
+ }
552
+ });
553
+ });
554
+ },
555
+ /**
556
+ *
557
+ * @summary Sort currencies
558
+ * @param {SortCurrenciesCommand} [sortCurrenciesCommand]
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ */
562
+ apiV1CurrenciesSortPut: function (sortCurrenciesCommand, options) {
563
+ return __awaiter(this, void 0, void 0, function () {
564
+ var localVarAxiosArgs;
565
+ return __generator(this, function (_a) {
566
+ switch (_a.label) {
567
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV1CurrenciesSortPut(sortCurrenciesCommand, options)];
568
+ case 1:
569
+ localVarAxiosArgs = _a.sent();
570
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
571
+ }
572
+ });
573
+ });
574
+ },
575
+ };
576
+ };
577
+ exports.CurrenciesApiFp = CurrenciesApiFp;
578
+ /**
579
+ * CurrenciesApi - factory interface
580
+ * @export
581
+ */
582
+ var CurrenciesApiFactory = function (configuration, basePath, axios) {
583
+ var localVarFp = (0, exports.CurrenciesApiFp)(configuration);
584
+ return {
585
+ /**
586
+ *
587
+ * @summary Delete currency
588
+ * @param {string} currencyId
589
+ * @param {boolean} [isPermanent]
590
+ * @param {*} [options] Override http request option.
591
+ * @throws {RequiredError}
592
+ */
593
+ apiV1CurrenciesCurrencyIdDelete: function (currencyId, isPermanent, options) {
594
+ return localVarFp.apiV1CurrenciesCurrencyIdDelete(currencyId, isPermanent, options).then(function (request) { return request(axios, basePath); });
595
+ },
596
+ /**
597
+ *
598
+ * @summary Get currency
599
+ * @param {string} currencyId
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ */
603
+ apiV1CurrenciesCurrencyIdGet: function (currencyId, options) {
604
+ return localVarFp.apiV1CurrenciesCurrencyIdGet(currencyId, options).then(function (request) { return request(axios, basePath); });
605
+ },
606
+ /**
607
+ *
608
+ * @summary Update currency
609
+ * @param {string} currencyId
610
+ * @param {UpdateCurrencyCommand} [updateCurrencyCommand]
611
+ * @param {*} [options] Override http request option.
612
+ * @throws {RequiredError}
613
+ */
614
+ apiV1CurrenciesCurrencyIdPut: function (currencyId, updateCurrencyCommand, options) {
615
+ return localVarFp.apiV1CurrenciesCurrencyIdPut(currencyId, updateCurrencyCommand, options).then(function (request) { return request(axios, basePath); });
616
+ },
617
+ /**
618
+ *
619
+ * @summary Reactivate currency
620
+ * @param {string} currencyId
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ apiV1CurrenciesCurrencyIdReactivatePut: function (currencyId, options) {
625
+ return localVarFp.apiV1CurrenciesCurrencyIdReactivatePut(currencyId, options).then(function (request) { return request(axios, basePath); });
626
+ },
627
+ /**
628
+ *
629
+ * @summary Get currencies
630
+ * @param {string} [id]
631
+ * @param {string} [currencyCode]
632
+ * @param {number} [page]
633
+ * @param {number} [limit]
634
+ * @param {Date} [lastRetrieved]
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ apiV1CurrenciesGet: function (id, currencyCode, page, limit, lastRetrieved, options) {
639
+ return localVarFp.apiV1CurrenciesGet(id, currencyCode, page, limit, lastRetrieved, options).then(function (request) { return request(axios, basePath); });
640
+ },
641
+ /**
642
+ *
643
+ * @summary Create currency
644
+ * @param {CreateCurrencyCommand} [createCurrencyCommand]
645
+ * @param {*} [options] Override http request option.
646
+ * @throws {RequiredError}
647
+ */
648
+ apiV1CurrenciesPost: function (createCurrencyCommand, options) {
649
+ return localVarFp.apiV1CurrenciesPost(createCurrencyCommand, options).then(function (request) { return request(axios, basePath); });
650
+ },
651
+ /**
652
+ *
653
+ * @summary Sort currencies
654
+ * @param {SortCurrenciesCommand} [sortCurrenciesCommand]
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ */
658
+ apiV1CurrenciesSortPut: function (sortCurrenciesCommand, options) {
659
+ return localVarFp.apiV1CurrenciesSortPut(sortCurrenciesCommand, options).then(function (request) { return request(axios, basePath); });
660
+ },
661
+ };
662
+ };
663
+ exports.CurrenciesApiFactory = CurrenciesApiFactory;
664
+ /**
665
+ * CurrenciesApi - object-oriented interface
666
+ * @export
667
+ * @class CurrenciesApi
668
+ * @extends {BaseAPI}
669
+ */
670
+ var CurrenciesApi = /** @class */ (function (_super) {
671
+ __extends(CurrenciesApi, _super);
672
+ function CurrenciesApi() {
673
+ return _super !== null && _super.apply(this, arguments) || this;
674
+ }
675
+ /**
676
+ *
677
+ * @summary Delete currency
678
+ * @param {CurrenciesApiApiV1CurrenciesCurrencyIdDeleteRequest} requestParameters Request parameters.
679
+ * @param {*} [options] Override http request option.
680
+ * @throws {RequiredError}
681
+ * @memberof CurrenciesApi
682
+ */
683
+ CurrenciesApi.prototype.apiV1CurrenciesCurrencyIdDelete = function (requestParameters, options) {
684
+ var _this = this;
685
+ return (0, exports.CurrenciesApiFp)(this.configuration).apiV1CurrenciesCurrencyIdDelete(requestParameters.currencyId, requestParameters.isPermanent, options).then(function (request) { return request(_this.axios, _this.basePath); });
686
+ };
687
+ /**
688
+ *
689
+ * @summary Get currency
690
+ * @param {CurrenciesApiApiV1CurrenciesCurrencyIdGetRequest} requestParameters Request parameters.
691
+ * @param {*} [options] Override http request option.
692
+ * @throws {RequiredError}
693
+ * @memberof CurrenciesApi
694
+ */
695
+ CurrenciesApi.prototype.apiV1CurrenciesCurrencyIdGet = function (requestParameters, options) {
696
+ var _this = this;
697
+ return (0, exports.CurrenciesApiFp)(this.configuration).apiV1CurrenciesCurrencyIdGet(requestParameters.currencyId, options).then(function (request) { return request(_this.axios, _this.basePath); });
698
+ };
699
+ /**
700
+ *
701
+ * @summary Update currency
702
+ * @param {CurrenciesApiApiV1CurrenciesCurrencyIdPutRequest} requestParameters Request parameters.
703
+ * @param {*} [options] Override http request option.
704
+ * @throws {RequiredError}
705
+ * @memberof CurrenciesApi
706
+ */
707
+ CurrenciesApi.prototype.apiV1CurrenciesCurrencyIdPut = function (requestParameters, options) {
708
+ var _this = this;
709
+ return (0, exports.CurrenciesApiFp)(this.configuration).apiV1CurrenciesCurrencyIdPut(requestParameters.currencyId, requestParameters.updateCurrencyCommand, options).then(function (request) { return request(_this.axios, _this.basePath); });
710
+ };
711
+ /**
712
+ *
713
+ * @summary Reactivate currency
714
+ * @param {CurrenciesApiApiV1CurrenciesCurrencyIdReactivatePutRequest} requestParameters Request parameters.
715
+ * @param {*} [options] Override http request option.
716
+ * @throws {RequiredError}
717
+ * @memberof CurrenciesApi
718
+ */
719
+ CurrenciesApi.prototype.apiV1CurrenciesCurrencyIdReactivatePut = function (requestParameters, options) {
720
+ var _this = this;
721
+ return (0, exports.CurrenciesApiFp)(this.configuration).apiV1CurrenciesCurrencyIdReactivatePut(requestParameters.currencyId, options).then(function (request) { return request(_this.axios, _this.basePath); });
722
+ };
723
+ /**
724
+ *
725
+ * @summary Get currencies
726
+ * @param {CurrenciesApiApiV1CurrenciesGetRequest} requestParameters Request parameters.
727
+ * @param {*} [options] Override http request option.
728
+ * @throws {RequiredError}
729
+ * @memberof CurrenciesApi
730
+ */
731
+ CurrenciesApi.prototype.apiV1CurrenciesGet = function (requestParameters, options) {
732
+ var _this = this;
733
+ if (requestParameters === void 0) { requestParameters = {}; }
734
+ return (0, exports.CurrenciesApiFp)(this.configuration).apiV1CurrenciesGet(requestParameters.id, requestParameters.currencyCode, requestParameters.page, requestParameters.limit, requestParameters.lastRetrieved, options).then(function (request) { return request(_this.axios, _this.basePath); });
735
+ };
736
+ /**
737
+ *
738
+ * @summary Create currency
739
+ * @param {CurrenciesApiApiV1CurrenciesPostRequest} requestParameters Request parameters.
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ * @memberof CurrenciesApi
743
+ */
744
+ CurrenciesApi.prototype.apiV1CurrenciesPost = function (requestParameters, options) {
745
+ var _this = this;
746
+ if (requestParameters === void 0) { requestParameters = {}; }
747
+ return (0, exports.CurrenciesApiFp)(this.configuration).apiV1CurrenciesPost(requestParameters.createCurrencyCommand, options).then(function (request) { return request(_this.axios, _this.basePath); });
748
+ };
749
+ /**
750
+ *
751
+ * @summary Sort currencies
752
+ * @param {CurrenciesApiApiV1CurrenciesSortPutRequest} requestParameters Request parameters.
753
+ * @param {*} [options] Override http request option.
754
+ * @throws {RequiredError}
755
+ * @memberof CurrenciesApi
756
+ */
757
+ CurrenciesApi.prototype.apiV1CurrenciesSortPut = function (requestParameters, options) {
758
+ var _this = this;
759
+ if (requestParameters === void 0) { requestParameters = {}; }
760
+ return (0, exports.CurrenciesApiFp)(this.configuration).apiV1CurrenciesSortPut(requestParameters.sortCurrenciesCommand, options).then(function (request) { return request(_this.axios, _this.basePath); });
761
+ };
762
+ return CurrenciesApi;
763
+ }(base_1.BaseAPI));
764
+ exports.CurrenciesApi = CurrenciesApi;