@emilgroup/customer-sdk-node 1.57.1-beta.10 → 1.57.1-beta.13

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.
@@ -0,0 +1,2689 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { ChangeCustomerEmailRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { ChangePasswordRequestDto } from '../models';
27
+ // @ts-ignore
28
+ import { ChangePasswordResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { CompletePaymentSetupPspRequest } from '../models';
31
+ // @ts-ignore
32
+ import { CompletePaymentSetupResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { CreateCustomerRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { CreateCustomerResponseClass } from '../models';
37
+ // @ts-ignore
38
+ import { CreatePresignedPostResponseClass } from '../models';
39
+ // @ts-ignore
40
+ import { ForgotPasswordRequestDto } from '../models';
41
+ // @ts-ignore
42
+ import { GetCustomerDocumentDownloadUrlRequestDto } from '../models';
43
+ // @ts-ignore
44
+ import { GetCustomerDocumentDownloadUrlResponseClass } from '../models';
45
+ // @ts-ignore
46
+ import { GetCustomerResponseClass } from '../models';
47
+ // @ts-ignore
48
+ import { InitiateAuthRequestDto } from '../models';
49
+ // @ts-ignore
50
+ import { InitiateAuthResponseClass } from '../models';
51
+ // @ts-ignore
52
+ import { InitiatePaymentSetupRequestDto } from '../models';
53
+ // @ts-ignore
54
+ import { InitiatePaymentSetupResponseClass } from '../models';
55
+ // @ts-ignore
56
+ import { InviteByCustomerRequestDto } from '../models';
57
+ // @ts-ignore
58
+ import { InviteByCustomerResponseClass } from '../models';
59
+ // @ts-ignore
60
+ import { InviteByTenantRequestDto } from '../models';
61
+ // @ts-ignore
62
+ import { InviteByTenantResponseClass } from '../models';
63
+ // @ts-ignore
64
+ import { ListDocumentsResponseClass } from '../models';
65
+ // @ts-ignore
66
+ import { ListInvoicesResponseClass } from '../models';
67
+ // @ts-ignore
68
+ import { RefreshTokenDto } from '../models';
69
+ // @ts-ignore
70
+ import { RequestChangeEmailByCustomerRequestDto } from '../models';
71
+ // @ts-ignore
72
+ import { RequestChangeEmailByCustomerResponseClass } from '../models';
73
+ // @ts-ignore
74
+ import { ResetPasswordByCustomerRequestDto } from '../models';
75
+ // @ts-ignore
76
+ import { RespondToAuthChallengeClass } from '../models';
77
+ // @ts-ignore
78
+ import { RespondToAuthChallengeRequestDto } from '../models';
79
+ // @ts-ignore
80
+ import { UpdateCustomerRequestDto } from '../models';
81
+ // @ts-ignore
82
+ import { UpdateCustomerResponseClass } from '../models';
83
+ // @ts-ignore
84
+ import { UploadAccountDocumentsRequestDto } from '../models';
85
+ // @ts-ignore
86
+ import { VerifyChangeEmailTokenRequestDto } from '../models';
87
+ // @ts-ignore
88
+ import { VerifyChangeEmailTokenResponseClass } from '../models';
89
+ // @ts-ignore
90
+ import { VerifyCustomerInviteResponseClass } from '../models';
91
+ // @ts-ignore
92
+ import { VerifyResetPasswordTokenResponseClass } from '../models';
93
+ // URLSearchParams not necessarily used
94
+ // @ts-ignore
95
+ import { URL, URLSearchParams } from 'url';
96
+ const FormData = require('form-data');
97
+ /**
98
+ * CustomerControllerRestApi - axios parameter creator
99
+ * @export
100
+ */
101
+ export const CustomerControllerRestApiAxiosParamCreator = function (configuration?: Configuration) {
102
+ return {
103
+ /**
104
+ * Change customer\'s email using the token provided by the request email change endpoint.
105
+ * @summary Change customer email
106
+ * @param {ChangeCustomerEmailRequestDto} changeCustomerEmailRequestDto
107
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
108
+ * @param {*} [options] Override http request option.
109
+ * @throws {RequiredError}
110
+ */
111
+ changeCustomerEmail: async (changeCustomerEmailRequestDto: ChangeCustomerEmailRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
112
+ // verify required parameter 'changeCustomerEmailRequestDto' is not null or undefined
113
+ assertParamExists('changeCustomerEmail', 'changeCustomerEmailRequestDto', changeCustomerEmailRequestDto)
114
+ const localVarPath = `/v1/customers/change-email`;
115
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
116
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
117
+ let baseOptions;
118
+ let baseAccessToken;
119
+ if (configuration) {
120
+ baseOptions = configuration.baseOptions;
121
+ baseAccessToken = configuration.accessToken;
122
+ }
123
+
124
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
125
+ const localVarHeaderParameter = {} as any;
126
+ const localVarQueryParameter = {} as any;
127
+
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+
132
+
133
+
134
+ localVarHeaderParameter['Content-Type'] = 'application/json';
135
+
136
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
137
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
139
+ localVarRequestOptions.data = serializeDataIfNeeded(changeCustomerEmailRequestDto, localVarRequestOptions, configuration)
140
+
141
+ return {
142
+ url: toPathString(localVarUrlObj),
143
+ options: localVarRequestOptions,
144
+ };
145
+ },
146
+ /**
147
+ * Change the customer password. Please use forgot-password endpoint if current password is lost.
148
+ * @summary Change customer password
149
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
150
+ * @param {ChangePasswordRequestDto} changePasswordRequestDto
151
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ */
155
+ changePassword: async (customerCode: string, changePasswordRequestDto: ChangePasswordRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
156
+ // verify required parameter 'customerCode' is not null or undefined
157
+ assertParamExists('changePassword', 'customerCode', customerCode)
158
+ // verify required parameter 'changePasswordRequestDto' is not null or undefined
159
+ assertParamExists('changePassword', 'changePasswordRequestDto', changePasswordRequestDto)
160
+ const localVarPath = `/v1/customers/{customerCode}/change-password`
161
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
162
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
163
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
164
+ let baseOptions;
165
+ let baseAccessToken;
166
+ if (configuration) {
167
+ baseOptions = configuration.baseOptions;
168
+ baseAccessToken = configuration.accessToken;
169
+ }
170
+
171
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
172
+ const localVarHeaderParameter = {} as any;
173
+ const localVarQueryParameter = {} as any;
174
+
175
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
176
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
177
+ }
178
+
179
+
180
+
181
+ localVarHeaderParameter['Content-Type'] = 'application/json';
182
+
183
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
184
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
185
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
186
+ localVarRequestOptions.data = serializeDataIfNeeded(changePasswordRequestDto, localVarRequestOptions, configuration)
187
+
188
+ return {
189
+ url: toPathString(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ };
192
+ },
193
+ /**
194
+ * Request to complete a payment change by customer.
195
+ * @summary Request payment setup complete
196
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
197
+ * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
198
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
199
+ * @param {*} [options] Override http request option.
200
+ * @throws {RequiredError}
201
+ */
202
+ completePaymentSetup: async (customerCode: string, completePaymentSetupPspRequest: CompletePaymentSetupPspRequest, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
203
+ // verify required parameter 'customerCode' is not null or undefined
204
+ assertParamExists('completePaymentSetup', 'customerCode', customerCode)
205
+ // verify required parameter 'completePaymentSetupPspRequest' is not null or undefined
206
+ assertParamExists('completePaymentSetup', 'completePaymentSetupPspRequest', completePaymentSetupPspRequest)
207
+ const localVarPath = `/v1/customers/{customerCode}/payment_setup/complete`
208
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
209
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
210
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
211
+ let baseOptions;
212
+ let baseAccessToken;
213
+ if (configuration) {
214
+ baseOptions = configuration.baseOptions;
215
+ baseAccessToken = configuration.accessToken;
216
+ }
217
+
218
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
219
+ const localVarHeaderParameter = {} as any;
220
+ const localVarQueryParameter = {} as any;
221
+
222
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
223
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
224
+ }
225
+
226
+
227
+
228
+ localVarHeaderParameter['Content-Type'] = 'application/json';
229
+
230
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
231
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
232
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
233
+ localVarRequestOptions.data = serializeDataIfNeeded(completePaymentSetupPspRequest, localVarRequestOptions, configuration)
234
+
235
+ return {
236
+ url: toPathString(localVarUrlObj),
237
+ options: localVarRequestOptions,
238
+ };
239
+ },
240
+ /**
241
+ * 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.
242
+ * @summary Register a customer after invite
243
+ * @param {CreateCustomerRequestDto} createCustomerRequestDto
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ createCustomer: async (createCustomerRequestDto: CreateCustomerRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
248
+ // verify required parameter 'createCustomerRequestDto' is not null or undefined
249
+ assertParamExists('createCustomer', 'createCustomerRequestDto', createCustomerRequestDto)
250
+ const localVarPath = `/v1/customers/create`;
251
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
252
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
253
+ let baseOptions;
254
+ let baseAccessToken;
255
+ if (configuration) {
256
+ baseOptions = configuration.baseOptions;
257
+ baseAccessToken = configuration.accessToken;
258
+ }
259
+
260
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
261
+ const localVarHeaderParameter = {} as any;
262
+ const localVarQueryParameter = {} as any;
263
+
264
+
265
+
266
+ localVarHeaderParameter['Content-Type'] = 'application/json';
267
+
268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
271
+ localVarRequestOptions.data = serializeDataIfNeeded(createCustomerRequestDto, localVarRequestOptions, configuration)
272
+
273
+ return {
274
+ url: toPathString(localVarUrlObj),
275
+ options: localVarRequestOptions,
276
+ };
277
+ },
278
+ /**
279
+ * Send a customer a reset-password token via email.
280
+ * @summary Forgot password by customer
281
+ * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
282
+ * @param {*} [options] Override http request option.
283
+ * @throws {RequiredError}
284
+ */
285
+ forgotPassword: async (forgotPasswordRequestDto: ForgotPasswordRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
286
+ // verify required parameter 'forgotPasswordRequestDto' is not null or undefined
287
+ assertParamExists('forgotPassword', 'forgotPasswordRequestDto', forgotPasswordRequestDto)
288
+ const localVarPath = `/v1/customers/forgot-password`;
289
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
290
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
291
+ let baseOptions;
292
+ let baseAccessToken;
293
+ if (configuration) {
294
+ baseOptions = configuration.baseOptions;
295
+ baseAccessToken = configuration.accessToken;
296
+ }
297
+
298
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
299
+ const localVarHeaderParameter = {} as any;
300
+ const localVarQueryParameter = {} as any;
301
+
302
+
303
+
304
+ localVarHeaderParameter['Content-Type'] = 'application/json';
305
+
306
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
307
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
308
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
309
+ localVarRequestOptions.data = serializeDataIfNeeded(forgotPasswordRequestDto, localVarRequestOptions, configuration)
310
+
311
+ return {
312
+ url: toPathString(localVarUrlObj),
313
+ options: localVarRequestOptions,
314
+ };
315
+ },
316
+ /**
317
+ * Get customer details.
318
+ * @summary Get customer details
319
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
320
+ * @param {string} [expand] Fields to expand response by - [account]
321
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
322
+ * @param {*} [options] Override http request option.
323
+ * @throws {RequiredError}
324
+ */
325
+ getCustomer: async (customerCode: string, expand?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
326
+ // verify required parameter 'customerCode' is not null or undefined
327
+ assertParamExists('getCustomer', 'customerCode', customerCode)
328
+ const localVarPath = `/v1/customers/{customerCode}`
329
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
330
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
331
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
332
+ let baseOptions;
333
+ let baseAccessToken;
334
+ if (configuration) {
335
+ baseOptions = configuration.baseOptions;
336
+ baseAccessToken = configuration.accessToken;
337
+ }
338
+
339
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
340
+ const localVarHeaderParameter = {} as any;
341
+ const localVarQueryParameter = {} as any;
342
+
343
+ if (expand !== undefined) {
344
+ localVarQueryParameter['expand'] = expand;
345
+ }
346
+
347
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
348
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
349
+ }
350
+
351
+
352
+
353
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
354
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
355
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
356
+
357
+ return {
358
+ url: toPathString(localVarUrlObj),
359
+ options: localVarRequestOptions,
360
+ };
361
+ },
362
+ /**
363
+ * Get a presigned download url for document.
364
+ * @summary Get a download url for document
365
+ * @param {string} documentCode The document code.
366
+ * @param {string} customerCode
367
+ * @param {GetCustomerDocumentDownloadUrlRequestDto} [contentDisposition] Content disposition override. Default will be depending on the document type.
368
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ */
372
+ getCustomerDocumentDownloadUrl: async (documentCode: string, customerCode: string, contentDisposition?: GetCustomerDocumentDownloadUrlRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
373
+ // verify required parameter 'documentCode' is not null or undefined
374
+ assertParamExists('getCustomerDocumentDownloadUrl', 'documentCode', documentCode)
375
+ // verify required parameter 'customerCode' is not null or undefined
376
+ assertParamExists('getCustomerDocumentDownloadUrl', 'customerCode', customerCode)
377
+ const localVarPath = `/v1/customers/{customerCode}/documents/{documentCode}/download-url`
378
+ .replace(`{${"documentCode"}}`, encodeURIComponent(String(documentCode)))
379
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
380
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
381
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
382
+ let baseOptions;
383
+ let baseAccessToken;
384
+ if (configuration) {
385
+ baseOptions = configuration.baseOptions;
386
+ baseAccessToken = configuration.accessToken;
387
+ }
388
+
389
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
390
+ const localVarHeaderParameter = {} as any;
391
+ const localVarQueryParameter = {} as any;
392
+
393
+ if (contentDisposition !== undefined) {
394
+ localVarQueryParameter['contentDisposition'] = contentDisposition;
395
+ }
396
+
397
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
398
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
399
+ }
400
+
401
+
402
+
403
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
404
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
405
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
406
+
407
+ return {
408
+ url: toPathString(localVarUrlObj),
409
+ options: localVarRequestOptions,
410
+ };
411
+ },
412
+ /**
413
+ * Start auth process to get new access token, refresh token after successful login.
414
+ * @summary Initiate auth by customer
415
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ */
419
+ initiateAuth: async (initiateAuthRequestDto: InitiateAuthRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
420
+ // verify required parameter 'initiateAuthRequestDto' is not null or undefined
421
+ assertParamExists('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto)
422
+ const localVarPath = `/v1/customers/auth/initiate`;
423
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
424
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
425
+ let baseOptions;
426
+ let baseAccessToken;
427
+ if (configuration) {
428
+ baseOptions = configuration.baseOptions;
429
+ baseAccessToken = configuration.accessToken;
430
+ }
431
+
432
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
433
+ const localVarHeaderParameter = {} as any;
434
+ const localVarQueryParameter = {} as any;
435
+
436
+
437
+
438
+ localVarHeaderParameter['Content-Type'] = 'application/json';
439
+
440
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
441
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
442
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
443
+ localVarRequestOptions.data = serializeDataIfNeeded(initiateAuthRequestDto, localVarRequestOptions, configuration)
444
+
445
+ return {
446
+ url: toPathString(localVarUrlObj),
447
+ options: localVarRequestOptions,
448
+ };
449
+ },
450
+ /**
451
+ * Request to initiate a payment change by customer.
452
+ * @summary Request payment setup initiation
453
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
454
+ * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
455
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ initiatePaymentSetup: async (customerCode: string, initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
460
+ // verify required parameter 'customerCode' is not null or undefined
461
+ assertParamExists('initiatePaymentSetup', 'customerCode', customerCode)
462
+ // verify required parameter 'initiatePaymentSetupRequestDto' is not null or undefined
463
+ assertParamExists('initiatePaymentSetup', 'initiatePaymentSetupRequestDto', initiatePaymentSetupRequestDto)
464
+ const localVarPath = `/v1/customers/{customerCode}/payment_setup/initiate`
465
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
466
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
467
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
468
+ let baseOptions;
469
+ let baseAccessToken;
470
+ if (configuration) {
471
+ baseOptions = configuration.baseOptions;
472
+ baseAccessToken = configuration.accessToken;
473
+ }
474
+
475
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
476
+ const localVarHeaderParameter = {} as any;
477
+ const localVarQueryParameter = {} as any;
478
+
479
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
480
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
481
+ }
482
+
483
+
484
+
485
+ localVarHeaderParameter['Content-Type'] = 'application/json';
486
+
487
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
488
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
489
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
490
+ localVarRequestOptions.data = serializeDataIfNeeded(initiatePaymentSetupRequestDto, localVarRequestOptions, configuration)
491
+
492
+ return {
493
+ url: toPathString(localVarUrlObj),
494
+ options: localVarRequestOptions,
495
+ };
496
+ },
497
+ /**
498
+ * 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.
499
+ * @summary Invite a customer by self
500
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
501
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ */
505
+ inviteByCustomer: async (inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
506
+ // verify required parameter 'inviteByCustomerRequestDto' is not null or undefined
507
+ assertParamExists('inviteByCustomer', 'inviteByCustomerRequestDto', inviteByCustomerRequestDto)
508
+ const localVarPath = `/v1/customers/invites/by-customer`;
509
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
510
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
511
+ let baseOptions;
512
+ let baseAccessToken;
513
+ if (configuration) {
514
+ baseOptions = configuration.baseOptions;
515
+ baseAccessToken = configuration.accessToken;
516
+ }
517
+
518
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
519
+ const localVarHeaderParameter = {} as any;
520
+ const localVarQueryParameter = {} as any;
521
+
522
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
523
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
524
+ }
525
+
526
+
527
+
528
+ localVarHeaderParameter['Content-Type'] = 'application/json';
529
+
530
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
531
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
532
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
533
+ localVarRequestOptions.data = serializeDataIfNeeded(inviteByCustomerRequestDto, localVarRequestOptions, configuration)
534
+
535
+ return {
536
+ url: toPathString(localVarUrlObj),
537
+ options: localVarRequestOptions,
538
+ };
539
+ },
540
+ /**
541
+ * 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. **Required Permissions** \"customer-management.customers.create\"
542
+ * @summary Invite a customer by tenant
543
+ * @param {InviteByTenantRequestDto} inviteByTenantRequestDto
544
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ inviteByTenant: async (inviteByTenantRequestDto: InviteByTenantRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
549
+ // verify required parameter 'inviteByTenantRequestDto' is not null or undefined
550
+ assertParamExists('inviteByTenant', 'inviteByTenantRequestDto', inviteByTenantRequestDto)
551
+ const localVarPath = `/v1/customers/invites/by-tenant`;
552
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
553
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
554
+ let baseOptions;
555
+ let baseAccessToken;
556
+ if (configuration) {
557
+ baseOptions = configuration.baseOptions;
558
+ baseAccessToken = configuration.accessToken;
559
+ }
560
+
561
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
562
+ const localVarHeaderParameter = {} as any;
563
+ const localVarQueryParameter = {} as any;
564
+
565
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
566
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
567
+ }
568
+
569
+
570
+
571
+ localVarHeaderParameter['Content-Type'] = 'application/json';
572
+
573
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
574
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
575
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
576
+ localVarRequestOptions.data = serializeDataIfNeeded(inviteByTenantRequestDto, localVarRequestOptions, configuration)
577
+
578
+ return {
579
+ url: toPathString(localVarUrlObj),
580
+ options: localVarRequestOptions,
581
+ };
582
+ },
583
+ /**
584
+ * Get customer list.
585
+ * @summary Get customers list
586
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
587
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
588
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
589
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
590
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
591
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
592
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
593
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ */
597
+ listCustomers: async (pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
598
+ const localVarPath = `/v1/customers`;
599
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
600
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
601
+ let baseOptions;
602
+ let baseAccessToken;
603
+ if (configuration) {
604
+ baseOptions = configuration.baseOptions;
605
+ baseAccessToken = configuration.accessToken;
606
+ }
607
+
608
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
609
+ const localVarHeaderParameter = {} as any;
610
+ const localVarQueryParameter = {} as any;
611
+
612
+ if (pageSize !== undefined) {
613
+ localVarQueryParameter['pageSize'] = pageSize;
614
+ }
615
+
616
+ if (pageToken !== undefined) {
617
+ localVarQueryParameter['pageToken'] = pageToken;
618
+ }
619
+
620
+ if (filter !== undefined) {
621
+ localVarQueryParameter['filter'] = filter;
622
+ }
623
+
624
+ if (search !== undefined) {
625
+ localVarQueryParameter['search'] = search;
626
+ }
627
+
628
+ if (order !== undefined) {
629
+ localVarQueryParameter['order'] = order;
630
+ }
631
+
632
+ if (expand !== undefined) {
633
+ localVarQueryParameter['expand'] = expand;
634
+ }
635
+
636
+ if (filters !== undefined) {
637
+ localVarQueryParameter['filters'] = filters;
638
+ }
639
+
640
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
641
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
642
+ }
643
+
644
+
645
+
646
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
647
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
648
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
649
+
650
+ return {
651
+ url: toPathString(localVarUrlObj),
652
+ options: localVarRequestOptions,
653
+ };
654
+ },
655
+ /**
656
+ * List all the documents of a customer.
657
+ * @summary List documents of a customer
658
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
659
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
660
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
661
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
662
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
663
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
664
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
665
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
666
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
667
+ * @param {*} [options] Override http request option.
668
+ * @throws {RequiredError}
669
+ */
670
+ listDocuments: async (customerCode: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
671
+ // verify required parameter 'customerCode' is not null or undefined
672
+ assertParamExists('listDocuments', 'customerCode', customerCode)
673
+ const localVarPath = `/v1/customers/{customerCode}/documents`
674
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
675
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
676
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
677
+ let baseOptions;
678
+ let baseAccessToken;
679
+ if (configuration) {
680
+ baseOptions = configuration.baseOptions;
681
+ baseAccessToken = configuration.accessToken;
682
+ }
683
+
684
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
685
+ const localVarHeaderParameter = {} as any;
686
+ const localVarQueryParameter = {} as any;
687
+
688
+ if (pageSize !== undefined) {
689
+ localVarQueryParameter['pageSize'] = pageSize;
690
+ }
691
+
692
+ if (pageToken !== undefined) {
693
+ localVarQueryParameter['pageToken'] = pageToken;
694
+ }
695
+
696
+ if (filter !== undefined) {
697
+ localVarQueryParameter['filter'] = filter;
698
+ }
699
+
700
+ if (search !== undefined) {
701
+ localVarQueryParameter['search'] = search;
702
+ }
703
+
704
+ if (order !== undefined) {
705
+ localVarQueryParameter['order'] = order;
706
+ }
707
+
708
+ if (expand !== undefined) {
709
+ localVarQueryParameter['expand'] = expand;
710
+ }
711
+
712
+ if (filters !== undefined) {
713
+ localVarQueryParameter['filters'] = filters;
714
+ }
715
+
716
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
717
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
718
+ }
719
+
720
+
721
+
722
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
723
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
724
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
725
+
726
+ return {
727
+ url: toPathString(localVarUrlObj),
728
+ options: localVarRequestOptions,
729
+ };
730
+ },
731
+ /**
732
+ * List all the invoices of a customer.
733
+ * @summary List invoices of a customer
734
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
735
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
736
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
737
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
738
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
739
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
740
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
741
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
742
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
743
+ * @param {*} [options] Override http request option.
744
+ * @throws {RequiredError}
745
+ */
746
+ listInvoices: async (customerCode: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
747
+ // verify required parameter 'customerCode' is not null or undefined
748
+ assertParamExists('listInvoices', 'customerCode', customerCode)
749
+ const localVarPath = `/v1/customers/{customerCode}/invoices`
750
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
751
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
752
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
753
+ let baseOptions;
754
+ let baseAccessToken;
755
+ if (configuration) {
756
+ baseOptions = configuration.baseOptions;
757
+ baseAccessToken = configuration.accessToken;
758
+ }
759
+
760
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
761
+ const localVarHeaderParameter = {} as any;
762
+ const localVarQueryParameter = {} as any;
763
+
764
+ if (pageSize !== undefined) {
765
+ localVarQueryParameter['pageSize'] = pageSize;
766
+ }
767
+
768
+ if (pageToken !== undefined) {
769
+ localVarQueryParameter['pageToken'] = pageToken;
770
+ }
771
+
772
+ if (filter !== undefined) {
773
+ localVarQueryParameter['filter'] = filter;
774
+ }
775
+
776
+ if (search !== undefined) {
777
+ localVarQueryParameter['search'] = search;
778
+ }
779
+
780
+ if (order !== undefined) {
781
+ localVarQueryParameter['order'] = order;
782
+ }
783
+
784
+ if (expand !== undefined) {
785
+ localVarQueryParameter['expand'] = expand;
786
+ }
787
+
788
+ if (filters !== undefined) {
789
+ localVarQueryParameter['filters'] = filters;
790
+ }
791
+
792
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
793
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
794
+ }
795
+
796
+
797
+
798
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
799
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
800
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
801
+
802
+ return {
803
+ url: toPathString(localVarUrlObj),
804
+ options: localVarRequestOptions,
805
+ };
806
+ },
807
+ /**
808
+ * Get new access token, new refresh token.
809
+ * @summary Refresh token by customer
810
+ * @param {RefreshTokenDto} refreshTokenDto
811
+ * @param {string} [cookie] HTTP only cookie that was sent during login.
812
+ * @param {*} [options] Override http request option.
813
+ * @throws {RequiredError}
814
+ */
815
+ refreshToken: async (refreshTokenDto: RefreshTokenDto, cookie?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
816
+ // verify required parameter 'refreshTokenDto' is not null or undefined
817
+ assertParamExists('refreshToken', 'refreshTokenDto', refreshTokenDto)
818
+ const localVarPath = `/v1/customers/refresh-token`;
819
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
820
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
821
+ let baseOptions;
822
+ let baseAccessToken;
823
+ if (configuration) {
824
+ baseOptions = configuration.baseOptions;
825
+ baseAccessToken = configuration.accessToken;
826
+ }
827
+
828
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
829
+ const localVarHeaderParameter = {} as any;
830
+ const localVarQueryParameter = {} as any;
831
+
832
+ if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
833
+ localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
834
+ }
835
+
836
+
837
+
838
+ localVarHeaderParameter['Content-Type'] = 'application/json';
839
+
840
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
841
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
842
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
843
+ localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenDto, localVarRequestOptions, configuration)
844
+
845
+ return {
846
+ url: toPathString(localVarUrlObj),
847
+ options: localVarRequestOptions,
848
+ };
849
+ },
850
+ /**
851
+ * Request a token to change the email address for the customer.
852
+ * @summary Request customer email change
853
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
854
+ * @param {RequestChangeEmailByCustomerRequestDto} requestChangeEmailByCustomerRequestDto
855
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
856
+ * @param {*} [options] Override http request option.
857
+ * @throws {RequiredError}
858
+ */
859
+ requestChangeEmailByCustomer: async (customerCode: string, requestChangeEmailByCustomerRequestDto: RequestChangeEmailByCustomerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
860
+ // verify required parameter 'customerCode' is not null or undefined
861
+ assertParamExists('requestChangeEmailByCustomer', 'customerCode', customerCode)
862
+ // verify required parameter 'requestChangeEmailByCustomerRequestDto' is not null or undefined
863
+ assertParamExists('requestChangeEmailByCustomer', 'requestChangeEmailByCustomerRequestDto', requestChangeEmailByCustomerRequestDto)
864
+ const localVarPath = `/v1/customers/{customerCode}/request-email-change`
865
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
866
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
867
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
868
+ let baseOptions;
869
+ let baseAccessToken;
870
+ if (configuration) {
871
+ baseOptions = configuration.baseOptions;
872
+ baseAccessToken = configuration.accessToken;
873
+ }
874
+
875
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
876
+ const localVarHeaderParameter = {} as any;
877
+ const localVarQueryParameter = {} as any;
878
+
879
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
880
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
881
+ }
882
+
883
+
884
+
885
+ localVarHeaderParameter['Content-Type'] = 'application/json';
886
+
887
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
888
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
889
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
890
+ localVarRequestOptions.data = serializeDataIfNeeded(requestChangeEmailByCustomerRequestDto, localVarRequestOptions, configuration)
891
+
892
+ return {
893
+ url: toPathString(localVarUrlObj),
894
+ options: localVarRequestOptions,
895
+ };
896
+ },
897
+ /**
898
+ * Change customer\'s password using the token provided by the reset password endpoint.
899
+ * @summary Change password by customer
900
+ * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
901
+ * @param {*} [options] Override http request option.
902
+ * @throws {RequiredError}
903
+ */
904
+ resetPassword: async (resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
905
+ // verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
906
+ assertParamExists('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto)
907
+ const localVarPath = `/v1/customers/reset-password`;
908
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
909
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
910
+ let baseOptions;
911
+ let baseAccessToken;
912
+ if (configuration) {
913
+ baseOptions = configuration.baseOptions;
914
+ baseAccessToken = configuration.accessToken;
915
+ }
916
+
917
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
918
+ const localVarHeaderParameter = {} as any;
919
+ const localVarQueryParameter = {} as any;
920
+
921
+
922
+
923
+ localVarHeaderParameter['Content-Type'] = 'application/json';
924
+
925
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
926
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
927
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
928
+ localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration)
929
+
930
+ return {
931
+ url: toPathString(localVarUrlObj),
932
+ options: localVarRequestOptions,
933
+ };
934
+ },
935
+ /**
936
+ * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
937
+ * @summary Respond to auth challenge
938
+ * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
939
+ * @param {*} [options] Override http request option.
940
+ * @throws {RequiredError}
941
+ */
942
+ respondToAuthChallenge: async (respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
943
+ // verify required parameter 'respondToAuthChallengeRequestDto' is not null or undefined
944
+ assertParamExists('respondToAuthChallenge', 'respondToAuthChallengeRequestDto', respondToAuthChallengeRequestDto)
945
+ const localVarPath = `/v1/customers/auth/respond`;
946
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
947
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
948
+ let baseOptions;
949
+ let baseAccessToken;
950
+ if (configuration) {
951
+ baseOptions = configuration.baseOptions;
952
+ baseAccessToken = configuration.accessToken;
953
+ }
954
+
955
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
956
+ const localVarHeaderParameter = {} as any;
957
+ const localVarQueryParameter = {} as any;
958
+
959
+
960
+
961
+ localVarHeaderParameter['Content-Type'] = 'application/json';
962
+
963
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
964
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
965
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
966
+ localVarRequestOptions.data = serializeDataIfNeeded(respondToAuthChallengeRequestDto, localVarRequestOptions, configuration)
967
+
968
+ return {
969
+ url: toPathString(localVarUrlObj),
970
+ options: localVarRequestOptions,
971
+ };
972
+ },
973
+ /**
974
+ * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
975
+ * @summary Update customer details
976
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
977
+ * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
978
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
979
+ * @param {*} [options] Override http request option.
980
+ * @throws {RequiredError}
981
+ */
982
+ updateCustomer: async (customerCode: string, updateCustomerRequestDto: UpdateCustomerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
983
+ // verify required parameter 'customerCode' is not null or undefined
984
+ assertParamExists('updateCustomer', 'customerCode', customerCode)
985
+ // verify required parameter 'updateCustomerRequestDto' is not null or undefined
986
+ assertParamExists('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto)
987
+ const localVarPath = `/v1/customers/{customerCode}`
988
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
989
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
990
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
991
+ let baseOptions;
992
+ let baseAccessToken;
993
+ if (configuration) {
994
+ baseOptions = configuration.baseOptions;
995
+ baseAccessToken = configuration.accessToken;
996
+ }
997
+
998
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
999
+ const localVarHeaderParameter = {} as any;
1000
+ const localVarQueryParameter = {} as any;
1001
+
1002
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1003
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1004
+ }
1005
+
1006
+
1007
+
1008
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1009
+
1010
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1011
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1012
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1013
+ localVarRequestOptions.data = serializeDataIfNeeded(updateCustomerRequestDto, localVarRequestOptions, configuration)
1014
+
1015
+ return {
1016
+ url: toPathString(localVarUrlObj),
1017
+ options: localVarRequestOptions,
1018
+ };
1019
+ },
1020
+ /**
1021
+ * API to upload and attach documents to an account.
1022
+ * @summary Upload account documents
1023
+ * @param {string} customerCode
1024
+ * @param {UploadAccountDocumentsRequestDto} uploadAccountDocumentsRequestDto
1025
+ * @param {*} [options] Override http request option.
1026
+ * @throws {RequiredError}
1027
+ */
1028
+ uploadAccountDocuments: async (customerCode: string, uploadAccountDocumentsRequestDto: UploadAccountDocumentsRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
1029
+ // verify required parameter 'customerCode' is not null or undefined
1030
+ assertParamExists('uploadAccountDocuments', 'customerCode', customerCode)
1031
+ // verify required parameter 'uploadAccountDocumentsRequestDto' is not null or undefined
1032
+ assertParamExists('uploadAccountDocuments', 'uploadAccountDocumentsRequestDto', uploadAccountDocumentsRequestDto)
1033
+ const localVarPath = `/v1/customers/{customerCode}/documents`
1034
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
1035
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1036
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1037
+ let baseOptions;
1038
+ let baseAccessToken;
1039
+ if (configuration) {
1040
+ baseOptions = configuration.baseOptions;
1041
+ baseAccessToken = configuration.accessToken;
1042
+ }
1043
+
1044
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1045
+ const localVarHeaderParameter = {} as any;
1046
+ const localVarQueryParameter = {} as any;
1047
+
1048
+
1049
+
1050
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1051
+
1052
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1053
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1054
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1055
+ localVarRequestOptions.data = serializeDataIfNeeded(uploadAccountDocumentsRequestDto, localVarRequestOptions, configuration)
1056
+
1057
+ return {
1058
+ url: toPathString(localVarUrlObj),
1059
+ options: localVarRequestOptions,
1060
+ };
1061
+ },
1062
+ /**
1063
+ * Verify the change email token that is sent by calling the request change email endpoint.
1064
+ * @summary Verify the change email token
1065
+ * @param {VerifyChangeEmailTokenRequestDto} verifyChangeEmailTokenRequestDto
1066
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1067
+ * @param {*} [options] Override http request option.
1068
+ * @throws {RequiredError}
1069
+ */
1070
+ verifyChangeEmailToken: async (verifyChangeEmailTokenRequestDto: VerifyChangeEmailTokenRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
1071
+ // verify required parameter 'verifyChangeEmailTokenRequestDto' is not null or undefined
1072
+ assertParamExists('verifyChangeEmailToken', 'verifyChangeEmailTokenRequestDto', verifyChangeEmailTokenRequestDto)
1073
+ const localVarPath = `/v1/customers/verify-change-email`;
1074
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1075
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1076
+ let baseOptions;
1077
+ let baseAccessToken;
1078
+ if (configuration) {
1079
+ baseOptions = configuration.baseOptions;
1080
+ baseAccessToken = configuration.accessToken;
1081
+ }
1082
+
1083
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1084
+ const localVarHeaderParameter = {} as any;
1085
+ const localVarQueryParameter = {} as any;
1086
+
1087
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1088
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1089
+ }
1090
+
1091
+
1092
+
1093
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1094
+
1095
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1096
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1097
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1098
+ localVarRequestOptions.data = serializeDataIfNeeded(verifyChangeEmailTokenRequestDto, localVarRequestOptions, configuration)
1099
+
1100
+ return {
1101
+ url: toPathString(localVarUrlObj),
1102
+ options: localVarRequestOptions,
1103
+ };
1104
+ },
1105
+ /**
1106
+ * Verify the invite sent to the customer via email.
1107
+ * @summary Verify customer\'s invite token
1108
+ * @param {string} inviteToken Invite token sent to the customer
1109
+ * @param {*} [options] Override http request option.
1110
+ * @throws {RequiredError}
1111
+ */
1112
+ verifyInvite: async (inviteToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
1113
+ // verify required parameter 'inviteToken' is not null or undefined
1114
+ assertParamExists('verifyInvite', 'inviteToken', inviteToken)
1115
+ const localVarPath = `/v1/customers/invites/verify`;
1116
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1117
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1118
+ let baseOptions;
1119
+ let baseAccessToken;
1120
+ if (configuration) {
1121
+ baseOptions = configuration.baseOptions;
1122
+ baseAccessToken = configuration.accessToken;
1123
+ }
1124
+
1125
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1126
+ const localVarHeaderParameter = {} as any;
1127
+ const localVarQueryParameter = {} as any;
1128
+
1129
+ if (inviteToken !== undefined) {
1130
+ localVarQueryParameter['inviteToken'] = inviteToken;
1131
+ }
1132
+
1133
+
1134
+
1135
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1136
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1137
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1138
+
1139
+ return {
1140
+ url: toPathString(localVarUrlObj),
1141
+ options: localVarRequestOptions,
1142
+ };
1143
+ },
1144
+ /**
1145
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1146
+ * @summary Verify a reset password token
1147
+ * @param {string} resetToken reset password token
1148
+ * @param {*} [options] Override http request option.
1149
+ * @throws {RequiredError}
1150
+ */
1151
+ verifyResetPasswordToken: async (resetToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
1152
+ // verify required parameter 'resetToken' is not null or undefined
1153
+ assertParamExists('verifyResetPasswordToken', 'resetToken', resetToken)
1154
+ const localVarPath = `/v1/customers/verify-reset-password`;
1155
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1156
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1157
+ let baseOptions;
1158
+ let baseAccessToken;
1159
+ if (configuration) {
1160
+ baseOptions = configuration.baseOptions;
1161
+ baseAccessToken = configuration.accessToken;
1162
+ }
1163
+
1164
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1165
+ const localVarHeaderParameter = {} as any;
1166
+ const localVarQueryParameter = {} as any;
1167
+
1168
+ if (resetToken !== undefined) {
1169
+ localVarQueryParameter['resetToken'] = resetToken;
1170
+ }
1171
+
1172
+
1173
+
1174
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1175
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1176
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1177
+
1178
+ return {
1179
+ url: toPathString(localVarUrlObj),
1180
+ options: localVarRequestOptions,
1181
+ };
1182
+ },
1183
+ }
1184
+ };
1185
+
1186
+ /**
1187
+ * CustomerControllerRestApi - functional programming interface
1188
+ * @export
1189
+ */
1190
+ export const CustomerControllerRestApiFp = function(configuration?: Configuration) {
1191
+ const localVarAxiosParamCreator = CustomerControllerRestApiAxiosParamCreator(configuration)
1192
+ return {
1193
+ /**
1194
+ * Change customer\'s email using the token provided by the request email change endpoint.
1195
+ * @summary Change customer email
1196
+ * @param {ChangeCustomerEmailRequestDto} changeCustomerEmailRequestDto
1197
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1198
+ * @param {*} [options] Override http request option.
1199
+ * @throws {RequiredError}
1200
+ */
1201
+ async changeCustomerEmail(changeCustomerEmailRequestDto: ChangeCustomerEmailRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCustomerResponseClass>> {
1202
+ const localVarAxiosArgs = await localVarAxiosParamCreator.changeCustomerEmail(changeCustomerEmailRequestDto, authorization, options);
1203
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1204
+ },
1205
+ /**
1206
+ * Change the customer password. Please use forgot-password endpoint if current password is lost.
1207
+ * @summary Change customer password
1208
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1209
+ * @param {ChangePasswordRequestDto} changePasswordRequestDto
1210
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1211
+ * @param {*} [options] Override http request option.
1212
+ * @throws {RequiredError}
1213
+ */
1214
+ async changePassword(customerCode: string, changePasswordRequestDto: ChangePasswordRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChangePasswordResponseClass>> {
1215
+ const localVarAxiosArgs = await localVarAxiosParamCreator.changePassword(customerCode, changePasswordRequestDto, authorization, options);
1216
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1217
+ },
1218
+ /**
1219
+ * Request to complete a payment change by customer.
1220
+ * @summary Request payment setup complete
1221
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1222
+ * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
1223
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1224
+ * @param {*} [options] Override http request option.
1225
+ * @throws {RequiredError}
1226
+ */
1227
+ async completePaymentSetup(customerCode: string, completePaymentSetupPspRequest: CompletePaymentSetupPspRequest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompletePaymentSetupResponseClass>> {
1228
+ const localVarAxiosArgs = await localVarAxiosParamCreator.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options);
1229
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1230
+ },
1231
+ /**
1232
+ * 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.
1233
+ * @summary Register a customer after invite
1234
+ * @param {CreateCustomerRequestDto} createCustomerRequestDto
1235
+ * @param {*} [options] Override http request option.
1236
+ * @throws {RequiredError}
1237
+ */
1238
+ async createCustomer(createCustomerRequestDto: CreateCustomerRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCustomerResponseClass>> {
1239
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCustomer(createCustomerRequestDto, options);
1240
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1241
+ },
1242
+ /**
1243
+ * Send a customer a reset-password token via email.
1244
+ * @summary Forgot password by customer
1245
+ * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
1246
+ * @param {*} [options] Override http request option.
1247
+ * @throws {RequiredError}
1248
+ */
1249
+ async forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1250
+ const localVarAxiosArgs = await localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options);
1251
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1252
+ },
1253
+ /**
1254
+ * Get customer details.
1255
+ * @summary Get customer details
1256
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1257
+ * @param {string} [expand] Fields to expand response by - [account]
1258
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1259
+ * @param {*} [options] Override http request option.
1260
+ * @throws {RequiredError}
1261
+ */
1262
+ async getCustomer(customerCode: string, expand?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomerResponseClass>> {
1263
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options);
1264
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1265
+ },
1266
+ /**
1267
+ * Get a presigned download url for document.
1268
+ * @summary Get a download url for document
1269
+ * @param {string} documentCode The document code.
1270
+ * @param {string} customerCode
1271
+ * @param {GetCustomerDocumentDownloadUrlRequestDto} [contentDisposition] Content disposition override. Default will be depending on the document type.
1272
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1273
+ * @param {*} [options] Override http request option.
1274
+ * @throws {RequiredError}
1275
+ */
1276
+ async getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, contentDisposition?: GetCustomerDocumentDownloadUrlRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass>> {
1277
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerDocumentDownloadUrl(documentCode, customerCode, contentDisposition, authorization, options);
1278
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1279
+ },
1280
+ /**
1281
+ * Start auth process to get new access token, refresh token after successful login.
1282
+ * @summary Initiate auth by customer
1283
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
1284
+ * @param {*} [options] Override http request option.
1285
+ * @throws {RequiredError}
1286
+ */
1287
+ async initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateAuthResponseClass>> {
1288
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options);
1289
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1290
+ },
1291
+ /**
1292
+ * Request to initiate a payment change by customer.
1293
+ * @summary Request payment setup initiation
1294
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1295
+ * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
1296
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1297
+ * @param {*} [options] Override http request option.
1298
+ * @throws {RequiredError}
1299
+ */
1300
+ async initiatePaymentSetup(customerCode: string, initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiatePaymentSetupResponseClass>> {
1301
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePaymentSetup(customerCode, initiatePaymentSetupRequestDto, authorization, options);
1302
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1303
+ },
1304
+ /**
1305
+ * 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.
1306
+ * @summary Invite a customer by self
1307
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1308
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1309
+ * @param {*} [options] Override http request option.
1310
+ * @throws {RequiredError}
1311
+ */
1312
+ async inviteByCustomer(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InviteByCustomerResponseClass>> {
1313
+ const localVarAxiosArgs = await localVarAxiosParamCreator.inviteByCustomer(inviteByCustomerRequestDto, authorization, options);
1314
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1315
+ },
1316
+ /**
1317
+ * 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. **Required Permissions** \"customer-management.customers.create\"
1318
+ * @summary Invite a customer by tenant
1319
+ * @param {InviteByTenantRequestDto} inviteByTenantRequestDto
1320
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1321
+ * @param {*} [options] Override http request option.
1322
+ * @throws {RequiredError}
1323
+ */
1324
+ async inviteByTenant(inviteByTenantRequestDto: InviteByTenantRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InviteByTenantResponseClass>> {
1325
+ const localVarAxiosArgs = await localVarAxiosParamCreator.inviteByTenant(inviteByTenantRequestDto, authorization, options);
1326
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1327
+ },
1328
+ /**
1329
+ * Get customer list.
1330
+ * @summary Get customers list
1331
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1332
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1333
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1334
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1335
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
1336
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
1337
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
1338
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1339
+ * @param {*} [options] Override http request option.
1340
+ * @throws {RequiredError}
1341
+ */
1342
+ async listCustomers(pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
1343
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCustomers(pageSize, pageToken, filter, search, order, expand, filters, authorization, options);
1344
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1345
+ },
1346
+ /**
1347
+ * List all the documents of a customer.
1348
+ * @summary List documents of a customer
1349
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1350
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1351
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1352
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1353
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1354
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
1355
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
1356
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
1357
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1358
+ * @param {*} [options] Override http request option.
1359
+ * @throws {RequiredError}
1360
+ */
1361
+ async listDocuments(customerCode: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListDocumentsResponseClass>> {
1362
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options);
1363
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1364
+ },
1365
+ /**
1366
+ * List all the invoices of a customer.
1367
+ * @summary List invoices of a customer
1368
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1369
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1370
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1371
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1372
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1373
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
1374
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
1375
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
1376
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1377
+ * @param {*} [options] Override http request option.
1378
+ * @throws {RequiredError}
1379
+ */
1380
+ async listInvoices(customerCode: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListInvoicesResponseClass>> {
1381
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options);
1382
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1383
+ },
1384
+ /**
1385
+ * Get new access token, new refresh token.
1386
+ * @summary Refresh token by customer
1387
+ * @param {RefreshTokenDto} refreshTokenDto
1388
+ * @param {string} [cookie] HTTP only cookie that was sent during login.
1389
+ * @param {*} [options] Override http request option.
1390
+ * @throws {RequiredError}
1391
+ */
1392
+ async refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1393
+ const localVarAxiosArgs = await localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options);
1394
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1395
+ },
1396
+ /**
1397
+ * Request a token to change the email address for the customer.
1398
+ * @summary Request customer email change
1399
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1400
+ * @param {RequestChangeEmailByCustomerRequestDto} requestChangeEmailByCustomerRequestDto
1401
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1402
+ * @param {*} [options] Override http request option.
1403
+ * @throws {RequiredError}
1404
+ */
1405
+ async requestChangeEmailByCustomer(customerCode: string, requestChangeEmailByCustomerRequestDto: RequestChangeEmailByCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestChangeEmailByCustomerResponseClass>> {
1406
+ const localVarAxiosArgs = await localVarAxiosParamCreator.requestChangeEmailByCustomer(customerCode, requestChangeEmailByCustomerRequestDto, authorization, options);
1407
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1408
+ },
1409
+ /**
1410
+ * Change customer\'s password using the token provided by the reset password endpoint.
1411
+ * @summary Change password by customer
1412
+ * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
1413
+ * @param {*} [options] Override http request option.
1414
+ * @throws {RequiredError}
1415
+ */
1416
+ async resetPassword(resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1417
+ const localVarAxiosArgs = await localVarAxiosParamCreator.resetPassword(resetPasswordByCustomerRequestDto, options);
1418
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1419
+ },
1420
+ /**
1421
+ * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
1422
+ * @summary Respond to auth challenge
1423
+ * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
1424
+ * @param {*} [options] Override http request option.
1425
+ * @throws {RequiredError}
1426
+ */
1427
+ async respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RespondToAuthChallengeClass>> {
1428
+ const localVarAxiosArgs = await localVarAxiosParamCreator.respondToAuthChallenge(respondToAuthChallengeRequestDto, options);
1429
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1430
+ },
1431
+ /**
1432
+ * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
1433
+ * @summary Update customer details
1434
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1435
+ * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1436
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1437
+ * @param {*} [options] Override http request option.
1438
+ * @throws {RequiredError}
1439
+ */
1440
+ async updateCustomer(customerCode: string, updateCustomerRequestDto: UpdateCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCustomerResponseClass>> {
1441
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options);
1442
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1443
+ },
1444
+ /**
1445
+ * API to upload and attach documents to an account.
1446
+ * @summary Upload account documents
1447
+ * @param {string} customerCode
1448
+ * @param {UploadAccountDocumentsRequestDto} uploadAccountDocumentsRequestDto
1449
+ * @param {*} [options] Override http request option.
1450
+ * @throws {RequiredError}
1451
+ */
1452
+ async uploadAccountDocuments(customerCode: string, uploadAccountDocumentsRequestDto: UploadAccountDocumentsRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePresignedPostResponseClass>> {
1453
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadAccountDocuments(customerCode, uploadAccountDocumentsRequestDto, options);
1454
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1455
+ },
1456
+ /**
1457
+ * Verify the change email token that is sent by calling the request change email endpoint.
1458
+ * @summary Verify the change email token
1459
+ * @param {VerifyChangeEmailTokenRequestDto} verifyChangeEmailTokenRequestDto
1460
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1461
+ * @param {*} [options] Override http request option.
1462
+ * @throws {RequiredError}
1463
+ */
1464
+ async verifyChangeEmailToken(verifyChangeEmailTokenRequestDto: VerifyChangeEmailTokenRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyChangeEmailTokenResponseClass>> {
1465
+ const localVarAxiosArgs = await localVarAxiosParamCreator.verifyChangeEmailToken(verifyChangeEmailTokenRequestDto, authorization, options);
1466
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1467
+ },
1468
+ /**
1469
+ * Verify the invite sent to the customer via email.
1470
+ * @summary Verify customer\'s invite token
1471
+ * @param {string} inviteToken Invite token sent to the customer
1472
+ * @param {*} [options] Override http request option.
1473
+ * @throws {RequiredError}
1474
+ */
1475
+ async verifyInvite(inviteToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyCustomerInviteResponseClass>> {
1476
+ const localVarAxiosArgs = await localVarAxiosParamCreator.verifyInvite(inviteToken, options);
1477
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1478
+ },
1479
+ /**
1480
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1481
+ * @summary Verify a reset password token
1482
+ * @param {string} resetToken reset password token
1483
+ * @param {*} [options] Override http request option.
1484
+ * @throws {RequiredError}
1485
+ */
1486
+ async verifyResetPasswordToken(resetToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerifyResetPasswordTokenResponseClass>> {
1487
+ const localVarAxiosArgs = await localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options);
1488
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1489
+ },
1490
+ }
1491
+ };
1492
+
1493
+ /**
1494
+ * CustomerControllerRestApi - factory interface
1495
+ * @export
1496
+ */
1497
+ export const CustomerControllerRestApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1498
+ const localVarFp = CustomerControllerRestApiFp(configuration)
1499
+ return {
1500
+ /**
1501
+ * Change customer\'s email using the token provided by the request email change endpoint.
1502
+ * @summary Change customer email
1503
+ * @param {ChangeCustomerEmailRequestDto} changeCustomerEmailRequestDto
1504
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1505
+ * @param {*} [options] Override http request option.
1506
+ * @throws {RequiredError}
1507
+ */
1508
+ changeCustomerEmail(changeCustomerEmailRequestDto: ChangeCustomerEmailRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateCustomerResponseClass> {
1509
+ return localVarFp.changeCustomerEmail(changeCustomerEmailRequestDto, authorization, options).then((request) => request(axios, basePath));
1510
+ },
1511
+ /**
1512
+ * Change the customer password. Please use forgot-password endpoint if current password is lost.
1513
+ * @summary Change customer password
1514
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1515
+ * @param {ChangePasswordRequestDto} changePasswordRequestDto
1516
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1517
+ * @param {*} [options] Override http request option.
1518
+ * @throws {RequiredError}
1519
+ */
1520
+ changePassword(customerCode: string, changePasswordRequestDto: ChangePasswordRequestDto, authorization?: string, options?: any): AxiosPromise<ChangePasswordResponseClass> {
1521
+ return localVarFp.changePassword(customerCode, changePasswordRequestDto, authorization, options).then((request) => request(axios, basePath));
1522
+ },
1523
+ /**
1524
+ * Request to complete a payment change by customer.
1525
+ * @summary Request payment setup complete
1526
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1527
+ * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
1528
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1529
+ * @param {*} [options] Override http request option.
1530
+ * @throws {RequiredError}
1531
+ */
1532
+ completePaymentSetup(customerCode: string, completePaymentSetupPspRequest: CompletePaymentSetupPspRequest, authorization?: string, options?: any): AxiosPromise<CompletePaymentSetupResponseClass> {
1533
+ return localVarFp.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options).then((request) => request(axios, basePath));
1534
+ },
1535
+ /**
1536
+ * 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.
1537
+ * @summary Register a customer after invite
1538
+ * @param {CreateCustomerRequestDto} createCustomerRequestDto
1539
+ * @param {*} [options] Override http request option.
1540
+ * @throws {RequiredError}
1541
+ */
1542
+ createCustomer(createCustomerRequestDto: CreateCustomerRequestDto, options?: any): AxiosPromise<CreateCustomerResponseClass> {
1543
+ return localVarFp.createCustomer(createCustomerRequestDto, options).then((request) => request(axios, basePath));
1544
+ },
1545
+ /**
1546
+ * Send a customer a reset-password token via email.
1547
+ * @summary Forgot password by customer
1548
+ * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
1549
+ * @param {*} [options] Override http request option.
1550
+ * @throws {RequiredError}
1551
+ */
1552
+ forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: any): AxiosPromise<void> {
1553
+ return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then((request) => request(axios, basePath));
1554
+ },
1555
+ /**
1556
+ * Get customer details.
1557
+ * @summary Get customer details
1558
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1559
+ * @param {string} [expand] Fields to expand response by - [account]
1560
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1561
+ * @param {*} [options] Override http request option.
1562
+ * @throws {RequiredError}
1563
+ */
1564
+ getCustomer(customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetCustomerResponseClass> {
1565
+ return localVarFp.getCustomer(customerCode, expand, authorization, options).then((request) => request(axios, basePath));
1566
+ },
1567
+ /**
1568
+ * Get a presigned download url for document.
1569
+ * @summary Get a download url for document
1570
+ * @param {string} documentCode The document code.
1571
+ * @param {string} customerCode
1572
+ * @param {GetCustomerDocumentDownloadUrlRequestDto} [contentDisposition] Content disposition override. Default will be depending on the document type.
1573
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1574
+ * @param {*} [options] Override http request option.
1575
+ * @throws {RequiredError}
1576
+ */
1577
+ getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, contentDisposition?: GetCustomerDocumentDownloadUrlRequestDto, authorization?: string, options?: any): AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass> {
1578
+ return localVarFp.getCustomerDocumentDownloadUrl(documentCode, customerCode, contentDisposition, authorization, options).then((request) => request(axios, basePath));
1579
+ },
1580
+ /**
1581
+ * Start auth process to get new access token, refresh token after successful login.
1582
+ * @summary Initiate auth by customer
1583
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
1584
+ * @param {*} [options] Override http request option.
1585
+ * @throws {RequiredError}
1586
+ */
1587
+ initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: any): AxiosPromise<InitiateAuthResponseClass> {
1588
+ return localVarFp.initiateAuth(initiateAuthRequestDto, options).then((request) => request(axios, basePath));
1589
+ },
1590
+ /**
1591
+ * Request to initiate a payment change by customer.
1592
+ * @summary Request payment setup initiation
1593
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1594
+ * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
1595
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1596
+ * @param {*} [options] Override http request option.
1597
+ * @throws {RequiredError}
1598
+ */
1599
+ initiatePaymentSetup(customerCode: string, initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<InitiatePaymentSetupResponseClass> {
1600
+ return localVarFp.initiatePaymentSetup(customerCode, initiatePaymentSetupRequestDto, authorization, options).then((request) => request(axios, basePath));
1601
+ },
1602
+ /**
1603
+ * 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.
1604
+ * @summary Invite a customer by self
1605
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1606
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1607
+ * @param {*} [options] Override http request option.
1608
+ * @throws {RequiredError}
1609
+ */
1610
+ inviteByCustomer(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<InviteByCustomerResponseClass> {
1611
+ return localVarFp.inviteByCustomer(inviteByCustomerRequestDto, authorization, options).then((request) => request(axios, basePath));
1612
+ },
1613
+ /**
1614
+ * 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. **Required Permissions** \"customer-management.customers.create\"
1615
+ * @summary Invite a customer by tenant
1616
+ * @param {InviteByTenantRequestDto} inviteByTenantRequestDto
1617
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1618
+ * @param {*} [options] Override http request option.
1619
+ * @throws {RequiredError}
1620
+ */
1621
+ inviteByTenant(inviteByTenantRequestDto: InviteByTenantRequestDto, authorization?: string, options?: any): AxiosPromise<InviteByTenantResponseClass> {
1622
+ return localVarFp.inviteByTenant(inviteByTenantRequestDto, authorization, options).then((request) => request(axios, basePath));
1623
+ },
1624
+ /**
1625
+ * Get customer list.
1626
+ * @summary Get customers list
1627
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1628
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1629
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1630
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1631
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
1632
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
1633
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
1634
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1635
+ * @param {*} [options] Override http request option.
1636
+ * @throws {RequiredError}
1637
+ */
1638
+ listCustomers(pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options?: any): AxiosPromise<object> {
1639
+ return localVarFp.listCustomers(pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then((request) => request(axios, basePath));
1640
+ },
1641
+ /**
1642
+ * List all the documents of a customer.
1643
+ * @summary List documents of a customer
1644
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1645
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1646
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1647
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1648
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1649
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
1650
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
1651
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
1652
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1653
+ * @param {*} [options] Override http request option.
1654
+ * @throws {RequiredError}
1655
+ */
1656
+ listDocuments(customerCode: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options?: any): AxiosPromise<ListDocumentsResponseClass> {
1657
+ return localVarFp.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then((request) => request(axios, basePath));
1658
+ },
1659
+ /**
1660
+ * List all the invoices of a customer.
1661
+ * @summary List invoices of a customer
1662
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1663
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1664
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
1665
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1666
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1667
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
1668
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
1669
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
1670
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1671
+ * @param {*} [options] Override http request option.
1672
+ * @throws {RequiredError}
1673
+ */
1674
+ listInvoices(customerCode: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, authorization?: string, options?: any): AxiosPromise<ListInvoicesResponseClass> {
1675
+ return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then((request) => request(axios, basePath));
1676
+ },
1677
+ /**
1678
+ * Get new access token, new refresh token.
1679
+ * @summary Refresh token by customer
1680
+ * @param {RefreshTokenDto} refreshTokenDto
1681
+ * @param {string} [cookie] HTTP only cookie that was sent during login.
1682
+ * @param {*} [options] Override http request option.
1683
+ * @throws {RequiredError}
1684
+ */
1685
+ refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: any): AxiosPromise<void> {
1686
+ return localVarFp.refreshToken(refreshTokenDto, cookie, options).then((request) => request(axios, basePath));
1687
+ },
1688
+ /**
1689
+ * Request a token to change the email address for the customer.
1690
+ * @summary Request customer email change
1691
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1692
+ * @param {RequestChangeEmailByCustomerRequestDto} requestChangeEmailByCustomerRequestDto
1693
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1694
+ * @param {*} [options] Override http request option.
1695
+ * @throws {RequiredError}
1696
+ */
1697
+ requestChangeEmailByCustomer(customerCode: string, requestChangeEmailByCustomerRequestDto: RequestChangeEmailByCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<RequestChangeEmailByCustomerResponseClass> {
1698
+ return localVarFp.requestChangeEmailByCustomer(customerCode, requestChangeEmailByCustomerRequestDto, authorization, options).then((request) => request(axios, basePath));
1699
+ },
1700
+ /**
1701
+ * Change customer\'s password using the token provided by the reset password endpoint.
1702
+ * @summary Change password by customer
1703
+ * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
1704
+ * @param {*} [options] Override http request option.
1705
+ * @throws {RequiredError}
1706
+ */
1707
+ resetPassword(resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options?: any): AxiosPromise<void> {
1708
+ return localVarFp.resetPassword(resetPasswordByCustomerRequestDto, options).then((request) => request(axios, basePath));
1709
+ },
1710
+ /**
1711
+ * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
1712
+ * @summary Respond to auth challenge
1713
+ * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
1714
+ * @param {*} [options] Override http request option.
1715
+ * @throws {RequiredError}
1716
+ */
1717
+ respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: any): AxiosPromise<RespondToAuthChallengeClass> {
1718
+ return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then((request) => request(axios, basePath));
1719
+ },
1720
+ /**
1721
+ * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
1722
+ * @summary Update customer details
1723
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1724
+ * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1725
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1726
+ * @param {*} [options] Override http request option.
1727
+ * @throws {RequiredError}
1728
+ */
1729
+ updateCustomer(customerCode: string, updateCustomerRequestDto: UpdateCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateCustomerResponseClass> {
1730
+ return localVarFp.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options).then((request) => request(axios, basePath));
1731
+ },
1732
+ /**
1733
+ * API to upload and attach documents to an account.
1734
+ * @summary Upload account documents
1735
+ * @param {string} customerCode
1736
+ * @param {UploadAccountDocumentsRequestDto} uploadAccountDocumentsRequestDto
1737
+ * @param {*} [options] Override http request option.
1738
+ * @throws {RequiredError}
1739
+ */
1740
+ uploadAccountDocuments(customerCode: string, uploadAccountDocumentsRequestDto: UploadAccountDocumentsRequestDto, options?: any): AxiosPromise<CreatePresignedPostResponseClass> {
1741
+ return localVarFp.uploadAccountDocuments(customerCode, uploadAccountDocumentsRequestDto, options).then((request) => request(axios, basePath));
1742
+ },
1743
+ /**
1744
+ * Verify the change email token that is sent by calling the request change email endpoint.
1745
+ * @summary Verify the change email token
1746
+ * @param {VerifyChangeEmailTokenRequestDto} verifyChangeEmailTokenRequestDto
1747
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1748
+ * @param {*} [options] Override http request option.
1749
+ * @throws {RequiredError}
1750
+ */
1751
+ verifyChangeEmailToken(verifyChangeEmailTokenRequestDto: VerifyChangeEmailTokenRequestDto, authorization?: string, options?: any): AxiosPromise<VerifyChangeEmailTokenResponseClass> {
1752
+ return localVarFp.verifyChangeEmailToken(verifyChangeEmailTokenRequestDto, authorization, options).then((request) => request(axios, basePath));
1753
+ },
1754
+ /**
1755
+ * Verify the invite sent to the customer via email.
1756
+ * @summary Verify customer\'s invite token
1757
+ * @param {string} inviteToken Invite token sent to the customer
1758
+ * @param {*} [options] Override http request option.
1759
+ * @throws {RequiredError}
1760
+ */
1761
+ verifyInvite(inviteToken: string, options?: any): AxiosPromise<VerifyCustomerInviteResponseClass> {
1762
+ return localVarFp.verifyInvite(inviteToken, options).then((request) => request(axios, basePath));
1763
+ },
1764
+ /**
1765
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1766
+ * @summary Verify a reset password token
1767
+ * @param {string} resetToken reset password token
1768
+ * @param {*} [options] Override http request option.
1769
+ * @throws {RequiredError}
1770
+ */
1771
+ verifyResetPasswordToken(resetToken: string, options?: any): AxiosPromise<VerifyResetPasswordTokenResponseClass> {
1772
+ return localVarFp.verifyResetPasswordToken(resetToken, options).then((request) => request(axios, basePath));
1773
+ },
1774
+ };
1775
+ };
1776
+
1777
+ /**
1778
+ * Request parameters for changeCustomerEmail operation in CustomerControllerRestApi.
1779
+ * @export
1780
+ * @interface CustomerControllerRestApiChangeCustomerEmailRequest
1781
+ */
1782
+ export interface CustomerControllerRestApiChangeCustomerEmailRequest {
1783
+ /**
1784
+ *
1785
+ * @type {ChangeCustomerEmailRequestDto}
1786
+ * @memberof CustomerControllerRestApiChangeCustomerEmail
1787
+ */
1788
+ readonly changeCustomerEmailRequestDto: ChangeCustomerEmailRequestDto
1789
+
1790
+ /**
1791
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1792
+ * @type {string}
1793
+ * @memberof CustomerControllerRestApiChangeCustomerEmail
1794
+ */
1795
+ readonly authorization?: string
1796
+ }
1797
+
1798
+ /**
1799
+ * Request parameters for changePassword operation in CustomerControllerRestApi.
1800
+ * @export
1801
+ * @interface CustomerControllerRestApiChangePasswordRequest
1802
+ */
1803
+ export interface CustomerControllerRestApiChangePasswordRequest {
1804
+ /**
1805
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
1806
+ * @type {string}
1807
+ * @memberof CustomerControllerRestApiChangePassword
1808
+ */
1809
+ readonly customerCode: string
1810
+
1811
+ /**
1812
+ *
1813
+ * @type {ChangePasswordRequestDto}
1814
+ * @memberof CustomerControllerRestApiChangePassword
1815
+ */
1816
+ readonly changePasswordRequestDto: ChangePasswordRequestDto
1817
+
1818
+ /**
1819
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1820
+ * @type {string}
1821
+ * @memberof CustomerControllerRestApiChangePassword
1822
+ */
1823
+ readonly authorization?: string
1824
+ }
1825
+
1826
+ /**
1827
+ * Request parameters for completePaymentSetup operation in CustomerControllerRestApi.
1828
+ * @export
1829
+ * @interface CustomerControllerRestApiCompletePaymentSetupRequest
1830
+ */
1831
+ export interface CustomerControllerRestApiCompletePaymentSetupRequest {
1832
+ /**
1833
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
1834
+ * @type {string}
1835
+ * @memberof CustomerControllerRestApiCompletePaymentSetup
1836
+ */
1837
+ readonly customerCode: string
1838
+
1839
+ /**
1840
+ *
1841
+ * @type {CompletePaymentSetupPspRequest}
1842
+ * @memberof CustomerControllerRestApiCompletePaymentSetup
1843
+ */
1844
+ readonly completePaymentSetupPspRequest: CompletePaymentSetupPspRequest
1845
+
1846
+ /**
1847
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1848
+ * @type {string}
1849
+ * @memberof CustomerControllerRestApiCompletePaymentSetup
1850
+ */
1851
+ readonly authorization?: string
1852
+ }
1853
+
1854
+ /**
1855
+ * Request parameters for createCustomer operation in CustomerControllerRestApi.
1856
+ * @export
1857
+ * @interface CustomerControllerRestApiCreateCustomerRequest
1858
+ */
1859
+ export interface CustomerControllerRestApiCreateCustomerRequest {
1860
+ /**
1861
+ *
1862
+ * @type {CreateCustomerRequestDto}
1863
+ * @memberof CustomerControllerRestApiCreateCustomer
1864
+ */
1865
+ readonly createCustomerRequestDto: CreateCustomerRequestDto
1866
+ }
1867
+
1868
+ /**
1869
+ * Request parameters for forgotPassword operation in CustomerControllerRestApi.
1870
+ * @export
1871
+ * @interface CustomerControllerRestApiForgotPasswordRequest
1872
+ */
1873
+ export interface CustomerControllerRestApiForgotPasswordRequest {
1874
+ /**
1875
+ *
1876
+ * @type {ForgotPasswordRequestDto}
1877
+ * @memberof CustomerControllerRestApiForgotPassword
1878
+ */
1879
+ readonly forgotPasswordRequestDto: ForgotPasswordRequestDto
1880
+ }
1881
+
1882
+ /**
1883
+ * Request parameters for getCustomer operation in CustomerControllerRestApi.
1884
+ * @export
1885
+ * @interface CustomerControllerRestApiGetCustomerRequest
1886
+ */
1887
+ export interface CustomerControllerRestApiGetCustomerRequest {
1888
+ /**
1889
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
1890
+ * @type {string}
1891
+ * @memberof CustomerControllerRestApiGetCustomer
1892
+ */
1893
+ readonly customerCode: string
1894
+
1895
+ /**
1896
+ * Fields to expand response by - [account]
1897
+ * @type {string}
1898
+ * @memberof CustomerControllerRestApiGetCustomer
1899
+ */
1900
+ readonly expand?: string
1901
+
1902
+ /**
1903
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1904
+ * @type {string}
1905
+ * @memberof CustomerControllerRestApiGetCustomer
1906
+ */
1907
+ readonly authorization?: string
1908
+ }
1909
+
1910
+ /**
1911
+ * Request parameters for getCustomerDocumentDownloadUrl operation in CustomerControllerRestApi.
1912
+ * @export
1913
+ * @interface CustomerControllerRestApiGetCustomerDocumentDownloadUrlRequest
1914
+ */
1915
+ export interface CustomerControllerRestApiGetCustomerDocumentDownloadUrlRequest {
1916
+ /**
1917
+ * The document code.
1918
+ * @type {string}
1919
+ * @memberof CustomerControllerRestApiGetCustomerDocumentDownloadUrl
1920
+ */
1921
+ readonly documentCode: string
1922
+
1923
+ /**
1924
+ *
1925
+ * @type {string}
1926
+ * @memberof CustomerControllerRestApiGetCustomerDocumentDownloadUrl
1927
+ */
1928
+ readonly customerCode: string
1929
+
1930
+ /**
1931
+ * Content disposition override. Default will be depending on the document type.
1932
+ * @type {GetCustomerDocumentDownloadUrlRequestDto}
1933
+ * @memberof CustomerControllerRestApiGetCustomerDocumentDownloadUrl
1934
+ */
1935
+ readonly contentDisposition?: GetCustomerDocumentDownloadUrlRequestDto
1936
+
1937
+ /**
1938
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1939
+ * @type {string}
1940
+ * @memberof CustomerControllerRestApiGetCustomerDocumentDownloadUrl
1941
+ */
1942
+ readonly authorization?: string
1943
+ }
1944
+
1945
+ /**
1946
+ * Request parameters for initiateAuth operation in CustomerControllerRestApi.
1947
+ * @export
1948
+ * @interface CustomerControllerRestApiInitiateAuthRequest
1949
+ */
1950
+ export interface CustomerControllerRestApiInitiateAuthRequest {
1951
+ /**
1952
+ *
1953
+ * @type {InitiateAuthRequestDto}
1954
+ * @memberof CustomerControllerRestApiInitiateAuth
1955
+ */
1956
+ readonly initiateAuthRequestDto: InitiateAuthRequestDto
1957
+ }
1958
+
1959
+ /**
1960
+ * Request parameters for initiatePaymentSetup operation in CustomerControllerRestApi.
1961
+ * @export
1962
+ * @interface CustomerControllerRestApiInitiatePaymentSetupRequest
1963
+ */
1964
+ export interface CustomerControllerRestApiInitiatePaymentSetupRequest {
1965
+ /**
1966
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
1967
+ * @type {string}
1968
+ * @memberof CustomerControllerRestApiInitiatePaymentSetup
1969
+ */
1970
+ readonly customerCode: string
1971
+
1972
+ /**
1973
+ *
1974
+ * @type {InitiatePaymentSetupRequestDto}
1975
+ * @memberof CustomerControllerRestApiInitiatePaymentSetup
1976
+ */
1977
+ readonly initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto
1978
+
1979
+ /**
1980
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1981
+ * @type {string}
1982
+ * @memberof CustomerControllerRestApiInitiatePaymentSetup
1983
+ */
1984
+ readonly authorization?: string
1985
+ }
1986
+
1987
+ /**
1988
+ * Request parameters for inviteByCustomer operation in CustomerControllerRestApi.
1989
+ * @export
1990
+ * @interface CustomerControllerRestApiInviteByCustomerRequest
1991
+ */
1992
+ export interface CustomerControllerRestApiInviteByCustomerRequest {
1993
+ /**
1994
+ *
1995
+ * @type {InviteByCustomerRequestDto}
1996
+ * @memberof CustomerControllerRestApiInviteByCustomer
1997
+ */
1998
+ readonly inviteByCustomerRequestDto: InviteByCustomerRequestDto
1999
+
2000
+ /**
2001
+ * Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
2002
+ * @type {string}
2003
+ * @memberof CustomerControllerRestApiInviteByCustomer
2004
+ */
2005
+ readonly authorization?: string
2006
+ }
2007
+
2008
+ /**
2009
+ * Request parameters for inviteByTenant operation in CustomerControllerRestApi.
2010
+ * @export
2011
+ * @interface CustomerControllerRestApiInviteByTenantRequest
2012
+ */
2013
+ export interface CustomerControllerRestApiInviteByTenantRequest {
2014
+ /**
2015
+ *
2016
+ * @type {InviteByTenantRequestDto}
2017
+ * @memberof CustomerControllerRestApiInviteByTenant
2018
+ */
2019
+ readonly inviteByTenantRequestDto: InviteByTenantRequestDto
2020
+
2021
+ /**
2022
+ * Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
2023
+ * @type {string}
2024
+ * @memberof CustomerControllerRestApiInviteByTenant
2025
+ */
2026
+ readonly authorization?: string
2027
+ }
2028
+
2029
+ /**
2030
+ * Request parameters for listCustomers operation in CustomerControllerRestApi.
2031
+ * @export
2032
+ * @interface CustomerControllerRestApiListCustomersRequest
2033
+ */
2034
+ export interface CustomerControllerRestApiListCustomersRequest {
2035
+ /**
2036
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
2037
+ * @type {number}
2038
+ * @memberof CustomerControllerRestApiListCustomers
2039
+ */
2040
+ readonly pageSize?: number
2041
+
2042
+ /**
2043
+ * 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.
2044
+ * @type {string}
2045
+ * @memberof CustomerControllerRestApiListCustomers
2046
+ */
2047
+ readonly pageToken?: string
2048
+
2049
+ /**
2050
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
2051
+ * @type {string}
2052
+ * @memberof CustomerControllerRestApiListCustomers
2053
+ */
2054
+ readonly filter?: string
2055
+
2056
+ /**
2057
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
2058
+ * @type {string}
2059
+ * @memberof CustomerControllerRestApiListCustomers
2060
+ */
2061
+ readonly search?: string
2062
+
2063
+ /**
2064
+ * 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.
2065
+ * @type {string}
2066
+ * @memberof CustomerControllerRestApiListCustomers
2067
+ */
2068
+ readonly order?: string
2069
+
2070
+ /**
2071
+ * 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.
2072
+ * @type {string}
2073
+ * @memberof CustomerControllerRestApiListCustomers
2074
+ */
2075
+ readonly expand?: string
2076
+
2077
+ /**
2078
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
2079
+ * @type {string}
2080
+ * @memberof CustomerControllerRestApiListCustomers
2081
+ */
2082
+ readonly filters?: string
2083
+
2084
+ /**
2085
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2086
+ * @type {string}
2087
+ * @memberof CustomerControllerRestApiListCustomers
2088
+ */
2089
+ readonly authorization?: string
2090
+ }
2091
+
2092
+ /**
2093
+ * Request parameters for listDocuments operation in CustomerControllerRestApi.
2094
+ * @export
2095
+ * @interface CustomerControllerRestApiListDocumentsRequest
2096
+ */
2097
+ export interface CustomerControllerRestApiListDocumentsRequest {
2098
+ /**
2099
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
2100
+ * @type {string}
2101
+ * @memberof CustomerControllerRestApiListDocuments
2102
+ */
2103
+ readonly customerCode: string
2104
+
2105
+ /**
2106
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
2107
+ * @type {number}
2108
+ * @memberof CustomerControllerRestApiListDocuments
2109
+ */
2110
+ readonly pageSize?: number
2111
+
2112
+ /**
2113
+ * 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.
2114
+ * @type {string}
2115
+ * @memberof CustomerControllerRestApiListDocuments
2116
+ */
2117
+ readonly pageToken?: string
2118
+
2119
+ /**
2120
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
2121
+ * @type {string}
2122
+ * @memberof CustomerControllerRestApiListDocuments
2123
+ */
2124
+ readonly filter?: string
2125
+
2126
+ /**
2127
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
2128
+ * @type {string}
2129
+ * @memberof CustomerControllerRestApiListDocuments
2130
+ */
2131
+ readonly search?: string
2132
+
2133
+ /**
2134
+ * 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.
2135
+ * @type {string}
2136
+ * @memberof CustomerControllerRestApiListDocuments
2137
+ */
2138
+ readonly order?: string
2139
+
2140
+ /**
2141
+ * 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.
2142
+ * @type {string}
2143
+ * @memberof CustomerControllerRestApiListDocuments
2144
+ */
2145
+ readonly expand?: string
2146
+
2147
+ /**
2148
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
2149
+ * @type {string}
2150
+ * @memberof CustomerControllerRestApiListDocuments
2151
+ */
2152
+ readonly filters?: string
2153
+
2154
+ /**
2155
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2156
+ * @type {string}
2157
+ * @memberof CustomerControllerRestApiListDocuments
2158
+ */
2159
+ readonly authorization?: string
2160
+ }
2161
+
2162
+ /**
2163
+ * Request parameters for listInvoices operation in CustomerControllerRestApi.
2164
+ * @export
2165
+ * @interface CustomerControllerRestApiListInvoicesRequest
2166
+ */
2167
+ export interface CustomerControllerRestApiListInvoicesRequest {
2168
+ /**
2169
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
2170
+ * @type {string}
2171
+ * @memberof CustomerControllerRestApiListInvoices
2172
+ */
2173
+ readonly customerCode: string
2174
+
2175
+ /**
2176
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
2177
+ * @type {number}
2178
+ * @memberof CustomerControllerRestApiListInvoices
2179
+ */
2180
+ readonly pageSize?: number
2181
+
2182
+ /**
2183
+ * 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.
2184
+ * @type {string}
2185
+ * @memberof CustomerControllerRestApiListInvoices
2186
+ */
2187
+ readonly pageToken?: string
2188
+
2189
+ /**
2190
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
2191
+ * @type {string}
2192
+ * @memberof CustomerControllerRestApiListInvoices
2193
+ */
2194
+ readonly filter?: string
2195
+
2196
+ /**
2197
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
2198
+ * @type {string}
2199
+ * @memberof CustomerControllerRestApiListInvoices
2200
+ */
2201
+ readonly search?: string
2202
+
2203
+ /**
2204
+ * 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.
2205
+ * @type {string}
2206
+ * @memberof CustomerControllerRestApiListInvoices
2207
+ */
2208
+ readonly order?: string
2209
+
2210
+ /**
2211
+ * 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.
2212
+ * @type {string}
2213
+ * @memberof CustomerControllerRestApiListInvoices
2214
+ */
2215
+ readonly expand?: string
2216
+
2217
+ /**
2218
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
2219
+ * @type {string}
2220
+ * @memberof CustomerControllerRestApiListInvoices
2221
+ */
2222
+ readonly filters?: string
2223
+
2224
+ /**
2225
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2226
+ * @type {string}
2227
+ * @memberof CustomerControllerRestApiListInvoices
2228
+ */
2229
+ readonly authorization?: string
2230
+ }
2231
+
2232
+ /**
2233
+ * Request parameters for refreshToken operation in CustomerControllerRestApi.
2234
+ * @export
2235
+ * @interface CustomerControllerRestApiRefreshTokenRequest
2236
+ */
2237
+ export interface CustomerControllerRestApiRefreshTokenRequest {
2238
+ /**
2239
+ *
2240
+ * @type {RefreshTokenDto}
2241
+ * @memberof CustomerControllerRestApiRefreshToken
2242
+ */
2243
+ readonly refreshTokenDto: RefreshTokenDto
2244
+
2245
+ /**
2246
+ * HTTP only cookie that was sent during login.
2247
+ * @type {string}
2248
+ * @memberof CustomerControllerRestApiRefreshToken
2249
+ */
2250
+ readonly cookie?: string
2251
+ }
2252
+
2253
+ /**
2254
+ * Request parameters for requestChangeEmailByCustomer operation in CustomerControllerRestApi.
2255
+ * @export
2256
+ * @interface CustomerControllerRestApiRequestChangeEmailByCustomerRequest
2257
+ */
2258
+ export interface CustomerControllerRestApiRequestChangeEmailByCustomerRequest {
2259
+ /**
2260
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
2261
+ * @type {string}
2262
+ * @memberof CustomerControllerRestApiRequestChangeEmailByCustomer
2263
+ */
2264
+ readonly customerCode: string
2265
+
2266
+ /**
2267
+ *
2268
+ * @type {RequestChangeEmailByCustomerRequestDto}
2269
+ * @memberof CustomerControllerRestApiRequestChangeEmailByCustomer
2270
+ */
2271
+ readonly requestChangeEmailByCustomerRequestDto: RequestChangeEmailByCustomerRequestDto
2272
+
2273
+ /**
2274
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2275
+ * @type {string}
2276
+ * @memberof CustomerControllerRestApiRequestChangeEmailByCustomer
2277
+ */
2278
+ readonly authorization?: string
2279
+ }
2280
+
2281
+ /**
2282
+ * Request parameters for resetPassword operation in CustomerControllerRestApi.
2283
+ * @export
2284
+ * @interface CustomerControllerRestApiResetPasswordRequest
2285
+ */
2286
+ export interface CustomerControllerRestApiResetPasswordRequest {
2287
+ /**
2288
+ *
2289
+ * @type {ResetPasswordByCustomerRequestDto}
2290
+ * @memberof CustomerControllerRestApiResetPassword
2291
+ */
2292
+ readonly resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto
2293
+ }
2294
+
2295
+ /**
2296
+ * Request parameters for respondToAuthChallenge operation in CustomerControllerRestApi.
2297
+ * @export
2298
+ * @interface CustomerControllerRestApiRespondToAuthChallengeRequest
2299
+ */
2300
+ export interface CustomerControllerRestApiRespondToAuthChallengeRequest {
2301
+ /**
2302
+ *
2303
+ * @type {RespondToAuthChallengeRequestDto}
2304
+ * @memberof CustomerControllerRestApiRespondToAuthChallenge
2305
+ */
2306
+ readonly respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto
2307
+ }
2308
+
2309
+ /**
2310
+ * Request parameters for updateCustomer operation in CustomerControllerRestApi.
2311
+ * @export
2312
+ * @interface CustomerControllerRestApiUpdateCustomerRequest
2313
+ */
2314
+ export interface CustomerControllerRestApiUpdateCustomerRequest {
2315
+ /**
2316
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
2317
+ * @type {string}
2318
+ * @memberof CustomerControllerRestApiUpdateCustomer
2319
+ */
2320
+ readonly customerCode: string
2321
+
2322
+ /**
2323
+ *
2324
+ * @type {UpdateCustomerRequestDto}
2325
+ * @memberof CustomerControllerRestApiUpdateCustomer
2326
+ */
2327
+ readonly updateCustomerRequestDto: UpdateCustomerRequestDto
2328
+
2329
+ /**
2330
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2331
+ * @type {string}
2332
+ * @memberof CustomerControllerRestApiUpdateCustomer
2333
+ */
2334
+ readonly authorization?: string
2335
+ }
2336
+
2337
+ /**
2338
+ * Request parameters for uploadAccountDocuments operation in CustomerControllerRestApi.
2339
+ * @export
2340
+ * @interface CustomerControllerRestApiUploadAccountDocumentsRequest
2341
+ */
2342
+ export interface CustomerControllerRestApiUploadAccountDocumentsRequest {
2343
+ /**
2344
+ *
2345
+ * @type {string}
2346
+ * @memberof CustomerControllerRestApiUploadAccountDocuments
2347
+ */
2348
+ readonly customerCode: string
2349
+
2350
+ /**
2351
+ *
2352
+ * @type {UploadAccountDocumentsRequestDto}
2353
+ * @memberof CustomerControllerRestApiUploadAccountDocuments
2354
+ */
2355
+ readonly uploadAccountDocumentsRequestDto: UploadAccountDocumentsRequestDto
2356
+ }
2357
+
2358
+ /**
2359
+ * Request parameters for verifyChangeEmailToken operation in CustomerControllerRestApi.
2360
+ * @export
2361
+ * @interface CustomerControllerRestApiVerifyChangeEmailTokenRequest
2362
+ */
2363
+ export interface CustomerControllerRestApiVerifyChangeEmailTokenRequest {
2364
+ /**
2365
+ *
2366
+ * @type {VerifyChangeEmailTokenRequestDto}
2367
+ * @memberof CustomerControllerRestApiVerifyChangeEmailToken
2368
+ */
2369
+ readonly verifyChangeEmailTokenRequestDto: VerifyChangeEmailTokenRequestDto
2370
+
2371
+ /**
2372
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2373
+ * @type {string}
2374
+ * @memberof CustomerControllerRestApiVerifyChangeEmailToken
2375
+ */
2376
+ readonly authorization?: string
2377
+ }
2378
+
2379
+ /**
2380
+ * Request parameters for verifyInvite operation in CustomerControllerRestApi.
2381
+ * @export
2382
+ * @interface CustomerControllerRestApiVerifyInviteRequest
2383
+ */
2384
+ export interface CustomerControllerRestApiVerifyInviteRequest {
2385
+ /**
2386
+ * Invite token sent to the customer
2387
+ * @type {string}
2388
+ * @memberof CustomerControllerRestApiVerifyInvite
2389
+ */
2390
+ readonly inviteToken: string
2391
+ }
2392
+
2393
+ /**
2394
+ * Request parameters for verifyResetPasswordToken operation in CustomerControllerRestApi.
2395
+ * @export
2396
+ * @interface CustomerControllerRestApiVerifyResetPasswordTokenRequest
2397
+ */
2398
+ export interface CustomerControllerRestApiVerifyResetPasswordTokenRequest {
2399
+ /**
2400
+ * reset password token
2401
+ * @type {string}
2402
+ * @memberof CustomerControllerRestApiVerifyResetPasswordToken
2403
+ */
2404
+ readonly resetToken: string
2405
+ }
2406
+
2407
+ /**
2408
+ * CustomerControllerRestApi - object-oriented interface
2409
+ * @export
2410
+ * @class CustomerControllerRestApi
2411
+ * @extends {BaseAPI}
2412
+ */
2413
+ export class CustomerControllerRestApi extends BaseAPI {
2414
+ /**
2415
+ * Change customer\'s email using the token provided by the request email change endpoint.
2416
+ * @summary Change customer email
2417
+ * @param {CustomerControllerRestApiChangeCustomerEmailRequest} requestParameters Request parameters.
2418
+ * @param {*} [options] Override http request option.
2419
+ * @throws {RequiredError}
2420
+ * @memberof CustomerControllerRestApi
2421
+ */
2422
+ public changeCustomerEmail(requestParameters: CustomerControllerRestApiChangeCustomerEmailRequest, options?: AxiosRequestConfig) {
2423
+ return CustomerControllerRestApiFp(this.configuration).changeCustomerEmail(requestParameters.changeCustomerEmailRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2424
+ }
2425
+
2426
+ /**
2427
+ * Change the customer password. Please use forgot-password endpoint if current password is lost.
2428
+ * @summary Change customer password
2429
+ * @param {CustomerControllerRestApiChangePasswordRequest} requestParameters Request parameters.
2430
+ * @param {*} [options] Override http request option.
2431
+ * @throws {RequiredError}
2432
+ * @memberof CustomerControllerRestApi
2433
+ */
2434
+ public changePassword(requestParameters: CustomerControllerRestApiChangePasswordRequest, options?: AxiosRequestConfig) {
2435
+ return CustomerControllerRestApiFp(this.configuration).changePassword(requestParameters.customerCode, requestParameters.changePasswordRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2436
+ }
2437
+
2438
+ /**
2439
+ * Request to complete a payment change by customer.
2440
+ * @summary Request payment setup complete
2441
+ * @param {CustomerControllerRestApiCompletePaymentSetupRequest} requestParameters Request parameters.
2442
+ * @param {*} [options] Override http request option.
2443
+ * @throws {RequiredError}
2444
+ * @memberof CustomerControllerRestApi
2445
+ */
2446
+ public completePaymentSetup(requestParameters: CustomerControllerRestApiCompletePaymentSetupRequest, options?: AxiosRequestConfig) {
2447
+ return CustomerControllerRestApiFp(this.configuration).completePaymentSetup(requestParameters.customerCode, requestParameters.completePaymentSetupPspRequest, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2448
+ }
2449
+
2450
+ /**
2451
+ * 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.
2452
+ * @summary Register a customer after invite
2453
+ * @param {CustomerControllerRestApiCreateCustomerRequest} requestParameters Request parameters.
2454
+ * @param {*} [options] Override http request option.
2455
+ * @throws {RequiredError}
2456
+ * @memberof CustomerControllerRestApi
2457
+ */
2458
+ public createCustomer(requestParameters: CustomerControllerRestApiCreateCustomerRequest, options?: AxiosRequestConfig) {
2459
+ return CustomerControllerRestApiFp(this.configuration).createCustomer(requestParameters.createCustomerRequestDto, options).then((request) => request(this.axios, this.basePath));
2460
+ }
2461
+
2462
+ /**
2463
+ * Send a customer a reset-password token via email.
2464
+ * @summary Forgot password by customer
2465
+ * @param {CustomerControllerRestApiForgotPasswordRequest} requestParameters Request parameters.
2466
+ * @param {*} [options] Override http request option.
2467
+ * @throws {RequiredError}
2468
+ * @memberof CustomerControllerRestApi
2469
+ */
2470
+ public forgotPassword(requestParameters: CustomerControllerRestApiForgotPasswordRequest, options?: AxiosRequestConfig) {
2471
+ return CustomerControllerRestApiFp(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then((request) => request(this.axios, this.basePath));
2472
+ }
2473
+
2474
+ /**
2475
+ * Get customer details.
2476
+ * @summary Get customer details
2477
+ * @param {CustomerControllerRestApiGetCustomerRequest} requestParameters Request parameters.
2478
+ * @param {*} [options] Override http request option.
2479
+ * @throws {RequiredError}
2480
+ * @memberof CustomerControllerRestApi
2481
+ */
2482
+ public getCustomer(requestParameters: CustomerControllerRestApiGetCustomerRequest, options?: AxiosRequestConfig) {
2483
+ return CustomerControllerRestApiFp(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2484
+ }
2485
+
2486
+ /**
2487
+ * Get a presigned download url for document.
2488
+ * @summary Get a download url for document
2489
+ * @param {CustomerControllerRestApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
2490
+ * @param {*} [options] Override http request option.
2491
+ * @throws {RequiredError}
2492
+ * @memberof CustomerControllerRestApi
2493
+ */
2494
+ public getCustomerDocumentDownloadUrl(requestParameters: CustomerControllerRestApiGetCustomerDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
2495
+ return CustomerControllerRestApiFp(this.configuration).getCustomerDocumentDownloadUrl(requestParameters.documentCode, requestParameters.customerCode, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2496
+ }
2497
+
2498
+ /**
2499
+ * Start auth process to get new access token, refresh token after successful login.
2500
+ * @summary Initiate auth by customer
2501
+ * @param {CustomerControllerRestApiInitiateAuthRequest} requestParameters Request parameters.
2502
+ * @param {*} [options] Override http request option.
2503
+ * @throws {RequiredError}
2504
+ * @memberof CustomerControllerRestApi
2505
+ */
2506
+ public initiateAuth(requestParameters: CustomerControllerRestApiInitiateAuthRequest, options?: AxiosRequestConfig) {
2507
+ return CustomerControllerRestApiFp(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then((request) => request(this.axios, this.basePath));
2508
+ }
2509
+
2510
+ /**
2511
+ * Request to initiate a payment change by customer.
2512
+ * @summary Request payment setup initiation
2513
+ * @param {CustomerControllerRestApiInitiatePaymentSetupRequest} requestParameters Request parameters.
2514
+ * @param {*} [options] Override http request option.
2515
+ * @throws {RequiredError}
2516
+ * @memberof CustomerControllerRestApi
2517
+ */
2518
+ public initiatePaymentSetup(requestParameters: CustomerControllerRestApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig) {
2519
+ return CustomerControllerRestApiFp(this.configuration).initiatePaymentSetup(requestParameters.customerCode, requestParameters.initiatePaymentSetupRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2520
+ }
2521
+
2522
+ /**
2523
+ * 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.
2524
+ * @summary Invite a customer by self
2525
+ * @param {CustomerControllerRestApiInviteByCustomerRequest} requestParameters Request parameters.
2526
+ * @param {*} [options] Override http request option.
2527
+ * @throws {RequiredError}
2528
+ * @memberof CustomerControllerRestApi
2529
+ */
2530
+ public inviteByCustomer(requestParameters: CustomerControllerRestApiInviteByCustomerRequest, options?: AxiosRequestConfig) {
2531
+ return CustomerControllerRestApiFp(this.configuration).inviteByCustomer(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2532
+ }
2533
+
2534
+ /**
2535
+ * 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. **Required Permissions** \"customer-management.customers.create\"
2536
+ * @summary Invite a customer by tenant
2537
+ * @param {CustomerControllerRestApiInviteByTenantRequest} requestParameters Request parameters.
2538
+ * @param {*} [options] Override http request option.
2539
+ * @throws {RequiredError}
2540
+ * @memberof CustomerControllerRestApi
2541
+ */
2542
+ public inviteByTenant(requestParameters: CustomerControllerRestApiInviteByTenantRequest, options?: AxiosRequestConfig) {
2543
+ return CustomerControllerRestApiFp(this.configuration).inviteByTenant(requestParameters.inviteByTenantRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2544
+ }
2545
+
2546
+ /**
2547
+ * Get customer list.
2548
+ * @summary Get customers list
2549
+ * @param {CustomerControllerRestApiListCustomersRequest} requestParameters Request parameters.
2550
+ * @param {*} [options] Override http request option.
2551
+ * @throws {RequiredError}
2552
+ * @memberof CustomerControllerRestApi
2553
+ */
2554
+ public listCustomers(requestParameters: CustomerControllerRestApiListCustomersRequest = {}, options?: AxiosRequestConfig) {
2555
+ return CustomerControllerRestApiFp(this.configuration).listCustomers(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2556
+ }
2557
+
2558
+ /**
2559
+ * List all the documents of a customer.
2560
+ * @summary List documents of a customer
2561
+ * @param {CustomerControllerRestApiListDocumentsRequest} requestParameters Request parameters.
2562
+ * @param {*} [options] Override http request option.
2563
+ * @throws {RequiredError}
2564
+ * @memberof CustomerControllerRestApi
2565
+ */
2566
+ public listDocuments(requestParameters: CustomerControllerRestApiListDocumentsRequest, options?: AxiosRequestConfig) {
2567
+ return CustomerControllerRestApiFp(this.configuration).listDocuments(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2568
+ }
2569
+
2570
+ /**
2571
+ * List all the invoices of a customer.
2572
+ * @summary List invoices of a customer
2573
+ * @param {CustomerControllerRestApiListInvoicesRequest} requestParameters Request parameters.
2574
+ * @param {*} [options] Override http request option.
2575
+ * @throws {RequiredError}
2576
+ * @memberof CustomerControllerRestApi
2577
+ */
2578
+ public listInvoices(requestParameters: CustomerControllerRestApiListInvoicesRequest, options?: AxiosRequestConfig) {
2579
+ return CustomerControllerRestApiFp(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2580
+ }
2581
+
2582
+ /**
2583
+ * Get new access token, new refresh token.
2584
+ * @summary Refresh token by customer
2585
+ * @param {CustomerControllerRestApiRefreshTokenRequest} requestParameters Request parameters.
2586
+ * @param {*} [options] Override http request option.
2587
+ * @throws {RequiredError}
2588
+ * @memberof CustomerControllerRestApi
2589
+ */
2590
+ public refreshToken(requestParameters: CustomerControllerRestApiRefreshTokenRequest, options?: AxiosRequestConfig) {
2591
+ return CustomerControllerRestApiFp(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
2592
+ }
2593
+
2594
+ /**
2595
+ * Request a token to change the email address for the customer.
2596
+ * @summary Request customer email change
2597
+ * @param {CustomerControllerRestApiRequestChangeEmailByCustomerRequest} requestParameters Request parameters.
2598
+ * @param {*} [options] Override http request option.
2599
+ * @throws {RequiredError}
2600
+ * @memberof CustomerControllerRestApi
2601
+ */
2602
+ public requestChangeEmailByCustomer(requestParameters: CustomerControllerRestApiRequestChangeEmailByCustomerRequest, options?: AxiosRequestConfig) {
2603
+ return CustomerControllerRestApiFp(this.configuration).requestChangeEmailByCustomer(requestParameters.customerCode, requestParameters.requestChangeEmailByCustomerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2604
+ }
2605
+
2606
+ /**
2607
+ * Change customer\'s password using the token provided by the reset password endpoint.
2608
+ * @summary Change password by customer
2609
+ * @param {CustomerControllerRestApiResetPasswordRequest} requestParameters Request parameters.
2610
+ * @param {*} [options] Override http request option.
2611
+ * @throws {RequiredError}
2612
+ * @memberof CustomerControllerRestApi
2613
+ */
2614
+ public resetPassword(requestParameters: CustomerControllerRestApiResetPasswordRequest, options?: AxiosRequestConfig) {
2615
+ return CustomerControllerRestApiFp(this.configuration).resetPassword(requestParameters.resetPasswordByCustomerRequestDto, options).then((request) => request(this.axios, this.basePath));
2616
+ }
2617
+
2618
+ /**
2619
+ * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
2620
+ * @summary Respond to auth challenge
2621
+ * @param {CustomerControllerRestApiRespondToAuthChallengeRequest} requestParameters Request parameters.
2622
+ * @param {*} [options] Override http request option.
2623
+ * @throws {RequiredError}
2624
+ * @memberof CustomerControllerRestApi
2625
+ */
2626
+ public respondToAuthChallenge(requestParameters: CustomerControllerRestApiRespondToAuthChallengeRequest, options?: AxiosRequestConfig) {
2627
+ return CustomerControllerRestApiFp(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then((request) => request(this.axios, this.basePath));
2628
+ }
2629
+
2630
+ /**
2631
+ * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
2632
+ * @summary Update customer details
2633
+ * @param {CustomerControllerRestApiUpdateCustomerRequest} requestParameters Request parameters.
2634
+ * @param {*} [options] Override http request option.
2635
+ * @throws {RequiredError}
2636
+ * @memberof CustomerControllerRestApi
2637
+ */
2638
+ public updateCustomer(requestParameters: CustomerControllerRestApiUpdateCustomerRequest, options?: AxiosRequestConfig) {
2639
+ return CustomerControllerRestApiFp(this.configuration).updateCustomer(requestParameters.customerCode, requestParameters.updateCustomerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2640
+ }
2641
+
2642
+ /**
2643
+ * API to upload and attach documents to an account.
2644
+ * @summary Upload account documents
2645
+ * @param {CustomerControllerRestApiUploadAccountDocumentsRequest} requestParameters Request parameters.
2646
+ * @param {*} [options] Override http request option.
2647
+ * @throws {RequiredError}
2648
+ * @memberof CustomerControllerRestApi
2649
+ */
2650
+ public uploadAccountDocuments(requestParameters: CustomerControllerRestApiUploadAccountDocumentsRequest, options?: AxiosRequestConfig) {
2651
+ return CustomerControllerRestApiFp(this.configuration).uploadAccountDocuments(requestParameters.customerCode, requestParameters.uploadAccountDocumentsRequestDto, options).then((request) => request(this.axios, this.basePath));
2652
+ }
2653
+
2654
+ /**
2655
+ * Verify the change email token that is sent by calling the request change email endpoint.
2656
+ * @summary Verify the change email token
2657
+ * @param {CustomerControllerRestApiVerifyChangeEmailTokenRequest} requestParameters Request parameters.
2658
+ * @param {*} [options] Override http request option.
2659
+ * @throws {RequiredError}
2660
+ * @memberof CustomerControllerRestApi
2661
+ */
2662
+ public verifyChangeEmailToken(requestParameters: CustomerControllerRestApiVerifyChangeEmailTokenRequest, options?: AxiosRequestConfig) {
2663
+ return CustomerControllerRestApiFp(this.configuration).verifyChangeEmailToken(requestParameters.verifyChangeEmailTokenRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2664
+ }
2665
+
2666
+ /**
2667
+ * Verify the invite sent to the customer via email.
2668
+ * @summary Verify customer\'s invite token
2669
+ * @param {CustomerControllerRestApiVerifyInviteRequest} requestParameters Request parameters.
2670
+ * @param {*} [options] Override http request option.
2671
+ * @throws {RequiredError}
2672
+ * @memberof CustomerControllerRestApi
2673
+ */
2674
+ public verifyInvite(requestParameters: CustomerControllerRestApiVerifyInviteRequest, options?: AxiosRequestConfig) {
2675
+ return CustomerControllerRestApiFp(this.configuration).verifyInvite(requestParameters.inviteToken, options).then((request) => request(this.axios, this.basePath));
2676
+ }
2677
+
2678
+ /**
2679
+ * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
2680
+ * @summary Verify a reset password token
2681
+ * @param {CustomerControllerRestApiVerifyResetPasswordTokenRequest} requestParameters Request parameters.
2682
+ * @param {*} [options] Override http request option.
2683
+ * @throws {RequiredError}
2684
+ * @memberof CustomerControllerRestApi
2685
+ */
2686
+ public verifyResetPasswordToken(requestParameters: CustomerControllerRestApiVerifyResetPasswordTokenRequest, options?: AxiosRequestConfig) {
2687
+ return CustomerControllerRestApiFp(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then((request) => request(this.axios, this.basePath));
2688
+ }
2689
+ }