@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.
@@ -3359,13 +3359,13 @@ var RECENT_GAMES_QUERY = gql`
3359
3359
  }
3360
3360
  `;
3361
3361
  var ADD_FAVORITE_GAME_MUTATION = gql`
3362
- mutation AddFavoriteGame($game: ObjectId!) {
3363
- addFavoriteGame(input: { game: $game })
3362
+ mutation AddFavoriteGame($input: AddFavoriteGameInput!) {
3363
+ addFavoriteGame(input: $input)
3364
3364
  }
3365
3365
  `;
3366
3366
  var REMOVE_FAVORITE_GAME_MUTATION = gql`
3367
- mutation RemoveFavoriteGame($game: ObjectId!) {
3368
- removeFavoriteGame(input: { game: $game })
3367
+ mutation RemoveFavoriteGame($input: RemoveFavoriteGameInput!) {
3368
+ removeFavoriteGame(input: $input)
3369
3369
  }
3370
3370
  `;
3371
3371
  var WALLET_GAMES_QUERY = gql`
@@ -4523,26 +4523,26 @@ var AuthService = class {
4523
4523
  body: JSON.stringify(input),
4524
4524
  ...version === 4 && { credentials: "include" }
4525
4525
  });
4526
- const data = await res.json();
4526
+ const body = await res.json();
4527
4527
  if (res.ok) {
4528
4528
  return {
4529
4529
  ok: true,
4530
- data
4530
+ data: version !== 1 ? body.data ?? body : body
4531
4531
  };
4532
4532
  }
4533
- if (data.code === "ACCOUNT_BLACKLISTED") {
4533
+ if (body.code === "ACCOUNT_BLACKLISTED") {
4534
4534
  return {
4535
4535
  ok: false,
4536
4536
  error: createOperationError("AccountBlacklistedError")
4537
4537
  };
4538
4538
  }
4539
- if (data.code === "MEMBER_ACCOUNT_SUSPENDED") {
4539
+ if (body.code === "MEMBER_ACCOUNT_SUSPENDED") {
4540
4540
  return {
4541
4541
  ok: false,
4542
4542
  error: createOperationError("AccountSuspendedError")
4543
4543
  };
4544
4544
  }
4545
- if (data.code === "INVALID_RECAPTCHA_RESPONSE") {
4545
+ if (body.code === "INVALID_RECAPTCHA_RESPONSE") {
4546
4546
  return {
4547
4547
  ok: false,
4548
4548
  error: createOperationError("InvalidReCAPTCHAResponseError")
@@ -4623,20 +4623,20 @@ var AuthService = class {
4623
4623
  ...version === 4 && { credentials: "include" }
4624
4624
  }
4625
4625
  );
4626
- const data = await res.json();
4626
+ const body = await res.json();
4627
4627
  if (res.ok) {
4628
4628
  return {
4629
4629
  ok: true,
4630
- data
4630
+ data: version !== 1 ? body.data ?? body : body
4631
4631
  };
4632
4632
  }
4633
- if (data.code === "ACCOUNT_BLACKLISTED") {
4633
+ if (body.code === "ACCOUNT_BLACKLISTED") {
4634
4634
  return {
4635
4635
  ok: false,
4636
4636
  error: createOperationError("AccountBlacklistedError")
4637
4637
  };
4638
4638
  }
4639
- if (data.code === "MEMBER_ACCOUNT_SUSPENDED") {
4639
+ if (body.code === "MEMBER_ACCOUNT_SUSPENDED") {
4640
4640
  return {
4641
4641
  ok: false,
4642
4642
  error: createOperationError("AccountSuspendedError")
@@ -4661,8 +4661,12 @@ var AuthService = class {
4661
4661
  }
4662
4662
  async destroySession(accessToken, version = 1) {
4663
4663
  const headers = new Headers(this.headers);
4664
- if (version !== 4) {
4665
- headers.append("Authorization", `Bearer ${accessToken}`);
4664
+ headers.append("Authorization", `Bearer ${accessToken}`);
4665
+ if (version === 3 || version === 4) {
4666
+ const fingerprint = await getFingerPrint();
4667
+ if (fingerprint) {
4668
+ headers.append("Fingerprint", fingerprint);
4669
+ }
4666
4670
  }
4667
4671
  try {
4668
4672
  const res = await fetch(