@opexa/portal-sdk 0.59.77 → 0.59.79

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.
@@ -3348,13 +3348,13 @@ var RECENT_GAMES_QUERY = gql`
3348
3348
  }
3349
3349
  `;
3350
3350
  var ADD_FAVORITE_GAME_MUTATION = gql`
3351
- mutation AddFavoriteGame($game: ObjectId!) {
3352
- addFavoriteGame(input: { game: $game })
3351
+ mutation AddFavoriteGame($input: AddFavoriteGameInput!) {
3352
+ addFavoriteGame(input: $input)
3353
3353
  }
3354
3354
  `;
3355
3355
  var REMOVE_FAVORITE_GAME_MUTATION = gql`
3356
- mutation RemoveFavoriteGame($game: ObjectId!) {
3357
- removeFavoriteGame(input: { game: $game })
3356
+ mutation RemoveFavoriteGame($input: RemoveFavoriteGameInput!) {
3357
+ removeFavoriteGame(input: $input)
3358
3358
  }
3359
3359
  `;
3360
3360
  var WALLET_GAMES_QUERY = gql`
@@ -4494,26 +4494,26 @@ var AuthService = class {
4494
4494
  body: JSON.stringify(input),
4495
4495
  ...version === 4 && { credentials: "include" }
4496
4496
  });
4497
- const data = await res.json();
4497
+ const body = await res.json();
4498
4498
  if (res.ok) {
4499
4499
  return {
4500
4500
  ok: true,
4501
- data
4501
+ data: version !== 1 ? body.data ?? body : body
4502
4502
  };
4503
4503
  }
4504
- if (data.code === "ACCOUNT_BLACKLISTED") {
4504
+ if (body.code === "ACCOUNT_BLACKLISTED") {
4505
4505
  return {
4506
4506
  ok: false,
4507
4507
  error: createOperationError("AccountBlacklistedError")
4508
4508
  };
4509
4509
  }
4510
- if (data.code === "MEMBER_ACCOUNT_SUSPENDED") {
4510
+ if (body.code === "MEMBER_ACCOUNT_SUSPENDED") {
4511
4511
  return {
4512
4512
  ok: false,
4513
4513
  error: createOperationError("AccountSuspendedError")
4514
4514
  };
4515
4515
  }
4516
- if (data.code === "INVALID_RECAPTCHA_RESPONSE") {
4516
+ if (body.code === "INVALID_RECAPTCHA_RESPONSE") {
4517
4517
  return {
4518
4518
  ok: false,
4519
4519
  error: createOperationError("InvalidReCAPTCHAResponseError")
@@ -4594,20 +4594,20 @@ var AuthService = class {
4594
4594
  ...version === 4 && { credentials: "include" }
4595
4595
  }
4596
4596
  );
4597
- const data = await res.json();
4597
+ const body = await res.json();
4598
4598
  if (res.ok) {
4599
4599
  return {
4600
4600
  ok: true,
4601
- data
4601
+ data: version !== 1 ? body.data ?? body : body
4602
4602
  };
4603
4603
  }
4604
- if (data.code === "ACCOUNT_BLACKLISTED") {
4604
+ if (body.code === "ACCOUNT_BLACKLISTED") {
4605
4605
  return {
4606
4606
  ok: false,
4607
4607
  error: createOperationError("AccountBlacklistedError")
4608
4608
  };
4609
4609
  }
4610
- if (data.code === "MEMBER_ACCOUNT_SUSPENDED") {
4610
+ if (body.code === "MEMBER_ACCOUNT_SUSPENDED") {
4611
4611
  return {
4612
4612
  ok: false,
4613
4613
  error: createOperationError("AccountSuspendedError")
@@ -4632,8 +4632,12 @@ var AuthService = class {
4632
4632
  }
4633
4633
  async destroySession(accessToken, version = 1) {
4634
4634
  const headers = new Headers(this.headers);
4635
- if (version !== 4) {
4636
- headers.append("Authorization", `Bearer ${accessToken}`);
4635
+ headers.append("Authorization", `Bearer ${accessToken}`);
4636
+ if (version === 3 || version === 4) {
4637
+ const fingerprint = await getFingerPrint();
4638
+ if (fingerprint) {
4639
+ headers.append("Fingerprint", fingerprint);
4640
+ }
4637
4641
  }
4638
4642
  try {
4639
4643
  const res = await fetch(
@@ -6513,5 +6517,5 @@ var ExtensionService = class {
6513
6517
  };
6514
6518
 
6515
6519
  export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService, getFingerPrint };
6516
- //# sourceMappingURL=chunk-3WS4U4B7.js.map
6517
- //# sourceMappingURL=chunk-3WS4U4B7.js.map
6520
+ //# sourceMappingURL=chunk-AIJL2W7N.js.map
6521
+ //# sourceMappingURL=chunk-AIJL2W7N.js.map