@emilgroup/insurance-sdk-node 1.48.1-beta.2 → 1.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/.openapi-generator/FILES +8 -21
  2. package/README.md +2 -2
  3. package/api/booking-funnels-api.ts +4 -4
  4. package/api/default-api.ts +4 -8
  5. package/api/insured-object-types-api.ts +4 -4
  6. package/api/insured-objects-api.ts +6 -9
  7. package/api/lead-statuses-api.ts +12 -96
  8. package/api/named-ranges-api.ts +4 -4
  9. package/api/policies-api.ts +180 -167
  10. package/api/policy-partner-roles-api.ts +683 -0
  11. package/api/premium-formulas-api.ts +4 -4
  12. package/api/product-factors-api.ts +4 -4
  13. package/api/product-fields-api.ts +8 -8
  14. package/api/products-api.ts +12 -12
  15. package/api.ts +2 -4
  16. package/dist/api/booking-funnels-api.d.ts +4 -4
  17. package/dist/api/booking-funnels-api.js +4 -4
  18. package/dist/api/default-api.d.ts +4 -8
  19. package/dist/api/default-api.js +4 -8
  20. package/dist/api/insured-object-types-api.d.ts +4 -4
  21. package/dist/api/insured-object-types-api.js +3 -3
  22. package/dist/api/insured-objects-api.d.ts +4 -4
  23. package/dist/api/insured-objects-api.js +5 -7
  24. package/dist/api/lead-statuses-api.d.ts +9 -63
  25. package/dist/api/lead-statuses-api.js +9 -45
  26. package/dist/api/named-ranges-api.d.ts +4 -4
  27. package/dist/api/named-ranges-api.js +3 -3
  28. package/dist/api/policies-api.d.ts +140 -131
  29. package/dist/api/policies-api.js +120 -114
  30. package/dist/api/policy-partner-roles-api.d.ts +385 -0
  31. package/dist/api/{partner-roles-api.js → policy-partner-roles-api.js} +139 -139
  32. package/dist/api/premium-formulas-api.d.ts +4 -4
  33. package/dist/api/premium-formulas-api.js +3 -3
  34. package/dist/api/product-factors-api.d.ts +4 -4
  35. package/dist/api/product-factors-api.js +3 -3
  36. package/dist/api/product-fields-api.d.ts +8 -8
  37. package/dist/api/product-fields-api.js +6 -6
  38. package/dist/api/products-api.d.ts +12 -12
  39. package/dist/api/products-api.js +9 -9
  40. package/dist/api.d.ts +1 -2
  41. package/dist/api.js +1 -2
  42. package/dist/models/booking-funnel-class.d.ts +1 -1
  43. package/dist/models/create-booking-funnel-request-dto.d.ts +1 -1
  44. package/dist/models/{update-partner-role-request-dto.d.ts → create-policy-partner-role-request-dto.d.ts} +6 -6
  45. package/dist/models/{emil-function-secret-class.d.ts → create-policy-partner-role-response-class.d.ts} +7 -12
  46. package/dist/models/create-product-request-dto.d.ts +1 -1
  47. package/dist/models/{create-partner-role-response-class.d.ts → get-policy-partner-role-response-class.d.ts} +7 -7
  48. package/dist/models/get-product-request-dto.d.ts +1 -1
  49. package/dist/models/index.d.ts +7 -19
  50. package/dist/models/index.js +7 -19
  51. package/dist/models/insured-object-type-class.d.ts +1 -1
  52. package/dist/models/invoice-item-class.d.ts +0 -12
  53. package/dist/models/lead-class.d.ts +1 -8
  54. package/dist/models/lead-status-class.d.ts +1 -1
  55. package/dist/models/{list-emil-functions-response-class.d.ts → list-policy-partner-roles-response-class.d.ts} +8 -8
  56. package/dist/models/list-policy-versions-request-dto.d.ts +1 -1
  57. package/dist/models/list-request-dto.d.ts +1 -1
  58. package/dist/models/patch-draft-policy-request-dto.d.ts +1 -1
  59. package/dist/models/policy-class.d.ts +0 -7
  60. package/dist/models/{partner-role-class.d.ts → policy-partner-role-class.d.ts} +10 -10
  61. package/dist/models/product-class.d.ts +1 -1
  62. package/dist/models/shared-update-named-range-request-dto.d.ts +1 -1
  63. package/dist/models/status-transition-rule-class.d.ts +1 -1
  64. package/dist/models/update-named-range-request-dto.d.ts +1 -1
  65. package/dist/models/{create-partner-role-request-dto.d.ts → update-policy-partner-role-request-dto.d.ts} +6 -6
  66. package/dist/models/{execute-emil-function-request-dto.d.ts → update-policy-partner-role-response-class.d.ts} +7 -6
  67. package/dist/models/update-product-request-dto.d.ts +1 -1
  68. package/models/booking-funnel-class.ts +1 -1
  69. package/models/create-booking-funnel-request-dto.ts +1 -1
  70. package/models/{update-partner-role-request-dto.ts → create-policy-partner-role-request-dto.ts} +6 -6
  71. package/models/{emil-function-secret-class.ts → create-policy-partner-role-response-class.ts} +7 -12
  72. package/models/create-product-request-dto.ts +1 -1
  73. package/models/{create-partner-role-response-class.ts → get-policy-partner-role-response-class.ts} +7 -7
  74. package/models/get-product-request-dto.ts +1 -1
  75. package/models/index.ts +7 -19
  76. package/models/insured-object-type-class.ts +1 -1
  77. package/models/invoice-item-class.ts +0 -12
  78. package/models/lead-class.ts +1 -8
  79. package/models/lead-status-class.ts +1 -1
  80. package/models/{list-emil-functions-response-class.ts → list-policy-partner-roles-response-class.ts} +8 -8
  81. package/models/list-policy-versions-request-dto.ts +1 -1
  82. package/models/list-request-dto.ts +1 -1
  83. package/models/patch-draft-policy-request-dto.ts +1 -1
  84. package/models/policy-class.ts +0 -7
  85. package/models/{partner-role-class.ts → policy-partner-role-class.ts} +10 -10
  86. package/models/product-class.ts +1 -1
  87. package/models/shared-update-named-range-request-dto.ts +1 -1
  88. package/models/status-transition-rule-class.ts +1 -1
  89. package/models/update-named-range-request-dto.ts +1 -1
  90. package/models/{create-partner-role-request-dto.ts → update-policy-partner-role-request-dto.ts} +6 -6
  91. package/models/{execute-emil-function-request-dto.ts → update-policy-partner-role-response-class.ts} +7 -6
  92. package/models/update-product-request-dto.ts +1 -1
  93. package/package.json +1 -1
  94. package/api/emil-functions-api.ts +0 -1314
  95. package/api/partner-roles-api.ts +0 -683
  96. package/dist/api/emil-functions-api.d.ts +0 -727
  97. package/dist/api/emil-functions-api.js +0 -1202
  98. package/dist/api/partner-roles-api.d.ts +0 -385
  99. package/dist/models/create-emil-function-request-dto.d.ts +0 -42
  100. package/dist/models/create-emil-function-secret-request-dto.d.ts +0 -36
  101. package/dist/models/emil-function-class.d.ts +0 -60
  102. package/dist/models/get-emil-function-secret-response-class.d.ts +0 -24
  103. package/dist/models/get-emil-function-secret-response-class.js +0 -15
  104. package/dist/models/get-partner-role-response-class.d.ts +0 -25
  105. package/dist/models/get-partner-role-response-class.js +0 -15
  106. package/dist/models/list-emil-function-secrets-response-class.d.ts +0 -25
  107. package/dist/models/list-emil-function-secrets-response-class.js +0 -15
  108. package/dist/models/list-emil-functions-response-class.js +0 -15
  109. package/dist/models/list-partner-roles-response-class.d.ts +0 -31
  110. package/dist/models/list-partner-roles-response-class.js +0 -15
  111. package/dist/models/partner-class.d.ts +0 -60
  112. package/dist/models/partner-class.js +0 -15
  113. package/dist/models/partner-link-class.d.ts +0 -86
  114. package/dist/models/partner-link-class.js +0 -15
  115. package/dist/models/partner-role-class.js +0 -15
  116. package/dist/models/update-emil-function-request-dto.d.ts +0 -42
  117. package/dist/models/update-emil-function-request-dto.js +0 -15
  118. package/dist/models/update-emil-function-secret-request-dto.d.ts +0 -30
  119. package/dist/models/update-emil-function-secret-request-dto.js +0 -15
  120. package/dist/models/update-partner-role-request-dto.js +0 -15
  121. package/dist/models/update-partner-role-response-class.d.ts +0 -25
  122. package/dist/models/update-partner-role-response-class.js +0 -15
  123. package/models/create-emil-function-request-dto.ts +0 -48
  124. package/models/create-emil-function-secret-request-dto.ts +0 -42
  125. package/models/emil-function-class.ts +0 -66
  126. package/models/get-emil-function-secret-response-class.ts +0 -30
  127. package/models/get-partner-role-response-class.ts +0 -31
  128. package/models/list-emil-function-secrets-response-class.ts +0 -31
  129. package/models/list-partner-roles-response-class.ts +0 -37
  130. package/models/partner-class.ts +0 -66
  131. package/models/partner-link-class.ts +0 -92
  132. package/models/update-emil-function-request-dto.ts +0 -48
  133. package/models/update-emil-function-secret-request-dto.ts +0 -36
  134. package/models/update-partner-role-response-class.ts +0 -31
  135. /package/dist/models/{create-emil-function-request-dto.js → create-policy-partner-role-request-dto.js} +0 -0
  136. /package/dist/models/{create-emil-function-secret-request-dto.js → create-policy-partner-role-response-class.js} +0 -0
  137. /package/dist/models/{create-partner-role-request-dto.js → get-policy-partner-role-response-class.js} +0 -0
  138. /package/dist/models/{create-partner-role-response-class.js → list-policy-partner-roles-response-class.js} +0 -0
  139. /package/dist/models/{emil-function-class.js → policy-partner-role-class.js} +0 -0
  140. /package/dist/models/{emil-function-secret-class.js → update-policy-partner-role-request-dto.js} +0 -0
  141. /package/dist/models/{execute-emil-function-request-dto.js → update-policy-partner-role-response-class.js} +0 -0
@@ -122,21 +122,17 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
122
122
  };
123
123
  },
124
124
  /**
125
- * This will create a draft policy in the database.
126
- * @summary Create the draft-policy
127
- * @param {string} policyCode
128
- * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
125
+ * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
126
+ * @summary Create the policy
127
+ * @param {CreatePolicyRequestDto} createPolicyRequestDto
129
128
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
130
129
  * @param {*} [options] Override http request option.
131
130
  * @throws {RequiredError}
132
131
  */
133
- createDraftPolicy: async (policyCode: string, createDraftPolicyRequestDto: CreateDraftPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
134
- // verify required parameter 'policyCode' is not null or undefined
135
- assertParamExists('createDraftPolicy', 'policyCode', policyCode)
136
- // verify required parameter 'createDraftPolicyRequestDto' is not null or undefined
137
- assertParamExists('createDraftPolicy', 'createDraftPolicyRequestDto', createDraftPolicyRequestDto)
138
- const localVarPath = `/insuranceservice/v1/policies/{policyCode}/draft`
139
- .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
132
+ createPolicy: async (createPolicyRequestDto: CreatePolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
133
+ // verify required parameter 'createPolicyRequestDto' is not null or undefined
134
+ assertParamExists('createPolicy', 'createPolicyRequestDto', createPolicyRequestDto)
135
+ const localVarPath = `/insuranceservice/v1/policies`;
140
136
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
141
137
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
142
138
  let baseOptions;
@@ -165,7 +161,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
165
161
  setSearchParams(localVarUrlObj, localVarQueryParameter);
166
162
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
167
163
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
168
- localVarRequestOptions.data = serializeDataIfNeeded(createDraftPolicyRequestDto, localVarRequestOptions, configuration)
164
+ localVarRequestOptions.data = serializeDataIfNeeded(createPolicyRequestDto, localVarRequestOptions, configuration)
169
165
 
170
166
  return {
171
167
  url: toPathString(localVarUrlObj),
@@ -173,17 +169,21 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
173
169
  };
174
170
  },
175
171
  /**
176
- * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
177
- * @summary Create the policy
178
- * @param {CreatePolicyRequestDto} createPolicyRequestDto
172
+ * This will create a draft policy in the database.
173
+ * @summary Create the draft-policy
174
+ * @param {string} policyCode
175
+ * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
179
176
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
180
177
  * @param {*} [options] Override http request option.
181
178
  * @throws {RequiredError}
182
179
  */
183
- createPolicy: async (createPolicyRequestDto: CreatePolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
184
- // verify required parameter 'createPolicyRequestDto' is not null or undefined
185
- assertParamExists('createPolicy', 'createPolicyRequestDto', createPolicyRequestDto)
186
- const localVarPath = `/insuranceservice/v1/policies`;
180
+ createPolicy_1: async (policyCode: string, createDraftPolicyRequestDto: CreateDraftPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
181
+ // verify required parameter 'policyCode' is not null or undefined
182
+ assertParamExists('createPolicy_1', 'policyCode', policyCode)
183
+ // verify required parameter 'createDraftPolicyRequestDto' is not null or undefined
184
+ assertParamExists('createPolicy_1', 'createDraftPolicyRequestDto', createDraftPolicyRequestDto)
185
+ const localVarPath = `/insuranceservice/v1/policies/{policyCode}/draft`
186
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
187
187
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
188
188
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
189
189
  let baseOptions;
@@ -212,7 +212,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
212
212
  setSearchParams(localVarUrlObj, localVarQueryParameter);
213
213
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
214
214
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
215
- localVarRequestOptions.data = serializeDataIfNeeded(createPolicyRequestDto, localVarRequestOptions, configuration)
215
+ localVarRequestOptions.data = serializeDataIfNeeded(createDraftPolicyRequestDto, localVarRequestOptions, configuration)
216
216
 
217
217
  return {
218
218
  url: toPathString(localVarUrlObj),
@@ -333,11 +333,11 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
333
333
  * @summary Retrieve the policy
334
334
  * @param {string} code Unique identifier for the object.
335
335
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
336
- * @param {string} [expand] You can expand policy in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
336
+ * @param {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'} [expand] You can expand policy in this endpoint. By default, versions will be an empty array.
337
337
  * @param {*} [options] Override http request option.
338
338
  * @throws {RequiredError}
339
339
  */
340
- getPolicy: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
340
+ getPolicy: async (code: string, authorization?: string, expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
341
341
  // verify required parameter 'code' is not null or undefined
342
342
  assertParamExists('getPolicy', 'code', code)
343
343
  const localVarPath = `/insuranceservice/v1/policies/{code}`
@@ -437,12 +437,12 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
437
437
  * @param {any} [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&lt;/i&gt;
438
438
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
439
439
  * @param {any} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, policyNumber, createdAt, updatedAt, policyStartDate, productVersionId, productId&lt;/i&gt;
440
- * @param {any} [expand] You can expand policy versions list in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
440
+ * @param {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'} [expand] You can expand policy versions list in this endpoint. By default, versions will be an empty array.
441
441
  * @param {any} [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.
442
442
  * @param {*} [options] Override http request option.
443
443
  * @throws {RequiredError}
444
444
  */
445
- listPolicies: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
445
+ listPolicies: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas', filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
446
446
  const localVarPath = `/insuranceservice/v1/policies`;
447
447
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
448
448
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -663,21 +663,21 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
663
663
  };
664
664
  },
665
665
  /**
666
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
667
- * @summary Update the draft-policy
668
- * @param {string} policyCode The policy code of the draft policy to
669
- * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
666
+ * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
667
+ * @summary Update the policy
668
+ * @param {string} code Unique identifier for the object.
669
+ * @param {PatchPolicyRequestDto} patchPolicyRequestDto
670
670
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
671
671
  * @param {*} [options] Override http request option.
672
672
  * @throws {RequiredError}
673
673
  */
674
- patchDraftPolicy: async (policyCode: string, patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
675
- // verify required parameter 'policyCode' is not null or undefined
676
- assertParamExists('patchDraftPolicy', 'policyCode', policyCode)
677
- // verify required parameter 'patchDraftPolicyRequestDto' is not null or undefined
678
- assertParamExists('patchDraftPolicy', 'patchDraftPolicyRequestDto', patchDraftPolicyRequestDto)
679
- const localVarPath = `/insuranceservice/v1/policies/{policyCode}/draft`
680
- .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
674
+ patchPolicy: async (code: string, patchPolicyRequestDto: PatchPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
675
+ // verify required parameter 'code' is not null or undefined
676
+ assertParamExists('patchPolicy', 'code', code)
677
+ // verify required parameter 'patchPolicyRequestDto' is not null or undefined
678
+ assertParamExists('patchPolicy', 'patchPolicyRequestDto', patchPolicyRequestDto)
679
+ const localVarPath = `/insuranceservice/v1/policies/{code}`
680
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
681
681
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
682
682
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
683
683
  let baseOptions;
@@ -706,7 +706,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
706
706
  setSearchParams(localVarUrlObj, localVarQueryParameter);
707
707
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
708
708
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
709
- localVarRequestOptions.data = serializeDataIfNeeded(patchDraftPolicyRequestDto, localVarRequestOptions, configuration)
709
+ localVarRequestOptions.data = serializeDataIfNeeded(patchPolicyRequestDto, localVarRequestOptions, configuration)
710
710
 
711
711
  return {
712
712
  url: toPathString(localVarUrlObj),
@@ -714,20 +714,24 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
714
714
  };
715
715
  },
716
716
  /**
717
- * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
718
- * @summary Update the policy
719
- * @param {string} code Unique identifier for the object.
720
- * @param {PatchPolicyRequestDto} patchPolicyRequestDto
717
+ * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
718
+ * @summary Update the draft-policy
719
+ * @param {string} policyCode
720
+ * @param {any} code Unique identifier for the object.
721
+ * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
721
722
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
722
723
  * @param {*} [options] Override http request option.
723
724
  * @throws {RequiredError}
724
725
  */
725
- patchPolicy: async (code: string, patchPolicyRequestDto: PatchPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
726
+ patchPolicy_2: async (policyCode: string, code: any, patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
727
+ // verify required parameter 'policyCode' is not null or undefined
728
+ assertParamExists('patchPolicy_2', 'policyCode', policyCode)
726
729
  // verify required parameter 'code' is not null or undefined
727
- assertParamExists('patchPolicy', 'code', code)
728
- // verify required parameter 'patchPolicyRequestDto' is not null or undefined
729
- assertParamExists('patchPolicy', 'patchPolicyRequestDto', patchPolicyRequestDto)
730
- const localVarPath = `/insuranceservice/v1/policies/{code}`
730
+ assertParamExists('patchPolicy_2', 'code', code)
731
+ // verify required parameter 'patchDraftPolicyRequestDto' is not null or undefined
732
+ assertParamExists('patchPolicy_2', 'patchDraftPolicyRequestDto', patchDraftPolicyRequestDto)
733
+ const localVarPath = `/insuranceservice/v1/policies/{policyCode}/draft`
734
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
731
735
  .replace(`{${"code"}}`, encodeURIComponent(String(code)));
732
736
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
733
737
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -757,7 +761,7 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
757
761
  setSearchParams(localVarUrlObj, localVarQueryParameter);
758
762
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
759
763
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
760
- localVarRequestOptions.data = serializeDataIfNeeded(patchPolicyRequestDto, localVarRequestOptions, configuration)
764
+ localVarRequestOptions.data = serializeDataIfNeeded(patchDraftPolicyRequestDto, localVarRequestOptions, configuration)
761
765
 
762
766
  return {
763
767
  url: toPathString(localVarUrlObj),
@@ -992,28 +996,28 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
992
996
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
993
997
  },
994
998
  /**
995
- * This will create a draft policy in the database.
996
- * @summary Create the draft-policy
997
- * @param {string} policyCode
998
- * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
999
+ * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
1000
+ * @summary Create the policy
1001
+ * @param {CreatePolicyRequestDto} createPolicyRequestDto
999
1002
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1000
1003
  * @param {*} [options] Override http request option.
1001
1004
  * @throws {RequiredError}
1002
1005
  */
1003
- async createDraftPolicy(policyCode: string, createDraftPolicyRequestDto: CreateDraftPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePolicyResponseClass>> {
1004
- const localVarAxiosArgs = await localVarAxiosParamCreator.createDraftPolicy(policyCode, createDraftPolicyRequestDto, authorization, options);
1006
+ async createPolicy(createPolicyRequestDto: CreatePolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePolicyResponseClass>> {
1007
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPolicy(createPolicyRequestDto, authorization, options);
1005
1008
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1006
1009
  },
1007
1010
  /**
1008
- * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
1009
- * @summary Create the policy
1010
- * @param {CreatePolicyRequestDto} createPolicyRequestDto
1011
+ * This will create a draft policy in the database.
1012
+ * @summary Create the draft-policy
1013
+ * @param {string} policyCode
1014
+ * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
1011
1015
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1012
1016
  * @param {*} [options] Override http request option.
1013
1017
  * @throws {RequiredError}
1014
1018
  */
1015
- async createPolicy(createPolicyRequestDto: CreatePolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePolicyResponseClass>> {
1016
- const localVarAxiosArgs = await localVarAxiosParamCreator.createPolicy(createPolicyRequestDto, authorization, options);
1019
+ async createPolicy_1(policyCode: string, createDraftPolicyRequestDto: CreateDraftPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePolicyResponseClass>> {
1020
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPolicy_1(policyCode, createDraftPolicyRequestDto, authorization, options);
1017
1021
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1018
1022
  },
1019
1023
  /**
@@ -1048,11 +1052,11 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1048
1052
  * @summary Retrieve the policy
1049
1053
  * @param {string} code Unique identifier for the object.
1050
1054
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1051
- * @param {string} [expand] You can expand policy in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
1055
+ * @param {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'} [expand] You can expand policy in this endpoint. By default, versions will be an empty array.
1052
1056
  * @param {*} [options] Override http request option.
1053
1057
  * @throws {RequiredError}
1054
1058
  */
1055
- async getPolicy(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyResponseClass>> {
1059
+ async getPolicy(code: string, authorization?: string, expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyResponseClass>> {
1056
1060
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicy(code, authorization, expand, options);
1057
1061
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1058
1062
  },
@@ -1078,12 +1082,12 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1078
1082
  * @param {any} [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&lt;/i&gt;
1079
1083
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1080
1084
  * @param {any} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, policyNumber, createdAt, updatedAt, policyStartDate, productVersionId, productId&lt;/i&gt;
1081
- * @param {any} [expand] You can expand policy versions list in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
1085
+ * @param {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'} [expand] You can expand policy versions list in this endpoint. By default, versions will be an empty array.
1082
1086
  * @param {any} [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.
1083
1087
  * @param {*} [options] Override http request option.
1084
1088
  * @throws {RequiredError}
1085
1089
  */
1086
- async listPolicies(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPoliciesResponseClass>> {
1090
+ async listPolicies(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas', filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPoliciesResponseClass>> {
1087
1091
  const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
1088
1092
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1089
1093
  },
@@ -1125,29 +1129,30 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
1125
1129
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1126
1130
  },
1127
1131
  /**
1128
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1129
- * @summary Update the draft-policy
1130
- * @param {string} policyCode The policy code of the draft policy to
1131
- * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
1132
+ * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1133
+ * @summary Update the policy
1134
+ * @param {string} code Unique identifier for the object.
1135
+ * @param {PatchPolicyRequestDto} patchPolicyRequestDto
1132
1136
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1133
1137
  * @param {*} [options] Override http request option.
1134
1138
  * @throws {RequiredError}
1135
1139
  */
1136
- async patchDraftPolicy(policyCode: string, patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PatchPolicyResponseClass>> {
1137
- const localVarAxiosArgs = await localVarAxiosParamCreator.patchDraftPolicy(policyCode, patchDraftPolicyRequestDto, authorization, options);
1140
+ async patchPolicy(code: string, patchPolicyRequestDto: PatchPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PatchPolicyResponseClass>> {
1141
+ const localVarAxiosArgs = await localVarAxiosParamCreator.patchPolicy(code, patchPolicyRequestDto, authorization, options);
1138
1142
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1139
1143
  },
1140
1144
  /**
1141
- * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1142
- * @summary Update the policy
1143
- * @param {string} code Unique identifier for the object.
1144
- * @param {PatchPolicyRequestDto} patchPolicyRequestDto
1145
+ * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1146
+ * @summary Update the draft-policy
1147
+ * @param {string} policyCode
1148
+ * @param {any} code Unique identifier for the object.
1149
+ * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
1145
1150
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1146
1151
  * @param {*} [options] Override http request option.
1147
1152
  * @throws {RequiredError}
1148
1153
  */
1149
- async patchPolicy(code: string, patchPolicyRequestDto: PatchPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PatchPolicyResponseClass>> {
1150
- const localVarAxiosArgs = await localVarAxiosParamCreator.patchPolicy(code, patchPolicyRequestDto, authorization, options);
1154
+ async patchPolicy_2(policyCode: string, code: any, patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PatchPolicyResponseClass>> {
1155
+ const localVarAxiosArgs = await localVarAxiosParamCreator.patchPolicy_2(policyCode, code, patchDraftPolicyRequestDto, authorization, options);
1151
1156
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1152
1157
  },
1153
1158
  /**
@@ -1225,27 +1230,27 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1225
1230
  return localVarFp.activatePolicy(policyCode, activatePolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1226
1231
  },
1227
1232
  /**
1228
- * This will create a draft policy in the database.
1229
- * @summary Create the draft-policy
1230
- * @param {string} policyCode
1231
- * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
1233
+ * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
1234
+ * @summary Create the policy
1235
+ * @param {CreatePolicyRequestDto} createPolicyRequestDto
1232
1236
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1233
1237
  * @param {*} [options] Override http request option.
1234
1238
  * @throws {RequiredError}
1235
1239
  */
1236
- createDraftPolicy(policyCode: string, createDraftPolicyRequestDto: CreateDraftPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePolicyResponseClass> {
1237
- return localVarFp.createDraftPolicy(policyCode, createDraftPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1240
+ createPolicy(createPolicyRequestDto: CreatePolicyRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePolicyResponseClass> {
1241
+ return localVarFp.createPolicy(createPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1238
1242
  },
1239
1243
  /**
1240
- * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
1241
- * @summary Create the policy
1242
- * @param {CreatePolicyRequestDto} createPolicyRequestDto
1244
+ * This will create a draft policy in the database.
1245
+ * @summary Create the draft-policy
1246
+ * @param {string} policyCode
1247
+ * @param {CreateDraftPolicyRequestDto} createDraftPolicyRequestDto
1243
1248
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1244
1249
  * @param {*} [options] Override http request option.
1245
1250
  * @throws {RequiredError}
1246
1251
  */
1247
- createPolicy(createPolicyRequestDto: CreatePolicyRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePolicyResponseClass> {
1248
- return localVarFp.createPolicy(createPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1252
+ createPolicy_1(policyCode: string, createDraftPolicyRequestDto: CreateDraftPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePolicyResponseClass> {
1253
+ return localVarFp.createPolicy_1(policyCode, createDraftPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1249
1254
  },
1250
1255
  /**
1251
1256
  * Permanently deletes the draft-policy. Supply the unique code that was returned when you created the draft-policy and this will delete it.
@@ -1277,11 +1282,11 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1277
1282
  * @summary Retrieve the policy
1278
1283
  * @param {string} code Unique identifier for the object.
1279
1284
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1280
- * @param {string} [expand] You can expand policy in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
1285
+ * @param {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'} [expand] You can expand policy in this endpoint. By default, versions will be an empty array.
1281
1286
  * @param {*} [options] Override http request option.
1282
1287
  * @throws {RequiredError}
1283
1288
  */
1284
- getPolicy(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetPolicyResponseClass> {
1289
+ getPolicy(code: string, authorization?: string, expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas', options?: any): AxiosPromise<GetPolicyResponseClass> {
1285
1290
  return localVarFp.getPolicy(code, authorization, expand, options).then((request) => request(axios, basePath));
1286
1291
  },
1287
1292
  /**
@@ -1305,12 +1310,12 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1305
1310
  * @param {any} [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&lt;/i&gt;
1306
1311
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1307
1312
  * @param {any} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, policyNumber, createdAt, updatedAt, policyStartDate, productVersionId, productId&lt;/i&gt;
1308
- * @param {any} [expand] You can expand policy versions list in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
1313
+ * @param {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'} [expand] You can expand policy versions list in this endpoint. By default, versions will be an empty array.
1309
1314
  * @param {any} [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.
1310
1315
  * @param {*} [options] Override http request option.
1311
1316
  * @throws {RequiredError}
1312
1317
  */
1313
- listPolicies(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListPoliciesResponseClass> {
1318
+ listPolicies(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas', filters?: any, options?: any): AxiosPromise<ListPoliciesResponseClass> {
1314
1319
  return localVarFp.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
1315
1320
  },
1316
1321
  /**
@@ -1348,18 +1353,6 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1348
1353
  listPolicyVersions(policyCode: string, authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListPolicyVersionResponseClass> {
1349
1354
  return localVarFp.listPolicyVersions(policyCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
1350
1355
  },
1351
- /**
1352
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1353
- * @summary Update the draft-policy
1354
- * @param {string} policyCode The policy code of the draft policy to
1355
- * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
1356
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1357
- * @param {*} [options] Override http request option.
1358
- * @throws {RequiredError}
1359
- */
1360
- patchDraftPolicy(policyCode: string, patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<PatchPolicyResponseClass> {
1361
- return localVarFp.patchDraftPolicy(policyCode, patchDraftPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1362
- },
1363
1356
  /**
1364
1357
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1365
1358
  * @summary Update the policy
@@ -1372,6 +1365,19 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
1372
1365
  patchPolicy(code: string, patchPolicyRequestDto: PatchPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<PatchPolicyResponseClass> {
1373
1366
  return localVarFp.patchPolicy(code, patchPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1374
1367
  },
1368
+ /**
1369
+ * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1370
+ * @summary Update the draft-policy
1371
+ * @param {string} policyCode
1372
+ * @param {any} code Unique identifier for the object.
1373
+ * @param {PatchDraftPolicyRequestDto} patchDraftPolicyRequestDto
1374
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1375
+ * @param {*} [options] Override http request option.
1376
+ * @throws {RequiredError}
1377
+ */
1378
+ patchPolicy_2(policyCode: string, code: any, patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<PatchPolicyResponseClass> {
1379
+ return localVarFp.patchPolicy_2(policyCode, code, patchDraftPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1380
+ },
1375
1381
  /**
1376
1382
  * Request to suspend an existing policy by tenant.
1377
1383
  * @summary Suspend a policy by tenant
@@ -1452,50 +1458,50 @@ export interface PoliciesApiActivatePolicyRequest {
1452
1458
  }
1453
1459
 
1454
1460
  /**
1455
- * Request parameters for createDraftPolicy operation in PoliciesApi.
1461
+ * Request parameters for createPolicy operation in PoliciesApi.
1456
1462
  * @export
1457
- * @interface PoliciesApiCreateDraftPolicyRequest
1463
+ * @interface PoliciesApiCreatePolicyRequest
1458
1464
  */
1459
- export interface PoliciesApiCreateDraftPolicyRequest {
1460
- /**
1461
- *
1462
- * @type {string}
1463
- * @memberof PoliciesApiCreateDraftPolicy
1464
- */
1465
- readonly policyCode: string
1466
-
1465
+ export interface PoliciesApiCreatePolicyRequest {
1467
1466
  /**
1468
1467
  *
1469
- * @type {CreateDraftPolicyRequestDto}
1470
- * @memberof PoliciesApiCreateDraftPolicy
1468
+ * @type {CreatePolicyRequestDto}
1469
+ * @memberof PoliciesApiCreatePolicy
1471
1470
  */
1472
- readonly createDraftPolicyRequestDto: CreateDraftPolicyRequestDto
1471
+ readonly createPolicyRequestDto: CreatePolicyRequestDto
1473
1472
 
1474
1473
  /**
1475
1474
  * Bearer Token: provided by the login endpoint under the name accessToken.
1476
1475
  * @type {string}
1477
- * @memberof PoliciesApiCreateDraftPolicy
1476
+ * @memberof PoliciesApiCreatePolicy
1478
1477
  */
1479
1478
  readonly authorization?: string
1480
1479
  }
1481
1480
 
1482
1481
  /**
1483
- * Request parameters for createPolicy operation in PoliciesApi.
1482
+ * Request parameters for createPolicy_1 operation in PoliciesApi.
1484
1483
  * @export
1485
- * @interface PoliciesApiCreatePolicyRequest
1484
+ * @interface PoliciesApiCreatePolicy0Request
1486
1485
  */
1487
- export interface PoliciesApiCreatePolicyRequest {
1486
+ export interface PoliciesApiCreatePolicy0Request {
1488
1487
  /**
1489
1488
  *
1490
- * @type {CreatePolicyRequestDto}
1491
- * @memberof PoliciesApiCreatePolicy
1489
+ * @type {string}
1490
+ * @memberof PoliciesApiCreatePolicy0
1492
1491
  */
1493
- readonly createPolicyRequestDto: CreatePolicyRequestDto
1492
+ readonly policyCode: string
1493
+
1494
+ /**
1495
+ *
1496
+ * @type {CreateDraftPolicyRequestDto}
1497
+ * @memberof PoliciesApiCreatePolicy0
1498
+ */
1499
+ readonly createDraftPolicyRequestDto: CreateDraftPolicyRequestDto
1494
1500
 
1495
1501
  /**
1496
1502
  * Bearer Token: provided by the login endpoint under the name accessToken.
1497
1503
  * @type {string}
1498
- * @memberof PoliciesApiCreatePolicy
1504
+ * @memberof PoliciesApiCreatePolicy0
1499
1505
  */
1500
1506
  readonly authorization?: string
1501
1507
  }
@@ -1584,11 +1590,11 @@ export interface PoliciesApiGetPolicyRequest {
1584
1590
  readonly authorization?: string
1585
1591
 
1586
1592
  /**
1587
- * You can expand policy in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
1588
- * @type {string}
1593
+ * You can expand policy in this endpoint. By default, versions will be an empty array.
1594
+ * @type {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'}
1589
1595
  * @memberof PoliciesApiGetPolicy
1590
1596
  */
1591
- readonly expand?: string
1597
+ readonly expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'
1592
1598
  }
1593
1599
 
1594
1600
  /**
@@ -1668,11 +1674,11 @@ export interface PoliciesApiListPoliciesRequest {
1668
1674
  readonly order?: any
1669
1675
 
1670
1676
  /**
1671
- * You can expand policy versions list in this endpoint. \&#39; + \&#39;By default, versions will be an empty array. Allowed values: versions, product, timelines, premiums, premiumItems, premiumFormulas, currentVersion, currentTimelines, currentPremiums, currentPremiumItems, currentPremiumFormulas.
1672
- * @type {any}
1677
+ * You can expand policy versions list in this endpoint. By default, versions will be an empty array.
1678
+ * @type {'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'}
1673
1679
  * @memberof PoliciesApiListPolicies
1674
1680
  */
1675
- readonly expand?: any
1681
+ readonly expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'
1676
1682
 
1677
1683
  /**
1678
1684
  * 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.
@@ -1816,57 +1822,64 @@ export interface PoliciesApiListPolicyVersionsRequest {
1816
1822
  }
1817
1823
 
1818
1824
  /**
1819
- * Request parameters for patchDraftPolicy operation in PoliciesApi.
1825
+ * Request parameters for patchPolicy operation in PoliciesApi.
1820
1826
  * @export
1821
- * @interface PoliciesApiPatchDraftPolicyRequest
1827
+ * @interface PoliciesApiPatchPolicyRequest
1822
1828
  */
1823
- export interface PoliciesApiPatchDraftPolicyRequest {
1829
+ export interface PoliciesApiPatchPolicyRequest {
1824
1830
  /**
1825
- * The policy code of the draft policy to
1831
+ * Unique identifier for the object.
1826
1832
  * @type {string}
1827
- * @memberof PoliciesApiPatchDraftPolicy
1833
+ * @memberof PoliciesApiPatchPolicy
1828
1834
  */
1829
- readonly policyCode: string
1835
+ readonly code: string
1830
1836
 
1831
1837
  /**
1832
1838
  *
1833
- * @type {PatchDraftPolicyRequestDto}
1834
- * @memberof PoliciesApiPatchDraftPolicy
1839
+ * @type {PatchPolicyRequestDto}
1840
+ * @memberof PoliciesApiPatchPolicy
1835
1841
  */
1836
- readonly patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto
1842
+ readonly patchPolicyRequestDto: PatchPolicyRequestDto
1837
1843
 
1838
1844
  /**
1839
1845
  * Bearer Token: provided by the login endpoint under the name accessToken.
1840
1846
  * @type {string}
1841
- * @memberof PoliciesApiPatchDraftPolicy
1847
+ * @memberof PoliciesApiPatchPolicy
1842
1848
  */
1843
1849
  readonly authorization?: string
1844
1850
  }
1845
1851
 
1846
1852
  /**
1847
- * Request parameters for patchPolicy operation in PoliciesApi.
1853
+ * Request parameters for patchPolicy_2 operation in PoliciesApi.
1848
1854
  * @export
1849
- * @interface PoliciesApiPatchPolicyRequest
1855
+ * @interface PoliciesApiPatchPolicy0Request
1850
1856
  */
1851
- export interface PoliciesApiPatchPolicyRequest {
1857
+ export interface PoliciesApiPatchPolicy0Request {
1852
1858
  /**
1853
- * Unique identifier for the object.
1859
+ *
1854
1860
  * @type {string}
1855
- * @memberof PoliciesApiPatchPolicy
1861
+ * @memberof PoliciesApiPatchPolicy0
1856
1862
  */
1857
- readonly code: string
1863
+ readonly policyCode: string
1864
+
1865
+ /**
1866
+ * Unique identifier for the object.
1867
+ * @type {any}
1868
+ * @memberof PoliciesApiPatchPolicy0
1869
+ */
1870
+ readonly code: any
1858
1871
 
1859
1872
  /**
1860
1873
  *
1861
- * @type {PatchPolicyRequestDto}
1862
- * @memberof PoliciesApiPatchPolicy
1874
+ * @type {PatchDraftPolicyRequestDto}
1875
+ * @memberof PoliciesApiPatchPolicy0
1863
1876
  */
1864
- readonly patchPolicyRequestDto: PatchPolicyRequestDto
1877
+ readonly patchDraftPolicyRequestDto: PatchDraftPolicyRequestDto
1865
1878
 
1866
1879
  /**
1867
1880
  * Bearer Token: provided by the login endpoint under the name accessToken.
1868
1881
  * @type {string}
1869
- * @memberof PoliciesApiPatchPolicy
1882
+ * @memberof PoliciesApiPatchPolicy0
1870
1883
  */
1871
1884
  readonly authorization?: string
1872
1885
  }
@@ -2003,27 +2016,27 @@ export class PoliciesApi extends BaseAPI {
2003
2016
  }
2004
2017
 
2005
2018
  /**
2006
- * This will create a draft policy in the database.
2007
- * @summary Create the draft-policy
2008
- * @param {PoliciesApiCreateDraftPolicyRequest} requestParameters Request parameters.
2019
+ * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
2020
+ * @summary Create the policy
2021
+ * @param {PoliciesApiCreatePolicyRequest} requestParameters Request parameters.
2009
2022
  * @param {*} [options] Override http request option.
2010
2023
  * @throws {RequiredError}
2011
2024
  * @memberof PoliciesApi
2012
2025
  */
2013
- public createDraftPolicy(requestParameters: PoliciesApiCreateDraftPolicyRequest, options?: AxiosRequestConfig) {
2014
- return PoliciesApiFp(this.configuration).createDraftPolicy(requestParameters.policyCode, requestParameters.createDraftPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2026
+ public createPolicy(requestParameters: PoliciesApiCreatePolicyRequest, options?: AxiosRequestConfig) {
2027
+ return PoliciesApiFp(this.configuration).createPolicy(requestParameters.createPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2015
2028
  }
2016
2029
 
2017
2030
  /**
2018
- * This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
2019
- * @summary Create the policy
2020
- * @param {PoliciesApiCreatePolicyRequest} requestParameters Request parameters.
2031
+ * This will create a draft policy in the database.
2032
+ * @summary Create the draft-policy
2033
+ * @param {PoliciesApiCreatePolicy0Request} requestParameters Request parameters.
2021
2034
  * @param {*} [options] Override http request option.
2022
2035
  * @throws {RequiredError}
2023
2036
  * @memberof PoliciesApi
2024
2037
  */
2025
- public createPolicy(requestParameters: PoliciesApiCreatePolicyRequest, options?: AxiosRequestConfig) {
2026
- return PoliciesApiFp(this.configuration).createPolicy(requestParameters.createPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2038
+ public createPolicy_1(requestParameters: PoliciesApiCreatePolicy0Request, options?: AxiosRequestConfig) {
2039
+ return PoliciesApiFp(this.configuration).createPolicy_1(requestParameters.policyCode, requestParameters.createDraftPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2027
2040
  }
2028
2041
 
2029
2042
  /**
@@ -2111,27 +2124,27 @@ export class PoliciesApi extends BaseAPI {
2111
2124
  }
2112
2125
 
2113
2126
  /**
2114
- * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2115
- * @summary Update the draft-policy
2116
- * @param {PoliciesApiPatchDraftPolicyRequest} requestParameters Request parameters.
2127
+ * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2128
+ * @summary Update the policy
2129
+ * @param {PoliciesApiPatchPolicyRequest} requestParameters Request parameters.
2117
2130
  * @param {*} [options] Override http request option.
2118
2131
  * @throws {RequiredError}
2119
2132
  * @memberof PoliciesApi
2120
2133
  */
2121
- public patchDraftPolicy(requestParameters: PoliciesApiPatchDraftPolicyRequest, options?: AxiosRequestConfig) {
2122
- return PoliciesApiFp(this.configuration).patchDraftPolicy(requestParameters.policyCode, requestParameters.patchDraftPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2134
+ public patchPolicy(requestParameters: PoliciesApiPatchPolicyRequest, options?: AxiosRequestConfig) {
2135
+ return PoliciesApiFp(this.configuration).patchPolicy(requestParameters.code, requestParameters.patchPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2123
2136
  }
2124
2137
 
2125
2138
  /**
2126
- * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2127
- * @summary Update the policy
2128
- * @param {PoliciesApiPatchPolicyRequest} requestParameters Request parameters.
2139
+ * Updates the specified draft-policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2140
+ * @summary Update the draft-policy
2141
+ * @param {PoliciesApiPatchPolicy0Request} requestParameters Request parameters.
2129
2142
  * @param {*} [options] Override http request option.
2130
2143
  * @throws {RequiredError}
2131
2144
  * @memberof PoliciesApi
2132
2145
  */
2133
- public patchPolicy(requestParameters: PoliciesApiPatchPolicyRequest, options?: AxiosRequestConfig) {
2134
- return PoliciesApiFp(this.configuration).patchPolicy(requestParameters.code, requestParameters.patchPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2146
+ public patchPolicy_2(requestParameters: PoliciesApiPatchPolicy0Request, options?: AxiosRequestConfig) {
2147
+ return PoliciesApiFp(this.configuration).patchPolicy_2(requestParameters.policyCode, requestParameters.code, requestParameters.patchDraftPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2135
2148
  }
2136
2149
 
2137
2150
  /**