@emilgroup/commission-sdk 1.0.0-beta.21 → 1.0.0-beta.22

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 (39) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +2 -2
  3. package/api/commission-settlements-api.ts +800 -0
  4. package/api.ts +2 -0
  5. package/dist/api/commission-settlements-api.d.ts +450 -0
  6. package/dist/api/commission-settlements-api.js +737 -0
  7. package/dist/api.d.ts +1 -0
  8. package/dist/api.js +1 -0
  9. package/dist/models/commission-settlement-class.d.ts +123 -0
  10. package/dist/models/commission-settlement-class.js +34 -0
  11. package/dist/models/create-commission-settlement-request-dto.d.ts +36 -0
  12. package/dist/models/create-commission-settlement-request-dto.js +21 -0
  13. package/dist/models/create-commission-settlement-response-class.d.ts +25 -0
  14. package/dist/models/create-commission-settlement-response-class.js +15 -0
  15. package/dist/models/get-commission-settlement-response-class.d.ts +25 -0
  16. package/dist/models/get-commission-settlement-response-class.js +15 -0
  17. package/dist/models/index.d.ts +9 -0
  18. package/dist/models/index.js +9 -0
  19. package/dist/models/list-commission-settlements-response-class.d.ts +43 -0
  20. package/dist/models/list-commission-settlements-response-class.js +15 -0
  21. package/dist/models/publish-commission-settlements-request-dto.d.ts +24 -0
  22. package/dist/models/publish-commission-settlements-request-dto.js +15 -0
  23. package/dist/models/publish-commission-settlements-response-class.d.ts +25 -0
  24. package/dist/models/publish-commission-settlements-response-class.js +15 -0
  25. package/dist/models/update-commission-settlement-request-dto.d.ts +42 -0
  26. package/dist/models/update-commission-settlement-request-dto.js +21 -0
  27. package/dist/models/update-commission-settlement-response-class.d.ts +25 -0
  28. package/dist/models/update-commission-settlement-response-class.js +15 -0
  29. package/models/commission-settlement-class.ts +133 -0
  30. package/models/create-commission-settlement-request-dto.ts +45 -0
  31. package/models/create-commission-settlement-response-class.ts +31 -0
  32. package/models/get-commission-settlement-response-class.ts +31 -0
  33. package/models/index.ts +9 -0
  34. package/models/list-commission-settlements-response-class.ts +49 -0
  35. package/models/publish-commission-settlements-request-dto.ts +30 -0
  36. package/models/publish-commission-settlements-response-class.ts +31 -0
  37. package/models/update-commission-settlement-request-dto.ts +51 -0
  38. package/models/update-commission-settlement-response-class.ts +31 -0
  39. package/package.json +1 -1
@@ -0,0 +1,737 @@
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.CommissionSettlementsApi = exports.CommissionSettlementsApiFactory = exports.CommissionSettlementsApiFp = exports.CommissionSettlementsApiAxiosParamCreator = 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
+ * CommissionSettlementsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var CommissionSettlementsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create commission settlement.
97
+ * @summary Create the commission settlement
98
+ * @param {CreateCommissionSettlementRequestDto} createCommissionSettlementRequestDto
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
+ createCommissionSettlement: function (createCommissionSettlementRequestDto, 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 'createCommissionSettlementRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createCommissionSettlement', 'createCommissionSettlementRequestDto', createCommissionSettlementRequestDto);
112
+ localVarPath = "/commissionservice/v1/commission-settlements";
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)(createCommissionSettlementRequestDto, 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 settlement.
146
+ * @summary Delete the commission settlement
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
+ deleteCommissionSettlement: 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)('deleteCommissionSettlement', 'code', code);
161
+ localVarPath = "/commissionservice/v1/commission-settlements/{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 settlement.
194
+ * @summary Retrieve the commission settlement
195
+ * @param {string} code Unique identifier for the object.
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
+ getCommissionSettlement: 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)('getCommissionSettlement', 'code', code);
210
+ // verify required parameter 'expand' is not null or undefined
211
+ (0, common_1.assertParamExists)('getCommissionSettlement', 'expand', expand);
212
+ localVarPath = "/commissionservice/v1/commission-settlements/{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 settlements.
248
+ * @summary List commission settlements
249
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
250
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
251
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
252
+ * @param {'id' | 'code' | 'settlementNumber' | 'status' | 'amount' | 'policyCount' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
253
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
254
+ * @param {'code' | 'settlementNumber' | 'status' | 'amount' | 'policyCount' | 'createdAt' | 'updatedAt'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
255
+ * @param {'commissions'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
256
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ */
260
+ listCommissionSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
261
+ if (options === void 0) { options = {}; }
262
+ return __awaiter(_this, void 0, void 0, function () {
263
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
264
+ return __generator(this, function (_a) {
265
+ switch (_a.label) {
266
+ case 0:
267
+ localVarPath = "/commissionservice/v1/commission-settlements";
268
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
269
+ if (configuration) {
270
+ baseOptions = configuration.baseOptions;
271
+ baseAccessToken = configuration.accessToken;
272
+ }
273
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
274
+ localVarHeaderParameter = {};
275
+ localVarQueryParameter = {};
276
+ // authentication bearer required
277
+ // http bearer authentication required
278
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
279
+ case 1:
280
+ // authentication bearer required
281
+ // http bearer authentication required
282
+ _a.sent();
283
+ if (pageSize !== undefined) {
284
+ localVarQueryParameter['pageSize'] = pageSize;
285
+ }
286
+ if (pageToken !== undefined) {
287
+ localVarQueryParameter['pageToken'] = pageToken;
288
+ }
289
+ if (filter !== undefined) {
290
+ localVarQueryParameter['filter'] = filter;
291
+ }
292
+ if (search !== undefined) {
293
+ localVarQueryParameter['search'] = search;
294
+ }
295
+ if (order !== undefined) {
296
+ localVarQueryParameter['order'] = order;
297
+ }
298
+ if (expand !== undefined) {
299
+ localVarQueryParameter['expand'] = expand;
300
+ }
301
+ if (filters !== undefined) {
302
+ localVarQueryParameter['filters'] = filters;
303
+ }
304
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
305
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
306
+ }
307
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
308
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
309
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
310
+ return [2 /*return*/, {
311
+ url: (0, common_1.toPathString)(localVarUrlObj),
312
+ options: localVarRequestOptions,
313
+ }];
314
+ }
315
+ });
316
+ });
317
+ },
318
+ /**
319
+ * This will publish multiple commission settlements.
320
+ * @summary Create the commission settlement publish
321
+ * @param {PublishCommissionSettlementsRequestDto} publishCommissionSettlementsRequestDto
322
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ publishCommissionSettlements: function (publishCommissionSettlementsRequestDto, authorization, options) {
327
+ if (options === void 0) { options = {}; }
328
+ return __awaiter(_this, void 0, void 0, function () {
329
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
330
+ return __generator(this, function (_a) {
331
+ switch (_a.label) {
332
+ case 0:
333
+ // verify required parameter 'publishCommissionSettlementsRequestDto' is not null or undefined
334
+ (0, common_1.assertParamExists)('publishCommissionSettlements', 'publishCommissionSettlementsRequestDto', publishCommissionSettlementsRequestDto);
335
+ localVarPath = "/commissionservice/v1/commission-settlements/publish";
336
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
337
+ if (configuration) {
338
+ baseOptions = configuration.baseOptions;
339
+ baseAccessToken = configuration.accessToken;
340
+ }
341
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
342
+ localVarHeaderParameter = {};
343
+ localVarQueryParameter = {};
344
+ // authentication bearer required
345
+ // http bearer authentication required
346
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
347
+ case 1:
348
+ // authentication bearer required
349
+ // http bearer authentication required
350
+ _a.sent();
351
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
352
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
353
+ }
354
+ localVarHeaderParameter['Content-Type'] = 'application/json';
355
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
356
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
357
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
358
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(publishCommissionSettlementsRequestDto, localVarRequestOptions, configuration);
359
+ return [2 /*return*/, {
360
+ url: (0, common_1.toPathString)(localVarUrlObj),
361
+ options: localVarRequestOptions,
362
+ }];
363
+ }
364
+ });
365
+ });
366
+ },
367
+ /**
368
+ * This will update commission settlement.
369
+ * @summary Update the commission settlement
370
+ * @param {string} code
371
+ * @param {UpdateCommissionSettlementRequestDto} updateCommissionSettlementRequestDto
372
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ */
376
+ updateCommissionSettlement: function (code, updateCommissionSettlementRequestDto, authorization, options) {
377
+ if (options === void 0) { options = {}; }
378
+ return __awaiter(_this, void 0, void 0, function () {
379
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
380
+ return __generator(this, function (_a) {
381
+ switch (_a.label) {
382
+ case 0:
383
+ // verify required parameter 'code' is not null or undefined
384
+ (0, common_1.assertParamExists)('updateCommissionSettlement', 'code', code);
385
+ // verify required parameter 'updateCommissionSettlementRequestDto' is not null or undefined
386
+ (0, common_1.assertParamExists)('updateCommissionSettlement', 'updateCommissionSettlementRequestDto', updateCommissionSettlementRequestDto);
387
+ localVarPath = "/commissionservice/v1/commission-settlements/{code}"
388
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
389
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
390
+ if (configuration) {
391
+ baseOptions = configuration.baseOptions;
392
+ baseAccessToken = configuration.accessToken;
393
+ }
394
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
395
+ localVarHeaderParameter = {};
396
+ localVarQueryParameter = {};
397
+ // authentication bearer required
398
+ // http bearer authentication required
399
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
400
+ case 1:
401
+ // authentication bearer required
402
+ // http bearer authentication required
403
+ _a.sent();
404
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
405
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
406
+ }
407
+ localVarHeaderParameter['Content-Type'] = 'application/json';
408
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
409
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
410
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
411
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCommissionSettlementRequestDto, localVarRequestOptions, configuration);
412
+ return [2 /*return*/, {
413
+ url: (0, common_1.toPathString)(localVarUrlObj),
414
+ options: localVarRequestOptions,
415
+ }];
416
+ }
417
+ });
418
+ });
419
+ },
420
+ };
421
+ };
422
+ exports.CommissionSettlementsApiAxiosParamCreator = CommissionSettlementsApiAxiosParamCreator;
423
+ /**
424
+ * CommissionSettlementsApi - functional programming interface
425
+ * @export
426
+ */
427
+ var CommissionSettlementsApiFp = function (configuration) {
428
+ var localVarAxiosParamCreator = (0, exports.CommissionSettlementsApiAxiosParamCreator)(configuration);
429
+ return {
430
+ /**
431
+ * This will create commission settlement.
432
+ * @summary Create the commission settlement
433
+ * @param {CreateCommissionSettlementRequestDto} createCommissionSettlementRequestDto
434
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ */
438
+ createCommissionSettlement: function (createCommissionSettlementRequestDto, authorization, options) {
439
+ return __awaiter(this, void 0, void 0, function () {
440
+ var localVarAxiosArgs;
441
+ return __generator(this, function (_a) {
442
+ switch (_a.label) {
443
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCommissionSettlement(createCommissionSettlementRequestDto, authorization, options)];
444
+ case 1:
445
+ localVarAxiosArgs = _a.sent();
446
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
447
+ }
448
+ });
449
+ });
450
+ },
451
+ /**
452
+ * This will delete commission settlement.
453
+ * @summary Delete the commission settlement
454
+ * @param {string} code Unique identifier for the object.
455
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ deleteCommissionSettlement: function (code, authorization, options) {
460
+ return __awaiter(this, void 0, void 0, function () {
461
+ var localVarAxiosArgs;
462
+ return __generator(this, function (_a) {
463
+ switch (_a.label) {
464
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteCommissionSettlement(code, authorization, options)];
465
+ case 1:
466
+ localVarAxiosArgs = _a.sent();
467
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
468
+ }
469
+ });
470
+ });
471
+ },
472
+ /**
473
+ * This will get commission settlement.
474
+ * @summary Retrieve the commission settlement
475
+ * @param {string} code Unique identifier for the object.
476
+ * @param {string} expand
477
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ getCommissionSettlement: function (code, expand, authorization, options) {
482
+ return __awaiter(this, void 0, void 0, function () {
483
+ var localVarAxiosArgs;
484
+ return __generator(this, function (_a) {
485
+ switch (_a.label) {
486
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCommissionSettlement(code, expand, authorization, options)];
487
+ case 1:
488
+ localVarAxiosArgs = _a.sent();
489
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
490
+ }
491
+ });
492
+ });
493
+ },
494
+ /**
495
+ * Retrieves a list of commission settlements.
496
+ * @summary List commission settlements
497
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
498
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
499
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
500
+ * @param {'id' | 'code' | 'settlementNumber' | 'status' | 'amount' | 'policyCount' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
501
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
502
+ * @param {'code' | 'settlementNumber' | 'status' | 'amount' | 'policyCount' | 'createdAt' | 'updatedAt'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
503
+ * @param {'commissions'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
504
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ listCommissionSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
509
+ return __awaiter(this, void 0, void 0, function () {
510
+ var localVarAxiosArgs;
511
+ return __generator(this, function (_a) {
512
+ switch (_a.label) {
513
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCommissionSettlements(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
514
+ case 1:
515
+ localVarAxiosArgs = _a.sent();
516
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
517
+ }
518
+ });
519
+ });
520
+ },
521
+ /**
522
+ * This will publish multiple commission settlements.
523
+ * @summary Create the commission settlement publish
524
+ * @param {PublishCommissionSettlementsRequestDto} publishCommissionSettlementsRequestDto
525
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ publishCommissionSettlements: function (publishCommissionSettlementsRequestDto, authorization, options) {
530
+ return __awaiter(this, void 0, void 0, function () {
531
+ var localVarAxiosArgs;
532
+ return __generator(this, function (_a) {
533
+ switch (_a.label) {
534
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.publishCommissionSettlements(publishCommissionSettlementsRequestDto, authorization, options)];
535
+ case 1:
536
+ localVarAxiosArgs = _a.sent();
537
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
538
+ }
539
+ });
540
+ });
541
+ },
542
+ /**
543
+ * This will update commission settlement.
544
+ * @summary Update the commission settlement
545
+ * @param {string} code
546
+ * @param {UpdateCommissionSettlementRequestDto} updateCommissionSettlementRequestDto
547
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
548
+ * @param {*} [options] Override http request option.
549
+ * @throws {RequiredError}
550
+ */
551
+ updateCommissionSettlement: function (code, updateCommissionSettlementRequestDto, authorization, options) {
552
+ return __awaiter(this, void 0, void 0, function () {
553
+ var localVarAxiosArgs;
554
+ return __generator(this, function (_a) {
555
+ switch (_a.label) {
556
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCommissionSettlement(code, updateCommissionSettlementRequestDto, authorization, options)];
557
+ case 1:
558
+ localVarAxiosArgs = _a.sent();
559
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
560
+ }
561
+ });
562
+ });
563
+ },
564
+ };
565
+ };
566
+ exports.CommissionSettlementsApiFp = CommissionSettlementsApiFp;
567
+ /**
568
+ * CommissionSettlementsApi - factory interface
569
+ * @export
570
+ */
571
+ var CommissionSettlementsApiFactory = function (configuration, basePath, axios) {
572
+ var localVarFp = (0, exports.CommissionSettlementsApiFp)(configuration);
573
+ return {
574
+ /**
575
+ * This will create commission settlement.
576
+ * @summary Create the commission settlement
577
+ * @param {CreateCommissionSettlementRequestDto} createCommissionSettlementRequestDto
578
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
579
+ * @param {*} [options] Override http request option.
580
+ * @throws {RequiredError}
581
+ */
582
+ createCommissionSettlement: function (createCommissionSettlementRequestDto, authorization, options) {
583
+ return localVarFp.createCommissionSettlement(createCommissionSettlementRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
584
+ },
585
+ /**
586
+ * This will delete commission settlement.
587
+ * @summary Delete the commission settlement
588
+ * @param {string} code Unique identifier for the object.
589
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
590
+ * @param {*} [options] Override http request option.
591
+ * @throws {RequiredError}
592
+ */
593
+ deleteCommissionSettlement: function (code, authorization, options) {
594
+ return localVarFp.deleteCommissionSettlement(code, authorization, options).then(function (request) { return request(axios, basePath); });
595
+ },
596
+ /**
597
+ * This will get commission settlement.
598
+ * @summary Retrieve the commission settlement
599
+ * @param {string} code Unique identifier for the object.
600
+ * @param {string} expand
601
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
602
+ * @param {*} [options] Override http request option.
603
+ * @throws {RequiredError}
604
+ */
605
+ getCommissionSettlement: function (code, expand, authorization, options) {
606
+ return localVarFp.getCommissionSettlement(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
607
+ },
608
+ /**
609
+ * Retrieves a list of commission settlements.
610
+ * @summary List commission settlements
611
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
612
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
613
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
614
+ * @param {'id' | 'code' | 'settlementNumber' | 'status' | 'amount' | 'policyCount' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
615
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
616
+ * @param {'code' | 'settlementNumber' | 'status' | 'amount' | 'policyCount' | 'createdAt' | 'updatedAt'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
617
+ * @param {'commissions'} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
618
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
619
+ * @param {*} [options] Override http request option.
620
+ * @throws {RequiredError}
621
+ */
622
+ listCommissionSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
623
+ return localVarFp.listCommissionSettlements(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
624
+ },
625
+ /**
626
+ * This will publish multiple commission settlements.
627
+ * @summary Create the commission settlement publish
628
+ * @param {PublishCommissionSettlementsRequestDto} publishCommissionSettlementsRequestDto
629
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ publishCommissionSettlements: function (publishCommissionSettlementsRequestDto, authorization, options) {
634
+ return localVarFp.publishCommissionSettlements(publishCommissionSettlementsRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
635
+ },
636
+ /**
637
+ * This will update commission settlement.
638
+ * @summary Update the commission settlement
639
+ * @param {string} code
640
+ * @param {UpdateCommissionSettlementRequestDto} updateCommissionSettlementRequestDto
641
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
642
+ * @param {*} [options] Override http request option.
643
+ * @throws {RequiredError}
644
+ */
645
+ updateCommissionSettlement: function (code, updateCommissionSettlementRequestDto, authorization, options) {
646
+ return localVarFp.updateCommissionSettlement(code, updateCommissionSettlementRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
647
+ },
648
+ };
649
+ };
650
+ exports.CommissionSettlementsApiFactory = CommissionSettlementsApiFactory;
651
+ /**
652
+ * CommissionSettlementsApi - object-oriented interface
653
+ * @export
654
+ * @class CommissionSettlementsApi
655
+ * @extends {BaseAPI}
656
+ */
657
+ var CommissionSettlementsApi = /** @class */ (function (_super) {
658
+ __extends(CommissionSettlementsApi, _super);
659
+ function CommissionSettlementsApi() {
660
+ return _super !== null && _super.apply(this, arguments) || this;
661
+ }
662
+ /**
663
+ * This will create commission settlement.
664
+ * @summary Create the commission settlement
665
+ * @param {CommissionSettlementsApiCreateCommissionSettlementRequest} requestParameters Request parameters.
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ * @memberof CommissionSettlementsApi
669
+ */
670
+ CommissionSettlementsApi.prototype.createCommissionSettlement = function (requestParameters, options) {
671
+ var _this = this;
672
+ return (0, exports.CommissionSettlementsApiFp)(this.configuration).createCommissionSettlement(requestParameters.createCommissionSettlementRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
673
+ };
674
+ /**
675
+ * This will delete commission settlement.
676
+ * @summary Delete the commission settlement
677
+ * @param {CommissionSettlementsApiDeleteCommissionSettlementRequest} requestParameters Request parameters.
678
+ * @param {*} [options] Override http request option.
679
+ * @throws {RequiredError}
680
+ * @memberof CommissionSettlementsApi
681
+ */
682
+ CommissionSettlementsApi.prototype.deleteCommissionSettlement = function (requestParameters, options) {
683
+ var _this = this;
684
+ return (0, exports.CommissionSettlementsApiFp)(this.configuration).deleteCommissionSettlement(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
685
+ };
686
+ /**
687
+ * This will get commission settlement.
688
+ * @summary Retrieve the commission settlement
689
+ * @param {CommissionSettlementsApiGetCommissionSettlementRequest} requestParameters Request parameters.
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ * @memberof CommissionSettlementsApi
693
+ */
694
+ CommissionSettlementsApi.prototype.getCommissionSettlement = function (requestParameters, options) {
695
+ var _this = this;
696
+ return (0, exports.CommissionSettlementsApiFp)(this.configuration).getCommissionSettlement(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
697
+ };
698
+ /**
699
+ * Retrieves a list of commission settlements.
700
+ * @summary List commission settlements
701
+ * @param {CommissionSettlementsApiListCommissionSettlementsRequest} requestParameters Request parameters.
702
+ * @param {*} [options] Override http request option.
703
+ * @throws {RequiredError}
704
+ * @memberof CommissionSettlementsApi
705
+ */
706
+ CommissionSettlementsApi.prototype.listCommissionSettlements = function (requestParameters, options) {
707
+ var _this = this;
708
+ if (requestParameters === void 0) { requestParameters = {}; }
709
+ return (0, exports.CommissionSettlementsApiFp)(this.configuration).listCommissionSettlements(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
710
+ };
711
+ /**
712
+ * This will publish multiple commission settlements.
713
+ * @summary Create the commission settlement publish
714
+ * @param {CommissionSettlementsApiPublishCommissionSettlementsRequest} requestParameters Request parameters.
715
+ * @param {*} [options] Override http request option.
716
+ * @throws {RequiredError}
717
+ * @memberof CommissionSettlementsApi
718
+ */
719
+ CommissionSettlementsApi.prototype.publishCommissionSettlements = function (requestParameters, options) {
720
+ var _this = this;
721
+ return (0, exports.CommissionSettlementsApiFp)(this.configuration).publishCommissionSettlements(requestParameters.publishCommissionSettlementsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
722
+ };
723
+ /**
724
+ * This will update commission settlement.
725
+ * @summary Update the commission settlement
726
+ * @param {CommissionSettlementsApiUpdateCommissionSettlementRequest} requestParameters Request parameters.
727
+ * @param {*} [options] Override http request option.
728
+ * @throws {RequiredError}
729
+ * @memberof CommissionSettlementsApi
730
+ */
731
+ CommissionSettlementsApi.prototype.updateCommissionSettlement = function (requestParameters, options) {
732
+ var _this = this;
733
+ return (0, exports.CommissionSettlementsApiFp)(this.configuration).updateCommissionSettlement(requestParameters.code, requestParameters.updateCommissionSettlementRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
734
+ };
735
+ return CommissionSettlementsApi;
736
+ }(base_1.BaseAPI));
737
+ exports.CommissionSettlementsApi = CommissionSettlementsApi;