@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
@@ -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 = {
@@ -4581,6 +4583,7 @@ class ApiClient {
4581
4583
 
4582
4584
 
4583
4585
 
4586
+
4584
4587
 
4585
4588
 
4586
4589
 
@@ -4621,6 +4624,7 @@ class ApiClient {
4621
4624
  logger.info('refresh token callback called', {
4622
4625
  refreshToken: this.refreshToken,
4623
4626
  refreshBackend: this.refreshBackend,
4627
+ refreshTenantId: this.refreshTenantId,
4624
4628
  refreshExpiration: this.refreshExpiration,
4625
4629
  isMobile: this.isMobile,
4626
4630
  });
@@ -4634,6 +4638,7 @@ class ApiClient {
4634
4638
  this.refreshBackend,
4635
4639
  this.refreshExpiration,
4636
4640
  this.isMobile,
4641
+ this.refreshTenantId,
4637
4642
  );
4638
4643
 
4639
4644
  logger.info('token refreshed', { token: session.token });
@@ -4675,6 +4680,10 @@ class ApiClient {
4675
4680
  this.refreshBackend = refreshBackend;
4676
4681
  }
4677
4682
 
4683
+ setRefreshTenantId(tenantId ) {
4684
+ this.refreshTenantId = tenantId;
4685
+ }
4686
+
4678
4687
  setIsMobile(isMobile ) {
4679
4688
  this.isMobile = isMobile;
4680
4689
  }
@@ -2786,12 +2786,14 @@ var authMethods = (client , baseUrl ) => ({
2786
2786
  backend ,
2787
2787
  expiration ,
2788
2788
  isMobile = false,
2789
+ tenantId ,
2789
2790
  ) => {
2790
2791
  const body = {
2791
2792
  backend: backend || DEFAULT_BACKEND_USER,
2792
2793
  expiration: expiration || DETAULT_EXPIRATION,
2793
2794
  refresh_token: refreshToken,
2794
2795
  client_id: client.clientId,
2796
+ tenant_id: tenantId,
2795
2797
  };
2796
2798
 
2797
2799
  const headers = {
@@ -5129,6 +5131,7 @@ class ApiClient {
5129
5131
 
5130
5132
 
5131
5133
 
5134
+
5132
5135
 
5133
5136
 
5134
5137
 
@@ -5169,6 +5172,7 @@ class ApiClient {
5169
5172
  logger$1.info('refresh token callback called', {
5170
5173
  refreshToken: this.refreshToken,
5171
5174
  refreshBackend: this.refreshBackend,
5175
+ refreshTenantId: this.refreshTenantId,
5172
5176
  refreshExpiration: this.refreshExpiration,
5173
5177
  isMobile: this.isMobile,
5174
5178
  });
@@ -5182,6 +5186,7 @@ class ApiClient {
5182
5186
  this.refreshBackend,
5183
5187
  this.refreshExpiration,
5184
5188
  this.isMobile,
5189
+ this.refreshTenantId,
5185
5190
  );
5186
5191
 
5187
5192
  logger$1.info('token refreshed', { token: session.token });
@@ -5223,6 +5228,10 @@ class ApiClient {
5223
5228
  this.refreshBackend = refreshBackend;
5224
5229
  }
5225
5230
 
5231
+ setRefreshTenantId(tenantId ) {
5232
+ this.refreshTenantId = tenantId;
5233
+ }
5234
+
5226
5235
  setIsMobile(isMobile ) {
5227
5236
  this.isMobile = isMobile;
5228
5237
  }
package/esm/api/auth.js CHANGED
@@ -996,12 +996,14 @@ var auth = (client , baseUrl ) => ({
996
996
  backend ,
997
997
  expiration ,
998
998
  isMobile = false,
999
+ tenantId ,
999
1000
  ) => {
1000
1001
  const body = {
1001
1002
  backend: backend || DEFAULT_BACKEND_USER,
1002
1003
  expiration: expiration || DETAULT_EXPIRATION,
1003
1004
  refresh_token: refreshToken,
1004
1005
  client_id: client.clientId,
1006
+ tenant_id: tenantId,
1005
1007
  };
1006
1008
 
1007
1009
  const headers = {
package/esm/api-client.js CHANGED
@@ -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 = {
@@ -4581,6 +4583,7 @@ class ApiClient {
4581
4583
 
4582
4584
 
4583
4585
 
4586
+
4584
4587
 
4585
4588
 
4586
4589
 
@@ -4621,6 +4624,7 @@ class ApiClient {
4621
4624
  logger.info('refresh token callback called', {
4622
4625
  refreshToken: this.refreshToken,
4623
4626
  refreshBackend: this.refreshBackend,
4627
+ refreshTenantId: this.refreshTenantId,
4624
4628
  refreshExpiration: this.refreshExpiration,
4625
4629
  isMobile: this.isMobile,
4626
4630
  });
@@ -4634,6 +4638,7 @@ class ApiClient {
4634
4638
  this.refreshBackend,
4635
4639
  this.refreshExpiration,
4636
4640
  this.isMobile,
4641
+ this.refreshTenantId,
4637
4642
  );
4638
4643
 
4639
4644
  logger.info('token refreshed', { token: session.token });
@@ -4675,6 +4680,10 @@ class ApiClient {
4675
4680
  this.refreshBackend = refreshBackend;
4676
4681
  }
4677
4682
 
4683
+ setRefreshTenantId(tenantId ) {
4684
+ this.refreshTenantId = tenantId;
4685
+ }
4686
+
4678
4687
  setIsMobile(isMobile ) {
4679
4688
  this.isMobile = isMobile;
4680
4689
  }
@@ -2256,12 +2256,14 @@ var authMethods = (client , baseUrl ) => ({
2256
2256
  backend ,
2257
2257
  expiration ,
2258
2258
  isMobile = false,
2259
+ tenantId ,
2259
2260
  ) => {
2260
2261
  const body = {
2261
2262
  backend: backend || DEFAULT_BACKEND_USER,
2262
2263
  expiration: expiration || DETAULT_EXPIRATION,
2263
2264
  refresh_token: refreshToken,
2264
2265
  client_id: client.clientId,
2266
+ tenant_id: tenantId,
2265
2267
  };
2266
2268
 
2267
2269
  const headers = {
@@ -4625,6 +4627,7 @@ class ApiClient {
4625
4627
 
4626
4628
 
4627
4629
 
4630
+
4628
4631
 
4629
4632
 
4630
4633
 
@@ -4665,6 +4668,7 @@ class ApiClient {
4665
4668
  logger$3.info('refresh token callback called', {
4666
4669
  refreshToken: this.refreshToken,
4667
4670
  refreshBackend: this.refreshBackend,
4671
+ refreshTenantId: this.refreshTenantId,
4668
4672
  refreshExpiration: this.refreshExpiration,
4669
4673
  isMobile: this.isMobile,
4670
4674
  });
@@ -4678,6 +4682,7 @@ class ApiClient {
4678
4682
  this.refreshBackend,
4679
4683
  this.refreshExpiration,
4680
4684
  this.isMobile,
4685
+ this.refreshTenantId,
4681
4686
  );
4682
4687
 
4683
4688
  logger$3.info('token refreshed', { token: session.token });
@@ -4719,6 +4724,10 @@ class ApiClient {
4719
4724
  this.refreshBackend = refreshBackend;
4720
4725
  }
4721
4726
 
4727
+ setRefreshTenantId(tenantId ) {
4728
+ this.refreshTenantId = tenantId;
4729
+ }
4730
+
4722
4731
  setIsMobile(isMobile ) {
4723
4732
  this.isMobile = isMobile;
4724
4733
  }
@@ -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 = {
@@ -4581,6 +4583,7 @@ class ApiClient {
4581
4583
 
4582
4584
 
4583
4585
 
4586
+
4584
4587
 
4585
4588
 
4586
4589
 
@@ -4621,6 +4624,7 @@ class ApiClient {
4621
4624
  logger.info('refresh token callback called', {
4622
4625
  refreshToken: this.refreshToken,
4623
4626
  refreshBackend: this.refreshBackend,
4627
+ refreshTenantId: this.refreshTenantId,
4624
4628
  refreshExpiration: this.refreshExpiration,
4625
4629
  isMobile: this.isMobile,
4626
4630
  });
@@ -4634,6 +4638,7 @@ class ApiClient {
4634
4638
  this.refreshBackend,
4635
4639
  this.refreshExpiration,
4636
4640
  this.isMobile,
4641
+ this.refreshTenantId,
4637
4642
  );
4638
4643
 
4639
4644
  logger.info('token refreshed', { token: session.token });
@@ -4675,6 +4680,10 @@ class ApiClient {
4675
4680
  this.refreshBackend = refreshBackend;
4676
4681
  }
4677
4682
 
4683
+ setRefreshTenantId(tenantId ) {
4684
+ this.refreshTenantId = tenantId;
4685
+ }
4686
+
4678
4687
  setIsMobile(isMobile ) {
4679
4688
  this.isMobile = isMobile;
4680
4689
  }
@@ -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 = {
@@ -4581,6 +4583,7 @@ class ApiClient {
4581
4583
 
4582
4584
 
4583
4585
 
4586
+
4584
4587
 
4585
4588
 
4586
4589
 
@@ -4621,6 +4624,7 @@ class ApiClient {
4621
4624
  logger.info('refresh token callback called', {
4622
4625
  refreshToken: this.refreshToken,
4623
4626
  refreshBackend: this.refreshBackend,
4627
+ refreshTenantId: this.refreshTenantId,
4624
4628
  refreshExpiration: this.refreshExpiration,
4625
4629
  isMobile: this.isMobile,
4626
4630
  });
@@ -4634,6 +4638,7 @@ class ApiClient {
4634
4638
  this.refreshBackend,
4635
4639
  this.refreshExpiration,
4636
4640
  this.isMobile,
4641
+ this.refreshTenantId,
4637
4642
  );
4638
4643
 
4639
4644
  logger.info('token refreshed', { token: session.token });
@@ -4675,6 +4680,10 @@ class ApiClient {
4675
4680
  this.refreshBackend = refreshBackend;
4676
4681
  }
4677
4682
 
4683
+ setRefreshTenantId(tenantId ) {
4684
+ this.refreshTenantId = tenantId;
4685
+ }
4686
+
4678
4687
  setIsMobile(isMobile ) {
4679
4688
  this.isMobile = isMobile;
4680
4689
  }
@@ -2256,12 +2256,14 @@ var authMethods = (client , baseUrl ) => ({
2256
2256
  backend ,
2257
2257
  expiration ,
2258
2258
  isMobile = false,
2259
+ tenantId ,
2259
2260
  ) => {
2260
2261
  const body = {
2261
2262
  backend: backend || DEFAULT_BACKEND_USER,
2262
2263
  expiration: expiration || DETAULT_EXPIRATION,
2263
2264
  refresh_token: refreshToken,
2264
2265
  client_id: client.clientId,
2266
+ tenant_id: tenantId,
2265
2267
  };
2266
2268
 
2267
2269
  const headers = {
@@ -4625,6 +4627,7 @@ class ApiClient {
4625
4627
 
4626
4628
 
4627
4629
 
4630
+
4628
4631
 
4629
4632
 
4630
4633
 
@@ -4665,6 +4668,7 @@ class ApiClient {
4665
4668
  logger$2.info('refresh token callback called', {
4666
4669
  refreshToken: this.refreshToken,
4667
4670
  refreshBackend: this.refreshBackend,
4671
+ refreshTenantId: this.refreshTenantId,
4668
4672
  refreshExpiration: this.refreshExpiration,
4669
4673
  isMobile: this.isMobile,
4670
4674
  });
@@ -4678,6 +4682,7 @@ class ApiClient {
4678
4682
  this.refreshBackend,
4679
4683
  this.refreshExpiration,
4680
4684
  this.isMobile,
4685
+ this.refreshTenantId,
4681
4686
  );
4682
4687
 
4683
4688
  logger$2.info('token refreshed', { token: session.token });
@@ -4719,6 +4724,10 @@ class ApiClient {
4719
4724
  this.refreshBackend = refreshBackend;
4720
4725
  }
4721
4726
 
4727
+ setRefreshTenantId(tenantId ) {
4728
+ this.refreshTenantId = tenantId;
4729
+ }
4730
+
4722
4731
  setIsMobile(isMobile ) {
4723
4732
  this.isMobile = isMobile;
4724
4733
  }
@@ -2786,12 +2786,14 @@ var authMethods = (client , baseUrl ) => ({
2786
2786
  backend ,
2787
2787
  expiration ,
2788
2788
  isMobile = false,
2789
+ tenantId ,
2789
2790
  ) => {
2790
2791
  const body = {
2791
2792
  backend: backend || DEFAULT_BACKEND_USER,
2792
2793
  expiration: expiration || DETAULT_EXPIRATION,
2793
2794
  refresh_token: refreshToken,
2794
2795
  client_id: client.clientId,
2796
+ tenant_id: tenantId,
2795
2797
  };
2796
2798
 
2797
2799
  const headers = {
@@ -5129,6 +5131,7 @@ class ApiClient {
5129
5131
 
5130
5132
 
5131
5133
 
5134
+
5132
5135
 
5133
5136
 
5134
5137
 
@@ -5169,6 +5172,7 @@ class ApiClient {
5169
5172
  logger$1.info('refresh token callback called', {
5170
5173
  refreshToken: this.refreshToken,
5171
5174
  refreshBackend: this.refreshBackend,
5175
+ refreshTenantId: this.refreshTenantId,
5172
5176
  refreshExpiration: this.refreshExpiration,
5173
5177
  isMobile: this.isMobile,
5174
5178
  });
@@ -5182,6 +5186,7 @@ class ApiClient {
5182
5186
  this.refreshBackend,
5183
5187
  this.refreshExpiration,
5184
5188
  this.isMobile,
5189
+ this.refreshTenantId,
5185
5190
  );
5186
5191
 
5187
5192
  logger$1.info('token refreshed', { token: session.token });
@@ -5223,6 +5228,10 @@ class ApiClient {
5223
5228
  this.refreshBackend = refreshBackend;
5224
5229
  }
5225
5230
 
5231
+ setRefreshTenantId(tenantId ) {
5232
+ this.refreshTenantId = tenantId;
5233
+ }
5234
+
5226
5235
  setIsMobile(isMobile ) {
5227
5236
  this.isMobile = isMobile;
5228
5237
  }
@@ -2786,12 +2786,14 @@ var authMethods = (client , baseUrl ) => ({
2786
2786
  backend ,
2787
2787
  expiration ,
2788
2788
  isMobile = false,
2789
+ tenantId ,
2789
2790
  ) => {
2790
2791
  const body = {
2791
2792
  backend: backend || DEFAULT_BACKEND_USER,
2792
2793
  expiration: expiration || DETAULT_EXPIRATION,
2793
2794
  refresh_token: refreshToken,
2794
2795
  client_id: client.clientId,
2796
+ tenant_id: tenantId,
2795
2797
  };
2796
2798
 
2797
2799
  const headers = {
@@ -5129,6 +5131,7 @@ class ApiClient {
5129
5131
 
5130
5132
 
5131
5133
 
5134
+
5132
5135
 
5133
5136
 
5134
5137
 
@@ -5169,6 +5172,7 @@ class ApiClient {
5169
5172
  logger$1.info('refresh token callback called', {
5170
5173
  refreshToken: this.refreshToken,
5171
5174
  refreshBackend: this.refreshBackend,
5175
+ refreshTenantId: this.refreshTenantId,
5172
5176
  refreshExpiration: this.refreshExpiration,
5173
5177
  isMobile: this.isMobile,
5174
5178
  });
@@ -5182,6 +5186,7 @@ class ApiClient {
5182
5186
  this.refreshBackend,
5183
5187
  this.refreshExpiration,
5184
5188
  this.isMobile,
5189
+ this.refreshTenantId,
5185
5190
  );
5186
5191
 
5187
5192
  logger$1.info('token refreshed', { token: session.token });
@@ -5223,6 +5228,10 @@ class ApiClient {
5223
5228
  this.refreshBackend = refreshBackend;
5224
5229
  }
5225
5230
 
5231
+ setRefreshTenantId(tenantId ) {
5232
+ this.refreshTenantId = tenantId;
5233
+ }
5234
+
5226
5235
  setIsMobile(isMobile ) {
5227
5236
  this.isMobile = isMobile;
5228
5237
  }
@@ -2447,12 +2447,14 @@ var authMethods = (client , baseUrl ) => ({
2447
2447
  backend ,
2448
2448
  expiration ,
2449
2449
  isMobile = false,
2450
+ tenantId ,
2450
2451
  ) => {
2451
2452
  const body = {
2452
2453
  backend: backend || DEFAULT_BACKEND_USER,
2453
2454
  expiration: expiration || DETAULT_EXPIRATION,
2454
2455
  refresh_token: refreshToken,
2455
2456
  client_id: client.clientId,
2457
+ tenant_id: tenantId,
2456
2458
  };
2457
2459
 
2458
2460
  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
  }
@@ -3198,12 +3198,14 @@ var authMethods = (client , baseUrl ) => ({
3198
3198
  backend ,
3199
3199
  expiration ,
3200
3200
  isMobile = false,
3201
+ tenantId ,
3201
3202
  ) => {
3202
3203
  const body = {
3203
3204
  backend: backend || DEFAULT_BACKEND_USER,
3204
3205
  expiration: expiration || DETAULT_EXPIRATION,
3205
3206
  refresh_token: refreshToken,
3206
3207
  client_id: client.clientId,
3208
+ tenant_id: tenantId,
3207
3209
  };
3208
3210
 
3209
3211
  const headers = {
@@ -4979,6 +4981,7 @@ class ApiClient {
4979
4981
 
4980
4982
 
4981
4983
 
4984
+
4982
4985
 
4983
4986
 
4984
4987
 
@@ -5019,6 +5022,7 @@ class ApiClient {
5019
5022
  logger$1.info('refresh token callback called', {
5020
5023
  refreshToken: this.refreshToken,
5021
5024
  refreshBackend: this.refreshBackend,
5025
+ refreshTenantId: this.refreshTenantId,
5022
5026
  refreshExpiration: this.refreshExpiration,
5023
5027
  isMobile: this.isMobile,
5024
5028
  });
@@ -5032,6 +5036,7 @@ class ApiClient {
5032
5036
  this.refreshBackend,
5033
5037
  this.refreshExpiration,
5034
5038
  this.isMobile,
5039
+ this.refreshTenantId,
5035
5040
  );
5036
5041
 
5037
5042
  logger$1.info('token refreshed', { token: session.token });
@@ -5073,6 +5078,10 @@ class ApiClient {
5073
5078
  this.refreshBackend = refreshBackend;
5074
5079
  }
5075
5080
 
5081
+ setRefreshTenantId(tenantId ) {
5082
+ this.refreshTenantId = tenantId;
5083
+ }
5084
+
5076
5085
  setIsMobile(isMobile ) {
5077
5086
  this.isMobile = isMobile;
5078
5087
  }
package/esm/index.js CHANGED
@@ -2259,12 +2259,14 @@ var authMethods = (client , baseUrl ) => ({
2259
2259
  backend ,
2260
2260
  expiration ,
2261
2261
  isMobile = false,
2262
+ tenantId ,
2262
2263
  ) => {
2263
2264
  const body = {
2264
2265
  backend: backend || DEFAULT_BACKEND_USER,
2265
2266
  expiration: expiration || DETAULT_EXPIRATION,
2266
2267
  refresh_token: refreshToken,
2267
2268
  client_id: client.clientId,
2269
+ tenant_id: tenantId,
2268
2270
  };
2269
2271
 
2270
2272
  const headers = {
@@ -5499,6 +5501,7 @@ class ApiClient {
5499
5501
 
5500
5502
 
5501
5503
 
5504
+
5502
5505
 
5503
5506
 
5504
5507
 
@@ -5539,6 +5542,7 @@ class ApiClient {
5539
5542
  logger$a.info('refresh token callback called', {
5540
5543
  refreshToken: this.refreshToken,
5541
5544
  refreshBackend: this.refreshBackend,
5545
+ refreshTenantId: this.refreshTenantId,
5542
5546
  refreshExpiration: this.refreshExpiration,
5543
5547
  isMobile: this.isMobile,
5544
5548
  });
@@ -5552,6 +5556,7 @@ class ApiClient {
5552
5556
  this.refreshBackend,
5553
5557
  this.refreshExpiration,
5554
5558
  this.isMobile,
5559
+ this.refreshTenantId,
5555
5560
  );
5556
5561
 
5557
5562
  logger$a.info('token refreshed', { token: session.token });
@@ -5593,6 +5598,10 @@ class ApiClient {
5593
5598
  this.refreshBackend = refreshBackend;
5594
5599
  }
5595
5600
 
5601
+ setRefreshTenantId(tenantId ) {
5602
+ this.refreshTenantId = tenantId;
5603
+ }
5604
+
5596
5605
  setIsMobile(isMobile ) {
5597
5606
  this.isMobile = isMobile;
5598
5607
  }
@@ -11767,6 +11776,13 @@ class Auth {
11767
11776
  expiration: this.expiration,
11768
11777
  mobile: this.mobile,
11769
11778
  });
11779
+
11780
+ if (backend) {
11781
+ getApiClient().setRefreshBackend(backend);
11782
+ }
11783
+
11784
+ getApiClient().setRefreshTenantId(tenantId);
11785
+
11770
11786
  return this._onAuthenticated(rawSession);
11771
11787
  }
11772
11788