@emilgroup/insurance-sdk-node 1.104.1-beta.11 → 1.104.1-beta.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/.openapi-generator/FILES +5 -2
  2. package/README.md +2 -2
  3. package/api/booking-funnel-versions-api.ts +8 -4
  4. package/api/booking-funnels-api.ts +24 -12
  5. package/api/commission-agreement-items-api.ts +20 -10
  6. package/api/commission-agreement-products-api.ts +20 -10
  7. package/api/commission-agreement-versions-api.ts +16 -8
  8. package/api/commission-agreements-api.ts +20 -10
  9. package/api/commission-recipients-api.ts +20 -10
  10. package/api/emil-functions-api.ts +44 -22
  11. package/api/health-check-api.ts +6 -10
  12. package/api/insured-object-types-api.ts +4 -2
  13. package/api/insured-objects-api.ts +16 -8
  14. package/api/lead-statuses-api.ts +20 -10
  15. package/api/lead-versions-api.ts +8 -4
  16. package/api/leads-api.ts +44 -24
  17. package/api/named-ranges-api.ts +24 -12
  18. package/api/partner-links-api.ts +24 -12
  19. package/api/partner-roles-api.ts +20 -10
  20. package/api/policies-api.ts +100 -66
  21. package/api/premium-calculation-api.ts +171 -0
  22. package/api/premium-formulas-api.ts +24 -12
  23. package/api/product-configs-api.ts +24 -12
  24. package/api/product-factors-api.ts +28 -14
  25. package/api/product-fields-api.ts +28 -14
  26. package/api/product-versions-api.ts +8 -4
  27. package/api/products-api.ts +24 -12
  28. package/api/status-transition-rules-api.ts +24 -12
  29. package/api.ts +2 -0
  30. package/common.ts +3 -2
  31. package/dist/api/booking-funnel-versions-api.d.ts +2 -2
  32. package/dist/api/booking-funnel-versions-api.js +11 -7
  33. package/dist/api/booking-funnels-api.d.ts +6 -6
  34. package/dist/api/booking-funnels-api.js +39 -23
  35. package/dist/api/commission-agreement-items-api.d.ts +5 -5
  36. package/dist/api/commission-agreement-items-api.js +29 -18
  37. package/dist/api/commission-agreement-products-api.d.ts +5 -5
  38. package/dist/api/commission-agreement-products-api.js +29 -18
  39. package/dist/api/commission-agreement-versions-api.d.ts +4 -4
  40. package/dist/api/commission-agreement-versions-api.js +22 -14
  41. package/dist/api/commission-agreements-api.d.ts +5 -5
  42. package/dist/api/commission-agreements-api.js +29 -18
  43. package/dist/api/commission-recipients-api.d.ts +5 -5
  44. package/dist/api/commission-recipients-api.js +32 -19
  45. package/dist/api/emil-functions-api.d.ts +11 -11
  46. package/dist/api/emil-functions-api.js +74 -43
  47. package/dist/api/health-check-api.d.ts +7 -8
  48. package/dist/api/health-check-api.js +4 -4
  49. package/dist/api/insured-object-types-api.d.ts +1 -1
  50. package/dist/api/insured-object-types-api.js +4 -3
  51. package/dist/api/insured-objects-api.d.ts +4 -4
  52. package/dist/api/insured-objects-api.js +22 -14
  53. package/dist/api/lead-statuses-api.d.ts +5 -5
  54. package/dist/api/lead-statuses-api.js +32 -19
  55. package/dist/api/lead-versions-api.d.ts +2 -2
  56. package/dist/api/lead-versions-api.js +11 -7
  57. package/dist/api/leads-api.d.ts +14 -14
  58. package/dist/api/leads-api.js +67 -41
  59. package/dist/api/named-ranges-api.d.ts +6 -6
  60. package/dist/api/named-ranges-api.js +36 -22
  61. package/dist/api/partner-links-api.d.ts +6 -6
  62. package/dist/api/partner-links-api.js +36 -22
  63. package/dist/api/partner-roles-api.d.ts +5 -5
  64. package/dist/api/partner-roles-api.js +32 -19
  65. package/dist/api/policies-api.d.ts +49 -49
  66. package/dist/api/policies-api.js +129 -90
  67. package/dist/api/premium-calculation-api.d.ts +97 -0
  68. package/dist/api/premium-calculation-api.js +231 -0
  69. package/dist/api/premium-formulas-api.d.ts +6 -6
  70. package/dist/api/premium-formulas-api.js +39 -23
  71. package/dist/api/product-configs-api.d.ts +6 -6
  72. package/dist/api/product-configs-api.js +39 -23
  73. package/dist/api/product-factors-api.d.ts +7 -7
  74. package/dist/api/product-factors-api.js +37 -24
  75. package/dist/api/product-fields-api.d.ts +7 -7
  76. package/dist/api/product-fields-api.js +43 -26
  77. package/dist/api/product-versions-api.d.ts +2 -2
  78. package/dist/api/product-versions-api.js +11 -7
  79. package/dist/api/products-api.d.ts +6 -6
  80. package/dist/api/products-api.js +33 -21
  81. package/dist/api/status-transition-rules-api.d.ts +6 -6
  82. package/dist/api/status-transition-rules-api.js +36 -22
  83. package/dist/api.d.ts +1 -0
  84. package/dist/api.js +1 -0
  85. package/dist/common.d.ts +1 -1
  86. package/dist/common.js +1 -0
  87. package/dist/models/calculate-premium-response-class.d.ts +39 -0
  88. package/dist/models/calculated-policy-objects-class.d.ts +25 -0
  89. package/dist/models/claim-config-class.d.ts +7 -0
  90. package/dist/models/create-draft-policy-request-dto.d.ts +1 -1
  91. package/dist/models/create-premium-formula-request-dto.d.ts +6 -0
  92. package/dist/models/create-product-request-dto.d.ts +12 -0
  93. package/dist/models/create-product-version-request-dto.d.ts +6 -0
  94. package/dist/models/get-draft-policy-request-dto.d.ts +1 -1
  95. package/dist/models/index.d.ts +4 -2
  96. package/dist/models/index.js +4 -2
  97. package/dist/models/partner-class.d.ts +6 -0
  98. package/dist/models/patch-draft-policy-request-dto.d.ts +2 -2
  99. package/dist/models/policy-object-dto.d.ts +1 -1
  100. package/dist/models/policy-premium-item-class.d.ts +1 -1
  101. package/dist/models/premium-formula-class.d.ts +6 -0
  102. package/dist/models/regulation-subtype-class.d.ts +30 -0
  103. package/dist/models/regulation-subtype-class.js +15 -0
  104. package/dist/models/regulation-subtypes-class.d.ts +37 -0
  105. package/dist/models/regulation-subtypes-class.js +15 -0
  106. package/models/calculate-premium-response-class.ts +45 -0
  107. package/models/calculated-policy-objects-class.ts +31 -0
  108. package/models/claim-config-class.ts +7 -0
  109. package/models/create-draft-policy-request-dto.ts +1 -1
  110. package/models/create-premium-formula-request-dto.ts +6 -0
  111. package/models/create-product-request-dto.ts +12 -0
  112. package/models/create-product-version-request-dto.ts +6 -0
  113. package/models/get-draft-policy-request-dto.ts +1 -1
  114. package/models/index.ts +4 -2
  115. package/models/partner-class.ts +6 -0
  116. package/models/patch-draft-policy-request-dto.ts +2 -2
  117. package/models/policy-object-dto.ts +1 -1
  118. package/models/policy-premium-item-class.ts +1 -1
  119. package/models/premium-formula-class.ts +6 -0
  120. package/models/regulation-subtype-class.ts +36 -0
  121. package/models/regulation-subtypes-class.ts +43 -0
  122. package/package.json +2 -2
  123. package/dist/models/inline-response200.d.ts +0 -54
  124. package/dist/models/inline-response503.d.ts +0 -54
  125. package/models/inline-response200.ts +0 -48
  126. package/models/inline-response503.ts +0 -48
  127. /package/dist/models/{inline-response200.js → calculate-premium-response-class.js} +0 -0
  128. /package/dist/models/{inline-response503.js → calculated-policy-objects-class.js} +0 -0
@@ -108,7 +108,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
108
108
  activatePolicy: function (policyCode, activatePolicyRequestDto, authorization, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
112
112
  return __generator(this, function (_a) {
113
113
  switch (_a.label) {
114
114
  case 0:
@@ -128,13 +128,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
128
128
  localVarQueryParameter = {};
129
129
  // authentication bearer required
130
130
  // http bearer authentication required
131
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
131
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
132
+ // Only Authorization falls back to the configured token; an empty value is never sent.
133
+ ];
132
134
  case 1:
133
135
  // authentication bearer required
134
136
  // http bearer authentication required
135
137
  _a.sent();
136
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
138
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
139
+ if (authorizationValue) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
138
141
  }
139
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -150,7 +153,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
150
153
  });
151
154
  },
152
155
  /**
153
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
156
+ * Creates a draft version of the policy update, without affecting the current version. This adds a new version to the existing policy — it does not create a new policy. The draft is returned with `isDraft: true` and `isCurrent: false`; the current version is unchanged until the draft is approved via `PATCH .../draft` with `revisionStatus: APPROVED`. **Required Permissions** \"policy-management.policies.create\"
154
157
  * @summary Create the draft-policy
155
158
  * @param {string} policyCode Unique identifier for the object.
156
159
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -161,7 +164,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
161
164
  createDraftPolicy: function (policyCode, createDraftPolicyRequestDto, authorization, options) {
162
165
  if (options === void 0) { options = {}; }
163
166
  return __awaiter(_this, void 0, void 0, function () {
164
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
167
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
165
168
  return __generator(this, function (_a) {
166
169
  switch (_a.label) {
167
170
  case 0:
@@ -181,13 +184,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
181
184
  localVarQueryParameter = {};
182
185
  // authentication bearer required
183
186
  // http bearer authentication required
184
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
187
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
188
+ // Only Authorization falls back to the configured token; an empty value is never sent.
189
+ ];
185
190
  case 1:
186
191
  // authentication bearer required
187
192
  // http bearer authentication required
188
193
  _a.sent();
189
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
190
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
194
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
195
+ if (authorizationValue) {
196
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
191
197
  }
192
198
  localVarHeaderParameter['Content-Type'] = 'application/json';
193
199
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -213,7 +219,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
213
219
  createPolicy: function (createPolicyRequestDto, authorization, options) {
214
220
  if (options === void 0) { options = {}; }
215
221
  return __awaiter(_this, void 0, void 0, function () {
216
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
222
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
217
223
  return __generator(this, function (_a) {
218
224
  switch (_a.label) {
219
225
  case 0:
@@ -230,13 +236,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
230
236
  localVarQueryParameter = {};
231
237
  // authentication bearer required
232
238
  // http bearer authentication required
233
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
239
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
240
+ // Only Authorization falls back to the configured token; an empty value is never sent.
241
+ ];
234
242
  case 1:
235
243
  // authentication bearer required
236
244
  // http bearer authentication required
237
245
  _a.sent();
238
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
239
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
246
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
247
+ if (authorizationValue) {
248
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
240
249
  }
241
250
  localVarHeaderParameter['Content-Type'] = 'application/json';
242
251
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -262,7 +271,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
262
271
  deleteDraftPolicy: function (policyCode, authorization, options) {
263
272
  if (options === void 0) { options = {}; }
264
273
  return __awaiter(_this, void 0, void 0, function () {
265
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
274
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
266
275
  return __generator(this, function (_a) {
267
276
  switch (_a.label) {
268
277
  case 0:
@@ -280,13 +289,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
280
289
  localVarQueryParameter = {};
281
290
  // authentication bearer required
282
291
  // http bearer authentication required
283
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
292
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
293
+ // Only Authorization falls back to the configured token; an empty value is never sent.
294
+ ];
284
295
  case 1:
285
296
  // authentication bearer required
286
297
  // http bearer authentication required
287
298
  _a.sent();
288
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
289
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
299
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
300
+ if (authorizationValue) {
301
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
290
302
  }
291
303
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
292
304
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -300,18 +312,18 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
300
312
  });
301
313
  },
302
314
  /**
303
- * Retrieves the details of the draft-policy that was previously created. Supply the unique draft-policy code that was returned when you created it and Emil Api will return the corresponding draft-policy information. **Required Permissions** \"policy-management.policies.view\"
315
+ * Retrieves the draft version of the policy, if one exists. The returned version has `isDraft: true` and `isCurrent: false` — it is never the current/live version. Returns a 404 if no draft exists (e.g. after it has been approved or rejected). **Required Permissions** \"policy-management.policies.view\"
304
316
  * @summary Retrieve the draft-policy
305
317
  * @param {string} policyCode Unique identifier for the object.
306
318
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
307
- * @param {string} [expand] Fields to expand response by.
319
+ * @param {string} [expand] Fields to expand in the draft response. Pass the unprefixed relation name; for example, \"premiumItems\" expands the draft premium items relation.<br/> <br/> <i>Allowed values: version, timelines, premiums, premiumItems, premiumFormulas</i>
308
320
  * @param {*} [options] Override http request option.
309
321
  * @throws {RequiredError}
310
322
  */
311
323
  getDraftPolicy: function (policyCode, authorization, expand, options) {
312
324
  if (options === void 0) { options = {}; }
313
325
  return __awaiter(_this, void 0, void 0, function () {
314
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
326
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
315
327
  return __generator(this, function (_a) {
316
328
  switch (_a.label) {
317
329
  case 0:
@@ -337,8 +349,9 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
337
349
  if (expand !== undefined) {
338
350
  localVarQueryParameter['expand'] = expand;
339
351
  }
340
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
341
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
352
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
353
+ if (authorizationValue) {
354
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
342
355
  }
343
356
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
344
357
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -363,7 +376,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
363
376
  getPolicy: function (code, authorization, expand, options) {
364
377
  if (options === void 0) { options = {}; }
365
378
  return __awaiter(_this, void 0, void 0, function () {
366
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
379
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
367
380
  return __generator(this, function (_a) {
368
381
  switch (_a.label) {
369
382
  case 0:
@@ -389,8 +402,9 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
389
402
  if (expand !== undefined) {
390
403
  localVarQueryParameter['expand'] = expand;
391
404
  }
392
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
393
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
405
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
406
+ if (authorizationValue) {
407
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
394
408
  }
395
409
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
396
410
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -416,7 +430,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
416
430
  getPolicyDataByDate: function (code, authorization, timesliceDate, expand, options) {
417
431
  if (options === void 0) { options = {}; }
418
432
  return __awaiter(_this, void 0, void 0, function () {
419
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
433
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
420
434
  return __generator(this, function (_a) {
421
435
  switch (_a.label) {
422
436
  case 0:
@@ -445,8 +459,9 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
445
459
  if (expand !== undefined) {
446
460
  localVarQueryParameter['expand'] = expand;
447
461
  }
448
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
449
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
462
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
463
+ if (authorizationValue) {
464
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
450
465
  }
451
466
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
452
467
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -460,23 +475,23 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
460
475
  });
461
476
  },
462
477
  /**
463
- * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"policy-management.policies.view\"
478
+ * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.<br/> <br/> <b>Notes on filtering:</b><br/> - The `partnerCode` filter matches any policy that has ever had a link to that partner — past, current, or future-dated — not only currently-assigned ones. There is currently no separate filter to match only the currently-active link.<br/> - An unrecognized filter field name is silently ignored: the request returns 200 with the unfiltered (or partially filtered, if combined with valid fields) result set rather than an error. **Required Permissions** \"policy-management.policies.view\"
464
479
  * @summary List policies
465
480
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
466
481
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
467
482
  * @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.
468
- * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode&lt;/i&gt;
469
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
483
+ * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode, partnerLinks.partnerCode&lt;/i&gt;
484
+ * @param {string} [search] Free-text search across the policy\&#39;s key fields: policy codes and numbers, holder, status, product, account and lead codes, start date, and insured-object data (policyObjects.data). Matching is case- and accent-insensitive (mueller finds Müller), tolerates typos, and ranks results by relevance. To search a single field, pass search&#x3D;path:value — e.g. search&#x3D;holder:Müller or search&#x3D;policyObjects.data.postalCode:10115. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
470
485
  * @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, policyNumber, createdAt, updatedAt, policyStartDate, productVersionId, productId&lt;/i&gt;
471
486
  * @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: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas, partnerLinks&lt;i&gt;
472
- * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode&lt;/i&gt;
487
+ * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode, partnerLinks.partnerCode&lt;/i&gt;
473
488
  * @param {*} [options] Override http request option.
474
489
  * @throws {RequiredError}
475
490
  */
476
491
  listPolicies: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
477
492
  if (options === void 0) { options = {}; }
478
493
  return __awaiter(_this, void 0, void 0, function () {
479
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
494
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
480
495
  return __generator(this, function (_a) {
481
496
  switch (_a.label) {
482
497
  case 0:
@@ -517,8 +532,9 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
517
532
  if (filters !== undefined) {
518
533
  localVarQueryParameter['filters'] = filters;
519
534
  }
520
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
521
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
535
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
536
+ if (authorizationValue) {
537
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
522
538
  }
523
539
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
524
540
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -548,7 +564,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
548
564
  listPolicyObjects: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
549
565
  if (options === void 0) { options = {}; }
550
566
  return __awaiter(_this, void 0, void 0, function () {
551
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
567
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
552
568
  return __generator(this, function (_a) {
553
569
  switch (_a.label) {
554
570
  case 0:
@@ -589,8 +605,9 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
589
605
  if (filters !== undefined) {
590
606
  localVarQueryParameter['filters'] = filters;
591
607
  }
592
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
593
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
608
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
609
+ if (authorizationValue) {
610
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
594
611
  }
595
612
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
596
613
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -621,7 +638,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
621
638
  listPolicyVersions: function (policyCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
622
639
  if (options === void 0) { options = {}; }
623
640
  return __awaiter(_this, void 0, void 0, function () {
624
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
641
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
625
642
  return __generator(this, function (_a) {
626
643
  switch (_a.label) {
627
644
  case 0:
@@ -665,8 +682,9 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
665
682
  if (filters !== undefined) {
666
683
  localVarQueryParameter['filters'] = filters;
667
684
  }
668
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
669
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
685
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
686
+ if (authorizationValue) {
687
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
670
688
  }
671
689
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
672
690
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -680,7 +698,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
680
698
  });
681
699
  },
682
700
  /**
683
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"policy-management.policies.update\"
701
+ * Updates the draft version, or changes its lifecycle state via `revisionStatus` (see that field\'s description for what each value does — most notably, `APPROVED` promotes the draft to the current policy version and `REJECTED` deletes it). **Required Permissions** \"policy-management.policies.update\"
684
702
  * @summary Update the draft-policy
685
703
  * @param {string} policyCode Unique identifier for the object.
686
704
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -691,7 +709,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
691
709
  patchDraftPolicy: function (policyCode, patchDraftPolicyRequestDto, authorization, options) {
692
710
  if (options === void 0) { options = {}; }
693
711
  return __awaiter(_this, void 0, void 0, function () {
694
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
712
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
695
713
  return __generator(this, function (_a) {
696
714
  switch (_a.label) {
697
715
  case 0:
@@ -711,13 +729,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
711
729
  localVarQueryParameter = {};
712
730
  // authentication bearer required
713
731
  // http bearer authentication required
714
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
732
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
733
+ // Only Authorization falls back to the configured token; an empty value is never sent.
734
+ ];
715
735
  case 1:
716
736
  // authentication bearer required
717
737
  // http bearer authentication required
718
738
  _a.sent();
719
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
720
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
739
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
740
+ if (authorizationValue) {
741
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
721
742
  }
722
743
  localVarHeaderParameter['Content-Type'] = 'application/json';
723
744
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -744,7 +765,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
744
765
  patchPolicy: function (code, patchPolicyRequestDto, authorization, options) {
745
766
  if (options === void 0) { options = {}; }
746
767
  return __awaiter(_this, void 0, void 0, function () {
747
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
768
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
748
769
  return __generator(this, function (_a) {
749
770
  switch (_a.label) {
750
771
  case 0:
@@ -764,13 +785,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
764
785
  localVarQueryParameter = {};
765
786
  // authentication bearer required
766
787
  // http bearer authentication required
767
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
788
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
789
+ // Only Authorization falls back to the configured token; an empty value is never sent.
790
+ ];
768
791
  case 1:
769
792
  // authentication bearer required
770
793
  // http bearer authentication required
771
794
  _a.sent();
772
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
773
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
795
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
796
+ if (authorizationValue) {
797
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
774
798
  }
775
799
  localVarHeaderParameter['Content-Type'] = 'application/json';
776
800
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -797,7 +821,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
797
821
  restorePolicyVersion: function (policyCode, restorePolicyVersionRequestDto, authorization, options) {
798
822
  if (options === void 0) { options = {}; }
799
823
  return __awaiter(_this, void 0, void 0, function () {
800
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
824
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
801
825
  return __generator(this, function (_a) {
802
826
  switch (_a.label) {
803
827
  case 0:
@@ -817,13 +841,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
817
841
  localVarQueryParameter = {};
818
842
  // authentication bearer required
819
843
  // http bearer authentication required
820
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
844
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
845
+ // Only Authorization falls back to the configured token; an empty value is never sent.
846
+ ];
821
847
  case 1:
822
848
  // authentication bearer required
823
849
  // http bearer authentication required
824
850
  _a.sent();
825
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
826
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
851
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
852
+ if (authorizationValue) {
853
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
827
854
  }
828
855
  localVarHeaderParameter['Content-Type'] = 'application/json';
829
856
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -850,7 +877,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
850
877
  suspendPolicy: function (policyCode, suspendPolicyRequestDto, authorization, options) {
851
878
  if (options === void 0) { options = {}; }
852
879
  return __awaiter(_this, void 0, void 0, function () {
853
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
880
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
854
881
  return __generator(this, function (_a) {
855
882
  switch (_a.label) {
856
883
  case 0:
@@ -870,13 +897,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
870
897
  localVarQueryParameter = {};
871
898
  // authentication bearer required
872
899
  // http bearer authentication required
873
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
900
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
901
+ // Only Authorization falls back to the configured token; an empty value is never sent.
902
+ ];
874
903
  case 1:
875
904
  // authentication bearer required
876
905
  // http bearer authentication required
877
906
  _a.sent();
878
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
879
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
907
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
908
+ if (authorizationValue) {
909
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
880
910
  }
881
911
  localVarHeaderParameter['Content-Type'] = 'application/json';
882
912
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -903,7 +933,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
903
933
  terminatePolicy: function (policyCode, terminatePolicyRequestDto, authorization, options) {
904
934
  if (options === void 0) { options = {}; }
905
935
  return __awaiter(_this, void 0, void 0, function () {
906
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
936
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
907
937
  return __generator(this, function (_a) {
908
938
  switch (_a.label) {
909
939
  case 0:
@@ -923,13 +953,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
923
953
  localVarQueryParameter = {};
924
954
  // authentication bearer required
925
955
  // http bearer authentication required
926
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
956
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
957
+ // Only Authorization falls back to the configured token; an empty value is never sent.
958
+ ];
927
959
  case 1:
928
960
  // authentication bearer required
929
961
  // http bearer authentication required
930
962
  _a.sent();
931
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
932
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
963
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
964
+ if (authorizationValue) {
965
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
933
966
  }
934
967
  localVarHeaderParameter['Content-Type'] = 'application/json';
935
968
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -956,7 +989,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
956
989
  updatePolicy: function (code, updatePolicyRequestDto, authorization, options) {
957
990
  if (options === void 0) { options = {}; }
958
991
  return __awaiter(_this, void 0, void 0, function () {
959
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
992
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
960
993
  return __generator(this, function (_a) {
961
994
  switch (_a.label) {
962
995
  case 0:
@@ -976,13 +1009,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
976
1009
  localVarQueryParameter = {};
977
1010
  // authentication bearer required
978
1011
  // http bearer authentication required
979
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1012
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
1013
+ // Only Authorization falls back to the configured token; an empty value is never sent.
1014
+ ];
980
1015
  case 1:
981
1016
  // authentication bearer required
982
1017
  // http bearer authentication required
983
1018
  _a.sent();
984
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
985
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1019
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
1020
+ if (authorizationValue) {
1021
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
986
1022
  }
987
1023
  localVarHeaderParameter['Content-Type'] = 'application/json';
988
1024
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -1009,7 +1045,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
1009
1045
  withdrawPolicy: function (policyCode, body, authorization, options) {
1010
1046
  if (options === void 0) { options = {}; }
1011
1047
  return __awaiter(_this, void 0, void 0, function () {
1012
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1048
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
1013
1049
  return __generator(this, function (_a) {
1014
1050
  switch (_a.label) {
1015
1051
  case 0:
@@ -1029,13 +1065,16 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
1029
1065
  localVarQueryParameter = {};
1030
1066
  // authentication bearer required
1031
1067
  // http bearer authentication required
1032
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1068
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
1069
+ // Only Authorization falls back to the configured token; an empty value is never sent.
1070
+ ];
1033
1071
  case 1:
1034
1072
  // authentication bearer required
1035
1073
  // http bearer authentication required
1036
1074
  _a.sent();
1037
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1038
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1075
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
1076
+ if (authorizationValue) {
1077
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
1039
1078
  }
1040
1079
  localVarHeaderParameter['Content-Type'] = 'application/json';
1041
1080
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -1083,7 +1122,7 @@ var PoliciesApiFp = function (configuration) {
1083
1122
  });
1084
1123
  },
1085
1124
  /**
1086
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
1125
+ * Creates a draft version of the policy update, without affecting the current version. This adds a new version to the existing policy — it does not create a new policy. The draft is returned with `isDraft: true` and `isCurrent: false`; the current version is unchanged until the draft is approved via `PATCH .../draft` with `revisionStatus: APPROVED`. **Required Permissions** \"policy-management.policies.create\"
1087
1126
  * @summary Create the draft-policy
1088
1127
  * @param {string} policyCode Unique identifier for the object.
1089
1128
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -1147,11 +1186,11 @@ var PoliciesApiFp = function (configuration) {
1147
1186
  });
1148
1187
  },
1149
1188
  /**
1150
- * Retrieves the details of the draft-policy that was previously created. Supply the unique draft-policy code that was returned when you created it and Emil Api will return the corresponding draft-policy information. **Required Permissions** \"policy-management.policies.view\"
1189
+ * Retrieves the draft version of the policy, if one exists. The returned version has `isDraft: true` and `isCurrent: false` — it is never the current/live version. Returns a 404 if no draft exists (e.g. after it has been approved or rejected). **Required Permissions** \"policy-management.policies.view\"
1151
1190
  * @summary Retrieve the draft-policy
1152
1191
  * @param {string} policyCode Unique identifier for the object.
1153
1192
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1154
- * @param {string} [expand] Fields to expand response by.
1193
+ * @param {string} [expand] Fields to expand in the draft response. Pass the unprefixed relation name; for example, \&quot;premiumItems\&quot; expands the draft premium items relation.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version, timelines, premiums, premiumItems, premiumFormulas&lt;/i&gt;
1155
1194
  * @param {*} [options] Override http request option.
1156
1195
  * @throws {RequiredError}
1157
1196
  */
@@ -1214,16 +1253,16 @@ var PoliciesApiFp = function (configuration) {
1214
1253
  });
1215
1254
  },
1216
1255
  /**
1217
- * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"policy-management.policies.view\"
1256
+ * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.<br/> <br/> <b>Notes on filtering:</b><br/> - The `partnerCode` filter matches any policy that has ever had a link to that partner — past, current, or future-dated — not only currently-assigned ones. There is currently no separate filter to match only the currently-active link.<br/> - An unrecognized filter field name is silently ignored: the request returns 200 with the unfiltered (or partially filtered, if combined with valid fields) result set rather than an error. **Required Permissions** \"policy-management.policies.view\"
1218
1257
  * @summary List policies
1219
1258
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1220
1259
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1221
1260
  * @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.
1222
- * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode&lt;/i&gt;
1223
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1261
+ * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode, partnerLinks.partnerCode&lt;/i&gt;
1262
+ * @param {string} [search] Free-text search across the policy\&#39;s key fields: policy codes and numbers, holder, status, product, account and lead codes, start date, and insured-object data (policyObjects.data). Matching is case- and accent-insensitive (mueller finds Müller), tolerates typos, and ranks results by relevance. To search a single field, pass search&#x3D;path:value — e.g. search&#x3D;holder:Müller or search&#x3D;policyObjects.data.postalCode:10115. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
1224
1263
  * @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, policyNumber, createdAt, updatedAt, policyStartDate, productVersionId, productId&lt;/i&gt;
1225
1264
  * @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: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas, partnerLinks&lt;i&gt;
1226
- * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode&lt;/i&gt;
1265
+ * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode, partnerLinks.partnerCode&lt;/i&gt;
1227
1266
  * @param {*} [options] Override http request option.
1228
1267
  * @throws {RequiredError}
1229
1268
  */
@@ -1296,7 +1335,7 @@ var PoliciesApiFp = function (configuration) {
1296
1335
  });
1297
1336
  },
1298
1337
  /**
1299
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"policy-management.policies.update\"
1338
+ * Updates the draft version, or changes its lifecycle state via `revisionStatus` (see that field\'s description for what each value does — most notably, `APPROVED` promotes the draft to the current policy version and `REJECTED` deletes it). **Required Permissions** \"policy-management.policies.update\"
1300
1339
  * @summary Update the draft-policy
1301
1340
  * @param {string} policyCode Unique identifier for the object.
1302
1341
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1472,7 +1511,7 @@ var PoliciesApiFactory = function (configuration, basePath, axios) {
1472
1511
  return localVarFp.activatePolicy(policyCode, activatePolicyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1473
1512
  },
1474
1513
  /**
1475
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
1514
+ * Creates a draft version of the policy update, without affecting the current version. This adds a new version to the existing policy — it does not create a new policy. The draft is returned with `isDraft: true` and `isCurrent: false`; the current version is unchanged until the draft is approved via `PATCH .../draft` with `revisionStatus: APPROVED`. **Required Permissions** \"policy-management.policies.create\"
1476
1515
  * @summary Create the draft-policy
1477
1516
  * @param {string} policyCode Unique identifier for the object.
1478
1517
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -1506,11 +1545,11 @@ var PoliciesApiFactory = function (configuration, basePath, axios) {
1506
1545
  return localVarFp.deleteDraftPolicy(policyCode, authorization, options).then(function (request) { return request(axios, basePath); });
1507
1546
  },
1508
1547
  /**
1509
- * Retrieves the details of the draft-policy that was previously created. Supply the unique draft-policy code that was returned when you created it and Emil Api will return the corresponding draft-policy information. **Required Permissions** \"policy-management.policies.view\"
1548
+ * Retrieves the draft version of the policy, if one exists. The returned version has `isDraft: true` and `isCurrent: false` — it is never the current/live version. Returns a 404 if no draft exists (e.g. after it has been approved or rejected). **Required Permissions** \"policy-management.policies.view\"
1510
1549
  * @summary Retrieve the draft-policy
1511
1550
  * @param {string} policyCode Unique identifier for the object.
1512
1551
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1513
- * @param {string} [expand] Fields to expand response by.
1552
+ * @param {string} [expand] Fields to expand in the draft response. Pass the unprefixed relation name; for example, \&quot;premiumItems\&quot; expands the draft premium items relation.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: version, timelines, premiums, premiumItems, premiumFormulas&lt;/i&gt;
1514
1553
  * @param {*} [options] Override http request option.
1515
1554
  * @throws {RequiredError}
1516
1555
  */
@@ -1543,16 +1582,16 @@ var PoliciesApiFactory = function (configuration, basePath, axios) {
1543
1582
  return localVarFp.getPolicyDataByDate(code, authorization, timesliceDate, expand, options).then(function (request) { return request(axios, basePath); });
1544
1583
  },
1545
1584
  /**
1546
- * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"policy-management.policies.view\"
1585
+ * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.<br/> <br/> <b>Notes on filtering:</b><br/> - The `partnerCode` filter matches any policy that has ever had a link to that partner — past, current, or future-dated — not only currently-assigned ones. There is currently no separate filter to match only the currently-active link.<br/> - An unrecognized filter field name is silently ignored: the request returns 200 with the unfiltered (or partially filtered, if combined with valid fields) result set rather than an error. **Required Permissions** \"policy-management.policies.view\"
1547
1586
  * @summary List policies
1548
1587
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1549
1588
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1550
1589
  * @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.
1551
- * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode&lt;/i&gt;
1552
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1590
+ * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode, partnerLinks.partnerCode&lt;/i&gt;
1591
+ * @param {string} [search] Free-text search across the policy\&#39;s key fields: policy codes and numbers, holder, status, product, account and lead codes, start date, and insured-object data (policyObjects.data). Matching is case- and accent-insensitive (mueller finds Müller), tolerates typos, and ranks results by relevance. To search a single field, pass search&#x3D;path:value — e.g. search&#x3D;holder:Müller or search&#x3D;policyObjects.data.postalCode:10115. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
1553
1592
  * @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, policyNumber, createdAt, updatedAt, policyStartDate, productVersionId, productId&lt;/i&gt;
1554
1593
  * @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: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas, partnerLinks&lt;i&gt;
1555
- * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode&lt;/i&gt;
1594
+ * @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, leadCode, policyNumber, holder, policyStartDate, productSlug, productVersionId, productId, accountCode, productName, status, statuses, createdAt, policyData, partnerCode, partnerLinks.partnerCode&lt;/i&gt;
1556
1595
  * @param {*} [options] Override http request option.
1557
1596
  * @throws {RequiredError}
1558
1597
  */
@@ -1595,7 +1634,7 @@ var PoliciesApiFactory = function (configuration, basePath, axios) {
1595
1634
  return localVarFp.listPolicyVersions(policyCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
1596
1635
  },
1597
1636
  /**
1598
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"policy-management.policies.update\"
1637
+ * Updates the draft version, or changes its lifecycle state via `revisionStatus` (see that field\'s description for what each value does — most notably, `APPROVED` promotes the draft to the current policy version and `REJECTED` deletes it). **Required Permissions** \"policy-management.policies.update\"
1599
1638
  * @summary Update the draft-policy
1600
1639
  * @param {string} policyCode Unique identifier for the object.
1601
1640
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1705,7 +1744,7 @@ var PoliciesApi = /** @class */ (function (_super) {
1705
1744
  return (0, exports.PoliciesApiFp)(this.configuration).activatePolicy(requestParameters.policyCode, requestParameters.activatePolicyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1706
1745
  };
1707
1746
  /**
1708
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
1747
+ * Creates a draft version of the policy update, without affecting the current version. This adds a new version to the existing policy — it does not create a new policy. The draft is returned with `isDraft: true` and `isCurrent: false`; the current version is unchanged until the draft is approved via `PATCH .../draft` with `revisionStatus: APPROVED`. **Required Permissions** \"policy-management.policies.create\"
1709
1748
  * @summary Create the draft-policy
1710
1749
  * @param {PoliciesApiCreateDraftPolicyRequest} requestParameters Request parameters.
1711
1750
  * @param {*} [options] Override http request option.
@@ -1741,7 +1780,7 @@ var PoliciesApi = /** @class */ (function (_super) {
1741
1780
  return (0, exports.PoliciesApiFp)(this.configuration).deleteDraftPolicy(requestParameters.policyCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1742
1781
  };
1743
1782
  /**
1744
- * Retrieves the details of the draft-policy that was previously created. Supply the unique draft-policy code that was returned when you created it and Emil Api will return the corresponding draft-policy information. **Required Permissions** \"policy-management.policies.view\"
1783
+ * Retrieves the draft version of the policy, if one exists. The returned version has `isDraft: true` and `isCurrent: false` — it is never the current/live version. Returns a 404 if no draft exists (e.g. after it has been approved or rejected). **Required Permissions** \"policy-management.policies.view\"
1745
1784
  * @summary Retrieve the draft-policy
1746
1785
  * @param {PoliciesApiGetDraftPolicyRequest} requestParameters Request parameters.
1747
1786
  * @param {*} [options] Override http request option.
@@ -1777,7 +1816,7 @@ var PoliciesApi = /** @class */ (function (_super) {
1777
1816
  return (0, exports.PoliciesApiFp)(this.configuration).getPolicyDataByDate(requestParameters.code, requestParameters.authorization, requestParameters.timesliceDate, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
1778
1817
  };
1779
1818
  /**
1780
- * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"policy-management.policies.view\"
1819
+ * Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.<br/> <br/> <b>Notes on filtering:</b><br/> - The `partnerCode` filter matches any policy that has ever had a link to that partner — past, current, or future-dated — not only currently-assigned ones. There is currently no separate filter to match only the currently-active link.<br/> - An unrecognized filter field name is silently ignored: the request returns 200 with the unfiltered (or partially filtered, if combined with valid fields) result set rather than an error. **Required Permissions** \"policy-management.policies.view\"
1781
1820
  * @summary List policies
1782
1821
  * @param {PoliciesApiListPoliciesRequest} requestParameters Request parameters.
1783
1822
  * @param {*} [options] Override http request option.
@@ -1815,7 +1854,7 @@ var PoliciesApi = /** @class */ (function (_super) {
1815
1854
  return (0, exports.PoliciesApiFp)(this.configuration).listPolicyVersions(requestParameters.policyCode, 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); });
1816
1855
  };
1817
1856
  /**
1818
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"policy-management.policies.update\"
1857
+ * Updates the draft version, or changes its lifecycle state via `revisionStatus` (see that field\'s description for what each value does — most notably, `APPROVED` promotes the draft to the current policy version and `REJECTED` deletes it). **Required Permissions** \"policy-management.policies.update\"
1819
1858
  * @summary Update the draft-policy
1820
1859
  * @param {PoliciesApiPatchDraftPolicyRequest} requestParameters Request parameters.
1821
1860
  * @param {*} [options] Override http request option.