@emilgroup/customer-sdk-node 1.0.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 (91) hide show
  1. package/.openapi-generator/FILES +35 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/customers-api.ts +1284 -0
  6. package/api.ts +36 -0
  7. package/base.ts +187 -0
  8. package/common.ts +139 -0
  9. package/configuration.ts +118 -0
  10. package/dist/api/customers-api.d.ts +730 -0
  11. package/dist/api/customers-api.js +1095 -0
  12. package/dist/api.d.ts +16 -0
  13. package/dist/api.js +36 -0
  14. package/dist/base.d.ts +68 -0
  15. package/dist/base.js +251 -0
  16. package/dist/common.d.ts +66 -0
  17. package/dist/common.js +244 -0
  18. package/dist/configuration.d.ts +98 -0
  19. package/dist/configuration.js +45 -0
  20. package/dist/index.d.ts +15 -0
  21. package/dist/index.js +35 -0
  22. package/dist/models/create-account-request-dto.d.ts +102 -0
  23. package/dist/models/create-account-request-dto.js +21 -0
  24. package/dist/models/create-customer-request-dto.d.ts +43 -0
  25. package/dist/models/create-customer-request-dto.js +15 -0
  26. package/dist/models/create-customer-response-class.d.ts +24 -0
  27. package/dist/models/create-customer-response-class.js +15 -0
  28. package/dist/models/forgot-password-request-dto.d.ts +30 -0
  29. package/dist/models/forgot-password-request-dto.js +15 -0
  30. package/dist/models/get-policy-response-class.d.ts +25 -0
  31. package/dist/models/get-policy-response-class.js +15 -0
  32. package/dist/models/index.d.ts +21 -0
  33. package/dist/models/index.js +37 -0
  34. package/dist/models/invite-class.d.ts +54 -0
  35. package/dist/models/invite-class.js +15 -0
  36. package/dist/models/invite-customer-request-dto.d.ts +30 -0
  37. package/dist/models/invite-customer-request-dto.js +15 -0
  38. package/dist/models/invite-customer-response-class.d.ts +25 -0
  39. package/dist/models/invite-customer-response-class.js +15 -0
  40. package/dist/models/list-invoices-response-class.d.ts +30 -0
  41. package/dist/models/list-invoices-response-class.js +15 -0
  42. package/dist/models/list-policies-response-class.d.ts +31 -0
  43. package/dist/models/list-policies-response-class.js +15 -0
  44. package/dist/models/login-request-dto.d.ts +36 -0
  45. package/dist/models/login-request-dto.js +15 -0
  46. package/dist/models/login-response-class.d.ts +30 -0
  47. package/dist/models/login-response-class.js +15 -0
  48. package/dist/models/policy-class.d.ts +55 -0
  49. package/dist/models/policy-class.js +15 -0
  50. package/dist/models/policy-object-class.d.ts +30 -0
  51. package/dist/models/policy-object-class.js +15 -0
  52. package/dist/models/policy-premium-class.d.ts +43 -0
  53. package/dist/models/policy-premium-class.js +15 -0
  54. package/dist/models/policy-premium-item-class.d.ts +36 -0
  55. package/dist/models/policy-premium-item-class.js +15 -0
  56. package/dist/models/policy-version-class.d.ts +49 -0
  57. package/dist/models/policy-version-class.js +15 -0
  58. package/dist/models/refresh-token-dto.d.ts +30 -0
  59. package/dist/models/refresh-token-dto.js +15 -0
  60. package/dist/models/reset-password-by-customer-request-dto.d.ts +36 -0
  61. package/dist/models/reset-password-by-customer-request-dto.js +15 -0
  62. package/dist/models/timeslice-class.d.ts +56 -0
  63. package/dist/models/timeslice-class.js +15 -0
  64. package/dist/models/verify-customer-invite-response-class.d.ts +36 -0
  65. package/dist/models/verify-customer-invite-response-class.js +15 -0
  66. package/git_push.sh +57 -0
  67. package/index.ts +19 -0
  68. package/models/create-account-request-dto.ts +111 -0
  69. package/models/create-customer-request-dto.ts +49 -0
  70. package/models/create-customer-response-class.ts +30 -0
  71. package/models/forgot-password-request-dto.ts +36 -0
  72. package/models/get-policy-response-class.ts +31 -0
  73. package/models/index.ts +21 -0
  74. package/models/invite-class.ts +60 -0
  75. package/models/invite-customer-request-dto.ts +36 -0
  76. package/models/invite-customer-response-class.ts +31 -0
  77. package/models/list-invoices-response-class.ts +36 -0
  78. package/models/list-policies-response-class.ts +37 -0
  79. package/models/login-request-dto.ts +42 -0
  80. package/models/login-response-class.ts +36 -0
  81. package/models/policy-class.ts +61 -0
  82. package/models/policy-object-class.ts +36 -0
  83. package/models/policy-premium-class.ts +49 -0
  84. package/models/policy-premium-item-class.ts +42 -0
  85. package/models/policy-version-class.ts +55 -0
  86. package/models/refresh-token-dto.ts +36 -0
  87. package/models/reset-password-by-customer-request-dto.ts +42 -0
  88. package/models/timeslice-class.ts +62 -0
  89. package/models/verify-customer-invite-response-class.ts +42 -0
  90. package/package.json +29 -0
  91. package/tsconfig.json +22 -0
@@ -0,0 +1,1284 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateCustomerRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateCustomerResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { ForgotPasswordRequestDto } from '../models';
29
+ // @ts-ignore
30
+ import { GetPolicyResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { InviteCustomerRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { InviteCustomerResponseClass } from '../models';
35
+ // @ts-ignore
36
+ import { ListInvoicesResponseClass } from '../models';
37
+ // @ts-ignore
38
+ import { ListPoliciesResponseClass } from '../models';
39
+ // @ts-ignore
40
+ import { LoginRequestDto } from '../models';
41
+ // @ts-ignore
42
+ import { LoginResponseClass } from '../models';
43
+ // @ts-ignore
44
+ import { RefreshTokenDto } from '../models';
45
+ // @ts-ignore
46
+ import { ResetPasswordByCustomerRequestDto } from '../models';
47
+ // @ts-ignore
48
+ import { VerifyCustomerInviteResponseClass } from '../models';
49
+ // URLSearchParams not necessarily used
50
+ // @ts-ignore
51
+ import { URL, URLSearchParams } from 'url';
52
+ const FormData = require('form-data');
53
+ /**
54
+ * CustomersApi - axios parameter creator
55
+ * @export
56
+ */
57
+ export const CustomersApiAxiosParamCreator = function (configuration?: Configuration) {
58
+ return {
59
+ /**
60
+ * 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.
61
+ * @summary Register a customer after invite
62
+ * @param {CreateCustomerRequestDto} createCustomerRequestDto
63
+ * @param {*} [options] Override http request option.
64
+ * @throws {RequiredError}
65
+ */
66
+ createCustomer: async (createCustomerRequestDto: CreateCustomerRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
67
+ // verify required parameter 'createCustomerRequestDto' is not null or undefined
68
+ assertParamExists('createCustomer', 'createCustomerRequestDto', createCustomerRequestDto)
69
+ const localVarPath = `/v1/customers/create`;
70
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
71
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
72
+ let baseOptions;
73
+ let baseAccessToken;
74
+ if (configuration) {
75
+ baseOptions = configuration.baseOptions;
76
+ baseAccessToken = configuration.accessToken;
77
+ }
78
+
79
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
80
+ const localVarHeaderParameter = {} as any;
81
+ const localVarQueryParameter = {} as any;
82
+
83
+
84
+
85
+ localVarHeaderParameter['Content-Type'] = 'application/json';
86
+
87
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
88
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
89
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
90
+ localVarRequestOptions.data = serializeDataIfNeeded(createCustomerRequestDto, localVarRequestOptions, configuration)
91
+
92
+ return {
93
+ url: toPathString(localVarUrlObj),
94
+ options: localVarRequestOptions,
95
+ };
96
+ },
97
+ /**
98
+ * Send a customer a reset-password token via email.
99
+ * @summary Forgot password by customer
100
+ * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ forgotPassword: async (forgotPasswordRequestDto: ForgotPasswordRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
105
+ // verify required parameter 'forgotPasswordRequestDto' is not null or undefined
106
+ assertParamExists('forgotPassword', 'forgotPasswordRequestDto', forgotPasswordRequestDto)
107
+ const localVarPath = `/v1/customers/forgot-password`;
108
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
109
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
110
+ let baseOptions;
111
+ let baseAccessToken;
112
+ if (configuration) {
113
+ baseOptions = configuration.baseOptions;
114
+ baseAccessToken = configuration.accessToken;
115
+ }
116
+
117
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
118
+ const localVarHeaderParameter = {} as any;
119
+ const localVarQueryParameter = {} as any;
120
+
121
+
122
+
123
+ localVarHeaderParameter['Content-Type'] = 'application/json';
124
+
125
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
126
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
127
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
128
+ localVarRequestOptions.data = serializeDataIfNeeded(forgotPasswordRequestDto, localVarRequestOptions, configuration)
129
+
130
+ return {
131
+ url: toPathString(localVarUrlObj),
132
+ options: localVarRequestOptions,
133
+ };
134
+ },
135
+ /**
136
+ * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
137
+ * @summary Get policy details
138
+ * @param {string} policyCode The policy code
139
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
140
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
141
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ */
145
+ getPolicy: async (policyCode: string, customerCode: string, expand?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
146
+ // verify required parameter 'policyCode' is not null or undefined
147
+ assertParamExists('getPolicy', 'policyCode', policyCode)
148
+ // verify required parameter 'customerCode' is not null or undefined
149
+ assertParamExists('getPolicy', 'customerCode', customerCode)
150
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}`
151
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
152
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
153
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
155
+ let baseOptions;
156
+ let baseAccessToken;
157
+ if (configuration) {
158
+ baseOptions = configuration.baseOptions;
159
+ baseAccessToken = configuration.accessToken;
160
+ }
161
+
162
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
163
+ const localVarHeaderParameter = {} as any;
164
+ const localVarQueryParameter = {} as any;
165
+
166
+ if (expand !== undefined) {
167
+ localVarQueryParameter['expand'] = expand;
168
+ }
169
+
170
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
171
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
172
+ }
173
+
174
+
175
+
176
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
177
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
178
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
179
+
180
+ return {
181
+ url: toPathString(localVarUrlObj),
182
+ options: localVarRequestOptions,
183
+ };
184
+ },
185
+ /**
186
+ * 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.
187
+ * @summary Invite a customer to register
188
+ * @param {InviteCustomerRequestDto} inviteCustomerRequestDto
189
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ inviteCustomer: async (inviteCustomerRequestDto: InviteCustomerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
194
+ // verify required parameter 'inviteCustomerRequestDto' is not null or undefined
195
+ assertParamExists('inviteCustomer', 'inviteCustomerRequestDto', inviteCustomerRequestDto)
196
+ const localVarPath = `/v1/customers/invites`;
197
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
198
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
199
+ let baseOptions;
200
+ let baseAccessToken;
201
+ if (configuration) {
202
+ baseOptions = configuration.baseOptions;
203
+ baseAccessToken = configuration.accessToken;
204
+ }
205
+
206
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
207
+ const localVarHeaderParameter = {} as any;
208
+ const localVarQueryParameter = {} as any;
209
+
210
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
211
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
212
+ }
213
+
214
+
215
+
216
+ localVarHeaderParameter['Content-Type'] = 'application/json';
217
+
218
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
219
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
220
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
221
+ localVarRequestOptions.data = serializeDataIfNeeded(inviteCustomerRequestDto, localVarRequestOptions, configuration)
222
+
223
+ return {
224
+ url: toPathString(localVarUrlObj),
225
+ options: localVarRequestOptions,
226
+ };
227
+ },
228
+ /**
229
+ * List all the invoices of a customer
230
+ * @summary List invoices of a customer
231
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
232
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
233
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
234
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
235
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
236
+ * @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.
237
+ * @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.
238
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ */
242
+ listInvoices: async (customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
243
+ // verify required parameter 'customerCode' is not null or undefined
244
+ assertParamExists('listInvoices', 'customerCode', customerCode)
245
+ const localVarPath = `/v1/customers/{customerCode}/invoices`
246
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
247
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
248
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
249
+ let baseOptions;
250
+ let baseAccessToken;
251
+ if (configuration) {
252
+ baseOptions = configuration.baseOptions;
253
+ baseAccessToken = configuration.accessToken;
254
+ }
255
+
256
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
257
+ const localVarHeaderParameter = {} as any;
258
+ const localVarQueryParameter = {} as any;
259
+
260
+ if (pageSize !== undefined) {
261
+ localVarQueryParameter['pageSize'] = pageSize;
262
+ }
263
+
264
+ if (pageToken !== undefined) {
265
+ localVarQueryParameter['pageToken'] = pageToken;
266
+ }
267
+
268
+ if (filter !== undefined) {
269
+ localVarQueryParameter['filter'] = filter;
270
+ }
271
+
272
+ if (search !== undefined) {
273
+ localVarQueryParameter['search'] = search;
274
+ }
275
+
276
+ if (order !== undefined) {
277
+ localVarQueryParameter['order'] = order;
278
+ }
279
+
280
+ if (expand !== undefined) {
281
+ localVarQueryParameter['expand'] = expand;
282
+ }
283
+
284
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
285
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
286
+ }
287
+
288
+
289
+
290
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
291
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
292
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
293
+
294
+ return {
295
+ url: toPathString(localVarUrlObj),
296
+ options: localVarRequestOptions,
297
+ };
298
+ },
299
+ /**
300
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
301
+ * @summary List policies of a customer
302
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
303
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
304
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
305
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
306
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
307
+ * @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.
308
+ * @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.
309
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
310
+ * @param {*} [options] Override http request option.
311
+ * @throws {RequiredError}
312
+ */
313
+ listPolicies: async (customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
314
+ // verify required parameter 'customerCode' is not null or undefined
315
+ assertParamExists('listPolicies', 'customerCode', customerCode)
316
+ const localVarPath = `/v1/customers/{customerCode}/policies`
317
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
318
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
319
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
320
+ let baseOptions;
321
+ let baseAccessToken;
322
+ if (configuration) {
323
+ baseOptions = configuration.baseOptions;
324
+ baseAccessToken = configuration.accessToken;
325
+ }
326
+
327
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
328
+ const localVarHeaderParameter = {} as any;
329
+ const localVarQueryParameter = {} as any;
330
+
331
+ if (pageSize !== undefined) {
332
+ localVarQueryParameter['pageSize'] = pageSize;
333
+ }
334
+
335
+ if (pageToken !== undefined) {
336
+ localVarQueryParameter['pageToken'] = pageToken;
337
+ }
338
+
339
+ if (filter !== undefined) {
340
+ localVarQueryParameter['filter'] = filter;
341
+ }
342
+
343
+ if (search !== undefined) {
344
+ localVarQueryParameter['search'] = search;
345
+ }
346
+
347
+ if (order !== undefined) {
348
+ localVarQueryParameter['order'] = order;
349
+ }
350
+
351
+ if (expand !== undefined) {
352
+ localVarQueryParameter['expand'] = expand;
353
+ }
354
+
355
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
356
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
357
+ }
358
+
359
+
360
+
361
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
362
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
363
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
364
+
365
+ return {
366
+ url: toPathString(localVarUrlObj),
367
+ options: localVarRequestOptions,
368
+ };
369
+ },
370
+ /**
371
+ * Get new access token, refresh token after successful login.
372
+ * @summary Login by customer
373
+ * @param {LoginRequestDto} loginRequestDto
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ login: async (loginRequestDto: LoginRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
378
+ // verify required parameter 'loginRequestDto' is not null or undefined
379
+ assertParamExists('login', 'loginRequestDto', loginRequestDto)
380
+ const localVarPath = `/v1/customers/login`;
381
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
382
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
383
+ let baseOptions;
384
+ let baseAccessToken;
385
+ if (configuration) {
386
+ baseOptions = configuration.baseOptions;
387
+ baseAccessToken = configuration.accessToken;
388
+ }
389
+
390
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
391
+ const localVarHeaderParameter = {} as any;
392
+ const localVarQueryParameter = {} as any;
393
+
394
+
395
+
396
+ localVarHeaderParameter['Content-Type'] = 'application/json';
397
+
398
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
399
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
400
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
401
+ localVarRequestOptions.data = serializeDataIfNeeded(loginRequestDto, localVarRequestOptions, configuration)
402
+
403
+ return {
404
+ url: toPathString(localVarUrlObj),
405
+ options: localVarRequestOptions,
406
+ };
407
+ },
408
+ /**
409
+ * Get new access token, new refresh token.
410
+ * @summary Refresh token by customer
411
+ * @param {RefreshTokenDto} refreshTokenDto
412
+ * @param {string} [cookie] HTTP only cookie that was sent during login.
413
+ * @param {*} [options] Override http request option.
414
+ * @throws {RequiredError}
415
+ */
416
+ refreshToken: async (refreshTokenDto: RefreshTokenDto, cookie?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
417
+ // verify required parameter 'refreshTokenDto' is not null or undefined
418
+ assertParamExists('refreshToken', 'refreshTokenDto', refreshTokenDto)
419
+ const localVarPath = `/v1/customers/refresh-token`;
420
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
421
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
422
+ let baseOptions;
423
+ let baseAccessToken;
424
+ if (configuration) {
425
+ baseOptions = configuration.baseOptions;
426
+ baseAccessToken = configuration.accessToken;
427
+ }
428
+
429
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
430
+ const localVarHeaderParameter = {} as any;
431
+ const localVarQueryParameter = {} as any;
432
+
433
+ if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
434
+ localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
435
+ }
436
+
437
+
438
+
439
+ localVarHeaderParameter['Content-Type'] = 'application/json';
440
+
441
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
442
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
443
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
444
+ localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenDto, localVarRequestOptions, configuration)
445
+
446
+ return {
447
+ url: toPathString(localVarUrlObj),
448
+ options: localVarRequestOptions,
449
+ };
450
+ },
451
+ /**
452
+ * Change customer\'s password using the token provided by the reset password endpoint.
453
+ * @summary Change password by customer
454
+ * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
455
+ * @param {*} [options] Override http request option.
456
+ * @throws {RequiredError}
457
+ */
458
+ resetPassword: async (resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
459
+ // verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
460
+ assertParamExists('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto)
461
+ const localVarPath = `/v1/customers/reset-password`;
462
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
463
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
464
+ let baseOptions;
465
+ let baseAccessToken;
466
+ if (configuration) {
467
+ baseOptions = configuration.baseOptions;
468
+ baseAccessToken = configuration.accessToken;
469
+ }
470
+
471
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
472
+ const localVarHeaderParameter = {} as any;
473
+ const localVarQueryParameter = {} as any;
474
+
475
+
476
+
477
+ localVarHeaderParameter['Content-Type'] = 'application/json';
478
+
479
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
480
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
481
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
482
+ localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration)
483
+
484
+ return {
485
+ url: toPathString(localVarUrlObj),
486
+ options: localVarRequestOptions,
487
+ };
488
+ },
489
+ /**
490
+ * Verify the invite sent to the customer via email.
491
+ * @summary Verify customer\'s invite token
492
+ * @param {string} inviteToken Invite token sent to the customer
493
+ * @param {*} [options] Override http request option.
494
+ * @throws {RequiredError}
495
+ */
496
+ verifyInvite: async (inviteToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
497
+ // verify required parameter 'inviteToken' is not null or undefined
498
+ assertParamExists('verifyInvite', 'inviteToken', inviteToken)
499
+ const localVarPath = `/v1/customers/invites/verify`;
500
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
501
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
502
+ let baseOptions;
503
+ let baseAccessToken;
504
+ if (configuration) {
505
+ baseOptions = configuration.baseOptions;
506
+ baseAccessToken = configuration.accessToken;
507
+ }
508
+
509
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
510
+ const localVarHeaderParameter = {} as any;
511
+ const localVarQueryParameter = {} as any;
512
+
513
+ if (inviteToken !== undefined) {
514
+ localVarQueryParameter['inviteToken'] = inviteToken;
515
+ }
516
+
517
+
518
+
519
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
520
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
521
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
522
+
523
+ return {
524
+ url: toPathString(localVarUrlObj),
525
+ options: localVarRequestOptions,
526
+ };
527
+ },
528
+ /**
529
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
530
+ * @summary Verify a reset password token
531
+ * @param {string} resetToken reset password token
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ */
535
+ verifyResetPasswordToken: async (resetToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
536
+ // verify required parameter 'resetToken' is not null or undefined
537
+ assertParamExists('verifyResetPasswordToken', 'resetToken', resetToken)
538
+ const localVarPath = `/v1/customers/verify-reset-password`;
539
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
540
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
541
+ let baseOptions;
542
+ let baseAccessToken;
543
+ if (configuration) {
544
+ baseOptions = configuration.baseOptions;
545
+ baseAccessToken = configuration.accessToken;
546
+ }
547
+
548
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
549
+ const localVarHeaderParameter = {} as any;
550
+ const localVarQueryParameter = {} as any;
551
+
552
+ if (resetToken !== undefined) {
553
+ localVarQueryParameter['resetToken'] = resetToken;
554
+ }
555
+
556
+
557
+
558
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
559
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
560
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
561
+
562
+ return {
563
+ url: toPathString(localVarUrlObj),
564
+ options: localVarRequestOptions,
565
+ };
566
+ },
567
+ }
568
+ };
569
+
570
+ /**
571
+ * CustomersApi - functional programming interface
572
+ * @export
573
+ */
574
+ export const CustomersApiFp = function(configuration?: Configuration) {
575
+ const localVarAxiosParamCreator = CustomersApiAxiosParamCreator(configuration)
576
+ return {
577
+ /**
578
+ * 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.
579
+ * @summary Register a customer after invite
580
+ * @param {CreateCustomerRequestDto} createCustomerRequestDto
581
+ * @param {*} [options] Override http request option.
582
+ * @throws {RequiredError}
583
+ */
584
+ async createCustomer(createCustomerRequestDto: CreateCustomerRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCustomerResponseClass>> {
585
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCustomer(createCustomerRequestDto, options);
586
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
587
+ },
588
+ /**
589
+ * Send a customer a reset-password token via email.
590
+ * @summary Forgot password by customer
591
+ * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
592
+ * @param {*} [options] Override http request option.
593
+ * @throws {RequiredError}
594
+ */
595
+ async forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
596
+ const localVarAxiosArgs = await localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options);
597
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
598
+ },
599
+ /**
600
+ * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
601
+ * @summary Get policy details
602
+ * @param {string} policyCode The policy code
603
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
604
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
605
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ async getPolicy(policyCode: string, customerCode: string, expand?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyResponseClass>> {
610
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicy(policyCode, customerCode, expand, authorization, options);
611
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
612
+ },
613
+ /**
614
+ * 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.
615
+ * @summary Invite a customer to register
616
+ * @param {InviteCustomerRequestDto} inviteCustomerRequestDto
617
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
618
+ * @param {*} [options] Override http request option.
619
+ * @throws {RequiredError}
620
+ */
621
+ async inviteCustomer(inviteCustomerRequestDto: InviteCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InviteCustomerResponseClass>> {
622
+ const localVarAxiosArgs = await localVarAxiosParamCreator.inviteCustomer(inviteCustomerRequestDto, authorization, options);
623
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
624
+ },
625
+ /**
626
+ * List all the invoices of a customer
627
+ * @summary List invoices of a customer
628
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
629
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
630
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
631
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
632
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
633
+ * @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.
634
+ * @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.
635
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
636
+ * @param {*} [options] Override http request option.
637
+ * @throws {RequiredError}
638
+ */
639
+ async listInvoices(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListInvoicesResponseClass>> {
640
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options);
641
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
642
+ },
643
+ /**
644
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
645
+ * @summary List policies of a customer
646
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
647
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
648
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
649
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
650
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
651
+ * @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.
652
+ * @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.
653
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
654
+ * @param {*} [options] Override http request option.
655
+ * @throws {RequiredError}
656
+ */
657
+ async listPolicies(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPoliciesResponseClass>> {
658
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options);
659
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
660
+ },
661
+ /**
662
+ * Get new access token, refresh token after successful login.
663
+ * @summary Login by customer
664
+ * @param {LoginRequestDto} loginRequestDto
665
+ * @param {*} [options] Override http request option.
666
+ * @throws {RequiredError}
667
+ */
668
+ async login(loginRequestDto: LoginRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginResponseClass>> {
669
+ const localVarAxiosArgs = await localVarAxiosParamCreator.login(loginRequestDto, options);
670
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
671
+ },
672
+ /**
673
+ * Get new access token, new refresh token.
674
+ * @summary Refresh token by customer
675
+ * @param {RefreshTokenDto} refreshTokenDto
676
+ * @param {string} [cookie] HTTP only cookie that was sent during login.
677
+ * @param {*} [options] Override http request option.
678
+ * @throws {RequiredError}
679
+ */
680
+ async refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginResponseClass>> {
681
+ const localVarAxiosArgs = await localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options);
682
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
683
+ },
684
+ /**
685
+ * Change customer\'s password using the token provided by the reset password endpoint.
686
+ * @summary Change password by customer
687
+ * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ async resetPassword(resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
692
+ const localVarAxiosArgs = await localVarAxiosParamCreator.resetPassword(resetPasswordByCustomerRequestDto, options);
693
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
694
+ },
695
+ /**
696
+ * Verify the invite sent to the customer via email.
697
+ * @summary Verify customer\'s invite token
698
+ * @param {string} inviteToken Invite token sent to the customer
699
+ * @param {*} [options] Override http request option.
700
+ * @throws {RequiredError}
701
+ */
702
+ async verifyInvite(inviteToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyCustomerInviteResponseClass>> {
703
+ const localVarAxiosArgs = await localVarAxiosParamCreator.verifyInvite(inviteToken, options);
704
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
705
+ },
706
+ /**
707
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
708
+ * @summary Verify a reset password token
709
+ * @param {string} resetToken reset password token
710
+ * @param {*} [options] Override http request option.
711
+ * @throws {RequiredError}
712
+ */
713
+ async verifyResetPasswordToken(resetToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
714
+ const localVarAxiosArgs = await localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options);
715
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
716
+ },
717
+ }
718
+ };
719
+
720
+ /**
721
+ * CustomersApi - factory interface
722
+ * @export
723
+ */
724
+ export const CustomersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
725
+ const localVarFp = CustomersApiFp(configuration)
726
+ return {
727
+ /**
728
+ * 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.
729
+ * @summary Register a customer after invite
730
+ * @param {CreateCustomerRequestDto} createCustomerRequestDto
731
+ * @param {*} [options] Override http request option.
732
+ * @throws {RequiredError}
733
+ */
734
+ createCustomer(createCustomerRequestDto: CreateCustomerRequestDto, options?: any): AxiosPromise<CreateCustomerResponseClass> {
735
+ return localVarFp.createCustomer(createCustomerRequestDto, options).then((request) => request(axios, basePath));
736
+ },
737
+ /**
738
+ * Send a customer a reset-password token via email.
739
+ * @summary Forgot password by customer
740
+ * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
741
+ * @param {*} [options] Override http request option.
742
+ * @throws {RequiredError}
743
+ */
744
+ forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: any): AxiosPromise<void> {
745
+ return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then((request) => request(axios, basePath));
746
+ },
747
+ /**
748
+ * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
749
+ * @summary Get policy details
750
+ * @param {string} policyCode The policy code
751
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
752
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
753
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
754
+ * @param {*} [options] Override http request option.
755
+ * @throws {RequiredError}
756
+ */
757
+ getPolicy(policyCode: string, customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetPolicyResponseClass> {
758
+ return localVarFp.getPolicy(policyCode, customerCode, expand, authorization, options).then((request) => request(axios, basePath));
759
+ },
760
+ /**
761
+ * 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.
762
+ * @summary Invite a customer to register
763
+ * @param {InviteCustomerRequestDto} inviteCustomerRequestDto
764
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ */
768
+ inviteCustomer(inviteCustomerRequestDto: InviteCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<InviteCustomerResponseClass> {
769
+ return localVarFp.inviteCustomer(inviteCustomerRequestDto, authorization, options).then((request) => request(axios, basePath));
770
+ },
771
+ /**
772
+ * List all the invoices of a customer
773
+ * @summary List invoices of a customer
774
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
775
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
776
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
777
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
778
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
779
+ * @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.
780
+ * @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.
781
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
782
+ * @param {*} [options] Override http request option.
783
+ * @throws {RequiredError}
784
+ */
785
+ listInvoices(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<ListInvoicesResponseClass> {
786
+ return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then((request) => request(axios, basePath));
787
+ },
788
+ /**
789
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
790
+ * @summary List policies of a customer
791
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
792
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
793
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
794
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
795
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
796
+ * @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.
797
+ * @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.
798
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ listPolicies(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<ListPoliciesResponseClass> {
803
+ return localVarFp.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then((request) => request(axios, basePath));
804
+ },
805
+ /**
806
+ * Get new access token, refresh token after successful login.
807
+ * @summary Login by customer
808
+ * @param {LoginRequestDto} loginRequestDto
809
+ * @param {*} [options] Override http request option.
810
+ * @throws {RequiredError}
811
+ */
812
+ login(loginRequestDto: LoginRequestDto, options?: any): AxiosPromise<LoginResponseClass> {
813
+ return localVarFp.login(loginRequestDto, options).then((request) => request(axios, basePath));
814
+ },
815
+ /**
816
+ * Get new access token, new refresh token.
817
+ * @summary Refresh token by customer
818
+ * @param {RefreshTokenDto} refreshTokenDto
819
+ * @param {string} [cookie] HTTP only cookie that was sent during login.
820
+ * @param {*} [options] Override http request option.
821
+ * @throws {RequiredError}
822
+ */
823
+ refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: any): AxiosPromise<LoginResponseClass> {
824
+ return localVarFp.refreshToken(refreshTokenDto, cookie, options).then((request) => request(axios, basePath));
825
+ },
826
+ /**
827
+ * Change customer\'s password using the token provided by the reset password endpoint.
828
+ * @summary Change password by customer
829
+ * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
830
+ * @param {*} [options] Override http request option.
831
+ * @throws {RequiredError}
832
+ */
833
+ resetPassword(resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options?: any): AxiosPromise<void> {
834
+ return localVarFp.resetPassword(resetPasswordByCustomerRequestDto, options).then((request) => request(axios, basePath));
835
+ },
836
+ /**
837
+ * Verify the invite sent to the customer via email.
838
+ * @summary Verify customer\'s invite token
839
+ * @param {string} inviteToken Invite token sent to the customer
840
+ * @param {*} [options] Override http request option.
841
+ * @throws {RequiredError}
842
+ */
843
+ verifyInvite(inviteToken: string, options?: any): AxiosPromise<VerifyCustomerInviteResponseClass> {
844
+ return localVarFp.verifyInvite(inviteToken, options).then((request) => request(axios, basePath));
845
+ },
846
+ /**
847
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
848
+ * @summary Verify a reset password token
849
+ * @param {string} resetToken reset password token
850
+ * @param {*} [options] Override http request option.
851
+ * @throws {RequiredError}
852
+ */
853
+ verifyResetPasswordToken(resetToken: string, options?: any): AxiosPromise<void> {
854
+ return localVarFp.verifyResetPasswordToken(resetToken, options).then((request) => request(axios, basePath));
855
+ },
856
+ };
857
+ };
858
+
859
+ /**
860
+ * Request parameters for createCustomer operation in CustomersApi.
861
+ * @export
862
+ * @interface CustomersApiCreateCustomerRequest
863
+ */
864
+ export interface CustomersApiCreateCustomerRequest {
865
+ /**
866
+ *
867
+ * @type {CreateCustomerRequestDto}
868
+ * @memberof CustomersApiCreateCustomer
869
+ */
870
+ readonly createCustomerRequestDto: CreateCustomerRequestDto
871
+ }
872
+
873
+ /**
874
+ * Request parameters for forgotPassword operation in CustomersApi.
875
+ * @export
876
+ * @interface CustomersApiForgotPasswordRequest
877
+ */
878
+ export interface CustomersApiForgotPasswordRequest {
879
+ /**
880
+ *
881
+ * @type {ForgotPasswordRequestDto}
882
+ * @memberof CustomersApiForgotPassword
883
+ */
884
+ readonly forgotPasswordRequestDto: ForgotPasswordRequestDto
885
+ }
886
+
887
+ /**
888
+ * Request parameters for getPolicy operation in CustomersApi.
889
+ * @export
890
+ * @interface CustomersApiGetPolicyRequest
891
+ */
892
+ export interface CustomersApiGetPolicyRequest {
893
+ /**
894
+ * The policy code
895
+ * @type {string}
896
+ * @memberof CustomersApiGetPolicy
897
+ */
898
+ readonly policyCode: string
899
+
900
+ /**
901
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
902
+ * @type {string}
903
+ * @memberof CustomersApiGetPolicy
904
+ */
905
+ readonly customerCode: string
906
+
907
+ /**
908
+ * Fields to expand response by - [versions, premiumItems]
909
+ * @type {string}
910
+ * @memberof CustomersApiGetPolicy
911
+ */
912
+ readonly expand?: string
913
+
914
+ /**
915
+ * Bearer Token: provided by the login endpoint under the name accessToken.
916
+ * @type {string}
917
+ * @memberof CustomersApiGetPolicy
918
+ */
919
+ readonly authorization?: string
920
+ }
921
+
922
+ /**
923
+ * Request parameters for inviteCustomer operation in CustomersApi.
924
+ * @export
925
+ * @interface CustomersApiInviteCustomerRequest
926
+ */
927
+ export interface CustomersApiInviteCustomerRequest {
928
+ /**
929
+ *
930
+ * @type {InviteCustomerRequestDto}
931
+ * @memberof CustomersApiInviteCustomer
932
+ */
933
+ readonly inviteCustomerRequestDto: InviteCustomerRequestDto
934
+
935
+ /**
936
+ * Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
937
+ * @type {string}
938
+ * @memberof CustomersApiInviteCustomer
939
+ */
940
+ readonly authorization?: string
941
+ }
942
+
943
+ /**
944
+ * Request parameters for listInvoices operation in CustomersApi.
945
+ * @export
946
+ * @interface CustomersApiListInvoicesRequest
947
+ */
948
+ export interface CustomersApiListInvoicesRequest {
949
+ /**
950
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
951
+ * @type {string}
952
+ * @memberof CustomersApiListInvoices
953
+ */
954
+ readonly customerCode: string
955
+
956
+ /**
957
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
958
+ * @type {any}
959
+ * @memberof CustomersApiListInvoices
960
+ */
961
+ readonly pageSize?: any
962
+
963
+ /**
964
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
965
+ * @type {any}
966
+ * @memberof CustomersApiListInvoices
967
+ */
968
+ readonly pageToken?: any
969
+
970
+ /**
971
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
972
+ * @type {any}
973
+ * @memberof CustomersApiListInvoices
974
+ */
975
+ readonly filter?: any
976
+
977
+ /**
978
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
979
+ * @type {any}
980
+ * @memberof CustomersApiListInvoices
981
+ */
982
+ readonly search?: any
983
+
984
+ /**
985
+ * 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.
986
+ * @type {any}
987
+ * @memberof CustomersApiListInvoices
988
+ */
989
+ readonly order?: any
990
+
991
+ /**
992
+ * 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.
993
+ * @type {any}
994
+ * @memberof CustomersApiListInvoices
995
+ */
996
+ readonly expand?: any
997
+
998
+ /**
999
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1000
+ * @type {string}
1001
+ * @memberof CustomersApiListInvoices
1002
+ */
1003
+ readonly authorization?: string
1004
+ }
1005
+
1006
+ /**
1007
+ * Request parameters for listPolicies operation in CustomersApi.
1008
+ * @export
1009
+ * @interface CustomersApiListPoliciesRequest
1010
+ */
1011
+ export interface CustomersApiListPoliciesRequest {
1012
+ /**
1013
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
1014
+ * @type {string}
1015
+ * @memberof CustomersApiListPolicies
1016
+ */
1017
+ readonly customerCode: string
1018
+
1019
+ /**
1020
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
1021
+ * @type {any}
1022
+ * @memberof CustomersApiListPolicies
1023
+ */
1024
+ readonly pageSize?: any
1025
+
1026
+ /**
1027
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1028
+ * @type {any}
1029
+ * @memberof CustomersApiListPolicies
1030
+ */
1031
+ readonly pageToken?: any
1032
+
1033
+ /**
1034
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1035
+ * @type {any}
1036
+ * @memberof CustomersApiListPolicies
1037
+ */
1038
+ readonly filter?: any
1039
+
1040
+ /**
1041
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
1042
+ * @type {any}
1043
+ * @memberof CustomersApiListPolicies
1044
+ */
1045
+ readonly search?: any
1046
+
1047
+ /**
1048
+ * 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.
1049
+ * @type {any}
1050
+ * @memberof CustomersApiListPolicies
1051
+ */
1052
+ readonly order?: any
1053
+
1054
+ /**
1055
+ * 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.
1056
+ * @type {any}
1057
+ * @memberof CustomersApiListPolicies
1058
+ */
1059
+ readonly expand?: any
1060
+
1061
+ /**
1062
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1063
+ * @type {string}
1064
+ * @memberof CustomersApiListPolicies
1065
+ */
1066
+ readonly authorization?: string
1067
+ }
1068
+
1069
+ /**
1070
+ * Request parameters for login operation in CustomersApi.
1071
+ * @export
1072
+ * @interface CustomersApiLoginRequest
1073
+ */
1074
+ export interface CustomersApiLoginRequest {
1075
+ /**
1076
+ *
1077
+ * @type {LoginRequestDto}
1078
+ * @memberof CustomersApiLogin
1079
+ */
1080
+ readonly loginRequestDto: LoginRequestDto
1081
+ }
1082
+
1083
+ /**
1084
+ * Request parameters for refreshToken operation in CustomersApi.
1085
+ * @export
1086
+ * @interface CustomersApiRefreshTokenRequest
1087
+ */
1088
+ export interface CustomersApiRefreshTokenRequest {
1089
+ /**
1090
+ *
1091
+ * @type {RefreshTokenDto}
1092
+ * @memberof CustomersApiRefreshToken
1093
+ */
1094
+ readonly refreshTokenDto: RefreshTokenDto
1095
+
1096
+ /**
1097
+ * HTTP only cookie that was sent during login.
1098
+ * @type {string}
1099
+ * @memberof CustomersApiRefreshToken
1100
+ */
1101
+ readonly cookie?: string
1102
+ }
1103
+
1104
+ /**
1105
+ * Request parameters for resetPassword operation in CustomersApi.
1106
+ * @export
1107
+ * @interface CustomersApiResetPasswordRequest
1108
+ */
1109
+ export interface CustomersApiResetPasswordRequest {
1110
+ /**
1111
+ *
1112
+ * @type {ResetPasswordByCustomerRequestDto}
1113
+ * @memberof CustomersApiResetPassword
1114
+ */
1115
+ readonly resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto
1116
+ }
1117
+
1118
+ /**
1119
+ * Request parameters for verifyInvite operation in CustomersApi.
1120
+ * @export
1121
+ * @interface CustomersApiVerifyInviteRequest
1122
+ */
1123
+ export interface CustomersApiVerifyInviteRequest {
1124
+ /**
1125
+ * Invite token sent to the customer
1126
+ * @type {string}
1127
+ * @memberof CustomersApiVerifyInvite
1128
+ */
1129
+ readonly inviteToken: string
1130
+ }
1131
+
1132
+ /**
1133
+ * Request parameters for verifyResetPasswordToken operation in CustomersApi.
1134
+ * @export
1135
+ * @interface CustomersApiVerifyResetPasswordTokenRequest
1136
+ */
1137
+ export interface CustomersApiVerifyResetPasswordTokenRequest {
1138
+ /**
1139
+ * reset password token
1140
+ * @type {string}
1141
+ * @memberof CustomersApiVerifyResetPasswordToken
1142
+ */
1143
+ readonly resetToken: string
1144
+ }
1145
+
1146
+ /**
1147
+ * CustomersApi - object-oriented interface
1148
+ * @export
1149
+ * @class CustomersApi
1150
+ * @extends {BaseAPI}
1151
+ */
1152
+ export class CustomersApi extends BaseAPI {
1153
+ /**
1154
+ * 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.
1155
+ * @summary Register a customer after invite
1156
+ * @param {CustomersApiCreateCustomerRequest} requestParameters Request parameters.
1157
+ * @param {*} [options] Override http request option.
1158
+ * @throws {RequiredError}
1159
+ * @memberof CustomersApi
1160
+ */
1161
+ public createCustomer(requestParameters: CustomersApiCreateCustomerRequest, options?: AxiosRequestConfig) {
1162
+ return CustomersApiFp(this.configuration).createCustomer(requestParameters.createCustomerRequestDto, options).then((request) => request(this.axios, this.basePath));
1163
+ }
1164
+
1165
+ /**
1166
+ * Send a customer a reset-password token via email.
1167
+ * @summary Forgot password by customer
1168
+ * @param {CustomersApiForgotPasswordRequest} requestParameters Request parameters.
1169
+ * @param {*} [options] Override http request option.
1170
+ * @throws {RequiredError}
1171
+ * @memberof CustomersApi
1172
+ */
1173
+ public forgotPassword(requestParameters: CustomersApiForgotPasswordRequest, options?: AxiosRequestConfig) {
1174
+ return CustomersApiFp(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then((request) => request(this.axios, this.basePath));
1175
+ }
1176
+
1177
+ /**
1178
+ * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
1179
+ * @summary Get policy details
1180
+ * @param {CustomersApiGetPolicyRequest} requestParameters Request parameters.
1181
+ * @param {*} [options] Override http request option.
1182
+ * @throws {RequiredError}
1183
+ * @memberof CustomersApi
1184
+ */
1185
+ public getPolicy(requestParameters: CustomersApiGetPolicyRequest, options?: AxiosRequestConfig) {
1186
+ return CustomersApiFp(this.configuration).getPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1187
+ }
1188
+
1189
+ /**
1190
+ * 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.
1191
+ * @summary Invite a customer to register
1192
+ * @param {CustomersApiInviteCustomerRequest} requestParameters Request parameters.
1193
+ * @param {*} [options] Override http request option.
1194
+ * @throws {RequiredError}
1195
+ * @memberof CustomersApi
1196
+ */
1197
+ public inviteCustomer(requestParameters: CustomersApiInviteCustomerRequest, options?: AxiosRequestConfig) {
1198
+ return CustomersApiFp(this.configuration).inviteCustomer(requestParameters.inviteCustomerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1199
+ }
1200
+
1201
+ /**
1202
+ * List all the invoices of a customer
1203
+ * @summary List invoices of a customer
1204
+ * @param {CustomersApiListInvoicesRequest} requestParameters Request parameters.
1205
+ * @param {*} [options] Override http request option.
1206
+ * @throws {RequiredError}
1207
+ * @memberof CustomersApi
1208
+ */
1209
+ public listInvoices(requestParameters: CustomersApiListInvoicesRequest, options?: AxiosRequestConfig) {
1210
+ return CustomersApiFp(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1211
+ }
1212
+
1213
+ /**
1214
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
1215
+ * @summary List policies of a customer
1216
+ * @param {CustomersApiListPoliciesRequest} requestParameters Request parameters.
1217
+ * @param {*} [options] Override http request option.
1218
+ * @throws {RequiredError}
1219
+ * @memberof CustomersApi
1220
+ */
1221
+ public listPolicies(requestParameters: CustomersApiListPoliciesRequest, options?: AxiosRequestConfig) {
1222
+ return CustomersApiFp(this.configuration).listPolicies(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1223
+ }
1224
+
1225
+ /**
1226
+ * Get new access token, refresh token after successful login.
1227
+ * @summary Login by customer
1228
+ * @param {CustomersApiLoginRequest} requestParameters Request parameters.
1229
+ * @param {*} [options] Override http request option.
1230
+ * @throws {RequiredError}
1231
+ * @memberof CustomersApi
1232
+ */
1233
+ public login(requestParameters: CustomersApiLoginRequest, options?: AxiosRequestConfig) {
1234
+ return CustomersApiFp(this.configuration).login(requestParameters.loginRequestDto, options).then((request) => request(this.axios, this.basePath));
1235
+ }
1236
+
1237
+ /**
1238
+ * Get new access token, new refresh token.
1239
+ * @summary Refresh token by customer
1240
+ * @param {CustomersApiRefreshTokenRequest} requestParameters Request parameters.
1241
+ * @param {*} [options] Override http request option.
1242
+ * @throws {RequiredError}
1243
+ * @memberof CustomersApi
1244
+ */
1245
+ public refreshToken(requestParameters: CustomersApiRefreshTokenRequest, options?: AxiosRequestConfig) {
1246
+ return CustomersApiFp(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
1247
+ }
1248
+
1249
+ /**
1250
+ * Change customer\'s password using the token provided by the reset password endpoint.
1251
+ * @summary Change password by customer
1252
+ * @param {CustomersApiResetPasswordRequest} requestParameters Request parameters.
1253
+ * @param {*} [options] Override http request option.
1254
+ * @throws {RequiredError}
1255
+ * @memberof CustomersApi
1256
+ */
1257
+ public resetPassword(requestParameters: CustomersApiResetPasswordRequest, options?: AxiosRequestConfig) {
1258
+ return CustomersApiFp(this.configuration).resetPassword(requestParameters.resetPasswordByCustomerRequestDto, options).then((request) => request(this.axios, this.basePath));
1259
+ }
1260
+
1261
+ /**
1262
+ * Verify the invite sent to the customer via email.
1263
+ * @summary Verify customer\'s invite token
1264
+ * @param {CustomersApiVerifyInviteRequest} requestParameters Request parameters.
1265
+ * @param {*} [options] Override http request option.
1266
+ * @throws {RequiredError}
1267
+ * @memberof CustomersApi
1268
+ */
1269
+ public verifyInvite(requestParameters: CustomersApiVerifyInviteRequest, options?: AxiosRequestConfig) {
1270
+ return CustomersApiFp(this.configuration).verifyInvite(requestParameters.inviteToken, options).then((request) => request(this.axios, this.basePath));
1271
+ }
1272
+
1273
+ /**
1274
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1275
+ * @summary Verify a reset password token
1276
+ * @param {CustomersApiVerifyResetPasswordTokenRequest} requestParameters Request parameters.
1277
+ * @param {*} [options] Override http request option.
1278
+ * @throws {RequiredError}
1279
+ * @memberof CustomersApi
1280
+ */
1281
+ public verifyResetPasswordToken(requestParameters: CustomersApiVerifyResetPasswordTokenRequest, options?: AxiosRequestConfig) {
1282
+ return CustomersApiFp(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then((request) => request(this.axios, this.basePath));
1283
+ }
1284
+ }