@emilgroup/insurance-sdk-node 1.104.1-beta.7 → 1.104.1-beta.70

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 (51) hide show
  1. package/.openapi-generator/FILES +3 -2
  2. package/README.md +2 -2
  3. package/api/health-check-api.ts +6 -10
  4. package/api/leads-api.ts +4 -4
  5. package/api/policies-api.ts +32 -32
  6. package/api/premium-calculation-api.ts +169 -0
  7. package/api.ts +2 -0
  8. package/dist/api/health-check-api.d.ts +7 -8
  9. package/dist/api/health-check-api.js +4 -4
  10. package/dist/api/leads-api.d.ts +4 -4
  11. package/dist/api/leads-api.js +3 -3
  12. package/dist/api/policies-api.d.ts +32 -32
  13. package/dist/api/policies-api.js +28 -28
  14. package/dist/api/premium-calculation-api.d.ts +97 -0
  15. package/dist/api/premium-calculation-api.js +228 -0
  16. package/dist/api.d.ts +1 -0
  17. package/dist/api.js +1 -0
  18. package/dist/models/calculate-premium-response-class.d.ts +39 -0
  19. package/dist/models/calculated-policy-objects-class.d.ts +25 -0
  20. package/dist/models/create-draft-policy-request-dto.d.ts +1 -1
  21. package/dist/models/create-premium-formula-request-dto.d.ts +6 -0
  22. package/dist/models/create-product-request-dto.d.ts +12 -0
  23. package/dist/models/create-product-version-request-dto.d.ts +6 -0
  24. package/dist/models/get-draft-policy-request-dto.d.ts +1 -1
  25. package/dist/models/index.d.ts +2 -2
  26. package/dist/models/index.js +2 -2
  27. package/dist/models/partner-class.d.ts +6 -0
  28. package/dist/models/patch-draft-policy-request-dto.d.ts +2 -2
  29. package/dist/models/policy-object-dto.d.ts +1 -1
  30. package/dist/models/policy-premium-item-class.d.ts +1 -1
  31. package/dist/models/premium-formula-class.d.ts +6 -0
  32. package/models/calculate-premium-response-class.ts +45 -0
  33. package/models/calculated-policy-objects-class.ts +31 -0
  34. package/models/create-draft-policy-request-dto.ts +1 -1
  35. package/models/create-premium-formula-request-dto.ts +6 -0
  36. package/models/create-product-request-dto.ts +12 -0
  37. package/models/create-product-version-request-dto.ts +6 -0
  38. package/models/get-draft-policy-request-dto.ts +1 -1
  39. package/models/index.ts +2 -2
  40. package/models/partner-class.ts +6 -0
  41. package/models/patch-draft-policy-request-dto.ts +2 -2
  42. package/models/policy-object-dto.ts +1 -1
  43. package/models/policy-premium-item-class.ts +1 -1
  44. package/models/premium-formula-class.ts +6 -0
  45. package/package.json +1 -1
  46. package/dist/models/inline-response200.d.ts +0 -54
  47. package/dist/models/inline-response503.d.ts +0 -54
  48. package/models/inline-response200.ts +0 -48
  49. package/models/inline-response503.ts +0 -48
  50. /package/dist/models/{inline-response200.js → calculate-premium-response-class.js} +0 -0
  51. /package/dist/models/{inline-response503.js → calculated-policy-objects-class.js} +0 -0
@@ -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
@@ -158,8 +161,6 @@ models/grouped-product-factor-value-class.ts
158
161
  models/grouped-product-factors-response-class.ts
159
162
  models/grpc-mandate-dto.ts
160
163
  models/index.ts
161
- models/inline-response200.ts
162
- models/inline-response503.ts
163
164
  models/insured-object-class.ts
164
165
  models/insured-object-type-class.ts
165
166
  models/invoice-item-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-node@1.104.1-beta.7 --save
20
+ npm install @emilgroup/insurance-sdk-node@1.104.1-beta.70 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk-node@1.104.1-beta.7
24
+ yarn add @emilgroup/insurance-sdk-node@1.104.1-beta.70
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -20,10 +20,6 @@ import { Configuration } from '../configuration';
20
20
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
- // @ts-ignore
24
- import { InlineResponse200 } from '../models';
25
- // @ts-ignore
26
- import { InlineResponse503 } from '../models';
27
23
  // URLSearchParams not necessarily used
28
24
  // @ts-ignore
29
25
  import { URL, URLSearchParams } from 'url';
@@ -35,7 +31,7 @@ const FormData = require('form-data');
35
31
  export const HealthCheckApiAxiosParamCreator = function (configuration?: Configuration) {
36
32
  return {
37
33
  /**
38
- * Returns the health status of the insurance service. This endpoint is used to monitor the operational status of the insurance service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
34
+ * Returns the health status of the insuranceservice service. This endpoint is used to monitor the operational status of the insuranceservice service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
39
35
  * @summary Health Check
40
36
  * @param {*} [options] Override http request option.
41
37
  * @throws {RequiredError}
@@ -77,12 +73,12 @@ export const HealthCheckApiFp = function(configuration?: Configuration) {
77
73
  const localVarAxiosParamCreator = HealthCheckApiAxiosParamCreator(configuration)
78
74
  return {
79
75
  /**
80
- * Returns the health status of the insurance service. This endpoint is used to monitor the operational status of the insurance service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
76
+ * Returns the health status of the insuranceservice service. This endpoint is used to monitor the operational status of the insuranceservice service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
81
77
  * @summary Health Check
82
78
  * @param {*} [options] Override http request option.
83
79
  * @throws {RequiredError}
84
80
  */
85
- async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
81
+ async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
86
82
  const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
87
83
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
88
84
  },
@@ -97,12 +93,12 @@ export const HealthCheckApiFactory = function (configuration?: Configuration, ba
97
93
  const localVarFp = HealthCheckApiFp(configuration)
98
94
  return {
99
95
  /**
100
- * Returns the health status of the insurance service. This endpoint is used to monitor the operational status of the insurance service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
96
+ * Returns the health status of the insuranceservice service. This endpoint is used to monitor the operational status of the insuranceservice service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
101
97
  * @summary Health Check
102
98
  * @param {*} [options] Override http request option.
103
99
  * @throws {RequiredError}
104
100
  */
105
- check(options?: any): AxiosPromise<InlineResponse200> {
101
+ check(options?: any): AxiosPromise<void> {
106
102
  return localVarFp.check(options).then((request) => request(axios, basePath));
107
103
  },
108
104
  };
@@ -116,7 +112,7 @@ export const HealthCheckApiFactory = function (configuration?: Configuration, ba
116
112
  */
117
113
  export class HealthCheckApi extends BaseAPI {
118
114
  /**
119
- * Returns the health status of the insurance service. This endpoint is used to monitor the operational status of the insurance service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
115
+ * Returns the health status of the insuranceservice service. This endpoint is used to monitor the operational status of the insuranceservice service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
120
116
  * @summary Health Check
121
117
  * @param {*} [options] Override http request option.
122
118
  * @throws {RequiredError}
package/api/leads-api.ts CHANGED
@@ -346,7 +346,7 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
346
346
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
347
347
  * @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.
348
348
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
349
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
349
+ * @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.
350
350
  * @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.
351
351
  * @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.
352
352
  * @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.
@@ -659,7 +659,7 @@ export const LeadsApiFp = function(configuration?: Configuration) {
659
659
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
660
660
  * @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.
661
661
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
662
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
662
+ * @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.
663
663
  * @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.
664
664
  * @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.
665
665
  * @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.
@@ -794,7 +794,7 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
794
794
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
795
795
  * @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.
796
796
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
797
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
797
+ * @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.
798
798
  * @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.
799
799
  * @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.
800
800
  * @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.
@@ -1018,7 +1018,7 @@ export interface LeadsApiListLeadsRequest {
1018
1018
  readonly filter?: string
1019
1019
 
1020
1020
  /**
1021
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
1021
+ * 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.
1022
1022
  * @type {string}
1023
1023
  * @memberof LeadsApiListLeads
1024
1024
  */
@@ -126,7 +126,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
126
126
  };
127
127
  },
128
128
  /**
129
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
129
+ * 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\"
130
130
  * @summary Create the draft-policy
131
131
  * @param {string} policyCode Unique identifier for the object.
132
132
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -269,11 +269,11 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
269
269
  };
270
270
  },
271
271
  /**
272
- * 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\"
272
+ * 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\"
273
273
  * @summary Retrieve the draft-policy
274
274
  * @param {string} policyCode Unique identifier for the object.
275
275
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
276
- * @param {string} [expand] Fields to expand response by.
276
+ * @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;
277
277
  * @param {*} [options] Override http request option.
278
278
  * @throws {RequiredError}
279
279
  */
@@ -424,16 +424,16 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
424
424
  };
425
425
  },
426
426
  /**
427
- * 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\"
427
+ * 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\"
428
428
  * @summary List policies
429
429
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
430
430
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
431
431
  * @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.
432
- * @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;
433
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
432
+ * @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;
433
+ * @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.
434
434
  * @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;
435
435
  * @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;
436
- * @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;
436
+ * @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;
437
437
  * @param {*} [options] Override http request option.
438
438
  * @throws {RequiredError}
439
439
  */
@@ -656,7 +656,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
656
656
  };
657
657
  },
658
658
  /**
659
- * 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\"
659
+ * 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\"
660
660
  * @summary Update the draft-policy
661
661
  * @param {string} policyCode Unique identifier for the object.
662
662
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1036,7 +1036,7 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1036
1036
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1037
1037
  },
1038
1038
  /**
1039
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
1039
+ * 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\"
1040
1040
  * @summary Create the draft-policy
1041
1041
  * @param {string} policyCode Unique identifier for the object.
1042
1042
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -1073,11 +1073,11 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1073
1073
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1074
1074
  },
1075
1075
  /**
1076
- * 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\"
1076
+ * 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\"
1077
1077
  * @summary Retrieve the draft-policy
1078
1078
  * @param {string} policyCode Unique identifier for the object.
1079
1079
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1080
- * @param {string} [expand] Fields to expand response by.
1080
+ * @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;
1081
1081
  * @param {*} [options] Override http request option.
1082
1082
  * @throws {RequiredError}
1083
1083
  */
@@ -1113,16 +1113,16 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1113
1113
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1114
1114
  },
1115
1115
  /**
1116
- * 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\"
1116
+ * 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\"
1117
1117
  * @summary List policies
1118
1118
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1119
1119
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1120
1120
  * @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.
1121
- * @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;
1122
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1121
+ * @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;
1122
+ * @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.
1123
1123
  * @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;
1124
1124
  * @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;
1125
- * @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;
1125
+ * @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;
1126
1126
  * @param {*} [options] Override http request option.
1127
1127
  * @throws {RequiredError}
1128
1128
  */
@@ -1168,7 +1168,7 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1168
1168
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1169
1169
  },
1170
1170
  /**
1171
- * 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\"
1171
+ * 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\"
1172
1172
  * @summary Update the draft-policy
1173
1173
  * @param {string} policyCode Unique identifier for the object.
1174
1174
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1281,7 +1281,7 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1281
1281
  return localVarFp.activatePolicy(policyCode, activatePolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1282
1282
  },
1283
1283
  /**
1284
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
1284
+ * 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\"
1285
1285
  * @summary Create the draft-policy
1286
1286
  * @param {string} policyCode Unique identifier for the object.
1287
1287
  * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
@@ -1315,11 +1315,11 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1315
1315
  return localVarFp.deleteDraftPolicy(policyCode, authorization, options).then((request) => request(axios, basePath));
1316
1316
  },
1317
1317
  /**
1318
- * 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\"
1318
+ * 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\"
1319
1319
  * @summary Retrieve the draft-policy
1320
1320
  * @param {string} policyCode Unique identifier for the object.
1321
1321
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1322
- * @param {string} [expand] Fields to expand response by.
1322
+ * @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;
1323
1323
  * @param {*} [options] Override http request option.
1324
1324
  * @throws {RequiredError}
1325
1325
  */
@@ -1352,16 +1352,16 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1352
1352
  return localVarFp.getPolicyDataByDate(code, authorization, timesliceDate, expand, options).then((request) => request(axios, basePath));
1353
1353
  },
1354
1354
  /**
1355
- * 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\"
1355
+ * 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\"
1356
1356
  * @summary List policies
1357
1357
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1358
1358
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1359
1359
  * @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.
1360
- * @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;
1361
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1360
+ * @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;
1361
+ * @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.
1362
1362
  * @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;
1363
1363
  * @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;
1364
- * @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;
1364
+ * @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;
1365
1365
  * @param {*} [options] Override http request option.
1366
1366
  * @throws {RequiredError}
1367
1367
  */
@@ -1404,7 +1404,7 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1404
1404
  return localVarFp.listPolicyVersions(policyCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
1405
1405
  },
1406
1406
  /**
1407
- * 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\"
1407
+ * 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\"
1408
1408
  * @summary Update the draft-policy
1409
1409
  * @param {string} policyCode Unique identifier for the object.
1410
1410
  * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
@@ -1609,7 +1609,7 @@ export interface PoliciesApiGetDraftPolicyRequest {
1609
1609
  readonly authorization?: string
1610
1610
 
1611
1611
  /**
1612
- * Fields to expand response by.
1612
+ * 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;
1613
1613
  * @type {string}
1614
1614
  * @memberof PoliciesApiGetDraftPolicy
1615
1615
  */
@@ -1707,14 +1707,14 @@ export interface PoliciesApiListPoliciesRequest {
1707
1707
  readonly pageToken?: string
1708
1708
 
1709
1709
  /**
1710
- * 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;
1710
+ * 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;
1711
1711
  * @type {string}
1712
1712
  * @memberof PoliciesApiListPolicies
1713
1713
  */
1714
1714
  readonly filter?: string
1715
1715
 
1716
1716
  /**
1717
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
1717
+ * 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.
1718
1718
  * @type {string}
1719
1719
  * @memberof PoliciesApiListPolicies
1720
1720
  */
@@ -1735,7 +1735,7 @@ export interface PoliciesApiListPoliciesRequest {
1735
1735
  readonly expand?: string
1736
1736
 
1737
1737
  /**
1738
- * 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;
1738
+ * 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;
1739
1739
  * @type {string}
1740
1740
  * @memberof PoliciesApiListPolicies
1741
1741
  */
@@ -2091,7 +2091,7 @@ export class PoliciesApi extends BaseAPI {
2091
2091
  }
2092
2092
 
2093
2093
  /**
2094
- * This will create a draft policy in the database. **Required Permissions** \"policy-management.policies.create\"
2094
+ * 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\"
2095
2095
  * @summary Create the draft-policy
2096
2096
  * @param {PoliciesApiCreateDraftPolicyRequest} requestParameters Request parameters.
2097
2097
  * @param {*} [options] Override http request option.
@@ -2127,7 +2127,7 @@ export class PoliciesApi extends BaseAPI {
2127
2127
  }
2128
2128
 
2129
2129
  /**
2130
- * 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\"
2130
+ * 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\"
2131
2131
  * @summary Retrieve the draft-policy
2132
2132
  * @param {PoliciesApiGetDraftPolicyRequest} requestParameters Request parameters.
2133
2133
  * @param {*} [options] Override http request option.
@@ -2163,7 +2163,7 @@ export class PoliciesApi extends BaseAPI {
2163
2163
  }
2164
2164
 
2165
2165
  /**
2166
- * 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\"
2166
+ * 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\"
2167
2167
  * @summary List policies
2168
2168
  * @param {PoliciesApiListPoliciesRequest} requestParameters Request parameters.
2169
2169
  * @param {*} [options] Override http request option.
@@ -2199,7 +2199,7 @@ export class PoliciesApi extends BaseAPI {
2199
2199
  }
2200
2200
 
2201
2201
  /**
2202
- * 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\"
2202
+ * 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\"
2203
2203
  * @summary Update the draft-policy
2204
2204
  * @param {PoliciesApiPatchDraftPolicyRequest} requestParameters Request parameters.
2205
2205
  * @param {*} [options] Override http request option.
@@ -0,0 +1,169 @@
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
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ import { URL, URLSearchParams } from 'url';
30
+ const FormData = require('form-data');
31
+ /**
32
+ * PremiumCalculationApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const PremiumCalculationApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * 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\"
39
+ * @summary Calculate premium
40
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
41
+ * @param {string} [authorization] Bearer Token
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ calculatePremium: async (calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ // verify required parameter 'calculatePremiumRequestDto' is not null or undefined
47
+ assertParamExists('calculatePremium', 'calculatePremiumRequestDto', calculatePremiumRequestDto)
48
+ const localVarPath = `/insuranceservice/v1/calculate-premium`;
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ let baseAccessToken;
53
+ if (configuration) {
54
+ baseOptions = configuration.baseOptions;
55
+ baseAccessToken = configuration.accessToken;
56
+ }
57
+
58
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
59
+ const localVarHeaderParameter = {} as any;
60
+ const localVarQueryParameter = {} as any;
61
+
62
+ // authentication bearer required
63
+ // http bearer authentication required
64
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
+
66
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
68
+ }
69
+
70
+
71
+
72
+ localVarHeaderParameter['Content-Type'] = 'application/json';
73
+
74
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
77
+ localVarRequestOptions.data = serializeDataIfNeeded(calculatePremiumRequestDto, localVarRequestOptions, configuration)
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
84
+ }
85
+ };
86
+
87
+ /**
88
+ * PremiumCalculationApi - functional programming interface
89
+ * @export
90
+ */
91
+ export const PremiumCalculationApiFp = function(configuration?: Configuration) {
92
+ const localVarAxiosParamCreator = PremiumCalculationApiAxiosParamCreator(configuration)
93
+ return {
94
+ /**
95
+ * 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\"
96
+ * @summary Calculate premium
97
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
98
+ * @param {string} [authorization] Bearer Token
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ async calculatePremium(calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CalculatePremiumResponseClass>> {
103
+ const localVarAxiosArgs = await localVarAxiosParamCreator.calculatePremium(calculatePremiumRequestDto, authorization, options);
104
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
105
+ },
106
+ }
107
+ };
108
+
109
+ /**
110
+ * PremiumCalculationApi - factory interface
111
+ * @export
112
+ */
113
+ export const PremiumCalculationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
114
+ const localVarFp = PremiumCalculationApiFp(configuration)
115
+ return {
116
+ /**
117
+ * 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\"
118
+ * @summary Calculate premium
119
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
120
+ * @param {string} [authorization] Bearer Token
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ */
124
+ calculatePremium(calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options?: any): AxiosPromise<CalculatePremiumResponseClass> {
125
+ return localVarFp.calculatePremium(calculatePremiumRequestDto, authorization, options).then((request) => request(axios, basePath));
126
+ },
127
+ };
128
+ };
129
+
130
+ /**
131
+ * Request parameters for calculatePremium operation in PremiumCalculationApi.
132
+ * @export
133
+ * @interface PremiumCalculationApiCalculatePremiumRequest
134
+ */
135
+ export interface PremiumCalculationApiCalculatePremiumRequest {
136
+ /**
137
+ *
138
+ * @type {CalculatePremiumRequestDto}
139
+ * @memberof PremiumCalculationApiCalculatePremium
140
+ */
141
+ readonly calculatePremiumRequestDto: CalculatePremiumRequestDto
142
+
143
+ /**
144
+ * Bearer Token
145
+ * @type {string}
146
+ * @memberof PremiumCalculationApiCalculatePremium
147
+ */
148
+ readonly authorization?: string
149
+ }
150
+
151
+ /**
152
+ * PremiumCalculationApi - object-oriented interface
153
+ * @export
154
+ * @class PremiumCalculationApi
155
+ * @extends {BaseAPI}
156
+ */
157
+ export class PremiumCalculationApi extends BaseAPI {
158
+ /**
159
+ * 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\"
160
+ * @summary Calculate premium
161
+ * @param {PremiumCalculationApiCalculatePremiumRequest} requestParameters Request parameters.
162
+ * @param {*} [options] Override http request option.
163
+ * @throws {RequiredError}
164
+ * @memberof PremiumCalculationApi
165
+ */
166
+ public calculatePremium(requestParameters: PremiumCalculationApiCalculatePremiumRequest, options?: AxiosRequestConfig) {
167
+ return PremiumCalculationApiFp(this.configuration).calculatePremium(requestParameters.calculatePremiumRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
168
+ }
169
+ }
package/api.ts CHANGED
@@ -42,6 +42,7 @@ import { NamedRangesApi } from './api';
42
42
  import { PartnerLinksApi } from './api';
43
43
  import { PartnerRolesApi } from './api';
44
44
  import { PoliciesApi } from './api';
45
+ import { PremiumCalculationApi } from './api';
45
46
  import { PremiumFormulasApi } from './api';
46
47
  import { ProductConfigsApi } from './api';
47
48
  import { ProductFactorsApi } from './api';
@@ -69,6 +70,7 @@ export * from './api/named-ranges-api';
69
70
  export * from './api/partner-links-api';
70
71
  export * from './api/partner-roles-api';
71
72
  export * from './api/policies-api';
73
+ export * from './api/premium-calculation-api';
72
74
  export * from './api/premium-formulas-api';
73
75
  export * from './api/product-configs-api';
74
76
  export * from './api/product-factors-api';