@opexa/portal-sdk 0.59.7 → 0.59.9

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
@@ -2290,6 +2290,10 @@ declare class Sdk {
2290
2290
  unmarkGameAsFavorite(input: UnmarkGameAsFavoriteInput): Promise<UnmarkGameAsFavoriteReturn>;
2291
2291
  favoriteGames(): Promise<FavoriteGamesReturn>;
2292
2292
  file(id: string): Promise<FileReturn>;
2293
+ /**
2294
+ * Similar to `file` query but uses the account service.
2295
+ */
2296
+ _file(id: string): Promise<FileReturn>;
2293
2297
  uploadImageFile(input: UploadImageFileInput): Promise<UploadImageFileReturn>;
2294
2298
  pointsWallet(): Promise<PointsWalletReturn>;
2295
2299
  redeemPoints(input: RedeemPointsInput): Promise<RedeemPointsReturn>;
package/dist/index.d.ts CHANGED
@@ -2290,6 +2290,10 @@ declare class Sdk {
2290
2290
  unmarkGameAsFavorite(input: UnmarkGameAsFavoriteInput): Promise<UnmarkGameAsFavoriteReturn>;
2291
2291
  favoriteGames(): Promise<FavoriteGamesReturn>;
2292
2292
  file(id: string): Promise<FileReturn>;
2293
+ /**
2294
+ * Similar to `file` query but uses the account service.
2295
+ */
2296
+ _file(id: string): Promise<FileReturn>;
2293
2297
  uploadImageFile(input: UploadImageFileInput): Promise<UploadImageFileReturn>;
2294
2298
  pointsWallet(): Promise<PointsWalletReturn>;
2295
2299
  redeemPoints(input: RedeemPointsInput): Promise<RedeemPointsReturn>;
package/dist/index.js CHANGED
@@ -4036,6 +4036,17 @@ var AccountService = class {
4036
4036
  data: res.data.memberVerificationRequestAutomaticApprovalEnabled
4037
4037
  };
4038
4038
  }
4039
+ async file(variables) {
4040
+ const res = await this.client.request(
4041
+ FILE_QUERY,
4042
+ variables
4043
+ );
4044
+ if (!res.ok) return res;
4045
+ return {
4046
+ ok: true,
4047
+ data: res.data.node
4048
+ };
4049
+ }
4039
4050
  };
4040
4051
 
4041
4052
  // src/utils/status-code-to-operation-error.ts
@@ -9064,6 +9075,7 @@ var Sdk = class {
9064
9075
  logs
9065
9076
  };
9066
9077
  this.collectMetaDetails();
9078
+ this.initMarketDomain();
9067
9079
  }
9068
9080
  _fetch = null;
9069
9081
  _middleware;
@@ -9108,9 +9120,8 @@ var Sdk = class {
9108
9120
  const searchParams = new URLSearchParams(window.location.search);
9109
9121
  const hostname = window.location.hostname;
9110
9122
  const market = searchParams.get("market");
9111
- const marketPattern = /^[a-zA-Z0-9]{3,10}(-[a-zA-Z0-9]{3,10}){0,2}$/;
9112
9123
  const adClickId = this.adManager.clickId;
9113
- if (market && marketPattern.test(market)) {
9124
+ if (market) {
9114
9125
  sessionStorage.setItem("domain", `${hostname}/${market}`);
9115
9126
  } else if (adClickId) {
9116
9127
  sessionStorage.setItem("domain", `${hostname}/meta-ads`);
@@ -10798,6 +10809,17 @@ var Sdk = class {
10798
10809
  data: res.data ? this.transformer.transform.file(res.data) : null
10799
10810
  };
10800
10811
  }
10812
+ /**
10813
+ * Similar to `file` query but uses the account service.
10814
+ */
10815
+ async _file(id) {
10816
+ const res = await this.accountService.file({ id });
10817
+ if (!res.ok) return res;
10818
+ return {
10819
+ ok: true,
10820
+ data: res.data ? this.transformer.transform.file(res.data) : null
10821
+ };
10822
+ }
10801
10823
  async uploadImageFile(input) {
10802
10824
  const id = input.id ?? ObjectId.generate(ObjectType.File).toString();
10803
10825
  const res = await this.fileService.uploadPrivateImageFile({