@emilgroup/commission-sdk 1.0.0-beta.3 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +16 -0
  2. package/README.md +2 -2
  3. package/api/commission-agreement-products-api.ts +665 -0
  4. package/api/commission-recipients-api.ts +638 -0
  5. package/api.ts +4 -0
  6. package/dist/api/commission-agreement-products-api.d.ts +375 -0
  7. package/dist/api/commission-agreement-products-api.js +632 -0
  8. package/dist/api/commission-recipients-api.d.ts +357 -0
  9. package/dist/api/commission-recipients-api.js +620 -0
  10. package/dist/api.d.ts +2 -0
  11. package/dist/api.js +2 -0
  12. package/dist/models/commission-agreement-product-class.d.ts +78 -0
  13. package/dist/models/commission-agreement-product-class.js +20 -0
  14. package/dist/models/commission-recipient-class.d.ts +90 -0
  15. package/dist/models/commission-recipient-class.js +20 -0
  16. package/dist/models/create-commission-agreement-product-request-dto.d.ts +30 -0
  17. package/dist/models/create-commission-agreement-product-request-dto.js +15 -0
  18. package/dist/models/create-commission-agreement-product-response-class.d.ts +25 -0
  19. package/dist/models/create-commission-agreement-product-response-class.js +15 -0
  20. package/dist/models/create-commission-recipient-request-dto.d.ts +36 -0
  21. package/dist/models/create-commission-recipient-request-dto.js +15 -0
  22. package/dist/models/create-commission-recipient-response-class.d.ts +25 -0
  23. package/dist/models/create-commission-recipient-response-class.js +15 -0
  24. package/dist/models/get-commission-agreement-product-response-class.d.ts +25 -0
  25. package/dist/models/get-commission-agreement-product-response-class.js +15 -0
  26. package/dist/models/get-commission-recipient-response-class.d.ts +25 -0
  27. package/dist/models/get-commission-recipient-response-class.js +15 -0
  28. package/dist/models/index.d.ts +14 -0
  29. package/dist/models/index.js +14 -0
  30. package/dist/models/list-commission-agreement-products-response-class.d.ts +43 -0
  31. package/dist/models/list-commission-agreement-products-response-class.js +15 -0
  32. package/dist/models/list-commission-recipients-response-class.d.ts +43 -0
  33. package/dist/models/list-commission-recipients-response-class.js +15 -0
  34. package/dist/models/update-commission-agreement-product-request-dto.d.ts +41 -0
  35. package/dist/models/update-commission-agreement-product-request-dto.js +20 -0
  36. package/dist/models/update-commission-agreement-product-response-class.d.ts +25 -0
  37. package/dist/models/update-commission-agreement-product-response-class.js +15 -0
  38. package/dist/models/update-commission-recipient-request-dto.d.ts +42 -0
  39. package/dist/models/update-commission-recipient-request-dto.js +15 -0
  40. package/dist/models/update-commission-recipient-response-class.d.ts +25 -0
  41. package/dist/models/update-commission-recipient-response-class.js +15 -0
  42. package/models/commission-agreement-product-class.ts +87 -0
  43. package/models/commission-recipient-class.ts +99 -0
  44. package/models/create-commission-agreement-product-request-dto.ts +36 -0
  45. package/models/create-commission-agreement-product-response-class.ts +31 -0
  46. package/models/create-commission-recipient-request-dto.ts +42 -0
  47. package/models/create-commission-recipient-response-class.ts +31 -0
  48. package/models/get-commission-agreement-product-response-class.ts +31 -0
  49. package/models/get-commission-recipient-response-class.ts +31 -0
  50. package/models/index.ts +14 -0
  51. package/models/list-commission-agreement-products-response-class.ts +49 -0
  52. package/models/list-commission-recipients-response-class.ts +49 -0
  53. package/models/update-commission-agreement-product-request-dto.ts +50 -0
  54. package/models/update-commission-agreement-product-response-class.ts +31 -0
  55. package/models/update-commission-recipient-request-dto.ts +48 -0
  56. package/models/update-commission-recipient-response-class.ts +31 -0
  57. package/package.json +1 -1
@@ -0,0 +1,632 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL CommissionService
6
+ * The EMIL CommissionService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.CommissionAgreementProductsApi = exports.CommissionAgreementProductsApiFactory = exports.CommissionAgreementProductsApiFp = exports.CommissionAgreementProductsApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * CommissionAgreementProductsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var CommissionAgreementProductsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create commission agreement product.
97
+ * @summary Create the commission agreement product
98
+ * @param {CreateCommissionAgreementProductRequestDto} createCommissionAgreementProductRequestDto
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createCommissionAgreementProduct: function (createCommissionAgreementProductRequestDto, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'createCommissionAgreementProductRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createCommissionAgreementProduct', 'createCommissionAgreementProductRequestDto', createCommissionAgreementProductRequestDto);
112
+ localVarPath = "/commissionservice/v1/agreement-products";
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCommissionAgreementProductRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * This will delete commission agreement product.
146
+ * @summary Delete the commission agreement product
147
+ * @param {string} code Unique identifier for the object.
148
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ deleteCommissionAgreementProduct: function (code, authorization, options) {
153
+ if (options === void 0) { options = {}; }
154
+ return __awaiter(_this, void 0, void 0, function () {
155
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
+ return __generator(this, function (_a) {
157
+ switch (_a.label) {
158
+ case 0:
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('deleteCommissionAgreementProduct', 'code', code);
161
+ localVarPath = "/commissionservice/v1/agreement-products/{code}"
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
163
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
169
+ localVarHeaderParameter = {};
170
+ localVarQueryParameter = {};
171
+ // authentication bearer required
172
+ // http bearer authentication required
173
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
174
+ case 1:
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ _a.sent();
178
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ }
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ return [2 /*return*/, {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ }];
188
+ }
189
+ });
190
+ });
191
+ },
192
+ /**
193
+ * This will get commission agreement product.
194
+ * @summary Retrieve the commission agreement product
195
+ * @param {string} code
196
+ * @param {string} expand
197
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ getCommissionAgreementProduct: function (code, expand, authorization, options) {
202
+ if (options === void 0) { options = {}; }
203
+ return __awaiter(_this, void 0, void 0, function () {
204
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
205
+ return __generator(this, function (_a) {
206
+ switch (_a.label) {
207
+ case 0:
208
+ // verify required parameter 'code' is not null or undefined
209
+ (0, common_1.assertParamExists)('getCommissionAgreementProduct', 'code', code);
210
+ // verify required parameter 'expand' is not null or undefined
211
+ (0, common_1.assertParamExists)('getCommissionAgreementProduct', 'expand', expand);
212
+ localVarPath = "/commissionservice/v1/agreement-products/{code}"
213
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
214
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
215
+ if (configuration) {
216
+ baseOptions = configuration.baseOptions;
217
+ baseAccessToken = configuration.accessToken;
218
+ }
219
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
220
+ localVarHeaderParameter = {};
221
+ localVarQueryParameter = {};
222
+ // authentication bearer required
223
+ // http bearer authentication required
224
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
225
+ case 1:
226
+ // authentication bearer required
227
+ // http bearer authentication required
228
+ _a.sent();
229
+ if (expand !== undefined) {
230
+ localVarQueryParameter['expand'] = expand;
231
+ }
232
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
233
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
234
+ }
235
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
236
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
238
+ return [2 /*return*/, {
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ }];
242
+ }
243
+ });
244
+ });
245
+ },
246
+ /**
247
+ * Retrieves a list of commission agreement products.
248
+ * @summary List commission agreement products
249
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
250
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, productSlug, status, createdAt&lt;/i&gt;
251
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, productSlug, status, createdAt&lt;/i&gt;
252
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, productSlug&lt;/i&gt;
253
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt, productSlug, status&lt;/i&gt;
254
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version&lt;i&gt;
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ */
258
+ listCommissionAgreementProducts: function (authorization, filter, filters, search, order, expand, options) {
259
+ if (options === void 0) { options = {}; }
260
+ return __awaiter(_this, void 0, void 0, function () {
261
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
262
+ return __generator(this, function (_a) {
263
+ switch (_a.label) {
264
+ case 0:
265
+ localVarPath = "/commissionservice/v1/agreement-products";
266
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
267
+ if (configuration) {
268
+ baseOptions = configuration.baseOptions;
269
+ baseAccessToken = configuration.accessToken;
270
+ }
271
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
272
+ localVarHeaderParameter = {};
273
+ localVarQueryParameter = {};
274
+ // authentication bearer required
275
+ // http bearer authentication required
276
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
277
+ case 1:
278
+ // authentication bearer required
279
+ // http bearer authentication required
280
+ _a.sent();
281
+ if (filter !== undefined) {
282
+ localVarQueryParameter['filter'] = filter;
283
+ }
284
+ if (filters !== undefined) {
285
+ localVarQueryParameter['filters'] = filters;
286
+ }
287
+ if (search !== undefined) {
288
+ localVarQueryParameter['search'] = search;
289
+ }
290
+ if (order !== undefined) {
291
+ localVarQueryParameter['order'] = order;
292
+ }
293
+ if (expand !== undefined) {
294
+ localVarQueryParameter['expand'] = expand;
295
+ }
296
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
297
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
298
+ }
299
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
300
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
301
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
302
+ return [2 /*return*/, {
303
+ url: (0, common_1.toPathString)(localVarUrlObj),
304
+ options: localVarRequestOptions,
305
+ }];
306
+ }
307
+ });
308
+ });
309
+ },
310
+ /**
311
+ * This will update commission agreement product.
312
+ * @summary Update the commission agreement product
313
+ * @param {string} code Unique identifier for the object.
314
+ * @param {UpdateCommissionAgreementProductRequestDto} updateCommissionAgreementProductRequestDto
315
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ updateCommissionAgreementProduct: function (code, updateCommissionAgreementProductRequestDto, authorization, options) {
320
+ if (options === void 0) { options = {}; }
321
+ return __awaiter(_this, void 0, void 0, function () {
322
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
323
+ return __generator(this, function (_a) {
324
+ switch (_a.label) {
325
+ case 0:
326
+ // verify required parameter 'code' is not null or undefined
327
+ (0, common_1.assertParamExists)('updateCommissionAgreementProduct', 'code', code);
328
+ // verify required parameter 'updateCommissionAgreementProductRequestDto' is not null or undefined
329
+ (0, common_1.assertParamExists)('updateCommissionAgreementProduct', 'updateCommissionAgreementProductRequestDto', updateCommissionAgreementProductRequestDto);
330
+ localVarPath = "/commissionservice/v1/agreement-products/{code}"
331
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
332
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
333
+ if (configuration) {
334
+ baseOptions = configuration.baseOptions;
335
+ baseAccessToken = configuration.accessToken;
336
+ }
337
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
338
+ localVarHeaderParameter = {};
339
+ localVarQueryParameter = {};
340
+ // authentication bearer required
341
+ // http bearer authentication required
342
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
343
+ case 1:
344
+ // authentication bearer required
345
+ // http bearer authentication required
346
+ _a.sent();
347
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
348
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
349
+ }
350
+ localVarHeaderParameter['Content-Type'] = 'application/json';
351
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
352
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
353
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
354
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCommissionAgreementProductRequestDto, localVarRequestOptions, configuration);
355
+ return [2 /*return*/, {
356
+ url: (0, common_1.toPathString)(localVarUrlObj),
357
+ options: localVarRequestOptions,
358
+ }];
359
+ }
360
+ });
361
+ });
362
+ },
363
+ };
364
+ };
365
+ exports.CommissionAgreementProductsApiAxiosParamCreator = CommissionAgreementProductsApiAxiosParamCreator;
366
+ /**
367
+ * CommissionAgreementProductsApi - functional programming interface
368
+ * @export
369
+ */
370
+ var CommissionAgreementProductsApiFp = function (configuration) {
371
+ var localVarAxiosParamCreator = (0, exports.CommissionAgreementProductsApiAxiosParamCreator)(configuration);
372
+ return {
373
+ /**
374
+ * This will create commission agreement product.
375
+ * @summary Create the commission agreement product
376
+ * @param {CreateCommissionAgreementProductRequestDto} createCommissionAgreementProductRequestDto
377
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ */
381
+ createCommissionAgreementProduct: function (createCommissionAgreementProductRequestDto, authorization, options) {
382
+ return __awaiter(this, void 0, void 0, function () {
383
+ var localVarAxiosArgs;
384
+ return __generator(this, function (_a) {
385
+ switch (_a.label) {
386
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCommissionAgreementProduct(createCommissionAgreementProductRequestDto, authorization, options)];
387
+ case 1:
388
+ localVarAxiosArgs = _a.sent();
389
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
390
+ }
391
+ });
392
+ });
393
+ },
394
+ /**
395
+ * This will delete commission agreement product.
396
+ * @summary Delete the commission agreement product
397
+ * @param {string} code Unique identifier for the object.
398
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
399
+ * @param {*} [options] Override http request option.
400
+ * @throws {RequiredError}
401
+ */
402
+ deleteCommissionAgreementProduct: function (code, authorization, options) {
403
+ return __awaiter(this, void 0, void 0, function () {
404
+ var localVarAxiosArgs;
405
+ return __generator(this, function (_a) {
406
+ switch (_a.label) {
407
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteCommissionAgreementProduct(code, authorization, options)];
408
+ case 1:
409
+ localVarAxiosArgs = _a.sent();
410
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
411
+ }
412
+ });
413
+ });
414
+ },
415
+ /**
416
+ * This will get commission agreement product.
417
+ * @summary Retrieve the commission agreement product
418
+ * @param {string} code
419
+ * @param {string} expand
420
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ getCommissionAgreementProduct: function (code, expand, authorization, options) {
425
+ return __awaiter(this, void 0, void 0, function () {
426
+ var localVarAxiosArgs;
427
+ return __generator(this, function (_a) {
428
+ switch (_a.label) {
429
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCommissionAgreementProduct(code, expand, authorization, options)];
430
+ case 1:
431
+ localVarAxiosArgs = _a.sent();
432
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
433
+ }
434
+ });
435
+ });
436
+ },
437
+ /**
438
+ * Retrieves a list of commission agreement products.
439
+ * @summary List commission agreement products
440
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
441
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, productSlug, status, createdAt&lt;/i&gt;
442
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, productSlug, status, createdAt&lt;/i&gt;
443
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, productSlug&lt;/i&gt;
444
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt, productSlug, status&lt;/i&gt;
445
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version&lt;i&gt;
446
+ * @param {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ listCommissionAgreementProducts: function (authorization, filter, filters, search, order, expand, options) {
450
+ return __awaiter(this, void 0, void 0, function () {
451
+ var localVarAxiosArgs;
452
+ return __generator(this, function (_a) {
453
+ switch (_a.label) {
454
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCommissionAgreementProducts(authorization, filter, filters, search, order, expand, options)];
455
+ case 1:
456
+ localVarAxiosArgs = _a.sent();
457
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
458
+ }
459
+ });
460
+ });
461
+ },
462
+ /**
463
+ * This will update commission agreement product.
464
+ * @summary Update the commission agreement product
465
+ * @param {string} code Unique identifier for the object.
466
+ * @param {UpdateCommissionAgreementProductRequestDto} updateCommissionAgreementProductRequestDto
467
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ */
471
+ updateCommissionAgreementProduct: function (code, updateCommissionAgreementProductRequestDto, authorization, options) {
472
+ return __awaiter(this, void 0, void 0, function () {
473
+ var localVarAxiosArgs;
474
+ return __generator(this, function (_a) {
475
+ switch (_a.label) {
476
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCommissionAgreementProduct(code, updateCommissionAgreementProductRequestDto, authorization, options)];
477
+ case 1:
478
+ localVarAxiosArgs = _a.sent();
479
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
480
+ }
481
+ });
482
+ });
483
+ },
484
+ };
485
+ };
486
+ exports.CommissionAgreementProductsApiFp = CommissionAgreementProductsApiFp;
487
+ /**
488
+ * CommissionAgreementProductsApi - factory interface
489
+ * @export
490
+ */
491
+ var CommissionAgreementProductsApiFactory = function (configuration, basePath, axios) {
492
+ var localVarFp = (0, exports.CommissionAgreementProductsApiFp)(configuration);
493
+ return {
494
+ /**
495
+ * This will create commission agreement product.
496
+ * @summary Create the commission agreement product
497
+ * @param {CreateCommissionAgreementProductRequestDto} createCommissionAgreementProductRequestDto
498
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ createCommissionAgreementProduct: function (createCommissionAgreementProductRequestDto, authorization, options) {
503
+ return localVarFp.createCommissionAgreementProduct(createCommissionAgreementProductRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
504
+ },
505
+ /**
506
+ * This will delete commission agreement product.
507
+ * @summary Delete the commission agreement product
508
+ * @param {string} code Unique identifier for the object.
509
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
510
+ * @param {*} [options] Override http request option.
511
+ * @throws {RequiredError}
512
+ */
513
+ deleteCommissionAgreementProduct: function (code, authorization, options) {
514
+ return localVarFp.deleteCommissionAgreementProduct(code, authorization, options).then(function (request) { return request(axios, basePath); });
515
+ },
516
+ /**
517
+ * This will get commission agreement product.
518
+ * @summary Retrieve the commission agreement product
519
+ * @param {string} code
520
+ * @param {string} expand
521
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ getCommissionAgreementProduct: function (code, expand, authorization, options) {
526
+ return localVarFp.getCommissionAgreementProduct(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
527
+ },
528
+ /**
529
+ * Retrieves a list of commission agreement products.
530
+ * @summary List commission agreement products
531
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
532
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, productSlug, status, createdAt&lt;/i&gt;
533
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, productSlug, status, createdAt&lt;/i&gt;
534
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, productSlug&lt;/i&gt;
535
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt, productSlug, status&lt;/i&gt;
536
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version&lt;i&gt;
537
+ * @param {*} [options] Override http request option.
538
+ * @throws {RequiredError}
539
+ */
540
+ listCommissionAgreementProducts: function (authorization, filter, filters, search, order, expand, options) {
541
+ return localVarFp.listCommissionAgreementProducts(authorization, filter, filters, search, order, expand, options).then(function (request) { return request(axios, basePath); });
542
+ },
543
+ /**
544
+ * This will update commission agreement product.
545
+ * @summary Update the commission agreement product
546
+ * @param {string} code Unique identifier for the object.
547
+ * @param {UpdateCommissionAgreementProductRequestDto} updateCommissionAgreementProductRequestDto
548
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
549
+ * @param {*} [options] Override http request option.
550
+ * @throws {RequiredError}
551
+ */
552
+ updateCommissionAgreementProduct: function (code, updateCommissionAgreementProductRequestDto, authorization, options) {
553
+ return localVarFp.updateCommissionAgreementProduct(code, updateCommissionAgreementProductRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
554
+ },
555
+ };
556
+ };
557
+ exports.CommissionAgreementProductsApiFactory = CommissionAgreementProductsApiFactory;
558
+ /**
559
+ * CommissionAgreementProductsApi - object-oriented interface
560
+ * @export
561
+ * @class CommissionAgreementProductsApi
562
+ * @extends {BaseAPI}
563
+ */
564
+ var CommissionAgreementProductsApi = /** @class */ (function (_super) {
565
+ __extends(CommissionAgreementProductsApi, _super);
566
+ function CommissionAgreementProductsApi() {
567
+ return _super !== null && _super.apply(this, arguments) || this;
568
+ }
569
+ /**
570
+ * This will create commission agreement product.
571
+ * @summary Create the commission agreement product
572
+ * @param {CommissionAgreementProductsApiCreateCommissionAgreementProductRequest} requestParameters Request parameters.
573
+ * @param {*} [options] Override http request option.
574
+ * @throws {RequiredError}
575
+ * @memberof CommissionAgreementProductsApi
576
+ */
577
+ CommissionAgreementProductsApi.prototype.createCommissionAgreementProduct = function (requestParameters, options) {
578
+ var _this = this;
579
+ return (0, exports.CommissionAgreementProductsApiFp)(this.configuration).createCommissionAgreementProduct(requestParameters.createCommissionAgreementProductRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
580
+ };
581
+ /**
582
+ * This will delete commission agreement product.
583
+ * @summary Delete the commission agreement product
584
+ * @param {CommissionAgreementProductsApiDeleteCommissionAgreementProductRequest} requestParameters Request parameters.
585
+ * @param {*} [options] Override http request option.
586
+ * @throws {RequiredError}
587
+ * @memberof CommissionAgreementProductsApi
588
+ */
589
+ CommissionAgreementProductsApi.prototype.deleteCommissionAgreementProduct = function (requestParameters, options) {
590
+ var _this = this;
591
+ return (0, exports.CommissionAgreementProductsApiFp)(this.configuration).deleteCommissionAgreementProduct(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
592
+ };
593
+ /**
594
+ * This will get commission agreement product.
595
+ * @summary Retrieve the commission agreement product
596
+ * @param {CommissionAgreementProductsApiGetCommissionAgreementProductRequest} requestParameters Request parameters.
597
+ * @param {*} [options] Override http request option.
598
+ * @throws {RequiredError}
599
+ * @memberof CommissionAgreementProductsApi
600
+ */
601
+ CommissionAgreementProductsApi.prototype.getCommissionAgreementProduct = function (requestParameters, options) {
602
+ var _this = this;
603
+ return (0, exports.CommissionAgreementProductsApiFp)(this.configuration).getCommissionAgreementProduct(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
604
+ };
605
+ /**
606
+ * Retrieves a list of commission agreement products.
607
+ * @summary List commission agreement products
608
+ * @param {CommissionAgreementProductsApiListCommissionAgreementProductsRequest} requestParameters Request parameters.
609
+ * @param {*} [options] Override http request option.
610
+ * @throws {RequiredError}
611
+ * @memberof CommissionAgreementProductsApi
612
+ */
613
+ CommissionAgreementProductsApi.prototype.listCommissionAgreementProducts = function (requestParameters, options) {
614
+ var _this = this;
615
+ if (requestParameters === void 0) { requestParameters = {}; }
616
+ return (0, exports.CommissionAgreementProductsApiFp)(this.configuration).listCommissionAgreementProducts(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
617
+ };
618
+ /**
619
+ * This will update commission agreement product.
620
+ * @summary Update the commission agreement product
621
+ * @param {CommissionAgreementProductsApiUpdateCommissionAgreementProductRequest} requestParameters Request parameters.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ * @memberof CommissionAgreementProductsApi
625
+ */
626
+ CommissionAgreementProductsApi.prototype.updateCommissionAgreementProduct = function (requestParameters, options) {
627
+ var _this = this;
628
+ return (0, exports.CommissionAgreementProductsApiFp)(this.configuration).updateCommissionAgreementProduct(requestParameters.code, requestParameters.updateCommissionAgreementProductRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
629
+ };
630
+ return CommissionAgreementProductsApi;
631
+ }(base_1.BaseAPI));
632
+ exports.CommissionAgreementProductsApi = CommissionAgreementProductsApi;