@emilgroup/customer-sdk-node 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.openapi-generator/FILES +8 -4
  2. package/README.md +12 -12
  3. package/api/customers-api.ts +304 -114
  4. package/base.ts +57 -43
  5. package/dist/api/customers-api.d.ts +180 -76
  6. package/dist/api/customers-api.js +249 -89
  7. package/dist/base.d.ts +3 -0
  8. package/dist/base.js +75 -42
  9. package/dist/models/{login-request-dto.d.ts → authentication-result-class.d.ts} +8 -14
  10. package/dist/models/{invite-customer-request-dto.js → authentication-result-class.js} +0 -0
  11. package/dist/models/index.d.ts +8 -4
  12. package/dist/models/index.js +8 -4
  13. package/dist/models/initiate-auth-request-dto.d.ts +36 -0
  14. package/dist/models/{invite-customer-response-class.js → initiate-auth-request-dto.js} +0 -0
  15. package/dist/models/initiate-auth-response-class.d.ts +43 -0
  16. package/dist/models/{login-request-dto.js → initiate-auth-response-class.js} +0 -0
  17. package/dist/models/{invite-customer-request-dto.d.ts → invite-by-customer-request-dto.d.ts} +6 -6
  18. package/dist/models/{login-response-class.js → invite-by-customer-request-dto.js} +0 -0
  19. package/dist/models/invite-by-customer-response-class.d.ts +25 -0
  20. package/dist/models/invite-by-customer-response-class.js +15 -0
  21. package/dist/models/{invite-customer-response-class.d.ts → invite-by-tenant-response-class.d.ts} +3 -3
  22. package/dist/models/invite-by-tenant-response-class.js +15 -0
  23. package/dist/models/respond-to-auth-challenge-class.d.ts +43 -0
  24. package/dist/models/respond-to-auth-challenge-class.js +15 -0
  25. package/dist/models/respond-to-auth-challenge-request-dto.d.ts +42 -0
  26. package/dist/models/respond-to-auth-challenge-request-dto.js +15 -0
  27. package/models/{login-request-dto.ts → authentication-result-class.ts} +8 -14
  28. package/models/index.ts +8 -4
  29. package/models/initiate-auth-request-dto.ts +42 -0
  30. package/models/initiate-auth-response-class.ts +49 -0
  31. package/models/{invite-customer-request-dto.ts → invite-by-customer-request-dto.ts} +6 -6
  32. package/models/invite-by-customer-response-class.ts +31 -0
  33. package/models/{invite-customer-response-class.ts → invite-by-tenant-response-class.ts} +3 -3
  34. package/models/respond-to-auth-challenge-class.ts +49 -0
  35. package/models/respond-to-auth-challenge-request-dto.ts +48 -0
  36. package/package.json +1 -1
  37. package/dist/models/login-response-class.d.ts +0 -30
  38. package/models/login-response-class.ts +0 -36
@@ -29,22 +29,28 @@ import { ForgotPasswordRequestDto } from '../models';
29
29
  // @ts-ignore
30
30
  import { GetPolicyResponseClass } from '../models';
31
31
  // @ts-ignore
32
- import { InviteCustomerRequestDto } from '../models';
32
+ import { InitiateAuthRequestDto } from '../models';
33
33
  // @ts-ignore
34
- import { InviteCustomerResponseClass } from '../models';
34
+ import { InitiateAuthResponseClass } from '../models';
35
35
  // @ts-ignore
36
- import { ListInvoicesResponseClass } from '../models';
36
+ import { InviteByCustomerRequestDto } from '../models';
37
37
  // @ts-ignore
38
- import { ListPoliciesResponseClass } from '../models';
38
+ import { InviteByCustomerResponseClass } from '../models';
39
39
  // @ts-ignore
40
- import { LoginRequestDto } from '../models';
40
+ import { InviteByTenantResponseClass } from '../models';
41
+ // @ts-ignore
42
+ import { ListInvoicesResponseClass } from '../models';
41
43
  // @ts-ignore
42
- import { LoginResponseClass } from '../models';
44
+ import { ListPoliciesResponseClass } from '../models';
43
45
  // @ts-ignore
44
46
  import { RefreshTokenDto } from '../models';
45
47
  // @ts-ignore
46
48
  import { ResetPasswordByCustomerRequestDto } from '../models';
47
49
  // @ts-ignore
50
+ import { RespondToAuthChallengeClass } from '../models';
51
+ // @ts-ignore
52
+ import { RespondToAuthChallengeRequestDto } from '../models';
53
+ // @ts-ignore
48
54
  import { VerifyCustomerInviteResponseClass } from '../models';
49
55
  // URLSearchParams not necessarily used
50
56
  // @ts-ignore
@@ -133,7 +139,7 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
133
139
  };
134
140
  },
135
141
  /**
136
- * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
142
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
137
143
  * @summary Get policy details
138
144
  * @param {string} policyCode The policy code
139
145
  * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
@@ -182,18 +188,56 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
182
188
  options: localVarRequestOptions,
183
189
  };
184
190
  },
191
+ /**
192
+ * Start auth process to get new access token, refresh token after successful login.
193
+ * @summary Initiate auth by customer
194
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ initiateAuth: async (initiateAuthRequestDto: InitiateAuthRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
199
+ // verify required parameter 'initiateAuthRequestDto' is not null or undefined
200
+ assertParamExists('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto)
201
+ const localVarPath = `/v1/customers/auth/initiate`;
202
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
203
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
204
+ let baseOptions;
205
+ let baseAccessToken;
206
+ if (configuration) {
207
+ baseOptions = configuration.baseOptions;
208
+ baseAccessToken = configuration.accessToken;
209
+ }
210
+
211
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
212
+ const localVarHeaderParameter = {} as any;
213
+ const localVarQueryParameter = {} as any;
214
+
215
+
216
+
217
+ localVarHeaderParameter['Content-Type'] = 'application/json';
218
+
219
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
220
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
221
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
222
+ localVarRequestOptions.data = serializeDataIfNeeded(initiateAuthRequestDto, localVarRequestOptions, configuration)
223
+
224
+ return {
225
+ url: toPathString(localVarUrlObj),
226
+ options: localVarRequestOptions,
227
+ };
228
+ },
185
229
  /**
186
230
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
187
- * @summary Invite a customer to register
188
- * @param {InviteCustomerRequestDto} inviteCustomerRequestDto
231
+ * @summary Invite by customer
232
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
189
233
  * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
190
234
  * @param {*} [options] Override http request option.
191
235
  * @throws {RequiredError}
192
236
  */
193
- inviteCustomer: async (inviteCustomerRequestDto: InviteCustomerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
194
- // verify required parameter 'inviteCustomerRequestDto' is not null or undefined
195
- assertParamExists('inviteCustomer', 'inviteCustomerRequestDto', inviteCustomerRequestDto)
196
- const localVarPath = `/v1/customers/invites`;
237
+ inviteByCustomer: async (inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
238
+ // verify required parameter 'inviteByCustomerRequestDto' is not null or undefined
239
+ assertParamExists('inviteByCustomer', 'inviteByCustomerRequestDto', inviteByCustomerRequestDto)
240
+ const localVarPath = `/v1/customers/invites/by-customer`;
197
241
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
198
242
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
199
243
  let baseOptions;
@@ -218,7 +262,50 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
218
262
  setSearchParams(localVarUrlObj, localVarQueryParameter);
219
263
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
220
264
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
221
- localVarRequestOptions.data = serializeDataIfNeeded(inviteCustomerRequestDto, localVarRequestOptions, configuration)
265
+ localVarRequestOptions.data = serializeDataIfNeeded(inviteByCustomerRequestDto, localVarRequestOptions, configuration)
266
+
267
+ return {
268
+ url: toPathString(localVarUrlObj),
269
+ options: localVarRequestOptions,
270
+ };
271
+ },
272
+ /**
273
+ * 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.
274
+ * @summary Invite by tenant
275
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
276
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ inviteByTenant: async (inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
281
+ // verify required parameter 'inviteByCustomerRequestDto' is not null or undefined
282
+ assertParamExists('inviteByTenant', 'inviteByCustomerRequestDto', inviteByCustomerRequestDto)
283
+ const localVarPath = `/v1/customers/invites/by-tenant`;
284
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
285
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
286
+ let baseOptions;
287
+ let baseAccessToken;
288
+ if (configuration) {
289
+ baseOptions = configuration.baseOptions;
290
+ baseAccessToken = configuration.accessToken;
291
+ }
292
+
293
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
294
+ const localVarHeaderParameter = {} as any;
295
+ const localVarQueryParameter = {} as any;
296
+
297
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
298
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
299
+ }
300
+
301
+
302
+
303
+ localVarHeaderParameter['Content-Type'] = 'application/json';
304
+
305
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
306
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
307
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
308
+ localVarRequestOptions.data = serializeDataIfNeeded(inviteByCustomerRequestDto, localVarRequestOptions, configuration)
222
309
 
223
310
  return {
224
311
  url: toPathString(localVarUrlObj),
@@ -368,16 +455,17 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
368
455
  };
369
456
  },
370
457
  /**
371
- * Get new access token, refresh token after successful login.
372
- * @summary Login by customer
373
- * @param {LoginRequestDto} loginRequestDto
458
+ * Get new access token, new refresh token.
459
+ * @summary Refresh token by customer
460
+ * @param {RefreshTokenDto} refreshTokenDto
461
+ * @param {string} [cookie] HTTP only cookie that was sent during login.
374
462
  * @param {*} [options] Override http request option.
375
463
  * @throws {RequiredError}
376
464
  */
377
- login: async (loginRequestDto: LoginRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
378
- // verify required parameter 'loginRequestDto' is not null or undefined
379
- assertParamExists('login', 'loginRequestDto', loginRequestDto)
380
- const localVarPath = `/v1/customers/login`;
465
+ refreshToken: async (refreshTokenDto: RefreshTokenDto, cookie?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
466
+ // verify required parameter 'refreshTokenDto' is not null or undefined
467
+ assertParamExists('refreshToken', 'refreshTokenDto', refreshTokenDto)
468
+ const localVarPath = `/v1/customers/refresh-token`;
381
469
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
382
470
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
383
471
  let baseOptions;
@@ -391,6 +479,10 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
391
479
  const localVarHeaderParameter = {} as any;
392
480
  const localVarQueryParameter = {} as any;
393
481
 
482
+ if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
483
+ localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
484
+ }
485
+
394
486
 
395
487
 
396
488
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -398,7 +490,7 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
398
490
  setSearchParams(localVarUrlObj, localVarQueryParameter);
399
491
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
400
492
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
401
- localVarRequestOptions.data = serializeDataIfNeeded(loginRequestDto, localVarRequestOptions, configuration)
493
+ localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenDto, localVarRequestOptions, configuration)
402
494
 
403
495
  return {
404
496
  url: toPathString(localVarUrlObj),
@@ -406,17 +498,16 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
406
498
  };
407
499
  },
408
500
  /**
409
- * Get new access token, new refresh token.
410
- * @summary Refresh token by customer
411
- * @param {RefreshTokenDto} refreshTokenDto
412
- * @param {string} [cookie] HTTP only cookie that was sent during login.
501
+ * Change customer\'s password using the token provided by the reset password endpoint.
502
+ * @summary Change password by customer
503
+ * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
413
504
  * @param {*} [options] Override http request option.
414
505
  * @throws {RequiredError}
415
506
  */
416
- refreshToken: async (refreshTokenDto: RefreshTokenDto, cookie?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
417
- // verify required parameter 'refreshTokenDto' is not null or undefined
418
- assertParamExists('refreshToken', 'refreshTokenDto', refreshTokenDto)
419
- const localVarPath = `/v1/customers/refresh-token`;
507
+ resetPassword: async (resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
508
+ // verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
509
+ assertParamExists('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto)
510
+ const localVarPath = `/v1/customers/reset-password`;
420
511
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
421
512
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
422
513
  let baseOptions;
@@ -430,10 +521,6 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
430
521
  const localVarHeaderParameter = {} as any;
431
522
  const localVarQueryParameter = {} as any;
432
523
 
433
- if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
434
- localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
435
- }
436
-
437
524
 
438
525
 
439
526
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -441,7 +528,7 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
441
528
  setSearchParams(localVarUrlObj, localVarQueryParameter);
442
529
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
443
530
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
444
- localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenDto, localVarRequestOptions, configuration)
531
+ localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration)
445
532
 
446
533
  return {
447
534
  url: toPathString(localVarUrlObj),
@@ -449,16 +536,16 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
449
536
  };
450
537
  },
451
538
  /**
452
- * Change customer\'s password using the token provided by the reset password endpoint.
453
- * @summary Change password by customer
454
- * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
539
+ * Respond to the auth challenge to get new access token, refresh token after successful login.
540
+ * @summary Respond to auth challenge by customer
541
+ * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
455
542
  * @param {*} [options] Override http request option.
456
543
  * @throws {RequiredError}
457
544
  */
458
- resetPassword: async (resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
459
- // verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
460
- assertParamExists('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto)
461
- const localVarPath = `/v1/customers/reset-password`;
545
+ respondToAuthChallenge: async (respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
546
+ // verify required parameter 'respondToAuthChallengeRequestDto' is not null or undefined
547
+ assertParamExists('respondToAuthChallenge', 'respondToAuthChallengeRequestDto', respondToAuthChallengeRequestDto)
548
+ const localVarPath = `/v1/customers/auth/respond`;
462
549
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
463
550
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
464
551
  let baseOptions;
@@ -479,7 +566,7 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
479
566
  setSearchParams(localVarUrlObj, localVarQueryParameter);
480
567
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
481
568
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
482
- localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration)
569
+ localVarRequestOptions.data = serializeDataIfNeeded(respondToAuthChallengeRequestDto, localVarRequestOptions, configuration)
483
570
 
484
571
  return {
485
572
  url: toPathString(localVarUrlObj),
@@ -597,7 +684,7 @@ export const CustomersApiFp = function(configuration?: Configuration) {
597
684
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
598
685
  },
599
686
  /**
600
- * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
687
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
601
688
  * @summary Get policy details
602
689
  * @param {string} policyCode The policy code
603
690
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
@@ -610,16 +697,39 @@ export const CustomersApiFp = function(configuration?: Configuration) {
610
697
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicy(policyCode, customerCode, expand, authorization, options);
611
698
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
612
699
  },
700
+ /**
701
+ * Start auth process to get new access token, refresh token after successful login.
702
+ * @summary Initiate auth by customer
703
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ */
707
+ async initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateAuthResponseClass>> {
708
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options);
709
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
710
+ },
613
711
  /**
614
712
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
615
- * @summary Invite a customer to register
616
- * @param {InviteCustomerRequestDto} inviteCustomerRequestDto
713
+ * @summary Invite by customer
714
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
617
715
  * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
618
716
  * @param {*} [options] Override http request option.
619
717
  * @throws {RequiredError}
620
718
  */
621
- async inviteCustomer(inviteCustomerRequestDto: InviteCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InviteCustomerResponseClass>> {
622
- const localVarAxiosArgs = await localVarAxiosParamCreator.inviteCustomer(inviteCustomerRequestDto, authorization, options);
719
+ async inviteByCustomer(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InviteByCustomerResponseClass>> {
720
+ const localVarAxiosArgs = await localVarAxiosParamCreator.inviteByCustomer(inviteByCustomerRequestDto, authorization, options);
721
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
722
+ },
723
+ /**
724
+ * 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.
725
+ * @summary Invite by tenant
726
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
727
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ */
731
+ async inviteByTenant(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InviteByTenantResponseClass>> {
732
+ const localVarAxiosArgs = await localVarAxiosParamCreator.inviteByTenant(inviteByCustomerRequestDto, authorization, options);
623
733
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
624
734
  },
625
735
  /**
@@ -658,17 +768,6 @@ export const CustomersApiFp = function(configuration?: Configuration) {
658
768
  const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options);
659
769
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
660
770
  },
661
- /**
662
- * Get new access token, refresh token after successful login.
663
- * @summary Login by customer
664
- * @param {LoginRequestDto} loginRequestDto
665
- * @param {*} [options] Override http request option.
666
- * @throws {RequiredError}
667
- */
668
- async login(loginRequestDto: LoginRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginResponseClass>> {
669
- const localVarAxiosArgs = await localVarAxiosParamCreator.login(loginRequestDto, options);
670
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
671
- },
672
771
  /**
673
772
  * Get new access token, new refresh token.
674
773
  * @summary Refresh token by customer
@@ -677,7 +776,7 @@ export const CustomersApiFp = function(configuration?: Configuration) {
677
776
  * @param {*} [options] Override http request option.
678
777
  * @throws {RequiredError}
679
778
  */
680
- async refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginResponseClass>> {
779
+ async refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
681
780
  const localVarAxiosArgs = await localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options);
682
781
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
683
782
  },
@@ -692,6 +791,17 @@ export const CustomersApiFp = function(configuration?: Configuration) {
692
791
  const localVarAxiosArgs = await localVarAxiosParamCreator.resetPassword(resetPasswordByCustomerRequestDto, options);
693
792
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
694
793
  },
794
+ /**
795
+ * Respond to the auth challenge to get new access token, refresh token after successful login.
796
+ * @summary Respond to auth challenge by customer
797
+ * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
798
+ * @param {*} [options] Override http request option.
799
+ * @throws {RequiredError}
800
+ */
801
+ async respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RespondToAuthChallengeClass>> {
802
+ const localVarAxiosArgs = await localVarAxiosParamCreator.respondToAuthChallenge(respondToAuthChallengeRequestDto, options);
803
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
804
+ },
695
805
  /**
696
806
  * Verify the invite sent to the customer via email.
697
807
  * @summary Verify customer\'s invite token
@@ -745,7 +855,7 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
745
855
  return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then((request) => request(axios, basePath));
746
856
  },
747
857
  /**
748
- * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
858
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
749
859
  * @summary Get policy details
750
860
  * @param {string} policyCode The policy code
751
861
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
@@ -757,16 +867,37 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
757
867
  getPolicy(policyCode: string, customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetPolicyResponseClass> {
758
868
  return localVarFp.getPolicy(policyCode, customerCode, expand, authorization, options).then((request) => request(axios, basePath));
759
869
  },
870
+ /**
871
+ * Start auth process to get new access token, refresh token after successful login.
872
+ * @summary Initiate auth by customer
873
+ * @param {InitiateAuthRequestDto} initiateAuthRequestDto
874
+ * @param {*} [options] Override http request option.
875
+ * @throws {RequiredError}
876
+ */
877
+ initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: any): AxiosPromise<InitiateAuthResponseClass> {
878
+ return localVarFp.initiateAuth(initiateAuthRequestDto, options).then((request) => request(axios, basePath));
879
+ },
760
880
  /**
761
881
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
762
- * @summary Invite a customer to register
763
- * @param {InviteCustomerRequestDto} inviteCustomerRequestDto
882
+ * @summary Invite by customer
883
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
764
884
  * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
765
885
  * @param {*} [options] Override http request option.
766
886
  * @throws {RequiredError}
767
887
  */
768
- inviteCustomer(inviteCustomerRequestDto: InviteCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<InviteCustomerResponseClass> {
769
- return localVarFp.inviteCustomer(inviteCustomerRequestDto, authorization, options).then((request) => request(axios, basePath));
888
+ inviteByCustomer(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<InviteByCustomerResponseClass> {
889
+ return localVarFp.inviteByCustomer(inviteByCustomerRequestDto, authorization, options).then((request) => request(axios, basePath));
890
+ },
891
+ /**
892
+ * 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.
893
+ * @summary Invite by tenant
894
+ * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
895
+ * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
896
+ * @param {*} [options] Override http request option.
897
+ * @throws {RequiredError}
898
+ */
899
+ inviteByTenant(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<InviteByTenantResponseClass> {
900
+ return localVarFp.inviteByTenant(inviteByCustomerRequestDto, authorization, options).then((request) => request(axios, basePath));
770
901
  },
771
902
  /**
772
903
  * List all the invoices of a customer
@@ -802,16 +933,6 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
802
933
  listPolicies(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<ListPoliciesResponseClass> {
803
934
  return localVarFp.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then((request) => request(axios, basePath));
804
935
  },
805
- /**
806
- * Get new access token, refresh token after successful login.
807
- * @summary Login by customer
808
- * @param {LoginRequestDto} loginRequestDto
809
- * @param {*} [options] Override http request option.
810
- * @throws {RequiredError}
811
- */
812
- login(loginRequestDto: LoginRequestDto, options?: any): AxiosPromise<LoginResponseClass> {
813
- return localVarFp.login(loginRequestDto, options).then((request) => request(axios, basePath));
814
- },
815
936
  /**
816
937
  * Get new access token, new refresh token.
817
938
  * @summary Refresh token by customer
@@ -820,7 +941,7 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
820
941
  * @param {*} [options] Override http request option.
821
942
  * @throws {RequiredError}
822
943
  */
823
- refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: any): AxiosPromise<LoginResponseClass> {
944
+ refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: any): AxiosPromise<void> {
824
945
  return localVarFp.refreshToken(refreshTokenDto, cookie, options).then((request) => request(axios, basePath));
825
946
  },
826
947
  /**
@@ -833,6 +954,16 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
833
954
  resetPassword(resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options?: any): AxiosPromise<void> {
834
955
  return localVarFp.resetPassword(resetPasswordByCustomerRequestDto, options).then((request) => request(axios, basePath));
835
956
  },
957
+ /**
958
+ * Respond to the auth challenge to get new access token, refresh token after successful login.
959
+ * @summary Respond to auth challenge by customer
960
+ * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
961
+ * @param {*} [options] Override http request option.
962
+ * @throws {RequiredError}
963
+ */
964
+ respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: any): AxiosPromise<RespondToAuthChallengeClass> {
965
+ return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then((request) => request(axios, basePath));
966
+ },
836
967
  /**
837
968
  * Verify the invite sent to the customer via email.
838
969
  * @summary Verify customer\'s invite token
@@ -920,22 +1051,57 @@ export interface CustomersApiGetPolicyRequest {
920
1051
  }
921
1052
 
922
1053
  /**
923
- * Request parameters for inviteCustomer operation in CustomersApi.
1054
+ * Request parameters for initiateAuth operation in CustomersApi.
1055
+ * @export
1056
+ * @interface CustomersApiInitiateAuthRequest
1057
+ */
1058
+ export interface CustomersApiInitiateAuthRequest {
1059
+ /**
1060
+ *
1061
+ * @type {InitiateAuthRequestDto}
1062
+ * @memberof CustomersApiInitiateAuth
1063
+ */
1064
+ readonly initiateAuthRequestDto: InitiateAuthRequestDto
1065
+ }
1066
+
1067
+ /**
1068
+ * Request parameters for inviteByCustomer operation in CustomersApi.
924
1069
  * @export
925
- * @interface CustomersApiInviteCustomerRequest
1070
+ * @interface CustomersApiInviteByCustomerRequest
926
1071
  */
927
- export interface CustomersApiInviteCustomerRequest {
1072
+ export interface CustomersApiInviteByCustomerRequest {
928
1073
  /**
929
1074
  *
930
- * @type {InviteCustomerRequestDto}
931
- * @memberof CustomersApiInviteCustomer
1075
+ * @type {InviteByCustomerRequestDto}
1076
+ * @memberof CustomersApiInviteByCustomer
932
1077
  */
933
- readonly inviteCustomerRequestDto: InviteCustomerRequestDto
1078
+ readonly inviteByCustomerRequestDto: InviteByCustomerRequestDto
934
1079
 
935
1080
  /**
936
1081
  * Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
937
1082
  * @type {string}
938
- * @memberof CustomersApiInviteCustomer
1083
+ * @memberof CustomersApiInviteByCustomer
1084
+ */
1085
+ readonly authorization?: string
1086
+ }
1087
+
1088
+ /**
1089
+ * Request parameters for inviteByTenant operation in CustomersApi.
1090
+ * @export
1091
+ * @interface CustomersApiInviteByTenantRequest
1092
+ */
1093
+ export interface CustomersApiInviteByTenantRequest {
1094
+ /**
1095
+ *
1096
+ * @type {InviteByCustomerRequestDto}
1097
+ * @memberof CustomersApiInviteByTenant
1098
+ */
1099
+ readonly inviteByCustomerRequestDto: InviteByCustomerRequestDto
1100
+
1101
+ /**
1102
+ * Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken
1103
+ * @type {string}
1104
+ * @memberof CustomersApiInviteByTenant
939
1105
  */
940
1106
  readonly authorization?: string
941
1107
  }
@@ -1066,20 +1232,6 @@ export interface CustomersApiListPoliciesRequest {
1066
1232
  readonly authorization?: string
1067
1233
  }
1068
1234
 
1069
- /**
1070
- * Request parameters for login operation in CustomersApi.
1071
- * @export
1072
- * @interface CustomersApiLoginRequest
1073
- */
1074
- export interface CustomersApiLoginRequest {
1075
- /**
1076
- *
1077
- * @type {LoginRequestDto}
1078
- * @memberof CustomersApiLogin
1079
- */
1080
- readonly loginRequestDto: LoginRequestDto
1081
- }
1082
-
1083
1235
  /**
1084
1236
  * Request parameters for refreshToken operation in CustomersApi.
1085
1237
  * @export
@@ -1115,6 +1267,20 @@ export interface CustomersApiResetPasswordRequest {
1115
1267
  readonly resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto
1116
1268
  }
1117
1269
 
1270
+ /**
1271
+ * Request parameters for respondToAuthChallenge operation in CustomersApi.
1272
+ * @export
1273
+ * @interface CustomersApiRespondToAuthChallengeRequest
1274
+ */
1275
+ export interface CustomersApiRespondToAuthChallengeRequest {
1276
+ /**
1277
+ *
1278
+ * @type {RespondToAuthChallengeRequestDto}
1279
+ * @memberof CustomersApiRespondToAuthChallenge
1280
+ */
1281
+ readonly respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto
1282
+ }
1283
+
1118
1284
  /**
1119
1285
  * Request parameters for verifyInvite operation in CustomersApi.
1120
1286
  * @export
@@ -1175,7 +1341,7 @@ export class CustomersApi extends BaseAPI {
1175
1341
  }
1176
1342
 
1177
1343
  /**
1178
- * Get detailed policy that belongs to a customer. The details can be expanded using expand query parameter.
1344
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
1179
1345
  * @summary Get policy details
1180
1346
  * @param {CustomersApiGetPolicyRequest} requestParameters Request parameters.
1181
1347
  * @param {*} [options] Override http request option.
@@ -1186,16 +1352,40 @@ export class CustomersApi extends BaseAPI {
1186
1352
  return CustomersApiFp(this.configuration).getPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1187
1353
  }
1188
1354
 
1355
+ /**
1356
+ * Start auth process to get new access token, refresh token after successful login.
1357
+ * @summary Initiate auth by customer
1358
+ * @param {CustomersApiInitiateAuthRequest} requestParameters Request parameters.
1359
+ * @param {*} [options] Override http request option.
1360
+ * @throws {RequiredError}
1361
+ * @memberof CustomersApi
1362
+ */
1363
+ public initiateAuth(requestParameters: CustomersApiInitiateAuthRequest, options?: AxiosRequestConfig) {
1364
+ return CustomersApiFp(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then((request) => request(this.axios, this.basePath));
1365
+ }
1366
+
1367
+ /**
1368
+ * 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.
1369
+ * @summary Invite by customer
1370
+ * @param {CustomersApiInviteByCustomerRequest} requestParameters Request parameters.
1371
+ * @param {*} [options] Override http request option.
1372
+ * @throws {RequiredError}
1373
+ * @memberof CustomersApi
1374
+ */
1375
+ public inviteByCustomer(requestParameters: CustomersApiInviteByCustomerRequest, options?: AxiosRequestConfig) {
1376
+ return CustomersApiFp(this.configuration).inviteByCustomer(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1377
+ }
1378
+
1189
1379
  /**
1190
1380
  * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1191
- * @summary Invite a customer to register
1192
- * @param {CustomersApiInviteCustomerRequest} requestParameters Request parameters.
1381
+ * @summary Invite by tenant
1382
+ * @param {CustomersApiInviteByTenantRequest} requestParameters Request parameters.
1193
1383
  * @param {*} [options] Override http request option.
1194
1384
  * @throws {RequiredError}
1195
1385
  * @memberof CustomersApi
1196
1386
  */
1197
- public inviteCustomer(requestParameters: CustomersApiInviteCustomerRequest, options?: AxiosRequestConfig) {
1198
- return CustomersApiFp(this.configuration).inviteCustomer(requestParameters.inviteCustomerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1387
+ public inviteByTenant(requestParameters: CustomersApiInviteByTenantRequest, options?: AxiosRequestConfig) {
1388
+ return CustomersApiFp(this.configuration).inviteByTenant(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1199
1389
  }
1200
1390
 
1201
1391
  /**
@@ -1222,18 +1412,6 @@ export class CustomersApi extends BaseAPI {
1222
1412
  return CustomersApiFp(this.configuration).listPolicies(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1223
1413
  }
1224
1414
 
1225
- /**
1226
- * Get new access token, refresh token after successful login.
1227
- * @summary Login by customer
1228
- * @param {CustomersApiLoginRequest} requestParameters Request parameters.
1229
- * @param {*} [options] Override http request option.
1230
- * @throws {RequiredError}
1231
- * @memberof CustomersApi
1232
- */
1233
- public login(requestParameters: CustomersApiLoginRequest, options?: AxiosRequestConfig) {
1234
- return CustomersApiFp(this.configuration).login(requestParameters.loginRequestDto, options).then((request) => request(this.axios, this.basePath));
1235
- }
1236
-
1237
1415
  /**
1238
1416
  * Get new access token, new refresh token.
1239
1417
  * @summary Refresh token by customer
@@ -1258,6 +1436,18 @@ export class CustomersApi extends BaseAPI {
1258
1436
  return CustomersApiFp(this.configuration).resetPassword(requestParameters.resetPasswordByCustomerRequestDto, options).then((request) => request(this.axios, this.basePath));
1259
1437
  }
1260
1438
 
1439
+ /**
1440
+ * Respond to the auth challenge to get new access token, refresh token after successful login.
1441
+ * @summary Respond to auth challenge by customer
1442
+ * @param {CustomersApiRespondToAuthChallengeRequest} requestParameters Request parameters.
1443
+ * @param {*} [options] Override http request option.
1444
+ * @throws {RequiredError}
1445
+ * @memberof CustomersApi
1446
+ */
1447
+ public respondToAuthChallenge(requestParameters: CustomersApiRespondToAuthChallengeRequest, options?: AxiosRequestConfig) {
1448
+ return CustomersApiFp(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then((request) => request(this.axios, this.basePath));
1449
+ }
1450
+
1261
1451
  /**
1262
1452
  * Verify the invite sent to the customer via email.
1263
1453
  * @summary Verify customer\'s invite token