@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
@@ -6,7 +6,7 @@
6
6
  * The EMIL CustomerService API description
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
- *
9
+ * Contact: kontakt@emil.de
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
56
- while (_) try {
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
57
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
58
  if (y = 0, t) op = [op[0] & 2, t.value];
59
59
  switch (op[0]) {
@@ -96,6 +96,49 @@ var FormData = require('form-data');
96
96
  var CustomersApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
+ /**
100
+ * Request to complete a payment change by customer.
101
+ * @summary Request payment setup complete by customer
102
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
103
+ * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
104
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
109
+ if (options === void 0) { options = {}; }
110
+ return __awaiter(_this, void 0, void 0, function () {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
+ return __generator(this, function (_a) {
113
+ // verify required parameter 'customerCode' is not null or undefined
114
+ (0, common_1.assertParamExists)('completePaymentSetup', 'customerCode', customerCode);
115
+ // verify required parameter 'completePaymentSetupPspRequest' is not null or undefined
116
+ (0, common_1.assertParamExists)('completePaymentSetup', 'completePaymentSetupPspRequest', completePaymentSetupPspRequest);
117
+ localVarPath = "/v1/customers/{customerCode}/payment_setup/complete"
118
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
119
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
120
+ if (configuration) {
121
+ baseOptions = configuration.baseOptions;
122
+ baseAccessToken = configuration.accessToken;
123
+ }
124
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
125
+ localVarHeaderParameter = {};
126
+ localVarQueryParameter = {};
127
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
128
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
129
+ }
130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
131
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(completePaymentSetupPspRequest, localVarRequestOptions, configuration);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ });
140
+ });
141
+ },
99
142
  /**
100
143
  * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
101
144
  * @summary Register a customer after invite
@@ -167,9 +210,9 @@ var CustomersApiAxiosParamCreator = function (configuration) {
167
210
  });
168
211
  },
169
212
  /**
170
- * Get customer details
213
+ * Get customer details.
171
214
  * @summary Get customer details
172
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
215
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
173
216
  * @param {string} [expand] Fields to expand response by - [account]
174
217
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
175
218
  * @param {*} [options] Override http request option.
@@ -209,10 +252,10 @@ var CustomersApiAxiosParamCreator = function (configuration) {
209
252
  });
210
253
  },
211
254
  /**
212
- * Get a presigned download url for document
255
+ * Get a presigned download url for document.
213
256
  * @summary Get a presigned download url for document
214
- * @param {string} documentCode The document code
215
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
257
+ * @param {string} documentCode The document code.
258
+ * @param {string} customerCode
216
259
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
217
260
  * @param {*} [options] Override http request option.
218
261
  * @throws {RequiredError}
@@ -251,44 +294,33 @@ var CustomersApiAxiosParamCreator = function (configuration) {
251
294
  });
252
295
  },
253
296
  /**
254
- * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
255
- * @summary Get policy details
256
- * @param {string} policyCode The policy code
257
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
258
- * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
259
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
297
+ * Start auth process to get new access token, refresh token after successful login.
298
+ * @summary Initiate auth by customer
299
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
260
300
  * @param {*} [options] Override http request option.
261
301
  * @throws {RequiredError}
262
302
  */
263
- getPolicy: function (policyCode, customerCode, expand, authorization, options) {
303
+ initiateAuth: function (initiateAuthRequestDto, options) {
264
304
  if (options === void 0) { options = {}; }
265
305
  return __awaiter(_this, void 0, void 0, function () {
266
306
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
267
307
  return __generator(this, function (_a) {
268
- // verify required parameter 'policyCode' is not null or undefined
269
- (0, common_1.assertParamExists)('getPolicy', 'policyCode', policyCode);
270
- // verify required parameter 'customerCode' is not null or undefined
271
- (0, common_1.assertParamExists)('getPolicy', 'customerCode', customerCode);
272
- localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}"
273
- .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
274
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
308
+ // verify required parameter 'initiateAuthRequestDto' is not null or undefined
309
+ (0, common_1.assertParamExists)('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto);
310
+ localVarPath = "/v1/customers/auth/initiate";
275
311
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
276
312
  if (configuration) {
277
313
  baseOptions = configuration.baseOptions;
278
314
  baseAccessToken = configuration.accessToken;
279
315
  }
280
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
316
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
281
317
  localVarHeaderParameter = {};
282
318
  localVarQueryParameter = {};
283
- if (expand !== undefined) {
284
- localVarQueryParameter['expand'] = expand;
285
- }
286
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
287
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
288
- }
319
+ localVarHeaderParameter['Content-Type'] = 'application/json';
289
320
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
290
321
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
291
322
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
323
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateAuthRequestDto, localVarRequestOptions, configuration);
292
324
  return [2 /*return*/, {
293
325
  url: (0, common_1.toPathString)(localVarUrlObj),
294
326
  options: localVarRequestOptions,
@@ -297,20 +329,22 @@ var CustomersApiAxiosParamCreator = function (configuration) {
297
329
  });
298
330
  },
299
331
  /**
300
- * Start auth process to get new access token, refresh token after successful login.
301
- * @summary Initiate auth by customer
302
- * @param {InitiateAuthRequestDto} initiateAuthRequestDto
332
+ * Request to initiate a payment change by customer.
333
+ * @summary Request payment setup initiation by customer
334
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
335
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
303
336
  * @param {*} [options] Override http request option.
304
337
  * @throws {RequiredError}
305
338
  */
306
- initiateAuth: function (initiateAuthRequestDto, options) {
339
+ initiatePaymentSetup: function (customerCode, authorization, options) {
307
340
  if (options === void 0) { options = {}; }
308
341
  return __awaiter(_this, void 0, void 0, function () {
309
342
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
310
343
  return __generator(this, function (_a) {
311
- // verify required parameter 'initiateAuthRequestDto' is not null or undefined
312
- (0, common_1.assertParamExists)('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto);
313
- localVarPath = "/v1/customers/auth/initiate";
344
+ // verify required parameter 'customerCode' is not null or undefined
345
+ (0, common_1.assertParamExists)('initiatePaymentSetup', 'customerCode', customerCode);
346
+ localVarPath = "/v1/customers/{customerCode}/payment_setup/initiate"
347
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
314
348
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
315
349
  if (configuration) {
316
350
  baseOptions = configuration.baseOptions;
@@ -319,11 +353,12 @@ var CustomersApiAxiosParamCreator = function (configuration) {
319
353
  localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
320
354
  localVarHeaderParameter = {};
321
355
  localVarQueryParameter = {};
322
- localVarHeaderParameter['Content-Type'] = 'application/json';
356
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
357
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
358
+ }
323
359
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
324
360
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
325
361
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
326
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateAuthRequestDto, localVarRequestOptions, configuration);
327
362
  return [2 /*return*/, {
328
363
  url: (0, common_1.toPathString)(localVarUrlObj),
329
364
  options: localVarRequestOptions,
@@ -335,7 +370,7 @@ var CustomersApiAxiosParamCreator = function (configuration) {
335
370
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
336
371
  * @summary Invite a customer by self
337
372
  * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
338
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
373
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
339
374
  * @param {*} [options] Override http request option.
340
375
  * @throws {RequiredError}
341
376
  */
@@ -374,7 +409,7 @@ var CustomersApiAxiosParamCreator = function (configuration) {
374
409
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
375
410
  * @summary Invite a customer by tenant
376
411
  * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
377
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
412
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
378
413
  * @param {*} [options] Override http request option.
379
414
  * @throws {RequiredError}
380
415
  */
@@ -410,9 +445,9 @@ var CustomersApiAxiosParamCreator = function (configuration) {
410
445
  });
411
446
  },
412
447
  /**
413
- * List all the documents of a customer
448
+ * List all the documents of a customer.
414
449
  * @summary List documents of a customer
415
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
450
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
416
451
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
417
452
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
418
453
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -472,9 +507,9 @@ var CustomersApiAxiosParamCreator = function (configuration) {
472
507
  });
473
508
  },
474
509
  /**
475
- * List all the invoices of a customer
510
+ * List all the invoices of a customer.
476
511
  * @summary List invoices of a customer
477
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
512
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
478
513
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
479
514
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
480
515
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -533,68 +568,6 @@ var CustomersApiAxiosParamCreator = function (configuration) {
533
568
  });
534
569
  });
535
570
  },
536
- /**
537
- * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
538
- * @summary List policies of a customer
539
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
540
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
541
- * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
542
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
543
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
544
- * @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.
545
- * @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.
546
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
547
- * @param {*} [options] Override http request option.
548
- * @throws {RequiredError}
549
- */
550
- listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
551
- if (options === void 0) { options = {}; }
552
- return __awaiter(_this, void 0, void 0, function () {
553
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
554
- return __generator(this, function (_a) {
555
- // verify required parameter 'customerCode' is not null or undefined
556
- (0, common_1.assertParamExists)('listPolicies', 'customerCode', customerCode);
557
- localVarPath = "/v1/customers/{customerCode}/policies"
558
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
559
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
560
- if (configuration) {
561
- baseOptions = configuration.baseOptions;
562
- baseAccessToken = configuration.accessToken;
563
- }
564
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
565
- localVarHeaderParameter = {};
566
- localVarQueryParameter = {};
567
- if (pageSize !== undefined) {
568
- localVarQueryParameter['pageSize'] = pageSize;
569
- }
570
- if (pageToken !== undefined) {
571
- localVarQueryParameter['pageToken'] = pageToken;
572
- }
573
- if (filter !== undefined) {
574
- localVarQueryParameter['filter'] = filter;
575
- }
576
- if (search !== undefined) {
577
- localVarQueryParameter['search'] = search;
578
- }
579
- if (order !== undefined) {
580
- localVarQueryParameter['order'] = order;
581
- }
582
- if (expand !== undefined) {
583
- localVarQueryParameter['expand'] = expand;
584
- }
585
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
586
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
587
- }
588
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
589
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
590
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
591
- return [2 /*return*/, {
592
- url: (0, common_1.toPathString)(localVarUrlObj),
593
- options: localVarRequestOptions,
594
- }];
595
- });
596
- });
597
- },
598
571
  /**
599
572
  * Get new access token, new refresh token.
600
573
  * @summary Refresh token by customer
@@ -634,53 +607,6 @@ var CustomersApiAxiosParamCreator = function (configuration) {
634
607
  });
635
608
  });
636
609
  },
637
- /**
638
- * Request to update an existing policy by customer
639
- * @summary Request policy update by customer
640
- * @param {string} policyCode The policy code
641
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
642
- * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
643
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
644
- * @param {*} [options] Override http request option.
645
- * @throws {RequiredError}
646
- */
647
- requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
648
- if (options === void 0) { options = {}; }
649
- return __awaiter(_this, void 0, void 0, function () {
650
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
651
- return __generator(this, function (_a) {
652
- // verify required parameter 'policyCode' is not null or undefined
653
- (0, common_1.assertParamExists)('requestPolicyUpdate', 'policyCode', policyCode);
654
- // verify required parameter 'customerCode' is not null or undefined
655
- (0, common_1.assertParamExists)('requestPolicyUpdate', 'customerCode', customerCode);
656
- // verify required parameter 'requestPolicyUpdateRequestDto' is not null or undefined
657
- (0, common_1.assertParamExists)('requestPolicyUpdate', 'requestPolicyUpdateRequestDto', requestPolicyUpdateRequestDto);
658
- localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/request-update"
659
- .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
660
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
661
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
662
- if (configuration) {
663
- baseOptions = configuration.baseOptions;
664
- baseAccessToken = configuration.accessToken;
665
- }
666
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
667
- localVarHeaderParameter = {};
668
- localVarQueryParameter = {};
669
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
670
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
671
- }
672
- localVarHeaderParameter['Content-Type'] = 'application/json';
673
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
674
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
675
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
676
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestPolicyUpdateRequestDto, localVarRequestOptions, configuration);
677
- return [2 /*return*/, {
678
- url: (0, common_1.toPathString)(localVarUrlObj),
679
- options: localVarRequestOptions,
680
- }];
681
- });
682
- });
683
- },
684
610
  /**
685
611
  * Change customer\'s password using the token provided by the reset password endpoint.
686
612
  * @summary Change password by customer
@@ -752,35 +678,31 @@ var CustomersApiAxiosParamCreator = function (configuration) {
752
678
  });
753
679
  },
754
680
  /**
755
- * Request to terminate an existing policy by customer
756
- * @summary Terminate a policy by customer
757
- * @param {string} policyCode The policy code
758
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
759
- * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
681
+ * Update customer details like phone, email, names, addresses etc.
682
+ * @summary Update customer details
683
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
684
+ * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
760
685
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
761
686
  * @param {*} [options] Override http request option.
762
687
  * @throws {RequiredError}
763
688
  */
764
- terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
689
+ updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
765
690
  if (options === void 0) { options = {}; }
766
691
  return __awaiter(_this, void 0, void 0, function () {
767
692
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
768
693
  return __generator(this, function (_a) {
769
- // verify required parameter 'policyCode' is not null or undefined
770
- (0, common_1.assertParamExists)('terminateCustomerPolicy', 'policyCode', policyCode);
771
694
  // verify required parameter 'customerCode' is not null or undefined
772
- (0, common_1.assertParamExists)('terminateCustomerPolicy', 'customerCode', customerCode);
773
- // verify required parameter 'terminateCustomerPolicyRequestDto' is not null or undefined
774
- (0, common_1.assertParamExists)('terminateCustomerPolicy', 'terminateCustomerPolicyRequestDto', terminateCustomerPolicyRequestDto);
775
- localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/terminate"
776
- .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
695
+ (0, common_1.assertParamExists)('updateCustomer', 'customerCode', customerCode);
696
+ // verify required parameter 'updateCustomerRequestDto' is not null or undefined
697
+ (0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto);
698
+ localVarPath = "/v1/customers/{customerCode}"
777
699
  .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
778
700
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
779
701
  if (configuration) {
780
702
  baseOptions = configuration.baseOptions;
781
703
  baseAccessToken = configuration.accessToken;
782
704
  }
783
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
705
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
784
706
  localVarHeaderParameter = {};
785
707
  localVarQueryParameter = {};
786
708
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
@@ -790,7 +712,7 @@ var CustomersApiAxiosParamCreator = function (configuration) {
790
712
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
791
713
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
792
714
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
793
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(terminateCustomerPolicyRequestDto, localVarRequestOptions, configuration);
715
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestDto, localVarRequestOptions, configuration);
794
716
  return [2 /*return*/, {
795
717
  url: (0, common_1.toPathString)(localVarUrlObj),
796
718
  options: localVarRequestOptions,
@@ -799,41 +721,32 @@ var CustomersApiAxiosParamCreator = function (configuration) {
799
721
  });
800
722
  },
801
723
  /**
802
- * Update customer details like phone, email, names, addresses etc
803
- * @summary Update customer details
804
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
805
- * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
806
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
724
+ * API to upload and attach documents to an account.
725
+ * @summary Upload account documents
726
+ * @param {string} customerCode
807
727
  * @param {*} [options] Override http request option.
808
728
  * @throws {RequiredError}
809
729
  */
810
- updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
730
+ uploadAccountDocuments: function (customerCode, options) {
811
731
  if (options === void 0) { options = {}; }
812
732
  return __awaiter(_this, void 0, void 0, function () {
813
733
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
814
734
  return __generator(this, function (_a) {
815
735
  // verify required parameter 'customerCode' is not null or undefined
816
- (0, common_1.assertParamExists)('updateCustomer', 'customerCode', customerCode);
817
- // verify required parameter 'updateCustomerRequestDto' is not null or undefined
818
- (0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto);
819
- localVarPath = "/v1/customers/{customerCode}"
736
+ (0, common_1.assertParamExists)('uploadAccountDocuments', 'customerCode', customerCode);
737
+ localVarPath = "/v1/customers/{customerCode}/documents"
820
738
  .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
821
739
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
822
740
  if (configuration) {
823
741
  baseOptions = configuration.baseOptions;
824
742
  baseAccessToken = configuration.accessToken;
825
743
  }
826
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
744
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
827
745
  localVarHeaderParameter = {};
828
746
  localVarQueryParameter = {};
829
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
830
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
831
- }
832
- localVarHeaderParameter['Content-Type'] = 'application/json';
833
747
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
834
748
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
835
749
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
836
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestDto, localVarRequestOptions, configuration);
837
750
  return [2 /*return*/, {
838
751
  url: (0, common_1.toPathString)(localVarUrlObj),
839
752
  options: localVarRequestOptions,
@@ -913,48 +826,6 @@ var CustomersApiAxiosParamCreator = function (configuration) {
913
826
  });
914
827
  });
915
828
  },
916
- /**
917
- * Withdraw policy by customer
918
- * @summary Withdraw policy by customer
919
- * @param {string} policyCode The policy code
920
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
921
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
922
- * @param {*} [options] Override http request option.
923
- * @throws {RequiredError}
924
- */
925
- withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
926
- if (options === void 0) { options = {}; }
927
- return __awaiter(_this, void 0, void 0, function () {
928
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
929
- return __generator(this, function (_a) {
930
- // verify required parameter 'policyCode' is not null or undefined
931
- (0, common_1.assertParamExists)('withdrawCustomerPolicy', 'policyCode', policyCode);
932
- // verify required parameter 'customerCode' is not null or undefined
933
- (0, common_1.assertParamExists)('withdrawCustomerPolicy', 'customerCode', customerCode);
934
- localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/withdraw"
935
- .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
936
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
937
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
938
- if (configuration) {
939
- baseOptions = configuration.baseOptions;
940
- baseAccessToken = configuration.accessToken;
941
- }
942
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
943
- localVarHeaderParameter = {};
944
- localVarQueryParameter = {};
945
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
946
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
947
- }
948
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
949
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
950
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
951
- return [2 /*return*/, {
952
- url: (0, common_1.toPathString)(localVarUrlObj),
953
- options: localVarRequestOptions,
954
- }];
955
- });
956
- });
957
- },
958
829
  };
959
830
  };
960
831
  exports.CustomersApiAxiosParamCreator = CustomersApiAxiosParamCreator;
@@ -965,6 +836,28 @@ exports.CustomersApiAxiosParamCreator = CustomersApiAxiosParamCreator;
965
836
  var CustomersApiFp = function (configuration) {
966
837
  var localVarAxiosParamCreator = (0, exports.CustomersApiAxiosParamCreator)(configuration);
967
838
  return {
839
+ /**
840
+ * Request to complete a payment change by customer.
841
+ * @summary Request payment setup complete by customer
842
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
843
+ * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
844
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
845
+ * @param {*} [options] Override http request option.
846
+ * @throws {RequiredError}
847
+ */
848
+ completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
849
+ return __awaiter(this, void 0, void 0, function () {
850
+ var localVarAxiosArgs;
851
+ return __generator(this, function (_a) {
852
+ switch (_a.label) {
853
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options)];
854
+ case 1:
855
+ localVarAxiosArgs = _a.sent();
856
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
857
+ }
858
+ });
859
+ });
860
+ },
968
861
  /**
969
862
  * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
970
863
  * @summary Register a customer after invite
@@ -1006,9 +899,9 @@ var CustomersApiFp = function (configuration) {
1006
899
  });
1007
900
  },
1008
901
  /**
1009
- * Get customer details
902
+ * Get customer details.
1010
903
  * @summary Get customer details
1011
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
904
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1012
905
  * @param {string} [expand] Fields to expand response by - [account]
1013
906
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1014
907
  * @param {*} [options] Override http request option.
@@ -1028,10 +921,10 @@ var CustomersApiFp = function (configuration) {
1028
921
  });
1029
922
  },
1030
923
  /**
1031
- * Get a presigned download url for document
924
+ * Get a presigned download url for document.
1032
925
  * @summary Get a presigned download url for document
1033
- * @param {string} documentCode The document code
1034
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
926
+ * @param {string} documentCode The document code.
927
+ * @param {string} customerCode
1035
928
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1036
929
  * @param {*} [options] Override http request option.
1037
930
  * @throws {RequiredError}
@@ -1050,21 +943,18 @@ var CustomersApiFp = function (configuration) {
1050
943
  });
1051
944
  },
1052
945
  /**
1053
- * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
1054
- * @summary Get policy details
1055
- * @param {string} policyCode The policy code
1056
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1057
- * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
1058
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
946
+ * Start auth process to get new access token, refresh token after successful login.
947
+ * @summary Initiate auth by customer
948
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
1059
949
  * @param {*} [options] Override http request option.
1060
950
  * @throws {RequiredError}
1061
951
  */
1062
- getPolicy: function (policyCode, customerCode, expand, authorization, options) {
952
+ initiateAuth: function (initiateAuthRequestDto, options) {
1063
953
  return __awaiter(this, void 0, void 0, function () {
1064
954
  var localVarAxiosArgs;
1065
955
  return __generator(this, function (_a) {
1066
956
  switch (_a.label) {
1067
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPolicy(policyCode, customerCode, expand, authorization, options)];
957
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options)];
1068
958
  case 1:
1069
959
  localVarAxiosArgs = _a.sent();
1070
960
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -1073,18 +963,19 @@ var CustomersApiFp = function (configuration) {
1073
963
  });
1074
964
  },
1075
965
  /**
1076
- * Start auth process to get new access token, refresh token after successful login.
1077
- * @summary Initiate auth by customer
1078
- * @param {InitiateAuthRequestDto} initiateAuthRequestDto
966
+ * Request to initiate a payment change by customer.
967
+ * @summary Request payment setup initiation by customer
968
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
969
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1079
970
  * @param {*} [options] Override http request option.
1080
971
  * @throws {RequiredError}
1081
972
  */
1082
- initiateAuth: function (initiateAuthRequestDto, options) {
973
+ initiatePaymentSetup: function (customerCode, authorization, options) {
1083
974
  return __awaiter(this, void 0, void 0, function () {
1084
975
  var localVarAxiosArgs;
1085
976
  return __generator(this, function (_a) {
1086
977
  switch (_a.label) {
1087
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options)];
978
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiatePaymentSetup(customerCode, authorization, options)];
1088
979
  case 1:
1089
980
  localVarAxiosArgs = _a.sent();
1090
981
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -1096,7 +987,7 @@ var CustomersApiFp = function (configuration) {
1096
987
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1097
988
  * @summary Invite a customer by self
1098
989
  * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1099
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
990
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
1100
991
  * @param {*} [options] Override http request option.
1101
992
  * @throws {RequiredError}
1102
993
  */
@@ -1117,7 +1008,7 @@ var CustomersApiFp = function (configuration) {
1117
1008
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1118
1009
  * @summary Invite a customer by tenant
1119
1010
  * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1120
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
1011
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
1121
1012
  * @param {*} [options] Override http request option.
1122
1013
  * @throws {RequiredError}
1123
1014
  */
@@ -1135,9 +1026,9 @@ var CustomersApiFp = function (configuration) {
1135
1026
  });
1136
1027
  },
1137
1028
  /**
1138
- * List all the documents of a customer
1029
+ * List all the documents of a customer.
1139
1030
  * @summary List documents of a customer
1140
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1031
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1141
1032
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
1142
1033
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
1143
1034
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -1162,9 +1053,9 @@ var CustomersApiFp = function (configuration) {
1162
1053
  });
1163
1054
  },
1164
1055
  /**
1165
- * List all the invoices of a customer
1056
+ * List all the invoices of a customer.
1166
1057
  * @summary List invoices of a customer
1167
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1058
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1168
1059
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
1169
1060
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
1170
1061
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -1188,33 +1079,6 @@ var CustomersApiFp = function (configuration) {
1188
1079
  });
1189
1080
  });
1190
1081
  },
1191
- /**
1192
- * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
1193
- * @summary List policies of a customer
1194
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1195
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
1196
- * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
1197
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1198
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
1199
- * @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.
1200
- * @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.
1201
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1202
- * @param {*} [options] Override http request option.
1203
- * @throws {RequiredError}
1204
- */
1205
- listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
1206
- return __awaiter(this, void 0, void 0, function () {
1207
- var localVarAxiosArgs;
1208
- return __generator(this, function (_a) {
1209
- switch (_a.label) {
1210
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options)];
1211
- case 1:
1212
- localVarAxiosArgs = _a.sent();
1213
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1214
- }
1215
- });
1216
- });
1217
- },
1218
1082
  /**
1219
1083
  * Get new access token, new refresh token.
1220
1084
  * @summary Refresh token by customer
@@ -1236,29 +1100,6 @@ var CustomersApiFp = function (configuration) {
1236
1100
  });
1237
1101
  });
1238
1102
  },
1239
- /**
1240
- * Request to update an existing policy by customer
1241
- * @summary Request policy update by customer
1242
- * @param {string} policyCode The policy code
1243
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1244
- * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
1245
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1246
- * @param {*} [options] Override http request option.
1247
- * @throws {RequiredError}
1248
- */
1249
- requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
1250
- return __awaiter(this, void 0, void 0, function () {
1251
- var localVarAxiosArgs;
1252
- return __generator(this, function (_a) {
1253
- switch (_a.label) {
1254
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options)];
1255
- case 1:
1256
- localVarAxiosArgs = _a.sent();
1257
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1258
- }
1259
- });
1260
- });
1261
- },
1262
1103
  /**
1263
1104
  * Change customer\'s password using the token provided by the reset password endpoint.
1264
1105
  * @summary Change password by customer
@@ -1300,21 +1141,20 @@ var CustomersApiFp = function (configuration) {
1300
1141
  });
1301
1142
  },
1302
1143
  /**
1303
- * Request to terminate an existing policy by customer
1304
- * @summary Terminate a policy by customer
1305
- * @param {string} policyCode The policy code
1306
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1307
- * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
1144
+ * Update customer details like phone, email, names, addresses etc.
1145
+ * @summary Update customer details
1146
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1147
+ * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1308
1148
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1309
1149
  * @param {*} [options] Override http request option.
1310
1150
  * @throws {RequiredError}
1311
1151
  */
1312
- terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
1152
+ updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
1313
1153
  return __awaiter(this, void 0, void 0, function () {
1314
1154
  var localVarAxiosArgs;
1315
1155
  return __generator(this, function (_a) {
1316
1156
  switch (_a.label) {
1317
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options)];
1157
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options)];
1318
1158
  case 1:
1319
1159
  localVarAxiosArgs = _a.sent();
1320
1160
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -1323,20 +1163,18 @@ var CustomersApiFp = function (configuration) {
1323
1163
  });
1324
1164
  },
1325
1165
  /**
1326
- * Update customer details like phone, email, names, addresses etc
1327
- * @summary Update customer details
1328
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1329
- * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1330
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1166
+ * API to upload and attach documents to an account.
1167
+ * @summary Upload account documents
1168
+ * @param {string} customerCode
1331
1169
  * @param {*} [options] Override http request option.
1332
1170
  * @throws {RequiredError}
1333
1171
  */
1334
- updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
1172
+ uploadAccountDocuments: function (customerCode, options) {
1335
1173
  return __awaiter(this, void 0, void 0, function () {
1336
1174
  var localVarAxiosArgs;
1337
1175
  return __generator(this, function (_a) {
1338
1176
  switch (_a.label) {
1339
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options)];
1177
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadAccountDocuments(customerCode, options)];
1340
1178
  case 1:
1341
1179
  localVarAxiosArgs = _a.sent();
1342
1180
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -1384,28 +1222,6 @@ var CustomersApiFp = function (configuration) {
1384
1222
  });
1385
1223
  });
1386
1224
  },
1387
- /**
1388
- * Withdraw policy by customer
1389
- * @summary Withdraw policy by customer
1390
- * @param {string} policyCode The policy code
1391
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1392
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1393
- * @param {*} [options] Override http request option.
1394
- * @throws {RequiredError}
1395
- */
1396
- withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
1397
- return __awaiter(this, void 0, void 0, function () {
1398
- var localVarAxiosArgs;
1399
- return __generator(this, function (_a) {
1400
- switch (_a.label) {
1401
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawCustomerPolicy(policyCode, customerCode, authorization, options)];
1402
- case 1:
1403
- localVarAxiosArgs = _a.sent();
1404
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1405
- }
1406
- });
1407
- });
1408
- },
1409
1225
  };
1410
1226
  };
1411
1227
  exports.CustomersApiFp = CustomersApiFp;
@@ -1416,6 +1232,18 @@ exports.CustomersApiFp = CustomersApiFp;
1416
1232
  var CustomersApiFactory = function (configuration, basePath, axios) {
1417
1233
  var localVarFp = (0, exports.CustomersApiFp)(configuration);
1418
1234
  return {
1235
+ /**
1236
+ * Request to complete a payment change by customer.
1237
+ * @summary Request payment setup complete by customer
1238
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1239
+ * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
1240
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1241
+ * @param {*} [options] Override http request option.
1242
+ * @throws {RequiredError}
1243
+ */
1244
+ completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
1245
+ return localVarFp.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options).then(function (request) { return request(axios, basePath); });
1246
+ },
1419
1247
  /**
1420
1248
  * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
1421
1249
  * @summary Register a customer after invite
@@ -1437,9 +1265,9 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1437
1265
  return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
1438
1266
  },
1439
1267
  /**
1440
- * Get customer details
1268
+ * Get customer details.
1441
1269
  * @summary Get customer details
1442
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1270
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1443
1271
  * @param {string} [expand] Fields to expand response by - [account]
1444
1272
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1445
1273
  * @param {*} [options] Override http request option.
@@ -1449,10 +1277,10 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1449
1277
  return localVarFp.getCustomer(customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
1450
1278
  },
1451
1279
  /**
1452
- * Get a presigned download url for document
1280
+ * Get a presigned download url for document.
1453
1281
  * @summary Get a presigned download url for document
1454
- * @param {string} documentCode The document code
1455
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1282
+ * @param {string} documentCode The document code.
1283
+ * @param {string} customerCode
1456
1284
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1457
1285
  * @param {*} [options] Override http request option.
1458
1286
  * @throws {RequiredError}
@@ -1460,19 +1288,6 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1460
1288
  getCustomerDocumentDownloadUrl: function (documentCode, customerCode, authorization, options) {
1461
1289
  return localVarFp.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
1462
1290
  },
1463
- /**
1464
- * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
1465
- * @summary Get policy details
1466
- * @param {string} policyCode The policy code
1467
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1468
- * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
1469
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1470
- * @param {*} [options] Override http request option.
1471
- * @throws {RequiredError}
1472
- */
1473
- getPolicy: function (policyCode, customerCode, expand, authorization, options) {
1474
- return localVarFp.getPolicy(policyCode, customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
1475
- },
1476
1291
  /**
1477
1292
  * Start auth process to get new access token, refresh token after successful login.
1478
1293
  * @summary Initiate auth by customer
@@ -1483,11 +1298,22 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1483
1298
  initiateAuth: function (initiateAuthRequestDto, options) {
1484
1299
  return localVarFp.initiateAuth(initiateAuthRequestDto, options).then(function (request) { return request(axios, basePath); });
1485
1300
  },
1301
+ /**
1302
+ * Request to initiate a payment change by customer.
1303
+ * @summary Request payment setup initiation by customer
1304
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1305
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1306
+ * @param {*} [options] Override http request option.
1307
+ * @throws {RequiredError}
1308
+ */
1309
+ initiatePaymentSetup: function (customerCode, authorization, options) {
1310
+ return localVarFp.initiatePaymentSetup(customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
1311
+ },
1486
1312
  /**
1487
1313
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1488
1314
  * @summary Invite a customer by self
1489
1315
  * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1490
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
1316
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
1491
1317
  * @param {*} [options] Override http request option.
1492
1318
  * @throws {RequiredError}
1493
1319
  */
@@ -1498,7 +1324,7 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1498
1324
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1499
1325
  * @summary Invite a customer by tenant
1500
1326
  * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1501
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
1327
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
1502
1328
  * @param {*} [options] Override http request option.
1503
1329
  * @throws {RequiredError}
1504
1330
  */
@@ -1506,9 +1332,9 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1506
1332
  return localVarFp.inviteByTenant(inviteByCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1507
1333
  },
1508
1334
  /**
1509
- * List all the documents of a customer
1335
+ * List all the documents of a customer.
1510
1336
  * @summary List documents of a customer
1511
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1337
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1512
1338
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
1513
1339
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
1514
1340
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -1523,9 +1349,9 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1523
1349
  return localVarFp.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
1524
1350
  },
1525
1351
  /**
1526
- * List all the invoices of a customer
1352
+ * List all the invoices of a customer.
1527
1353
  * @summary List invoices of a customer
1528
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1354
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1529
1355
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
1530
1356
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
1531
1357
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -1539,23 +1365,6 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1539
1365
  listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
1540
1366
  return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
1541
1367
  },
1542
- /**
1543
- * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
1544
- * @summary List policies of a customer
1545
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1546
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
1547
- * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
1548
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1549
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
1550
- * @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.
1551
- * @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.
1552
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1553
- * @param {*} [options] Override http request option.
1554
- * @throws {RequiredError}
1555
- */
1556
- listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
1557
- return localVarFp.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
1558
- },
1559
1368
  /**
1560
1369
  * Get new access token, new refresh token.
1561
1370
  * @summary Refresh token by customer
@@ -1567,19 +1376,6 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1567
1376
  refreshToken: function (refreshTokenDto, cookie, options) {
1568
1377
  return localVarFp.refreshToken(refreshTokenDto, cookie, options).then(function (request) { return request(axios, basePath); });
1569
1378
  },
1570
- /**
1571
- * Request to update an existing policy by customer
1572
- * @summary Request policy update by customer
1573
- * @param {string} policyCode The policy code
1574
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1575
- * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
1576
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1577
- * @param {*} [options] Override http request option.
1578
- * @throws {RequiredError}
1579
- */
1580
- requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
1581
- return localVarFp.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1582
- },
1583
1379
  /**
1584
1380
  * Change customer\'s password using the token provided by the reset password endpoint.
1585
1381
  * @summary Change password by customer
@@ -1601,29 +1397,26 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1601
1397
  return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then(function (request) { return request(axios, basePath); });
1602
1398
  },
1603
1399
  /**
1604
- * Request to terminate an existing policy by customer
1605
- * @summary Terminate a policy by customer
1606
- * @param {string} policyCode The policy code
1607
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1608
- * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
1400
+ * Update customer details like phone, email, names, addresses etc.
1401
+ * @summary Update customer details
1402
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
1403
+ * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1609
1404
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1610
1405
  * @param {*} [options] Override http request option.
1611
1406
  * @throws {RequiredError}
1612
1407
  */
1613
- terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
1614
- return localVarFp.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1408
+ updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
1409
+ return localVarFp.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1615
1410
  },
1616
1411
  /**
1617
- * Update customer details like phone, email, names, addresses etc
1618
- * @summary Update customer details
1619
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1620
- * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1621
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1412
+ * API to upload and attach documents to an account.
1413
+ * @summary Upload account documents
1414
+ * @param {string} customerCode
1622
1415
  * @param {*} [options] Override http request option.
1623
1416
  * @throws {RequiredError}
1624
1417
  */
1625
- updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
1626
- return localVarFp.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1418
+ uploadAccountDocuments: function (customerCode, options) {
1419
+ return localVarFp.uploadAccountDocuments(customerCode, options).then(function (request) { return request(axios, basePath); });
1627
1420
  },
1628
1421
  /**
1629
1422
  * Verify the invite sent to the customer via email.
@@ -1645,18 +1438,6 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
1645
1438
  verifyResetPasswordToken: function (resetToken, options) {
1646
1439
  return localVarFp.verifyResetPasswordToken(resetToken, options).then(function (request) { return request(axios, basePath); });
1647
1440
  },
1648
- /**
1649
- * Withdraw policy by customer
1650
- * @summary Withdraw policy by customer
1651
- * @param {string} policyCode The policy code
1652
- * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
1653
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1654
- * @param {*} [options] Override http request option.
1655
- * @throws {RequiredError}
1656
- */
1657
- withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
1658
- return localVarFp.withdrawCustomerPolicy(policyCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
1659
- },
1660
1441
  };
1661
1442
  };
1662
1443
  exports.CustomersApiFactory = CustomersApiFactory;
@@ -1671,6 +1452,18 @@ var CustomersApi = /** @class */ (function (_super) {
1671
1452
  function CustomersApi() {
1672
1453
  return _super !== null && _super.apply(this, arguments) || this;
1673
1454
  }
1455
+ /**
1456
+ * Request to complete a payment change by customer.
1457
+ * @summary Request payment setup complete by customer
1458
+ * @param {CustomersApiCompletePaymentSetupRequest} requestParameters Request parameters.
1459
+ * @param {*} [options] Override http request option.
1460
+ * @throws {RequiredError}
1461
+ * @memberof CustomersApi
1462
+ */
1463
+ CustomersApi.prototype.completePaymentSetup = function (requestParameters, options) {
1464
+ var _this = this;
1465
+ return (0, exports.CustomersApiFp)(this.configuration).completePaymentSetup(requestParameters.customerCode, requestParameters.completePaymentSetupPspRequest, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1466
+ };
1674
1467
  /**
1675
1468
  * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
1676
1469
  * @summary Register a customer after invite
@@ -1696,7 +1489,7 @@ var CustomersApi = /** @class */ (function (_super) {
1696
1489
  return (0, exports.CustomersApiFp)(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1697
1490
  };
1698
1491
  /**
1699
- * Get customer details
1492
+ * Get customer details.
1700
1493
  * @summary Get customer details
1701
1494
  * @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
1702
1495
  * @param {*} [options] Override http request option.
@@ -1708,7 +1501,7 @@ var CustomersApi = /** @class */ (function (_super) {
1708
1501
  return (0, exports.CustomersApiFp)(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1709
1502
  };
1710
1503
  /**
1711
- * Get a presigned download url for document
1504
+ * Get a presigned download url for document.
1712
1505
  * @summary Get a presigned download url for document
1713
1506
  * @param {CustomersApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
1714
1507
  * @param {*} [options] Override http request option.
@@ -1720,28 +1513,28 @@ var CustomersApi = /** @class */ (function (_super) {
1720
1513
  return (0, exports.CustomersApiFp)(this.configuration).getCustomerDocumentDownloadUrl(requestParameters.documentCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1721
1514
  };
1722
1515
  /**
1723
- * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
1724
- * @summary Get policy details
1725
- * @param {CustomersApiGetPolicyRequest} requestParameters Request parameters.
1516
+ * Start auth process to get new access token, refresh token after successful login.
1517
+ * @summary Initiate auth by customer
1518
+ * @param {CustomersApiInitiateAuthRequest} requestParameters Request parameters.
1726
1519
  * @param {*} [options] Override http request option.
1727
1520
  * @throws {RequiredError}
1728
1521
  * @memberof CustomersApi
1729
1522
  */
1730
- CustomersApi.prototype.getPolicy = function (requestParameters, options) {
1523
+ CustomersApi.prototype.initiateAuth = function (requestParameters, options) {
1731
1524
  var _this = this;
1732
- return (0, exports.CustomersApiFp)(this.configuration).getPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1525
+ return (0, exports.CustomersApiFp)(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1733
1526
  };
1734
1527
  /**
1735
- * Start auth process to get new access token, refresh token after successful login.
1736
- * @summary Initiate auth by customer
1737
- * @param {CustomersApiInitiateAuthRequest} requestParameters Request parameters.
1528
+ * Request to initiate a payment change by customer.
1529
+ * @summary Request payment setup initiation by customer
1530
+ * @param {CustomersApiInitiatePaymentSetupRequest} requestParameters Request parameters.
1738
1531
  * @param {*} [options] Override http request option.
1739
1532
  * @throws {RequiredError}
1740
1533
  * @memberof CustomersApi
1741
1534
  */
1742
- CustomersApi.prototype.initiateAuth = function (requestParameters, options) {
1535
+ CustomersApi.prototype.initiatePaymentSetup = function (requestParameters, options) {
1743
1536
  var _this = this;
1744
- return (0, exports.CustomersApiFp)(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1537
+ return (0, exports.CustomersApiFp)(this.configuration).initiatePaymentSetup(requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1745
1538
  };
1746
1539
  /**
1747
1540
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
@@ -1768,7 +1561,7 @@ var CustomersApi = /** @class */ (function (_super) {
1768
1561
  return (0, exports.CustomersApiFp)(this.configuration).inviteByTenant(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1769
1562
  };
1770
1563
  /**
1771
- * List all the documents of a customer
1564
+ * List all the documents of a customer.
1772
1565
  * @summary List documents of a customer
1773
1566
  * @param {CustomersApiListDocumentsRequest} requestParameters Request parameters.
1774
1567
  * @param {*} [options] Override http request option.
@@ -1780,7 +1573,7 @@ var CustomersApi = /** @class */ (function (_super) {
1780
1573
  return (0, exports.CustomersApiFp)(this.configuration).listDocuments(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1781
1574
  };
1782
1575
  /**
1783
- * List all the invoices of a customer
1576
+ * List all the invoices of a customer.
1784
1577
  * @summary List invoices of a customer
1785
1578
  * @param {CustomersApiListInvoicesRequest} requestParameters Request parameters.
1786
1579
  * @param {*} [options] Override http request option.
@@ -1791,18 +1584,6 @@ var CustomersApi = /** @class */ (function (_super) {
1791
1584
  var _this = this;
1792
1585
  return (0, exports.CustomersApiFp)(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1793
1586
  };
1794
- /**
1795
- * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
1796
- * @summary List policies of a customer
1797
- * @param {CustomersApiListPoliciesRequest} requestParameters Request parameters.
1798
- * @param {*} [options] Override http request option.
1799
- * @throws {RequiredError}
1800
- * @memberof CustomersApi
1801
- */
1802
- CustomersApi.prototype.listPolicies = function (requestParameters, options) {
1803
- var _this = this;
1804
- return (0, exports.CustomersApiFp)(this.configuration).listPolicies(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1805
- };
1806
1587
  /**
1807
1588
  * Get new access token, new refresh token.
1808
1589
  * @summary Refresh token by customer
@@ -1815,18 +1596,6 @@ var CustomersApi = /** @class */ (function (_super) {
1815
1596
  var _this = this;
1816
1597
  return (0, exports.CustomersApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then(function (request) { return request(_this.axios, _this.basePath); });
1817
1598
  };
1818
- /**
1819
- * Request to update an existing policy by customer
1820
- * @summary Request policy update by customer
1821
- * @param {CustomersApiRequestPolicyUpdateRequest} requestParameters Request parameters.
1822
- * @param {*} [options] Override http request option.
1823
- * @throws {RequiredError}
1824
- * @memberof CustomersApi
1825
- */
1826
- CustomersApi.prototype.requestPolicyUpdate = function (requestParameters, options) {
1827
- var _this = this;
1828
- return (0, exports.CustomersApiFp)(this.configuration).requestPolicyUpdate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.requestPolicyUpdateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1829
- };
1830
1599
  /**
1831
1600
  * Change customer\'s password using the token provided by the reset password endpoint.
1832
1601
  * @summary Change password by customer
@@ -1852,28 +1621,28 @@ var CustomersApi = /** @class */ (function (_super) {
1852
1621
  return (0, exports.CustomersApiFp)(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1853
1622
  };
1854
1623
  /**
1855
- * Request to terminate an existing policy by customer
1856
- * @summary Terminate a policy by customer
1857
- * @param {CustomersApiTerminateCustomerPolicyRequest} requestParameters Request parameters.
1624
+ * Update customer details like phone, email, names, addresses etc.
1625
+ * @summary Update customer details
1626
+ * @param {CustomersApiUpdateCustomerRequest} requestParameters Request parameters.
1858
1627
  * @param {*} [options] Override http request option.
1859
1628
  * @throws {RequiredError}
1860
1629
  * @memberof CustomersApi
1861
1630
  */
1862
- CustomersApi.prototype.terminateCustomerPolicy = function (requestParameters, options) {
1631
+ CustomersApi.prototype.updateCustomer = function (requestParameters, options) {
1863
1632
  var _this = this;
1864
- return (0, exports.CustomersApiFp)(this.configuration).terminateCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.terminateCustomerPolicyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1633
+ return (0, exports.CustomersApiFp)(this.configuration).updateCustomer(requestParameters.customerCode, requestParameters.updateCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1865
1634
  };
1866
1635
  /**
1867
- * Update customer details like phone, email, names, addresses etc
1868
- * @summary Update customer details
1869
- * @param {CustomersApiUpdateCustomerRequest} requestParameters Request parameters.
1636
+ * API to upload and attach documents to an account.
1637
+ * @summary Upload account documents
1638
+ * @param {CustomersApiUploadAccountDocumentsRequest} requestParameters Request parameters.
1870
1639
  * @param {*} [options] Override http request option.
1871
1640
  * @throws {RequiredError}
1872
1641
  * @memberof CustomersApi
1873
1642
  */
1874
- CustomersApi.prototype.updateCustomer = function (requestParameters, options) {
1643
+ CustomersApi.prototype.uploadAccountDocuments = function (requestParameters, options) {
1875
1644
  var _this = this;
1876
- return (0, exports.CustomersApiFp)(this.configuration).updateCustomer(requestParameters.customerCode, requestParameters.updateCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1645
+ return (0, exports.CustomersApiFp)(this.configuration).uploadAccountDocuments(requestParameters.customerCode, options).then(function (request) { return request(_this.axios, _this.basePath); });
1877
1646
  };
1878
1647
  /**
1879
1648
  * Verify the invite sent to the customer via email.
@@ -1899,18 +1668,6 @@ var CustomersApi = /** @class */ (function (_super) {
1899
1668
  var _this = this;
1900
1669
  return (0, exports.CustomersApiFp)(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
1901
1670
  };
1902
- /**
1903
- * Withdraw policy by customer
1904
- * @summary Withdraw policy by customer
1905
- * @param {CustomersApiWithdrawCustomerPolicyRequest} requestParameters Request parameters.
1906
- * @param {*} [options] Override http request option.
1907
- * @throws {RequiredError}
1908
- * @memberof CustomersApi
1909
- */
1910
- CustomersApi.prototype.withdrawCustomerPolicy = function (requestParameters, options) {
1911
- var _this = this;
1912
- return (0, exports.CustomersApiFp)(this.configuration).withdrawCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1913
- };
1914
1671
  return CustomersApi;
1915
1672
  }(base_1.BaseAPI));
1916
1673
  exports.CustomersApi = CustomersApi;