@emilgroup/insurance-sdk-node 1.52.0 → 1.53.0

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 (114) hide show
  1. package/.openapi-generator/FILES +33 -1
  2. package/README.md +2 -2
  3. package/api/commission-agreement-products-api.ts +710 -0
  4. package/api/commission-agreement-versions-api.ts +592 -0
  5. package/api/commission-agreements-api.ts +697 -0
  6. package/api/commission-recipients-api.ts +696 -0
  7. package/api/{default-api.ts → health-check-api.ts} +21 -17
  8. package/api/insured-objects-api.ts +5 -2
  9. package/api/policies-api.ts +176 -221
  10. package/api.ts +10 -2
  11. package/dist/api/commission-agreement-products-api.d.ts +403 -0
  12. package/dist/api/commission-agreement-products-api.js +652 -0
  13. package/dist/api/commission-agreement-versions-api.d.ts +337 -0
  14. package/dist/api/commission-agreement-versions-api.js +555 -0
  15. package/dist/api/commission-agreements-api.d.ts +394 -0
  16. package/dist/api/commission-agreements-api.js +646 -0
  17. package/dist/api/commission-recipients-api.d.ts +394 -0
  18. package/dist/api/commission-recipients-api.js +646 -0
  19. package/dist/api/health-check-api.d.ts +70 -0
  20. package/dist/api/{default-api.js → health-check-api.js} +30 -26
  21. package/dist/api/insured-objects-api.js +4 -2
  22. package/dist/api/policies-api.d.ts +134 -161
  23. package/dist/api/policies-api.js +129 -151
  24. package/dist/api.d.ts +5 -1
  25. package/dist/api.js +5 -1
  26. package/dist/models/commission-agreement-class.d.ts +89 -0
  27. package/dist/models/commission-agreement-class.js +23 -0
  28. package/dist/models/commission-agreement-item-class.d.ts +66 -0
  29. package/dist/models/commission-agreement-item-class.js +15 -0
  30. package/dist/models/commission-agreement-product-class.d.ts +72 -0
  31. package/dist/models/commission-agreement-product-class.js +15 -0
  32. package/dist/models/commission-agreement-version-class.d.ts +79 -0
  33. package/dist/models/commission-agreement-version-class.js +15 -0
  34. package/dist/models/commission-recipient-class.d.ts +78 -0
  35. package/dist/models/commission-recipient-class.js +15 -0
  36. package/dist/models/create-commission-agreement-item-dto.d.ts +36 -0
  37. package/dist/models/create-commission-agreement-item-dto.js +15 -0
  38. package/dist/models/create-commission-agreement-product-request-dto.d.ts +42 -0
  39. package/dist/models/create-commission-agreement-product-request-dto.js +15 -0
  40. package/dist/models/create-commission-agreement-product-response-class.d.ts +25 -0
  41. package/dist/models/create-commission-agreement-product-response-class.js +15 -0
  42. package/dist/models/create-commission-agreement-request-dto.d.ts +75 -0
  43. package/dist/models/create-commission-agreement-request-dto.js +23 -0
  44. package/dist/models/create-commission-agreement-response-class.d.ts +25 -0
  45. package/dist/models/create-commission-agreement-response-class.js +15 -0
  46. package/dist/models/create-commission-agreement-version-request-dto.d.ts +49 -0
  47. package/dist/models/create-commission-agreement-version-request-dto.js +15 -0
  48. package/dist/models/create-commission-agreement-version-response-class.d.ts +25 -0
  49. package/dist/models/create-commission-agreement-version-response-class.js +15 -0
  50. package/dist/models/create-commission-recipient-request-dto.d.ts +48 -0
  51. package/dist/models/create-commission-recipient-request-dto.js +15 -0
  52. package/dist/models/create-commission-recipient-response-class.d.ts +25 -0
  53. package/dist/models/create-commission-recipient-response-class.js +15 -0
  54. package/dist/models/get-commission-agreement-product-response-class.d.ts +25 -0
  55. package/dist/models/get-commission-agreement-product-response-class.js +15 -0
  56. package/dist/models/get-commission-agreement-response-class.d.ts +25 -0
  57. package/dist/models/get-commission-agreement-response-class.js +15 -0
  58. package/dist/models/get-commission-agreement-version-response-class.d.ts +25 -0
  59. package/dist/models/get-commission-agreement-version-response-class.js +15 -0
  60. package/dist/models/get-commission-recipient-response-class.d.ts +25 -0
  61. package/dist/models/get-commission-recipient-response-class.js +15 -0
  62. package/dist/models/index.d.ts +28 -0
  63. package/dist/models/index.js +28 -0
  64. package/dist/models/list-commission-agreement-products-response-class.d.ts +31 -0
  65. package/dist/models/list-commission-agreement-products-response-class.js +15 -0
  66. package/dist/models/list-commission-agreement-versions-response-class.d.ts +31 -0
  67. package/dist/models/list-commission-agreement-versions-response-class.js +15 -0
  68. package/dist/models/list-commission-agreements-response-class.d.ts +31 -0
  69. package/dist/models/list-commission-agreements-response-class.js +15 -0
  70. package/dist/models/list-commission-recipients-response-class.d.ts +31 -0
  71. package/dist/models/list-commission-recipients-response-class.js +15 -0
  72. package/dist/models/update-commission-agreement-product-request-dto.d.ts +42 -0
  73. package/dist/models/update-commission-agreement-product-request-dto.js +15 -0
  74. package/dist/models/update-commission-agreement-product-response-class.d.ts +25 -0
  75. package/dist/models/update-commission-agreement-product-response-class.js +15 -0
  76. package/dist/models/update-commission-agreement-request-dto.d.ts +44 -0
  77. package/dist/models/update-commission-agreement-request-dto.js +23 -0
  78. package/dist/models/update-commission-agreement-response-class.d.ts +25 -0
  79. package/dist/models/update-commission-agreement-response-class.js +15 -0
  80. package/dist/models/update-commission-recipient-request-dto.d.ts +48 -0
  81. package/dist/models/update-commission-recipient-request-dto.js +15 -0
  82. package/dist/models/update-commission-recipient-response-class.d.ts +25 -0
  83. package/dist/models/update-commission-recipient-response-class.js +15 -0
  84. package/models/commission-agreement-class.ts +98 -0
  85. package/models/commission-agreement-item-class.ts +72 -0
  86. package/models/commission-agreement-product-class.ts +78 -0
  87. package/models/commission-agreement-version-class.ts +85 -0
  88. package/models/commission-recipient-class.ts +84 -0
  89. package/models/create-commission-agreement-item-dto.ts +42 -0
  90. package/models/create-commission-agreement-product-request-dto.ts +48 -0
  91. package/models/create-commission-agreement-product-response-class.ts +31 -0
  92. package/models/create-commission-agreement-request-dto.ts +84 -0
  93. package/models/create-commission-agreement-response-class.ts +31 -0
  94. package/models/create-commission-agreement-version-request-dto.ts +55 -0
  95. package/models/create-commission-agreement-version-response-class.ts +31 -0
  96. package/models/create-commission-recipient-request-dto.ts +54 -0
  97. package/models/create-commission-recipient-response-class.ts +31 -0
  98. package/models/get-commission-agreement-product-response-class.ts +31 -0
  99. package/models/get-commission-agreement-response-class.ts +31 -0
  100. package/models/get-commission-agreement-version-response-class.ts +31 -0
  101. package/models/get-commission-recipient-response-class.ts +31 -0
  102. package/models/index.ts +28 -0
  103. package/models/list-commission-agreement-products-response-class.ts +37 -0
  104. package/models/list-commission-agreement-versions-response-class.ts +37 -0
  105. package/models/list-commission-agreements-response-class.ts +37 -0
  106. package/models/list-commission-recipients-response-class.ts +37 -0
  107. package/models/update-commission-agreement-product-request-dto.ts +48 -0
  108. package/models/update-commission-agreement-product-response-class.ts +31 -0
  109. package/models/update-commission-agreement-request-dto.ts +53 -0
  110. package/models/update-commission-agreement-response-class.ts +31 -0
  111. package/models/update-commission-recipient-request-dto.ts +54 -0
  112. package/models/update-commission-recipient-response-class.ts +31 -0
  113. package/package.json +1 -1
  114. package/dist/api/default-api.d.ts +0 -66
@@ -0,0 +1,646 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL InsuranceService
6
+ * The EMIL InsuranceService 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.CommissionRecipientsApi = exports.CommissionRecipientsApiFactory = exports.CommissionRecipientsApiFp = exports.CommissionRecipientsApiAxiosParamCreator = 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
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * CommissionRecipientsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var CommissionRecipientsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * This will create the commission recipient.
101
+ * @summary Create the Commission recipient
102
+ * @param {string} code
103
+ * @param {CreateCommissionRecipientRequestDto} createCommissionRecipientRequestDto
104
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ createCommissionRecipient: function (code, createCommissionRecipientRequestDto, authorization, options) {
109
+ if (options === void 0) { options = {}; }
110
+ return __awaiter(_this, void 0, void 0, function () {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
+ return __generator(this, function (_a) {
113
+ switch (_a.label) {
114
+ case 0:
115
+ // verify required parameter 'code' is not null or undefined
116
+ (0, common_1.assertParamExists)('createCommissionRecipient', 'code', code);
117
+ // verify required parameter 'createCommissionRecipientRequestDto' is not null or undefined
118
+ (0, common_1.assertParamExists)('createCommissionRecipient', 'createCommissionRecipientRequestDto', createCommissionRecipientRequestDto);
119
+ localVarPath = "/insuranceservice/v1/commission-agreements/{code}/recipients"
120
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
121
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ baseAccessToken = configuration.accessToken;
125
+ }
126
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
127
+ localVarHeaderParameter = {};
128
+ localVarQueryParameter = {};
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
132
+ case 1:
133
+ // authentication bearer required
134
+ // http bearer authentication required
135
+ _a.sent();
136
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
138
+ }
139
+ localVarHeaderParameter['Content-Type'] = 'application/json';
140
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
141
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
142
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
143
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCommissionRecipientRequestDto, localVarRequestOptions, configuration);
144
+ return [2 /*return*/, {
145
+ url: (0, common_1.toPathString)(localVarUrlObj),
146
+ options: localVarRequestOptions,
147
+ }];
148
+ }
149
+ });
150
+ });
151
+ },
152
+ /**
153
+ * Permanently deletes the commission recipient. Supply the unique code that was returned when you created the commission recipient and this will delete it.
154
+ * @summary Delete the commission recipient
155
+ * @param {string} code
156
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
157
+ * @param {*} [options] Override http request option.
158
+ * @throws {RequiredError}
159
+ */
160
+ deleteCommissionRecipient: function (code, authorization, options) {
161
+ if (options === void 0) { options = {}; }
162
+ return __awaiter(_this, void 0, void 0, function () {
163
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
164
+ return __generator(this, function (_a) {
165
+ switch (_a.label) {
166
+ case 0:
167
+ // verify required parameter 'code' is not null or undefined
168
+ (0, common_1.assertParamExists)('deleteCommissionRecipient', 'code', code);
169
+ localVarPath = "/insuranceservice/v1/commission-agreements/recipients/{code}"
170
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
171
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
172
+ if (configuration) {
173
+ baseOptions = configuration.baseOptions;
174
+ baseAccessToken = configuration.accessToken;
175
+ }
176
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
177
+ localVarHeaderParameter = {};
178
+ localVarQueryParameter = {};
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
182
+ case 1:
183
+ // authentication bearer required
184
+ // http bearer authentication required
185
+ _a.sent();
186
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
187
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
188
+ }
189
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
190
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
192
+ return [2 /*return*/, {
193
+ url: (0, common_1.toPathString)(localVarUrlObj),
194
+ options: localVarRequestOptions,
195
+ }];
196
+ }
197
+ });
198
+ });
199
+ },
200
+ /**
201
+ * Retrieves the details of the commission recipient that was previously created. Supply the unique commission recipient code that was returned when you created it and Emil Api will return the corresponding commission recipient information.
202
+ * @summary Retrieve the commission recipient
203
+ * @param {string} code
204
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ getCommissionRecipient: function (code, authorization, options) {
209
+ if (options === void 0) { options = {}; }
210
+ return __awaiter(_this, void 0, void 0, function () {
211
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
212
+ return __generator(this, function (_a) {
213
+ switch (_a.label) {
214
+ case 0:
215
+ // verify required parameter 'code' is not null or undefined
216
+ (0, common_1.assertParamExists)('getCommissionRecipient', 'code', code);
217
+ localVarPath = "/insuranceservice/v1/commission-agreements/recipients/{code}"
218
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
219
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
220
+ if (configuration) {
221
+ baseOptions = configuration.baseOptions;
222
+ baseAccessToken = configuration.accessToken;
223
+ }
224
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
225
+ localVarHeaderParameter = {};
226
+ localVarQueryParameter = {};
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
230
+ case 1:
231
+ // authentication bearer required
232
+ // http bearer authentication required
233
+ _a.sent();
234
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
235
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
236
+ }
237
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
238
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
239
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
240
+ return [2 /*return*/, {
241
+ url: (0, common_1.toPathString)(localVarUrlObj),
242
+ options: localVarRequestOptions,
243
+ }];
244
+ }
245
+ });
246
+ });
247
+ },
248
+ /**
249
+ * Returns a list of commission recipients you have previously created. The commission recipients are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
250
+ * @summary List commission recipients
251
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
252
+ * @param {number} [pageSize] Page size.
253
+ * @param {string} [pageToken] Page token.
254
+ * @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: code, partnerCode, displayName, commissionAgreementId&lt;/i&gt;
255
+ * @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: displayName, partnerCode, code&lt;/i&gt;
256
+ * @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: id, createdAt, updatedAt&lt;/i&gt;
257
+ * @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: .&lt;i&gt;
258
+ * @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: code, partnerCode, displayName, commissionAgreementId&lt;/i&gt;
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ listCommissionRecipients: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
263
+ if (options === void 0) { options = {}; }
264
+ return __awaiter(_this, void 0, void 0, function () {
265
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
266
+ return __generator(this, function (_a) {
267
+ switch (_a.label) {
268
+ case 0:
269
+ localVarPath = "/insuranceservice/v1/commission-agreements/recipients";
270
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
271
+ if (configuration) {
272
+ baseOptions = configuration.baseOptions;
273
+ baseAccessToken = configuration.accessToken;
274
+ }
275
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
276
+ localVarHeaderParameter = {};
277
+ localVarQueryParameter = {};
278
+ // authentication bearer required
279
+ // http bearer authentication required
280
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
281
+ case 1:
282
+ // authentication bearer required
283
+ // http bearer authentication required
284
+ _a.sent();
285
+ if (pageSize !== undefined) {
286
+ localVarQueryParameter['pageSize'] = pageSize;
287
+ }
288
+ if (pageToken !== undefined) {
289
+ localVarQueryParameter['pageToken'] = pageToken;
290
+ }
291
+ if (filter !== undefined) {
292
+ localVarQueryParameter['filter'] = filter;
293
+ }
294
+ if (search !== undefined) {
295
+ localVarQueryParameter['search'] = search;
296
+ }
297
+ if (order !== undefined) {
298
+ localVarQueryParameter['order'] = order;
299
+ }
300
+ if (expand !== undefined) {
301
+ localVarQueryParameter['expand'] = expand;
302
+ }
303
+ if (filters !== undefined) {
304
+ localVarQueryParameter['filters'] = filters;
305
+ }
306
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
307
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
308
+ }
309
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
310
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
311
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
312
+ return [2 /*return*/, {
313
+ url: (0, common_1.toPathString)(localVarUrlObj),
314
+ options: localVarRequestOptions,
315
+ }];
316
+ }
317
+ });
318
+ });
319
+ },
320
+ /**
321
+ * Updates the specified commission recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
322
+ * @summary Update the commission recipient
323
+ * @param {string} code
324
+ * @param {UpdateCommissionRecipientRequestDto} updateCommissionRecipientRequestDto
325
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ updateCommissionRecipient: function (code, updateCommissionRecipientRequestDto, authorization, options) {
330
+ if (options === void 0) { options = {}; }
331
+ return __awaiter(_this, void 0, void 0, function () {
332
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
333
+ return __generator(this, function (_a) {
334
+ switch (_a.label) {
335
+ case 0:
336
+ // verify required parameter 'code' is not null or undefined
337
+ (0, common_1.assertParamExists)('updateCommissionRecipient', 'code', code);
338
+ // verify required parameter 'updateCommissionRecipientRequestDto' is not null or undefined
339
+ (0, common_1.assertParamExists)('updateCommissionRecipient', 'updateCommissionRecipientRequestDto', updateCommissionRecipientRequestDto);
340
+ localVarPath = "/insuranceservice/v1/commission-agreements/recipients/{code}"
341
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
342
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
343
+ if (configuration) {
344
+ baseOptions = configuration.baseOptions;
345
+ baseAccessToken = configuration.accessToken;
346
+ }
347
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
348
+ localVarHeaderParameter = {};
349
+ localVarQueryParameter = {};
350
+ // authentication bearer required
351
+ // http bearer authentication required
352
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
353
+ case 1:
354
+ // authentication bearer required
355
+ // http bearer authentication required
356
+ _a.sent();
357
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
358
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
359
+ }
360
+ localVarHeaderParameter['Content-Type'] = 'application/json';
361
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
362
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
363
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
364
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCommissionRecipientRequestDto, localVarRequestOptions, configuration);
365
+ return [2 /*return*/, {
366
+ url: (0, common_1.toPathString)(localVarUrlObj),
367
+ options: localVarRequestOptions,
368
+ }];
369
+ }
370
+ });
371
+ });
372
+ },
373
+ };
374
+ };
375
+ exports.CommissionRecipientsApiAxiosParamCreator = CommissionRecipientsApiAxiosParamCreator;
376
+ /**
377
+ * CommissionRecipientsApi - functional programming interface
378
+ * @export
379
+ */
380
+ var CommissionRecipientsApiFp = function (configuration) {
381
+ var localVarAxiosParamCreator = (0, exports.CommissionRecipientsApiAxiosParamCreator)(configuration);
382
+ return {
383
+ /**
384
+ * This will create the commission recipient.
385
+ * @summary Create the Commission recipient
386
+ * @param {string} code
387
+ * @param {CreateCommissionRecipientRequestDto} createCommissionRecipientRequestDto
388
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
389
+ * @param {*} [options] Override http request option.
390
+ * @throws {RequiredError}
391
+ */
392
+ createCommissionRecipient: function (code, createCommissionRecipientRequestDto, authorization, options) {
393
+ return __awaiter(this, void 0, void 0, function () {
394
+ var localVarAxiosArgs;
395
+ return __generator(this, function (_a) {
396
+ switch (_a.label) {
397
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCommissionRecipient(code, createCommissionRecipientRequestDto, authorization, options)];
398
+ case 1:
399
+ localVarAxiosArgs = _a.sent();
400
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
401
+ }
402
+ });
403
+ });
404
+ },
405
+ /**
406
+ * Permanently deletes the commission recipient. Supply the unique code that was returned when you created the commission recipient and this will delete it.
407
+ * @summary Delete the commission recipient
408
+ * @param {string} code
409
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ */
413
+ deleteCommissionRecipient: function (code, authorization, options) {
414
+ return __awaiter(this, void 0, void 0, function () {
415
+ var localVarAxiosArgs;
416
+ return __generator(this, function (_a) {
417
+ switch (_a.label) {
418
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteCommissionRecipient(code, authorization, options)];
419
+ case 1:
420
+ localVarAxiosArgs = _a.sent();
421
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
422
+ }
423
+ });
424
+ });
425
+ },
426
+ /**
427
+ * Retrieves the details of the commission recipient that was previously created. Supply the unique commission recipient code that was returned when you created it and Emil Api will return the corresponding commission recipient information.
428
+ * @summary Retrieve the commission recipient
429
+ * @param {string} code
430
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
431
+ * @param {*} [options] Override http request option.
432
+ * @throws {RequiredError}
433
+ */
434
+ getCommissionRecipient: function (code, authorization, options) {
435
+ return __awaiter(this, void 0, void 0, function () {
436
+ var localVarAxiosArgs;
437
+ return __generator(this, function (_a) {
438
+ switch (_a.label) {
439
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCommissionRecipient(code, authorization, options)];
440
+ case 1:
441
+ localVarAxiosArgs = _a.sent();
442
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
443
+ }
444
+ });
445
+ });
446
+ },
447
+ /**
448
+ * Returns a list of commission recipients you have previously created. The commission recipients are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
449
+ * @summary List commission recipients
450
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
451
+ * @param {number} [pageSize] Page size.
452
+ * @param {string} [pageToken] Page token.
453
+ * @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: code, partnerCode, displayName, commissionAgreementId&lt;/i&gt;
454
+ * @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: displayName, partnerCode, code&lt;/i&gt;
455
+ * @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: id, createdAt, updatedAt&lt;/i&gt;
456
+ * @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: .&lt;i&gt;
457
+ * @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: code, partnerCode, displayName, commissionAgreementId&lt;/i&gt;
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ */
461
+ listCommissionRecipients: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
462
+ return __awaiter(this, void 0, void 0, function () {
463
+ var localVarAxiosArgs;
464
+ return __generator(this, function (_a) {
465
+ switch (_a.label) {
466
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCommissionRecipients(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
467
+ case 1:
468
+ localVarAxiosArgs = _a.sent();
469
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
470
+ }
471
+ });
472
+ });
473
+ },
474
+ /**
475
+ * Updates the specified commission recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
476
+ * @summary Update the commission recipient
477
+ * @param {string} code
478
+ * @param {UpdateCommissionRecipientRequestDto} updateCommissionRecipientRequestDto
479
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
480
+ * @param {*} [options] Override http request option.
481
+ * @throws {RequiredError}
482
+ */
483
+ updateCommissionRecipient: function (code, updateCommissionRecipientRequestDto, authorization, options) {
484
+ return __awaiter(this, void 0, void 0, function () {
485
+ var localVarAxiosArgs;
486
+ return __generator(this, function (_a) {
487
+ switch (_a.label) {
488
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCommissionRecipient(code, updateCommissionRecipientRequestDto, authorization, options)];
489
+ case 1:
490
+ localVarAxiosArgs = _a.sent();
491
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
492
+ }
493
+ });
494
+ });
495
+ },
496
+ };
497
+ };
498
+ exports.CommissionRecipientsApiFp = CommissionRecipientsApiFp;
499
+ /**
500
+ * CommissionRecipientsApi - factory interface
501
+ * @export
502
+ */
503
+ var CommissionRecipientsApiFactory = function (configuration, basePath, axios) {
504
+ var localVarFp = (0, exports.CommissionRecipientsApiFp)(configuration);
505
+ return {
506
+ /**
507
+ * This will create the commission recipient.
508
+ * @summary Create the Commission recipient
509
+ * @param {string} code
510
+ * @param {CreateCommissionRecipientRequestDto} createCommissionRecipientRequestDto
511
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ */
515
+ createCommissionRecipient: function (code, createCommissionRecipientRequestDto, authorization, options) {
516
+ return localVarFp.createCommissionRecipient(code, createCommissionRecipientRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
517
+ },
518
+ /**
519
+ * Permanently deletes the commission recipient. Supply the unique code that was returned when you created the commission recipient and this will delete it.
520
+ * @summary Delete the commission recipient
521
+ * @param {string} code
522
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
523
+ * @param {*} [options] Override http request option.
524
+ * @throws {RequiredError}
525
+ */
526
+ deleteCommissionRecipient: function (code, authorization, options) {
527
+ return localVarFp.deleteCommissionRecipient(code, authorization, options).then(function (request) { return request(axios, basePath); });
528
+ },
529
+ /**
530
+ * Retrieves the details of the commission recipient that was previously created. Supply the unique commission recipient code that was returned when you created it and Emil Api will return the corresponding commission recipient information.
531
+ * @summary Retrieve the commission recipient
532
+ * @param {string} code
533
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
534
+ * @param {*} [options] Override http request option.
535
+ * @throws {RequiredError}
536
+ */
537
+ getCommissionRecipient: function (code, authorization, options) {
538
+ return localVarFp.getCommissionRecipient(code, authorization, options).then(function (request) { return request(axios, basePath); });
539
+ },
540
+ /**
541
+ * Returns a list of commission recipients you have previously created. The commission recipients are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
542
+ * @summary List commission recipients
543
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
544
+ * @param {number} [pageSize] Page size.
545
+ * @param {string} [pageToken] Page token.
546
+ * @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: code, partnerCode, displayName, commissionAgreementId&lt;/i&gt;
547
+ * @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: displayName, partnerCode, code&lt;/i&gt;
548
+ * @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: id, createdAt, updatedAt&lt;/i&gt;
549
+ * @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: .&lt;i&gt;
550
+ * @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: code, partnerCode, displayName, commissionAgreementId&lt;/i&gt;
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ */
554
+ listCommissionRecipients: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
555
+ return localVarFp.listCommissionRecipients(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
556
+ },
557
+ /**
558
+ * Updates the specified commission recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
559
+ * @summary Update the commission recipient
560
+ * @param {string} code
561
+ * @param {UpdateCommissionRecipientRequestDto} updateCommissionRecipientRequestDto
562
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
563
+ * @param {*} [options] Override http request option.
564
+ * @throws {RequiredError}
565
+ */
566
+ updateCommissionRecipient: function (code, updateCommissionRecipientRequestDto, authorization, options) {
567
+ return localVarFp.updateCommissionRecipient(code, updateCommissionRecipientRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
568
+ },
569
+ };
570
+ };
571
+ exports.CommissionRecipientsApiFactory = CommissionRecipientsApiFactory;
572
+ /**
573
+ * CommissionRecipientsApi - object-oriented interface
574
+ * @export
575
+ * @class CommissionRecipientsApi
576
+ * @extends {BaseAPI}
577
+ */
578
+ var CommissionRecipientsApi = /** @class */ (function (_super) {
579
+ __extends(CommissionRecipientsApi, _super);
580
+ function CommissionRecipientsApi() {
581
+ return _super !== null && _super.apply(this, arguments) || this;
582
+ }
583
+ /**
584
+ * This will create the commission recipient.
585
+ * @summary Create the Commission recipient
586
+ * @param {CommissionRecipientsApiCreateCommissionRecipientRequest} requestParameters Request parameters.
587
+ * @param {*} [options] Override http request option.
588
+ * @throws {RequiredError}
589
+ * @memberof CommissionRecipientsApi
590
+ */
591
+ CommissionRecipientsApi.prototype.createCommissionRecipient = function (requestParameters, options) {
592
+ var _this = this;
593
+ return (0, exports.CommissionRecipientsApiFp)(this.configuration).createCommissionRecipient(requestParameters.code, requestParameters.createCommissionRecipientRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
594
+ };
595
+ /**
596
+ * Permanently deletes the commission recipient. Supply the unique code that was returned when you created the commission recipient and this will delete it.
597
+ * @summary Delete the commission recipient
598
+ * @param {CommissionRecipientsApiDeleteCommissionRecipientRequest} requestParameters Request parameters.
599
+ * @param {*} [options] Override http request option.
600
+ * @throws {RequiredError}
601
+ * @memberof CommissionRecipientsApi
602
+ */
603
+ CommissionRecipientsApi.prototype.deleteCommissionRecipient = function (requestParameters, options) {
604
+ var _this = this;
605
+ return (0, exports.CommissionRecipientsApiFp)(this.configuration).deleteCommissionRecipient(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
606
+ };
607
+ /**
608
+ * Retrieves the details of the commission recipient that was previously created. Supply the unique commission recipient code that was returned when you created it and Emil Api will return the corresponding commission recipient information.
609
+ * @summary Retrieve the commission recipient
610
+ * @param {CommissionRecipientsApiGetCommissionRecipientRequest} requestParameters Request parameters.
611
+ * @param {*} [options] Override http request option.
612
+ * @throws {RequiredError}
613
+ * @memberof CommissionRecipientsApi
614
+ */
615
+ CommissionRecipientsApi.prototype.getCommissionRecipient = function (requestParameters, options) {
616
+ var _this = this;
617
+ return (0, exports.CommissionRecipientsApiFp)(this.configuration).getCommissionRecipient(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
618
+ };
619
+ /**
620
+ * Returns a list of commission recipients you have previously created. The commission recipients are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
621
+ * @summary List commission recipients
622
+ * @param {CommissionRecipientsApiListCommissionRecipientsRequest} requestParameters Request parameters.
623
+ * @param {*} [options] Override http request option.
624
+ * @throws {RequiredError}
625
+ * @memberof CommissionRecipientsApi
626
+ */
627
+ CommissionRecipientsApi.prototype.listCommissionRecipients = function (requestParameters, options) {
628
+ var _this = this;
629
+ if (requestParameters === void 0) { requestParameters = {}; }
630
+ return (0, exports.CommissionRecipientsApiFp)(this.configuration).listCommissionRecipients(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); });
631
+ };
632
+ /**
633
+ * Updates the specified commission recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
634
+ * @summary Update the commission recipient
635
+ * @param {CommissionRecipientsApiUpdateCommissionRecipientRequest} requestParameters Request parameters.
636
+ * @param {*} [options] Override http request option.
637
+ * @throws {RequiredError}
638
+ * @memberof CommissionRecipientsApi
639
+ */
640
+ CommissionRecipientsApi.prototype.updateCommissionRecipient = function (requestParameters, options) {
641
+ var _this = this;
642
+ return (0, exports.CommissionRecipientsApiFp)(this.configuration).updateCommissionRecipient(requestParameters.code, requestParameters.updateCommissionRecipientRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
643
+ };
644
+ return CommissionRecipientsApi;
645
+ }(base_1.BaseAPI));
646
+ exports.CommissionRecipientsApi = CommissionRecipientsApi;