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