@wazo/sdk 0.37.38 → 0.37.39

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 (65) hide show
  1. package/dist/wazo-sdk.js +2 -2
  2. package/esm/__tests__/api-client.test.js +9 -0
  3. package/esm/__tests__/web-rtc-client.test.js +9 -0
  4. package/esm/api/auth.js +2 -0
  5. package/esm/api-client.js +9 -0
  6. package/esm/checker/Checker.js +9 -0
  7. package/esm/checker/checks/aor.js +9 -0
  8. package/esm/checker/checks/api.js +9 -0
  9. package/esm/checker/checks/index.js +9 -0
  10. package/esm/checker/checks/webrtc-transport.js +9 -0
  11. package/esm/checker/checks/webrtc.js +9 -0
  12. package/esm/domain/AdHocAPIConference.js +9 -0
  13. package/esm/domain/Features.js +9 -0
  14. package/esm/domain/Phone/CTIPhone.js +9 -0
  15. package/esm/index.js +16 -0
  16. package/esm/service/CallApi.js +9 -0
  17. package/esm/service/getApiClient.js +9 -0
  18. package/esm/simple/Auth.js +16 -0
  19. package/esm/simple/Configuration.js +16 -0
  20. package/esm/simple/Directory.js +9 -0
  21. package/esm/simple/Phone.js +16 -0
  22. package/esm/simple/index.js +16 -0
  23. package/esm/simple/room/LocalParticipant.js +16 -0
  24. package/esm/simple/room/Participant.js +16 -0
  25. package/esm/simple/room/RemoteParticipant.js +16 -0
  26. package/esm/simple/room/Room.js +16 -0
  27. package/esm/simple/room/SipRoom.js +16 -0
  28. package/esm/simple/room/Stream.js +16 -0
  29. package/esm/simple/room/__tests__/RemoteParticipant.test.js +16 -0
  30. package/esm/simple/utils.js +16 -0
  31. package/esm/web-rtc-client.js +9 -0
  32. package/lib/__tests__/api-client.test.js +9 -0
  33. package/lib/__tests__/web-rtc-client.test.js +9 -0
  34. package/lib/api/auth.js +2 -0
  35. package/lib/api-client.js +9 -0
  36. package/lib/checker/Checker.js +9 -0
  37. package/lib/checker/checks/aor.js +9 -0
  38. package/lib/checker/checks/api.js +9 -0
  39. package/lib/checker/checks/index.js +9 -0
  40. package/lib/checker/checks/webrtc-transport.js +9 -0
  41. package/lib/checker/checks/webrtc.js +9 -0
  42. package/lib/domain/AdHocAPIConference.js +9 -0
  43. package/lib/domain/Features.js +9 -0
  44. package/lib/domain/Phone/CTIPhone.js +9 -0
  45. package/lib/index.js +16 -0
  46. package/lib/service/CallApi.js +9 -0
  47. package/lib/service/getApiClient.js +9 -0
  48. package/lib/simple/Auth.js +16 -0
  49. package/lib/simple/Configuration.js +16 -0
  50. package/lib/simple/Directory.js +9 -0
  51. package/lib/simple/Phone.js +16 -0
  52. package/lib/simple/index.js +16 -0
  53. package/lib/simple/room/LocalParticipant.js +16 -0
  54. package/lib/simple/room/Participant.js +16 -0
  55. package/lib/simple/room/RemoteParticipant.js +16 -0
  56. package/lib/simple/room/Room.js +16 -0
  57. package/lib/simple/room/SipRoom.js +16 -0
  58. package/lib/simple/room/Stream.js +16 -0
  59. package/lib/simple/room/__tests__/RemoteParticipant.test.js +16 -0
  60. package/lib/simple/utils.js +16 -0
  61. package/lib/web-rtc-client.js +9 -0
  62. package/package.json +1 -1
  63. package/src/api/auth.js +2 -0
  64. package/src/api-client.js +7 -0
  65. package/src/simple/Auth.js +7 -0
@@ -2778,12 +2778,14 @@ var authMethods = (client , baseUrl ) => ({
2778
2778
  backend ,
2779
2779
  expiration ,
2780
2780
  isMobile = false,
2781
+ tenantId ,
2781
2782
  ) => {
2782
2783
  const body = {
2783
2784
  backend: backend || DEFAULT_BACKEND_USER,
2784
2785
  expiration: expiration || DETAULT_EXPIRATION,
2785
2786
  refresh_token: refreshToken,
2786
2787
  client_id: client.clientId,
2788
+ tenant_id: tenantId,
2787
2789
  };
2788
2790
 
2789
2791
  const headers = {
@@ -4566,6 +4568,7 @@ class ApiClient {
4566
4568
 
4567
4569
 
4568
4570
 
4571
+
4569
4572
 
4570
4573
 
4571
4574
 
@@ -4606,6 +4609,7 @@ class ApiClient {
4606
4609
  logger.info('refresh token callback called', {
4607
4610
  refreshToken: this.refreshToken,
4608
4611
  refreshBackend: this.refreshBackend,
4612
+ refreshTenantId: this.refreshTenantId,
4609
4613
  refreshExpiration: this.refreshExpiration,
4610
4614
  isMobile: this.isMobile,
4611
4615
  });
@@ -4619,6 +4623,7 @@ class ApiClient {
4619
4623
  this.refreshBackend,
4620
4624
  this.refreshExpiration,
4621
4625
  this.isMobile,
4626
+ this.refreshTenantId,
4622
4627
  );
4623
4628
 
4624
4629
  logger.info('token refreshed', { token: session.token });
@@ -4660,6 +4665,10 @@ class ApiClient {
4660
4665
  this.refreshBackend = refreshBackend;
4661
4666
  }
4662
4667
 
4668
+ setRefreshTenantId(tenantId ) {
4669
+ this.refreshTenantId = tenantId;
4670
+ }
4671
+
4663
4672
  setIsMobile(isMobile ) {
4664
4673
  this.isMobile = isMobile;
4665
4674
  }
@@ -2238,12 +2238,14 @@ var authMethods = (client , baseUrl ) => ({
2238
2238
  backend ,
2239
2239
  expiration ,
2240
2240
  isMobile = false,
2241
+ tenantId ,
2241
2242
  ) => {
2242
2243
  const body = {
2243
2244
  backend: backend || DEFAULT_BACKEND_USER,
2244
2245
  expiration: expiration || DETAULT_EXPIRATION,
2245
2246
  refresh_token: refreshToken,
2246
2247
  client_id: client.clientId,
2248
+ tenant_id: tenantId,
2247
2249
  };
2248
2250
 
2249
2251
  const headers = {
@@ -4566,6 +4568,7 @@ class ApiClient {
4566
4568
 
4567
4569
 
4568
4570
 
4571
+
4569
4572
 
4570
4573
 
4571
4574
 
@@ -4606,6 +4609,7 @@ class ApiClient {
4606
4609
  logger.info('refresh token callback called', {
4607
4610
  refreshToken: this.refreshToken,
4608
4611
  refreshBackend: this.refreshBackend,
4612
+ refreshTenantId: this.refreshTenantId,
4609
4613
  refreshExpiration: this.refreshExpiration,
4610
4614
  isMobile: this.isMobile,
4611
4615
  });
@@ -4619,6 +4623,7 @@ class ApiClient {
4619
4623
  this.refreshBackend,
4620
4624
  this.refreshExpiration,
4621
4625
  this.isMobile,
4626
+ this.refreshTenantId,
4622
4627
  );
4623
4628
 
4624
4629
  logger.info('token refreshed', { token: session.token });
@@ -4660,6 +4665,10 @@ class ApiClient {
4660
4665
  this.refreshBackend = refreshBackend;
4661
4666
  }
4662
4667
 
4668
+ setRefreshTenantId(tenantId ) {
4669
+ this.refreshTenantId = tenantId;
4670
+ }
4671
+
4663
4672
  setIsMobile(isMobile ) {
4664
4673
  this.isMobile = isMobile;
4665
4674
  }
@@ -2258,12 +2258,14 @@ var authMethods = (client , baseUrl ) => ({
2258
2258
  backend ,
2259
2259
  expiration ,
2260
2260
  isMobile = false,
2261
+ tenantId ,
2261
2262
  ) => {
2262
2263
  const body = {
2263
2264
  backend: backend || DEFAULT_BACKEND_USER,
2264
2265
  expiration: expiration || DETAULT_EXPIRATION,
2265
2266
  refresh_token: refreshToken,
2266
2267
  client_id: client.clientId,
2268
+ tenant_id: tenantId,
2267
2269
  };
2268
2270
 
2269
2271
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -13764,6 +13773,13 @@ class Auth {
13764
13773
  expiration: this.expiration,
13765
13774
  mobile: this.mobile,
13766
13775
  });
13776
+
13777
+ if (backend) {
13778
+ getApiClient().setRefreshBackend(backend);
13779
+ }
13780
+
13781
+ getApiClient().setRefreshTenantId(tenantId);
13782
+
13767
13783
  return this._onAuthenticated(rawSession);
13768
13784
  }
13769
13785
 
@@ -2258,12 +2258,14 @@ var authMethods = (client , baseUrl ) => ({
2258
2258
  backend ,
2259
2259
  expiration ,
2260
2260
  isMobile = false,
2261
+ tenantId ,
2261
2262
  ) => {
2262
2263
  const body = {
2263
2264
  backend: backend || DEFAULT_BACKEND_USER,
2264
2265
  expiration: expiration || DETAULT_EXPIRATION,
2265
2266
  refresh_token: refreshToken,
2266
2267
  client_id: client.clientId,
2268
+ tenant_id: tenantId,
2267
2269
  };
2268
2270
 
2269
2271
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -13747,6 +13756,13 @@ class Auth {
13747
13756
  expiration: this.expiration,
13748
13757
  mobile: this.mobile,
13749
13758
  });
13759
+
13760
+ if (backend) {
13761
+ getApiClient().setRefreshBackend(backend);
13762
+ }
13763
+
13764
+ getApiClient().setRefreshTenantId(tenantId);
13765
+
13750
13766
  return this._onAuthenticated(rawSession);
13751
13767
  }
13752
13768
 
@@ -2238,12 +2238,14 @@ var authMethods = (client , baseUrl ) => ({
2238
2238
  backend ,
2239
2239
  expiration ,
2240
2240
  isMobile = false,
2241
+ tenantId ,
2241
2242
  ) => {
2242
2243
  const body = {
2243
2244
  backend: backend || DEFAULT_BACKEND_USER,
2244
2245
  expiration: expiration || DETAULT_EXPIRATION,
2245
2246
  refresh_token: refreshToken,
2246
2247
  client_id: client.clientId,
2248
+ tenant_id: tenantId,
2247
2249
  };
2248
2250
 
2249
2251
  const headers = {
@@ -4566,6 +4568,7 @@ class ApiClient {
4566
4568
 
4567
4569
 
4568
4570
 
4571
+
4569
4572
 
4570
4573
 
4571
4574
 
@@ -4606,6 +4609,7 @@ class ApiClient {
4606
4609
  logger.info('refresh token callback called', {
4607
4610
  refreshToken: this.refreshToken,
4608
4611
  refreshBackend: this.refreshBackend,
4612
+ refreshTenantId: this.refreshTenantId,
4609
4613
  refreshExpiration: this.refreshExpiration,
4610
4614
  isMobile: this.isMobile,
4611
4615
  });
@@ -4619,6 +4623,7 @@ class ApiClient {
4619
4623
  this.refreshBackend,
4620
4624
  this.refreshExpiration,
4621
4625
  this.isMobile,
4626
+ this.refreshTenantId,
4622
4627
  );
4623
4628
 
4624
4629
  logger.info('token refreshed', { token: session.token });
@@ -4660,6 +4665,10 @@ class ApiClient {
4660
4665
  this.refreshBackend = refreshBackend;
4661
4666
  }
4662
4667
 
4668
+ setRefreshTenantId(tenantId ) {
4669
+ this.refreshTenantId = tenantId;
4670
+ }
4671
+
4663
4672
  setIsMobile(isMobile ) {
4664
4673
  this.isMobile = isMobile;
4665
4674
  }
@@ -2861,12 +2861,14 @@ var authMethods = (client , baseUrl ) => ({
2861
2861
  backend ,
2862
2862
  expiration ,
2863
2863
  isMobile = false,
2864
+ tenantId ,
2864
2865
  ) => {
2865
2866
  const body = {
2866
2867
  backend: backend || DEFAULT_BACKEND_USER,
2867
2868
  expiration: expiration || DETAULT_EXPIRATION,
2868
2869
  refresh_token: refreshToken,
2869
2870
  client_id: client.clientId,
2871
+ tenant_id: tenantId,
2870
2872
  };
2871
2873
 
2872
2874
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -10448,6 +10457,13 @@ class Auth {
10448
10457
  expiration: this.expiration,
10449
10458
  mobile: this.mobile,
10450
10459
  });
10460
+
10461
+ if (backend) {
10462
+ getApiClient().setRefreshBackend(backend);
10463
+ }
10464
+
10465
+ getApiClient().setRefreshTenantId(tenantId);
10466
+
10451
10467
  return this._onAuthenticated(rawSession);
10452
10468
  }
10453
10469
 
@@ -2258,12 +2258,14 @@ var authMethods = (client , baseUrl ) => ({
2258
2258
  backend ,
2259
2259
  expiration ,
2260
2260
  isMobile = false,
2261
+ tenantId ,
2261
2262
  ) => {
2262
2263
  const body = {
2263
2264
  backend: backend || DEFAULT_BACKEND_USER,
2264
2265
  expiration: expiration || DETAULT_EXPIRATION,
2265
2266
  refresh_token: refreshToken,
2266
2267
  client_id: client.clientId,
2268
+ tenant_id: tenantId,
2267
2269
  };
2268
2270
 
2269
2271
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -5680,6 +5689,13 @@ class Auth {
5680
5689
  expiration: this.expiration,
5681
5690
  mobile: this.mobile,
5682
5691
  });
5692
+
5693
+ if (backend) {
5694
+ getApiClient().setRefreshBackend(backend);
5695
+ }
5696
+
5697
+ getApiClient().setRefreshTenantId(tenantId);
5698
+
5683
5699
  return this._onAuthenticated(rawSession);
5684
5700
  }
5685
5701
 
@@ -2284,12 +2284,14 @@ var authMethods = (client , baseUrl ) => ({
2284
2284
  backend ,
2285
2285
  expiration ,
2286
2286
  isMobile = false,
2287
+ tenantId ,
2287
2288
  ) => {
2288
2289
  const body = {
2289
2290
  backend: backend || DEFAULT_BACKEND_USER,
2290
2291
  expiration: expiration || DETAULT_EXPIRATION,
2291
2292
  refresh_token: refreshToken,
2292
2293
  client_id: client.clientId,
2294
+ tenant_id: tenantId,
2293
2295
  };
2294
2296
 
2295
2297
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -5680,6 +5689,13 @@ class Auth {
5680
5689
  expiration: this.expiration,
5681
5690
  mobile: this.mobile,
5682
5691
  });
5692
+
5693
+ if (backend) {
5694
+ getApiClient().setRefreshBackend(backend);
5695
+ }
5696
+
5697
+ getApiClient().setRefreshTenantId(tenantId);
5698
+
5683
5699
  return this._onAuthenticated(rawSession);
5684
5700
  }
5685
5701
 
@@ -2284,12 +2284,14 @@ var authMethods = (client , baseUrl ) => ({
2284
2284
  backend ,
2285
2285
  expiration ,
2286
2286
  isMobile = false,
2287
+ tenantId ,
2287
2288
  ) => {
2288
2289
  const body = {
2289
2290
  backend: backend || DEFAULT_BACKEND_USER,
2290
2291
  expiration: expiration || DETAULT_EXPIRATION,
2291
2292
  refresh_token: refreshToken,
2292
2293
  client_id: client.clientId,
2294
+ tenant_id: tenantId,
2293
2295
  };
2294
2296
 
2295
2297
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -5680,6 +5689,13 @@ class Auth {
5680
5689
  expiration: this.expiration,
5681
5690
  mobile: this.mobile,
5682
5691
  });
5692
+
5693
+ if (backend) {
5694
+ getApiClient().setRefreshBackend(backend);
5695
+ }
5696
+
5697
+ getApiClient().setRefreshTenantId(tenantId);
5698
+
5683
5699
  return this._onAuthenticated(rawSession);
5684
5700
  }
5685
5701
 
@@ -2258,12 +2258,14 @@ var authMethods = (client , baseUrl ) => ({
2258
2258
  backend ,
2259
2259
  expiration ,
2260
2260
  isMobile = false,
2261
+ tenantId ,
2261
2262
  ) => {
2262
2263
  const body = {
2263
2264
  backend: backend || DEFAULT_BACKEND_USER,
2264
2265
  expiration: expiration || DETAULT_EXPIRATION,
2265
2266
  refresh_token: refreshToken,
2266
2267
  client_id: client.clientId,
2268
+ tenant_id: tenantId,
2267
2269
  };
2268
2270
 
2269
2271
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -5680,6 +5689,13 @@ class Auth {
5680
5689
  expiration: this.expiration,
5681
5690
  mobile: this.mobile,
5682
5691
  });
5692
+
5693
+ if (backend) {
5694
+ getApiClient().setRefreshBackend(backend);
5695
+ }
5696
+
5697
+ getApiClient().setRefreshTenantId(tenantId);
5698
+
5683
5699
  return this._onAuthenticated(rawSession);
5684
5700
  }
5685
5701
 
@@ -2258,12 +2258,14 @@ var authMethods = (client , baseUrl ) => ({
2258
2258
  backend ,
2259
2259
  expiration ,
2260
2260
  isMobile = false,
2261
+ tenantId ,
2261
2262
  ) => {
2262
2263
  const body = {
2263
2264
  backend: backend || DEFAULT_BACKEND_USER,
2264
2265
  expiration: expiration || DETAULT_EXPIRATION,
2265
2266
  refresh_token: refreshToken,
2266
2267
  client_id: client.clientId,
2268
+ tenant_id: tenantId,
2267
2269
  };
2268
2270
 
2269
2271
  const headers = {
@@ -5415,6 +5417,7 @@ class ApiClient {
5415
5417
 
5416
5418
 
5417
5419
 
5420
+
5418
5421
 
5419
5422
 
5420
5423
 
@@ -5455,6 +5458,7 @@ class ApiClient {
5455
5458
  logger$a.info('refresh token callback called', {
5456
5459
  refreshToken: this.refreshToken,
5457
5460
  refreshBackend: this.refreshBackend,
5461
+ refreshTenantId: this.refreshTenantId,
5458
5462
  refreshExpiration: this.refreshExpiration,
5459
5463
  isMobile: this.isMobile,
5460
5464
  });
@@ -5468,6 +5472,7 @@ class ApiClient {
5468
5472
  this.refreshBackend,
5469
5473
  this.refreshExpiration,
5470
5474
  this.isMobile,
5475
+ this.refreshTenantId,
5471
5476
  );
5472
5477
 
5473
5478
  logger$a.info('token refreshed', { token: session.token });
@@ -5509,6 +5514,10 @@ class ApiClient {
5509
5514
  this.refreshBackend = refreshBackend;
5510
5515
  }
5511
5516
 
5517
+ setRefreshTenantId(tenantId ) {
5518
+ this.refreshTenantId = tenantId;
5519
+ }
5520
+
5512
5521
  setIsMobile(isMobile ) {
5513
5522
  this.isMobile = isMobile;
5514
5523
  }
@@ -5680,6 +5689,13 @@ class Auth {
5680
5689
  expiration: this.expiration,
5681
5690
  mobile: this.mobile,
5682
5691
  });
5692
+
5693
+ if (backend) {
5694
+ getApiClient().setRefreshBackend(backend);
5695
+ }
5696
+
5697
+ getApiClient().setRefreshTenantId(tenantId);
5698
+
5683
5699
  return this._onAuthenticated(rawSession);
5684
5700
  }
5685
5701