@opexa/portal-sdk 0.59.128 → 0.59.129

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.
@@ -4833,6 +4833,15 @@ function isIOSPlatform() {
4833
4833
  }
4834
4834
 
4835
4835
  // src/services/auth.service.ts
4836
+ function getCompatibleSignal(signal) {
4837
+ if (!signal) return void 0;
4838
+ try {
4839
+ new Request("about:blank", { signal });
4840
+ return signal;
4841
+ } catch {
4842
+ return void 0;
4843
+ }
4844
+ }
4836
4845
  var AuthService = class {
4837
4846
  url;
4838
4847
  graphqlClient;
@@ -5000,7 +5009,7 @@ var AuthService = class {
5000
5009
  }
5001
5010
  throw new Error("Invalid input 'type'");
5002
5011
  }
5003
- async refreshSession(refreshToken, version = 1) {
5012
+ async refreshSession(refreshToken, version = 1, signal) {
5004
5013
  const headers = new Headers(this.headers);
5005
5014
  if (version !== 4 || refreshToken) {
5006
5015
  headers.append("Authorization", `Bearer ${refreshToken}`);
@@ -5019,6 +5028,7 @@ var AuthService = class {
5019
5028
  {
5020
5029
  method: "POST",
5021
5030
  headers,
5031
+ signal: getCompatibleSignal(signal),
5022
5032
  ...version === 4 && { credentials: "include" }
5023
5033
  }
5024
5034
  );
@@ -5087,13 +5097,14 @@ var AuthService = class {
5087
5097
  return { ok: false, error: statusCodeToOperationError(500) };
5088
5098
  }
5089
5099
  }
5090
- async verifySession(accessToken) {
5100
+ async verifySession(accessToken, signal) {
5091
5101
  const headers = new Headers(this.headers);
5092
5102
  headers.append("Authorization", `Bearer ${accessToken}`);
5093
5103
  try {
5094
5104
  const res = await fetch(`${this.url}/session`, {
5095
5105
  method: "GET",
5096
- headers
5106
+ headers,
5107
+ signal: getCompatibleSignal(signal)
5097
5108
  });
5098
5109
  return res.ok;
5099
5110
  } catch {
@@ -7095,5 +7106,5 @@ var ExtensionService = class {
7095
7106
  };
7096
7107
 
7097
7108
  export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService, getFingerPrint, isIOSPlatform };
7098
- //# sourceMappingURL=chunk-JPJWVATW.js.map
7099
- //# sourceMappingURL=chunk-JPJWVATW.js.map
7109
+ //# sourceMappingURL=chunk-ROZQZKKD.js.map
7110
+ //# sourceMappingURL=chunk-ROZQZKKD.js.map