@emilgroup/customer-sdk-node 1.6.1 → 1.9.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 (204) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/README.md +2 -2
  3. package/api/claims-api.ts +557 -0
  4. package/api/customers-api.ts +305 -684
  5. package/api/policies-api.ts +980 -0
  6. package/api/products-api.ts +357 -0
  7. package/api.ts +7 -1
  8. package/base.ts +24 -32
  9. package/common.ts +2 -1
  10. package/configuration.ts +1 -1
  11. package/dist/api/claims-api.d.ts +327 -0
  12. package/dist/api/claims-api.js +508 -0
  13. package/dist/api/customers-api.d.ts +213 -443
  14. package/dist/api/customers-api.js +232 -475
  15. package/dist/api/policies-api.d.ts +578 -0
  16. package/dist/api/policies-api.js +808 -0
  17. package/dist/api/products-api.d.ts +215 -0
  18. package/dist/api/products-api.js +341 -0
  19. package/dist/api.d.ts +4 -1
  20. package/dist/api.js +4 -1
  21. package/dist/base.d.ts +2 -3
  22. package/dist/base.js +20 -21
  23. package/dist/common.d.ts +1 -1
  24. package/dist/common.js +2 -2
  25. package/dist/configuration.d.ts +1 -1
  26. package/dist/configuration.js +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/models/account-class.d.ts +1 -1
  30. package/dist/models/account-class.js +1 -1
  31. package/dist/models/account-policy-class.d.ts +1 -1
  32. package/dist/models/account-policy-class.js +1 -1
  33. package/dist/models/authentication-result-class.d.ts +1 -1
  34. package/dist/models/authentication-result-class.js +1 -1
  35. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  36. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  37. package/dist/models/complete-payment-setup-psp-request.d.ts +32 -0
  38. package/dist/models/complete-payment-setup-psp-request.js +15 -0
  39. package/dist/models/complete-payment-setup-response-class.d.ts +24 -0
  40. package/dist/models/complete-payment-setup-response-class.js +15 -0
  41. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  42. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  43. package/dist/models/create-account-request-dto.d.ts +96 -0
  44. package/dist/models/create-account-request-dto.js +21 -0
  45. package/dist/models/create-customer-claim-request-dto.d.ts +108 -0
  46. package/dist/models/create-customer-claim-request-dto.js +15 -0
  47. package/dist/models/create-customer-request-dto.d.ts +8 -1
  48. package/dist/models/create-customer-request-dto.js +1 -1
  49. package/dist/models/create-customer-response-class.d.ts +1 -1
  50. package/dist/models/create-customer-response-class.js +1 -1
  51. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  52. package/dist/models/create-presigned-post-response-class.js +15 -0
  53. package/dist/models/customer-class.d.ts +8 -2
  54. package/dist/models/customer-class.js +1 -1
  55. package/dist/models/customer-document-class.d.ts +2 -2
  56. package/dist/models/customer-document-class.js +1 -1
  57. package/dist/models/customer-product-class.d.ts +54 -0
  58. package/dist/models/customer-product-class.js +15 -0
  59. package/dist/models/forgot-password-request-dto.d.ts +1 -1
  60. package/dist/models/forgot-password-request-dto.js +1 -1
  61. package/dist/models/get-customer-document-download-url-response-class.d.ts +1 -1
  62. package/dist/models/get-customer-document-download-url-response-class.js +1 -1
  63. package/dist/models/get-customer-response-class.d.ts +1 -1
  64. package/dist/models/get-customer-response-class.js +1 -1
  65. package/dist/models/get-policy-response-class.d.ts +1 -1
  66. package/dist/models/get-policy-response-class.js +1 -1
  67. package/dist/models/get-product-response-class.d.ts +25 -0
  68. package/dist/models/get-product-response-class.js +15 -0
  69. package/dist/models/index.d.ts +15 -0
  70. package/dist/models/index.js +15 -0
  71. package/dist/models/initiate-auth-request-dto.d.ts +1 -1
  72. package/dist/models/initiate-auth-request-dto.js +1 -1
  73. package/dist/models/initiate-auth-response-class.d.ts +1 -1
  74. package/dist/models/initiate-auth-response-class.js +1 -1
  75. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  76. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  77. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  78. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  79. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  80. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  81. package/dist/models/invite-by-customer-request-dto.d.ts +1 -1
  82. package/dist/models/invite-by-customer-request-dto.js +1 -1
  83. package/dist/models/invite-by-customer-response-class.d.ts +1 -1
  84. package/dist/models/invite-by-customer-response-class.js +1 -1
  85. package/dist/models/invite-by-tenant-response-class.d.ts +1 -1
  86. package/dist/models/invite-by-tenant-response-class.js +1 -1
  87. package/dist/models/invite-class.d.ts +1 -1
  88. package/dist/models/invite-class.js +1 -1
  89. package/dist/models/invoice-class.d.ts +3 -3
  90. package/dist/models/invoice-class.js +1 -1
  91. package/dist/models/list-documents-response-class.d.ts +1 -1
  92. package/dist/models/list-documents-response-class.js +1 -1
  93. package/dist/models/list-invoices-response-class.d.ts +1 -1
  94. package/dist/models/list-invoices-response-class.js +1 -1
  95. package/dist/models/list-policies-response-class.d.ts +5 -5
  96. package/dist/models/list-policies-response-class.js +1 -1
  97. package/dist/models/policy-class.d.ts +14 -1
  98. package/dist/models/policy-class.js +1 -1
  99. package/dist/models/policy-object-class.d.ts +1 -1
  100. package/dist/models/policy-object-class.js +1 -1
  101. package/dist/models/policy-premium-class.d.ts +1 -1
  102. package/dist/models/policy-premium-class.js +1 -1
  103. package/dist/models/policy-premium-item-class.d.ts +1 -1
  104. package/dist/models/policy-premium-item-class.js +1 -1
  105. package/dist/models/policy-version-class.d.ts +1 -1
  106. package/dist/models/policy-version-class.js +1 -1
  107. package/dist/models/refresh-token-dto.d.ts +1 -1
  108. package/dist/models/refresh-token-dto.js +1 -1
  109. package/dist/models/request-policy-update-request-dto.d.ts +1 -1
  110. package/dist/models/request-policy-update-request-dto.js +1 -1
  111. package/dist/models/request-policy-update-response-class.d.ts +1 -1
  112. package/dist/models/request-policy-update-response-class.js +1 -1
  113. package/dist/models/reset-password-by-customer-request-dto.d.ts +1 -1
  114. package/dist/models/reset-password-by-customer-request-dto.js +1 -1
  115. package/dist/models/respond-to-auth-challenge-class.d.ts +1 -1
  116. package/dist/models/respond-to-auth-challenge-class.js +1 -1
  117. package/dist/models/respond-to-auth-challenge-request-dto.d.ts +1 -1
  118. package/dist/models/respond-to-auth-challenge-request-dto.js +1 -1
  119. package/dist/models/shared-customer-policy-object-request-dto.d.ts +1 -1
  120. package/dist/models/shared-customer-policy-object-request-dto.js +1 -1
  121. package/dist/models/shared-invoice-item-class.d.ts +1 -1
  122. package/dist/models/shared-invoice-item-class.js +1 -1
  123. package/dist/models/terminate-customer-policy-request-dto.d.ts +1 -1
  124. package/dist/models/terminate-customer-policy-request-dto.js +1 -1
  125. package/dist/models/terminate-customer-policy-response-class.d.ts +1 -1
  126. package/dist/models/terminate-customer-policy-response-class.js +1 -1
  127. package/dist/models/timeslice-class.d.ts +1 -1
  128. package/dist/models/timeslice-class.js +1 -1
  129. package/dist/models/update-account-request-dto.d.ts +2 -2
  130. package/dist/models/update-account-request-dto.js +1 -1
  131. package/dist/models/update-customer-claim-request-dto.d.ts +120 -0
  132. package/dist/models/update-customer-claim-request-dto.js +15 -0
  133. package/dist/models/update-customer-request-dto.d.ts +1 -1
  134. package/dist/models/update-customer-request-dto.js +1 -1
  135. package/dist/models/update-customer-response-class.d.ts +1 -1
  136. package/dist/models/update-customer-response-class.js +1 -1
  137. package/dist/models/upload-customer-claim-documents-request-dto.d.ts +36 -0
  138. package/dist/models/upload-customer-claim-documents-request-dto.js +15 -0
  139. package/dist/models/upload-customer-policy-documents-request-dto.d.ts +47 -0
  140. package/dist/models/upload-customer-policy-documents-request-dto.js +20 -0
  141. package/dist/models/verify-customer-invite-response-class.d.ts +1 -1
  142. package/dist/models/verify-customer-invite-response-class.js +1 -1
  143. package/dist/models/withdraw-customer-policy-response-class.d.ts +1 -1
  144. package/dist/models/withdraw-customer-policy-response-class.js +1 -1
  145. package/index.ts +1 -1
  146. package/models/account-class.ts +1 -1
  147. package/models/account-policy-class.ts +1 -1
  148. package/models/authentication-result-class.ts +1 -1
  149. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  150. package/models/complete-payment-setup-psp-request.ts +38 -0
  151. package/models/complete-payment-setup-response-class.ts +30 -0
  152. package/models/complete-stripe-payment-setup-request-dto.ts +66 -0
  153. package/models/create-account-request-dto.ts +105 -0
  154. package/models/create-customer-claim-request-dto.ts +114 -0
  155. package/models/create-customer-request-dto.ts +8 -1
  156. package/models/create-customer-response-class.ts +1 -1
  157. package/models/create-presigned-post-response-class.ts +36 -0
  158. package/models/customer-class.ts +8 -2
  159. package/models/customer-document-class.ts +1 -1
  160. package/models/customer-product-class.ts +60 -0
  161. package/models/forgot-password-request-dto.ts +1 -1
  162. package/models/get-customer-document-download-url-response-class.ts +1 -1
  163. package/models/get-customer-response-class.ts +1 -1
  164. package/models/get-policy-response-class.ts +1 -1
  165. package/models/get-product-response-class.ts +31 -0
  166. package/models/index.ts +15 -0
  167. package/models/initiate-auth-request-dto.ts +1 -1
  168. package/models/initiate-auth-response-class.ts +1 -1
  169. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  170. package/models/initiate-payment-setup-response-class.ts +38 -0
  171. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  172. package/models/invite-by-customer-request-dto.ts +1 -1
  173. package/models/invite-by-customer-response-class.ts +1 -1
  174. package/models/invite-by-tenant-response-class.ts +1 -1
  175. package/models/invite-class.ts +1 -1
  176. package/models/invoice-class.ts +1 -1
  177. package/models/list-documents-response-class.ts +1 -1
  178. package/models/list-invoices-response-class.ts +1 -1
  179. package/models/list-policies-response-class.ts +5 -5
  180. package/models/policy-class.ts +14 -1
  181. package/models/policy-object-class.ts +1 -1
  182. package/models/policy-premium-class.ts +1 -1
  183. package/models/policy-premium-item-class.ts +1 -1
  184. package/models/policy-version-class.ts +1 -1
  185. package/models/refresh-token-dto.ts +1 -1
  186. package/models/request-policy-update-request-dto.ts +1 -1
  187. package/models/request-policy-update-response-class.ts +1 -1
  188. package/models/reset-password-by-customer-request-dto.ts +1 -1
  189. package/models/respond-to-auth-challenge-class.ts +1 -1
  190. package/models/respond-to-auth-challenge-request-dto.ts +1 -1
  191. package/models/shared-customer-policy-object-request-dto.ts +1 -1
  192. package/models/shared-invoice-item-class.ts +1 -1
  193. package/models/terminate-customer-policy-request-dto.ts +1 -1
  194. package/models/terminate-customer-policy-response-class.ts +1 -1
  195. package/models/timeslice-class.ts +1 -1
  196. package/models/update-account-request-dto.ts +1 -1
  197. package/models/update-customer-claim-request-dto.ts +126 -0
  198. package/models/update-customer-request-dto.ts +1 -1
  199. package/models/update-customer-response-class.ts +1 -1
  200. package/models/upload-customer-claim-documents-request-dto.ts +42 -0
  201. package/models/upload-customer-policy-documents-request-dto.ts +56 -0
  202. package/models/verify-customer-invite-response-class.ts +1 -1
  203. package/models/withdraw-customer-policy-response-class.ts +1 -1
  204. package/package.json +2 -3
@@ -0,0 +1,980 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService 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 { CreatePresignedPostResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { GetPolicyResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { ListPoliciesResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { RequestPolicyUpdateRequestDto } from '../models';
31
+ // @ts-ignore
32
+ import { RequestPolicyUpdateResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { TerminateCustomerPolicyRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { TerminateCustomerPolicyResponseClass } from '../models';
37
+ // @ts-ignore
38
+ import { UploadCustomerPolicyDocumentsRequestDto } from '../models';
39
+ // @ts-ignore
40
+ import { WithdrawCustomerPolicyResponseClass } from '../models';
41
+ // URLSearchParams not necessarily used
42
+ // @ts-ignore
43
+ import { URL, URLSearchParams } from 'url';
44
+ const FormData = require('form-data');
45
+ /**
46
+ * PoliciesApi - axios parameter creator
47
+ * @export
48
+ */
49
+ export const PoliciesApiAxiosParamCreator = function (configuration?: Configuration) {
50
+ return {
51
+ /**
52
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
53
+ * @summary Get current policy version details. Can be filtered by a specific date.
54
+ * @param {string} policyCode The policy code.
55
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
56
+ * @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices.
57
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
58
+ * @param {*} [options] Override http request option.
59
+ * @throws {RequiredError}
60
+ */
61
+ getCustomerPolicyDataByDate: async (policyCode: string, customerCode: string, timesliceDate?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
62
+ // verify required parameter 'policyCode' is not null or undefined
63
+ assertParamExists('getCustomerPolicyDataByDate', 'policyCode', policyCode)
64
+ // verify required parameter 'customerCode' is not null or undefined
65
+ assertParamExists('getCustomerPolicyDataByDate', 'customerCode', customerCode)
66
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}/current-version`
67
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
68
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
69
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
70
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
71
+ let baseOptions;
72
+ let baseAccessToken;
73
+ if (configuration) {
74
+ baseOptions = configuration.baseOptions;
75
+ baseAccessToken = configuration.accessToken;
76
+ }
77
+
78
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
79
+ const localVarHeaderParameter = {} as any;
80
+ const localVarQueryParameter = {} as any;
81
+
82
+ if (timesliceDate !== undefined) {
83
+ localVarQueryParameter['timesliceDate'] = timesliceDate;
84
+ }
85
+
86
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
87
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
88
+ }
89
+
90
+
91
+
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95
+
96
+ return {
97
+ url: toPathString(localVarUrlObj),
98
+ options: localVarRequestOptions,
99
+ };
100
+ },
101
+ /**
102
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
103
+ * @summary Get policy details
104
+ * @param {string} policyCode The policy code.
105
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
106
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
107
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
108
+ * @param {*} [options] Override http request option.
109
+ * @throws {RequiredError}
110
+ */
111
+ getPolicy: async (policyCode: string, customerCode: string, expand?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
112
+ // verify required parameter 'policyCode' is not null or undefined
113
+ assertParamExists('getPolicy', 'policyCode', policyCode)
114
+ // verify required parameter 'customerCode' is not null or undefined
115
+ assertParamExists('getPolicy', 'customerCode', customerCode)
116
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}`
117
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
118
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
119
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
120
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
121
+ let baseOptions;
122
+ let baseAccessToken;
123
+ if (configuration) {
124
+ baseOptions = configuration.baseOptions;
125
+ baseAccessToken = configuration.accessToken;
126
+ }
127
+
128
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
129
+ const localVarHeaderParameter = {} as any;
130
+ const localVarQueryParameter = {} as any;
131
+
132
+ if (expand !== undefined) {
133
+ localVarQueryParameter['expand'] = expand;
134
+ }
135
+
136
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
138
+ }
139
+
140
+
141
+
142
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
143
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
144
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
145
+
146
+ return {
147
+ url: toPathString(localVarUrlObj),
148
+ options: localVarRequestOptions,
149
+ };
150
+ },
151
+ /**
152
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
153
+ * @summary List policies of a customer
154
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
155
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
156
+ * @param {any} [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.
157
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
158
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
159
+ * @param {any} [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.
160
+ * @param {any} [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.
161
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
162
+ * @param {*} [options] Override http request option.
163
+ * @throws {RequiredError}
164
+ */
165
+ listPolicies: async (customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
166
+ // verify required parameter 'customerCode' is not null or undefined
167
+ assertParamExists('listPolicies', 'customerCode', customerCode)
168
+ const localVarPath = `/v1/customers/{customerCode}/policies`
169
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
170
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
171
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
172
+ let baseOptions;
173
+ let baseAccessToken;
174
+ if (configuration) {
175
+ baseOptions = configuration.baseOptions;
176
+ baseAccessToken = configuration.accessToken;
177
+ }
178
+
179
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
180
+ const localVarHeaderParameter = {} as any;
181
+ const localVarQueryParameter = {} as any;
182
+
183
+ if (pageSize !== undefined) {
184
+ localVarQueryParameter['pageSize'] = pageSize;
185
+ }
186
+
187
+ if (pageToken !== undefined) {
188
+ localVarQueryParameter['pageToken'] = pageToken;
189
+ }
190
+
191
+ if (filter !== undefined) {
192
+ localVarQueryParameter['filter'] = filter;
193
+ }
194
+
195
+ if (search !== undefined) {
196
+ localVarQueryParameter['search'] = search;
197
+ }
198
+
199
+ if (order !== undefined) {
200
+ localVarQueryParameter['order'] = order;
201
+ }
202
+
203
+ if (expand !== undefined) {
204
+ localVarQueryParameter['expand'] = expand;
205
+ }
206
+
207
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
208
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
209
+ }
210
+
211
+
212
+
213
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
214
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
215
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
216
+
217
+ return {
218
+ url: toPathString(localVarUrlObj),
219
+ options: localVarRequestOptions,
220
+ };
221
+ },
222
+ /**
223
+ * Request to update an existing policy by customer.
224
+ * @summary Request policy update by customer
225
+ * @param {string} policyCode The code of the policy that the customer wants to update.
226
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
227
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
228
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
229
+ * @param {*} [options] Override http request option.
230
+ * @throws {RequiredError}
231
+ */
232
+ requestPolicyUpdate: async (policyCode: string, customerCode: string, requestPolicyUpdateRequestDto: RequestPolicyUpdateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
233
+ // verify required parameter 'policyCode' is not null or undefined
234
+ assertParamExists('requestPolicyUpdate', 'policyCode', policyCode)
235
+ // verify required parameter 'customerCode' is not null or undefined
236
+ assertParamExists('requestPolicyUpdate', 'customerCode', customerCode)
237
+ // verify required parameter 'requestPolicyUpdateRequestDto' is not null or undefined
238
+ assertParamExists('requestPolicyUpdate', 'requestPolicyUpdateRequestDto', requestPolicyUpdateRequestDto)
239
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}/request-update`
240
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
241
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
242
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
243
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
244
+ let baseOptions;
245
+ let baseAccessToken;
246
+ if (configuration) {
247
+ baseOptions = configuration.baseOptions;
248
+ baseAccessToken = configuration.accessToken;
249
+ }
250
+
251
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
252
+ const localVarHeaderParameter = {} as any;
253
+ const localVarQueryParameter = {} as any;
254
+
255
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
256
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
257
+ }
258
+
259
+
260
+
261
+ localVarHeaderParameter['Content-Type'] = 'application/json';
262
+
263
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
264
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
265
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
266
+ localVarRequestOptions.data = serializeDataIfNeeded(requestPolicyUpdateRequestDto, localVarRequestOptions, configuration)
267
+
268
+ return {
269
+ url: toPathString(localVarUrlObj),
270
+ options: localVarRequestOptions,
271
+ };
272
+ },
273
+ /**
274
+ * Request to terminate an existing policy by customer.
275
+ * @summary Terminate a policy by customer
276
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
277
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
278
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
279
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ terminateCustomerPolicy: async (policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
284
+ // verify required parameter 'policyCode' is not null or undefined
285
+ assertParamExists('terminateCustomerPolicy', 'policyCode', policyCode)
286
+ // verify required parameter 'customerCode' is not null or undefined
287
+ assertParamExists('terminateCustomerPolicy', 'customerCode', customerCode)
288
+ // verify required parameter 'terminateCustomerPolicyRequestDto' is not null or undefined
289
+ assertParamExists('terminateCustomerPolicy', 'terminateCustomerPolicyRequestDto', terminateCustomerPolicyRequestDto)
290
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}/terminate`
291
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
292
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
293
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
294
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
295
+ let baseOptions;
296
+ let baseAccessToken;
297
+ if (configuration) {
298
+ baseOptions = configuration.baseOptions;
299
+ baseAccessToken = configuration.accessToken;
300
+ }
301
+
302
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
303
+ const localVarHeaderParameter = {} as any;
304
+ const localVarQueryParameter = {} as any;
305
+
306
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
307
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
308
+ }
309
+
310
+
311
+
312
+ localVarHeaderParameter['Content-Type'] = 'application/json';
313
+
314
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
315
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
316
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
317
+ localVarRequestOptions.data = serializeDataIfNeeded(terminateCustomerPolicyRequestDto, localVarRequestOptions, configuration)
318
+
319
+ return {
320
+ url: toPathString(localVarUrlObj),
321
+ options: localVarRequestOptions,
322
+ };
323
+ },
324
+ /**
325
+ * API to upload and attach documents to a policy.
326
+ * @summary Upload policy documents
327
+ * @param {string} customerCode
328
+ * @param {string} policyCode The policy code to identify a policy.
329
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ uploadCustomerPolicyDocuments: async (customerCode: string, policyCode: string, uploadCustomerPolicyDocumentsRequestDto: UploadCustomerPolicyDocumentsRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
334
+ // verify required parameter 'customerCode' is not null or undefined
335
+ assertParamExists('uploadCustomerPolicyDocuments', 'customerCode', customerCode)
336
+ // verify required parameter 'policyCode' is not null or undefined
337
+ assertParamExists('uploadCustomerPolicyDocuments', 'policyCode', policyCode)
338
+ // verify required parameter 'uploadCustomerPolicyDocumentsRequestDto' is not null or undefined
339
+ assertParamExists('uploadCustomerPolicyDocuments', 'uploadCustomerPolicyDocumentsRequestDto', uploadCustomerPolicyDocumentsRequestDto)
340
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}/documents`
341
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)))
342
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
343
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
344
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
345
+ let baseOptions;
346
+ let baseAccessToken;
347
+ if (configuration) {
348
+ baseOptions = configuration.baseOptions;
349
+ baseAccessToken = configuration.accessToken;
350
+ }
351
+
352
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
353
+ const localVarHeaderParameter = {} as any;
354
+ const localVarQueryParameter = {} as any;
355
+
356
+
357
+
358
+ localVarHeaderParameter['Content-Type'] = 'application/json';
359
+
360
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
361
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
362
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
363
+ localVarRequestOptions.data = serializeDataIfNeeded(uploadCustomerPolicyDocumentsRequestDto, localVarRequestOptions, configuration)
364
+
365
+ return {
366
+ url: toPathString(localVarUrlObj),
367
+ options: localVarRequestOptions,
368
+ };
369
+ },
370
+ /**
371
+ * Withdraw policy by customer.
372
+ * @summary Withdraw policy by customer
373
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
374
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
375
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
376
+ * @param {*} [options] Override http request option.
377
+ * @throws {RequiredError}
378
+ */
379
+ withdrawCustomerPolicy: async (policyCode: string, customerCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
380
+ // verify required parameter 'policyCode' is not null or undefined
381
+ assertParamExists('withdrawCustomerPolicy', 'policyCode', policyCode)
382
+ // verify required parameter 'customerCode' is not null or undefined
383
+ assertParamExists('withdrawCustomerPolicy', 'customerCode', customerCode)
384
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}/withdraw`
385
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
386
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
387
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
388
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
389
+ let baseOptions;
390
+ let baseAccessToken;
391
+ if (configuration) {
392
+ baseOptions = configuration.baseOptions;
393
+ baseAccessToken = configuration.accessToken;
394
+ }
395
+
396
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
397
+ const localVarHeaderParameter = {} as any;
398
+ const localVarQueryParameter = {} as any;
399
+
400
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
401
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
402
+ }
403
+
404
+
405
+
406
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
407
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
408
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
409
+
410
+ return {
411
+ url: toPathString(localVarUrlObj),
412
+ options: localVarRequestOptions,
413
+ };
414
+ },
415
+ }
416
+ };
417
+
418
+ /**
419
+ * PoliciesApi - functional programming interface
420
+ * @export
421
+ */
422
+ export const PoliciesApiFp = function(configuration?: Configuration) {
423
+ const localVarAxiosParamCreator = PoliciesApiAxiosParamCreator(configuration)
424
+ return {
425
+ /**
426
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
427
+ * @summary Get current policy version details. Can be filtered by a specific date.
428
+ * @param {string} policyCode The policy code.
429
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
430
+ * @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices.
431
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ */
435
+ async getCustomerPolicyDataByDate(policyCode: string, customerCode: string, timesliceDate?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyResponseClass>> {
436
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerPolicyDataByDate(policyCode, customerCode, timesliceDate, authorization, options);
437
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
438
+ },
439
+ /**
440
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
441
+ * @summary Get policy details
442
+ * @param {string} policyCode The policy code.
443
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
444
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
445
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
446
+ * @param {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ async getPolicy(policyCode: string, customerCode: string, expand?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyResponseClass>> {
450
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicy(policyCode, customerCode, expand, authorization, options);
451
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
452
+ },
453
+ /**
454
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
455
+ * @summary List policies of a customer
456
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
457
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
458
+ * @param {any} [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.
459
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
460
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
461
+ * @param {any} [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.
462
+ * @param {any} [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.
463
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
464
+ * @param {*} [options] Override http request option.
465
+ * @throws {RequiredError}
466
+ */
467
+ async listPolicies(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPoliciesResponseClass>> {
468
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options);
469
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
470
+ },
471
+ /**
472
+ * Request to update an existing policy by customer.
473
+ * @summary Request policy update by customer
474
+ * @param {string} policyCode The code of the policy that the customer wants to update.
475
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
476
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
477
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ async requestPolicyUpdate(policyCode: string, customerCode: string, requestPolicyUpdateRequestDto: RequestPolicyUpdateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestPolicyUpdateResponseClass>> {
482
+ const localVarAxiosArgs = await localVarAxiosParamCreator.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options);
483
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
484
+ },
485
+ /**
486
+ * Request to terminate an existing policy by customer.
487
+ * @summary Terminate a policy by customer
488
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
489
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
490
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
491
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ */
495
+ async terminateCustomerPolicy(policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TerminateCustomerPolicyResponseClass>> {
496
+ const localVarAxiosArgs = await localVarAxiosParamCreator.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options);
497
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
498
+ },
499
+ /**
500
+ * API to upload and attach documents to a policy.
501
+ * @summary Upload policy documents
502
+ * @param {string} customerCode
503
+ * @param {string} policyCode The policy code to identify a policy.
504
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ async uploadCustomerPolicyDocuments(customerCode: string, policyCode: string, uploadCustomerPolicyDocumentsRequestDto: UploadCustomerPolicyDocumentsRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePresignedPostResponseClass>> {
509
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadCustomerPolicyDocuments(customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options);
510
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
511
+ },
512
+ /**
513
+ * Withdraw policy by customer.
514
+ * @summary Withdraw policy by customer
515
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
516
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
517
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ async withdrawCustomerPolicy(policyCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawCustomerPolicyResponseClass>> {
522
+ const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawCustomerPolicy(policyCode, customerCode, authorization, options);
523
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
524
+ },
525
+ }
526
+ };
527
+
528
+ /**
529
+ * PoliciesApi - factory interface
530
+ * @export
531
+ */
532
+ export const PoliciesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
533
+ const localVarFp = PoliciesApiFp(configuration)
534
+ return {
535
+ /**
536
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
537
+ * @summary Get current policy version details. Can be filtered by a specific date.
538
+ * @param {string} policyCode The policy code.
539
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
540
+ * @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices.
541
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
542
+ * @param {*} [options] Override http request option.
543
+ * @throws {RequiredError}
544
+ */
545
+ getCustomerPolicyDataByDate(policyCode: string, customerCode: string, timesliceDate?: string, authorization?: string, options?: any): AxiosPromise<GetPolicyResponseClass> {
546
+ return localVarFp.getCustomerPolicyDataByDate(policyCode, customerCode, timesliceDate, authorization, options).then((request) => request(axios, basePath));
547
+ },
548
+ /**
549
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
550
+ * @summary Get policy details
551
+ * @param {string} policyCode The policy code.
552
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
553
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
554
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
555
+ * @param {*} [options] Override http request option.
556
+ * @throws {RequiredError}
557
+ */
558
+ getPolicy(policyCode: string, customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetPolicyResponseClass> {
559
+ return localVarFp.getPolicy(policyCode, customerCode, expand, authorization, options).then((request) => request(axios, basePath));
560
+ },
561
+ /**
562
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
563
+ * @summary List policies of a customer
564
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
565
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
566
+ * @param {any} [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.
567
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
568
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
569
+ * @param {any} [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.
570
+ * @param {any} [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.
571
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ */
575
+ listPolicies(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<ListPoliciesResponseClass> {
576
+ return localVarFp.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then((request) => request(axios, basePath));
577
+ },
578
+ /**
579
+ * Request to update an existing policy by customer.
580
+ * @summary Request policy update by customer
581
+ * @param {string} policyCode The code of the policy that the customer wants to update.
582
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
583
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
584
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
585
+ * @param {*} [options] Override http request option.
586
+ * @throws {RequiredError}
587
+ */
588
+ requestPolicyUpdate(policyCode: string, customerCode: string, requestPolicyUpdateRequestDto: RequestPolicyUpdateRequestDto, authorization?: string, options?: any): AxiosPromise<RequestPolicyUpdateResponseClass> {
589
+ return localVarFp.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options).then((request) => request(axios, basePath));
590
+ },
591
+ /**
592
+ * Request to terminate an existing policy by customer.
593
+ * @summary Terminate a policy by customer
594
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
595
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
596
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
597
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ */
601
+ terminateCustomerPolicy(policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<TerminateCustomerPolicyResponseClass> {
602
+ return localVarFp.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
603
+ },
604
+ /**
605
+ * API to upload and attach documents to a policy.
606
+ * @summary Upload policy documents
607
+ * @param {string} customerCode
608
+ * @param {string} policyCode The policy code to identify a policy.
609
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
610
+ * @param {*} [options] Override http request option.
611
+ * @throws {RequiredError}
612
+ */
613
+ uploadCustomerPolicyDocuments(customerCode: string, policyCode: string, uploadCustomerPolicyDocumentsRequestDto: UploadCustomerPolicyDocumentsRequestDto, options?: any): AxiosPromise<CreatePresignedPostResponseClass> {
614
+ return localVarFp.uploadCustomerPolicyDocuments(customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options).then((request) => request(axios, basePath));
615
+ },
616
+ /**
617
+ * Withdraw policy by customer.
618
+ * @summary Withdraw policy by customer
619
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
620
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
621
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ */
625
+ withdrawCustomerPolicy(policyCode: string, customerCode: string, authorization?: string, options?: any): AxiosPromise<WithdrawCustomerPolicyResponseClass> {
626
+ return localVarFp.withdrawCustomerPolicy(policyCode, customerCode, authorization, options).then((request) => request(axios, basePath));
627
+ },
628
+ };
629
+ };
630
+
631
+ /**
632
+ * Request parameters for getCustomerPolicyDataByDate operation in PoliciesApi.
633
+ * @export
634
+ * @interface PoliciesApiGetCustomerPolicyDataByDateRequest
635
+ */
636
+ export interface PoliciesApiGetCustomerPolicyDataByDateRequest {
637
+ /**
638
+ * The policy code.
639
+ * @type {string}
640
+ * @memberof PoliciesApiGetCustomerPolicyDataByDate
641
+ */
642
+ readonly policyCode: string
643
+
644
+ /**
645
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
646
+ * @type {string}
647
+ * @memberof PoliciesApiGetCustomerPolicyDataByDate
648
+ */
649
+ readonly customerCode: string
650
+
651
+ /**
652
+ * This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices.
653
+ * @type {string}
654
+ * @memberof PoliciesApiGetCustomerPolicyDataByDate
655
+ */
656
+ readonly timesliceDate?: string
657
+
658
+ /**
659
+ * Bearer Token: provided by the login endpoint under the name accessToken.
660
+ * @type {string}
661
+ * @memberof PoliciesApiGetCustomerPolicyDataByDate
662
+ */
663
+ readonly authorization?: string
664
+ }
665
+
666
+ /**
667
+ * Request parameters for getPolicy operation in PoliciesApi.
668
+ * @export
669
+ * @interface PoliciesApiGetPolicyRequest
670
+ */
671
+ export interface PoliciesApiGetPolicyRequest {
672
+ /**
673
+ * The policy code.
674
+ * @type {string}
675
+ * @memberof PoliciesApiGetPolicy
676
+ */
677
+ readonly policyCode: string
678
+
679
+ /**
680
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
681
+ * @type {string}
682
+ * @memberof PoliciesApiGetPolicy
683
+ */
684
+ readonly customerCode: string
685
+
686
+ /**
687
+ * Fields to expand response by - [versions, premiumItems]
688
+ * @type {string}
689
+ * @memberof PoliciesApiGetPolicy
690
+ */
691
+ readonly expand?: string
692
+
693
+ /**
694
+ * Bearer Token: provided by the login endpoint under the name accessToken.
695
+ * @type {string}
696
+ * @memberof PoliciesApiGetPolicy
697
+ */
698
+ readonly authorization?: string
699
+ }
700
+
701
+ /**
702
+ * Request parameters for listPolicies operation in PoliciesApi.
703
+ * @export
704
+ * @interface PoliciesApiListPoliciesRequest
705
+ */
706
+ export interface PoliciesApiListPoliciesRequest {
707
+ /**
708
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
709
+ * @type {string}
710
+ * @memberof PoliciesApiListPolicies
711
+ */
712
+ readonly customerCode: string
713
+
714
+ /**
715
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
716
+ * @type {any}
717
+ * @memberof PoliciesApiListPolicies
718
+ */
719
+ readonly pageSize?: any
720
+
721
+ /**
722
+ * 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.
723
+ * @type {any}
724
+ * @memberof PoliciesApiListPolicies
725
+ */
726
+ readonly pageToken?: any
727
+
728
+ /**
729
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
730
+ * @type {any}
731
+ * @memberof PoliciesApiListPolicies
732
+ */
733
+ readonly filter?: any
734
+
735
+ /**
736
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
737
+ * @type {any}
738
+ * @memberof PoliciesApiListPolicies
739
+ */
740
+ readonly search?: any
741
+
742
+ /**
743
+ * 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.
744
+ * @type {any}
745
+ * @memberof PoliciesApiListPolicies
746
+ */
747
+ readonly order?: any
748
+
749
+ /**
750
+ * 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.
751
+ * @type {any}
752
+ * @memberof PoliciesApiListPolicies
753
+ */
754
+ readonly expand?: any
755
+
756
+ /**
757
+ * Bearer Token: provided by the login endpoint under the name accessToken.
758
+ * @type {string}
759
+ * @memberof PoliciesApiListPolicies
760
+ */
761
+ readonly authorization?: string
762
+ }
763
+
764
+ /**
765
+ * Request parameters for requestPolicyUpdate operation in PoliciesApi.
766
+ * @export
767
+ * @interface PoliciesApiRequestPolicyUpdateRequest
768
+ */
769
+ export interface PoliciesApiRequestPolicyUpdateRequest {
770
+ /**
771
+ * The code of the policy that the customer wants to update.
772
+ * @type {string}
773
+ * @memberof PoliciesApiRequestPolicyUpdate
774
+ */
775
+ readonly policyCode: string
776
+
777
+ /**
778
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
779
+ * @type {string}
780
+ * @memberof PoliciesApiRequestPolicyUpdate
781
+ */
782
+ readonly customerCode: string
783
+
784
+ /**
785
+ *
786
+ * @type {RequestPolicyUpdateRequestDto}
787
+ * @memberof PoliciesApiRequestPolicyUpdate
788
+ */
789
+ readonly requestPolicyUpdateRequestDto: RequestPolicyUpdateRequestDto
790
+
791
+ /**
792
+ * Bearer Token: provided by the login endpoint under the name accessToken.
793
+ * @type {string}
794
+ * @memberof PoliciesApiRequestPolicyUpdate
795
+ */
796
+ readonly authorization?: string
797
+ }
798
+
799
+ /**
800
+ * Request parameters for terminateCustomerPolicy operation in PoliciesApi.
801
+ * @export
802
+ * @interface PoliciesApiTerminateCustomerPolicyRequest
803
+ */
804
+ export interface PoliciesApiTerminateCustomerPolicyRequest {
805
+ /**
806
+ * The code of the policy that the customer wants to terminate.
807
+ * @type {string}
808
+ * @memberof PoliciesApiTerminateCustomerPolicy
809
+ */
810
+ readonly policyCode: string
811
+
812
+ /**
813
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
814
+ * @type {string}
815
+ * @memberof PoliciesApiTerminateCustomerPolicy
816
+ */
817
+ readonly customerCode: string
818
+
819
+ /**
820
+ *
821
+ * @type {TerminateCustomerPolicyRequestDto}
822
+ * @memberof PoliciesApiTerminateCustomerPolicy
823
+ */
824
+ readonly terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto
825
+
826
+ /**
827
+ * Bearer Token: provided by the login endpoint under the name accessToken.
828
+ * @type {string}
829
+ * @memberof PoliciesApiTerminateCustomerPolicy
830
+ */
831
+ readonly authorization?: string
832
+ }
833
+
834
+ /**
835
+ * Request parameters for uploadCustomerPolicyDocuments operation in PoliciesApi.
836
+ * @export
837
+ * @interface PoliciesApiUploadCustomerPolicyDocumentsRequest
838
+ */
839
+ export interface PoliciesApiUploadCustomerPolicyDocumentsRequest {
840
+ /**
841
+ *
842
+ * @type {string}
843
+ * @memberof PoliciesApiUploadCustomerPolicyDocuments
844
+ */
845
+ readonly customerCode: string
846
+
847
+ /**
848
+ * The policy code to identify a policy.
849
+ * @type {string}
850
+ * @memberof PoliciesApiUploadCustomerPolicyDocuments
851
+ */
852
+ readonly policyCode: string
853
+
854
+ /**
855
+ *
856
+ * @type {UploadCustomerPolicyDocumentsRequestDto}
857
+ * @memberof PoliciesApiUploadCustomerPolicyDocuments
858
+ */
859
+ readonly uploadCustomerPolicyDocumentsRequestDto: UploadCustomerPolicyDocumentsRequestDto
860
+ }
861
+
862
+ /**
863
+ * Request parameters for withdrawCustomerPolicy operation in PoliciesApi.
864
+ * @export
865
+ * @interface PoliciesApiWithdrawCustomerPolicyRequest
866
+ */
867
+ export interface PoliciesApiWithdrawCustomerPolicyRequest {
868
+ /**
869
+ * The code of the policy that the customer wants to withdraw.
870
+ * @type {string}
871
+ * @memberof PoliciesApiWithdrawCustomerPolicy
872
+ */
873
+ readonly policyCode: string
874
+
875
+ /**
876
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
877
+ * @type {string}
878
+ * @memberof PoliciesApiWithdrawCustomerPolicy
879
+ */
880
+ readonly customerCode: string
881
+
882
+ /**
883
+ * Bearer Token: provided by the login endpoint under the name accessToken.
884
+ * @type {string}
885
+ * @memberof PoliciesApiWithdrawCustomerPolicy
886
+ */
887
+ readonly authorization?: string
888
+ }
889
+
890
+ /**
891
+ * PoliciesApi - object-oriented interface
892
+ * @export
893
+ * @class PoliciesApi
894
+ * @extends {BaseAPI}
895
+ */
896
+ export class PoliciesApi extends BaseAPI {
897
+ /**
898
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
899
+ * @summary Get current policy version details. Can be filtered by a specific date.
900
+ * @param {PoliciesApiGetCustomerPolicyDataByDateRequest} requestParameters Request parameters.
901
+ * @param {*} [options] Override http request option.
902
+ * @throws {RequiredError}
903
+ * @memberof PoliciesApi
904
+ */
905
+ public getCustomerPolicyDataByDate(requestParameters: PoliciesApiGetCustomerPolicyDataByDateRequest, options?: AxiosRequestConfig) {
906
+ return PoliciesApiFp(this.configuration).getCustomerPolicyDataByDate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.timesliceDate, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
907
+ }
908
+
909
+ /**
910
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
911
+ * @summary Get policy details
912
+ * @param {PoliciesApiGetPolicyRequest} requestParameters Request parameters.
913
+ * @param {*} [options] Override http request option.
914
+ * @throws {RequiredError}
915
+ * @memberof PoliciesApi
916
+ */
917
+ public getPolicy(requestParameters: PoliciesApiGetPolicyRequest, options?: AxiosRequestConfig) {
918
+ return PoliciesApiFp(this.configuration).getPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
919
+ }
920
+
921
+ /**
922
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
923
+ * @summary List policies of a customer
924
+ * @param {PoliciesApiListPoliciesRequest} requestParameters Request parameters.
925
+ * @param {*} [options] Override http request option.
926
+ * @throws {RequiredError}
927
+ * @memberof PoliciesApi
928
+ */
929
+ public listPolicies(requestParameters: PoliciesApiListPoliciesRequest, options?: AxiosRequestConfig) {
930
+ return PoliciesApiFp(this.configuration).listPolicies(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
931
+ }
932
+
933
+ /**
934
+ * Request to update an existing policy by customer.
935
+ * @summary Request policy update by customer
936
+ * @param {PoliciesApiRequestPolicyUpdateRequest} requestParameters Request parameters.
937
+ * @param {*} [options] Override http request option.
938
+ * @throws {RequiredError}
939
+ * @memberof PoliciesApi
940
+ */
941
+ public requestPolicyUpdate(requestParameters: PoliciesApiRequestPolicyUpdateRequest, options?: AxiosRequestConfig) {
942
+ return PoliciesApiFp(this.configuration).requestPolicyUpdate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.requestPolicyUpdateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
943
+ }
944
+
945
+ /**
946
+ * Request to terminate an existing policy by customer.
947
+ * @summary Terminate a policy by customer
948
+ * @param {PoliciesApiTerminateCustomerPolicyRequest} requestParameters Request parameters.
949
+ * @param {*} [options] Override http request option.
950
+ * @throws {RequiredError}
951
+ * @memberof PoliciesApi
952
+ */
953
+ public terminateCustomerPolicy(requestParameters: PoliciesApiTerminateCustomerPolicyRequest, options?: AxiosRequestConfig) {
954
+ return PoliciesApiFp(this.configuration).terminateCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.terminateCustomerPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
955
+ }
956
+
957
+ /**
958
+ * API to upload and attach documents to a policy.
959
+ * @summary Upload policy documents
960
+ * @param {PoliciesApiUploadCustomerPolicyDocumentsRequest} requestParameters Request parameters.
961
+ * @param {*} [options] Override http request option.
962
+ * @throws {RequiredError}
963
+ * @memberof PoliciesApi
964
+ */
965
+ public uploadCustomerPolicyDocuments(requestParameters: PoliciesApiUploadCustomerPolicyDocumentsRequest, options?: AxiosRequestConfig) {
966
+ return PoliciesApiFp(this.configuration).uploadCustomerPolicyDocuments(requestParameters.customerCode, requestParameters.policyCode, requestParameters.uploadCustomerPolicyDocumentsRequestDto, options).then((request) => request(this.axios, this.basePath));
967
+ }
968
+
969
+ /**
970
+ * Withdraw policy by customer.
971
+ * @summary Withdraw policy by customer
972
+ * @param {PoliciesApiWithdrawCustomerPolicyRequest} requestParameters Request parameters.
973
+ * @param {*} [options] Override http request option.
974
+ * @throws {RequiredError}
975
+ * @memberof PoliciesApi
976
+ */
977
+ public withdrawCustomerPolicy(requestParameters: PoliciesApiWithdrawCustomerPolicyRequest, options?: AxiosRequestConfig) {
978
+ return PoliciesApiFp(this.configuration).withdrawCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
979
+ }
980
+ }