@opexa/portal-sdk 0.59.79 → 0.59.80

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.
@@ -1,4 +1,5 @@
1
1
  import { gql, statusCodeToOperationError, callIfFn } from './chunk-WVFSGB7Y.js';
2
+ import { Capacitor } from '@capacitor/core';
2
3
  import { Thumbmark } from '@thumbmarkjs/thumbmarkjs';
3
4
 
4
5
  // src/services/queries.ts
@@ -4435,6 +4436,13 @@ async function getFingerPrint() {
4435
4436
  }
4436
4437
 
4437
4438
  // src/services/auth.service.ts
4439
+ function isWebPlatform() {
4440
+ try {
4441
+ return Capacitor.getPlatform() === "web";
4442
+ } catch {
4443
+ return false;
4444
+ }
4445
+ }
4438
4446
  var AuthService = class {
4439
4447
  url;
4440
4448
  options;
@@ -4488,7 +4496,9 @@ var AuthService = class {
4488
4496
  headers.set("test-pass", input.testPass);
4489
4497
  }
4490
4498
  try {
4491
- const res = await fetch(`${this.url}${version !== 1 ? `/v${version}/sessions` : "/sessions"}`, {
4499
+ const isWeb = isWebPlatform();
4500
+ const queryParam = isWeb && version === 4 ? "?type=web" : "";
4501
+ const res = await fetch(`${this.url}${version !== 1 ? `/v${version}/sessions` : "/sessions"}${queryParam}`, {
4492
4502
  method: "POST",
4493
4503
  headers,
4494
4504
  body: JSON.stringify(input),
@@ -4586,8 +4596,10 @@ var AuthService = class {
4586
4596
  }
4587
4597
  }
4588
4598
  try {
4599
+ const isWeb = isWebPlatform();
4600
+ const queryParam = isWeb && version === 4 ? "?type=web" : "";
4589
4601
  const res = await fetch(
4590
- `${this.url}${version !== 1 ? `/v${version}/session/refresh` : "/session:refresh"}`,
4602
+ `${this.url}${version !== 1 ? `/v${version}/session/refresh` : "/session:refresh"}${queryParam}`,
4591
4603
  {
4592
4604
  method: "POST",
4593
4605
  headers,
@@ -6517,5 +6529,5 @@ var ExtensionService = class {
6517
6529
  };
6518
6530
 
6519
6531
  export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService, getFingerPrint };
6520
- //# sourceMappingURL=chunk-AIJL2W7N.js.map
6521
- //# sourceMappingURL=chunk-AIJL2W7N.js.map
6532
+ //# sourceMappingURL=chunk-CBF46HKK.js.map
6533
+ //# sourceMappingURL=chunk-CBF46HKK.js.map