@opexa/portal-sdk 0.59.20 → 0.59.25

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.
package/dist/index.d.cts CHANGED
@@ -2054,6 +2054,7 @@ type UnregisterFCMDeviceReturn = OperationResult;
2054
2054
  type FirebaseCloudMessagingDeviceType = UnionAlias<FirebaseCloudMessagingDeviceType$1>;
2055
2055
  interface LinkFirebaseCloudMessagingDeviceInput {
2056
2056
  token: string;
2057
+ type: FirebaseCloudMessagingDeviceType;
2057
2058
  }
2058
2059
  type LinkFirebaseCloudMessagingDeviceReturn = OperationResult;
2059
2060
  interface UnlinkFirebaseCloudMessagingDeviceInput {
package/dist/index.d.ts CHANGED
@@ -2054,6 +2054,7 @@ type UnregisterFCMDeviceReturn = OperationResult;
2054
2054
  type FirebaseCloudMessagingDeviceType = UnionAlias<FirebaseCloudMessagingDeviceType$1>;
2055
2055
  interface LinkFirebaseCloudMessagingDeviceInput {
2056
2056
  token: string;
2057
+ type: FirebaseCloudMessagingDeviceType;
2057
2058
  }
2058
2059
  type LinkFirebaseCloudMessagingDeviceReturn = OperationResult;
2059
2060
  interface UnlinkFirebaseCloudMessagingDeviceInput {
package/dist/index.js CHANGED
@@ -9286,11 +9286,12 @@ var Sdk = class {
9286
9286
  }
9287
9287
  return;
9288
9288
  }
9289
+ const currentDomain = sessionStorage.getItem("domain");
9289
9290
  if (market) {
9290
9291
  sessionStorage.setItem("domain", `${hostname}/${market}`);
9291
- } else if (adClickId) {
9292
+ } else if (adClickId && !currentDomain) {
9292
9293
  sessionStorage.setItem("domain", `${hostname}/meta-ads`);
9293
- } else if (sessionStorage.getItem("domain") == null) {
9294
+ } else if (!currentDomain) {
9294
9295
  sessionStorage.setItem("domain", hostname);
9295
9296
  }
9296
9297
  if (market) {
@@ -9303,14 +9304,25 @@ var Sdk = class {
9303
9304
  }
9304
9305
  set marketDomain(value) {
9305
9306
  if (typeof window === "undefined") return;
9306
- if (value) {
9307
- sessionStorage.setItem("domain", value);
9307
+ if (Capacitor.isNativePlatform()) {
9308
+ if (value) {
9309
+ localStorage.setItem("domain", value);
9310
+ } else {
9311
+ localStorage.removeItem("domain");
9312
+ }
9308
9313
  } else {
9309
- sessionStorage.removeItem("domain");
9314
+ if (value) {
9315
+ sessionStorage.setItem("domain", value);
9316
+ } else {
9317
+ sessionStorage.removeItem("domain");
9318
+ }
9310
9319
  }
9311
9320
  }
9312
9321
  get marketDomain() {
9313
9322
  if (typeof window === "undefined") return null;
9323
+ if (Capacitor.isNativePlatform()) {
9324
+ return localStorage.getItem("domain");
9325
+ }
9314
9326
  return sessionStorage.getItem("domain");
9315
9327
  }
9316
9328
  /*