ch-admin-api-client-typescript 5.36.31 → 5.36.33

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 (38) hide show
  1. package/lib/api/promotions-api.d.ts +430 -0
  2. package/lib/api/promotions-api.d.ts.map +1 -0
  3. package/lib/api/promotions-api.js +719 -0
  4. package/lib/api.d.ts +1 -0
  5. package/lib/api.d.ts.map +1 -1
  6. package/lib/api.js +1 -0
  7. package/lib/models/create-promotion-command.d.ts +93 -0
  8. package/lib/models/create-promotion-command.d.ts.map +1 -0
  9. package/lib/models/create-promotion-command.js +15 -0
  10. package/lib/models/index.d.ts +6 -0
  11. package/lib/models/index.d.ts.map +1 -1
  12. package/lib/models/index.js +6 -0
  13. package/lib/models/promotion-item-model.d.ts +92 -0
  14. package/lib/models/promotion-item-model.d.ts.map +1 -0
  15. package/lib/models/promotion-item-model.js +15 -0
  16. package/lib/models/promotion-model.d.ts +99 -0
  17. package/lib/models/promotion-model.d.ts.map +1 -0
  18. package/lib/models/promotion-model.js +15 -0
  19. package/lib/models/promotion-type.d.ts +23 -0
  20. package/lib/models/promotion-type.d.ts.map +1 -0
  21. package/lib/models/promotion-type.js +26 -0
  22. package/lib/models/promotions-model.d.ts +33 -0
  23. package/lib/models/promotions-model.d.ts.map +1 -0
  24. package/lib/models/promotions-model.js +15 -0
  25. package/lib/models/update-promotion-command.d.ts +87 -0
  26. package/lib/models/update-promotion-command.d.ts.map +1 -0
  27. package/lib/models/update-promotion-command.js +15 -0
  28. package/package.json +1 -1
  29. package/src/.openapi-generator/FILES +7 -0
  30. package/src/api/promotions-api.ts +754 -0
  31. package/src/api.ts +1 -0
  32. package/src/models/create-promotion-command.ts +102 -0
  33. package/src/models/index.ts +6 -0
  34. package/src/models/promotion-item-model.ts +99 -0
  35. package/src/models/promotion-model.ts +108 -0
  36. package/src/models/promotion-type.ts +32 -0
  37. package/src/models/promotions-model.ts +42 -0
  38. package/src/models/update-promotion-command.ts +96 -0
@@ -0,0 +1,754 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * CloudHospital Admin Api
5
+ * CloudHospital application with Swagger, Swashbuckle, and API versioning.
6
+ *
7
+ * The version of the OpenAPI document: 1
8
+ * Contact: developer@icloudhospital.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreatePromotionCommand } from '../models';
25
+ // @ts-ignore
26
+ import { ProblemDetails } from '../models';
27
+ // @ts-ignore
28
+ import { PromotionModel } from '../models';
29
+ // @ts-ignore
30
+ import { PromotionType } from '../models';
31
+ // @ts-ignore
32
+ import { PromotionsModel } from '../models';
33
+ // @ts-ignore
34
+ import { UpdatePromotionCommand } from '../models';
35
+ /**
36
+ * PromotionsApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const PromotionsApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ *
43
+ * @summary Get promotions
44
+ * @param {string} [languageCode]
45
+ * @param {string} [hospitalId]
46
+ * @param {PromotionType} [promotionType]
47
+ * @param {boolean} [showHidden]
48
+ * @param {boolean} [isActivated]
49
+ * @param {Date} [start]
50
+ * @param {Date} [end]
51
+ * @param {number} [page]
52
+ * @param {number} [limit]
53
+ * @param {Date} [lastRetrieved]
54
+ * @param {*} [options] Override http request option.
55
+ * @throws {RequiredError}
56
+ */
57
+ apiV1PromotionsGet: async (languageCode?: string, hospitalId?: string, promotionType?: PromotionType, showHidden?: boolean, isActivated?: boolean, start?: Date, end?: Date, page?: number, limit?: number, lastRetrieved?: Date, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
58
+ const localVarPath = `/api/v1/promotions`;
59
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
60
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
61
+ let baseOptions;
62
+ if (configuration) {
63
+ baseOptions = configuration.baseOptions;
64
+ }
65
+
66
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
67
+ const localVarHeaderParameter = {} as any;
68
+ const localVarQueryParameter = {} as any;
69
+
70
+ // authentication oauth2 required
71
+ // oauth required
72
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)
73
+
74
+ if (languageCode !== undefined) {
75
+ localVarQueryParameter['LanguageCode'] = languageCode;
76
+ }
77
+
78
+ if (hospitalId !== undefined) {
79
+ localVarQueryParameter['HospitalId'] = hospitalId;
80
+ }
81
+
82
+ if (promotionType !== undefined) {
83
+ localVarQueryParameter['PromotionType'] = promotionType;
84
+ }
85
+
86
+ if (showHidden !== undefined) {
87
+ localVarQueryParameter['ShowHidden'] = showHidden;
88
+ }
89
+
90
+ if (isActivated !== undefined) {
91
+ localVarQueryParameter['IsActivated'] = isActivated;
92
+ }
93
+
94
+ if (start !== undefined) {
95
+ localVarQueryParameter['Start'] = (start as any instanceof Date) ?
96
+ (start as any).toISOString() :
97
+ start;
98
+ }
99
+
100
+ if (end !== undefined) {
101
+ localVarQueryParameter['End'] = (end as any instanceof Date) ?
102
+ (end as any).toISOString() :
103
+ end;
104
+ }
105
+
106
+ if (page !== undefined) {
107
+ localVarQueryParameter['page'] = page;
108
+ }
109
+
110
+ if (limit !== undefined) {
111
+ localVarQueryParameter['limit'] = limit;
112
+ }
113
+
114
+ if (lastRetrieved !== undefined) {
115
+ localVarQueryParameter['lastRetrieved'] = (lastRetrieved as any instanceof Date) ?
116
+ (lastRetrieved as any).toISOString() :
117
+ lastRetrieved;
118
+ }
119
+
120
+
121
+
122
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
125
+
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions,
129
+ };
130
+ },
131
+ /**
132
+ *
133
+ * @summary Create promotion
134
+ * @param {CreatePromotionCommand} [createPromotionCommand]
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ */
138
+ apiV1PromotionsPost: async (createPromotionCommand?: CreatePromotionCommand, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
139
+ const localVarPath = `/api/v1/promotions`;
140
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
141
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
142
+ let baseOptions;
143
+ if (configuration) {
144
+ baseOptions = configuration.baseOptions;
145
+ }
146
+
147
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
148
+ const localVarHeaderParameter = {} as any;
149
+ const localVarQueryParameter = {} as any;
150
+
151
+ // authentication oauth2 required
152
+ // oauth required
153
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)
154
+
155
+
156
+
157
+ localVarHeaderParameter['Content-Type'] = 'application/json';
158
+
159
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
160
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
161
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
162
+ localVarRequestOptions.data = serializeDataIfNeeded(createPromotionCommand, localVarRequestOptions, configuration)
163
+
164
+ return {
165
+ url: toPathString(localVarUrlObj),
166
+ options: localVarRequestOptions,
167
+ };
168
+ },
169
+ /**
170
+ *
171
+ * @summary Delete promotion
172
+ * @param {string} promotionId
173
+ * @param {boolean} [isPermanent]
174
+ * @param {*} [options] Override http request option.
175
+ * @throws {RequiredError}
176
+ */
177
+ apiV1PromotionsPromotionIdDelete: async (promotionId: string, isPermanent?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
178
+ // verify required parameter 'promotionId' is not null or undefined
179
+ assertParamExists('apiV1PromotionsPromotionIdDelete', 'promotionId', promotionId)
180
+ const localVarPath = `/api/v1/promotions/{promotionId}`
181
+ .replace(`{${"promotionId"}}`, encodeURIComponent(String(promotionId)));
182
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
183
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
184
+ let baseOptions;
185
+ if (configuration) {
186
+ baseOptions = configuration.baseOptions;
187
+ }
188
+
189
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
190
+ const localVarHeaderParameter = {} as any;
191
+ const localVarQueryParameter = {} as any;
192
+
193
+ // authentication oauth2 required
194
+ // oauth required
195
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)
196
+
197
+ if (isPermanent !== undefined) {
198
+ localVarQueryParameter['isPermanent'] = isPermanent;
199
+ }
200
+
201
+
202
+
203
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
204
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
205
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
206
+
207
+ return {
208
+ url: toPathString(localVarUrlObj),
209
+ options: localVarRequestOptions,
210
+ };
211
+ },
212
+ /**
213
+ *
214
+ * @summary Get promotion
215
+ * @param {string} promotionId
216
+ * @param {string} [languageCode]
217
+ * @param {*} [options] Override http request option.
218
+ * @throws {RequiredError}
219
+ */
220
+ apiV1PromotionsPromotionIdGet: async (promotionId: string, languageCode?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
221
+ // verify required parameter 'promotionId' is not null or undefined
222
+ assertParamExists('apiV1PromotionsPromotionIdGet', 'promotionId', promotionId)
223
+ const localVarPath = `/api/v1/promotions/{promotionId}`
224
+ .replace(`{${"promotionId"}}`, encodeURIComponent(String(promotionId)));
225
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
226
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
227
+ let baseOptions;
228
+ if (configuration) {
229
+ baseOptions = configuration.baseOptions;
230
+ }
231
+
232
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
233
+ const localVarHeaderParameter = {} as any;
234
+ const localVarQueryParameter = {} as any;
235
+
236
+ // authentication oauth2 required
237
+ // oauth required
238
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)
239
+
240
+ if (languageCode !== undefined) {
241
+ localVarQueryParameter['languageCode'] = languageCode;
242
+ }
243
+
244
+
245
+
246
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
247
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
249
+
250
+ return {
251
+ url: toPathString(localVarUrlObj),
252
+ options: localVarRequestOptions,
253
+ };
254
+ },
255
+ /**
256
+ *
257
+ * @summary Update promotion
258
+ * @param {string} promotionId
259
+ * @param {UpdatePromotionCommand} [updatePromotionCommand]
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ apiV1PromotionsPromotionIdPut: async (promotionId: string, updatePromotionCommand?: UpdatePromotionCommand, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
264
+ // verify required parameter 'promotionId' is not null or undefined
265
+ assertParamExists('apiV1PromotionsPromotionIdPut', 'promotionId', promotionId)
266
+ const localVarPath = `/api/v1/promotions/{promotionId}`
267
+ .replace(`{${"promotionId"}}`, encodeURIComponent(String(promotionId)));
268
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
269
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
270
+ let baseOptions;
271
+ if (configuration) {
272
+ baseOptions = configuration.baseOptions;
273
+ }
274
+
275
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
276
+ const localVarHeaderParameter = {} as any;
277
+ const localVarQueryParameter = {} as any;
278
+
279
+ // authentication oauth2 required
280
+ // oauth required
281
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)
282
+
283
+
284
+
285
+ localVarHeaderParameter['Content-Type'] = 'application/json';
286
+
287
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
288
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
289
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
290
+ localVarRequestOptions.data = serializeDataIfNeeded(updatePromotionCommand, localVarRequestOptions, configuration)
291
+
292
+ return {
293
+ url: toPathString(localVarUrlObj),
294
+ options: localVarRequestOptions,
295
+ };
296
+ },
297
+ /**
298
+ *
299
+ * @summary Reactivate promotion
300
+ * @param {string} promotionId
301
+ * @param {*} [options] Override http request option.
302
+ * @throws {RequiredError}
303
+ */
304
+ apiV1PromotionsPromotionIdReactivatePut: async (promotionId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
305
+ // verify required parameter 'promotionId' is not null or undefined
306
+ assertParamExists('apiV1PromotionsPromotionIdReactivatePut', 'promotionId', promotionId)
307
+ const localVarPath = `/api/v1/promotions/{promotionId}/reactivate`
308
+ .replace(`{${"promotionId"}}`, encodeURIComponent(String(promotionId)));
309
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
310
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
311
+ let baseOptions;
312
+ if (configuration) {
313
+ baseOptions = configuration.baseOptions;
314
+ }
315
+
316
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
317
+ const localVarHeaderParameter = {} as any;
318
+ const localVarQueryParameter = {} as any;
319
+
320
+ // authentication oauth2 required
321
+ // oauth required
322
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["cloudhospital_admin_api"], configuration)
323
+
324
+
325
+
326
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
327
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
328
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
329
+
330
+ return {
331
+ url: toPathString(localVarUrlObj),
332
+ options: localVarRequestOptions,
333
+ };
334
+ },
335
+ }
336
+ };
337
+
338
+ /**
339
+ * PromotionsApi - functional programming interface
340
+ * @export
341
+ */
342
+ export const PromotionsApiFp = function(configuration?: Configuration) {
343
+ const localVarAxiosParamCreator = PromotionsApiAxiosParamCreator(configuration)
344
+ return {
345
+ /**
346
+ *
347
+ * @summary Get promotions
348
+ * @param {string} [languageCode]
349
+ * @param {string} [hospitalId]
350
+ * @param {PromotionType} [promotionType]
351
+ * @param {boolean} [showHidden]
352
+ * @param {boolean} [isActivated]
353
+ * @param {Date} [start]
354
+ * @param {Date} [end]
355
+ * @param {number} [page]
356
+ * @param {number} [limit]
357
+ * @param {Date} [lastRetrieved]
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ async apiV1PromotionsGet(languageCode?: string, hospitalId?: string, promotionType?: PromotionType, showHidden?: boolean, isActivated?: boolean, start?: Date, end?: Date, page?: number, limit?: number, lastRetrieved?: Date, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionsModel>> {
362
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1PromotionsGet(languageCode, hospitalId, promotionType, showHidden, isActivated, start, end, page, limit, lastRetrieved, options);
363
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
364
+ },
365
+ /**
366
+ *
367
+ * @summary Create promotion
368
+ * @param {CreatePromotionCommand} [createPromotionCommand]
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ */
372
+ async apiV1PromotionsPost(createPromotionCommand?: CreatePromotionCommand, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionModel>> {
373
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1PromotionsPost(createPromotionCommand, options);
374
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
375
+ },
376
+ /**
377
+ *
378
+ * @summary Delete promotion
379
+ * @param {string} promotionId
380
+ * @param {boolean} [isPermanent]
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ async apiV1PromotionsPromotionIdDelete(promotionId: string, isPermanent?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
385
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1PromotionsPromotionIdDelete(promotionId, isPermanent, options);
386
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
387
+ },
388
+ /**
389
+ *
390
+ * @summary Get promotion
391
+ * @param {string} promotionId
392
+ * @param {string} [languageCode]
393
+ * @param {*} [options] Override http request option.
394
+ * @throws {RequiredError}
395
+ */
396
+ async apiV1PromotionsPromotionIdGet(promotionId: string, languageCode?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionModel>> {
397
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1PromotionsPromotionIdGet(promotionId, languageCode, options);
398
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
399
+ },
400
+ /**
401
+ *
402
+ * @summary Update promotion
403
+ * @param {string} promotionId
404
+ * @param {UpdatePromotionCommand} [updatePromotionCommand]
405
+ * @param {*} [options] Override http request option.
406
+ * @throws {RequiredError}
407
+ */
408
+ async apiV1PromotionsPromotionIdPut(promotionId: string, updatePromotionCommand?: UpdatePromotionCommand, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionModel>> {
409
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1PromotionsPromotionIdPut(promotionId, updatePromotionCommand, options);
410
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
411
+ },
412
+ /**
413
+ *
414
+ * @summary Reactivate promotion
415
+ * @param {string} promotionId
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ */
419
+ async apiV1PromotionsPromotionIdReactivatePut(promotionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
420
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1PromotionsPromotionIdReactivatePut(promotionId, options);
421
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
422
+ },
423
+ }
424
+ };
425
+
426
+ /**
427
+ * PromotionsApi - factory interface
428
+ * @export
429
+ */
430
+ export const PromotionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
431
+ const localVarFp = PromotionsApiFp(configuration)
432
+ return {
433
+ /**
434
+ *
435
+ * @summary Get promotions
436
+ * @param {string} [languageCode]
437
+ * @param {string} [hospitalId]
438
+ * @param {PromotionType} [promotionType]
439
+ * @param {boolean} [showHidden]
440
+ * @param {boolean} [isActivated]
441
+ * @param {Date} [start]
442
+ * @param {Date} [end]
443
+ * @param {number} [page]
444
+ * @param {number} [limit]
445
+ * @param {Date} [lastRetrieved]
446
+ * @param {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ apiV1PromotionsGet(languageCode?: string, hospitalId?: string, promotionType?: PromotionType, showHidden?: boolean, isActivated?: boolean, start?: Date, end?: Date, page?: number, limit?: number, lastRetrieved?: Date, options?: any): AxiosPromise<PromotionsModel> {
450
+ return localVarFp.apiV1PromotionsGet(languageCode, hospitalId, promotionType, showHidden, isActivated, start, end, page, limit, lastRetrieved, options).then((request) => request(axios, basePath));
451
+ },
452
+ /**
453
+ *
454
+ * @summary Create promotion
455
+ * @param {CreatePromotionCommand} [createPromotionCommand]
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ apiV1PromotionsPost(createPromotionCommand?: CreatePromotionCommand, options?: any): AxiosPromise<PromotionModel> {
460
+ return localVarFp.apiV1PromotionsPost(createPromotionCommand, options).then((request) => request(axios, basePath));
461
+ },
462
+ /**
463
+ *
464
+ * @summary Delete promotion
465
+ * @param {string} promotionId
466
+ * @param {boolean} [isPermanent]
467
+ * @param {*} [options] Override http request option.
468
+ * @throws {RequiredError}
469
+ */
470
+ apiV1PromotionsPromotionIdDelete(promotionId: string, isPermanent?: boolean, options?: any): AxiosPromise<boolean> {
471
+ return localVarFp.apiV1PromotionsPromotionIdDelete(promotionId, isPermanent, options).then((request) => request(axios, basePath));
472
+ },
473
+ /**
474
+ *
475
+ * @summary Get promotion
476
+ * @param {string} promotionId
477
+ * @param {string} [languageCode]
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ apiV1PromotionsPromotionIdGet(promotionId: string, languageCode?: string, options?: any): AxiosPromise<PromotionModel> {
482
+ return localVarFp.apiV1PromotionsPromotionIdGet(promotionId, languageCode, options).then((request) => request(axios, basePath));
483
+ },
484
+ /**
485
+ *
486
+ * @summary Update promotion
487
+ * @param {string} promotionId
488
+ * @param {UpdatePromotionCommand} [updatePromotionCommand]
489
+ * @param {*} [options] Override http request option.
490
+ * @throws {RequiredError}
491
+ */
492
+ apiV1PromotionsPromotionIdPut(promotionId: string, updatePromotionCommand?: UpdatePromotionCommand, options?: any): AxiosPromise<PromotionModel> {
493
+ return localVarFp.apiV1PromotionsPromotionIdPut(promotionId, updatePromotionCommand, options).then((request) => request(axios, basePath));
494
+ },
495
+ /**
496
+ *
497
+ * @summary Reactivate promotion
498
+ * @param {string} promotionId
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ apiV1PromotionsPromotionIdReactivatePut(promotionId: string, options?: any): AxiosPromise<boolean> {
503
+ return localVarFp.apiV1PromotionsPromotionIdReactivatePut(promotionId, options).then((request) => request(axios, basePath));
504
+ },
505
+ };
506
+ };
507
+
508
+ /**
509
+ * Request parameters for apiV1PromotionsGet operation in PromotionsApi.
510
+ * @export
511
+ * @interface PromotionsApiApiV1PromotionsGetRequest
512
+ */
513
+ export interface PromotionsApiApiV1PromotionsGetRequest {
514
+ /**
515
+ *
516
+ * @type {string}
517
+ * @memberof PromotionsApiApiV1PromotionsGet
518
+ */
519
+ readonly languageCode?: string
520
+
521
+ /**
522
+ *
523
+ * @type {string}
524
+ * @memberof PromotionsApiApiV1PromotionsGet
525
+ */
526
+ readonly hospitalId?: string
527
+
528
+ /**
529
+ *
530
+ * @type {PromotionType}
531
+ * @memberof PromotionsApiApiV1PromotionsGet
532
+ */
533
+ readonly promotionType?: PromotionType
534
+
535
+ /**
536
+ *
537
+ * @type {boolean}
538
+ * @memberof PromotionsApiApiV1PromotionsGet
539
+ */
540
+ readonly showHidden?: boolean
541
+
542
+ /**
543
+ *
544
+ * @type {boolean}
545
+ * @memberof PromotionsApiApiV1PromotionsGet
546
+ */
547
+ readonly isActivated?: boolean
548
+
549
+ /**
550
+ *
551
+ * @type {Date}
552
+ * @memberof PromotionsApiApiV1PromotionsGet
553
+ */
554
+ readonly start?: Date
555
+
556
+ /**
557
+ *
558
+ * @type {Date}
559
+ * @memberof PromotionsApiApiV1PromotionsGet
560
+ */
561
+ readonly end?: Date
562
+
563
+ /**
564
+ *
565
+ * @type {number}
566
+ * @memberof PromotionsApiApiV1PromotionsGet
567
+ */
568
+ readonly page?: number
569
+
570
+ /**
571
+ *
572
+ * @type {number}
573
+ * @memberof PromotionsApiApiV1PromotionsGet
574
+ */
575
+ readonly limit?: number
576
+
577
+ /**
578
+ *
579
+ * @type {Date}
580
+ * @memberof PromotionsApiApiV1PromotionsGet
581
+ */
582
+ readonly lastRetrieved?: Date
583
+ }
584
+
585
+ /**
586
+ * Request parameters for apiV1PromotionsPost operation in PromotionsApi.
587
+ * @export
588
+ * @interface PromotionsApiApiV1PromotionsPostRequest
589
+ */
590
+ export interface PromotionsApiApiV1PromotionsPostRequest {
591
+ /**
592
+ *
593
+ * @type {CreatePromotionCommand}
594
+ * @memberof PromotionsApiApiV1PromotionsPost
595
+ */
596
+ readonly createPromotionCommand?: CreatePromotionCommand
597
+ }
598
+
599
+ /**
600
+ * Request parameters for apiV1PromotionsPromotionIdDelete operation in PromotionsApi.
601
+ * @export
602
+ * @interface PromotionsApiApiV1PromotionsPromotionIdDeleteRequest
603
+ */
604
+ export interface PromotionsApiApiV1PromotionsPromotionIdDeleteRequest {
605
+ /**
606
+ *
607
+ * @type {string}
608
+ * @memberof PromotionsApiApiV1PromotionsPromotionIdDelete
609
+ */
610
+ readonly promotionId: string
611
+
612
+ /**
613
+ *
614
+ * @type {boolean}
615
+ * @memberof PromotionsApiApiV1PromotionsPromotionIdDelete
616
+ */
617
+ readonly isPermanent?: boolean
618
+ }
619
+
620
+ /**
621
+ * Request parameters for apiV1PromotionsPromotionIdGet operation in PromotionsApi.
622
+ * @export
623
+ * @interface PromotionsApiApiV1PromotionsPromotionIdGetRequest
624
+ */
625
+ export interface PromotionsApiApiV1PromotionsPromotionIdGetRequest {
626
+ /**
627
+ *
628
+ * @type {string}
629
+ * @memberof PromotionsApiApiV1PromotionsPromotionIdGet
630
+ */
631
+ readonly promotionId: string
632
+
633
+ /**
634
+ *
635
+ * @type {string}
636
+ * @memberof PromotionsApiApiV1PromotionsPromotionIdGet
637
+ */
638
+ readonly languageCode?: string
639
+ }
640
+
641
+ /**
642
+ * Request parameters for apiV1PromotionsPromotionIdPut operation in PromotionsApi.
643
+ * @export
644
+ * @interface PromotionsApiApiV1PromotionsPromotionIdPutRequest
645
+ */
646
+ export interface PromotionsApiApiV1PromotionsPromotionIdPutRequest {
647
+ /**
648
+ *
649
+ * @type {string}
650
+ * @memberof PromotionsApiApiV1PromotionsPromotionIdPut
651
+ */
652
+ readonly promotionId: string
653
+
654
+ /**
655
+ *
656
+ * @type {UpdatePromotionCommand}
657
+ * @memberof PromotionsApiApiV1PromotionsPromotionIdPut
658
+ */
659
+ readonly updatePromotionCommand?: UpdatePromotionCommand
660
+ }
661
+
662
+ /**
663
+ * Request parameters for apiV1PromotionsPromotionIdReactivatePut operation in PromotionsApi.
664
+ * @export
665
+ * @interface PromotionsApiApiV1PromotionsPromotionIdReactivatePutRequest
666
+ */
667
+ export interface PromotionsApiApiV1PromotionsPromotionIdReactivatePutRequest {
668
+ /**
669
+ *
670
+ * @type {string}
671
+ * @memberof PromotionsApiApiV1PromotionsPromotionIdReactivatePut
672
+ */
673
+ readonly promotionId: string
674
+ }
675
+
676
+ /**
677
+ * PromotionsApi - object-oriented interface
678
+ * @export
679
+ * @class PromotionsApi
680
+ * @extends {BaseAPI}
681
+ */
682
+ export class PromotionsApi extends BaseAPI {
683
+ /**
684
+ *
685
+ * @summary Get promotions
686
+ * @param {PromotionsApiApiV1PromotionsGetRequest} requestParameters Request parameters.
687
+ * @param {*} [options] Override http request option.
688
+ * @throws {RequiredError}
689
+ * @memberof PromotionsApi
690
+ */
691
+ public apiV1PromotionsGet(requestParameters: PromotionsApiApiV1PromotionsGetRequest = {}, options?: AxiosRequestConfig) {
692
+ return PromotionsApiFp(this.configuration).apiV1PromotionsGet(requestParameters.languageCode, requestParameters.hospitalId, requestParameters.promotionType, requestParameters.showHidden, requestParameters.isActivated, requestParameters.start, requestParameters.end, requestParameters.page, requestParameters.limit, requestParameters.lastRetrieved, options).then((request) => request(this.axios, this.basePath));
693
+ }
694
+
695
+ /**
696
+ *
697
+ * @summary Create promotion
698
+ * @param {PromotionsApiApiV1PromotionsPostRequest} requestParameters Request parameters.
699
+ * @param {*} [options] Override http request option.
700
+ * @throws {RequiredError}
701
+ * @memberof PromotionsApi
702
+ */
703
+ public apiV1PromotionsPost(requestParameters: PromotionsApiApiV1PromotionsPostRequest = {}, options?: AxiosRequestConfig) {
704
+ return PromotionsApiFp(this.configuration).apiV1PromotionsPost(requestParameters.createPromotionCommand, options).then((request) => request(this.axios, this.basePath));
705
+ }
706
+
707
+ /**
708
+ *
709
+ * @summary Delete promotion
710
+ * @param {PromotionsApiApiV1PromotionsPromotionIdDeleteRequest} requestParameters Request parameters.
711
+ * @param {*} [options] Override http request option.
712
+ * @throws {RequiredError}
713
+ * @memberof PromotionsApi
714
+ */
715
+ public apiV1PromotionsPromotionIdDelete(requestParameters: PromotionsApiApiV1PromotionsPromotionIdDeleteRequest, options?: AxiosRequestConfig) {
716
+ return PromotionsApiFp(this.configuration).apiV1PromotionsPromotionIdDelete(requestParameters.promotionId, requestParameters.isPermanent, options).then((request) => request(this.axios, this.basePath));
717
+ }
718
+
719
+ /**
720
+ *
721
+ * @summary Get promotion
722
+ * @param {PromotionsApiApiV1PromotionsPromotionIdGetRequest} requestParameters Request parameters.
723
+ * @param {*} [options] Override http request option.
724
+ * @throws {RequiredError}
725
+ * @memberof PromotionsApi
726
+ */
727
+ public apiV1PromotionsPromotionIdGet(requestParameters: PromotionsApiApiV1PromotionsPromotionIdGetRequest, options?: AxiosRequestConfig) {
728
+ return PromotionsApiFp(this.configuration).apiV1PromotionsPromotionIdGet(requestParameters.promotionId, requestParameters.languageCode, options).then((request) => request(this.axios, this.basePath));
729
+ }
730
+
731
+ /**
732
+ *
733
+ * @summary Update promotion
734
+ * @param {PromotionsApiApiV1PromotionsPromotionIdPutRequest} requestParameters Request parameters.
735
+ * @param {*} [options] Override http request option.
736
+ * @throws {RequiredError}
737
+ * @memberof PromotionsApi
738
+ */
739
+ public apiV1PromotionsPromotionIdPut(requestParameters: PromotionsApiApiV1PromotionsPromotionIdPutRequest, options?: AxiosRequestConfig) {
740
+ return PromotionsApiFp(this.configuration).apiV1PromotionsPromotionIdPut(requestParameters.promotionId, requestParameters.updatePromotionCommand, options).then((request) => request(this.axios, this.basePath));
741
+ }
742
+
743
+ /**
744
+ *
745
+ * @summary Reactivate promotion
746
+ * @param {PromotionsApiApiV1PromotionsPromotionIdReactivatePutRequest} requestParameters Request parameters.
747
+ * @param {*} [options] Override http request option.
748
+ * @throws {RequiredError}
749
+ * @memberof PromotionsApi
750
+ */
751
+ public apiV1PromotionsPromotionIdReactivatePut(requestParameters: PromotionsApiApiV1PromotionsPromotionIdReactivatePutRequest, options?: AxiosRequestConfig) {
752
+ return PromotionsApiFp(this.configuration).apiV1PromotionsPromotionIdReactivatePut(requestParameters.promotionId, options).then((request) => request(this.axios, this.basePath));
753
+ }
754
+ }