@emilgroup/insurance-sdk 1.107.1-beta.8 → 1.107.1-beta.80

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 (44) hide show
  1. package/.openapi-generator/FILES +3 -0
  2. package/README.md +2 -2
  3. package/api/leads-api.ts +4 -4
  4. package/api/policies-api.ts +32 -32
  5. package/api/premium-calculation-api.ts +165 -0
  6. package/api.ts +2 -0
  7. package/dist/api/leads-api.d.ts +4 -4
  8. package/dist/api/leads-api.js +3 -3
  9. package/dist/api/policies-api.d.ts +32 -32
  10. package/dist/api/policies-api.js +28 -28
  11. package/dist/api/premium-calculation-api.d.ts +97 -0
  12. package/dist/api/premium-calculation-api.js +224 -0
  13. package/dist/api.d.ts +1 -0
  14. package/dist/api.js +1 -0
  15. package/dist/models/calculate-premium-response-class.d.ts +39 -0
  16. package/dist/models/calculate-premium-response-class.js +15 -0
  17. package/dist/models/calculated-policy-objects-class.d.ts +25 -0
  18. package/dist/models/calculated-policy-objects-class.js +15 -0
  19. package/dist/models/create-draft-policy-request-dto.d.ts +1 -1
  20. package/dist/models/create-premium-formula-request-dto.d.ts +6 -0
  21. package/dist/models/create-product-request-dto.d.ts +12 -0
  22. package/dist/models/create-product-version-request-dto.d.ts +6 -0
  23. package/dist/models/get-draft-policy-request-dto.d.ts +1 -1
  24. package/dist/models/index.d.ts +2 -0
  25. package/dist/models/index.js +2 -0
  26. package/dist/models/partner-class.d.ts +6 -0
  27. package/dist/models/patch-draft-policy-request-dto.d.ts +2 -2
  28. package/dist/models/policy-object-dto.d.ts +1 -1
  29. package/dist/models/policy-premium-item-class.d.ts +1 -1
  30. package/dist/models/premium-formula-class.d.ts +6 -0
  31. package/models/calculate-premium-response-class.ts +45 -0
  32. package/models/calculated-policy-objects-class.ts +31 -0
  33. package/models/create-draft-policy-request-dto.ts +1 -1
  34. package/models/create-premium-formula-request-dto.ts +6 -0
  35. package/models/create-product-request-dto.ts +12 -0
  36. package/models/create-product-version-request-dto.ts +6 -0
  37. package/models/get-draft-policy-request-dto.ts +1 -1
  38. package/models/index.ts +2 -0
  39. package/models/partner-class.ts +6 -0
  40. package/models/patch-draft-policy-request-dto.ts +2 -2
  41. package/models/policy-object-dto.ts +1 -1
  42. package/models/policy-premium-item-class.ts +1 -1
  43. package/models/premium-formula-class.ts +6 -0
  44. package/package.json +1 -1
@@ -21,6 +21,7 @@ api/named-ranges-api.ts
21
21
  api/partner-links-api.ts
22
22
  api/partner-roles-api.ts
23
23
  api/policies-api.ts
24
+ api/premium-calculation-api.ts
24
25
  api/premium-formulas-api.ts
25
26
  api/product-configs-api.ts
26
27
  api/product-factors-api.ts
@@ -42,8 +43,10 @@ models/billing-address-dto.ts
42
43
  models/booking-funnel-class.ts
43
44
  models/calculate-custom-premium-request-dto.ts
44
45
  models/calculate-premium-request-dto.ts
46
+ models/calculate-premium-response-class.ts
45
47
  models/calculate-product-fields-request-dto.ts
46
48
  models/calculated-policy-object-class.ts
49
+ models/calculated-policy-objects-class.ts
47
50
  models/calculation-errors-class.ts
48
51
  models/calculation-item-errors-class.ts
49
52
  models/calculation-message-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/insurance-sdk@1.107.1-beta.8 --save
20
+ npm install @emilgroup/insurance-sdk@1.107.1-beta.80 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk@1.107.1-beta.8
24
+ yarn add @emilgroup/insurance-sdk@1.107.1-beta.80
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
package/api/leads-api.ts CHANGED
@@ -342,7 +342,7 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
342
342
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
343
343
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
344
344
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
345
- * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
345
+ * @param {string} [search] Free-text search across the lead\'s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. Matching is case- and accent-insensitive (mueller finds Müller), tolerates typos, and ranks results by relevance. To search a single field, pass search=path:value — e.g. search=account.lastName:Müller or search=policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
346
346
  * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
347
347
  * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
348
348
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
@@ -655,7 +655,7 @@ export const LeadsApiFp = function(configuration?: Configuration) {
655
655
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
656
656
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
657
657
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
658
- * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
658
+ * @param {string} [search] Free-text search across the lead\'s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. Matching is case- and accent-insensitive (mueller finds Müller), tolerates typos, and ranks results by relevance. To search a single field, pass search=path:value — e.g. search=account.lastName:Müller or search=policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
659
659
  * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
660
660
  * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
661
661
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
@@ -790,7 +790,7 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
790
790
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
791
791
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
792
792
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
793
- * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
793
+ * @param {string} [search] Free-text search across the lead\'s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. Matching is case- and accent-insensitive (mueller finds Müller), tolerates typos, and ranks results by relevance. To search a single field, pass search=path:value — e.g. search=account.lastName:Müller or search=policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
794
794
  * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
795
795
  * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
796
796
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
@@ -1014,7 +1014,7 @@ export interface LeadsApiListLeadsRequest {
1014
1014
  readonly filter?: string
1015
1015
 
1016
1016
  /**
1017
- * To search the list by any field, pass search=xxx to fetch the result.
1017
+ * Free-text search across the lead\'s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. Matching is case- and accent-insensitive (mueller finds Müller), tolerates typos, and ranks results by relevance. To search a single field, pass search=path:value — e.g. search=account.lastName:Müller or search=policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
1018
1018
  * @type {string}
1019
1019
  * @memberof LeadsApiListLeads
1020
1020
  */
@@ -122,7 +122,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
122
122
  };
123
123
  },
124
124
  /**
125
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
125
+ * 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\"
126
126
  * @summary Create the draft-policy
127
127
  * @param {string} policyCode Unique identifier for the object.
128
128
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -265,11 +265,11 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
265
265
  };
266
266
  },
267
267
  /**
268
- * 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\"
268
+ * 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\"
269
269
  * @summary Retrieve the draft-policy
270
270
  * @param {string} policyCode Unique identifier for the object.
271
271
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
272
- * @param {string} [expand] Fields to expand response by.
272
+ * @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>
273
273
  * @param {*} [options] Override http request option.
274
274
  * @throws {RequiredError}
275
275
  */
@@ -420,16 +420,16 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
420
420
  };
421
421
  },
422
422
  /**
423
- * 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\"
423
+ * 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\"
424
424
  * @summary List policies
425
425
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
426
426
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
427
427
  * @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.
428
- * @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;
429
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
428
+ * @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;
429
+ * @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.
430
430
  * @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;
431
431
  * @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;
432
- * @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;
432
+ * @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;
433
433
  * @param {*} [options] Override http request option.
434
434
  * @throws {RequiredError}
435
435
  */
@@ -652,7 +652,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
652
652
  };
653
653
  },
654
654
  /**
655
- * 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\"
655
+ * 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\"
656
656
  * @summary Update the draft-policy
657
657
  * @param {string} policyCode Unique identifier for the object.
658
658
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1032,7 +1032,7 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1032
1032
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1033
1033
  },
1034
1034
  /**
1035
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
1035
+ * 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\"
1036
1036
  * @summary Create the draft-policy
1037
1037
  * @param {string} policyCode Unique identifier for the object.
1038
1038
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -1069,11 +1069,11 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1069
1069
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1070
1070
  },
1071
1071
  /**
1072
- * 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\"
1072
+ * 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\"
1073
1073
  * @summary Retrieve the draft-policy
1074
1074
  * @param {string} policyCode Unique identifier for the object.
1075
1075
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1076
- * @param {string} [expand] Fields to expand response by.
1076
+ * @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;
1077
1077
  * @param {*} [options] Override http request option.
1078
1078
  * @throws {RequiredError}
1079
1079
  */
@@ -1109,16 +1109,16 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1109
1109
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1110
1110
  },
1111
1111
  /**
1112
- * 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\"
1112
+ * 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\"
1113
1113
  * @summary List policies
1114
1114
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1115
1115
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1116
1116
  * @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.
1117
- * @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;
1118
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1117
+ * @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;
1118
+ * @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.
1119
1119
  * @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;
1120
1120
  * @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;
1121
- * @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;
1121
+ * @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;
1122
1122
  * @param {*} [options] Override http request option.
1123
1123
  * @throws {RequiredError}
1124
1124
  */
@@ -1164,7 +1164,7 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1164
1164
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1165
1165
  },
1166
1166
  /**
1167
- * 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\"
1167
+ * 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\"
1168
1168
  * @summary Update the draft-policy
1169
1169
  * @param {string} policyCode Unique identifier for the object.
1170
1170
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1277,7 +1277,7 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1277
1277
  return localVarFp.activatePolicy(policyCode, activatePolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1278
1278
  },
1279
1279
  /**
1280
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
1280
+ * 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\"
1281
1281
  * @summary Create the draft-policy
1282
1282
  * @param {string} policyCode Unique identifier for the object.
1283
1283
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -1311,11 +1311,11 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1311
1311
  return localVarFp.deleteDraftPolicy(policyCode, authorization, options).then((request) => request(axios, basePath));
1312
1312
  },
1313
1313
  /**
1314
- * 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\"
1314
+ * 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\"
1315
1315
  * @summary Retrieve the draft-policy
1316
1316
  * @param {string} policyCode Unique identifier for the object.
1317
1317
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1318
- * @param {string} [expand] Fields to expand response by.
1318
+ * @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;
1319
1319
  * @param {*} [options] Override http request option.
1320
1320
  * @throws {RequiredError}
1321
1321
  */
@@ -1348,16 +1348,16 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1348
1348
  return localVarFp.getPolicyDataByDate(code, authorization, timesliceDate, expand, options).then((request) => request(axios, basePath));
1349
1349
  },
1350
1350
  /**
1351
- * 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\"
1351
+ * 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\"
1352
1352
  * @summary List policies
1353
1353
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1354
1354
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1355
1355
  * @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.
1356
- * @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;
1357
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1356
+ * @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;
1357
+ * @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.
1358
1358
  * @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;
1359
1359
  * @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;
1360
- * @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;
1360
+ * @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;
1361
1361
  * @param {*} [options] Override http request option.
1362
1362
  * @throws {RequiredError}
1363
1363
  */
@@ -1400,7 +1400,7 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1400
1400
  return localVarFp.listPolicyVersions(policyCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
1401
1401
  },
1402
1402
  /**
1403
- * 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\"
1403
+ * 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\"
1404
1404
  * @summary Update the draft-policy
1405
1405
  * @param {string} policyCode Unique identifier for the object.
1406
1406
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1605,7 +1605,7 @@ export interface PoliciesApiGetDraftPolicyRequest {
1605
1605
  readonly authorization?: string
1606
1606
 
1607
1607
  /**
1608
- * Fields to expand response by.
1608
+ * 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;
1609
1609
  * @type {string}
1610
1610
  * @memberof PoliciesApiGetDraftPolicy
1611
1611
  */
@@ -1703,14 +1703,14 @@ export interface PoliciesApiListPoliciesRequest {
1703
1703
  readonly pageToken?: string
1704
1704
 
1705
1705
  /**
1706
- * 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;
1706
+ * 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;
1707
1707
  * @type {string}
1708
1708
  * @memberof PoliciesApiListPolicies
1709
1709
  */
1710
1710
  readonly filter?: string
1711
1711
 
1712
1712
  /**
1713
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
1713
+ * 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.
1714
1714
  * @type {string}
1715
1715
  * @memberof PoliciesApiListPolicies
1716
1716
  */
@@ -1731,7 +1731,7 @@ export interface PoliciesApiListPoliciesRequest {
1731
1731
  readonly expand?: string
1732
1732
 
1733
1733
  /**
1734
- * 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;
1734
+ * 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;
1735
1735
  * @type {string}
1736
1736
  * @memberof PoliciesApiListPolicies
1737
1737
  */
@@ -2087,7 +2087,7 @@ export class PoliciesApi extends BaseAPI {
2087
2087
  }
2088
2088
 
2089
2089
  /**
2090
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
2090
+ * 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\"
2091
2091
  * @summary Create the draft-policy
2092
2092
  * @param {PoliciesApiCreateDraftPolicyRequest} requestParameters Request parameters.
2093
2093
  * @param {*} [options] Override http request option.
@@ -2123,7 +2123,7 @@ export class PoliciesApi extends BaseAPI {
2123
2123
  }
2124
2124
 
2125
2125
  /**
2126
- * 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\"
2126
+ * 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\"
2127
2127
  * @summary Retrieve the draft-policy
2128
2128
  * @param {PoliciesApiGetDraftPolicyRequest} requestParameters Request parameters.
2129
2129
  * @param {*} [options] Override http request option.
@@ -2159,7 +2159,7 @@ export class PoliciesApi extends BaseAPI {
2159
2159
  }
2160
2160
 
2161
2161
  /**
2162
- * 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\"
2162
+ * 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\"
2163
2163
  * @summary List policies
2164
2164
  * @param {PoliciesApiListPoliciesRequest} requestParameters Request parameters.
2165
2165
  * @param {*} [options] Override http request option.
@@ -2195,7 +2195,7 @@ export class PoliciesApi extends BaseAPI {
2195
2195
  }
2196
2196
 
2197
2197
  /**
2198
- * 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\"
2198
+ * 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\"
2199
2199
  * @summary Update the draft-policy
2200
2200
  * @param {PoliciesApiPatchDraftPolicyRequest} requestParameters Request parameters.
2201
2201
  * @param {*} [options] Override http request option.
@@ -0,0 +1,165 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL InsuranceService
5
+ * The EMIL InsuranceService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CalculatePremiumRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CalculatePremiumResponseClass } from '../models';
27
+ /**
28
+ * PremiumCalculationApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const PremiumCalculationApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
35
+ * @summary Calculate premium
36
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
37
+ * @param {string} [authorization] Bearer Token
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ calculatePremium: async (calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
42
+ // verify required parameter 'calculatePremiumRequestDto' is not null or undefined
43
+ assertParamExists('calculatePremium', 'calculatePremiumRequestDto', calculatePremiumRequestDto)
44
+ const localVarPath = `/insuranceservice/v1/calculate-premium`;
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ let baseAccessToken;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ baseAccessToken = configuration.accessToken;
52
+ }
53
+
54
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
55
+ const localVarHeaderParameter = {} as any;
56
+ const localVarQueryParameter = {} as any;
57
+
58
+ // authentication bearer required
59
+ // http bearer authentication required
60
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
61
+
62
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
63
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
64
+ }
65
+
66
+
67
+
68
+ localVarHeaderParameter['Content-Type'] = 'application/json';
69
+
70
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
71
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
73
+ localVarRequestOptions.data = serializeDataIfNeeded(calculatePremiumRequestDto, localVarRequestOptions, configuration)
74
+
75
+ return {
76
+ url: toPathString(localVarUrlObj),
77
+ options: localVarRequestOptions,
78
+ };
79
+ },
80
+ }
81
+ };
82
+
83
+ /**
84
+ * PremiumCalculationApi - functional programming interface
85
+ * @export
86
+ */
87
+ export const PremiumCalculationApiFp = function(configuration?: Configuration) {
88
+ const localVarAxiosParamCreator = PremiumCalculationApiAxiosParamCreator(configuration)
89
+ return {
90
+ /**
91
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
92
+ * @summary Calculate premium
93
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
94
+ * @param {string} [authorization] Bearer Token
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ async calculatePremium(calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CalculatePremiumResponseClass>> {
99
+ const localVarAxiosArgs = await localVarAxiosParamCreator.calculatePremium(calculatePremiumRequestDto, authorization, options);
100
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
101
+ },
102
+ }
103
+ };
104
+
105
+ /**
106
+ * PremiumCalculationApi - factory interface
107
+ * @export
108
+ */
109
+ export const PremiumCalculationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
110
+ const localVarFp = PremiumCalculationApiFp(configuration)
111
+ return {
112
+ /**
113
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
114
+ * @summary Calculate premium
115
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
116
+ * @param {string} [authorization] Bearer Token
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ */
120
+ calculatePremium(calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options?: any): AxiosPromise<CalculatePremiumResponseClass> {
121
+ return localVarFp.calculatePremium(calculatePremiumRequestDto, authorization, options).then((request) => request(axios, basePath));
122
+ },
123
+ };
124
+ };
125
+
126
+ /**
127
+ * Request parameters for calculatePremium operation in PremiumCalculationApi.
128
+ * @export
129
+ * @interface PremiumCalculationApiCalculatePremiumRequest
130
+ */
131
+ export interface PremiumCalculationApiCalculatePremiumRequest {
132
+ /**
133
+ *
134
+ * @type {CalculatePremiumRequestDto}
135
+ * @memberof PremiumCalculationApiCalculatePremium
136
+ */
137
+ readonly calculatePremiumRequestDto: CalculatePremiumRequestDto
138
+
139
+ /**
140
+ * Bearer Token
141
+ * @type {string}
142
+ * @memberof PremiumCalculationApiCalculatePremium
143
+ */
144
+ readonly authorization?: string
145
+ }
146
+
147
+ /**
148
+ * PremiumCalculationApi - object-oriented interface
149
+ * @export
150
+ * @class PremiumCalculationApi
151
+ * @extends {BaseAPI}
152
+ */
153
+ export class PremiumCalculationApi extends BaseAPI {
154
+ /**
155
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
156
+ * @summary Calculate premium
157
+ * @param {PremiumCalculationApiCalculatePremiumRequest} requestParameters Request parameters.
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ * @memberof PremiumCalculationApi
161
+ */
162
+ public calculatePremium(requestParameters: PremiumCalculationApiCalculatePremiumRequest, options?: AxiosRequestConfig) {
163
+ return PremiumCalculationApiFp(this.configuration).calculatePremium(requestParameters.calculatePremiumRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
164
+ }
165
+ }
package/api.ts CHANGED
@@ -38,6 +38,7 @@ import { NamedRangesApi } from './api';
38
38
  import { PartnerLinksApi } from './api';
39
39
  import { PartnerRolesApi } from './api';
40
40
  import { PoliciesApi } from './api';
41
+ import { PremiumCalculationApi } from './api';
41
42
  import { PremiumFormulasApi } from './api';
42
43
  import { ProductConfigsApi } from './api';
43
44
  import { ProductFactorsApi } from './api';
@@ -65,6 +66,7 @@ export * from './api/named-ranges-api';
65
66
  export * from './api/partner-links-api';
66
67
  export * from './api/partner-roles-api';
67
68
  export * from './api/policies-api';
69
+ export * from './api/premium-calculation-api';
68
70
  export * from './api/premium-formulas-api';
69
71
  export * from './api/product-configs-api';
70
72
  export * from './api/product-factors-api';
@@ -91,7 +91,7 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
91
91
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
92
92
  * @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.
93
93
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
94
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
94
+ * @param {string} [search] Free-text search across the lead\&#39;s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. 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;account.lastName:Müller or search&#x3D;policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
95
95
  * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
96
96
  * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
97
97
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
@@ -198,7 +198,7 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
198
198
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
199
199
  * @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.
200
200
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
201
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
201
+ * @param {string} [search] Free-text search across the lead\&#39;s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. 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;account.lastName:Müller or search&#x3D;policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
202
202
  * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
203
203
  * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
204
204
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
@@ -305,7 +305,7 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
305
305
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
306
306
  * @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.
307
307
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
308
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
308
+ * @param {string} [search] Free-text search across the lead\&#39;s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. 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;account.lastName:Müller or search&#x3D;policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
309
309
  * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
310
310
  * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
311
311
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
@@ -501,7 +501,7 @@ export interface LeadsApiListLeadsRequest {
501
501
  */
502
502
  readonly filter?: string;
503
503
  /**
504
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
504
+ * Free-text search across the lead\&#39;s key fields: codes, status, product, account data (name, company, e-mail, address, phone), policy and insured-object data, bank and quote values. 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;account.lastName:Müller or search&#x3D;policyObjects.data.vin:WVW123. The value matches exactly or as a prefix; paths are dot-separated and case-sensitive.
505
505
  * @type {string}
506
506
  * @memberof LeadsApiListLeads
507
507
  */