@emilgroup/commission-sdk 2.10.1-beta.2 → 2.10.1-beta.21

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 (94) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/README.md +2 -2
  3. package/api/commissions-api.ts +603 -0
  4. package/dist/api/commissions-api.d.ts +343 -0
  5. package/dist/api/commissions-api.js +450 -0
  6. package/dist/models/clawback-config-class.d.ts +42 -0
  7. package/dist/models/clawback-config-class.js +15 -0
  8. package/dist/models/clawback-config-dto.d.ts +42 -0
  9. package/dist/models/clawback-config-dto.js +15 -0
  10. package/dist/models/commission-agreement-version-class.d.ts +7 -0
  11. package/dist/models/commission-agreement-version-config-class.d.ts +32 -0
  12. package/dist/models/commission-agreement-version-config-class.js +15 -0
  13. package/dist/models/commission-agreement-version-config-dto.d.ts +32 -0
  14. package/dist/models/commission-agreement-version-config-dto.js +15 -0
  15. package/dist/models/commission-candidate-class.d.ts +12 -0
  16. package/dist/models/commission-class.d.ts +38 -0
  17. package/dist/models/commission-class.js +8 -0
  18. package/dist/models/commission-config-dto.d.ts +2 -1
  19. package/dist/models/commission-config-dto.js +2 -1
  20. package/dist/models/commission-creation-config-class.d.ts +43 -0
  21. package/dist/models/commission-creation-config-class.js +20 -0
  22. package/dist/models/commission-creation-config-dto.d.ts +43 -0
  23. package/dist/models/commission-creation-config-dto.js +20 -0
  24. package/dist/models/commission-creation-invoice-config-class.d.ts +24 -0
  25. package/dist/models/commission-creation-invoice-config-class.js +15 -0
  26. package/dist/models/commission-creation-invoice-config-dto.d.ts +24 -0
  27. package/dist/models/commission-creation-invoice-config-dto.js +15 -0
  28. package/dist/models/commission-creation-renewal-config-class.d.ts +29 -0
  29. package/dist/models/commission-creation-renewal-config-class.js +20 -0
  30. package/dist/models/commission-creation-renewal-config-dto.d.ts +29 -0
  31. package/dist/models/commission-creation-renewal-config-dto.js +20 -0
  32. package/dist/models/commission-estimate-class.d.ts +2 -1
  33. package/dist/models/commission-estimate-class.js +2 -1
  34. package/dist/models/commission-paid-invoice-entry-class.d.ts +108 -0
  35. package/dist/models/commission-paid-invoice-entry-class.js +21 -0
  36. package/dist/models/create-commission-agreement-request-dto.d.ts +7 -0
  37. package/dist/models/create-commission-agreement-version-request-dto.d.ts +7 -0
  38. package/dist/models/create-commission-candidate-request-dto.d.ts +15 -2
  39. package/dist/models/create-commission-candidate-request-dto.js +2 -1
  40. package/dist/models/create-commission-clawback-request-dto.d.ts +24 -0
  41. package/dist/models/create-commission-clawback-request-dto.js +15 -0
  42. package/dist/models/create-commission-clawback-response-class.d.ts +43 -0
  43. package/dist/models/create-commission-clawback-response-class.js +21 -0
  44. package/dist/models/create-commission-item-request-dto.d.ts +2 -1
  45. package/dist/models/create-commission-item-request-dto.js +2 -1
  46. package/dist/models/create-commission-request-dto.d.ts +6 -0
  47. package/dist/models/evaluated-commission-class.d.ts +2 -1
  48. package/dist/models/evaluated-commission-class.js +2 -1
  49. package/dist/models/index.d.ts +18 -0
  50. package/dist/models/index.js +18 -0
  51. package/dist/models/list-commission-paid-invoice-entries-response-class.d.ts +43 -0
  52. package/dist/models/list-commission-paid-invoice-entries-response-class.js +15 -0
  53. package/dist/models/list-scheduled-commission-clawback-triggers-response-class.d.ts +43 -0
  54. package/dist/models/list-scheduled-commission-clawback-triggers-response-class.js +15 -0
  55. package/dist/models/scheduled-commission-clawback-trigger-class.d.ts +110 -0
  56. package/dist/models/scheduled-commission-clawback-trigger-class.js +28 -0
  57. package/dist/models/trigger-due-commission-clawbacks-request-dto.d.ts +30 -0
  58. package/dist/models/trigger-due-commission-clawbacks-request-dto.js +15 -0
  59. package/dist/models/trigger-due-commission-clawbacks-response-class.d.ts +24 -0
  60. package/dist/models/trigger-due-commission-clawbacks-response-class.js +15 -0
  61. package/dist/models/update-commission-candidate-request-dto.d.ts +2 -1
  62. package/dist/models/update-commission-candidate-request-dto.js +2 -1
  63. package/models/clawback-config-class.ts +48 -0
  64. package/models/clawback-config-dto.ts +48 -0
  65. package/models/commission-agreement-version-class.ts +7 -0
  66. package/models/commission-agreement-version-config-class.ts +38 -0
  67. package/models/commission-agreement-version-config-dto.ts +38 -0
  68. package/models/commission-candidate-class.ts +12 -0
  69. package/models/commission-class.ts +41 -0
  70. package/models/commission-config-dto.ts +3 -2
  71. package/models/commission-creation-config-class.ts +52 -0
  72. package/models/commission-creation-config-dto.ts +52 -0
  73. package/models/commission-creation-invoice-config-class.ts +30 -0
  74. package/models/commission-creation-invoice-config-dto.ts +30 -0
  75. package/models/commission-creation-renewal-config-class.ts +38 -0
  76. package/models/commission-creation-renewal-config-dto.ts +38 -0
  77. package/models/commission-estimate-class.ts +3 -2
  78. package/models/commission-paid-invoice-entry-class.ts +117 -0
  79. package/models/create-commission-agreement-request-dto.ts +7 -0
  80. package/models/create-commission-agreement-version-request-dto.ts +7 -0
  81. package/models/create-commission-candidate-request-dto.ts +16 -3
  82. package/models/create-commission-clawback-request-dto.ts +30 -0
  83. package/models/create-commission-clawback-response-class.ts +52 -0
  84. package/models/create-commission-item-request-dto.ts +3 -2
  85. package/models/create-commission-request-dto.ts +6 -0
  86. package/models/evaluated-commission-class.ts +3 -2
  87. package/models/index.ts +18 -0
  88. package/models/list-commission-paid-invoice-entries-response-class.ts +49 -0
  89. package/models/list-scheduled-commission-clawback-triggers-response-class.ts +49 -0
  90. package/models/scheduled-commission-clawback-trigger-class.ts +120 -0
  91. package/models/trigger-due-commission-clawbacks-request-dto.ts +36 -0
  92. package/models/trigger-due-commission-clawbacks-response-class.ts +30 -0
  93. package/models/update-commission-candidate-request-dto.ts +3 -2
  94. package/package.json +1 -1
@@ -141,6 +141,59 @@ var CommissionsApiAxiosParamCreator = function (configuration) {
141
141
  });
142
142
  });
143
143
  },
144
+ /**
145
+ * Creates a manual clawback for one commission.
146
+ * @summary Create the commission clawback
147
+ * @param {string} code Unique identifier for the object.
148
+ * @param {CreateCommissionClawbackRequestDto} createCommissionClawbackRequestDto
149
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ createCommissionClawback: function (code, createCommissionClawbackRequestDto, authorization, options) {
154
+ if (options === void 0) { options = {}; }
155
+ return __awaiter(_this, void 0, void 0, function () {
156
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
157
+ return __generator(this, function (_a) {
158
+ switch (_a.label) {
159
+ case 0:
160
+ // verify required parameter 'code' is not null or undefined
161
+ (0, common_1.assertParamExists)('createCommissionClawback', 'code', code);
162
+ // verify required parameter 'createCommissionClawbackRequestDto' is not null or undefined
163
+ (0, common_1.assertParamExists)('createCommissionClawback', 'createCommissionClawbackRequestDto', createCommissionClawbackRequestDto);
164
+ localVarPath = "/commissionservice/v1/commissions/{code}/clawbacks"
165
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
166
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ }
184
+ localVarHeaderParameter['Content-Type'] = 'application/json';
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCommissionClawbackRequestDto, localVarRequestOptions, configuration);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
144
197
  /**
145
198
  * This will delete commission.
146
199
  * @summary Delete the commission
@@ -292,6 +345,78 @@ var CommissionsApiAxiosParamCreator = function (configuration) {
292
345
  });
293
346
  });
294
347
  },
348
+ /**
349
+ * Returns paid invoices counted for invoice-mode commission creation. Use this endpoint to inspect counted, consumed, and discarded invoice groups.
350
+ * @summary List commission paid invoice entries
351
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
352
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
353
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
354
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionAgreementVersionCode, policyTimesliceFrom, policyTimesliceTo, status, commissionCandidateCode, commissionCode, createdAt, updatedAt, createdBy, updatedBy</i>
355
+ * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
356
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt, policyTimesliceFrom, policyTimesliceTo</i>
357
+ * @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.<br/> <br/>
358
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionAgreementVersionCode, policyTimesliceFrom, policyTimesliceTo, status, commissionCandidateCode, commissionCode, createdAt, updatedAt, createdBy, updatedBy</i>
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ */
362
+ listCommissionPaidInvoiceEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
363
+ if (options === void 0) { options = {}; }
364
+ return __awaiter(_this, void 0, void 0, function () {
365
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
366
+ return __generator(this, function (_a) {
367
+ switch (_a.label) {
368
+ case 0:
369
+ localVarPath = "/commissionservice/v1/commissions/paid-invoice-entries";
370
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
371
+ if (configuration) {
372
+ baseOptions = configuration.baseOptions;
373
+ baseAccessToken = configuration.accessToken;
374
+ }
375
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
376
+ localVarHeaderParameter = {};
377
+ localVarQueryParameter = {};
378
+ // authentication bearer required
379
+ // http bearer authentication required
380
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
381
+ case 1:
382
+ // authentication bearer required
383
+ // http bearer authentication required
384
+ _a.sent();
385
+ if (pageSize !== undefined) {
386
+ localVarQueryParameter['pageSize'] = pageSize;
387
+ }
388
+ if (pageToken !== undefined) {
389
+ localVarQueryParameter['pageToken'] = pageToken;
390
+ }
391
+ if (filter !== undefined) {
392
+ localVarQueryParameter['filter'] = filter;
393
+ }
394
+ if (search !== undefined) {
395
+ localVarQueryParameter['search'] = search;
396
+ }
397
+ if (order !== undefined) {
398
+ localVarQueryParameter['order'] = order;
399
+ }
400
+ if (expand !== undefined) {
401
+ localVarQueryParameter['expand'] = expand;
402
+ }
403
+ if (filters !== undefined) {
404
+ localVarQueryParameter['filters'] = filters;
405
+ }
406
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
407
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
408
+ }
409
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
410
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
411
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
412
+ return [2 /*return*/, {
413
+ url: (0, common_1.toPathString)(localVarUrlObj),
414
+ options: localVarRequestOptions,
415
+ }];
416
+ }
417
+ });
418
+ });
419
+ },
295
420
  /**
296
421
  * Retrieves a list of commissions.
297
422
  * @summary List commissions
@@ -364,6 +489,127 @@ var CommissionsApiAxiosParamCreator = function (configuration) {
364
489
  });
365
490
  });
366
491
  },
492
+ /**
493
+ * Returns future-dated commission clawback triggers and their processing status. Use this to check pending, queued, canceled, or failed automatic clawback triggers.
494
+ * @summary List scheduled commission clawback triggers
495
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
496
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
497
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
498
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, triggerType, status, effectiveDate, queuedAt, createdAt, updatedAt, createdBy, updatedBy</i>
499
+ * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
500
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, effectiveDate, queuedAt, createdAt, updatedAt</i>
501
+ * @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.<br/> <br/>
502
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, triggerType, status, effectiveDate, queuedAt, createdAt, updatedAt, createdBy, updatedBy</i>
503
+ * @param {*} [options] Override http request option.
504
+ * @throws {RequiredError}
505
+ */
506
+ listScheduledCommissionClawbackTriggers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
507
+ if (options === void 0) { options = {}; }
508
+ return __awaiter(_this, void 0, void 0, function () {
509
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
510
+ return __generator(this, function (_a) {
511
+ switch (_a.label) {
512
+ case 0:
513
+ localVarPath = "/commissionservice/v1/commissions/clawbacks/scheduled-triggers";
514
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
515
+ if (configuration) {
516
+ baseOptions = configuration.baseOptions;
517
+ baseAccessToken = configuration.accessToken;
518
+ }
519
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
520
+ localVarHeaderParameter = {};
521
+ localVarQueryParameter = {};
522
+ // authentication bearer required
523
+ // http bearer authentication required
524
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
525
+ case 1:
526
+ // authentication bearer required
527
+ // http bearer authentication required
528
+ _a.sent();
529
+ if (pageSize !== undefined) {
530
+ localVarQueryParameter['pageSize'] = pageSize;
531
+ }
532
+ if (pageToken !== undefined) {
533
+ localVarQueryParameter['pageToken'] = pageToken;
534
+ }
535
+ if (filter !== undefined) {
536
+ localVarQueryParameter['filter'] = filter;
537
+ }
538
+ if (search !== undefined) {
539
+ localVarQueryParameter['search'] = search;
540
+ }
541
+ if (order !== undefined) {
542
+ localVarQueryParameter['order'] = order;
543
+ }
544
+ if (expand !== undefined) {
545
+ localVarQueryParameter['expand'] = expand;
546
+ }
547
+ if (filters !== undefined) {
548
+ localVarQueryParameter['filters'] = filters;
549
+ }
550
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
551
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
552
+ }
553
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
554
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
555
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
556
+ return [2 /*return*/, {
557
+ url: (0, common_1.toPathString)(localVarUrlObj),
558
+ options: localVarRequestOptions,
559
+ }];
560
+ }
561
+ });
562
+ });
563
+ },
564
+ /**
565
+ * Requests due scheduled commission clawbacks processing by enqueueing a trigger message. The endpoint returns after the message is sent and does not wait for the job to finish.
566
+ * @summary Create the due commission clawbacks trigger
567
+ * @param {TriggerDueCommissionClawbacksRequestDto} triggerDueCommissionClawbacksRequestDto
568
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ */
572
+ triggerDueCommissionClawbacks: function (triggerDueCommissionClawbacksRequestDto, authorization, options) {
573
+ if (options === void 0) { options = {}; }
574
+ return __awaiter(_this, void 0, void 0, function () {
575
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
576
+ return __generator(this, function (_a) {
577
+ switch (_a.label) {
578
+ case 0:
579
+ // verify required parameter 'triggerDueCommissionClawbacksRequestDto' is not null or undefined
580
+ (0, common_1.assertParamExists)('triggerDueCommissionClawbacks', 'triggerDueCommissionClawbacksRequestDto', triggerDueCommissionClawbacksRequestDto);
581
+ localVarPath = "/commissionservice/v1/commissions/clawbacks/trigger-due";
582
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
583
+ if (configuration) {
584
+ baseOptions = configuration.baseOptions;
585
+ baseAccessToken = configuration.accessToken;
586
+ }
587
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
588
+ localVarHeaderParameter = {};
589
+ localVarQueryParameter = {};
590
+ // authentication bearer required
591
+ // http bearer authentication required
592
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
593
+ case 1:
594
+ // authentication bearer required
595
+ // http bearer authentication required
596
+ _a.sent();
597
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
598
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
599
+ }
600
+ localVarHeaderParameter['Content-Type'] = 'application/json';
601
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
602
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
603
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
604
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(triggerDueCommissionClawbacksRequestDto, localVarRequestOptions, configuration);
605
+ return [2 /*return*/, {
606
+ url: (0, common_1.toPathString)(localVarUrlObj),
607
+ options: localVarRequestOptions,
608
+ }];
609
+ }
610
+ });
611
+ });
612
+ },
367
613
  /**
368
614
  * This will update commission.
369
615
  * @summary Update the commission
@@ -448,6 +694,28 @@ var CommissionsApiFp = function (configuration) {
448
694
  });
449
695
  });
450
696
  },
697
+ /**
698
+ * Creates a manual clawback for one commission.
699
+ * @summary Create the commission clawback
700
+ * @param {string} code Unique identifier for the object.
701
+ * @param {CreateCommissionClawbackRequestDto} createCommissionClawbackRequestDto
702
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
703
+ * @param {*} [options] Override http request option.
704
+ * @throws {RequiredError}
705
+ */
706
+ createCommissionClawback: function (code, createCommissionClawbackRequestDto, authorization, options) {
707
+ return __awaiter(this, void 0, void 0, function () {
708
+ var localVarAxiosArgs;
709
+ return __generator(this, function (_a) {
710
+ switch (_a.label) {
711
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCommissionClawback(code, createCommissionClawbackRequestDto, authorization, options)];
712
+ case 1:
713
+ localVarAxiosArgs = _a.sent();
714
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
715
+ }
716
+ });
717
+ });
718
+ },
451
719
  /**
452
720
  * This will delete commission.
453
721
  * @summary Delete the commission
@@ -512,6 +780,33 @@ var CommissionsApiFp = function (configuration) {
512
780
  });
513
781
  });
514
782
  },
783
+ /**
784
+ * Returns paid invoices counted for invoice-mode commission creation. Use this endpoint to inspect counted, consumed, and discarded invoice groups.
785
+ * @summary List commission paid invoice entries
786
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
787
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
788
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
789
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionAgreementVersionCode, policyTimesliceFrom, policyTimesliceTo, status, commissionCandidateCode, commissionCode, createdAt, updatedAt, createdBy, updatedBy</i>
790
+ * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
791
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt, policyTimesliceFrom, policyTimesliceTo</i>
792
+ * @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.<br/> <br/>
793
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionAgreementVersionCode, policyTimesliceFrom, policyTimesliceTo, status, commissionCandidateCode, commissionCode, createdAt, updatedAt, createdBy, updatedBy</i>
794
+ * @param {*} [options] Override http request option.
795
+ * @throws {RequiredError}
796
+ */
797
+ listCommissionPaidInvoiceEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
798
+ return __awaiter(this, void 0, void 0, function () {
799
+ var localVarAxiosArgs;
800
+ return __generator(this, function (_a) {
801
+ switch (_a.label) {
802
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCommissionPaidInvoiceEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
803
+ case 1:
804
+ localVarAxiosArgs = _a.sent();
805
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
806
+ }
807
+ });
808
+ });
809
+ },
515
810
  /**
516
811
  * Retrieves a list of commissions.
517
812
  * @summary List commissions
@@ -539,6 +834,54 @@ var CommissionsApiFp = function (configuration) {
539
834
  });
540
835
  });
541
836
  },
837
+ /**
838
+ * Returns future-dated commission clawback triggers and their processing status. Use this to check pending, queued, canceled, or failed automatic clawback triggers.
839
+ * @summary List scheduled commission clawback triggers
840
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
841
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
842
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
843
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, triggerType, status, effectiveDate, queuedAt, createdAt, updatedAt, createdBy, updatedBy</i>
844
+ * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
845
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, effectiveDate, queuedAt, createdAt, updatedAt</i>
846
+ * @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.<br/> <br/>
847
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, triggerType, status, effectiveDate, queuedAt, createdAt, updatedAt, createdBy, updatedBy</i>
848
+ * @param {*} [options] Override http request option.
849
+ * @throws {RequiredError}
850
+ */
851
+ listScheduledCommissionClawbackTriggers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
852
+ return __awaiter(this, void 0, void 0, function () {
853
+ var localVarAxiosArgs;
854
+ return __generator(this, function (_a) {
855
+ switch (_a.label) {
856
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listScheduledCommissionClawbackTriggers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
857
+ case 1:
858
+ localVarAxiosArgs = _a.sent();
859
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
860
+ }
861
+ });
862
+ });
863
+ },
864
+ /**
865
+ * Requests due scheduled commission clawbacks processing by enqueueing a trigger message. The endpoint returns after the message is sent and does not wait for the job to finish.
866
+ * @summary Create the due commission clawbacks trigger
867
+ * @param {TriggerDueCommissionClawbacksRequestDto} triggerDueCommissionClawbacksRequestDto
868
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
869
+ * @param {*} [options] Override http request option.
870
+ * @throws {RequiredError}
871
+ */
872
+ triggerDueCommissionClawbacks: function (triggerDueCommissionClawbacksRequestDto, authorization, options) {
873
+ return __awaiter(this, void 0, void 0, function () {
874
+ var localVarAxiosArgs;
875
+ return __generator(this, function (_a) {
876
+ switch (_a.label) {
877
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.triggerDueCommissionClawbacks(triggerDueCommissionClawbacksRequestDto, authorization, options)];
878
+ case 1:
879
+ localVarAxiosArgs = _a.sent();
880
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
881
+ }
882
+ });
883
+ });
884
+ },
542
885
  /**
543
886
  * This will update commission.
544
887
  * @summary Update the commission
@@ -582,6 +925,18 @@ var CommissionsApiFactory = function (configuration, basePath, axios) {
582
925
  createCommission: function (createCommissionRequestDto, authorization, options) {
583
926
  return localVarFp.createCommission(createCommissionRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
584
927
  },
928
+ /**
929
+ * Creates a manual clawback for one commission.
930
+ * @summary Create the commission clawback
931
+ * @param {string} code Unique identifier for the object.
932
+ * @param {CreateCommissionClawbackRequestDto} createCommissionClawbackRequestDto
933
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
934
+ * @param {*} [options] Override http request option.
935
+ * @throws {RequiredError}
936
+ */
937
+ createCommissionClawback: function (code, createCommissionClawbackRequestDto, authorization, options) {
938
+ return localVarFp.createCommissionClawback(code, createCommissionClawbackRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
939
+ },
585
940
  /**
586
941
  * This will delete commission.
587
942
  * @summary Delete the commission
@@ -616,6 +971,23 @@ var CommissionsApiFactory = function (configuration, basePath, axios) {
616
971
  getCommission: function (code, expand, authorization, options) {
617
972
  return localVarFp.getCommission(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
618
973
  },
974
+ /**
975
+ * Returns paid invoices counted for invoice-mode commission creation. Use this endpoint to inspect counted, consumed, and discarded invoice groups.
976
+ * @summary List commission paid invoice entries
977
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
978
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
979
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
980
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionAgreementVersionCode, policyTimesliceFrom, policyTimesliceTo, status, commissionCandidateCode, commissionCode, createdAt, updatedAt, createdBy, updatedBy</i>
981
+ * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
982
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt, policyTimesliceFrom, policyTimesliceTo</i>
983
+ * @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.<br/> <br/>
984
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, invoiceCode, commissionAgreementVersionCode, policyTimesliceFrom, policyTimesliceTo, status, commissionCandidateCode, commissionCode, createdAt, updatedAt, createdBy, updatedBy</i>
985
+ * @param {*} [options] Override http request option.
986
+ * @throws {RequiredError}
987
+ */
988
+ listCommissionPaidInvoiceEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
989
+ return localVarFp.listCommissionPaidInvoiceEntries(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
990
+ },
619
991
  /**
620
992
  * Retrieves a list of commissions.
621
993
  * @summary List commissions
@@ -633,6 +1005,34 @@ var CommissionsApiFactory = function (configuration, basePath, axios) {
633
1005
  listCommissions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
634
1006
  return localVarFp.listCommissions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
635
1007
  },
1008
+ /**
1009
+ * Returns future-dated commission clawback triggers and their processing status. Use this to check pending, queued, canceled, or failed automatic clawback triggers.
1010
+ * @summary List scheduled commission clawback triggers
1011
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1012
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1013
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
1014
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, policyCode, triggerType, status, effectiveDate, queuedAt, createdAt, updatedAt, createdBy, updatedBy</i>
1015
+ * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
1016
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, effectiveDate, queuedAt, createdAt, updatedAt</i>
1017
+ * @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.<br/> <br/>
1018
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, policyCode, triggerType, status, effectiveDate, queuedAt, createdAt, updatedAt, createdBy, updatedBy</i>
1019
+ * @param {*} [options] Override http request option.
1020
+ * @throws {RequiredError}
1021
+ */
1022
+ listScheduledCommissionClawbackTriggers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
1023
+ return localVarFp.listScheduledCommissionClawbackTriggers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
1024
+ },
1025
+ /**
1026
+ * Requests due scheduled commission clawbacks processing by enqueueing a trigger message. The endpoint returns after the message is sent and does not wait for the job to finish.
1027
+ * @summary Create the due commission clawbacks trigger
1028
+ * @param {TriggerDueCommissionClawbacksRequestDto} triggerDueCommissionClawbacksRequestDto
1029
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1030
+ * @param {*} [options] Override http request option.
1031
+ * @throws {RequiredError}
1032
+ */
1033
+ triggerDueCommissionClawbacks: function (triggerDueCommissionClawbacksRequestDto, authorization, options) {
1034
+ return localVarFp.triggerDueCommissionClawbacks(triggerDueCommissionClawbacksRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1035
+ },
636
1036
  /**
637
1037
  * This will update commission.
638
1038
  * @summary Update the commission
@@ -671,6 +1071,18 @@ var CommissionsApi = /** @class */ (function (_super) {
671
1071
  var _this = this;
672
1072
  return (0, exports.CommissionsApiFp)(this.configuration).createCommission(requestParameters.createCommissionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
673
1073
  };
1074
+ /**
1075
+ * Creates a manual clawback for one commission.
1076
+ * @summary Create the commission clawback
1077
+ * @param {CommissionsApiCreateCommissionClawbackRequest} requestParameters Request parameters.
1078
+ * @param {*} [options] Override http request option.
1079
+ * @throws {RequiredError}
1080
+ * @memberof CommissionsApi
1081
+ */
1082
+ CommissionsApi.prototype.createCommissionClawback = function (requestParameters, options) {
1083
+ var _this = this;
1084
+ return (0, exports.CommissionsApiFp)(this.configuration).createCommissionClawback(requestParameters.code, requestParameters.createCommissionClawbackRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1085
+ };
674
1086
  /**
675
1087
  * This will delete commission.
676
1088
  * @summary Delete the commission
@@ -707,6 +1119,19 @@ var CommissionsApi = /** @class */ (function (_super) {
707
1119
  var _this = this;
708
1120
  return (0, exports.CommissionsApiFp)(this.configuration).getCommission(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
709
1121
  };
1122
+ /**
1123
+ * Returns paid invoices counted for invoice-mode commission creation. Use this endpoint to inspect counted, consumed, and discarded invoice groups.
1124
+ * @summary List commission paid invoice entries
1125
+ * @param {CommissionsApiListCommissionPaidInvoiceEntriesRequest} requestParameters Request parameters.
1126
+ * @param {*} [options] Override http request option.
1127
+ * @throws {RequiredError}
1128
+ * @memberof CommissionsApi
1129
+ */
1130
+ CommissionsApi.prototype.listCommissionPaidInvoiceEntries = function (requestParameters, options) {
1131
+ var _this = this;
1132
+ if (requestParameters === void 0) { requestParameters = {}; }
1133
+ return (0, exports.CommissionsApiFp)(this.configuration).listCommissionPaidInvoiceEntries(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); });
1134
+ };
710
1135
  /**
711
1136
  * Retrieves a list of commissions.
712
1137
  * @summary List commissions
@@ -720,6 +1145,31 @@ var CommissionsApi = /** @class */ (function (_super) {
720
1145
  if (requestParameters === void 0) { requestParameters = {}; }
721
1146
  return (0, exports.CommissionsApiFp)(this.configuration).listCommissions(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); });
722
1147
  };
1148
+ /**
1149
+ * Returns future-dated commission clawback triggers and their processing status. Use this to check pending, queued, canceled, or failed automatic clawback triggers.
1150
+ * @summary List scheduled commission clawback triggers
1151
+ * @param {CommissionsApiListScheduledCommissionClawbackTriggersRequest} requestParameters Request parameters.
1152
+ * @param {*} [options] Override http request option.
1153
+ * @throws {RequiredError}
1154
+ * @memberof CommissionsApi
1155
+ */
1156
+ CommissionsApi.prototype.listScheduledCommissionClawbackTriggers = function (requestParameters, options) {
1157
+ var _this = this;
1158
+ if (requestParameters === void 0) { requestParameters = {}; }
1159
+ return (0, exports.CommissionsApiFp)(this.configuration).listScheduledCommissionClawbackTriggers(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); });
1160
+ };
1161
+ /**
1162
+ * Requests due scheduled commission clawbacks processing by enqueueing a trigger message. The endpoint returns after the message is sent and does not wait for the job to finish.
1163
+ * @summary Create the due commission clawbacks trigger
1164
+ * @param {CommissionsApiTriggerDueCommissionClawbacksRequest} requestParameters Request parameters.
1165
+ * @param {*} [options] Override http request option.
1166
+ * @throws {RequiredError}
1167
+ * @memberof CommissionsApi
1168
+ */
1169
+ CommissionsApi.prototype.triggerDueCommissionClawbacks = function (requestParameters, options) {
1170
+ var _this = this;
1171
+ return (0, exports.CommissionsApiFp)(this.configuration).triggerDueCommissionClawbacks(requestParameters.triggerDueCommissionClawbacksRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1172
+ };
723
1173
  /**
724
1174
  * This will update commission.
725
1175
  * @summary Update the commission
@@ -0,0 +1,42 @@
1
+ /**
2
+ * EMIL CommissionService
3
+ * The EMIL CommissionService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ClawbackConfigClass
16
+ */
17
+ export interface ClawbackConfigClass {
18
+ /**
19
+ * Allow manual commission clawback creation.
20
+ * @type {boolean}
21
+ * @memberof ClawbackConfigClass
22
+ */
23
+ 'manual': boolean;
24
+ /**
25
+ * Allow automatic commission clawback creation for policy termination and withdrawal.
26
+ * @type {boolean}
27
+ * @memberof ClawbackConfigClass
28
+ */
29
+ 'policyCancellation': boolean;
30
+ /**
31
+ * Allow automatic commission clawback creation for intermediary switches.
32
+ * @type {boolean}
33
+ * @memberof ClawbackConfigClass
34
+ */
35
+ 'intermediarySwitched': boolean;
36
+ /**
37
+ * Allow automatic commission clawback creation for reopened invoices.
38
+ * @type {boolean}
39
+ * @memberof ClawbackConfigClass
40
+ */
41
+ 'invoiceReopened': boolean;
42
+ }
@@ -0,0 +1,15 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,42 @@
1
+ /**
2
+ * EMIL CommissionService
3
+ * The EMIL CommissionService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ClawbackConfigDto
16
+ */
17
+ export interface ClawbackConfigDto {
18
+ /**
19
+ * Allow manual commission clawback creation.
20
+ * @type {boolean}
21
+ * @memberof ClawbackConfigDto
22
+ */
23
+ 'manual': boolean;
24
+ /**
25
+ * Allow automatic commission clawback creation for policy termination and withdrawal.
26
+ * @type {boolean}
27
+ * @memberof ClawbackConfigDto
28
+ */
29
+ 'policyCancellation': boolean;
30
+ /**
31
+ * Allow automatic commission clawback creation for intermediary switches.
32
+ * @type {boolean}
33
+ * @memberof ClawbackConfigDto
34
+ */
35
+ 'intermediarySwitched': boolean;
36
+ /**
37
+ * Allow automatic commission clawback creation for reopened invoices.
38
+ * @type {boolean}
39
+ * @memberof ClawbackConfigDto
40
+ */
41
+ 'invoiceReopened': boolean;
42
+ }