flexinet-api 0.0.255-prerelease0

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,4113 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Flexinet API
5
+ * This is Flexinet API documentation
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: hello@binhatch.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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI } from './base';
29
+ export const AuditLogActionEnum = {
30
+ Create: 'create',
31
+ Update: 'update'
32
+ };
33
+ /**
34
+ *
35
+ * @export
36
+ * @enum {string}
37
+ */
38
+ export const AuditLogObjectType = {
39
+ Promotion: 'promotion'
40
+ };
41
+ /**
42
+ *
43
+ * @export
44
+ * @enum {string}
45
+ */
46
+ export const Beneficiary = {
47
+ User: 'user',
48
+ Client: 'client'
49
+ };
50
+ /**
51
+ *
52
+ * @export
53
+ * @enum {string}
54
+ */
55
+ export const BonusMu = {
56
+ Points: 'points',
57
+ Product: 'product'
58
+ };
59
+ /**
60
+ *
61
+ * @export
62
+ * @enum {string}
63
+ */
64
+ export const Condition = {
65
+ Exists: 'exists',
66
+ Equals: 'equals',
67
+ Contains: 'contains'
68
+ };
69
+ /**
70
+ *
71
+ * @export
72
+ * @enum {string}
73
+ */
74
+ export const CustomDealRestrictionPriority = {
75
+ Low: 'low',
76
+ Medium: 'medium',
77
+ High: 'high'
78
+ };
79
+ export const EventCreationRequestKindEnum = {
80
+ Transaction: 'transaction'
81
+ };
82
+ /**
83
+ *
84
+ * @export
85
+ * @enum {string}
86
+ */
87
+ export const NotificationKind = {
88
+ Promotion: 'promotion'
89
+ };
90
+ /**
91
+ *
92
+ * @export
93
+ * @enum {string}
94
+ */
95
+ export const NotificationStatus = {
96
+ Unread: 'unread',
97
+ Read: 'read'
98
+ };
99
+ /**
100
+ *
101
+ * @export
102
+ * @enum {string}
103
+ */
104
+ export const ProductAvailability = {
105
+ Available: 'available',
106
+ Unavailable: 'unavailable'
107
+ };
108
+ /**
109
+ *
110
+ * @export
111
+ * @enum {string}
112
+ */
113
+ export const ProductKind = {
114
+ Item: 'item'
115
+ };
116
+ export const ProductRequestApprovalRequestStatusEnum = {
117
+ Accepted: 'accepted',
118
+ Rejected: 'rejected'
119
+ };
120
+ /**
121
+ *
122
+ * @export
123
+ * @enum {string}
124
+ */
125
+ export const ProductRequestStatus = {
126
+ Accepted: 'accepted',
127
+ Rejected: 'rejected',
128
+ Pending: 'pending'
129
+ };
130
+ /**
131
+ *
132
+ * @export
133
+ * @enum {string}
134
+ */
135
+ export const ProductStatus = {
136
+ Active: 'active',
137
+ Inactive: 'inactive',
138
+ Pending: 'pending'
139
+ };
140
+ /**
141
+ *
142
+ * @export
143
+ * @enum {string}
144
+ */
145
+ export const ProductUsage = {
146
+ Webshop: 'webshop',
147
+ Promotion: 'promotion'
148
+ };
149
+ /**
150
+ *
151
+ * @export
152
+ * @enum {string}
153
+ */
154
+ export const ProgressState = {
155
+ Active: 'active',
156
+ Pending: 'pending'
157
+ };
158
+ /**
159
+ *
160
+ * @export
161
+ * @enum {string}
162
+ */
163
+ export const PromotionType = {
164
+ Regular: 'regular',
165
+ CustomDeal: 'custom_deal'
166
+ };
167
+ /**
168
+ *
169
+ * @export
170
+ * @enum {string}
171
+ */
172
+ export const ReceiverKind = {
173
+ User: 'user',
174
+ Client: 'client'
175
+ };
176
+ /**
177
+ *
178
+ * @export
179
+ * @enum {string}
180
+ */
181
+ export const Repetition = {
182
+ Daily: 'daily',
183
+ Weekly: 'weekly',
184
+ Monthly: 'monthly'
185
+ };
186
+ /**
187
+ *
188
+ * @export
189
+ * @enum {string}
190
+ */
191
+ export const RuleGroupState = {
192
+ Visible: 'visible',
193
+ Hidden: 'hidden'
194
+ };
195
+ /**
196
+ *
197
+ * @export
198
+ * @enum {string}
199
+ */
200
+ export const RuleKind = {
201
+ Tag: 'tag'
202
+ };
203
+ /**
204
+ *
205
+ * @export
206
+ * @enum {string}
207
+ */
208
+ export const TagDataType = {
209
+ Text: 'text',
210
+ Number: 'number',
211
+ Boolean: 'boolean',
212
+ Date: 'date'
213
+ };
214
+ /**
215
+ *
216
+ * @export
217
+ * @enum {string}
218
+ */
219
+ export const TagRuleKind = {
220
+ String: 'string',
221
+ Integer: 'integer',
222
+ Boolean: 'boolean',
223
+ Number: 'number',
224
+ Array: 'array'
225
+ };
226
+ /**
227
+ *
228
+ * @export
229
+ * @enum {string}
230
+ */
231
+ export const TagValidatorType = {
232
+ Pattern: 'pattern',
233
+ Range: 'range',
234
+ FixedValues: 'fixed_values'
235
+ };
236
+ /**
237
+ *
238
+ * @export
239
+ * @enum {string}
240
+ */
241
+ export const TargetMu = {
242
+ Currency: 'currency',
243
+ Product: 'product',
244
+ Liter: 'liter'
245
+ };
246
+ /**
247
+ *
248
+ * @export
249
+ * @enum {string}
250
+ */
251
+ export const TransactionKind = {
252
+ Credit: 'credit',
253
+ Debit: 'debit'
254
+ };
255
+ /**
256
+ *
257
+ * @export
258
+ * @enum {string}
259
+ */
260
+ export const UserRole = {
261
+ SystemAdmin: 'systemAdmin',
262
+ SystemManager: 'systemManager',
263
+ CustomerAdmin: 'customerAdmin',
264
+ CustomerUser: 'customerUser'
265
+ };
266
+ /**
267
+ *
268
+ * @export
269
+ * @enum {string}
270
+ */
271
+ export const UserSource = {
272
+ System: 'system',
273
+ Customer: 'customer'
274
+ };
275
+ /**
276
+ *
277
+ * @export
278
+ * @enum {string}
279
+ */
280
+ export const WebhookKind = {
281
+ Product: 'product'
282
+ };
283
+ /**
284
+ * AuditApi - axios parameter creator
285
+ * @export
286
+ */
287
+ export const AuditApiAxiosParamCreator = function (configuration) {
288
+ return {
289
+ /**
290
+ * List all audit logs
291
+ * @summary List audit logs for given object type and ID
292
+ * @param {AuditLogObjectType} objectType object type
293
+ * @param {string} objectID object ID
294
+ * @param {*} [options] Override http request option.
295
+ * @throws {RequiredError}
296
+ */
297
+ listAuditLogs: (objectType, objectID, options = {}) => __awaiter(this, void 0, void 0, function* () {
298
+ // verify required parameter 'objectType' is not null or undefined
299
+ assertParamExists('listAuditLogs', 'objectType', objectType);
300
+ // verify required parameter 'objectID' is not null or undefined
301
+ assertParamExists('listAuditLogs', 'objectID', objectID);
302
+ const localVarPath = `/audit/{objectType}/{objectID}`
303
+ .replace(`{${"objectType"}}`, encodeURIComponent(String(objectType)))
304
+ .replace(`{${"objectID"}}`, encodeURIComponent(String(objectID)));
305
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
306
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
307
+ let baseOptions;
308
+ if (configuration) {
309
+ baseOptions = configuration.baseOptions;
310
+ }
311
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
312
+ const localVarHeaderParameter = {};
313
+ const localVarQueryParameter = {};
314
+ // authentication jwt required
315
+ // http bearer authentication required
316
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
317
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
318
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
319
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
320
+ return {
321
+ url: toPathString(localVarUrlObj),
322
+ options: localVarRequestOptions,
323
+ };
324
+ }),
325
+ /**
326
+ * List all audit logs
327
+ * @summary List audit logs for given object type and ID
328
+ * @param {string} userID id of the user
329
+ * @param {string} [nextToken] This is the pagination token
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ listUserAuditLogs: (userID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
334
+ // verify required parameter 'userID' is not null or undefined
335
+ assertParamExists('listUserAuditLogs', 'userID', userID);
336
+ const localVarPath = `/audit/user/{userID}`
337
+ .replace(`{${"userID"}}`, encodeURIComponent(String(userID)));
338
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
339
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
340
+ let baseOptions;
341
+ if (configuration) {
342
+ baseOptions = configuration.baseOptions;
343
+ }
344
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
345
+ const localVarHeaderParameter = {};
346
+ const localVarQueryParameter = {};
347
+ // authentication jwt required
348
+ // http bearer authentication required
349
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
350
+ if (nextToken !== undefined) {
351
+ localVarQueryParameter['nextToken'] = nextToken;
352
+ }
353
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
354
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
355
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
356
+ return {
357
+ url: toPathString(localVarUrlObj),
358
+ options: localVarRequestOptions,
359
+ };
360
+ }),
361
+ };
362
+ };
363
+ /**
364
+ * AuditApi - functional programming interface
365
+ * @export
366
+ */
367
+ export const AuditApiFp = function (configuration) {
368
+ const localVarAxiosParamCreator = AuditApiAxiosParamCreator(configuration);
369
+ return {
370
+ /**
371
+ * List all audit logs
372
+ * @summary List audit logs for given object type and ID
373
+ * @param {AuditLogObjectType} objectType object type
374
+ * @param {string} objectID object ID
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ listAuditLogs(objectType, objectID, options) {
379
+ return __awaiter(this, void 0, void 0, function* () {
380
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAuditLogs(objectType, objectID, options);
381
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
382
+ });
383
+ },
384
+ /**
385
+ * List all audit logs
386
+ * @summary List audit logs for given object type and ID
387
+ * @param {string} userID id of the user
388
+ * @param {string} [nextToken] This is the pagination token
389
+ * @param {*} [options] Override http request option.
390
+ * @throws {RequiredError}
391
+ */
392
+ listUserAuditLogs(userID, nextToken, options) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserAuditLogs(userID, nextToken, options);
395
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
396
+ });
397
+ },
398
+ };
399
+ };
400
+ /**
401
+ * AuditApi - factory interface
402
+ * @export
403
+ */
404
+ export const AuditApiFactory = function (configuration, basePath, axios) {
405
+ const localVarFp = AuditApiFp(configuration);
406
+ return {
407
+ /**
408
+ * List all audit logs
409
+ * @summary List audit logs for given object type and ID
410
+ * @param {AuditLogObjectType} objectType object type
411
+ * @param {string} objectID object ID
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
415
+ listAuditLogs(objectType, objectID, options) {
416
+ return localVarFp.listAuditLogs(objectType, objectID, options).then((request) => request(axios, basePath));
417
+ },
418
+ /**
419
+ * List all audit logs
420
+ * @summary List audit logs for given object type and ID
421
+ * @param {string} userID id of the user
422
+ * @param {string} [nextToken] This is the pagination token
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ listUserAuditLogs(userID, nextToken, options) {
427
+ return localVarFp.listUserAuditLogs(userID, nextToken, options).then((request) => request(axios, basePath));
428
+ },
429
+ };
430
+ };
431
+ /**
432
+ * AuditApi - object-oriented interface
433
+ * @export
434
+ * @class AuditApi
435
+ * @extends {BaseAPI}
436
+ */
437
+ export class AuditApi extends BaseAPI {
438
+ /**
439
+ * List all audit logs
440
+ * @summary List audit logs for given object type and ID
441
+ * @param {AuditLogObjectType} objectType object type
442
+ * @param {string} objectID object ID
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ * @memberof AuditApi
446
+ */
447
+ listAuditLogs(objectType, objectID, options) {
448
+ return AuditApiFp(this.configuration).listAuditLogs(objectType, objectID, options).then((request) => request(this.axios, this.basePath));
449
+ }
450
+ /**
451
+ * List all audit logs
452
+ * @summary List audit logs for given object type and ID
453
+ * @param {string} userID id of the user
454
+ * @param {string} [nextToken] This is the pagination token
455
+ * @param {*} [options] Override http request option.
456
+ * @throws {RequiredError}
457
+ * @memberof AuditApi
458
+ */
459
+ listUserAuditLogs(userID, nextToken, options) {
460
+ return AuditApiFp(this.configuration).listUserAuditLogs(userID, nextToken, options).then((request) => request(this.axios, this.basePath));
461
+ }
462
+ }
463
+ /**
464
+ * BalanceApi - axios parameter creator
465
+ * @export
466
+ */
467
+ export const BalanceApiAxiosParamCreator = function (configuration) {
468
+ return {
469
+ /**
470
+ * Get balance
471
+ * @summary Get balance
472
+ * @param {string} receiver This is the receiver
473
+ * @param {*} [options] Override http request option.
474
+ * @throws {RequiredError}
475
+ */
476
+ getBalance: (receiver, options = {}) => __awaiter(this, void 0, void 0, function* () {
477
+ // verify required parameter 'receiver' is not null or undefined
478
+ assertParamExists('getBalance', 'receiver', receiver);
479
+ const localVarPath = `/balances`;
480
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
481
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
482
+ let baseOptions;
483
+ if (configuration) {
484
+ baseOptions = configuration.baseOptions;
485
+ }
486
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
487
+ const localVarHeaderParameter = {};
488
+ const localVarQueryParameter = {};
489
+ // authentication jwt required
490
+ // http bearer authentication required
491
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
492
+ if (receiver !== undefined) {
493
+ localVarQueryParameter['receiver'] = receiver;
494
+ }
495
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
496
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
497
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
498
+ return {
499
+ url: toPathString(localVarUrlObj),
500
+ options: localVarRequestOptions,
501
+ };
502
+ }),
503
+ /**
504
+ * Transfer balance
505
+ * @summary Transfer balance
506
+ * @param {string} receiverID ID of the receiver where we want to update balance.
507
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ */
511
+ transferBalance: (receiverID, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
512
+ // verify required parameter 'receiverID' is not null or undefined
513
+ assertParamExists('transferBalance', 'receiverID', receiverID);
514
+ const localVarPath = `/balances/{receiverID}/transfer`
515
+ .replace(`{${"receiverID"}}`, encodeURIComponent(String(receiverID)));
516
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
517
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
518
+ let baseOptions;
519
+ if (configuration) {
520
+ baseOptions = configuration.baseOptions;
521
+ }
522
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
523
+ const localVarHeaderParameter = {};
524
+ const localVarQueryParameter = {};
525
+ localVarHeaderParameter['Content-Type'] = 'application/json';
526
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
527
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
528
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
529
+ localVarRequestOptions.data = serializeDataIfNeeded(balanceUpdateRequest, localVarRequestOptions, configuration);
530
+ return {
531
+ url: toPathString(localVarUrlObj),
532
+ options: localVarRequestOptions,
533
+ };
534
+ }),
535
+ /**
536
+ * Manually update balance. Used as manual compensation for out of stock products.
537
+ * @summary Manually update balance
538
+ * @param {string} receiverID ID of the receiver where we want to update balance.
539
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ */
543
+ updateBalance: (receiverID, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
544
+ // verify required parameter 'receiverID' is not null or undefined
545
+ assertParamExists('updateBalance', 'receiverID', receiverID);
546
+ const localVarPath = `/balances/{receiverID}`
547
+ .replace(`{${"receiverID"}}`, encodeURIComponent(String(receiverID)));
548
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
549
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
550
+ let baseOptions;
551
+ if (configuration) {
552
+ baseOptions = configuration.baseOptions;
553
+ }
554
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
555
+ const localVarHeaderParameter = {};
556
+ const localVarQueryParameter = {};
557
+ localVarHeaderParameter['Content-Type'] = 'application/json';
558
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
559
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
560
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
561
+ localVarRequestOptions.data = serializeDataIfNeeded(balanceUpdateRequest, localVarRequestOptions, configuration);
562
+ return {
563
+ url: toPathString(localVarUrlObj),
564
+ options: localVarRequestOptions,
565
+ };
566
+ }),
567
+ };
568
+ };
569
+ /**
570
+ * BalanceApi - functional programming interface
571
+ * @export
572
+ */
573
+ export const BalanceApiFp = function (configuration) {
574
+ const localVarAxiosParamCreator = BalanceApiAxiosParamCreator(configuration);
575
+ return {
576
+ /**
577
+ * Get balance
578
+ * @summary Get balance
579
+ * @param {string} receiver This is the receiver
580
+ * @param {*} [options] Override http request option.
581
+ * @throws {RequiredError}
582
+ */
583
+ getBalance(receiver, options) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(receiver, options);
586
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
587
+ });
588
+ },
589
+ /**
590
+ * Transfer balance
591
+ * @summary Transfer balance
592
+ * @param {string} receiverID ID of the receiver where we want to update balance.
593
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ */
597
+ transferBalance(receiverID, balanceUpdateRequest, options) {
598
+ return __awaiter(this, void 0, void 0, function* () {
599
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.transferBalance(receiverID, balanceUpdateRequest, options);
600
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
601
+ });
602
+ },
603
+ /**
604
+ * Manually update balance. Used as manual compensation for out of stock products.
605
+ * @summary Manually update balance
606
+ * @param {string} receiverID ID of the receiver where we want to update balance.
607
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
608
+ * @param {*} [options] Override http request option.
609
+ * @throws {RequiredError}
610
+ */
611
+ updateBalance(receiverID, balanceUpdateRequest, options) {
612
+ return __awaiter(this, void 0, void 0, function* () {
613
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateBalance(receiverID, balanceUpdateRequest, options);
614
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
615
+ });
616
+ },
617
+ };
618
+ };
619
+ /**
620
+ * BalanceApi - factory interface
621
+ * @export
622
+ */
623
+ export const BalanceApiFactory = function (configuration, basePath, axios) {
624
+ const localVarFp = BalanceApiFp(configuration);
625
+ return {
626
+ /**
627
+ * Get balance
628
+ * @summary Get balance
629
+ * @param {string} receiver This is the receiver
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ getBalance(receiver, options) {
634
+ return localVarFp.getBalance(receiver, options).then((request) => request(axios, basePath));
635
+ },
636
+ /**
637
+ * Transfer balance
638
+ * @summary Transfer balance
639
+ * @param {string} receiverID ID of the receiver where we want to update balance.
640
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
641
+ * @param {*} [options] Override http request option.
642
+ * @throws {RequiredError}
643
+ */
644
+ transferBalance(receiverID, balanceUpdateRequest, options) {
645
+ return localVarFp.transferBalance(receiverID, balanceUpdateRequest, options).then((request) => request(axios, basePath));
646
+ },
647
+ /**
648
+ * Manually update balance. Used as manual compensation for out of stock products.
649
+ * @summary Manually update balance
650
+ * @param {string} receiverID ID of the receiver where we want to update balance.
651
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ */
655
+ updateBalance(receiverID, balanceUpdateRequest, options) {
656
+ return localVarFp.updateBalance(receiverID, balanceUpdateRequest, options).then((request) => request(axios, basePath));
657
+ },
658
+ };
659
+ };
660
+ /**
661
+ * BalanceApi - object-oriented interface
662
+ * @export
663
+ * @class BalanceApi
664
+ * @extends {BaseAPI}
665
+ */
666
+ export class BalanceApi extends BaseAPI {
667
+ /**
668
+ * Get balance
669
+ * @summary Get balance
670
+ * @param {string} receiver This is the receiver
671
+ * @param {*} [options] Override http request option.
672
+ * @throws {RequiredError}
673
+ * @memberof BalanceApi
674
+ */
675
+ getBalance(receiver, options) {
676
+ return BalanceApiFp(this.configuration).getBalance(receiver, options).then((request) => request(this.axios, this.basePath));
677
+ }
678
+ /**
679
+ * Transfer balance
680
+ * @summary Transfer balance
681
+ * @param {string} receiverID ID of the receiver where we want to update balance.
682
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
683
+ * @param {*} [options] Override http request option.
684
+ * @throws {RequiredError}
685
+ * @memberof BalanceApi
686
+ */
687
+ transferBalance(receiverID, balanceUpdateRequest, options) {
688
+ return BalanceApiFp(this.configuration).transferBalance(receiverID, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
689
+ }
690
+ /**
691
+ * Manually update balance. Used as manual compensation for out of stock products.
692
+ * @summary Manually update balance
693
+ * @param {string} receiverID ID of the receiver where we want to update balance.
694
+ * @param {BalanceUpdateRequest} [balanceUpdateRequest]
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ * @memberof BalanceApi
698
+ */
699
+ updateBalance(receiverID, balanceUpdateRequest, options) {
700
+ return BalanceApiFp(this.configuration).updateBalance(receiverID, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
701
+ }
702
+ }
703
+ /**
704
+ * ClientApi - axios parameter creator
705
+ * @export
706
+ */
707
+ export const ClientApiAxiosParamCreator = function (configuration) {
708
+ return {
709
+ /**
710
+ * Create a new client
711
+ * @summary Create client
712
+ * @param {ClientCreationRequest} clientCreationRequest client data
713
+ * @param {*} [options] Override http request option.
714
+ * @throws {RequiredError}
715
+ */
716
+ createClient: (clientCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
717
+ // verify required parameter 'clientCreationRequest' is not null or undefined
718
+ assertParamExists('createClient', 'clientCreationRequest', clientCreationRequest);
719
+ const localVarPath = `/clients`;
720
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
721
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
722
+ let baseOptions;
723
+ if (configuration) {
724
+ baseOptions = configuration.baseOptions;
725
+ }
726
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
727
+ const localVarHeaderParameter = {};
728
+ const localVarQueryParameter = {};
729
+ // authentication jwt required
730
+ // http bearer authentication required
731
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
732
+ localVarHeaderParameter['Content-Type'] = 'application/json';
733
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
734
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
735
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
736
+ localVarRequestOptions.data = serializeDataIfNeeded(clientCreationRequest, localVarRequestOptions, configuration);
737
+ return {
738
+ url: toPathString(localVarUrlObj),
739
+ options: localVarRequestOptions,
740
+ };
741
+ }),
742
+ /**
743
+ * Get client by ID
744
+ * @summary Get client
745
+ * @param {string} clientID client ID
746
+ * @param {*} [options] Override http request option.
747
+ * @throws {RequiredError}
748
+ */
749
+ getClient: (clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
750
+ // verify required parameter 'clientID' is not null or undefined
751
+ assertParamExists('getClient', 'clientID', clientID);
752
+ const localVarPath = `/clients/{clientID}`
753
+ .replace(`{${"clientID"}}`, encodeURIComponent(String(clientID)));
754
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
755
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
756
+ let baseOptions;
757
+ if (configuration) {
758
+ baseOptions = configuration.baseOptions;
759
+ }
760
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
761
+ const localVarHeaderParameter = {};
762
+ const localVarQueryParameter = {};
763
+ // authentication jwt required
764
+ // http bearer authentication required
765
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
766
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
767
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
768
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
769
+ return {
770
+ url: toPathString(localVarUrlObj),
771
+ options: localVarRequestOptions,
772
+ };
773
+ }),
774
+ /**
775
+ * List all clients
776
+ * @summary List clients
777
+ * @param {string} [nextToken] This is the pagination token
778
+ * @param {string} [search] search string
779
+ * @param {*} [options] Override http request option.
780
+ * @throws {RequiredError}
781
+ */
782
+ listClients: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
783
+ const localVarPath = `/clients`;
784
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
785
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
786
+ let baseOptions;
787
+ if (configuration) {
788
+ baseOptions = configuration.baseOptions;
789
+ }
790
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
791
+ const localVarHeaderParameter = {};
792
+ const localVarQueryParameter = {};
793
+ // authentication jwt required
794
+ // http bearer authentication required
795
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
796
+ if (nextToken !== undefined) {
797
+ localVarQueryParameter['nextToken'] = nextToken;
798
+ }
799
+ if (search !== undefined) {
800
+ localVarQueryParameter['search'] = search;
801
+ }
802
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
803
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
804
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
805
+ return {
806
+ url: toPathString(localVarUrlObj),
807
+ options: localVarRequestOptions,
808
+ };
809
+ }),
810
+ };
811
+ };
812
+ /**
813
+ * ClientApi - functional programming interface
814
+ * @export
815
+ */
816
+ export const ClientApiFp = function (configuration) {
817
+ const localVarAxiosParamCreator = ClientApiAxiosParamCreator(configuration);
818
+ return {
819
+ /**
820
+ * Create a new client
821
+ * @summary Create client
822
+ * @param {ClientCreationRequest} clientCreationRequest client data
823
+ * @param {*} [options] Override http request option.
824
+ * @throws {RequiredError}
825
+ */
826
+ createClient(clientCreationRequest, options) {
827
+ return __awaiter(this, void 0, void 0, function* () {
828
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClient(clientCreationRequest, options);
829
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
830
+ });
831
+ },
832
+ /**
833
+ * Get client by ID
834
+ * @summary Get client
835
+ * @param {string} clientID client ID
836
+ * @param {*} [options] Override http request option.
837
+ * @throws {RequiredError}
838
+ */
839
+ getClient(clientID, options) {
840
+ return __awaiter(this, void 0, void 0, function* () {
841
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClient(clientID, options);
842
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
843
+ });
844
+ },
845
+ /**
846
+ * List all clients
847
+ * @summary List clients
848
+ * @param {string} [nextToken] This is the pagination token
849
+ * @param {string} [search] search string
850
+ * @param {*} [options] Override http request option.
851
+ * @throws {RequiredError}
852
+ */
853
+ listClients(nextToken, search, options) {
854
+ return __awaiter(this, void 0, void 0, function* () {
855
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listClients(nextToken, search, options);
856
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
857
+ });
858
+ },
859
+ };
860
+ };
861
+ /**
862
+ * ClientApi - factory interface
863
+ * @export
864
+ */
865
+ export const ClientApiFactory = function (configuration, basePath, axios) {
866
+ const localVarFp = ClientApiFp(configuration);
867
+ return {
868
+ /**
869
+ * Create a new client
870
+ * @summary Create client
871
+ * @param {ClientCreationRequest} clientCreationRequest client data
872
+ * @param {*} [options] Override http request option.
873
+ * @throws {RequiredError}
874
+ */
875
+ createClient(clientCreationRequest, options) {
876
+ return localVarFp.createClient(clientCreationRequest, options).then((request) => request(axios, basePath));
877
+ },
878
+ /**
879
+ * Get client by ID
880
+ * @summary Get client
881
+ * @param {string} clientID client ID
882
+ * @param {*} [options] Override http request option.
883
+ * @throws {RequiredError}
884
+ */
885
+ getClient(clientID, options) {
886
+ return localVarFp.getClient(clientID, options).then((request) => request(axios, basePath));
887
+ },
888
+ /**
889
+ * List all clients
890
+ * @summary List clients
891
+ * @param {string} [nextToken] This is the pagination token
892
+ * @param {string} [search] search string
893
+ * @param {*} [options] Override http request option.
894
+ * @throws {RequiredError}
895
+ */
896
+ listClients(nextToken, search, options) {
897
+ return localVarFp.listClients(nextToken, search, options).then((request) => request(axios, basePath));
898
+ },
899
+ };
900
+ };
901
+ /**
902
+ * ClientApi - object-oriented interface
903
+ * @export
904
+ * @class ClientApi
905
+ * @extends {BaseAPI}
906
+ */
907
+ export class ClientApi extends BaseAPI {
908
+ /**
909
+ * Create a new client
910
+ * @summary Create client
911
+ * @param {ClientCreationRequest} clientCreationRequest client data
912
+ * @param {*} [options] Override http request option.
913
+ * @throws {RequiredError}
914
+ * @memberof ClientApi
915
+ */
916
+ createClient(clientCreationRequest, options) {
917
+ return ClientApiFp(this.configuration).createClient(clientCreationRequest, options).then((request) => request(this.axios, this.basePath));
918
+ }
919
+ /**
920
+ * Get client by ID
921
+ * @summary Get client
922
+ * @param {string} clientID client ID
923
+ * @param {*} [options] Override http request option.
924
+ * @throws {RequiredError}
925
+ * @memberof ClientApi
926
+ */
927
+ getClient(clientID, options) {
928
+ return ClientApiFp(this.configuration).getClient(clientID, options).then((request) => request(this.axios, this.basePath));
929
+ }
930
+ /**
931
+ * List all clients
932
+ * @summary List clients
933
+ * @param {string} [nextToken] This is the pagination token
934
+ * @param {string} [search] search string
935
+ * @param {*} [options] Override http request option.
936
+ * @throws {RequiredError}
937
+ * @memberof ClientApi
938
+ */
939
+ listClients(nextToken, search, options) {
940
+ return ClientApiFp(this.configuration).listClients(nextToken, search, options).then((request) => request(this.axios, this.basePath));
941
+ }
942
+ }
943
+ /**
944
+ * ConfigurationApi - axios parameter creator
945
+ * @export
946
+ */
947
+ export const ConfigurationApiAxiosParamCreator = function (configuration) {
948
+ return {
949
+ /**
950
+ * Create a new configuration
951
+ * @summary Create configuration
952
+ * @param {BackofficeConfig} backofficeConfig configuration data
953
+ * @param {*} [options] Override http request option.
954
+ * @throws {RequiredError}
955
+ */
956
+ createConfiguration: (backofficeConfig, options = {}) => __awaiter(this, void 0, void 0, function* () {
957
+ // verify required parameter 'backofficeConfig' is not null or undefined
958
+ assertParamExists('createConfiguration', 'backofficeConfig', backofficeConfig);
959
+ const localVarPath = `/configurations`;
960
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
961
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
962
+ let baseOptions;
963
+ if (configuration) {
964
+ baseOptions = configuration.baseOptions;
965
+ }
966
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
967
+ const localVarHeaderParameter = {};
968
+ const localVarQueryParameter = {};
969
+ // authentication jwt required
970
+ // http bearer authentication required
971
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
972
+ localVarHeaderParameter['Content-Type'] = 'application/json';
973
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
974
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
975
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
976
+ localVarRequestOptions.data = serializeDataIfNeeded(backofficeConfig, localVarRequestOptions, configuration);
977
+ return {
978
+ url: toPathString(localVarUrlObj),
979
+ options: localVarRequestOptions,
980
+ };
981
+ }),
982
+ /**
983
+ * List all configurations
984
+ * @summary List configurations
985
+ * @param {string} [nextToken] This is the pagination token
986
+ * @param {string} [search] search string
987
+ * @param {*} [options] Override http request option.
988
+ * @throws {RequiredError}
989
+ */
990
+ listConfigurations: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
991
+ const localVarPath = `/configurations`;
992
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
993
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
994
+ let baseOptions;
995
+ if (configuration) {
996
+ baseOptions = configuration.baseOptions;
997
+ }
998
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
999
+ const localVarHeaderParameter = {};
1000
+ const localVarQueryParameter = {};
1001
+ // authentication jwt required
1002
+ // http bearer authentication required
1003
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1004
+ if (nextToken !== undefined) {
1005
+ localVarQueryParameter['nextToken'] = nextToken;
1006
+ }
1007
+ if (search !== undefined) {
1008
+ localVarQueryParameter['search'] = search;
1009
+ }
1010
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1011
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1012
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1013
+ return {
1014
+ url: toPathString(localVarUrlObj),
1015
+ options: localVarRequestOptions,
1016
+ };
1017
+ }),
1018
+ };
1019
+ };
1020
+ /**
1021
+ * ConfigurationApi - functional programming interface
1022
+ * @export
1023
+ */
1024
+ export const ConfigurationApiFp = function (configuration) {
1025
+ const localVarAxiosParamCreator = ConfigurationApiAxiosParamCreator(configuration);
1026
+ return {
1027
+ /**
1028
+ * Create a new configuration
1029
+ * @summary Create configuration
1030
+ * @param {BackofficeConfig} backofficeConfig configuration data
1031
+ * @param {*} [options] Override http request option.
1032
+ * @throws {RequiredError}
1033
+ */
1034
+ createConfiguration(backofficeConfig, options) {
1035
+ return __awaiter(this, void 0, void 0, function* () {
1036
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createConfiguration(backofficeConfig, options);
1037
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1038
+ });
1039
+ },
1040
+ /**
1041
+ * List all configurations
1042
+ * @summary List configurations
1043
+ * @param {string} [nextToken] This is the pagination token
1044
+ * @param {string} [search] search string
1045
+ * @param {*} [options] Override http request option.
1046
+ * @throws {RequiredError}
1047
+ */
1048
+ listConfigurations(nextToken, search, options) {
1049
+ return __awaiter(this, void 0, void 0, function* () {
1050
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listConfigurations(nextToken, search, options);
1051
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1052
+ });
1053
+ },
1054
+ };
1055
+ };
1056
+ /**
1057
+ * ConfigurationApi - factory interface
1058
+ * @export
1059
+ */
1060
+ export const ConfigurationApiFactory = function (configuration, basePath, axios) {
1061
+ const localVarFp = ConfigurationApiFp(configuration);
1062
+ return {
1063
+ /**
1064
+ * Create a new configuration
1065
+ * @summary Create configuration
1066
+ * @param {BackofficeConfig} backofficeConfig configuration data
1067
+ * @param {*} [options] Override http request option.
1068
+ * @throws {RequiredError}
1069
+ */
1070
+ createConfiguration(backofficeConfig, options) {
1071
+ return localVarFp.createConfiguration(backofficeConfig, options).then((request) => request(axios, basePath));
1072
+ },
1073
+ /**
1074
+ * List all configurations
1075
+ * @summary List configurations
1076
+ * @param {string} [nextToken] This is the pagination token
1077
+ * @param {string} [search] search string
1078
+ * @param {*} [options] Override http request option.
1079
+ * @throws {RequiredError}
1080
+ */
1081
+ listConfigurations(nextToken, search, options) {
1082
+ return localVarFp.listConfigurations(nextToken, search, options).then((request) => request(axios, basePath));
1083
+ },
1084
+ };
1085
+ };
1086
+ /**
1087
+ * ConfigurationApi - object-oriented interface
1088
+ * @export
1089
+ * @class ConfigurationApi
1090
+ * @extends {BaseAPI}
1091
+ */
1092
+ export class ConfigurationApi extends BaseAPI {
1093
+ /**
1094
+ * Create a new configuration
1095
+ * @summary Create configuration
1096
+ * @param {BackofficeConfig} backofficeConfig configuration data
1097
+ * @param {*} [options] Override http request option.
1098
+ * @throws {RequiredError}
1099
+ * @memberof ConfigurationApi
1100
+ */
1101
+ createConfiguration(backofficeConfig, options) {
1102
+ return ConfigurationApiFp(this.configuration).createConfiguration(backofficeConfig, options).then((request) => request(this.axios, this.basePath));
1103
+ }
1104
+ /**
1105
+ * List all configurations
1106
+ * @summary List configurations
1107
+ * @param {string} [nextToken] This is the pagination token
1108
+ * @param {string} [search] search string
1109
+ * @param {*} [options] Override http request option.
1110
+ * @throws {RequiredError}
1111
+ * @memberof ConfigurationApi
1112
+ */
1113
+ listConfigurations(nextToken, search, options) {
1114
+ return ConfigurationApiFp(this.configuration).listConfigurations(nextToken, search, options).then((request) => request(this.axios, this.basePath));
1115
+ }
1116
+ }
1117
+ /**
1118
+ * CustomDealsApi - axios parameter creator
1119
+ * @export
1120
+ */
1121
+ export const CustomDealsApiAxiosParamCreator = function (configuration) {
1122
+ return {
1123
+ /**
1124
+ * Create custom deal restrictions
1125
+ * @summary Create custom deal restrictions
1126
+ * @param {CustomDealRestrictionRequest} customDealRestrictionRequest Custom deal restrictions
1127
+ * @param {*} [options] Override http request option.
1128
+ * @throws {RequiredError}
1129
+ */
1130
+ createCustomDealRestrictions: (customDealRestrictionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1131
+ // verify required parameter 'customDealRestrictionRequest' is not null or undefined
1132
+ assertParamExists('createCustomDealRestrictions', 'customDealRestrictionRequest', customDealRestrictionRequest);
1133
+ const localVarPath = `/custom-deals/restrictions`;
1134
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1135
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1136
+ let baseOptions;
1137
+ if (configuration) {
1138
+ baseOptions = configuration.baseOptions;
1139
+ }
1140
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1141
+ const localVarHeaderParameter = {};
1142
+ const localVarQueryParameter = {};
1143
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1144
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1145
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1146
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1147
+ localVarRequestOptions.data = serializeDataIfNeeded(customDealRestrictionRequest, localVarRequestOptions, configuration);
1148
+ return {
1149
+ url: toPathString(localVarUrlObj),
1150
+ options: localVarRequestOptions,
1151
+ };
1152
+ }),
1153
+ /**
1154
+ * List custom deal restrictions
1155
+ * @summary List custom deal restrictions
1156
+ * @param {*} [options] Override http request option.
1157
+ * @throws {RequiredError}
1158
+ */
1159
+ listCustomDealRestrictions: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1160
+ const localVarPath = `/custom-deals/restrictions`;
1161
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1162
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1163
+ let baseOptions;
1164
+ if (configuration) {
1165
+ baseOptions = configuration.baseOptions;
1166
+ }
1167
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1168
+ const localVarHeaderParameter = {};
1169
+ const localVarQueryParameter = {};
1170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1172
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1173
+ return {
1174
+ url: toPathString(localVarUrlObj),
1175
+ options: localVarRequestOptions,
1176
+ };
1177
+ }),
1178
+ };
1179
+ };
1180
+ /**
1181
+ * CustomDealsApi - functional programming interface
1182
+ * @export
1183
+ */
1184
+ export const CustomDealsApiFp = function (configuration) {
1185
+ const localVarAxiosParamCreator = CustomDealsApiAxiosParamCreator(configuration);
1186
+ return {
1187
+ /**
1188
+ * Create custom deal restrictions
1189
+ * @summary Create custom deal restrictions
1190
+ * @param {CustomDealRestrictionRequest} customDealRestrictionRequest Custom deal restrictions
1191
+ * @param {*} [options] Override http request option.
1192
+ * @throws {RequiredError}
1193
+ */
1194
+ createCustomDealRestrictions(customDealRestrictionRequest, options) {
1195
+ return __awaiter(this, void 0, void 0, function* () {
1196
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCustomDealRestrictions(customDealRestrictionRequest, options);
1197
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1198
+ });
1199
+ },
1200
+ /**
1201
+ * List custom deal restrictions
1202
+ * @summary List custom deal restrictions
1203
+ * @param {*} [options] Override http request option.
1204
+ * @throws {RequiredError}
1205
+ */
1206
+ listCustomDealRestrictions(options) {
1207
+ return __awaiter(this, void 0, void 0, function* () {
1208
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCustomDealRestrictions(options);
1209
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1210
+ });
1211
+ },
1212
+ };
1213
+ };
1214
+ /**
1215
+ * CustomDealsApi - factory interface
1216
+ * @export
1217
+ */
1218
+ export const CustomDealsApiFactory = function (configuration, basePath, axios) {
1219
+ const localVarFp = CustomDealsApiFp(configuration);
1220
+ return {
1221
+ /**
1222
+ * Create custom deal restrictions
1223
+ * @summary Create custom deal restrictions
1224
+ * @param {CustomDealRestrictionRequest} customDealRestrictionRequest Custom deal restrictions
1225
+ * @param {*} [options] Override http request option.
1226
+ * @throws {RequiredError}
1227
+ */
1228
+ createCustomDealRestrictions(customDealRestrictionRequest, options) {
1229
+ return localVarFp.createCustomDealRestrictions(customDealRestrictionRequest, options).then((request) => request(axios, basePath));
1230
+ },
1231
+ /**
1232
+ * List custom deal restrictions
1233
+ * @summary List custom deal restrictions
1234
+ * @param {*} [options] Override http request option.
1235
+ * @throws {RequiredError}
1236
+ */
1237
+ listCustomDealRestrictions(options) {
1238
+ return localVarFp.listCustomDealRestrictions(options).then((request) => request(axios, basePath));
1239
+ },
1240
+ };
1241
+ };
1242
+ /**
1243
+ * CustomDealsApi - object-oriented interface
1244
+ * @export
1245
+ * @class CustomDealsApi
1246
+ * @extends {BaseAPI}
1247
+ */
1248
+ export class CustomDealsApi extends BaseAPI {
1249
+ /**
1250
+ * Create custom deal restrictions
1251
+ * @summary Create custom deal restrictions
1252
+ * @param {CustomDealRestrictionRequest} customDealRestrictionRequest Custom deal restrictions
1253
+ * @param {*} [options] Override http request option.
1254
+ * @throws {RequiredError}
1255
+ * @memberof CustomDealsApi
1256
+ */
1257
+ createCustomDealRestrictions(customDealRestrictionRequest, options) {
1258
+ return CustomDealsApiFp(this.configuration).createCustomDealRestrictions(customDealRestrictionRequest, options).then((request) => request(this.axios, this.basePath));
1259
+ }
1260
+ /**
1261
+ * List custom deal restrictions
1262
+ * @summary List custom deal restrictions
1263
+ * @param {*} [options] Override http request option.
1264
+ * @throws {RequiredError}
1265
+ * @memberof CustomDealsApi
1266
+ */
1267
+ listCustomDealRestrictions(options) {
1268
+ return CustomDealsApiFp(this.configuration).listCustomDealRestrictions(options).then((request) => request(this.axios, this.basePath));
1269
+ }
1270
+ }
1271
+ /**
1272
+ * DefaultApi - axios parameter creator
1273
+ * @export
1274
+ */
1275
+ export const DefaultApiAxiosParamCreator = function (configuration) {
1276
+ return {
1277
+ /**
1278
+ * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
1279
+ * @summary Generate API key for the current tenant
1280
+ * @param {*} [options] Override http request option.
1281
+ * @throws {RequiredError}
1282
+ */
1283
+ generateApiKey: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1284
+ const localVarPath = `/integrations/apikey`;
1285
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1286
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1287
+ let baseOptions;
1288
+ if (configuration) {
1289
+ baseOptions = configuration.baseOptions;
1290
+ }
1291
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1292
+ const localVarHeaderParameter = {};
1293
+ const localVarQueryParameter = {};
1294
+ // authentication jwt required
1295
+ // http bearer authentication required
1296
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1297
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1298
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1299
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1300
+ return {
1301
+ url: toPathString(localVarUrlObj),
1302
+ options: localVarRequestOptions,
1303
+ };
1304
+ }),
1305
+ /**
1306
+ * Import events to the system to be processed
1307
+ * @summary Add event
1308
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
1309
+ * @param {*} [options] Override http request option.
1310
+ * @throws {RequiredError}
1311
+ */
1312
+ importEvent: (eventCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1313
+ // verify required parameter 'eventCreationRequest' is not null or undefined
1314
+ assertParamExists('importEvent', 'eventCreationRequest', eventCreationRequest);
1315
+ const localVarPath = `/events`;
1316
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1317
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1318
+ let baseOptions;
1319
+ if (configuration) {
1320
+ baseOptions = configuration.baseOptions;
1321
+ }
1322
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1323
+ const localVarHeaderParameter = {};
1324
+ const localVarQueryParameter = {};
1325
+ // authentication jwt required
1326
+ // http bearer authentication required
1327
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1328
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1329
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1330
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1331
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1332
+ localVarRequestOptions.data = serializeDataIfNeeded(eventCreationRequest, localVarRequestOptions, configuration);
1333
+ return {
1334
+ url: toPathString(localVarUrlObj),
1335
+ options: localVarRequestOptions,
1336
+ };
1337
+ }),
1338
+ /**
1339
+ * List all webhooks for current tenant
1340
+ * @summary List webhooks
1341
+ * @param {*} [options] Override http request option.
1342
+ * @throws {RequiredError}
1343
+ */
1344
+ listWebhooks: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1345
+ const localVarPath = `/integrations/webhooks`;
1346
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1347
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1348
+ let baseOptions;
1349
+ if (configuration) {
1350
+ baseOptions = configuration.baseOptions;
1351
+ }
1352
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1353
+ const localVarHeaderParameter = {};
1354
+ const localVarQueryParameter = {};
1355
+ // authentication jwt required
1356
+ // http bearer authentication required
1357
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1358
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1359
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1360
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1361
+ return {
1362
+ url: toPathString(localVarUrlObj),
1363
+ options: localVarRequestOptions,
1364
+ };
1365
+ }),
1366
+ /**
1367
+ * Set up webhook url for a given integration
1368
+ * @summary Update webhook
1369
+ * @param {Webhook} webhook webhook data
1370
+ * @param {*} [options] Override http request option.
1371
+ * @throws {RequiredError}
1372
+ */
1373
+ setWebhook: (webhook, options = {}) => __awaiter(this, void 0, void 0, function* () {
1374
+ // verify required parameter 'webhook' is not null or undefined
1375
+ assertParamExists('setWebhook', 'webhook', webhook);
1376
+ const localVarPath = `/integrations/webhooks`;
1377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1378
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1379
+ let baseOptions;
1380
+ if (configuration) {
1381
+ baseOptions = configuration.baseOptions;
1382
+ }
1383
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1384
+ const localVarHeaderParameter = {};
1385
+ const localVarQueryParameter = {};
1386
+ // authentication jwt required
1387
+ // http bearer authentication required
1388
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1389
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1390
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1391
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1392
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1393
+ localVarRequestOptions.data = serializeDataIfNeeded(webhook, localVarRequestOptions, configuration);
1394
+ return {
1395
+ url: toPathString(localVarUrlObj),
1396
+ options: localVarRequestOptions,
1397
+ };
1398
+ }),
1399
+ /**
1400
+ * Test API key security scheme
1401
+ * @summary Test API key security scheme
1402
+ * @param {*} [options] Override http request option.
1403
+ * @throws {RequiredError}
1404
+ */
1405
+ testApiKey: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1406
+ const localVarPath = `/integrations/apikey`;
1407
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1408
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1409
+ let baseOptions;
1410
+ if (configuration) {
1411
+ baseOptions = configuration.baseOptions;
1412
+ }
1413
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1414
+ const localVarHeaderParameter = {};
1415
+ const localVarQueryParameter = {};
1416
+ // authentication ApiKeyAuth required
1417
+ yield setApiKeyToObject(localVarHeaderParameter, "X-API-Key", configuration);
1418
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1419
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1420
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1421
+ return {
1422
+ url: toPathString(localVarUrlObj),
1423
+ options: localVarRequestOptions,
1424
+ };
1425
+ }),
1426
+ };
1427
+ };
1428
+ /**
1429
+ * DefaultApi - functional programming interface
1430
+ * @export
1431
+ */
1432
+ export const DefaultApiFp = function (configuration) {
1433
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
1434
+ return {
1435
+ /**
1436
+ * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
1437
+ * @summary Generate API key for the current tenant
1438
+ * @param {*} [options] Override http request option.
1439
+ * @throws {RequiredError}
1440
+ */
1441
+ generateApiKey(options) {
1442
+ return __awaiter(this, void 0, void 0, function* () {
1443
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.generateApiKey(options);
1444
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1445
+ });
1446
+ },
1447
+ /**
1448
+ * Import events to the system to be processed
1449
+ * @summary Add event
1450
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
1451
+ * @param {*} [options] Override http request option.
1452
+ * @throws {RequiredError}
1453
+ */
1454
+ importEvent(eventCreationRequest, options) {
1455
+ return __awaiter(this, void 0, void 0, function* () {
1456
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.importEvent(eventCreationRequest, options);
1457
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1458
+ });
1459
+ },
1460
+ /**
1461
+ * List all webhooks for current tenant
1462
+ * @summary List webhooks
1463
+ * @param {*} [options] Override http request option.
1464
+ * @throws {RequiredError}
1465
+ */
1466
+ listWebhooks(options) {
1467
+ return __awaiter(this, void 0, void 0, function* () {
1468
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhooks(options);
1469
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1470
+ });
1471
+ },
1472
+ /**
1473
+ * Set up webhook url for a given integration
1474
+ * @summary Update webhook
1475
+ * @param {Webhook} webhook webhook data
1476
+ * @param {*} [options] Override http request option.
1477
+ * @throws {RequiredError}
1478
+ */
1479
+ setWebhook(webhook, options) {
1480
+ return __awaiter(this, void 0, void 0, function* () {
1481
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setWebhook(webhook, options);
1482
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1483
+ });
1484
+ },
1485
+ /**
1486
+ * Test API key security scheme
1487
+ * @summary Test API key security scheme
1488
+ * @param {*} [options] Override http request option.
1489
+ * @throws {RequiredError}
1490
+ */
1491
+ testApiKey(options) {
1492
+ return __awaiter(this, void 0, void 0, function* () {
1493
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.testApiKey(options);
1494
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1495
+ });
1496
+ },
1497
+ };
1498
+ };
1499
+ /**
1500
+ * DefaultApi - factory interface
1501
+ * @export
1502
+ */
1503
+ export const DefaultApiFactory = function (configuration, basePath, axios) {
1504
+ const localVarFp = DefaultApiFp(configuration);
1505
+ return {
1506
+ /**
1507
+ * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
1508
+ * @summary Generate API key for the current tenant
1509
+ * @param {*} [options] Override http request option.
1510
+ * @throws {RequiredError}
1511
+ */
1512
+ generateApiKey(options) {
1513
+ return localVarFp.generateApiKey(options).then((request) => request(axios, basePath));
1514
+ },
1515
+ /**
1516
+ * Import events to the system to be processed
1517
+ * @summary Add event
1518
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
1519
+ * @param {*} [options] Override http request option.
1520
+ * @throws {RequiredError}
1521
+ */
1522
+ importEvent(eventCreationRequest, options) {
1523
+ return localVarFp.importEvent(eventCreationRequest, options).then((request) => request(axios, basePath));
1524
+ },
1525
+ /**
1526
+ * List all webhooks for current tenant
1527
+ * @summary List webhooks
1528
+ * @param {*} [options] Override http request option.
1529
+ * @throws {RequiredError}
1530
+ */
1531
+ listWebhooks(options) {
1532
+ return localVarFp.listWebhooks(options).then((request) => request(axios, basePath));
1533
+ },
1534
+ /**
1535
+ * Set up webhook url for a given integration
1536
+ * @summary Update webhook
1537
+ * @param {Webhook} webhook webhook data
1538
+ * @param {*} [options] Override http request option.
1539
+ * @throws {RequiredError}
1540
+ */
1541
+ setWebhook(webhook, options) {
1542
+ return localVarFp.setWebhook(webhook, options).then((request) => request(axios, basePath));
1543
+ },
1544
+ /**
1545
+ * Test API key security scheme
1546
+ * @summary Test API key security scheme
1547
+ * @param {*} [options] Override http request option.
1548
+ * @throws {RequiredError}
1549
+ */
1550
+ testApiKey(options) {
1551
+ return localVarFp.testApiKey(options).then((request) => request(axios, basePath));
1552
+ },
1553
+ };
1554
+ };
1555
+ /**
1556
+ * DefaultApi - object-oriented interface
1557
+ * @export
1558
+ * @class DefaultApi
1559
+ * @extends {BaseAPI}
1560
+ */
1561
+ export class DefaultApi extends BaseAPI {
1562
+ /**
1563
+ * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
1564
+ * @summary Generate API key for the current tenant
1565
+ * @param {*} [options] Override http request option.
1566
+ * @throws {RequiredError}
1567
+ * @memberof DefaultApi
1568
+ */
1569
+ generateApiKey(options) {
1570
+ return DefaultApiFp(this.configuration).generateApiKey(options).then((request) => request(this.axios, this.basePath));
1571
+ }
1572
+ /**
1573
+ * Import events to the system to be processed
1574
+ * @summary Add event
1575
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
1576
+ * @param {*} [options] Override http request option.
1577
+ * @throws {RequiredError}
1578
+ * @memberof DefaultApi
1579
+ */
1580
+ importEvent(eventCreationRequest, options) {
1581
+ return DefaultApiFp(this.configuration).importEvent(eventCreationRequest, options).then((request) => request(this.axios, this.basePath));
1582
+ }
1583
+ /**
1584
+ * List all webhooks for current tenant
1585
+ * @summary List webhooks
1586
+ * @param {*} [options] Override http request option.
1587
+ * @throws {RequiredError}
1588
+ * @memberof DefaultApi
1589
+ */
1590
+ listWebhooks(options) {
1591
+ return DefaultApiFp(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath));
1592
+ }
1593
+ /**
1594
+ * Set up webhook url for a given integration
1595
+ * @summary Update webhook
1596
+ * @param {Webhook} webhook webhook data
1597
+ * @param {*} [options] Override http request option.
1598
+ * @throws {RequiredError}
1599
+ * @memberof DefaultApi
1600
+ */
1601
+ setWebhook(webhook, options) {
1602
+ return DefaultApiFp(this.configuration).setWebhook(webhook, options).then((request) => request(this.axios, this.basePath));
1603
+ }
1604
+ /**
1605
+ * Test API key security scheme
1606
+ * @summary Test API key security scheme
1607
+ * @param {*} [options] Override http request option.
1608
+ * @throws {RequiredError}
1609
+ * @memberof DefaultApi
1610
+ */
1611
+ testApiKey(options) {
1612
+ return DefaultApiFp(this.configuration).testApiKey(options).then((request) => request(this.axios, this.basePath));
1613
+ }
1614
+ }
1615
+ /**
1616
+ * NotificationApi - axios parameter creator
1617
+ * @export
1618
+ */
1619
+ export const NotificationApiAxiosParamCreator = function (configuration) {
1620
+ return {
1621
+ /**
1622
+ * Marks all notifications as read for the authenticated user
1623
+ * @summary Mark all notifications as read
1624
+ * @param {BulkNotificationsReadRequest} bulkNotificationsReadRequest ids of the notifications to be set as product
1625
+ * @param {*} [options] Override http request option.
1626
+ * @throws {RequiredError}
1627
+ */
1628
+ bulkMarkNotificationAsRead: (bulkNotificationsReadRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1629
+ // verify required parameter 'bulkNotificationsReadRequest' is not null or undefined
1630
+ assertParamExists('bulkMarkNotificationAsRead', 'bulkNotificationsReadRequest', bulkNotificationsReadRequest);
1631
+ const localVarPath = `/notifications/read`;
1632
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1633
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1634
+ let baseOptions;
1635
+ if (configuration) {
1636
+ baseOptions = configuration.baseOptions;
1637
+ }
1638
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1639
+ const localVarHeaderParameter = {};
1640
+ const localVarQueryParameter = {};
1641
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1642
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1643
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1644
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1645
+ localVarRequestOptions.data = serializeDataIfNeeded(bulkNotificationsReadRequest, localVarRequestOptions, configuration);
1646
+ return {
1647
+ url: toPathString(localVarUrlObj),
1648
+ options: localVarRequestOptions,
1649
+ };
1650
+ }),
1651
+ /**
1652
+ * Get notification by ID
1653
+ * @summary Get notification
1654
+ * @param {string} notificationID notification ID
1655
+ * @param {*} [options] Override http request option.
1656
+ * @throws {RequiredError}
1657
+ */
1658
+ getNotification: (notificationID, options = {}) => __awaiter(this, void 0, void 0, function* () {
1659
+ // verify required parameter 'notificationID' is not null or undefined
1660
+ assertParamExists('getNotification', 'notificationID', notificationID);
1661
+ const localVarPath = `/notifications/{notificationID}`
1662
+ .replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
1663
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1664
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1665
+ let baseOptions;
1666
+ if (configuration) {
1667
+ baseOptions = configuration.baseOptions;
1668
+ }
1669
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1670
+ const localVarHeaderParameter = {};
1671
+ const localVarQueryParameter = {};
1672
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1673
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1674
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1675
+ return {
1676
+ url: toPathString(localVarUrlObj),
1677
+ options: localVarRequestOptions,
1678
+ };
1679
+ }),
1680
+ /**
1681
+ * List paginated notifications
1682
+ * @summary List notifications
1683
+ * @param {string} [nextToken] This is the pagination token
1684
+ * @param {NotificationStatus} [status] Notification status
1685
+ * @param {*} [options] Override http request option.
1686
+ * @throws {RequiredError}
1687
+ */
1688
+ listNotifications: (nextToken, status, options = {}) => __awaiter(this, void 0, void 0, function* () {
1689
+ const localVarPath = `/notifications`;
1690
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1691
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1692
+ let baseOptions;
1693
+ if (configuration) {
1694
+ baseOptions = configuration.baseOptions;
1695
+ }
1696
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1697
+ const localVarHeaderParameter = {};
1698
+ const localVarQueryParameter = {};
1699
+ if (nextToken !== undefined) {
1700
+ localVarQueryParameter['nextToken'] = nextToken;
1701
+ }
1702
+ if (status !== undefined) {
1703
+ localVarQueryParameter['status'] = status;
1704
+ }
1705
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1706
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1707
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1708
+ return {
1709
+ url: toPathString(localVarUrlObj),
1710
+ options: localVarRequestOptions,
1711
+ };
1712
+ }),
1713
+ /**
1714
+ * Update notification by ID
1715
+ * @summary Update notification
1716
+ * @param {string} notificationID notification ID
1717
+ * @param {*} [options] Override http request option.
1718
+ * @throws {RequiredError}
1719
+ */
1720
+ markNotificationAsRead: (notificationID, options = {}) => __awaiter(this, void 0, void 0, function* () {
1721
+ // verify required parameter 'notificationID' is not null or undefined
1722
+ assertParamExists('markNotificationAsRead', 'notificationID', notificationID);
1723
+ const localVarPath = `/notifications/{notificationID}`
1724
+ .replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
1725
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1726
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1727
+ let baseOptions;
1728
+ if (configuration) {
1729
+ baseOptions = configuration.baseOptions;
1730
+ }
1731
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1732
+ const localVarHeaderParameter = {};
1733
+ const localVarQueryParameter = {};
1734
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1735
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1736
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1737
+ return {
1738
+ url: toPathString(localVarUrlObj),
1739
+ options: localVarRequestOptions,
1740
+ };
1741
+ }),
1742
+ };
1743
+ };
1744
+ /**
1745
+ * NotificationApi - functional programming interface
1746
+ * @export
1747
+ */
1748
+ export const NotificationApiFp = function (configuration) {
1749
+ const localVarAxiosParamCreator = NotificationApiAxiosParamCreator(configuration);
1750
+ return {
1751
+ /**
1752
+ * Marks all notifications as read for the authenticated user
1753
+ * @summary Mark all notifications as read
1754
+ * @param {BulkNotificationsReadRequest} bulkNotificationsReadRequest ids of the notifications to be set as product
1755
+ * @param {*} [options] Override http request option.
1756
+ * @throws {RequiredError}
1757
+ */
1758
+ bulkMarkNotificationAsRead(bulkNotificationsReadRequest, options) {
1759
+ return __awaiter(this, void 0, void 0, function* () {
1760
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bulkMarkNotificationAsRead(bulkNotificationsReadRequest, options);
1761
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1762
+ });
1763
+ },
1764
+ /**
1765
+ * Get notification by ID
1766
+ * @summary Get notification
1767
+ * @param {string} notificationID notification ID
1768
+ * @param {*} [options] Override http request option.
1769
+ * @throws {RequiredError}
1770
+ */
1771
+ getNotification(notificationID, options) {
1772
+ return __awaiter(this, void 0, void 0, function* () {
1773
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getNotification(notificationID, options);
1774
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1775
+ });
1776
+ },
1777
+ /**
1778
+ * List paginated notifications
1779
+ * @summary List notifications
1780
+ * @param {string} [nextToken] This is the pagination token
1781
+ * @param {NotificationStatus} [status] Notification status
1782
+ * @param {*} [options] Override http request option.
1783
+ * @throws {RequiredError}
1784
+ */
1785
+ listNotifications(nextToken, status, options) {
1786
+ return __awaiter(this, void 0, void 0, function* () {
1787
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listNotifications(nextToken, status, options);
1788
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1789
+ });
1790
+ },
1791
+ /**
1792
+ * Update notification by ID
1793
+ * @summary Update notification
1794
+ * @param {string} notificationID notification ID
1795
+ * @param {*} [options] Override http request option.
1796
+ * @throws {RequiredError}
1797
+ */
1798
+ markNotificationAsRead(notificationID, options) {
1799
+ return __awaiter(this, void 0, void 0, function* () {
1800
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.markNotificationAsRead(notificationID, options);
1801
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1802
+ });
1803
+ },
1804
+ };
1805
+ };
1806
+ /**
1807
+ * NotificationApi - factory interface
1808
+ * @export
1809
+ */
1810
+ export const NotificationApiFactory = function (configuration, basePath, axios) {
1811
+ const localVarFp = NotificationApiFp(configuration);
1812
+ return {
1813
+ /**
1814
+ * Marks all notifications as read for the authenticated user
1815
+ * @summary Mark all notifications as read
1816
+ * @param {BulkNotificationsReadRequest} bulkNotificationsReadRequest ids of the notifications to be set as product
1817
+ * @param {*} [options] Override http request option.
1818
+ * @throws {RequiredError}
1819
+ */
1820
+ bulkMarkNotificationAsRead(bulkNotificationsReadRequest, options) {
1821
+ return localVarFp.bulkMarkNotificationAsRead(bulkNotificationsReadRequest, options).then((request) => request(axios, basePath));
1822
+ },
1823
+ /**
1824
+ * Get notification by ID
1825
+ * @summary Get notification
1826
+ * @param {string} notificationID notification ID
1827
+ * @param {*} [options] Override http request option.
1828
+ * @throws {RequiredError}
1829
+ */
1830
+ getNotification(notificationID, options) {
1831
+ return localVarFp.getNotification(notificationID, options).then((request) => request(axios, basePath));
1832
+ },
1833
+ /**
1834
+ * List paginated notifications
1835
+ * @summary List notifications
1836
+ * @param {string} [nextToken] This is the pagination token
1837
+ * @param {NotificationStatus} [status] Notification status
1838
+ * @param {*} [options] Override http request option.
1839
+ * @throws {RequiredError}
1840
+ */
1841
+ listNotifications(nextToken, status, options) {
1842
+ return localVarFp.listNotifications(nextToken, status, options).then((request) => request(axios, basePath));
1843
+ },
1844
+ /**
1845
+ * Update notification by ID
1846
+ * @summary Update notification
1847
+ * @param {string} notificationID notification ID
1848
+ * @param {*} [options] Override http request option.
1849
+ * @throws {RequiredError}
1850
+ */
1851
+ markNotificationAsRead(notificationID, options) {
1852
+ return localVarFp.markNotificationAsRead(notificationID, options).then((request) => request(axios, basePath));
1853
+ },
1854
+ };
1855
+ };
1856
+ /**
1857
+ * NotificationApi - object-oriented interface
1858
+ * @export
1859
+ * @class NotificationApi
1860
+ * @extends {BaseAPI}
1861
+ */
1862
+ export class NotificationApi extends BaseAPI {
1863
+ /**
1864
+ * Marks all notifications as read for the authenticated user
1865
+ * @summary Mark all notifications as read
1866
+ * @param {BulkNotificationsReadRequest} bulkNotificationsReadRequest ids of the notifications to be set as product
1867
+ * @param {*} [options] Override http request option.
1868
+ * @throws {RequiredError}
1869
+ * @memberof NotificationApi
1870
+ */
1871
+ bulkMarkNotificationAsRead(bulkNotificationsReadRequest, options) {
1872
+ return NotificationApiFp(this.configuration).bulkMarkNotificationAsRead(bulkNotificationsReadRequest, options).then((request) => request(this.axios, this.basePath));
1873
+ }
1874
+ /**
1875
+ * Get notification by ID
1876
+ * @summary Get notification
1877
+ * @param {string} notificationID notification ID
1878
+ * @param {*} [options] Override http request option.
1879
+ * @throws {RequiredError}
1880
+ * @memberof NotificationApi
1881
+ */
1882
+ getNotification(notificationID, options) {
1883
+ return NotificationApiFp(this.configuration).getNotification(notificationID, options).then((request) => request(this.axios, this.basePath));
1884
+ }
1885
+ /**
1886
+ * List paginated notifications
1887
+ * @summary List notifications
1888
+ * @param {string} [nextToken] This is the pagination token
1889
+ * @param {NotificationStatus} [status] Notification status
1890
+ * @param {*} [options] Override http request option.
1891
+ * @throws {RequiredError}
1892
+ * @memberof NotificationApi
1893
+ */
1894
+ listNotifications(nextToken, status, options) {
1895
+ return NotificationApiFp(this.configuration).listNotifications(nextToken, status, options).then((request) => request(this.axios, this.basePath));
1896
+ }
1897
+ /**
1898
+ * Update notification by ID
1899
+ * @summary Update notification
1900
+ * @param {string} notificationID notification ID
1901
+ * @param {*} [options] Override http request option.
1902
+ * @throws {RequiredError}
1903
+ * @memberof NotificationApi
1904
+ */
1905
+ markNotificationAsRead(notificationID, options) {
1906
+ return NotificationApiFp(this.configuration).markNotificationAsRead(notificationID, options).then((request) => request(this.axios, this.basePath));
1907
+ }
1908
+ }
1909
+ /**
1910
+ * ProductApi - axios parameter creator
1911
+ * @export
1912
+ */
1913
+ export const ProductApiAxiosParamCreator = function (configuration) {
1914
+ return {
1915
+ /**
1916
+ * Accept or reject a product by id
1917
+ * @summary Accept or reject a product by id
1918
+ * @param {string} id The product id
1919
+ * @param {ProductRequestApprovalRequest} [productRequestApprovalRequest]
1920
+ * @param {*} [options] Override http request option.
1921
+ * @throws {RequiredError}
1922
+ */
1923
+ approveProduct: (id, productRequestApprovalRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1924
+ // verify required parameter 'id' is not null or undefined
1925
+ assertParamExists('approveProduct', 'id', id);
1926
+ const localVarPath = `/products/requests/{id}`
1927
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1928
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1929
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1930
+ let baseOptions;
1931
+ if (configuration) {
1932
+ baseOptions = configuration.baseOptions;
1933
+ }
1934
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
1935
+ const localVarHeaderParameter = {};
1936
+ const localVarQueryParameter = {};
1937
+ // authentication jwt required
1938
+ // http bearer authentication required
1939
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1940
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1941
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1942
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1943
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1944
+ localVarRequestOptions.data = serializeDataIfNeeded(productRequestApprovalRequest, localVarRequestOptions, configuration);
1945
+ return {
1946
+ url: toPathString(localVarUrlObj),
1947
+ options: localVarRequestOptions,
1948
+ };
1949
+ }),
1950
+ /**
1951
+ * Create a new product
1952
+ * @summary Create a new product
1953
+ * @param {ProductCreationRequest | null} [productCreationRequest]
1954
+ * @param {*} [options] Override http request option.
1955
+ * @throws {RequiredError}
1956
+ */
1957
+ createProduct: (productCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1958
+ const localVarPath = `/products`;
1959
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1960
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1961
+ let baseOptions;
1962
+ if (configuration) {
1963
+ baseOptions = configuration.baseOptions;
1964
+ }
1965
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1966
+ const localVarHeaderParameter = {};
1967
+ const localVarQueryParameter = {};
1968
+ // authentication jwt required
1969
+ // http bearer authentication required
1970
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1971
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1972
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1973
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1974
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1975
+ localVarRequestOptions.data = serializeDataIfNeeded(productCreationRequest, localVarRequestOptions, configuration);
1976
+ return {
1977
+ url: toPathString(localVarUrlObj),
1978
+ options: localVarRequestOptions,
1979
+ };
1980
+ }),
1981
+ /**
1982
+ * Create a new product request
1983
+ * @summary Create a new product request
1984
+ * @param {ProductRequestCreationRequest} [productRequestCreationRequest]
1985
+ * @param {*} [options] Override http request option.
1986
+ * @throws {RequiredError}
1987
+ */
1988
+ createProductRequest: (productRequestCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1989
+ const localVarPath = `/products/requests`;
1990
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1991
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1992
+ let baseOptions;
1993
+ if (configuration) {
1994
+ baseOptions = configuration.baseOptions;
1995
+ }
1996
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1997
+ const localVarHeaderParameter = {};
1998
+ const localVarQueryParameter = {};
1999
+ // authentication jwt required
2000
+ // http bearer authentication required
2001
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2002
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2003
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2004
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2005
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2006
+ localVarRequestOptions.data = serializeDataIfNeeded(productRequestCreationRequest, localVarRequestOptions, configuration);
2007
+ return {
2008
+ url: toPathString(localVarUrlObj),
2009
+ options: localVarRequestOptions,
2010
+ };
2011
+ }),
2012
+ /**
2013
+ * Get a product by id
2014
+ * @summary Get a product by id
2015
+ * @param {string} id The product id
2016
+ * @param {*} [options] Override http request option.
2017
+ * @throws {RequiredError}
2018
+ */
2019
+ getProductById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2020
+ // verify required parameter 'id' is not null or undefined
2021
+ assertParamExists('getProductById', 'id', id);
2022
+ const localVarPath = `/products/{id}`
2023
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2024
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2025
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2026
+ let baseOptions;
2027
+ if (configuration) {
2028
+ baseOptions = configuration.baseOptions;
2029
+ }
2030
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2031
+ const localVarHeaderParameter = {};
2032
+ const localVarQueryParameter = {};
2033
+ // authentication jwt required
2034
+ // http bearer authentication required
2035
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2036
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2037
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2038
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2039
+ return {
2040
+ url: toPathString(localVarUrlObj),
2041
+ options: localVarRequestOptions,
2042
+ };
2043
+ }),
2044
+ /**
2045
+ * Get a product request by id
2046
+ * @summary Get a product request by id
2047
+ * @param {string} id The product request id
2048
+ * @param {*} [options] Override http request option.
2049
+ * @throws {RequiredError}
2050
+ */
2051
+ getProductRequestById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2052
+ // verify required parameter 'id' is not null or undefined
2053
+ assertParamExists('getProductRequestById', 'id', id);
2054
+ const localVarPath = `/products/requests/{id}`
2055
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2056
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2057
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2058
+ let baseOptions;
2059
+ if (configuration) {
2060
+ baseOptions = configuration.baseOptions;
2061
+ }
2062
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2063
+ const localVarHeaderParameter = {};
2064
+ const localVarQueryParameter = {};
2065
+ // authentication jwt required
2066
+ // http bearer authentication required
2067
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2068
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2069
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2070
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2071
+ return {
2072
+ url: toPathString(localVarUrlObj),
2073
+ options: localVarRequestOptions,
2074
+ };
2075
+ }),
2076
+ /**
2077
+ * List existing product requests
2078
+ * @summary List existing product requests
2079
+ * @param {ProductRequestStatus} [status] The product request status
2080
+ * @param {string} [nextToken] This is the pagination token
2081
+ * @param {*} [options] Override http request option.
2082
+ * @throws {RequiredError}
2083
+ */
2084
+ listProductRequests: (status, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
2085
+ const localVarPath = `/products/requests`;
2086
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2087
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2088
+ let baseOptions;
2089
+ if (configuration) {
2090
+ baseOptions = configuration.baseOptions;
2091
+ }
2092
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2093
+ const localVarHeaderParameter = {};
2094
+ const localVarQueryParameter = {};
2095
+ // authentication jwt required
2096
+ // http bearer authentication required
2097
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2098
+ if (status !== undefined) {
2099
+ localVarQueryParameter['status'] = status;
2100
+ }
2101
+ if (nextToken !== undefined) {
2102
+ localVarQueryParameter['nextToken'] = nextToken;
2103
+ }
2104
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2105
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2106
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2107
+ return {
2108
+ url: toPathString(localVarUrlObj),
2109
+ options: localVarRequestOptions,
2110
+ };
2111
+ }),
2112
+ /**
2113
+ * Update a product by id
2114
+ * @summary Update a product by id
2115
+ * @param {string} id The product id
2116
+ * @param {ProductCreationRequest | null} [productCreationRequest]
2117
+ * @param {*} [options] Override http request option.
2118
+ * @throws {RequiredError}
2119
+ */
2120
+ updateProduct: (id, productCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2121
+ // verify required parameter 'id' is not null or undefined
2122
+ assertParamExists('updateProduct', 'id', id);
2123
+ const localVarPath = `/products/{id}`
2124
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2125
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2126
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2127
+ let baseOptions;
2128
+ if (configuration) {
2129
+ baseOptions = configuration.baseOptions;
2130
+ }
2131
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2132
+ const localVarHeaderParameter = {};
2133
+ const localVarQueryParameter = {};
2134
+ // authentication jwt required
2135
+ // http bearer authentication required
2136
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2137
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2138
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2139
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2140
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2141
+ localVarRequestOptions.data = serializeDataIfNeeded(productCreationRequest, localVarRequestOptions, configuration);
2142
+ return {
2143
+ url: toPathString(localVarUrlObj),
2144
+ options: localVarRequestOptions,
2145
+ };
2146
+ }),
2147
+ };
2148
+ };
2149
+ /**
2150
+ * ProductApi - functional programming interface
2151
+ * @export
2152
+ */
2153
+ export const ProductApiFp = function (configuration) {
2154
+ const localVarAxiosParamCreator = ProductApiAxiosParamCreator(configuration);
2155
+ return {
2156
+ /**
2157
+ * Accept or reject a product by id
2158
+ * @summary Accept or reject a product by id
2159
+ * @param {string} id The product id
2160
+ * @param {ProductRequestApprovalRequest} [productRequestApprovalRequest]
2161
+ * @param {*} [options] Override http request option.
2162
+ * @throws {RequiredError}
2163
+ */
2164
+ approveProduct(id, productRequestApprovalRequest, options) {
2165
+ return __awaiter(this, void 0, void 0, function* () {
2166
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.approveProduct(id, productRequestApprovalRequest, options);
2167
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2168
+ });
2169
+ },
2170
+ /**
2171
+ * Create a new product
2172
+ * @summary Create a new product
2173
+ * @param {ProductCreationRequest | null} [productCreationRequest]
2174
+ * @param {*} [options] Override http request option.
2175
+ * @throws {RequiredError}
2176
+ */
2177
+ createProduct(productCreationRequest, options) {
2178
+ return __awaiter(this, void 0, void 0, function* () {
2179
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createProduct(productCreationRequest, options);
2180
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2181
+ });
2182
+ },
2183
+ /**
2184
+ * Create a new product request
2185
+ * @summary Create a new product request
2186
+ * @param {ProductRequestCreationRequest} [productRequestCreationRequest]
2187
+ * @param {*} [options] Override http request option.
2188
+ * @throws {RequiredError}
2189
+ */
2190
+ createProductRequest(productRequestCreationRequest, options) {
2191
+ return __awaiter(this, void 0, void 0, function* () {
2192
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createProductRequest(productRequestCreationRequest, options);
2193
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2194
+ });
2195
+ },
2196
+ /**
2197
+ * Get a product by id
2198
+ * @summary Get a product by id
2199
+ * @param {string} id The product id
2200
+ * @param {*} [options] Override http request option.
2201
+ * @throws {RequiredError}
2202
+ */
2203
+ getProductById(id, options) {
2204
+ return __awaiter(this, void 0, void 0, function* () {
2205
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getProductById(id, options);
2206
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2207
+ });
2208
+ },
2209
+ /**
2210
+ * Get a product request by id
2211
+ * @summary Get a product request by id
2212
+ * @param {string} id The product request id
2213
+ * @param {*} [options] Override http request option.
2214
+ * @throws {RequiredError}
2215
+ */
2216
+ getProductRequestById(id, options) {
2217
+ return __awaiter(this, void 0, void 0, function* () {
2218
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getProductRequestById(id, options);
2219
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2220
+ });
2221
+ },
2222
+ /**
2223
+ * List existing product requests
2224
+ * @summary List existing product requests
2225
+ * @param {ProductRequestStatus} [status] The product request status
2226
+ * @param {string} [nextToken] This is the pagination token
2227
+ * @param {*} [options] Override http request option.
2228
+ * @throws {RequiredError}
2229
+ */
2230
+ listProductRequests(status, nextToken, options) {
2231
+ return __awaiter(this, void 0, void 0, function* () {
2232
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProductRequests(status, nextToken, options);
2233
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2234
+ });
2235
+ },
2236
+ /**
2237
+ * Update a product by id
2238
+ * @summary Update a product by id
2239
+ * @param {string} id The product id
2240
+ * @param {ProductCreationRequest | null} [productCreationRequest]
2241
+ * @param {*} [options] Override http request option.
2242
+ * @throws {RequiredError}
2243
+ */
2244
+ updateProduct(id, productCreationRequest, options) {
2245
+ return __awaiter(this, void 0, void 0, function* () {
2246
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateProduct(id, productCreationRequest, options);
2247
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2248
+ });
2249
+ },
2250
+ };
2251
+ };
2252
+ /**
2253
+ * ProductApi - factory interface
2254
+ * @export
2255
+ */
2256
+ export const ProductApiFactory = function (configuration, basePath, axios) {
2257
+ const localVarFp = ProductApiFp(configuration);
2258
+ return {
2259
+ /**
2260
+ * Accept or reject a product by id
2261
+ * @summary Accept or reject a product by id
2262
+ * @param {string} id The product id
2263
+ * @param {ProductRequestApprovalRequest} [productRequestApprovalRequest]
2264
+ * @param {*} [options] Override http request option.
2265
+ * @throws {RequiredError}
2266
+ */
2267
+ approveProduct(id, productRequestApprovalRequest, options) {
2268
+ return localVarFp.approveProduct(id, productRequestApprovalRequest, options).then((request) => request(axios, basePath));
2269
+ },
2270
+ /**
2271
+ * Create a new product
2272
+ * @summary Create a new product
2273
+ * @param {ProductCreationRequest | null} [productCreationRequest]
2274
+ * @param {*} [options] Override http request option.
2275
+ * @throws {RequiredError}
2276
+ */
2277
+ createProduct(productCreationRequest, options) {
2278
+ return localVarFp.createProduct(productCreationRequest, options).then((request) => request(axios, basePath));
2279
+ },
2280
+ /**
2281
+ * Create a new product request
2282
+ * @summary Create a new product request
2283
+ * @param {ProductRequestCreationRequest} [productRequestCreationRequest]
2284
+ * @param {*} [options] Override http request option.
2285
+ * @throws {RequiredError}
2286
+ */
2287
+ createProductRequest(productRequestCreationRequest, options) {
2288
+ return localVarFp.createProductRequest(productRequestCreationRequest, options).then((request) => request(axios, basePath));
2289
+ },
2290
+ /**
2291
+ * Get a product by id
2292
+ * @summary Get a product by id
2293
+ * @param {string} id The product id
2294
+ * @param {*} [options] Override http request option.
2295
+ * @throws {RequiredError}
2296
+ */
2297
+ getProductById(id, options) {
2298
+ return localVarFp.getProductById(id, options).then((request) => request(axios, basePath));
2299
+ },
2300
+ /**
2301
+ * Get a product request by id
2302
+ * @summary Get a product request by id
2303
+ * @param {string} id The product request id
2304
+ * @param {*} [options] Override http request option.
2305
+ * @throws {RequiredError}
2306
+ */
2307
+ getProductRequestById(id, options) {
2308
+ return localVarFp.getProductRequestById(id, options).then((request) => request(axios, basePath));
2309
+ },
2310
+ /**
2311
+ * List existing product requests
2312
+ * @summary List existing product requests
2313
+ * @param {ProductRequestStatus} [status] The product request status
2314
+ * @param {string} [nextToken] This is the pagination token
2315
+ * @param {*} [options] Override http request option.
2316
+ * @throws {RequiredError}
2317
+ */
2318
+ listProductRequests(status, nextToken, options) {
2319
+ return localVarFp.listProductRequests(status, nextToken, options).then((request) => request(axios, basePath));
2320
+ },
2321
+ /**
2322
+ * Update a product by id
2323
+ * @summary Update a product by id
2324
+ * @param {string} id The product id
2325
+ * @param {ProductCreationRequest | null} [productCreationRequest]
2326
+ * @param {*} [options] Override http request option.
2327
+ * @throws {RequiredError}
2328
+ */
2329
+ updateProduct(id, productCreationRequest, options) {
2330
+ return localVarFp.updateProduct(id, productCreationRequest, options).then((request) => request(axios, basePath));
2331
+ },
2332
+ };
2333
+ };
2334
+ /**
2335
+ * ProductApi - object-oriented interface
2336
+ * @export
2337
+ * @class ProductApi
2338
+ * @extends {BaseAPI}
2339
+ */
2340
+ export class ProductApi extends BaseAPI {
2341
+ /**
2342
+ * Accept or reject a product by id
2343
+ * @summary Accept or reject a product by id
2344
+ * @param {string} id The product id
2345
+ * @param {ProductRequestApprovalRequest} [productRequestApprovalRequest]
2346
+ * @param {*} [options] Override http request option.
2347
+ * @throws {RequiredError}
2348
+ * @memberof ProductApi
2349
+ */
2350
+ approveProduct(id, productRequestApprovalRequest, options) {
2351
+ return ProductApiFp(this.configuration).approveProduct(id, productRequestApprovalRequest, options).then((request) => request(this.axios, this.basePath));
2352
+ }
2353
+ /**
2354
+ * Create a new product
2355
+ * @summary Create a new product
2356
+ * @param {ProductCreationRequest | null} [productCreationRequest]
2357
+ * @param {*} [options] Override http request option.
2358
+ * @throws {RequiredError}
2359
+ * @memberof ProductApi
2360
+ */
2361
+ createProduct(productCreationRequest, options) {
2362
+ return ProductApiFp(this.configuration).createProduct(productCreationRequest, options).then((request) => request(this.axios, this.basePath));
2363
+ }
2364
+ /**
2365
+ * Create a new product request
2366
+ * @summary Create a new product request
2367
+ * @param {ProductRequestCreationRequest} [productRequestCreationRequest]
2368
+ * @param {*} [options] Override http request option.
2369
+ * @throws {RequiredError}
2370
+ * @memberof ProductApi
2371
+ */
2372
+ createProductRequest(productRequestCreationRequest, options) {
2373
+ return ProductApiFp(this.configuration).createProductRequest(productRequestCreationRequest, options).then((request) => request(this.axios, this.basePath));
2374
+ }
2375
+ /**
2376
+ * Get a product by id
2377
+ * @summary Get a product by id
2378
+ * @param {string} id The product id
2379
+ * @param {*} [options] Override http request option.
2380
+ * @throws {RequiredError}
2381
+ * @memberof ProductApi
2382
+ */
2383
+ getProductById(id, options) {
2384
+ return ProductApiFp(this.configuration).getProductById(id, options).then((request) => request(this.axios, this.basePath));
2385
+ }
2386
+ /**
2387
+ * Get a product request by id
2388
+ * @summary Get a product request by id
2389
+ * @param {string} id The product request id
2390
+ * @param {*} [options] Override http request option.
2391
+ * @throws {RequiredError}
2392
+ * @memberof ProductApi
2393
+ */
2394
+ getProductRequestById(id, options) {
2395
+ return ProductApiFp(this.configuration).getProductRequestById(id, options).then((request) => request(this.axios, this.basePath));
2396
+ }
2397
+ /**
2398
+ * List existing product requests
2399
+ * @summary List existing product requests
2400
+ * @param {ProductRequestStatus} [status] The product request status
2401
+ * @param {string} [nextToken] This is the pagination token
2402
+ * @param {*} [options] Override http request option.
2403
+ * @throws {RequiredError}
2404
+ * @memberof ProductApi
2405
+ */
2406
+ listProductRequests(status, nextToken, options) {
2407
+ return ProductApiFp(this.configuration).listProductRequests(status, nextToken, options).then((request) => request(this.axios, this.basePath));
2408
+ }
2409
+ /**
2410
+ * Update a product by id
2411
+ * @summary Update a product by id
2412
+ * @param {string} id The product id
2413
+ * @param {ProductCreationRequest | null} [productCreationRequest]
2414
+ * @param {*} [options] Override http request option.
2415
+ * @throws {RequiredError}
2416
+ * @memberof ProductApi
2417
+ */
2418
+ updateProduct(id, productCreationRequest, options) {
2419
+ return ProductApiFp(this.configuration).updateProduct(id, productCreationRequest, options).then((request) => request(this.axios, this.basePath));
2420
+ }
2421
+ }
2422
+ /**
2423
+ * ProgressApi - axios parameter creator
2424
+ * @export
2425
+ */
2426
+ export const ProgressApiAxiosParamCreator = function (configuration) {
2427
+ return {
2428
+ /**
2429
+ * List all progress of a promotion
2430
+ * @summary List promotion\'s progress
2431
+ * @param {string} id Promotion ID
2432
+ * @param {number} [periodID] Period ID
2433
+ * @param {string} [userID] User ID
2434
+ * @param {string} [clientID] Client ID
2435
+ * @param {ListProgressIntervalEnum} [interval] Interval
2436
+ * @param {string} [nextToken] This is the pagination token
2437
+ * @param {*} [options] Override http request option.
2438
+ * @throws {RequiredError}
2439
+ */
2440
+ listProgress: (id, periodID, userID, clientID, interval, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
2441
+ // verify required parameter 'id' is not null or undefined
2442
+ assertParamExists('listProgress', 'id', id);
2443
+ const localVarPath = `/promotions/{id}/progress`
2444
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2445
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2446
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2447
+ let baseOptions;
2448
+ if (configuration) {
2449
+ baseOptions = configuration.baseOptions;
2450
+ }
2451
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2452
+ const localVarHeaderParameter = {};
2453
+ const localVarQueryParameter = {};
2454
+ // authentication jwt required
2455
+ // http bearer authentication required
2456
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2457
+ if (periodID !== undefined) {
2458
+ localVarQueryParameter['periodID'] = periodID;
2459
+ }
2460
+ if (userID !== undefined) {
2461
+ localVarQueryParameter['userID'] = userID;
2462
+ }
2463
+ if (clientID !== undefined) {
2464
+ localVarQueryParameter['clientID'] = clientID;
2465
+ }
2466
+ if (interval !== undefined) {
2467
+ localVarQueryParameter['interval'] = interval;
2468
+ }
2469
+ if (nextToken !== undefined) {
2470
+ localVarQueryParameter['nextToken'] = nextToken;
2471
+ }
2472
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2473
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2474
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2475
+ return {
2476
+ url: toPathString(localVarUrlObj),
2477
+ options: localVarRequestOptions,
2478
+ };
2479
+ }),
2480
+ };
2481
+ };
2482
+ /**
2483
+ * ProgressApi - functional programming interface
2484
+ * @export
2485
+ */
2486
+ export const ProgressApiFp = function (configuration) {
2487
+ const localVarAxiosParamCreator = ProgressApiAxiosParamCreator(configuration);
2488
+ return {
2489
+ /**
2490
+ * List all progress of a promotion
2491
+ * @summary List promotion\'s progress
2492
+ * @param {string} id Promotion ID
2493
+ * @param {number} [periodID] Period ID
2494
+ * @param {string} [userID] User ID
2495
+ * @param {string} [clientID] Client ID
2496
+ * @param {ListProgressIntervalEnum} [interval] Interval
2497
+ * @param {string} [nextToken] This is the pagination token
2498
+ * @param {*} [options] Override http request option.
2499
+ * @throws {RequiredError}
2500
+ */
2501
+ listProgress(id, periodID, userID, clientID, interval, nextToken, options) {
2502
+ return __awaiter(this, void 0, void 0, function* () {
2503
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProgress(id, periodID, userID, clientID, interval, nextToken, options);
2504
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2505
+ });
2506
+ },
2507
+ };
2508
+ };
2509
+ /**
2510
+ * ProgressApi - factory interface
2511
+ * @export
2512
+ */
2513
+ export const ProgressApiFactory = function (configuration, basePath, axios) {
2514
+ const localVarFp = ProgressApiFp(configuration);
2515
+ return {
2516
+ /**
2517
+ * List all progress of a promotion
2518
+ * @summary List promotion\'s progress
2519
+ * @param {string} id Promotion ID
2520
+ * @param {number} [periodID] Period ID
2521
+ * @param {string} [userID] User ID
2522
+ * @param {string} [clientID] Client ID
2523
+ * @param {ListProgressIntervalEnum} [interval] Interval
2524
+ * @param {string} [nextToken] This is the pagination token
2525
+ * @param {*} [options] Override http request option.
2526
+ * @throws {RequiredError}
2527
+ */
2528
+ listProgress(id, periodID, userID, clientID, interval, nextToken, options) {
2529
+ return localVarFp.listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(axios, basePath));
2530
+ },
2531
+ };
2532
+ };
2533
+ /**
2534
+ * ProgressApi - object-oriented interface
2535
+ * @export
2536
+ * @class ProgressApi
2537
+ * @extends {BaseAPI}
2538
+ */
2539
+ export class ProgressApi extends BaseAPI {
2540
+ /**
2541
+ * List all progress of a promotion
2542
+ * @summary List promotion\'s progress
2543
+ * @param {string} id Promotion ID
2544
+ * @param {number} [periodID] Period ID
2545
+ * @param {string} [userID] User ID
2546
+ * @param {string} [clientID] Client ID
2547
+ * @param {ListProgressIntervalEnum} [interval] Interval
2548
+ * @param {string} [nextToken] This is the pagination token
2549
+ * @param {*} [options] Override http request option.
2550
+ * @throws {RequiredError}
2551
+ * @memberof ProgressApi
2552
+ */
2553
+ listProgress(id, periodID, userID, clientID, interval, nextToken, options) {
2554
+ return ProgressApiFp(this.configuration).listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(this.axios, this.basePath));
2555
+ }
2556
+ }
2557
+ /**
2558
+ * @export
2559
+ */
2560
+ export const ListProgressIntervalEnum = {
2561
+ _100: '100',
2562
+ _9975: '99-75',
2563
+ _7550: '75-50',
2564
+ _501: '50-1'
2565
+ };
2566
+ /**
2567
+ * PromotionApi - axios parameter creator
2568
+ * @export
2569
+ */
2570
+ export const PromotionApiAxiosParamCreator = function (configuration) {
2571
+ return {
2572
+ /**
2573
+ * Configure a promotion
2574
+ * @summary Create promotion
2575
+ * @param {PromotionRequest} promotionRequest Promotion configuration
2576
+ * @param {*} [options] Override http request option.
2577
+ * @throws {RequiredError}
2578
+ */
2579
+ createPromotion: (promotionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2580
+ // verify required parameter 'promotionRequest' is not null or undefined
2581
+ assertParamExists('createPromotion', 'promotionRequest', promotionRequest);
2582
+ const localVarPath = `/promotions`;
2583
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2584
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2585
+ let baseOptions;
2586
+ if (configuration) {
2587
+ baseOptions = configuration.baseOptions;
2588
+ }
2589
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2590
+ const localVarHeaderParameter = {};
2591
+ const localVarQueryParameter = {};
2592
+ // authentication jwt required
2593
+ // http bearer authentication required
2594
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2595
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2596
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2597
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2598
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2599
+ localVarRequestOptions.data = serializeDataIfNeeded(promotionRequest, localVarRequestOptions, configuration);
2600
+ return {
2601
+ url: toPathString(localVarUrlObj),
2602
+ options: localVarRequestOptions,
2603
+ };
2604
+ }),
2605
+ /**
2606
+ * Delete promotion by id
2607
+ * @summary Delete promotion
2608
+ * @param {string} id Promotion id
2609
+ * @param {*} [options] Override http request option.
2610
+ * @throws {RequiredError}
2611
+ */
2612
+ deletePromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2613
+ // verify required parameter 'id' is not null or undefined
2614
+ assertParamExists('deletePromotion', 'id', id);
2615
+ const localVarPath = `/promotions/{id}`
2616
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2617
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2618
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2619
+ let baseOptions;
2620
+ if (configuration) {
2621
+ baseOptions = configuration.baseOptions;
2622
+ }
2623
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2624
+ const localVarHeaderParameter = {};
2625
+ const localVarQueryParameter = {};
2626
+ // authentication jwt required
2627
+ // http bearer authentication required
2628
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2629
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2630
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2631
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2632
+ return {
2633
+ url: toPathString(localVarUrlObj),
2634
+ options: localVarRequestOptions,
2635
+ };
2636
+ }),
2637
+ /**
2638
+ * Get promotion by id
2639
+ * @summary Get promotion
2640
+ * @param {string} id Promotion id
2641
+ * @param {*} [options] Override http request option.
2642
+ * @throws {RequiredError}
2643
+ */
2644
+ getPromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2645
+ // verify required parameter 'id' is not null or undefined
2646
+ assertParamExists('getPromotion', 'id', id);
2647
+ const localVarPath = `/promotions/{id}`
2648
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2649
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2650
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2651
+ let baseOptions;
2652
+ if (configuration) {
2653
+ baseOptions = configuration.baseOptions;
2654
+ }
2655
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2656
+ const localVarHeaderParameter = {};
2657
+ const localVarQueryParameter = {};
2658
+ // authentication jwt required
2659
+ // http bearer authentication required
2660
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2661
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2662
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2663
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2664
+ return {
2665
+ url: toPathString(localVarUrlObj),
2666
+ options: localVarRequestOptions,
2667
+ };
2668
+ }),
2669
+ /**
2670
+ * List all promotions
2671
+ * @summary List promotions
2672
+ * @param {string} [nextToken] This is the pagination token
2673
+ * @param {string} [tags] tags to filter by, format is key1&#x3D;value1;key2&#x3D;value2. Should be url encoded.
2674
+ * @param {string} [segmentId] segment ID to filter by
2675
+ * @param {string} [ownerID] ownerID to filter by
2676
+ * @param {PromotionType} [type] type to filter by
2677
+ * @param {string} [startingAfter] start time after time
2678
+ * @param {string} [endingBefore] end time before time
2679
+ * @param {string} [clientID] client ID to filter by
2680
+ * @param {string} [search] search by name or description
2681
+ * @param {*} [options] Override http request option.
2682
+ * @throws {RequiredError}
2683
+ */
2684
+ listPromotions: (nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
2685
+ const localVarPath = `/promotions`;
2686
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2687
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2688
+ let baseOptions;
2689
+ if (configuration) {
2690
+ baseOptions = configuration.baseOptions;
2691
+ }
2692
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2693
+ const localVarHeaderParameter = {};
2694
+ const localVarQueryParameter = {};
2695
+ // authentication jwt required
2696
+ // http bearer authentication required
2697
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2698
+ if (nextToken !== undefined) {
2699
+ localVarQueryParameter['nextToken'] = nextToken;
2700
+ }
2701
+ if (tags !== undefined) {
2702
+ localVarQueryParameter['tags'] = tags;
2703
+ }
2704
+ if (segmentId !== undefined) {
2705
+ localVarQueryParameter['segmentId'] = segmentId;
2706
+ }
2707
+ if (ownerID !== undefined) {
2708
+ localVarQueryParameter['ownerID'] = ownerID;
2709
+ }
2710
+ if (type !== undefined) {
2711
+ localVarQueryParameter['type'] = type;
2712
+ }
2713
+ if (startingAfter !== undefined) {
2714
+ localVarQueryParameter['startingAfter'] = (startingAfter instanceof Date) ?
2715
+ startingAfter.toISOString() :
2716
+ startingAfter;
2717
+ }
2718
+ if (endingBefore !== undefined) {
2719
+ localVarQueryParameter['endingBefore'] = (endingBefore instanceof Date) ?
2720
+ endingBefore.toISOString() :
2721
+ endingBefore;
2722
+ }
2723
+ if (clientID !== undefined) {
2724
+ localVarQueryParameter['clientID'] = clientID;
2725
+ }
2726
+ if (search !== undefined) {
2727
+ localVarQueryParameter['search'] = search;
2728
+ }
2729
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2730
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2731
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2732
+ return {
2733
+ url: toPathString(localVarUrlObj),
2734
+ options: localVarRequestOptions,
2735
+ };
2736
+ }),
2737
+ /**
2738
+ * Update promotion by id
2739
+ * @summary Update promotion
2740
+ * @param {string} id Promotion id
2741
+ * @param {UpdatePromotionRequest} updatePromotionRequest Promotion configuration
2742
+ * @param {*} [options] Override http request option.
2743
+ * @throws {RequiredError}
2744
+ */
2745
+ updatePromotion: (id, updatePromotionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2746
+ // verify required parameter 'id' is not null or undefined
2747
+ assertParamExists('updatePromotion', 'id', id);
2748
+ // verify required parameter 'updatePromotionRequest' is not null or undefined
2749
+ assertParamExists('updatePromotion', 'updatePromotionRequest', updatePromotionRequest);
2750
+ const localVarPath = `/promotions/{id}`
2751
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2752
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2753
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2754
+ let baseOptions;
2755
+ if (configuration) {
2756
+ baseOptions = configuration.baseOptions;
2757
+ }
2758
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2759
+ const localVarHeaderParameter = {};
2760
+ const localVarQueryParameter = {};
2761
+ // authentication jwt required
2762
+ // http bearer authentication required
2763
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2764
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2765
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2766
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2767
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2768
+ localVarRequestOptions.data = serializeDataIfNeeded(updatePromotionRequest, localVarRequestOptions, configuration);
2769
+ return {
2770
+ url: toPathString(localVarUrlObj),
2771
+ options: localVarRequestOptions,
2772
+ };
2773
+ }),
2774
+ };
2775
+ };
2776
+ /**
2777
+ * PromotionApi - functional programming interface
2778
+ * @export
2779
+ */
2780
+ export const PromotionApiFp = function (configuration) {
2781
+ const localVarAxiosParamCreator = PromotionApiAxiosParamCreator(configuration);
2782
+ return {
2783
+ /**
2784
+ * Configure a promotion
2785
+ * @summary Create promotion
2786
+ * @param {PromotionRequest} promotionRequest Promotion configuration
2787
+ * @param {*} [options] Override http request option.
2788
+ * @throws {RequiredError}
2789
+ */
2790
+ createPromotion(promotionRequest, options) {
2791
+ return __awaiter(this, void 0, void 0, function* () {
2792
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPromotion(promotionRequest, options);
2793
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2794
+ });
2795
+ },
2796
+ /**
2797
+ * Delete promotion by id
2798
+ * @summary Delete promotion
2799
+ * @param {string} id Promotion id
2800
+ * @param {*} [options] Override http request option.
2801
+ * @throws {RequiredError}
2802
+ */
2803
+ deletePromotion(id, options) {
2804
+ return __awaiter(this, void 0, void 0, function* () {
2805
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deletePromotion(id, options);
2806
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2807
+ });
2808
+ },
2809
+ /**
2810
+ * Get promotion by id
2811
+ * @summary Get promotion
2812
+ * @param {string} id Promotion id
2813
+ * @param {*} [options] Override http request option.
2814
+ * @throws {RequiredError}
2815
+ */
2816
+ getPromotion(id, options) {
2817
+ return __awaiter(this, void 0, void 0, function* () {
2818
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPromotion(id, options);
2819
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2820
+ });
2821
+ },
2822
+ /**
2823
+ * List all promotions
2824
+ * @summary List promotions
2825
+ * @param {string} [nextToken] This is the pagination token
2826
+ * @param {string} [tags] tags to filter by, format is key1&#x3D;value1;key2&#x3D;value2. Should be url encoded.
2827
+ * @param {string} [segmentId] segment ID to filter by
2828
+ * @param {string} [ownerID] ownerID to filter by
2829
+ * @param {PromotionType} [type] type to filter by
2830
+ * @param {string} [startingAfter] start time after time
2831
+ * @param {string} [endingBefore] end time before time
2832
+ * @param {string} [clientID] client ID to filter by
2833
+ * @param {string} [search] search by name or description
2834
+ * @param {*} [options] Override http request option.
2835
+ * @throws {RequiredError}
2836
+ */
2837
+ listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options) {
2838
+ return __awaiter(this, void 0, void 0, function* () {
2839
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options);
2840
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2841
+ });
2842
+ },
2843
+ /**
2844
+ * Update promotion by id
2845
+ * @summary Update promotion
2846
+ * @param {string} id Promotion id
2847
+ * @param {UpdatePromotionRequest} updatePromotionRequest Promotion configuration
2848
+ * @param {*} [options] Override http request option.
2849
+ * @throws {RequiredError}
2850
+ */
2851
+ updatePromotion(id, updatePromotionRequest, options) {
2852
+ return __awaiter(this, void 0, void 0, function* () {
2853
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePromotion(id, updatePromotionRequest, options);
2854
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2855
+ });
2856
+ },
2857
+ };
2858
+ };
2859
+ /**
2860
+ * PromotionApi - factory interface
2861
+ * @export
2862
+ */
2863
+ export const PromotionApiFactory = function (configuration, basePath, axios) {
2864
+ const localVarFp = PromotionApiFp(configuration);
2865
+ return {
2866
+ /**
2867
+ * Configure a promotion
2868
+ * @summary Create promotion
2869
+ * @param {PromotionRequest} promotionRequest Promotion configuration
2870
+ * @param {*} [options] Override http request option.
2871
+ * @throws {RequiredError}
2872
+ */
2873
+ createPromotion(promotionRequest, options) {
2874
+ return localVarFp.createPromotion(promotionRequest, options).then((request) => request(axios, basePath));
2875
+ },
2876
+ /**
2877
+ * Delete promotion by id
2878
+ * @summary Delete promotion
2879
+ * @param {string} id Promotion id
2880
+ * @param {*} [options] Override http request option.
2881
+ * @throws {RequiredError}
2882
+ */
2883
+ deletePromotion(id, options) {
2884
+ return localVarFp.deletePromotion(id, options).then((request) => request(axios, basePath));
2885
+ },
2886
+ /**
2887
+ * Get promotion by id
2888
+ * @summary Get promotion
2889
+ * @param {string} id Promotion id
2890
+ * @param {*} [options] Override http request option.
2891
+ * @throws {RequiredError}
2892
+ */
2893
+ getPromotion(id, options) {
2894
+ return localVarFp.getPromotion(id, options).then((request) => request(axios, basePath));
2895
+ },
2896
+ /**
2897
+ * List all promotions
2898
+ * @summary List promotions
2899
+ * @param {string} [nextToken] This is the pagination token
2900
+ * @param {string} [tags] tags to filter by, format is key1&#x3D;value1;key2&#x3D;value2. Should be url encoded.
2901
+ * @param {string} [segmentId] segment ID to filter by
2902
+ * @param {string} [ownerID] ownerID to filter by
2903
+ * @param {PromotionType} [type] type to filter by
2904
+ * @param {string} [startingAfter] start time after time
2905
+ * @param {string} [endingBefore] end time before time
2906
+ * @param {string} [clientID] client ID to filter by
2907
+ * @param {string} [search] search by name or description
2908
+ * @param {*} [options] Override http request option.
2909
+ * @throws {RequiredError}
2910
+ */
2911
+ listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options) {
2912
+ return localVarFp.listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(axios, basePath));
2913
+ },
2914
+ /**
2915
+ * Update promotion by id
2916
+ * @summary Update promotion
2917
+ * @param {string} id Promotion id
2918
+ * @param {UpdatePromotionRequest} updatePromotionRequest Promotion configuration
2919
+ * @param {*} [options] Override http request option.
2920
+ * @throws {RequiredError}
2921
+ */
2922
+ updatePromotion(id, updatePromotionRequest, options) {
2923
+ return localVarFp.updatePromotion(id, updatePromotionRequest, options).then((request) => request(axios, basePath));
2924
+ },
2925
+ };
2926
+ };
2927
+ /**
2928
+ * PromotionApi - object-oriented interface
2929
+ * @export
2930
+ * @class PromotionApi
2931
+ * @extends {BaseAPI}
2932
+ */
2933
+ export class PromotionApi extends BaseAPI {
2934
+ /**
2935
+ * Configure a promotion
2936
+ * @summary Create promotion
2937
+ * @param {PromotionRequest} promotionRequest Promotion configuration
2938
+ * @param {*} [options] Override http request option.
2939
+ * @throws {RequiredError}
2940
+ * @memberof PromotionApi
2941
+ */
2942
+ createPromotion(promotionRequest, options) {
2943
+ return PromotionApiFp(this.configuration).createPromotion(promotionRequest, options).then((request) => request(this.axios, this.basePath));
2944
+ }
2945
+ /**
2946
+ * Delete promotion by id
2947
+ * @summary Delete promotion
2948
+ * @param {string} id Promotion id
2949
+ * @param {*} [options] Override http request option.
2950
+ * @throws {RequiredError}
2951
+ * @memberof PromotionApi
2952
+ */
2953
+ deletePromotion(id, options) {
2954
+ return PromotionApiFp(this.configuration).deletePromotion(id, options).then((request) => request(this.axios, this.basePath));
2955
+ }
2956
+ /**
2957
+ * Get promotion by id
2958
+ * @summary Get promotion
2959
+ * @param {string} id Promotion id
2960
+ * @param {*} [options] Override http request option.
2961
+ * @throws {RequiredError}
2962
+ * @memberof PromotionApi
2963
+ */
2964
+ getPromotion(id, options) {
2965
+ return PromotionApiFp(this.configuration).getPromotion(id, options).then((request) => request(this.axios, this.basePath));
2966
+ }
2967
+ /**
2968
+ * List all promotions
2969
+ * @summary List promotions
2970
+ * @param {string} [nextToken] This is the pagination token
2971
+ * @param {string} [tags] tags to filter by, format is key1&#x3D;value1;key2&#x3D;value2. Should be url encoded.
2972
+ * @param {string} [segmentId] segment ID to filter by
2973
+ * @param {string} [ownerID] ownerID to filter by
2974
+ * @param {PromotionType} [type] type to filter by
2975
+ * @param {string} [startingAfter] start time after time
2976
+ * @param {string} [endingBefore] end time before time
2977
+ * @param {string} [clientID] client ID to filter by
2978
+ * @param {string} [search] search by name or description
2979
+ * @param {*} [options] Override http request option.
2980
+ * @throws {RequiredError}
2981
+ * @memberof PromotionApi
2982
+ */
2983
+ listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options) {
2984
+ return PromotionApiFp(this.configuration).listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(this.axios, this.basePath));
2985
+ }
2986
+ /**
2987
+ * Update promotion by id
2988
+ * @summary Update promotion
2989
+ * @param {string} id Promotion id
2990
+ * @param {UpdatePromotionRequest} updatePromotionRequest Promotion configuration
2991
+ * @param {*} [options] Override http request option.
2992
+ * @throws {RequiredError}
2993
+ * @memberof PromotionApi
2994
+ */
2995
+ updatePromotion(id, updatePromotionRequest, options) {
2996
+ return PromotionApiFp(this.configuration).updatePromotion(id, updatePromotionRequest, options).then((request) => request(this.axios, this.basePath));
2997
+ }
2998
+ }
2999
+ /**
3000
+ * RewardApi - axios parameter creator
3001
+ * @export
3002
+ */
3003
+ export const RewardApiAxiosParamCreator = function (configuration) {
3004
+ return {
3005
+ /**
3006
+ * Create upload URL for reward
3007
+ * @summary Create upload URL for reward
3008
+ * @param {*} [options] Override http request option.
3009
+ * @throws {RequiredError}
3010
+ */
3011
+ createUploadURL: (options = {}) => __awaiter(this, void 0, void 0, function* () {
3012
+ const localVarPath = `/products/upload-urls`;
3013
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3014
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3015
+ let baseOptions;
3016
+ if (configuration) {
3017
+ baseOptions = configuration.baseOptions;
3018
+ }
3019
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3020
+ const localVarHeaderParameter = {};
3021
+ const localVarQueryParameter = {};
3022
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3023
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3024
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3025
+ return {
3026
+ url: toPathString(localVarUrlObj),
3027
+ options: localVarRequestOptions,
3028
+ };
3029
+ }),
3030
+ /**
3031
+ * List existing products
3032
+ * @summary List existing products
3033
+ * @param {ProductKind} [kind] The product kind
3034
+ * @param {string} [search] search string
3035
+ * @param {ProductUsage} [usage] The product usage
3036
+ * @param {ProductStatus} [status] The product status
3037
+ * @param {ProductAvailability} [availability] The product availability
3038
+ * @param {string} [segmentID] The segment ID
3039
+ * @param {string} [nextToken] This is the pagination token
3040
+ * @param {*} [options] Override http request option.
3041
+ * @throws {RequiredError}
3042
+ */
3043
+ listProducts: (kind, search, usage, status, availability, segmentID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
3044
+ const localVarPath = `/products`;
3045
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3046
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3047
+ let baseOptions;
3048
+ if (configuration) {
3049
+ baseOptions = configuration.baseOptions;
3050
+ }
3051
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3052
+ const localVarHeaderParameter = {};
3053
+ const localVarQueryParameter = {};
3054
+ // authentication jwt required
3055
+ // http bearer authentication required
3056
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3057
+ if (kind !== undefined) {
3058
+ localVarQueryParameter['kind'] = kind;
3059
+ }
3060
+ if (search !== undefined) {
3061
+ localVarQueryParameter['search'] = search;
3062
+ }
3063
+ if (usage !== undefined) {
3064
+ localVarQueryParameter['usage'] = usage;
3065
+ }
3066
+ if (status !== undefined) {
3067
+ localVarQueryParameter['status'] = status;
3068
+ }
3069
+ if (availability !== undefined) {
3070
+ localVarQueryParameter['availability'] = availability;
3071
+ }
3072
+ if (segmentID !== undefined) {
3073
+ localVarQueryParameter['segmentID'] = segmentID;
3074
+ }
3075
+ if (nextToken !== undefined) {
3076
+ localVarQueryParameter['nextToken'] = nextToken;
3077
+ }
3078
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3079
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3080
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3081
+ return {
3082
+ url: toPathString(localVarUrlObj),
3083
+ options: localVarRequestOptions,
3084
+ };
3085
+ }),
3086
+ };
3087
+ };
3088
+ /**
3089
+ * RewardApi - functional programming interface
3090
+ * @export
3091
+ */
3092
+ export const RewardApiFp = function (configuration) {
3093
+ const localVarAxiosParamCreator = RewardApiAxiosParamCreator(configuration);
3094
+ return {
3095
+ /**
3096
+ * Create upload URL for reward
3097
+ * @summary Create upload URL for reward
3098
+ * @param {*} [options] Override http request option.
3099
+ * @throws {RequiredError}
3100
+ */
3101
+ createUploadURL(options) {
3102
+ return __awaiter(this, void 0, void 0, function* () {
3103
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createUploadURL(options);
3104
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3105
+ });
3106
+ },
3107
+ /**
3108
+ * List existing products
3109
+ * @summary List existing products
3110
+ * @param {ProductKind} [kind] The product kind
3111
+ * @param {string} [search] search string
3112
+ * @param {ProductUsage} [usage] The product usage
3113
+ * @param {ProductStatus} [status] The product status
3114
+ * @param {ProductAvailability} [availability] The product availability
3115
+ * @param {string} [segmentID] The segment ID
3116
+ * @param {string} [nextToken] This is the pagination token
3117
+ * @param {*} [options] Override http request option.
3118
+ * @throws {RequiredError}
3119
+ */
3120
+ listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
3121
+ return __awaiter(this, void 0, void 0, function* () {
3122
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options);
3123
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3124
+ });
3125
+ },
3126
+ };
3127
+ };
3128
+ /**
3129
+ * RewardApi - factory interface
3130
+ * @export
3131
+ */
3132
+ export const RewardApiFactory = function (configuration, basePath, axios) {
3133
+ const localVarFp = RewardApiFp(configuration);
3134
+ return {
3135
+ /**
3136
+ * Create upload URL for reward
3137
+ * @summary Create upload URL for reward
3138
+ * @param {*} [options] Override http request option.
3139
+ * @throws {RequiredError}
3140
+ */
3141
+ createUploadURL(options) {
3142
+ return localVarFp.createUploadURL(options).then((request) => request(axios, basePath));
3143
+ },
3144
+ /**
3145
+ * List existing products
3146
+ * @summary List existing products
3147
+ * @param {ProductKind} [kind] The product kind
3148
+ * @param {string} [search] search string
3149
+ * @param {ProductUsage} [usage] The product usage
3150
+ * @param {ProductStatus} [status] The product status
3151
+ * @param {ProductAvailability} [availability] The product availability
3152
+ * @param {string} [segmentID] The segment ID
3153
+ * @param {string} [nextToken] This is the pagination token
3154
+ * @param {*} [options] Override http request option.
3155
+ * @throws {RequiredError}
3156
+ */
3157
+ listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
3158
+ return localVarFp.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(axios, basePath));
3159
+ },
3160
+ };
3161
+ };
3162
+ /**
3163
+ * RewardApi - object-oriented interface
3164
+ * @export
3165
+ * @class RewardApi
3166
+ * @extends {BaseAPI}
3167
+ */
3168
+ export class RewardApi extends BaseAPI {
3169
+ /**
3170
+ * Create upload URL for reward
3171
+ * @summary Create upload URL for reward
3172
+ * @param {*} [options] Override http request option.
3173
+ * @throws {RequiredError}
3174
+ * @memberof RewardApi
3175
+ */
3176
+ createUploadURL(options) {
3177
+ return RewardApiFp(this.configuration).createUploadURL(options).then((request) => request(this.axios, this.basePath));
3178
+ }
3179
+ /**
3180
+ * List existing products
3181
+ * @summary List existing products
3182
+ * @param {ProductKind} [kind] The product kind
3183
+ * @param {string} [search] search string
3184
+ * @param {ProductUsage} [usage] The product usage
3185
+ * @param {ProductStatus} [status] The product status
3186
+ * @param {ProductAvailability} [availability] The product availability
3187
+ * @param {string} [segmentID] The segment ID
3188
+ * @param {string} [nextToken] This is the pagination token
3189
+ * @param {*} [options] Override http request option.
3190
+ * @throws {RequiredError}
3191
+ * @memberof RewardApi
3192
+ */
3193
+ listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
3194
+ return RewardApiFp(this.configuration).listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(this.axios, this.basePath));
3195
+ }
3196
+ }
3197
+ /**
3198
+ * SegmentApi - axios parameter creator
3199
+ * @export
3200
+ */
3201
+ export const SegmentApiAxiosParamCreator = function (configuration) {
3202
+ return {
3203
+ /**
3204
+ * This method allows adding a new Segment to the system.
3205
+ * @summary Method allows to create new segment.
3206
+ * @param {CreateSegmentRequest} [createSegmentRequest]
3207
+ * @param {*} [options] Override http request option.
3208
+ * @throws {RequiredError}
3209
+ */
3210
+ createSegment: (createSegmentRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
3211
+ const localVarPath = `/segments`;
3212
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3213
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3214
+ let baseOptions;
3215
+ if (configuration) {
3216
+ baseOptions = configuration.baseOptions;
3217
+ }
3218
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3219
+ const localVarHeaderParameter = {};
3220
+ const localVarQueryParameter = {};
3221
+ // authentication jwt required
3222
+ // http bearer authentication required
3223
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3224
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3225
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3226
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3227
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3228
+ localVarRequestOptions.data = serializeDataIfNeeded(createSegmentRequest, localVarRequestOptions, configuration);
3229
+ return {
3230
+ url: toPathString(localVarUrlObj),
3231
+ options: localVarRequestOptions,
3232
+ };
3233
+ }),
3234
+ /**
3235
+ * This method returns all information about a specific Segment.
3236
+ * @summary Method will return segment details.
3237
+ * @param {string} segmentId Segment ID
3238
+ * @param {*} [options] Override http request option.
3239
+ * @throws {RequiredError}
3240
+ */
3241
+ getSegmentById: (segmentId, options = {}) => __awaiter(this, void 0, void 0, function* () {
3242
+ // verify required parameter 'segmentId' is not null or undefined
3243
+ assertParamExists('getSegmentById', 'segmentId', segmentId);
3244
+ const localVarPath = `/segments/{segmentId}`
3245
+ .replace(`{${"segmentId"}}`, encodeURIComponent(String(segmentId)));
3246
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3247
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3248
+ let baseOptions;
3249
+ if (configuration) {
3250
+ baseOptions = configuration.baseOptions;
3251
+ }
3252
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3253
+ const localVarHeaderParameter = {};
3254
+ const localVarQueryParameter = {};
3255
+ // authentication jwt required
3256
+ // http bearer authentication required
3257
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3258
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3259
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3260
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3261
+ return {
3262
+ url: toPathString(localVarUrlObj),
3263
+ options: localVarRequestOptions,
3264
+ };
3265
+ }),
3266
+ /**
3267
+ * This method returns a list of all Segment in the system.
3268
+ * @summary Method returns segments list.
3269
+ * @param {string} [nextToken]
3270
+ * @param {string} [search] search string
3271
+ * @param {*} [options] Override http request option.
3272
+ * @throws {RequiredError}
3273
+ */
3274
+ listSegments: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
3275
+ const localVarPath = `/segments`;
3276
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3277
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3278
+ let baseOptions;
3279
+ if (configuration) {
3280
+ baseOptions = configuration.baseOptions;
3281
+ }
3282
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3283
+ const localVarHeaderParameter = {};
3284
+ const localVarQueryParameter = {};
3285
+ // authentication jwt required
3286
+ // http bearer authentication required
3287
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3288
+ if (nextToken !== undefined) {
3289
+ localVarQueryParameter['nextToken'] = nextToken;
3290
+ }
3291
+ if (search !== undefined) {
3292
+ localVarQueryParameter['search'] = search;
3293
+ }
3294
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3295
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3296
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3297
+ return {
3298
+ url: toPathString(localVarUrlObj),
3299
+ options: localVarRequestOptions,
3300
+ };
3301
+ }),
3302
+ };
3303
+ };
3304
+ /**
3305
+ * SegmentApi - functional programming interface
3306
+ * @export
3307
+ */
3308
+ export const SegmentApiFp = function (configuration) {
3309
+ const localVarAxiosParamCreator = SegmentApiAxiosParamCreator(configuration);
3310
+ return {
3311
+ /**
3312
+ * This method allows adding a new Segment to the system.
3313
+ * @summary Method allows to create new segment.
3314
+ * @param {CreateSegmentRequest} [createSegmentRequest]
3315
+ * @param {*} [options] Override http request option.
3316
+ * @throws {RequiredError}
3317
+ */
3318
+ createSegment(createSegmentRequest, options) {
3319
+ return __awaiter(this, void 0, void 0, function* () {
3320
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSegment(createSegmentRequest, options);
3321
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3322
+ });
3323
+ },
3324
+ /**
3325
+ * This method returns all information about a specific Segment.
3326
+ * @summary Method will return segment details.
3327
+ * @param {string} segmentId Segment ID
3328
+ * @param {*} [options] Override http request option.
3329
+ * @throws {RequiredError}
3330
+ */
3331
+ getSegmentById(segmentId, options) {
3332
+ return __awaiter(this, void 0, void 0, function* () {
3333
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSegmentById(segmentId, options);
3334
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3335
+ });
3336
+ },
3337
+ /**
3338
+ * This method returns a list of all Segment in the system.
3339
+ * @summary Method returns segments list.
3340
+ * @param {string} [nextToken]
3341
+ * @param {string} [search] search string
3342
+ * @param {*} [options] Override http request option.
3343
+ * @throws {RequiredError}
3344
+ */
3345
+ listSegments(nextToken, search, options) {
3346
+ return __awaiter(this, void 0, void 0, function* () {
3347
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listSegments(nextToken, search, options);
3348
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3349
+ });
3350
+ },
3351
+ };
3352
+ };
3353
+ /**
3354
+ * SegmentApi - factory interface
3355
+ * @export
3356
+ */
3357
+ export const SegmentApiFactory = function (configuration, basePath, axios) {
3358
+ const localVarFp = SegmentApiFp(configuration);
3359
+ return {
3360
+ /**
3361
+ * This method allows adding a new Segment to the system.
3362
+ * @summary Method allows to create new segment.
3363
+ * @param {CreateSegmentRequest} [createSegmentRequest]
3364
+ * @param {*} [options] Override http request option.
3365
+ * @throws {RequiredError}
3366
+ */
3367
+ createSegment(createSegmentRequest, options) {
3368
+ return localVarFp.createSegment(createSegmentRequest, options).then((request) => request(axios, basePath));
3369
+ },
3370
+ /**
3371
+ * This method returns all information about a specific Segment.
3372
+ * @summary Method will return segment details.
3373
+ * @param {string} segmentId Segment ID
3374
+ * @param {*} [options] Override http request option.
3375
+ * @throws {RequiredError}
3376
+ */
3377
+ getSegmentById(segmentId, options) {
3378
+ return localVarFp.getSegmentById(segmentId, options).then((request) => request(axios, basePath));
3379
+ },
3380
+ /**
3381
+ * This method returns a list of all Segment in the system.
3382
+ * @summary Method returns segments list.
3383
+ * @param {string} [nextToken]
3384
+ * @param {string} [search] search string
3385
+ * @param {*} [options] Override http request option.
3386
+ * @throws {RequiredError}
3387
+ */
3388
+ listSegments(nextToken, search, options) {
3389
+ return localVarFp.listSegments(nextToken, search, options).then((request) => request(axios, basePath));
3390
+ },
3391
+ };
3392
+ };
3393
+ /**
3394
+ * SegmentApi - object-oriented interface
3395
+ * @export
3396
+ * @class SegmentApi
3397
+ * @extends {BaseAPI}
3398
+ */
3399
+ export class SegmentApi extends BaseAPI {
3400
+ /**
3401
+ * This method allows adding a new Segment to the system.
3402
+ * @summary Method allows to create new segment.
3403
+ * @param {CreateSegmentRequest} [createSegmentRequest]
3404
+ * @param {*} [options] Override http request option.
3405
+ * @throws {RequiredError}
3406
+ * @memberof SegmentApi
3407
+ */
3408
+ createSegment(createSegmentRequest, options) {
3409
+ return SegmentApiFp(this.configuration).createSegment(createSegmentRequest, options).then((request) => request(this.axios, this.basePath));
3410
+ }
3411
+ /**
3412
+ * This method returns all information about a specific Segment.
3413
+ * @summary Method will return segment details.
3414
+ * @param {string} segmentId Segment ID
3415
+ * @param {*} [options] Override http request option.
3416
+ * @throws {RequiredError}
3417
+ * @memberof SegmentApi
3418
+ */
3419
+ getSegmentById(segmentId, options) {
3420
+ return SegmentApiFp(this.configuration).getSegmentById(segmentId, options).then((request) => request(this.axios, this.basePath));
3421
+ }
3422
+ /**
3423
+ * This method returns a list of all Segment in the system.
3424
+ * @summary Method returns segments list.
3425
+ * @param {string} [nextToken]
3426
+ * @param {string} [search] search string
3427
+ * @param {*} [options] Override http request option.
3428
+ * @throws {RequiredError}
3429
+ * @memberof SegmentApi
3430
+ */
3431
+ listSegments(nextToken, search, options) {
3432
+ return SegmentApiFp(this.configuration).listSegments(nextToken, search, options).then((request) => request(this.axios, this.basePath));
3433
+ }
3434
+ }
3435
+ /**
3436
+ * TagApi - axios parameter creator
3437
+ * @export
3438
+ */
3439
+ export const TagApiAxiosParamCreator = function (configuration) {
3440
+ return {
3441
+ /**
3442
+ * This method allows adding a new tag to the system. Tag key must be unique.
3443
+ * @summary Method allows to create new tag.
3444
+ * @param {CreateTagRequest} [createTagRequest]
3445
+ * @param {*} [options] Override http request option.
3446
+ * @throws {RequiredError}
3447
+ */
3448
+ createTag: (createTagRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
3449
+ const localVarPath = `/tags`;
3450
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3451
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3452
+ let baseOptions;
3453
+ if (configuration) {
3454
+ baseOptions = configuration.baseOptions;
3455
+ }
3456
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3457
+ const localVarHeaderParameter = {};
3458
+ const localVarQueryParameter = {};
3459
+ // authentication jwt required
3460
+ // http bearer authentication required
3461
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3462
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3463
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3464
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3465
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3466
+ localVarRequestOptions.data = serializeDataIfNeeded(createTagRequest, localVarRequestOptions, configuration);
3467
+ return {
3468
+ url: toPathString(localVarUrlObj),
3469
+ options: localVarRequestOptions,
3470
+ };
3471
+ }),
3472
+ /**
3473
+ * This method allows deleting a tag from the system.
3474
+ * @summary Method allows to delete tag.
3475
+ * @param {string} key Tag key
3476
+ * @param {*} [options] Override http request option.
3477
+ * @throws {RequiredError}
3478
+ */
3479
+ deleteTag: (key, options = {}) => __awaiter(this, void 0, void 0, function* () {
3480
+ // verify required parameter 'key' is not null or undefined
3481
+ assertParamExists('deleteTag', 'key', key);
3482
+ const localVarPath = `/tags/{key}`
3483
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
3484
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3485
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3486
+ let baseOptions;
3487
+ if (configuration) {
3488
+ baseOptions = configuration.baseOptions;
3489
+ }
3490
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
3491
+ const localVarHeaderParameter = {};
3492
+ const localVarQueryParameter = {};
3493
+ // authentication jwt required
3494
+ // http bearer authentication required
3495
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3496
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3497
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3498
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3499
+ return {
3500
+ url: toPathString(localVarUrlObj),
3501
+ options: localVarRequestOptions,
3502
+ };
3503
+ }),
3504
+ /**
3505
+ * This method returns all information about a specific tag.
3506
+ * @summary Method will return tag details.
3507
+ * @param {string} key Tag key
3508
+ * @param {*} [options] Override http request option.
3509
+ * @throws {RequiredError}
3510
+ */
3511
+ getTagByKey: (key, options = {}) => __awaiter(this, void 0, void 0, function* () {
3512
+ // verify required parameter 'key' is not null or undefined
3513
+ assertParamExists('getTagByKey', 'key', key);
3514
+ const localVarPath = `/tags/{key}`
3515
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
3516
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3517
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3518
+ let baseOptions;
3519
+ if (configuration) {
3520
+ baseOptions = configuration.baseOptions;
3521
+ }
3522
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3523
+ const localVarHeaderParameter = {};
3524
+ const localVarQueryParameter = {};
3525
+ // authentication jwt required
3526
+ // http bearer authentication required
3527
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3528
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3529
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3530
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3531
+ return {
3532
+ url: toPathString(localVarUrlObj),
3533
+ options: localVarRequestOptions,
3534
+ };
3535
+ }),
3536
+ /**
3537
+ * This method returns a list of all tags in the system.
3538
+ * @summary Method returns tags list.
3539
+ * @param {string} [tagKey] Tag key
3540
+ * @param {*} [options] Override http request option.
3541
+ * @throws {RequiredError}
3542
+ */
3543
+ listTags: (tagKey, options = {}) => __awaiter(this, void 0, void 0, function* () {
3544
+ const localVarPath = `/tags`;
3545
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3546
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3547
+ let baseOptions;
3548
+ if (configuration) {
3549
+ baseOptions = configuration.baseOptions;
3550
+ }
3551
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3552
+ const localVarHeaderParameter = {};
3553
+ const localVarQueryParameter = {};
3554
+ // authentication jwt required
3555
+ // http bearer authentication required
3556
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3557
+ if (tagKey !== undefined) {
3558
+ localVarQueryParameter['tagKey'] = tagKey;
3559
+ }
3560
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3561
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3562
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3563
+ return {
3564
+ url: toPathString(localVarUrlObj),
3565
+ options: localVarRequestOptions,
3566
+ };
3567
+ }),
3568
+ /**
3569
+ * This method allows updating a tag in the system.
3570
+ * @summary Method allows to update tag.
3571
+ * @param {string} key Tag key
3572
+ * @param {CreateTagRequest} [createTagRequest]
3573
+ * @param {*} [options] Override http request option.
3574
+ * @throws {RequiredError}
3575
+ */
3576
+ updateTag: (key, createTagRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
3577
+ // verify required parameter 'key' is not null or undefined
3578
+ assertParamExists('updateTag', 'key', key);
3579
+ const localVarPath = `/tags/{key}`
3580
+ .replace(`{${"key"}}`, encodeURIComponent(String(key)));
3581
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3582
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3583
+ let baseOptions;
3584
+ if (configuration) {
3585
+ baseOptions = configuration.baseOptions;
3586
+ }
3587
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
3588
+ const localVarHeaderParameter = {};
3589
+ const localVarQueryParameter = {};
3590
+ // authentication jwt required
3591
+ // http bearer authentication required
3592
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3593
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3594
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3595
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3596
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3597
+ localVarRequestOptions.data = serializeDataIfNeeded(createTagRequest, localVarRequestOptions, configuration);
3598
+ return {
3599
+ url: toPathString(localVarUrlObj),
3600
+ options: localVarRequestOptions,
3601
+ };
3602
+ }),
3603
+ };
3604
+ };
3605
+ /**
3606
+ * TagApi - functional programming interface
3607
+ * @export
3608
+ */
3609
+ export const TagApiFp = function (configuration) {
3610
+ const localVarAxiosParamCreator = TagApiAxiosParamCreator(configuration);
3611
+ return {
3612
+ /**
3613
+ * This method allows adding a new tag to the system. Tag key must be unique.
3614
+ * @summary Method allows to create new tag.
3615
+ * @param {CreateTagRequest} [createTagRequest]
3616
+ * @param {*} [options] Override http request option.
3617
+ * @throws {RequiredError}
3618
+ */
3619
+ createTag(createTagRequest, options) {
3620
+ return __awaiter(this, void 0, void 0, function* () {
3621
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createTag(createTagRequest, options);
3622
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3623
+ });
3624
+ },
3625
+ /**
3626
+ * This method allows deleting a tag from the system.
3627
+ * @summary Method allows to delete tag.
3628
+ * @param {string} key Tag key
3629
+ * @param {*} [options] Override http request option.
3630
+ * @throws {RequiredError}
3631
+ */
3632
+ deleteTag(key, options) {
3633
+ return __awaiter(this, void 0, void 0, function* () {
3634
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteTag(key, options);
3635
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3636
+ });
3637
+ },
3638
+ /**
3639
+ * This method returns all information about a specific tag.
3640
+ * @summary Method will return tag details.
3641
+ * @param {string} key Tag key
3642
+ * @param {*} [options] Override http request option.
3643
+ * @throws {RequiredError}
3644
+ */
3645
+ getTagByKey(key, options) {
3646
+ return __awaiter(this, void 0, void 0, function* () {
3647
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getTagByKey(key, options);
3648
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3649
+ });
3650
+ },
3651
+ /**
3652
+ * This method returns a list of all tags in the system.
3653
+ * @summary Method returns tags list.
3654
+ * @param {string} [tagKey] Tag key
3655
+ * @param {*} [options] Override http request option.
3656
+ * @throws {RequiredError}
3657
+ */
3658
+ listTags(tagKey, options) {
3659
+ return __awaiter(this, void 0, void 0, function* () {
3660
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listTags(tagKey, options);
3661
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3662
+ });
3663
+ },
3664
+ /**
3665
+ * This method allows updating a tag in the system.
3666
+ * @summary Method allows to update tag.
3667
+ * @param {string} key Tag key
3668
+ * @param {CreateTagRequest} [createTagRequest]
3669
+ * @param {*} [options] Override http request option.
3670
+ * @throws {RequiredError}
3671
+ */
3672
+ updateTag(key, createTagRequest, options) {
3673
+ return __awaiter(this, void 0, void 0, function* () {
3674
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateTag(key, createTagRequest, options);
3675
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3676
+ });
3677
+ },
3678
+ };
3679
+ };
3680
+ /**
3681
+ * TagApi - factory interface
3682
+ * @export
3683
+ */
3684
+ export const TagApiFactory = function (configuration, basePath, axios) {
3685
+ const localVarFp = TagApiFp(configuration);
3686
+ return {
3687
+ /**
3688
+ * This method allows adding a new tag to the system. Tag key must be unique.
3689
+ * @summary Method allows to create new tag.
3690
+ * @param {CreateTagRequest} [createTagRequest]
3691
+ * @param {*} [options] Override http request option.
3692
+ * @throws {RequiredError}
3693
+ */
3694
+ createTag(createTagRequest, options) {
3695
+ return localVarFp.createTag(createTagRequest, options).then((request) => request(axios, basePath));
3696
+ },
3697
+ /**
3698
+ * This method allows deleting a tag from the system.
3699
+ * @summary Method allows to delete tag.
3700
+ * @param {string} key Tag key
3701
+ * @param {*} [options] Override http request option.
3702
+ * @throws {RequiredError}
3703
+ */
3704
+ deleteTag(key, options) {
3705
+ return localVarFp.deleteTag(key, options).then((request) => request(axios, basePath));
3706
+ },
3707
+ /**
3708
+ * This method returns all information about a specific tag.
3709
+ * @summary Method will return tag details.
3710
+ * @param {string} key Tag key
3711
+ * @param {*} [options] Override http request option.
3712
+ * @throws {RequiredError}
3713
+ */
3714
+ getTagByKey(key, options) {
3715
+ return localVarFp.getTagByKey(key, options).then((request) => request(axios, basePath));
3716
+ },
3717
+ /**
3718
+ * This method returns a list of all tags in the system.
3719
+ * @summary Method returns tags list.
3720
+ * @param {string} [tagKey] Tag key
3721
+ * @param {*} [options] Override http request option.
3722
+ * @throws {RequiredError}
3723
+ */
3724
+ listTags(tagKey, options) {
3725
+ return localVarFp.listTags(tagKey, options).then((request) => request(axios, basePath));
3726
+ },
3727
+ /**
3728
+ * This method allows updating a tag in the system.
3729
+ * @summary Method allows to update tag.
3730
+ * @param {string} key Tag key
3731
+ * @param {CreateTagRequest} [createTagRequest]
3732
+ * @param {*} [options] Override http request option.
3733
+ * @throws {RequiredError}
3734
+ */
3735
+ updateTag(key, createTagRequest, options) {
3736
+ return localVarFp.updateTag(key, createTagRequest, options).then((request) => request(axios, basePath));
3737
+ },
3738
+ };
3739
+ };
3740
+ /**
3741
+ * TagApi - object-oriented interface
3742
+ * @export
3743
+ * @class TagApi
3744
+ * @extends {BaseAPI}
3745
+ */
3746
+ export class TagApi extends BaseAPI {
3747
+ /**
3748
+ * This method allows adding a new tag to the system. Tag key must be unique.
3749
+ * @summary Method allows to create new tag.
3750
+ * @param {CreateTagRequest} [createTagRequest]
3751
+ * @param {*} [options] Override http request option.
3752
+ * @throws {RequiredError}
3753
+ * @memberof TagApi
3754
+ */
3755
+ createTag(createTagRequest, options) {
3756
+ return TagApiFp(this.configuration).createTag(createTagRequest, options).then((request) => request(this.axios, this.basePath));
3757
+ }
3758
+ /**
3759
+ * This method allows deleting a tag from the system.
3760
+ * @summary Method allows to delete tag.
3761
+ * @param {string} key Tag key
3762
+ * @param {*} [options] Override http request option.
3763
+ * @throws {RequiredError}
3764
+ * @memberof TagApi
3765
+ */
3766
+ deleteTag(key, options) {
3767
+ return TagApiFp(this.configuration).deleteTag(key, options).then((request) => request(this.axios, this.basePath));
3768
+ }
3769
+ /**
3770
+ * This method returns all information about a specific tag.
3771
+ * @summary Method will return tag details.
3772
+ * @param {string} key Tag key
3773
+ * @param {*} [options] Override http request option.
3774
+ * @throws {RequiredError}
3775
+ * @memberof TagApi
3776
+ */
3777
+ getTagByKey(key, options) {
3778
+ return TagApiFp(this.configuration).getTagByKey(key, options).then((request) => request(this.axios, this.basePath));
3779
+ }
3780
+ /**
3781
+ * This method returns a list of all tags in the system.
3782
+ * @summary Method returns tags list.
3783
+ * @param {string} [tagKey] Tag key
3784
+ * @param {*} [options] Override http request option.
3785
+ * @throws {RequiredError}
3786
+ * @memberof TagApi
3787
+ */
3788
+ listTags(tagKey, options) {
3789
+ return TagApiFp(this.configuration).listTags(tagKey, options).then((request) => request(this.axios, this.basePath));
3790
+ }
3791
+ /**
3792
+ * This method allows updating a tag in the system.
3793
+ * @summary Method allows to update tag.
3794
+ * @param {string} key Tag key
3795
+ * @param {CreateTagRequest} [createTagRequest]
3796
+ * @param {*} [options] Override http request option.
3797
+ * @throws {RequiredError}
3798
+ * @memberof TagApi
3799
+ */
3800
+ updateTag(key, createTagRequest, options) {
3801
+ return TagApiFp(this.configuration).updateTag(key, createTagRequest, options).then((request) => request(this.axios, this.basePath));
3802
+ }
3803
+ }
3804
+ /**
3805
+ * TransactionApi - axios parameter creator
3806
+ * @export
3807
+ */
3808
+ export const TransactionApiAxiosParamCreator = function (configuration) {
3809
+ return {
3810
+ /**
3811
+ * List existing transactions
3812
+ * @summary List existing transactions
3813
+ * @param {string} clientID This is the client ID
3814
+ * @param {string} [paginationToken] This is the pagination token
3815
+ * @param {*} [options] Override http request option.
3816
+ * @throws {RequiredError}
3817
+ */
3818
+ listTransactions: (clientID, paginationToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
3819
+ // verify required parameter 'clientID' is not null or undefined
3820
+ assertParamExists('listTransactions', 'clientID', clientID);
3821
+ const localVarPath = `/transactions`;
3822
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3823
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3824
+ let baseOptions;
3825
+ if (configuration) {
3826
+ baseOptions = configuration.baseOptions;
3827
+ }
3828
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3829
+ const localVarHeaderParameter = {};
3830
+ const localVarQueryParameter = {};
3831
+ // authentication jwt required
3832
+ // http bearer authentication required
3833
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3834
+ if (paginationToken !== undefined) {
3835
+ localVarQueryParameter['paginationToken'] = paginationToken;
3836
+ }
3837
+ if (clientID !== undefined) {
3838
+ localVarQueryParameter['clientID'] = clientID;
3839
+ }
3840
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3841
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3842
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3843
+ return {
3844
+ url: toPathString(localVarUrlObj),
3845
+ options: localVarRequestOptions,
3846
+ };
3847
+ }),
3848
+ };
3849
+ };
3850
+ /**
3851
+ * TransactionApi - functional programming interface
3852
+ * @export
3853
+ */
3854
+ export const TransactionApiFp = function (configuration) {
3855
+ const localVarAxiosParamCreator = TransactionApiAxiosParamCreator(configuration);
3856
+ return {
3857
+ /**
3858
+ * List existing transactions
3859
+ * @summary List existing transactions
3860
+ * @param {string} clientID This is the client ID
3861
+ * @param {string} [paginationToken] This is the pagination token
3862
+ * @param {*} [options] Override http request option.
3863
+ * @throws {RequiredError}
3864
+ */
3865
+ listTransactions(clientID, paginationToken, options) {
3866
+ return __awaiter(this, void 0, void 0, function* () {
3867
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(clientID, paginationToken, options);
3868
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3869
+ });
3870
+ },
3871
+ };
3872
+ };
3873
+ /**
3874
+ * TransactionApi - factory interface
3875
+ * @export
3876
+ */
3877
+ export const TransactionApiFactory = function (configuration, basePath, axios) {
3878
+ const localVarFp = TransactionApiFp(configuration);
3879
+ return {
3880
+ /**
3881
+ * List existing transactions
3882
+ * @summary List existing transactions
3883
+ * @param {string} clientID This is the client ID
3884
+ * @param {string} [paginationToken] This is the pagination token
3885
+ * @param {*} [options] Override http request option.
3886
+ * @throws {RequiredError}
3887
+ */
3888
+ listTransactions(clientID, paginationToken, options) {
3889
+ return localVarFp.listTransactions(clientID, paginationToken, options).then((request) => request(axios, basePath));
3890
+ },
3891
+ };
3892
+ };
3893
+ /**
3894
+ * TransactionApi - object-oriented interface
3895
+ * @export
3896
+ * @class TransactionApi
3897
+ * @extends {BaseAPI}
3898
+ */
3899
+ export class TransactionApi extends BaseAPI {
3900
+ /**
3901
+ * List existing transactions
3902
+ * @summary List existing transactions
3903
+ * @param {string} clientID This is the client ID
3904
+ * @param {string} [paginationToken] This is the pagination token
3905
+ * @param {*} [options] Override http request option.
3906
+ * @throws {RequiredError}
3907
+ * @memberof TransactionApi
3908
+ */
3909
+ listTransactions(clientID, paginationToken, options) {
3910
+ return TransactionApiFp(this.configuration).listTransactions(clientID, paginationToken, options).then((request) => request(this.axios, this.basePath));
3911
+ }
3912
+ }
3913
+ /**
3914
+ * UserApi - axios parameter creator
3915
+ * @export
3916
+ */
3917
+ export const UserApiAxiosParamCreator = function (configuration) {
3918
+ return {
3919
+ /**
3920
+ * Get user by id
3921
+ * @summary Get user
3922
+ * @param {string} id user id
3923
+ * @param {*} [options] Override http request option.
3924
+ * @throws {RequiredError}
3925
+ */
3926
+ getUserByID: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
3927
+ // verify required parameter 'id' is not null or undefined
3928
+ assertParamExists('getUserByID', 'id', id);
3929
+ const localVarPath = `/users/{id}`
3930
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3931
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3932
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3933
+ let baseOptions;
3934
+ if (configuration) {
3935
+ baseOptions = configuration.baseOptions;
3936
+ }
3937
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3938
+ const localVarHeaderParameter = {};
3939
+ const localVarQueryParameter = {};
3940
+ // authentication jwt required
3941
+ // http bearer authentication required
3942
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3943
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3944
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3945
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3946
+ return {
3947
+ url: toPathString(localVarUrlObj),
3948
+ options: localVarRequestOptions,
3949
+ };
3950
+ }),
3951
+ /**
3952
+ * List all users
3953
+ * @summary List users
3954
+ * @param {string} [nextToken] This is the pagination token
3955
+ * @param {UserRole} [role] role to filter by
3956
+ * @param {string} [search] search string
3957
+ * @param {string} [clientID] client ID to filter by
3958
+ * @param {string} [userIds] user ids to filter by, list of ids separated by commas.
3959
+ * @param {UserSource} [source] source to filter by
3960
+ * @param {*} [options] Override http request option.
3961
+ * @throws {RequiredError}
3962
+ */
3963
+ listUsers: (nextToken, role, search, clientID, userIds, source, options = {}) => __awaiter(this, void 0, void 0, function* () {
3964
+ const localVarPath = `/users`;
3965
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3966
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3967
+ let baseOptions;
3968
+ if (configuration) {
3969
+ baseOptions = configuration.baseOptions;
3970
+ }
3971
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3972
+ const localVarHeaderParameter = {};
3973
+ const localVarQueryParameter = {};
3974
+ // authentication jwt required
3975
+ // http bearer authentication required
3976
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3977
+ if (nextToken !== undefined) {
3978
+ localVarQueryParameter['nextToken'] = nextToken;
3979
+ }
3980
+ if (role !== undefined) {
3981
+ localVarQueryParameter['role'] = role;
3982
+ }
3983
+ if (search !== undefined) {
3984
+ localVarQueryParameter['search'] = search;
3985
+ }
3986
+ if (clientID !== undefined) {
3987
+ localVarQueryParameter['clientID'] = clientID;
3988
+ }
3989
+ if (userIds !== undefined) {
3990
+ localVarQueryParameter['userIds'] = userIds;
3991
+ }
3992
+ if (source !== undefined) {
3993
+ localVarQueryParameter['source'] = source;
3994
+ }
3995
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3996
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3997
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3998
+ return {
3999
+ url: toPathString(localVarUrlObj),
4000
+ options: localVarRequestOptions,
4001
+ };
4002
+ }),
4003
+ };
4004
+ };
4005
+ /**
4006
+ * UserApi - functional programming interface
4007
+ * @export
4008
+ */
4009
+ export const UserApiFp = function (configuration) {
4010
+ const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration);
4011
+ return {
4012
+ /**
4013
+ * Get user by id
4014
+ * @summary Get user
4015
+ * @param {string} id user id
4016
+ * @param {*} [options] Override http request option.
4017
+ * @throws {RequiredError}
4018
+ */
4019
+ getUserByID(id, options) {
4020
+ return __awaiter(this, void 0, void 0, function* () {
4021
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserByID(id, options);
4022
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4023
+ });
4024
+ },
4025
+ /**
4026
+ * List all users
4027
+ * @summary List users
4028
+ * @param {string} [nextToken] This is the pagination token
4029
+ * @param {UserRole} [role] role to filter by
4030
+ * @param {string} [search] search string
4031
+ * @param {string} [clientID] client ID to filter by
4032
+ * @param {string} [userIds] user ids to filter by, list of ids separated by commas.
4033
+ * @param {UserSource} [source] source to filter by
4034
+ * @param {*} [options] Override http request option.
4035
+ * @throws {RequiredError}
4036
+ */
4037
+ listUsers(nextToken, role, search, clientID, userIds, source, options) {
4038
+ return __awaiter(this, void 0, void 0, function* () {
4039
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listUsers(nextToken, role, search, clientID, userIds, source, options);
4040
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4041
+ });
4042
+ },
4043
+ };
4044
+ };
4045
+ /**
4046
+ * UserApi - factory interface
4047
+ * @export
4048
+ */
4049
+ export const UserApiFactory = function (configuration, basePath, axios) {
4050
+ const localVarFp = UserApiFp(configuration);
4051
+ return {
4052
+ /**
4053
+ * Get user by id
4054
+ * @summary Get user
4055
+ * @param {string} id user id
4056
+ * @param {*} [options] Override http request option.
4057
+ * @throws {RequiredError}
4058
+ */
4059
+ getUserByID(id, options) {
4060
+ return localVarFp.getUserByID(id, options).then((request) => request(axios, basePath));
4061
+ },
4062
+ /**
4063
+ * List all users
4064
+ * @summary List users
4065
+ * @param {string} [nextToken] This is the pagination token
4066
+ * @param {UserRole} [role] role to filter by
4067
+ * @param {string} [search] search string
4068
+ * @param {string} [clientID] client ID to filter by
4069
+ * @param {string} [userIds] user ids to filter by, list of ids separated by commas.
4070
+ * @param {UserSource} [source] source to filter by
4071
+ * @param {*} [options] Override http request option.
4072
+ * @throws {RequiredError}
4073
+ */
4074
+ listUsers(nextToken, role, search, clientID, userIds, source, options) {
4075
+ return localVarFp.listUsers(nextToken, role, search, clientID, userIds, source, options).then((request) => request(axios, basePath));
4076
+ },
4077
+ };
4078
+ };
4079
+ /**
4080
+ * UserApi - object-oriented interface
4081
+ * @export
4082
+ * @class UserApi
4083
+ * @extends {BaseAPI}
4084
+ */
4085
+ export class UserApi extends BaseAPI {
4086
+ /**
4087
+ * Get user by id
4088
+ * @summary Get user
4089
+ * @param {string} id user id
4090
+ * @param {*} [options] Override http request option.
4091
+ * @throws {RequiredError}
4092
+ * @memberof UserApi
4093
+ */
4094
+ getUserByID(id, options) {
4095
+ return UserApiFp(this.configuration).getUserByID(id, options).then((request) => request(this.axios, this.basePath));
4096
+ }
4097
+ /**
4098
+ * List all users
4099
+ * @summary List users
4100
+ * @param {string} [nextToken] This is the pagination token
4101
+ * @param {UserRole} [role] role to filter by
4102
+ * @param {string} [search] search string
4103
+ * @param {string} [clientID] client ID to filter by
4104
+ * @param {string} [userIds] user ids to filter by, list of ids separated by commas.
4105
+ * @param {UserSource} [source] source to filter by
4106
+ * @param {*} [options] Override http request option.
4107
+ * @throws {RequiredError}
4108
+ * @memberof UserApi
4109
+ */
4110
+ listUsers(nextToken, role, search, clientID, userIds, source, options) {
4111
+ return UserApiFp(this.configuration).listUsers(nextToken, role, search, clientID, userIds, source, options).then((request) => request(this.axios, this.basePath));
4112
+ }
4113
+ }