@emilgroup/commission-sdk 1.0.0-beta.9 → 1.1.1-beta.10

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 (167) hide show
  1. package/.openapi-generator/FILES +40 -0
  2. package/README.md +2 -2
  3. package/api/commission-agreement-products-api.ts +55 -13
  4. package/api/commission-agreement-rules-api.ts +800 -0
  5. package/api/commission-agreements-api.ts +160 -27
  6. package/api/commission-candidates-api.ts +693 -0
  7. package/api/commission-recipients-api.ts +4 -4
  8. package/api/commission-settlements-api.ts +800 -0
  9. package/api/commissions-api.ts +125 -18
  10. package/api.ts +6 -0
  11. package/dist/api/commission-agreement-products-api.d.ts +35 -8
  12. package/dist/api/commission-agreement-products-api.js +29 -11
  13. package/dist/api/commission-agreement-rules-api.d.ts +450 -0
  14. package/dist/api/commission-agreement-rules-api.js +737 -0
  15. package/dist/api/commission-agreements-api.d.ts +98 -23
  16. package/dist/api/commission-agreements-api.js +127 -22
  17. package/dist/api/commission-candidates-api.d.ts +393 -0
  18. package/dist/api/commission-candidates-api.js +644 -0
  19. package/dist/api/commission-recipients-api.d.ts +4 -4
  20. package/dist/api/commission-recipients-api.js +3 -3
  21. package/dist/api/commission-settlements-api.d.ts +450 -0
  22. package/dist/api/commission-settlements-api.js +737 -0
  23. package/dist/api/commissions-api.d.ts +75 -18
  24. package/dist/api/commissions-api.js +102 -9
  25. package/dist/api.d.ts +3 -0
  26. package/dist/api.js +3 -0
  27. package/dist/models/commission-agreement-class.d.ts +27 -3
  28. package/dist/models/commission-agreement-class.js +5 -1
  29. package/dist/models/commission-agreement-metadata-dto.d.ts +25 -0
  30. package/dist/models/commission-agreement-metadata-dto.js +15 -0
  31. package/dist/models/commission-agreement-metadata-partner-dto.d.ts +30 -0
  32. package/dist/models/commission-agreement-metadata-partner-dto.js +15 -0
  33. package/dist/models/commission-agreement-product-class.d.ts +6 -7
  34. package/dist/models/commission-agreement-rule-class.d.ts +93 -0
  35. package/dist/models/commission-agreement-rule-class.js +21 -0
  36. package/dist/models/commission-agreement-rule-config-dto.d.ts +25 -0
  37. package/dist/models/commission-agreement-rule-config-dto.js +15 -0
  38. package/dist/models/commission-agreement-rule-evaluation-class.d.ts +31 -0
  39. package/dist/models/commission-agreement-rule-evaluation-class.js +15 -0
  40. package/dist/models/commission-agreement-version-class.d.ts +7 -0
  41. package/dist/models/commission-candidate-class.d.ts +95 -0
  42. package/dist/models/commission-candidate-class.js +20 -0
  43. package/dist/models/commission-class.d.ts +37 -6
  44. package/dist/models/commission-conditions-dto.d.ts +24 -0
  45. package/dist/models/commission-conditions-dto.js +15 -0
  46. package/dist/models/commission-config-dto.d.ts +63 -0
  47. package/dist/models/commission-config-dto.js +34 -0
  48. package/dist/models/commission-estimate-class.d.ts +59 -0
  49. package/dist/models/commission-estimate-class.js +25 -0
  50. package/dist/models/commission-recipient-class.d.ts +6 -6
  51. package/dist/models/commission-settlement-class.d.ts +124 -0
  52. package/dist/models/commission-settlement-class.js +35 -0
  53. package/dist/models/create-commission-agreement-request-dto.d.ts +14 -3
  54. package/dist/models/create-commission-agreement-request-dto.js +5 -1
  55. package/dist/models/create-commission-agreement-rule-request-dto.d.ts +37 -0
  56. package/dist/models/create-commission-agreement-rule-request-dto.js +15 -0
  57. package/dist/models/create-commission-agreement-rule-response-class.d.ts +25 -0
  58. package/dist/models/create-commission-agreement-rule-response-class.js +15 -0
  59. package/dist/models/create-commission-agreement-version-request-dto.d.ts +1 -1
  60. package/dist/models/create-commission-candidate-request-dto.d.ts +65 -0
  61. package/dist/models/create-commission-candidate-request-dto.js +25 -0
  62. package/dist/models/create-commission-candidate-response-class.d.ts +25 -0
  63. package/dist/models/create-commission-candidate-response-class.js +15 -0
  64. package/dist/models/create-commission-recipient-request-dto.d.ts +2 -2
  65. package/dist/models/create-commission-request-dto.d.ts +3 -9
  66. package/dist/models/create-commission-settlement-request-dto.d.ts +57 -0
  67. package/dist/models/create-commission-settlement-request-dto.js +35 -0
  68. package/dist/models/create-commission-settlement-response-class.d.ts +25 -0
  69. package/dist/models/create-commission-settlement-response-class.js +15 -0
  70. package/dist/models/estimate-commissions-request-dto.d.ts +30 -0
  71. package/dist/models/estimate-commissions-request-dto.js +15 -0
  72. package/dist/models/estimate-commissions-response-class.d.ts +73 -0
  73. package/dist/models/estimate-commissions-response-class.js +15 -0
  74. package/dist/models/evaluate-commission-agreement-rule-request-dto.d.ts +31 -0
  75. package/dist/models/evaluate-commission-agreement-rule-request-dto.js +15 -0
  76. package/dist/models/evaluate-commission-agreement-rule-response-class.d.ts +25 -0
  77. package/dist/models/evaluate-commission-agreement-rule-response-class.js +15 -0
  78. package/dist/models/evaluated-commission-class.d.ts +54 -0
  79. package/dist/models/evaluated-commission-class.js +21 -0
  80. package/dist/models/get-commission-agreement-rule-response-class.d.ts +25 -0
  81. package/dist/models/get-commission-agreement-rule-response-class.js +15 -0
  82. package/dist/models/get-commission-candidate-response-class.d.ts +25 -0
  83. package/dist/models/get-commission-candidate-response-class.js +15 -0
  84. package/dist/models/get-commission-settlement-response-class.d.ts +25 -0
  85. package/dist/models/get-commission-settlement-response-class.js +15 -0
  86. package/dist/models/index.d.ts +37 -0
  87. package/dist/models/index.js +37 -0
  88. package/dist/models/list-commission-agreement-rules-response-class.d.ts +43 -0
  89. package/dist/models/list-commission-agreement-rules-response-class.js +15 -0
  90. package/dist/models/list-commission-candidates-response-class.d.ts +43 -0
  91. package/dist/models/list-commission-candidates-response-class.js +15 -0
  92. package/dist/models/list-commission-settlements-response-class.d.ts +43 -0
  93. package/dist/models/list-commission-settlements-response-class.js +15 -0
  94. package/dist/models/patch-commission-agreement-status-request-dto.d.ts +37 -0
  95. package/dist/models/patch-commission-agreement-status-request-dto.js +22 -0
  96. package/dist/models/patch-commission-agreement-status-response-class.d.ts +25 -0
  97. package/dist/models/patch-commission-agreement-status-response-class.js +15 -0
  98. package/dist/models/publish-commission-settlements-request-dto.d.ts +24 -0
  99. package/dist/models/publish-commission-settlements-request-dto.js +15 -0
  100. package/dist/models/publish-commission-settlements-response-class.d.ts +25 -0
  101. package/dist/models/publish-commission-settlements-response-class.js +15 -0
  102. package/dist/models/update-commission-agreement-request-dto.d.ts +3 -1
  103. package/dist/models/update-commission-agreement-request-dto.js +2 -0
  104. package/dist/models/update-commission-agreement-rule-request-dto.d.ts +49 -0
  105. package/dist/models/update-commission-agreement-rule-request-dto.js +21 -0
  106. package/dist/models/update-commission-agreement-rule-response-class.d.ts +25 -0
  107. package/dist/models/update-commission-agreement-rule-response-class.js +15 -0
  108. package/dist/models/update-commission-candidate-request-dto.d.ts +71 -0
  109. package/dist/models/update-commission-candidate-request-dto.js +25 -0
  110. package/dist/models/update-commission-candidate-response-class.d.ts +25 -0
  111. package/dist/models/update-commission-candidate-response-class.js +15 -0
  112. package/dist/models/update-commission-request-dto.d.ts +5 -3
  113. package/dist/models/update-commission-request-dto.js +4 -2
  114. package/dist/models/update-commission-settlement-request-dto.d.ts +43 -0
  115. package/dist/models/update-commission-settlement-request-dto.js +22 -0
  116. package/dist/models/update-commission-settlement-response-class.d.ts +25 -0
  117. package/dist/models/update-commission-settlement-response-class.js +15 -0
  118. package/models/commission-agreement-class.ts +27 -3
  119. package/models/commission-agreement-metadata-dto.ts +31 -0
  120. package/models/commission-agreement-metadata-partner-dto.ts +36 -0
  121. package/models/commission-agreement-product-class.ts +6 -7
  122. package/models/commission-agreement-rule-class.ts +102 -0
  123. package/models/commission-agreement-rule-config-dto.ts +31 -0
  124. package/models/commission-agreement-rule-evaluation-class.ts +37 -0
  125. package/models/commission-agreement-version-class.ts +7 -0
  126. package/models/commission-candidate-class.ts +104 -0
  127. package/models/commission-class.ts +37 -6
  128. package/models/commission-conditions-dto.ts +30 -0
  129. package/models/commission-config-dto.ts +73 -0
  130. package/models/commission-estimate-class.ts +69 -0
  131. package/models/commission-recipient-class.ts +6 -6
  132. package/models/commission-settlement-class.ts +134 -0
  133. package/models/create-commission-agreement-request-dto.ts +14 -3
  134. package/models/create-commission-agreement-rule-request-dto.ts +43 -0
  135. package/models/create-commission-agreement-rule-response-class.ts +31 -0
  136. package/models/create-commission-agreement-version-request-dto.ts +1 -1
  137. package/models/create-commission-candidate-request-dto.ts +75 -0
  138. package/models/create-commission-candidate-response-class.ts +31 -0
  139. package/models/create-commission-recipient-request-dto.ts +2 -2
  140. package/models/create-commission-request-dto.ts +3 -9
  141. package/models/create-commission-settlement-request-dto.ts +67 -0
  142. package/models/create-commission-settlement-response-class.ts +31 -0
  143. package/models/estimate-commissions-request-dto.ts +36 -0
  144. package/models/estimate-commissions-response-class.ts +79 -0
  145. package/models/evaluate-commission-agreement-rule-request-dto.ts +37 -0
  146. package/models/evaluate-commission-agreement-rule-response-class.ts +31 -0
  147. package/models/evaluated-commission-class.ts +63 -0
  148. package/models/get-commission-agreement-rule-response-class.ts +31 -0
  149. package/models/get-commission-candidate-response-class.ts +31 -0
  150. package/models/get-commission-settlement-response-class.ts +31 -0
  151. package/models/index.ts +37 -0
  152. package/models/list-commission-agreement-rules-response-class.ts +49 -0
  153. package/models/list-commission-candidates-response-class.ts +49 -0
  154. package/models/list-commission-settlements-response-class.ts +49 -0
  155. package/models/patch-commission-agreement-status-request-dto.ts +46 -0
  156. package/models/patch-commission-agreement-status-response-class.ts +31 -0
  157. package/models/publish-commission-settlements-request-dto.ts +30 -0
  158. package/models/publish-commission-settlements-response-class.ts +31 -0
  159. package/models/update-commission-agreement-request-dto.ts +3 -1
  160. package/models/update-commission-agreement-rule-request-dto.ts +58 -0
  161. package/models/update-commission-agreement-rule-response-class.ts +31 -0
  162. package/models/update-commission-candidate-request-dto.ts +81 -0
  163. package/models/update-commission-candidate-response-class.ts +31 -0
  164. package/models/update-commission-request-dto.ts +5 -3
  165. package/models/update-commission-settlement-request-dto.ts +52 -0
  166. package/models/update-commission-settlement-response-class.ts +31 -0
  167. package/package.json +2 -1
@@ -0,0 +1,737 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL CommissionService
6
+ * The EMIL CommissionService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.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 {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
300
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
301
+ * @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, commissionAgreementProductCode, status, createdAt&lt;/i&gt;
302
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, commissionAgreementProductCode&lt;/i&gt;
303
+ * @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: code, createdAt, updatedAt, status&lt;/i&gt;
304
+ * @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, commissionAgreementProduct&lt;i&gt;
305
+ * @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, commissionAgreementProductCode, status, createdAt&lt;/i&gt;
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ listCommissionAgreementRules: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
310
+ if (options === void 0) { options = {}; }
311
+ return __awaiter(_this, void 0, void 0, function () {
312
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
313
+ return __generator(this, function (_a) {
314
+ switch (_a.label) {
315
+ case 0:
316
+ localVarPath = "/commissionservice/v1/agreement-rules";
317
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
318
+ if (configuration) {
319
+ baseOptions = configuration.baseOptions;
320
+ baseAccessToken = configuration.accessToken;
321
+ }
322
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
323
+ localVarHeaderParameter = {};
324
+ localVarQueryParameter = {};
325
+ // authentication bearer required
326
+ // http bearer authentication required
327
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
328
+ case 1:
329
+ // authentication bearer required
330
+ // http bearer authentication required
331
+ _a.sent();
332
+ if (pageSize !== undefined) {
333
+ localVarQueryParameter['pageSize'] = pageSize;
334
+ }
335
+ if (pageToken !== undefined) {
336
+ localVarQueryParameter['pageToken'] = pageToken;
337
+ }
338
+ if (filter !== undefined) {
339
+ localVarQueryParameter['filter'] = filter;
340
+ }
341
+ if (search !== undefined) {
342
+ localVarQueryParameter['search'] = search;
343
+ }
344
+ if (order !== undefined) {
345
+ localVarQueryParameter['order'] = order;
346
+ }
347
+ if (expand !== undefined) {
348
+ localVarQueryParameter['expand'] = expand;
349
+ }
350
+ if (filters !== undefined) {
351
+ localVarQueryParameter['filters'] = filters;
352
+ }
353
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
354
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
355
+ }
356
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
357
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
358
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
359
+ return [2 /*return*/, {
360
+ url: (0, common_1.toPathString)(localVarUrlObj),
361
+ options: localVarRequestOptions,
362
+ }];
363
+ }
364
+ });
365
+ });
366
+ },
367
+ /**
368
+ * This will update commission agreement rule.
369
+ * @summary Update the commission agreement rule
370
+ * @param {string} code Unique identifier for the object.
371
+ * @param {UpdateCommissionAgreementRuleRequestDto} updateCommissionAgreementRuleRequestDto
372
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ */
376
+ updateCommissionAgreementRule: function (code, updateCommissionAgreementRuleRequestDto, authorization, options) {
377
+ if (options === void 0) { options = {}; }
378
+ return __awaiter(_this, void 0, void 0, function () {
379
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
380
+ return __generator(this, function (_a) {
381
+ switch (_a.label) {
382
+ case 0:
383
+ // verify required parameter 'code' is not null or undefined
384
+ (0, common_1.assertParamExists)('updateCommissionAgreementRule', 'code', code);
385
+ // verify required parameter 'updateCommissionAgreementRuleRequestDto' is not null or undefined
386
+ (0, common_1.assertParamExists)('updateCommissionAgreementRule', 'updateCommissionAgreementRuleRequestDto', updateCommissionAgreementRuleRequestDto);
387
+ localVarPath = "/commissionservice/v1/agreement-rules/{code}"
388
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
389
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
390
+ if (configuration) {
391
+ baseOptions = configuration.baseOptions;
392
+ baseAccessToken = configuration.accessToken;
393
+ }
394
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
395
+ localVarHeaderParameter = {};
396
+ localVarQueryParameter = {};
397
+ // authentication bearer required
398
+ // http bearer authentication required
399
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
400
+ case 1:
401
+ // authentication bearer required
402
+ // http bearer authentication required
403
+ _a.sent();
404
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
405
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
406
+ }
407
+ localVarHeaderParameter['Content-Type'] = 'application/json';
408
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
409
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
410
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
411
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCommissionAgreementRuleRequestDto, localVarRequestOptions, configuration);
412
+ return [2 /*return*/, {
413
+ url: (0, common_1.toPathString)(localVarUrlObj),
414
+ options: localVarRequestOptions,
415
+ }];
416
+ }
417
+ });
418
+ });
419
+ },
420
+ };
421
+ };
422
+ exports.CommissionAgreementRulesApiAxiosParamCreator = CommissionAgreementRulesApiAxiosParamCreator;
423
+ /**
424
+ * CommissionAgreementRulesApi - functional programming interface
425
+ * @export
426
+ */
427
+ var CommissionAgreementRulesApiFp = function (configuration) {
428
+ var localVarAxiosParamCreator = (0, exports.CommissionAgreementRulesApiAxiosParamCreator)(configuration);
429
+ return {
430
+ /**
431
+ * This will create commission agreement rule.
432
+ * @summary Create the commission agreement rule
433
+ * @param {CreateCommissionAgreementRuleRequestDto} createCommissionAgreementRuleRequestDto
434
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ */
438
+ createCommissionAgreementRule: function (createCommissionAgreementRuleRequestDto, authorization, options) {
439
+ return __awaiter(this, void 0, void 0, function () {
440
+ var localVarAxiosArgs;
441
+ return __generator(this, function (_a) {
442
+ switch (_a.label) {
443
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCommissionAgreementRule(createCommissionAgreementRuleRequestDto, authorization, options)];
444
+ case 1:
445
+ localVarAxiosArgs = _a.sent();
446
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
447
+ }
448
+ });
449
+ });
450
+ },
451
+ /**
452
+ * This will delete commission agreement rule.
453
+ * @summary Delete the commission agreement rule
454
+ * @param {string} code Unique identifier for the object.
455
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ deleteCommissionAgreementRule: function (code, authorization, options) {
460
+ return __awaiter(this, void 0, void 0, function () {
461
+ var localVarAxiosArgs;
462
+ return __generator(this, function (_a) {
463
+ switch (_a.label) {
464
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteCommissionAgreementRule(code, authorization, options)];
465
+ case 1:
466
+ localVarAxiosArgs = _a.sent();
467
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
468
+ }
469
+ });
470
+ });
471
+ },
472
+ /**
473
+ * Evaluates commission agreement rule expressions with mock data and returns calculated commission values for first year and following years.
474
+ * @summary Create the commission agreement rule evaluation
475
+ * @param {EvaluateCommissionAgreementRuleRequestDto} evaluateCommissionAgreementRuleRequestDto
476
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
477
+ * @param {*} [options] Override http request option.
478
+ * @throws {RequiredError}
479
+ */
480
+ evaluateCommissionAgreementRule: function (evaluateCommissionAgreementRuleRequestDto, authorization, options) {
481
+ return __awaiter(this, void 0, void 0, function () {
482
+ var localVarAxiosArgs;
483
+ return __generator(this, function (_a) {
484
+ switch (_a.label) {
485
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.evaluateCommissionAgreementRule(evaluateCommissionAgreementRuleRequestDto, authorization, options)];
486
+ case 1:
487
+ localVarAxiosArgs = _a.sent();
488
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
489
+ }
490
+ });
491
+ });
492
+ },
493
+ /**
494
+ * This will get commission agreement rule.
495
+ * @summary Retrieve the commission agreement rule
496
+ * @param {string} code
497
+ * @param {string} expand
498
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ getCommissionAgreementRule: function (code, expand, authorization, options) {
503
+ return __awaiter(this, void 0, void 0, function () {
504
+ var localVarAxiosArgs;
505
+ return __generator(this, function (_a) {
506
+ switch (_a.label) {
507
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCommissionAgreementRule(code, expand, authorization, options)];
508
+ case 1:
509
+ localVarAxiosArgs = _a.sent();
510
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
511
+ }
512
+ });
513
+ });
514
+ },
515
+ /**
516
+ * Retrieves a list of commission agreement rules.
517
+ * @summary List commission agreement rules
518
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
519
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
520
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
521
+ * @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, commissionAgreementProductCode, status, createdAt&lt;/i&gt;
522
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, commissionAgreementProductCode&lt;/i&gt;
523
+ * @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: code, createdAt, updatedAt, status&lt;/i&gt;
524
+ * @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, commissionAgreementProduct&lt;i&gt;
525
+ * @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, commissionAgreementProductCode, status, createdAt&lt;/i&gt;
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ listCommissionAgreementRules: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
530
+ return __awaiter(this, void 0, void 0, function () {
531
+ var localVarAxiosArgs;
532
+ return __generator(this, function (_a) {
533
+ switch (_a.label) {
534
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCommissionAgreementRules(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
535
+ case 1:
536
+ localVarAxiosArgs = _a.sent();
537
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
538
+ }
539
+ });
540
+ });
541
+ },
542
+ /**
543
+ * This will update commission agreement rule.
544
+ * @summary Update the commission agreement rule
545
+ * @param {string} code Unique identifier for the object.
546
+ * @param {UpdateCommissionAgreementRuleRequestDto} updateCommissionAgreementRuleRequestDto
547
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
548
+ * @param {*} [options] Override http request option.
549
+ * @throws {RequiredError}
550
+ */
551
+ updateCommissionAgreementRule: function (code, updateCommissionAgreementRuleRequestDto, authorization, options) {
552
+ return __awaiter(this, void 0, void 0, function () {
553
+ var localVarAxiosArgs;
554
+ return __generator(this, function (_a) {
555
+ switch (_a.label) {
556
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCommissionAgreementRule(code, updateCommissionAgreementRuleRequestDto, authorization, options)];
557
+ case 1:
558
+ localVarAxiosArgs = _a.sent();
559
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
560
+ }
561
+ });
562
+ });
563
+ },
564
+ };
565
+ };
566
+ exports.CommissionAgreementRulesApiFp = CommissionAgreementRulesApiFp;
567
+ /**
568
+ * CommissionAgreementRulesApi - factory interface
569
+ * @export
570
+ */
571
+ var CommissionAgreementRulesApiFactory = function (configuration, basePath, axios) {
572
+ var localVarFp = (0, exports.CommissionAgreementRulesApiFp)(configuration);
573
+ return {
574
+ /**
575
+ * This will create commission agreement rule.
576
+ * @summary Create the commission agreement rule
577
+ * @param {CreateCommissionAgreementRuleRequestDto} createCommissionAgreementRuleRequestDto
578
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
579
+ * @param {*} [options] Override http request option.
580
+ * @throws {RequiredError}
581
+ */
582
+ createCommissionAgreementRule: function (createCommissionAgreementRuleRequestDto, authorization, options) {
583
+ return localVarFp.createCommissionAgreementRule(createCommissionAgreementRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
584
+ },
585
+ /**
586
+ * This will delete commission agreement rule.
587
+ * @summary Delete the commission agreement rule
588
+ * @param {string} code Unique identifier for the object.
589
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
590
+ * @param {*} [options] Override http request option.
591
+ * @throws {RequiredError}
592
+ */
593
+ deleteCommissionAgreementRule: function (code, authorization, options) {
594
+ return localVarFp.deleteCommissionAgreementRule(code, authorization, options).then(function (request) { return request(axios, basePath); });
595
+ },
596
+ /**
597
+ * Evaluates commission agreement rule expressions with mock data and returns calculated commission values for first year and following years.
598
+ * @summary Create the commission agreement rule evaluation
599
+ * @param {EvaluateCommissionAgreementRuleRequestDto} evaluateCommissionAgreementRuleRequestDto
600
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
601
+ * @param {*} [options] Override http request option.
602
+ * @throws {RequiredError}
603
+ */
604
+ evaluateCommissionAgreementRule: function (evaluateCommissionAgreementRuleRequestDto, authorization, options) {
605
+ return localVarFp.evaluateCommissionAgreementRule(evaluateCommissionAgreementRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
606
+ },
607
+ /**
608
+ * This will get commission agreement rule.
609
+ * @summary Retrieve the commission agreement rule
610
+ * @param {string} code
611
+ * @param {string} expand
612
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
613
+ * @param {*} [options] Override http request option.
614
+ * @throws {RequiredError}
615
+ */
616
+ getCommissionAgreementRule: function (code, expand, authorization, options) {
617
+ return localVarFp.getCommissionAgreementRule(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
618
+ },
619
+ /**
620
+ * Retrieves a list of commission agreement rules.
621
+ * @summary List commission agreement rules
622
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
623
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
624
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
625
+ * @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, commissionAgreementProductCode, status, createdAt&lt;/i&gt;
626
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, commissionAgreementProductCode&lt;/i&gt;
627
+ * @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: code, createdAt, updatedAt, status&lt;/i&gt;
628
+ * @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, commissionAgreementProduct&lt;i&gt;
629
+ * @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, commissionAgreementProductCode, status, createdAt&lt;/i&gt;
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ listCommissionAgreementRules: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
634
+ return localVarFp.listCommissionAgreementRules(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
635
+ },
636
+ /**
637
+ * This will update commission agreement rule.
638
+ * @summary Update the commission agreement rule
639
+ * @param {string} code Unique identifier for the object.
640
+ * @param {UpdateCommissionAgreementRuleRequestDto} updateCommissionAgreementRuleRequestDto
641
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
642
+ * @param {*} [options] Override http request option.
643
+ * @throws {RequiredError}
644
+ */
645
+ updateCommissionAgreementRule: function (code, updateCommissionAgreementRuleRequestDto, authorization, options) {
646
+ return localVarFp.updateCommissionAgreementRule(code, updateCommissionAgreementRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
647
+ },
648
+ };
649
+ };
650
+ exports.CommissionAgreementRulesApiFactory = CommissionAgreementRulesApiFactory;
651
+ /**
652
+ * CommissionAgreementRulesApi - object-oriented interface
653
+ * @export
654
+ * @class CommissionAgreementRulesApi
655
+ * @extends {BaseAPI}
656
+ */
657
+ var CommissionAgreementRulesApi = /** @class */ (function (_super) {
658
+ __extends(CommissionAgreementRulesApi, _super);
659
+ function CommissionAgreementRulesApi() {
660
+ return _super !== null && _super.apply(this, arguments) || this;
661
+ }
662
+ /**
663
+ * This will create commission agreement rule.
664
+ * @summary Create the commission agreement rule
665
+ * @param {CommissionAgreementRulesApiCreateCommissionAgreementRuleRequest} requestParameters Request parameters.
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ * @memberof CommissionAgreementRulesApi
669
+ */
670
+ CommissionAgreementRulesApi.prototype.createCommissionAgreementRule = function (requestParameters, options) {
671
+ var _this = this;
672
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).createCommissionAgreementRule(requestParameters.createCommissionAgreementRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
673
+ };
674
+ /**
675
+ * This will delete commission agreement rule.
676
+ * @summary Delete the commission agreement rule
677
+ * @param {CommissionAgreementRulesApiDeleteCommissionAgreementRuleRequest} requestParameters Request parameters.
678
+ * @param {*} [options] Override http request option.
679
+ * @throws {RequiredError}
680
+ * @memberof CommissionAgreementRulesApi
681
+ */
682
+ CommissionAgreementRulesApi.prototype.deleteCommissionAgreementRule = function (requestParameters, options) {
683
+ var _this = this;
684
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).deleteCommissionAgreementRule(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
685
+ };
686
+ /**
687
+ * Evaluates commission agreement rule expressions with mock data and returns calculated commission values for first year and following years.
688
+ * @summary Create the commission agreement rule evaluation
689
+ * @param {CommissionAgreementRulesApiEvaluateCommissionAgreementRuleRequest} requestParameters Request parameters.
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ * @memberof CommissionAgreementRulesApi
693
+ */
694
+ CommissionAgreementRulesApi.prototype.evaluateCommissionAgreementRule = function (requestParameters, options) {
695
+ var _this = this;
696
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).evaluateCommissionAgreementRule(requestParameters.evaluateCommissionAgreementRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
697
+ };
698
+ /**
699
+ * This will get commission agreement rule.
700
+ * @summary Retrieve the commission agreement rule
701
+ * @param {CommissionAgreementRulesApiGetCommissionAgreementRuleRequest} requestParameters Request parameters.
702
+ * @param {*} [options] Override http request option.
703
+ * @throws {RequiredError}
704
+ * @memberof CommissionAgreementRulesApi
705
+ */
706
+ CommissionAgreementRulesApi.prototype.getCommissionAgreementRule = function (requestParameters, options) {
707
+ var _this = this;
708
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).getCommissionAgreementRule(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
709
+ };
710
+ /**
711
+ * Retrieves a list of commission agreement rules.
712
+ * @summary List commission agreement rules
713
+ * @param {CommissionAgreementRulesApiListCommissionAgreementRulesRequest} requestParameters Request parameters.
714
+ * @param {*} [options] Override http request option.
715
+ * @throws {RequiredError}
716
+ * @memberof CommissionAgreementRulesApi
717
+ */
718
+ CommissionAgreementRulesApi.prototype.listCommissionAgreementRules = function (requestParameters, options) {
719
+ var _this = this;
720
+ if (requestParameters === void 0) { requestParameters = {}; }
721
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).listCommissionAgreementRules(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
+ };
723
+ /**
724
+ * This will update commission agreement rule.
725
+ * @summary Update the commission agreement rule
726
+ * @param {CommissionAgreementRulesApiUpdateCommissionAgreementRuleRequest} requestParameters Request parameters.
727
+ * @param {*} [options] Override http request option.
728
+ * @throws {RequiredError}
729
+ * @memberof CommissionAgreementRulesApi
730
+ */
731
+ CommissionAgreementRulesApi.prototype.updateCommissionAgreementRule = function (requestParameters, options) {
732
+ var _this = this;
733
+ return (0, exports.CommissionAgreementRulesApiFp)(this.configuration).updateCommissionAgreementRule(requestParameters.code, requestParameters.updateCommissionAgreementRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
734
+ };
735
+ return CommissionAgreementRulesApi;
736
+ }(base_1.BaseAPI));
737
+ exports.CommissionAgreementRulesApi = CommissionAgreementRulesApi;