@emilgroup/commission-sdk 1.0.0-beta.2 → 1.0.0-beta.20

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 (128) hide show
  1. package/.openapi-generator/FILES +33 -0
  2. package/README.md +2 -2
  3. package/api/commission-agreement-products-api.ts +651 -0
  4. package/api/commission-agreement-rules-api.ts +758 -0
  5. package/api/commission-agreement-versions-api.ts +67 -25
  6. package/api/commission-agreements-api.ts +83 -28
  7. package/api/commission-recipients-api.ts +693 -0
  8. package/api/commissions-api.ts +18 -18
  9. package/api.ts +6 -0
  10. package/dist/api/commission-agreement-products-api.d.ts +366 -0
  11. package/dist/api/commission-agreement-products-api.js +626 -0
  12. package/dist/api/commission-agreement-rules-api.d.ts +423 -0
  13. package/dist/api/commission-agreement-rules-api.js +719 -0
  14. package/dist/api/commission-agreement-versions-api.d.ts +47 -20
  15. package/dist/api/commission-agreement-versions-api.js +38 -20
  16. package/dist/api/commission-agreements-api.d.ts +55 -19
  17. package/dist/api/commission-agreements-api.js +48 -24
  18. package/dist/api/commission-recipients-api.d.ts +393 -0
  19. package/dist/api/commission-recipients-api.js +644 -0
  20. package/dist/api/commissions-api.d.ts +18 -18
  21. package/dist/api/commissions-api.js +9 -9
  22. package/dist/api.d.ts +3 -0
  23. package/dist/api.js +3 -0
  24. package/dist/models/commission-agreement-class.d.ts +14 -0
  25. package/dist/models/commission-agreement-metadata-dto.d.ts +25 -0
  26. package/dist/models/commission-agreement-metadata-dto.js +15 -0
  27. package/dist/models/commission-agreement-metadata-partner-dto.d.ts +30 -0
  28. package/dist/models/commission-agreement-metadata-partner-dto.js +15 -0
  29. package/dist/models/commission-agreement-product-class.d.ts +78 -0
  30. package/dist/models/commission-agreement-product-class.js +20 -0
  31. package/dist/models/commission-agreement-rule-class.d.ts +80 -0
  32. package/dist/models/commission-agreement-rule-class.js +21 -0
  33. package/dist/models/commission-agreement-rule-config-dto.d.ts +25 -0
  34. package/dist/models/commission-agreement-rule-config-dto.js +15 -0
  35. package/dist/models/commission-agreement-rule-evaluation-class.d.ts +31 -0
  36. package/dist/models/commission-agreement-rule-evaluation-class.js +15 -0
  37. package/dist/models/commission-class.d.ts +5 -4
  38. package/dist/models/commission-conditions-dto.d.ts +24 -0
  39. package/dist/models/commission-conditions-dto.js +15 -0
  40. package/dist/models/commission-config-dto.d.ts +63 -0
  41. package/dist/models/commission-config-dto.js +34 -0
  42. package/dist/models/commission-recipient-class.d.ts +90 -0
  43. package/dist/models/commission-recipient-class.js +20 -0
  44. package/dist/models/create-commission-agreement-product-request-dto.d.ts +30 -0
  45. package/dist/models/create-commission-agreement-product-request-dto.js +15 -0
  46. package/dist/models/create-commission-agreement-product-response-class.d.ts +25 -0
  47. package/dist/models/create-commission-agreement-product-response-class.js +15 -0
  48. package/dist/models/create-commission-agreement-request-dto.d.ts +8 -1
  49. package/dist/models/create-commission-agreement-rule-request-dto.d.ts +31 -0
  50. package/dist/models/create-commission-agreement-rule-request-dto.js +15 -0
  51. package/dist/models/create-commission-agreement-rule-response-class.d.ts +25 -0
  52. package/dist/models/create-commission-agreement-rule-response-class.js +15 -0
  53. package/dist/models/create-commission-agreement-version-request-dto.d.ts +1 -1
  54. package/dist/models/create-commission-recipient-request-dto.d.ts +36 -0
  55. package/dist/models/create-commission-recipient-request-dto.js +15 -0
  56. package/dist/models/create-commission-recipient-response-class.d.ts +25 -0
  57. package/dist/models/create-commission-recipient-response-class.js +15 -0
  58. package/dist/models/evaluate-commission-agreement-rule-request-dto.d.ts +31 -0
  59. package/dist/models/evaluate-commission-agreement-rule-request-dto.js +15 -0
  60. package/dist/models/evaluate-commission-agreement-rule-response-class.d.ts +25 -0
  61. package/dist/models/evaluate-commission-agreement-rule-response-class.js +15 -0
  62. package/dist/models/evaluated-commission-class.d.ts +54 -0
  63. package/dist/models/evaluated-commission-class.js +21 -0
  64. package/dist/models/get-commission-agreement-product-response-class.d.ts +25 -0
  65. package/dist/models/get-commission-agreement-product-response-class.js +15 -0
  66. package/dist/models/get-commission-agreement-rule-response-class.d.ts +25 -0
  67. package/dist/models/get-commission-agreement-rule-response-class.js +15 -0
  68. package/dist/models/get-commission-recipient-response-class.d.ts +25 -0
  69. package/dist/models/get-commission-recipient-response-class.js +15 -0
  70. package/dist/models/index.d.ts +30 -0
  71. package/dist/models/index.js +30 -0
  72. package/dist/models/list-commission-agreement-products-response-class.d.ts +43 -0
  73. package/dist/models/list-commission-agreement-products-response-class.js +15 -0
  74. package/dist/models/list-commission-agreement-rules-response-class.d.ts +43 -0
  75. package/dist/models/list-commission-agreement-rules-response-class.js +15 -0
  76. package/dist/models/list-commission-recipients-response-class.d.ts +43 -0
  77. package/dist/models/list-commission-recipients-response-class.js +15 -0
  78. package/dist/models/update-commission-agreement-product-request-dto.d.ts +41 -0
  79. package/dist/models/update-commission-agreement-product-request-dto.js +20 -0
  80. package/dist/models/update-commission-agreement-product-response-class.d.ts +25 -0
  81. package/dist/models/update-commission-agreement-product-response-class.js +15 -0
  82. package/dist/models/update-commission-agreement-rule-request-dto.d.ts +43 -0
  83. package/dist/models/update-commission-agreement-rule-request-dto.js +21 -0
  84. package/dist/models/update-commission-agreement-rule-response-class.d.ts +25 -0
  85. package/dist/models/update-commission-agreement-rule-response-class.js +15 -0
  86. package/dist/models/update-commission-recipient-request-dto.d.ts +42 -0
  87. package/dist/models/update-commission-recipient-request-dto.js +15 -0
  88. package/dist/models/update-commission-recipient-response-class.d.ts +25 -0
  89. package/dist/models/update-commission-recipient-response-class.js +15 -0
  90. package/dist/models/update-commission-request-dto.d.ts +5 -3
  91. package/dist/models/update-commission-request-dto.js +4 -2
  92. package/models/commission-agreement-class.ts +14 -0
  93. package/models/commission-agreement-metadata-dto.ts +31 -0
  94. package/models/commission-agreement-metadata-partner-dto.ts +36 -0
  95. package/models/commission-agreement-product-class.ts +87 -0
  96. package/models/commission-agreement-rule-class.ts +89 -0
  97. package/models/commission-agreement-rule-config-dto.ts +31 -0
  98. package/models/commission-agreement-rule-evaluation-class.ts +37 -0
  99. package/models/commission-class.ts +5 -4
  100. package/models/commission-conditions-dto.ts +30 -0
  101. package/models/commission-config-dto.ts +73 -0
  102. package/models/commission-recipient-class.ts +99 -0
  103. package/models/create-commission-agreement-product-request-dto.ts +36 -0
  104. package/models/create-commission-agreement-product-response-class.ts +31 -0
  105. package/models/create-commission-agreement-request-dto.ts +8 -1
  106. package/models/create-commission-agreement-rule-request-dto.ts +37 -0
  107. package/models/create-commission-agreement-rule-response-class.ts +31 -0
  108. package/models/create-commission-agreement-version-request-dto.ts +1 -1
  109. package/models/create-commission-recipient-request-dto.ts +42 -0
  110. package/models/create-commission-recipient-response-class.ts +31 -0
  111. package/models/evaluate-commission-agreement-rule-request-dto.ts +37 -0
  112. package/models/evaluate-commission-agreement-rule-response-class.ts +31 -0
  113. package/models/evaluated-commission-class.ts +63 -0
  114. package/models/get-commission-agreement-product-response-class.ts +31 -0
  115. package/models/get-commission-agreement-rule-response-class.ts +31 -0
  116. package/models/get-commission-recipient-response-class.ts +31 -0
  117. package/models/index.ts +30 -0
  118. package/models/list-commission-agreement-products-response-class.ts +49 -0
  119. package/models/list-commission-agreement-rules-response-class.ts +49 -0
  120. package/models/list-commission-recipients-response-class.ts +49 -0
  121. package/models/update-commission-agreement-product-request-dto.ts +50 -0
  122. package/models/update-commission-agreement-product-response-class.ts +31 -0
  123. package/models/update-commission-agreement-rule-request-dto.ts +52 -0
  124. package/models/update-commission-agreement-rule-response-class.ts +31 -0
  125. package/models/update-commission-recipient-request-dto.ts +48 -0
  126. package/models/update-commission-recipient-response-class.ts +31 -0
  127. package/models/update-commission-request-dto.ts +5 -3
  128. package/package.json +1 -1
@@ -0,0 +1,719 @@
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.CommissionAgreementRulesApi = exports.CommissionAgreementRulesApiFactory = exports.CommissionAgreementRulesApiFp = exports.CommissionAgreementRulesApiAxiosParamCreator = 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
+ * CommissionAgreementRulesApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var CommissionAgreementRulesApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create commission agreement rule.
97
+ * @summary Create the commission agreement rule
98
+ * @param {CreateCommissionAgreementRuleRequestDto} createCommissionAgreementRuleRequestDto
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
+ createCommissionAgreementRule: function (createCommissionAgreementRuleRequestDto, 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 'createCommissionAgreementRuleRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createCommissionAgreementRule', 'createCommissionAgreementRuleRequestDto', createCommissionAgreementRuleRequestDto);
112
+ localVarPath = "/commissionservice/v1/agreement-rules";
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)(createCommissionAgreementRuleRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * This will delete commission agreement rule.
146
+ * @summary Delete the commission agreement rule
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
+ deleteCommissionAgreementRule: 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)('deleteCommissionAgreementRule', 'code', code);
161
+ localVarPath = "/commissionservice/v1/agreement-rules/{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
+ * Evaluates commission agreement rule expressions with mock data and returns calculated commission values for first year and following years.
194
+ * @summary Create the commission agreement rule evaluation
195
+ * @param {EvaluateCommissionAgreementRuleRequestDto} evaluateCommissionAgreementRuleRequestDto
196
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ evaluateCommissionAgreementRule: function (evaluateCommissionAgreementRuleRequestDto, authorization, options) {
201
+ if (options === void 0) { options = {}; }
202
+ return __awaiter(_this, void 0, void 0, function () {
203
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
204
+ return __generator(this, function (_a) {
205
+ switch (_a.label) {
206
+ case 0:
207
+ // verify required parameter 'evaluateCommissionAgreementRuleRequestDto' is not null or undefined
208
+ (0, common_1.assertParamExists)('evaluateCommissionAgreementRule', 'evaluateCommissionAgreementRuleRequestDto', evaluateCommissionAgreementRuleRequestDto);
209
+ localVarPath = "/commissionservice/v1/agreement-rules/evaluate";
210
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
211
+ if (configuration) {
212
+ baseOptions = configuration.baseOptions;
213
+ baseAccessToken = configuration.accessToken;
214
+ }
215
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
216
+ localVarHeaderParameter = {};
217
+ localVarQueryParameter = {};
218
+ // authentication bearer required
219
+ // http bearer authentication required
220
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
221
+ case 1:
222
+ // authentication bearer required
223
+ // http bearer authentication required
224
+ _a.sent();
225
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
226
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
227
+ }
228
+ localVarHeaderParameter['Content-Type'] = 'application/json';
229
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
232
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(evaluateCommissionAgreementRuleRequestDto, localVarRequestOptions, configuration);
233
+ return [2 /*return*/, {
234
+ url: (0, common_1.toPathString)(localVarUrlObj),
235
+ options: localVarRequestOptions,
236
+ }];
237
+ }
238
+ });
239
+ });
240
+ },
241
+ /**
242
+ * This will get commission agreement rule.
243
+ * @summary Retrieve the commission agreement rule
244
+ * @param {string} code
245
+ * @param {string} expand
246
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
247
+ * @param {*} [options] Override http request option.
248
+ * @throws {RequiredError}
249
+ */
250
+ getCommissionAgreementRule: function (code, expand, authorization, options) {
251
+ if (options === void 0) { options = {}; }
252
+ return __awaiter(_this, void 0, void 0, function () {
253
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
254
+ return __generator(this, function (_a) {
255
+ switch (_a.label) {
256
+ case 0:
257
+ // verify required parameter 'code' is not null or undefined
258
+ (0, common_1.assertParamExists)('getCommissionAgreementRule', 'code', code);
259
+ // verify required parameter 'expand' is not null or undefined
260
+ (0, common_1.assertParamExists)('getCommissionAgreementRule', 'expand', expand);
261
+ localVarPath = "/commissionservice/v1/agreement-rules/{code}"
262
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
263
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
264
+ if (configuration) {
265
+ baseOptions = configuration.baseOptions;
266
+ baseAccessToken = configuration.accessToken;
267
+ }
268
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
269
+ localVarHeaderParameter = {};
270
+ localVarQueryParameter = {};
271
+ // authentication bearer required
272
+ // http bearer authentication required
273
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
274
+ case 1:
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ _a.sent();
278
+ if (expand !== undefined) {
279
+ localVarQueryParameter['expand'] = expand;
280
+ }
281
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
282
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
283
+ }
284
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
285
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
286
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
287
+ return [2 /*return*/, {
288
+ url: (0, common_1.toPathString)(localVarUrlObj),
289
+ options: localVarRequestOptions,
290
+ }];
291
+ }
292
+ });
293
+ });
294
+ },
295
+ /**
296
+ * Retrieves a list of commission agreement rules.
297
+ * @summary List commission agreement rules
298
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
299
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, status, createdAt&lt;/i&gt;
300
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, status, createdAt&lt;/i&gt;
301
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt, updatedAt, status&lt;/i&gt;
302
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version&lt;i&gt;
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ listCommissionAgreementRules: function (authorization, filter, filters, order, expand, options) {
307
+ if (options === void 0) { options = {}; }
308
+ return __awaiter(_this, void 0, void 0, function () {
309
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
310
+ return __generator(this, function (_a) {
311
+ switch (_a.label) {
312
+ case 0:
313
+ localVarPath = "/commissionservice/v1/agreement-rules";
314
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
315
+ if (configuration) {
316
+ baseOptions = configuration.baseOptions;
317
+ baseAccessToken = configuration.accessToken;
318
+ }
319
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
320
+ localVarHeaderParameter = {};
321
+ localVarQueryParameter = {};
322
+ // authentication bearer required
323
+ // http bearer authentication required
324
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
325
+ case 1:
326
+ // authentication bearer required
327
+ // http bearer authentication required
328
+ _a.sent();
329
+ if (filter !== undefined) {
330
+ localVarQueryParameter['filter'] = filter;
331
+ }
332
+ if (filters !== undefined) {
333
+ localVarQueryParameter['filters'] = filters;
334
+ }
335
+ if (order !== undefined) {
336
+ localVarQueryParameter['order'] = order;
337
+ }
338
+ if (expand !== undefined) {
339
+ localVarQueryParameter['expand'] = expand;
340
+ }
341
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
342
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
343
+ }
344
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
345
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
346
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
347
+ return [2 /*return*/, {
348
+ url: (0, common_1.toPathString)(localVarUrlObj),
349
+ options: localVarRequestOptions,
350
+ }];
351
+ }
352
+ });
353
+ });
354
+ },
355
+ /**
356
+ * This will update commission agreement rule.
357
+ * @summary Update the commission agreement rule
358
+ * @param {string} code Unique identifier for the object.
359
+ * @param {UpdateCommissionAgreementRuleRequestDto} updateCommissionAgreementRuleRequestDto
360
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
361
+ * @param {*} [options] Override http request option.
362
+ * @throws {RequiredError}
363
+ */
364
+ updateCommissionAgreementRule: function (code, updateCommissionAgreementRuleRequestDto, authorization, options) {
365
+ if (options === void 0) { options = {}; }
366
+ return __awaiter(_this, void 0, void 0, function () {
367
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
368
+ return __generator(this, function (_a) {
369
+ switch (_a.label) {
370
+ case 0:
371
+ // verify required parameter 'code' is not null or undefined
372
+ (0, common_1.assertParamExists)('updateCommissionAgreementRule', 'code', code);
373
+ // verify required parameter 'updateCommissionAgreementRuleRequestDto' is not null or undefined
374
+ (0, common_1.assertParamExists)('updateCommissionAgreementRule', 'updateCommissionAgreementRuleRequestDto', updateCommissionAgreementRuleRequestDto);
375
+ localVarPath = "/commissionservice/v1/agreement-rules/{code}"
376
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
377
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
378
+ if (configuration) {
379
+ baseOptions = configuration.baseOptions;
380
+ baseAccessToken = configuration.accessToken;
381
+ }
382
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
383
+ localVarHeaderParameter = {};
384
+ localVarQueryParameter = {};
385
+ // authentication bearer required
386
+ // http bearer authentication required
387
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
388
+ case 1:
389
+ // authentication bearer required
390
+ // http bearer authentication required
391
+ _a.sent();
392
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
393
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
394
+ }
395
+ localVarHeaderParameter['Content-Type'] = 'application/json';
396
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
397
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
398
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
399
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCommissionAgreementRuleRequestDto, localVarRequestOptions, configuration);
400
+ return [2 /*return*/, {
401
+ url: (0, common_1.toPathString)(localVarUrlObj),
402
+ options: localVarRequestOptions,
403
+ }];
404
+ }
405
+ });
406
+ });
407
+ },
408
+ };
409
+ };
410
+ exports.CommissionAgreementRulesApiAxiosParamCreator = CommissionAgreementRulesApiAxiosParamCreator;
411
+ /**
412
+ * CommissionAgreementRulesApi - functional programming interface
413
+ * @export
414
+ */
415
+ var CommissionAgreementRulesApiFp = function (configuration) {
416
+ var localVarAxiosParamCreator = (0, exports.CommissionAgreementRulesApiAxiosParamCreator)(configuration);
417
+ return {
418
+ /**
419
+ * This will create commission agreement rule.
420
+ * @summary Create the commission agreement rule
421
+ * @param {CreateCommissionAgreementRuleRequestDto} createCommissionAgreementRuleRequestDto
422
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ createCommissionAgreementRule: function (createCommissionAgreementRuleRequestDto, authorization, options) {
427
+ return __awaiter(this, void 0, void 0, function () {
428
+ var localVarAxiosArgs;
429
+ return __generator(this, function (_a) {
430
+ switch (_a.label) {
431
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCommissionAgreementRule(createCommissionAgreementRuleRequestDto, authorization, options)];
432
+ case 1:
433
+ localVarAxiosArgs = _a.sent();
434
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
435
+ }
436
+ });
437
+ });
438
+ },
439
+ /**
440
+ * This will delete commission agreement rule.
441
+ * @summary Delete the commission agreement rule
442
+ * @param {string} code Unique identifier for the object.
443
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
444
+ * @param {*} [options] Override http request option.
445
+ * @throws {RequiredError}
446
+ */
447
+ deleteCommissionAgreementRule: function (code, authorization, options) {
448
+ return __awaiter(this, void 0, void 0, function () {
449
+ var localVarAxiosArgs;
450
+ return __generator(this, function (_a) {
451
+ switch (_a.label) {
452
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteCommissionAgreementRule(code, authorization, options)];
453
+ case 1:
454
+ localVarAxiosArgs = _a.sent();
455
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
456
+ }
457
+ });
458
+ });
459
+ },
460
+ /**
461
+ * Evaluates commission agreement rule expressions with mock data and returns calculated commission values for first year and following years.
462
+ * @summary Create the commission agreement rule evaluation
463
+ * @param {EvaluateCommissionAgreementRuleRequestDto} evaluateCommissionAgreementRuleRequestDto
464
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ */
468
+ evaluateCommissionAgreementRule: function (evaluateCommissionAgreementRuleRequestDto, authorization, options) {
469
+ return __awaiter(this, void 0, void 0, function () {
470
+ var localVarAxiosArgs;
471
+ return __generator(this, function (_a) {
472
+ switch (_a.label) {
473
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.evaluateCommissionAgreementRule(evaluateCommissionAgreementRuleRequestDto, authorization, options)];
474
+ case 1:
475
+ localVarAxiosArgs = _a.sent();
476
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
477
+ }
478
+ });
479
+ });
480
+ },
481
+ /**
482
+ * This will get commission agreement rule.
483
+ * @summary Retrieve the commission agreement rule
484
+ * @param {string} code
485
+ * @param {string} expand
486
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
487
+ * @param {*} [options] Override http request option.
488
+ * @throws {RequiredError}
489
+ */
490
+ getCommissionAgreementRule: function (code, expand, authorization, options) {
491
+ return __awaiter(this, void 0, void 0, function () {
492
+ var localVarAxiosArgs;
493
+ return __generator(this, function (_a) {
494
+ switch (_a.label) {
495
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCommissionAgreementRule(code, expand, authorization, options)];
496
+ case 1:
497
+ localVarAxiosArgs = _a.sent();
498
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
499
+ }
500
+ });
501
+ });
502
+ },
503
+ /**
504
+ * Retrieves a list of commission agreement rules.
505
+ * @summary List commission agreement rules
506
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
507
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, status, createdAt&lt;/i&gt;
508
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, status, createdAt&lt;/i&gt;
509
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt, updatedAt, status&lt;/i&gt;
510
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version&lt;i&gt;
511
+ * @param {*} [options] Override http request option.
512
+ * @throws {RequiredError}
513
+ */
514
+ listCommissionAgreementRules: function (authorization, filter, filters, order, expand, options) {
515
+ return __awaiter(this, void 0, void 0, function () {
516
+ var localVarAxiosArgs;
517
+ return __generator(this, function (_a) {
518
+ switch (_a.label) {
519
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCommissionAgreementRules(authorization, filter, filters, order, expand, options)];
520
+ case 1:
521
+ localVarAxiosArgs = _a.sent();
522
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
523
+ }
524
+ });
525
+ });
526
+ },
527
+ /**
528
+ * This will update commission agreement rule.
529
+ * @summary Update the commission agreement rule
530
+ * @param {string} code Unique identifier for the object.
531
+ * @param {UpdateCommissionAgreementRuleRequestDto} updateCommissionAgreementRuleRequestDto
532
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
533
+ * @param {*} [options] Override http request option.
534
+ * @throws {RequiredError}
535
+ */
536
+ updateCommissionAgreementRule: function (code, updateCommissionAgreementRuleRequestDto, authorization, options) {
537
+ return __awaiter(this, void 0, void 0, function () {
538
+ var localVarAxiosArgs;
539
+ return __generator(this, function (_a) {
540
+ switch (_a.label) {
541
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCommissionAgreementRule(code, updateCommissionAgreementRuleRequestDto, authorization, options)];
542
+ case 1:
543
+ localVarAxiosArgs = _a.sent();
544
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
545
+ }
546
+ });
547
+ });
548
+ },
549
+ };
550
+ };
551
+ exports.CommissionAgreementRulesApiFp = CommissionAgreementRulesApiFp;
552
+ /**
553
+ * CommissionAgreementRulesApi - factory interface
554
+ * @export
555
+ */
556
+ var CommissionAgreementRulesApiFactory = function (configuration, basePath, axios) {
557
+ var localVarFp = (0, exports.CommissionAgreementRulesApiFp)(configuration);
558
+ return {
559
+ /**
560
+ * This will create commission agreement rule.
561
+ * @summary Create the commission agreement rule
562
+ * @param {CreateCommissionAgreementRuleRequestDto} createCommissionAgreementRuleRequestDto
563
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
564
+ * @param {*} [options] Override http request option.
565
+ * @throws {RequiredError}
566
+ */
567
+ createCommissionAgreementRule: function (createCommissionAgreementRuleRequestDto, authorization, options) {
568
+ return localVarFp.createCommissionAgreementRule(createCommissionAgreementRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
569
+ },
570
+ /**
571
+ * This will delete commission agreement rule.
572
+ * @summary Delete the commission agreement rule
573
+ * @param {string} code Unique identifier for the object.
574
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
575
+ * @param {*} [options] Override http request option.
576
+ * @throws {RequiredError}
577
+ */
578
+ deleteCommissionAgreementRule: function (code, authorization, options) {
579
+ return localVarFp.deleteCommissionAgreementRule(code, authorization, options).then(function (request) { return request(axios, basePath); });
580
+ },
581
+ /**
582
+ * Evaluates commission agreement rule expressions with mock data and returns calculated commission values for first year and following years.
583
+ * @summary Create the commission agreement rule evaluation
584
+ * @param {EvaluateCommissionAgreementRuleRequestDto} evaluateCommissionAgreementRuleRequestDto
585
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ */
589
+ evaluateCommissionAgreementRule: function (evaluateCommissionAgreementRuleRequestDto, authorization, options) {
590
+ return localVarFp.evaluateCommissionAgreementRule(evaluateCommissionAgreementRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
591
+ },
592
+ /**
593
+ * This will get commission agreement rule.
594
+ * @summary Retrieve the commission agreement rule
595
+ * @param {string} code
596
+ * @param {string} expand
597
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ */
601
+ getCommissionAgreementRule: function (code, expand, authorization, options) {
602
+ return localVarFp.getCommissionAgreementRule(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
603
+ },
604
+ /**
605
+ * Retrieves a list of commission agreement rules.
606
+ * @summary List commission agreement rules
607
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
608
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, status, createdAt&lt;/i&gt;
609
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, commissionAgreementVersionId, status, createdAt&lt;/i&gt;
610
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt, updatedAt, status&lt;/i&gt;
611
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version&lt;i&gt;
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ listCommissionAgreementRules: function (authorization, filter, filters, order, expand, options) {
616
+ return localVarFp.listCommissionAgreementRules(authorization, filter, filters, order, expand, options).then(function (request) { return request(axios, basePath); });
617
+ },
618
+ /**
619
+ * This will update commission agreement rule.
620
+ * @summary Update the commission agreement rule
621
+ * @param {string} code Unique identifier for the object.
622
+ * @param {UpdateCommissionAgreementRuleRequestDto} updateCommissionAgreementRuleRequestDto
623
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
624
+ * @param {*} [options] Override http request option.
625
+ * @throws {RequiredError}
626
+ */
627
+ updateCommissionAgreementRule: function (code, updateCommissionAgreementRuleRequestDto, authorization, options) {
628
+ return localVarFp.updateCommissionAgreementRule(code, updateCommissionAgreementRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
629
+ },
630
+ };
631
+ };
632
+ exports.CommissionAgreementRulesApiFactory = CommissionAgreementRulesApiFactory;
633
+ /**
634
+ * CommissionAgreementRulesApi - object-oriented interface
635
+ * @export
636
+ * @class CommissionAgreementRulesApi
637
+ * @extends {BaseAPI}
638
+ */
639
+ var CommissionAgreementRulesApi = /** @class */ (function (_super) {
640
+ __extends(CommissionAgreementRulesApi, _super);
641
+ function CommissionAgreementRulesApi() {
642
+ return _super !== null && _super.apply(this, arguments) || this;
643
+ }
644
+ /**
645
+ * This will create commission agreement rule.
646
+ * @summary Create the commission agreement rule
647
+ * @param {CommissionAgreementRulesApiCreateCommissionAgreementRuleRequest} requestParameters Request parameters.
648
+ * @param {*} [options] Override http request option.
649
+ * @throws {RequiredError}
650
+ * @memberof CommissionAgreementRulesApi
651
+ */
652
+ CommissionAgreementRulesApi.prototype.createCommissionAgreementRule = function (requestParameters, options) {
653
+ var _this = this;
654
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).createCommissionAgreementRule(requestParameters.createCommissionAgreementRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
655
+ };
656
+ /**
657
+ * This will delete commission agreement rule.
658
+ * @summary Delete the commission agreement rule
659
+ * @param {CommissionAgreementRulesApiDeleteCommissionAgreementRuleRequest} requestParameters Request parameters.
660
+ * @param {*} [options] Override http request option.
661
+ * @throws {RequiredError}
662
+ * @memberof CommissionAgreementRulesApi
663
+ */
664
+ CommissionAgreementRulesApi.prototype.deleteCommissionAgreementRule = function (requestParameters, options) {
665
+ var _this = this;
666
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).deleteCommissionAgreementRule(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
667
+ };
668
+ /**
669
+ * Evaluates commission agreement rule expressions with mock data and returns calculated commission values for first year and following years.
670
+ * @summary Create the commission agreement rule evaluation
671
+ * @param {CommissionAgreementRulesApiEvaluateCommissionAgreementRuleRequest} requestParameters Request parameters.
672
+ * @param {*} [options] Override http request option.
673
+ * @throws {RequiredError}
674
+ * @memberof CommissionAgreementRulesApi
675
+ */
676
+ CommissionAgreementRulesApi.prototype.evaluateCommissionAgreementRule = function (requestParameters, options) {
677
+ var _this = this;
678
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).evaluateCommissionAgreementRule(requestParameters.evaluateCommissionAgreementRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
679
+ };
680
+ /**
681
+ * This will get commission agreement rule.
682
+ * @summary Retrieve the commission agreement rule
683
+ * @param {CommissionAgreementRulesApiGetCommissionAgreementRuleRequest} requestParameters Request parameters.
684
+ * @param {*} [options] Override http request option.
685
+ * @throws {RequiredError}
686
+ * @memberof CommissionAgreementRulesApi
687
+ */
688
+ CommissionAgreementRulesApi.prototype.getCommissionAgreementRule = function (requestParameters, options) {
689
+ var _this = this;
690
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).getCommissionAgreementRule(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
691
+ };
692
+ /**
693
+ * Retrieves a list of commission agreement rules.
694
+ * @summary List commission agreement rules
695
+ * @param {CommissionAgreementRulesApiListCommissionAgreementRulesRequest} requestParameters Request parameters.
696
+ * @param {*} [options] Override http request option.
697
+ * @throws {RequiredError}
698
+ * @memberof CommissionAgreementRulesApi
699
+ */
700
+ CommissionAgreementRulesApi.prototype.listCommissionAgreementRules = function (requestParameters, options) {
701
+ var _this = this;
702
+ if (requestParameters === void 0) { requestParameters = {}; }
703
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).listCommissionAgreementRules(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
704
+ };
705
+ /**
706
+ * This will update commission agreement rule.
707
+ * @summary Update the commission agreement rule
708
+ * @param {CommissionAgreementRulesApiUpdateCommissionAgreementRuleRequest} requestParameters Request parameters.
709
+ * @param {*} [options] Override http request option.
710
+ * @throws {RequiredError}
711
+ * @memberof CommissionAgreementRulesApi
712
+ */
713
+ CommissionAgreementRulesApi.prototype.updateCommissionAgreementRule = function (requestParameters, options) {
714
+ var _this = this;
715
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).updateCommissionAgreementRule(requestParameters.code, requestParameters.updateCommissionAgreementRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
716
+ };
717
+ return CommissionAgreementRulesApi;
718
+ }(base_1.BaseAPI));
719
+ exports.CommissionAgreementRulesApi = CommissionAgreementRulesApi;