@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
@@ -2795,12 +2795,14 @@ var authMethods = (client , baseUrl ) => ({
2795
2795
  backend ,
2796
2796
  expiration ,
2797
2797
  isMobile = false,
2798
+ tenantId ,
2798
2799
  ) => {
2799
2800
  const body = {
2800
2801
  backend: backend || DEFAULT_BACKEND_USER,
2801
2802
  expiration: expiration || DETAULT_EXPIRATION,
2802
2803
  refresh_token: refreshToken,
2803
2804
  client_id: client.clientId,
2805
+ tenant_id: tenantId,
2804
2806
  };
2805
2807
 
2806
2808
  const headers = {
@@ -5138,6 +5140,7 @@ class ApiClient {
5138
5140
 
5139
5141
 
5140
5142
 
5143
+
5141
5144
 
5142
5145
 
5143
5146
 
@@ -5178,6 +5181,7 @@ class ApiClient {
5178
5181
  logger$1.info('refresh token callback called', {
5179
5182
  refreshToken: this.refreshToken,
5180
5183
  refreshBackend: this.refreshBackend,
5184
+ refreshTenantId: this.refreshTenantId,
5181
5185
  refreshExpiration: this.refreshExpiration,
5182
5186
  isMobile: this.isMobile,
5183
5187
  });
@@ -5191,6 +5195,7 @@ class ApiClient {
5191
5195
  this.refreshBackend,
5192
5196
  this.refreshExpiration,
5193
5197
  this.isMobile,
5198
+ this.refreshTenantId,
5194
5199
  );
5195
5200
 
5196
5201
  logger$1.info('token refreshed', { token: session.token });
@@ -5232,6 +5237,10 @@ class ApiClient {
5232
5237
  this.refreshBackend = refreshBackend;
5233
5238
  }
5234
5239
 
5240
+ setRefreshTenantId(tenantId ) {
5241
+ this.refreshTenantId = tenantId;
5242
+ }
5243
+
5235
5244
  setIsMobile(isMobile ) {
5236
5245
  this.isMobile = isMobile;
5237
5246
  }
@@ -2795,12 +2795,14 @@ var authMethods = (client , baseUrl ) => ({
2795
2795
  backend ,
2796
2796
  expiration ,
2797
2797
  isMobile = false,
2798
+ tenantId ,
2798
2799
  ) => {
2799
2800
  const body = {
2800
2801
  backend: backend || DEFAULT_BACKEND_USER,
2801
2802
  expiration: expiration || DETAULT_EXPIRATION,
2802
2803
  refresh_token: refreshToken,
2803
2804
  client_id: client.clientId,
2805
+ tenant_id: tenantId,
2804
2806
  };
2805
2807
 
2806
2808
  const headers = {
@@ -5138,6 +5140,7 @@ class ApiClient {
5138
5140
 
5139
5141
 
5140
5142
 
5143
+
5141
5144
 
5142
5145
 
5143
5146
 
@@ -5178,6 +5181,7 @@ class ApiClient {
5178
5181
  logger$1.info('refresh token callback called', {
5179
5182
  refreshToken: this.refreshToken,
5180
5183
  refreshBackend: this.refreshBackend,
5184
+ refreshTenantId: this.refreshTenantId,
5181
5185
  refreshExpiration: this.refreshExpiration,
5182
5186
  isMobile: this.isMobile,
5183
5187
  });
@@ -5191,6 +5195,7 @@ class ApiClient {
5191
5195
  this.refreshBackend,
5192
5196
  this.refreshExpiration,
5193
5197
  this.isMobile,
5198
+ this.refreshTenantId,
5194
5199
  );
5195
5200
 
5196
5201
  logger$1.info('token refreshed', { token: session.token });
@@ -5232,6 +5237,10 @@ class ApiClient {
5232
5237
  this.refreshBackend = refreshBackend;
5233
5238
  }
5234
5239
 
5240
+ setRefreshTenantId(tenantId ) {
5241
+ this.refreshTenantId = tenantId;
5242
+ }
5243
+
5235
5244
  setIsMobile(isMobile ) {
5236
5245
  this.isMobile = isMobile;
5237
5246
  }
@@ -2453,12 +2453,14 @@ var authMethods = (client , baseUrl ) => ({
2453
2453
  backend ,
2454
2454
  expiration ,
2455
2455
  isMobile = false,
2456
+ tenantId ,
2456
2457
  ) => {
2457
2458
  const body = {
2458
2459
  backend: backend || DEFAULT_BACKEND_USER,
2459
2460
  expiration: expiration || DETAULT_EXPIRATION,
2460
2461
  refresh_token: refreshToken,
2461
2462
  client_id: client.clientId,
2463
+ tenant_id: tenantId,
2462
2464
  };
2463
2465
 
2464
2466
  const headers = {
@@ -4572,6 +4574,7 @@ class ApiClient {
4572
4574
 
4573
4575
 
4574
4576
 
4577
+
4575
4578
 
4576
4579
 
4577
4580
 
@@ -4612,6 +4615,7 @@ class ApiClient {
4612
4615
  logger.info('refresh token callback called', {
4613
4616
  refreshToken: this.refreshToken,
4614
4617
  refreshBackend: this.refreshBackend,
4618
+ refreshTenantId: this.refreshTenantId,
4615
4619
  refreshExpiration: this.refreshExpiration,
4616
4620
  isMobile: this.isMobile,
4617
4621
  });
@@ -4625,6 +4629,7 @@ class ApiClient {
4625
4629
  this.refreshBackend,
4626
4630
  this.refreshExpiration,
4627
4631
  this.isMobile,
4632
+ this.refreshTenantId,
4628
4633
  );
4629
4634
 
4630
4635
  logger.info('token refreshed', { token: session.token });
@@ -4666,6 +4671,10 @@ class ApiClient {
4666
4671
  this.refreshBackend = refreshBackend;
4667
4672
  }
4668
4673
 
4674
+ setRefreshTenantId(tenantId ) {
4675
+ this.refreshTenantId = tenantId;
4676
+ }
4677
+
4669
4678
  setIsMobile(isMobile ) {
4670
4679
  this.isMobile = isMobile;
4671
4680
  }
@@ -2246,12 +2246,14 @@ var authMethods = (client , baseUrl ) => ({
2246
2246
  backend ,
2247
2247
  expiration ,
2248
2248
  isMobile = false,
2249
+ tenantId ,
2249
2250
  ) => {
2250
2251
  const body = {
2251
2252
  backend: backend || DEFAULT_BACKEND_USER,
2252
2253
  expiration: expiration || DETAULT_EXPIRATION,
2253
2254
  refresh_token: refreshToken,
2254
2255
  client_id: client.clientId,
2256
+ tenant_id: tenantId,
2255
2257
  };
2256
2258
 
2257
2259
  const headers = {
@@ -4574,6 +4576,7 @@ class ApiClient {
4574
4576
 
4575
4577
 
4576
4578
 
4579
+
4577
4580
 
4578
4581
 
4579
4582
 
@@ -4614,6 +4617,7 @@ class ApiClient {
4614
4617
  logger.info('refresh token callback called', {
4615
4618
  refreshToken: this.refreshToken,
4616
4619
  refreshBackend: this.refreshBackend,
4620
+ refreshTenantId: this.refreshTenantId,
4617
4621
  refreshExpiration: this.refreshExpiration,
4618
4622
  isMobile: this.isMobile,
4619
4623
  });
@@ -4627,6 +4631,7 @@ class ApiClient {
4627
4631
  this.refreshBackend,
4628
4632
  this.refreshExpiration,
4629
4633
  this.isMobile,
4634
+ this.refreshTenantId,
4630
4635
  );
4631
4636
 
4632
4637
  logger.info('token refreshed', { token: session.token });
@@ -4668,6 +4673,10 @@ class ApiClient {
4668
4673
  this.refreshBackend = refreshBackend;
4669
4674
  }
4670
4675
 
4676
+ setRefreshTenantId(tenantId ) {
4677
+ this.refreshTenantId = tenantId;
4678
+ }
4679
+
4671
4680
  setIsMobile(isMobile ) {
4672
4681
  this.isMobile = isMobile;
4673
4682
  }
@@ -3207,12 +3207,14 @@ var authMethods = (client , baseUrl ) => ({
3207
3207
  backend ,
3208
3208
  expiration ,
3209
3209
  isMobile = false,
3210
+ tenantId ,
3210
3211
  ) => {
3211
3212
  const body = {
3212
3213
  backend: backend || DEFAULT_BACKEND_USER,
3213
3214
  expiration: expiration || DETAULT_EXPIRATION,
3214
3215
  refresh_token: refreshToken,
3215
3216
  client_id: client.clientId,
3217
+ tenant_id: tenantId,
3216
3218
  };
3217
3219
 
3218
3220
  const headers = {
@@ -4988,6 +4990,7 @@ class ApiClient {
4988
4990
 
4989
4991
 
4990
4992
 
4993
+
4991
4994
 
4992
4995
 
4993
4996
 
@@ -5028,6 +5031,7 @@ class ApiClient {
5028
5031
  logger$1.info('refresh token callback called', {
5029
5032
  refreshToken: this.refreshToken,
5030
5033
  refreshBackend: this.refreshBackend,
5034
+ refreshTenantId: this.refreshTenantId,
5031
5035
  refreshExpiration: this.refreshExpiration,
5032
5036
  isMobile: this.isMobile,
5033
5037
  });
@@ -5041,6 +5045,7 @@ class ApiClient {
5041
5045
  this.refreshBackend,
5042
5046
  this.refreshExpiration,
5043
5047
  this.isMobile,
5048
+ this.refreshTenantId,
5044
5049
  );
5045
5050
 
5046
5051
  logger$1.info('token refreshed', { token: session.token });
@@ -5082,6 +5087,10 @@ class ApiClient {
5082
5087
  this.refreshBackend = refreshBackend;
5083
5088
  }
5084
5089
 
5090
+ setRefreshTenantId(tenantId ) {
5091
+ this.refreshTenantId = tenantId;
5092
+ }
5093
+
5085
5094
  setIsMobile(isMobile ) {
5086
5095
  this.isMobile = isMobile;
5087
5096
  }
package/lib/index.js CHANGED
@@ -2270,12 +2270,14 @@ var authMethods = (client , baseUrl ) => ({
2270
2270
  backend ,
2271
2271
  expiration ,
2272
2272
  isMobile = false,
2273
+ tenantId ,
2273
2274
  ) => {
2274
2275
  const body = {
2275
2276
  backend: backend || DEFAULT_BACKEND_USER,
2276
2277
  expiration: expiration || DETAULT_EXPIRATION,
2277
2278
  refresh_token: refreshToken,
2278
2279
  client_id: client.clientId,
2280
+ tenant_id: tenantId,
2279
2281
  };
2280
2282
 
2281
2283
  const headers = {
@@ -5510,6 +5512,7 @@ class ApiClient {
5510
5512
 
5511
5513
 
5512
5514
 
5515
+
5513
5516
 
5514
5517
 
5515
5518
 
@@ -5550,6 +5553,7 @@ class ApiClient {
5550
5553
  logger$a.info('refresh token callback called', {
5551
5554
  refreshToken: this.refreshToken,
5552
5555
  refreshBackend: this.refreshBackend,
5556
+ refreshTenantId: this.refreshTenantId,
5553
5557
  refreshExpiration: this.refreshExpiration,
5554
5558
  isMobile: this.isMobile,
5555
5559
  });
@@ -5563,6 +5567,7 @@ class ApiClient {
5563
5567
  this.refreshBackend,
5564
5568
  this.refreshExpiration,
5565
5569
  this.isMobile,
5570
+ this.refreshTenantId,
5566
5571
  );
5567
5572
 
5568
5573
  logger$a.info('token refreshed', { token: session.token });
@@ -5604,6 +5609,10 @@ class ApiClient {
5604
5609
  this.refreshBackend = refreshBackend;
5605
5610
  }
5606
5611
 
5612
+ setRefreshTenantId(tenantId ) {
5613
+ this.refreshTenantId = tenantId;
5614
+ }
5615
+
5607
5616
  setIsMobile(isMobile ) {
5608
5617
  this.isMobile = isMobile;
5609
5618
  }
@@ -11778,6 +11787,13 @@ class Auth {
11778
11787
  expiration: this.expiration,
11779
11788
  mobile: this.mobile,
11780
11789
  });
11790
+
11791
+ if (backend) {
11792
+ getApiClient().setRefreshBackend(backend);
11793
+ }
11794
+
11795
+ getApiClient().setRefreshTenantId(tenantId);
11796
+
11781
11797
  return this._onAuthenticated(rawSession);
11782
11798
  }
11783
11799
 
@@ -2784,12 +2784,14 @@ var authMethods = (client , baseUrl ) => ({
2784
2784
  backend ,
2785
2785
  expiration ,
2786
2786
  isMobile = false,
2787
+ tenantId ,
2787
2788
  ) => {
2788
2789
  const body = {
2789
2790
  backend: backend || DEFAULT_BACKEND_USER,
2790
2791
  expiration: expiration || DETAULT_EXPIRATION,
2791
2792
  refresh_token: refreshToken,
2792
2793
  client_id: client.clientId,
2794
+ tenant_id: tenantId,
2793
2795
  };
2794
2796
 
2795
2797
  const headers = {
@@ -4572,6 +4574,7 @@ class ApiClient {
4572
4574
 
4573
4575
 
4574
4576
 
4577
+
4575
4578
 
4576
4579
 
4577
4580
 
@@ -4612,6 +4615,7 @@ class ApiClient {
4612
4615
  logger.info('refresh token callback called', {
4613
4616
  refreshToken: this.refreshToken,
4614
4617
  refreshBackend: this.refreshBackend,
4618
+ refreshTenantId: this.refreshTenantId,
4615
4619
  refreshExpiration: this.refreshExpiration,
4616
4620
  isMobile: this.isMobile,
4617
4621
  });
@@ -4625,6 +4629,7 @@ class ApiClient {
4625
4629
  this.refreshBackend,
4626
4630
  this.refreshExpiration,
4627
4631
  this.isMobile,
4632
+ this.refreshTenantId,
4628
4633
  );
4629
4634
 
4630
4635
  logger.info('token refreshed', { token: session.token });
@@ -4666,6 +4671,10 @@ class ApiClient {
4666
4671
  this.refreshBackend = refreshBackend;
4667
4672
  }
4668
4673
 
4674
+ setRefreshTenantId(tenantId ) {
4675
+ this.refreshTenantId = tenantId;
4676
+ }
4677
+
4669
4678
  setIsMobile(isMobile ) {
4670
4679
  this.isMobile = isMobile;
4671
4680
  }
@@ -2246,12 +2246,14 @@ var authMethods = (client , baseUrl ) => ({
2246
2246
  backend ,
2247
2247
  expiration ,
2248
2248
  isMobile = false,
2249
+ tenantId ,
2249
2250
  ) => {
2250
2251
  const body = {
2251
2252
  backend: backend || DEFAULT_BACKEND_USER,
2252
2253
  expiration: expiration || DETAULT_EXPIRATION,
2253
2254
  refresh_token: refreshToken,
2254
2255
  client_id: client.clientId,
2256
+ tenant_id: tenantId,
2255
2257
  };
2256
2258
 
2257
2259
  const headers = {
@@ -4574,6 +4576,7 @@ class ApiClient {
4574
4576
 
4575
4577
 
4576
4578
 
4579
+
4577
4580
 
4578
4581
 
4579
4582
 
@@ -4614,6 +4617,7 @@ class ApiClient {
4614
4617
  logger.info('refresh token callback called', {
4615
4618
  refreshToken: this.refreshToken,
4616
4619
  refreshBackend: this.refreshBackend,
4620
+ refreshTenantId: this.refreshTenantId,
4617
4621
  refreshExpiration: this.refreshExpiration,
4618
4622
  isMobile: this.isMobile,
4619
4623
  });
@@ -4627,6 +4631,7 @@ class ApiClient {
4627
4631
  this.refreshBackend,
4628
4632
  this.refreshExpiration,
4629
4633
  this.isMobile,
4634
+ this.refreshTenantId,
4630
4635
  );
4631
4636
 
4632
4637
  logger.info('token refreshed', { token: session.token });
@@ -4668,6 +4673,10 @@ class ApiClient {
4668
4673
  this.refreshBackend = refreshBackend;
4669
4674
  }
4670
4675
 
4676
+ setRefreshTenantId(tenantId ) {
4677
+ this.refreshTenantId = tenantId;
4678
+ }
4679
+
4671
4680
  setIsMobile(isMobile ) {
4672
4681
  this.isMobile = isMobile;
4673
4682
  }
@@ -2270,12 +2270,14 @@ var authMethods = (client , baseUrl ) => ({
2270
2270
  backend ,
2271
2271
  expiration ,
2272
2272
  isMobile = false,
2273
+ tenantId ,
2273
2274
  ) => {
2274
2275
  const body = {
2275
2276
  backend: backend || DEFAULT_BACKEND_USER,
2276
2277
  expiration: expiration || DETAULT_EXPIRATION,
2277
2278
  refresh_token: refreshToken,
2278
2279
  client_id: client.clientId,
2280
+ tenant_id: tenantId,
2279
2281
  };
2280
2282
 
2281
2283
  const headers = {
@@ -5427,6 +5429,7 @@ class ApiClient {
5427
5429
 
5428
5430
 
5429
5431
 
5432
+
5430
5433
 
5431
5434
 
5432
5435
 
@@ -5467,6 +5470,7 @@ class ApiClient {
5467
5470
  logger$a.info('refresh token callback called', {
5468
5471
  refreshToken: this.refreshToken,
5469
5472
  refreshBackend: this.refreshBackend,
5473
+ refreshTenantId: this.refreshTenantId,
5470
5474
  refreshExpiration: this.refreshExpiration,
5471
5475
  isMobile: this.isMobile,
5472
5476
  });
@@ -5480,6 +5484,7 @@ class ApiClient {
5480
5484
  this.refreshBackend,
5481
5485
  this.refreshExpiration,
5482
5486
  this.isMobile,
5487
+ this.refreshTenantId,
5483
5488
  );
5484
5489
 
5485
5490
  logger$a.info('token refreshed', { token: session.token });
@@ -5521,6 +5526,10 @@ class ApiClient {
5521
5526
  this.refreshBackend = refreshBackend;
5522
5527
  }
5523
5528
 
5529
+ setRefreshTenantId(tenantId ) {
5530
+ this.refreshTenantId = tenantId;
5531
+ }
5532
+
5524
5533
  setIsMobile(isMobile ) {
5525
5534
  this.isMobile = isMobile;
5526
5535
  }
@@ -13776,6 +13785,13 @@ class Auth {
13776
13785
  expiration: this.expiration,
13777
13786
  mobile: this.mobile,
13778
13787
  });
13788
+
13789
+ if (backend) {
13790
+ getApiClient().setRefreshBackend(backend);
13791
+ }
13792
+
13793
+ getApiClient().setRefreshTenantId(tenantId);
13794
+
13779
13795
  return this._onAuthenticated(rawSession);
13780
13796
  }
13781
13797
 
@@ -2268,12 +2268,14 @@ var authMethods = (client , baseUrl ) => ({
2268
2268
  backend ,
2269
2269
  expiration ,
2270
2270
  isMobile = false,
2271
+ tenantId ,
2271
2272
  ) => {
2272
2273
  const body = {
2273
2274
  backend: backend || DEFAULT_BACKEND_USER,
2274
2275
  expiration: expiration || DETAULT_EXPIRATION,
2275
2276
  refresh_token: refreshToken,
2276
2277
  client_id: client.clientId,
2278
+ tenant_id: tenantId,
2277
2279
  };
2278
2280
 
2279
2281
  const headers = {
@@ -5425,6 +5427,7 @@ class ApiClient {
5425
5427
 
5426
5428
 
5427
5429
 
5430
+
5428
5431
 
5429
5432
 
5430
5433
 
@@ -5465,6 +5468,7 @@ class ApiClient {
5465
5468
  logger$a.info('refresh token callback called', {
5466
5469
  refreshToken: this.refreshToken,
5467
5470
  refreshBackend: this.refreshBackend,
5471
+ refreshTenantId: this.refreshTenantId,
5468
5472
  refreshExpiration: this.refreshExpiration,
5469
5473
  isMobile: this.isMobile,
5470
5474
  });
@@ -5478,6 +5482,7 @@ class ApiClient {
5478
5482
  this.refreshBackend,
5479
5483
  this.refreshExpiration,
5480
5484
  this.isMobile,
5485
+ this.refreshTenantId,
5481
5486
  );
5482
5487
 
5483
5488
  logger$a.info('token refreshed', { token: session.token });
@@ -5519,6 +5524,10 @@ class ApiClient {
5519
5524
  this.refreshBackend = refreshBackend;
5520
5525
  }
5521
5526
 
5527
+ setRefreshTenantId(tenantId ) {
5528
+ this.refreshTenantId = tenantId;
5529
+ }
5530
+
5522
5531
  setIsMobile(isMobile ) {
5523
5532
  this.isMobile = isMobile;
5524
5533
  }
@@ -13757,6 +13766,13 @@ class Auth {
13757
13766
  expiration: this.expiration,
13758
13767
  mobile: this.mobile,
13759
13768
  });
13769
+
13770
+ if (backend) {
13771
+ getApiClient().setRefreshBackend(backend);
13772
+ }
13773
+
13774
+ getApiClient().setRefreshTenantId(tenantId);
13775
+
13760
13776
  return this._onAuthenticated(rawSession);
13761
13777
  }
13762
13778
 
@@ -2244,12 +2244,14 @@ var authMethods = (client , baseUrl ) => ({
2244
2244
  backend ,
2245
2245
  expiration ,
2246
2246
  isMobile = false,
2247
+ tenantId ,
2247
2248
  ) => {
2248
2249
  const body = {
2249
2250
  backend: backend || DEFAULT_BACKEND_USER,
2250
2251
  expiration: expiration || DETAULT_EXPIRATION,
2251
2252
  refresh_token: refreshToken,
2252
2253
  client_id: client.clientId,
2254
+ tenant_id: tenantId,
2253
2255
  };
2254
2256
 
2255
2257
  const headers = {
@@ -4572,6 +4574,7 @@ class ApiClient {
4572
4574
 
4573
4575
 
4574
4576
 
4577
+
4575
4578
 
4576
4579
 
4577
4580
 
@@ -4612,6 +4615,7 @@ class ApiClient {
4612
4615
  logger.info('refresh token callback called', {
4613
4616
  refreshToken: this.refreshToken,
4614
4617
  refreshBackend: this.refreshBackend,
4618
+ refreshTenantId: this.refreshTenantId,
4615
4619
  refreshExpiration: this.refreshExpiration,
4616
4620
  isMobile: this.isMobile,
4617
4621
  });
@@ -4625,6 +4629,7 @@ class ApiClient {
4625
4629
  this.refreshBackend,
4626
4630
  this.refreshExpiration,
4627
4631
  this.isMobile,
4632
+ this.refreshTenantId,
4628
4633
  );
4629
4634
 
4630
4635
  logger.info('token refreshed', { token: session.token });
@@ -4666,6 +4671,10 @@ class ApiClient {
4666
4671
  this.refreshBackend = refreshBackend;
4667
4672
  }
4668
4673
 
4674
+ setRefreshTenantId(tenantId ) {
4675
+ this.refreshTenantId = tenantId;
4676
+ }
4677
+
4669
4678
  setIsMobile(isMobile ) {
4670
4679
  this.isMobile = isMobile;
4671
4680
  }
@@ -2871,12 +2871,14 @@ var authMethods = (client , baseUrl ) => ({
2871
2871
  backend ,
2872
2872
  expiration ,
2873
2873
  isMobile = false,
2874
+ tenantId ,
2874
2875
  ) => {
2875
2876
  const body = {
2876
2877
  backend: backend || DEFAULT_BACKEND_USER,
2877
2878
  expiration: expiration || DETAULT_EXPIRATION,
2878
2879
  refresh_token: refreshToken,
2879
2880
  client_id: client.clientId,
2881
+ tenant_id: tenantId,
2880
2882
  };
2881
2883
 
2882
2884
  const headers = {
@@ -5425,6 +5427,7 @@ class ApiClient {
5425
5427
 
5426
5428
 
5427
5429
 
5430
+
5428
5431
 
5429
5432
 
5430
5433
 
@@ -5465,6 +5468,7 @@ class ApiClient {
5465
5468
  logger$a.info('refresh token callback called', {
5466
5469
  refreshToken: this.refreshToken,
5467
5470
  refreshBackend: this.refreshBackend,
5471
+ refreshTenantId: this.refreshTenantId,
5468
5472
  refreshExpiration: this.refreshExpiration,
5469
5473
  isMobile: this.isMobile,
5470
5474
  });
@@ -5478,6 +5482,7 @@ class ApiClient {
5478
5482
  this.refreshBackend,
5479
5483
  this.refreshExpiration,
5480
5484
  this.isMobile,
5485
+ this.refreshTenantId,
5481
5486
  );
5482
5487
 
5483
5488
  logger$a.info('token refreshed', { token: session.token });
@@ -5519,6 +5524,10 @@ class ApiClient {
5519
5524
  this.refreshBackend = refreshBackend;
5520
5525
  }
5521
5526
 
5527
+ setRefreshTenantId(tenantId ) {
5528
+ this.refreshTenantId = tenantId;
5529
+ }
5530
+
5522
5531
  setIsMobile(isMobile ) {
5523
5532
  this.isMobile = isMobile;
5524
5533
  }
@@ -10458,6 +10467,13 @@ class Auth {
10458
10467
  expiration: this.expiration,
10459
10468
  mobile: this.mobile,
10460
10469
  });
10470
+
10471
+ if (backend) {
10472
+ getApiClient().setRefreshBackend(backend);
10473
+ }
10474
+
10475
+ getApiClient().setRefreshTenantId(tenantId);
10476
+
10461
10477
  return this._onAuthenticated(rawSession);
10462
10478
  }
10463
10479