@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.
- package/dist/{chunk-3WS4U4B7.js → chunk-AIJL2W7N.js} +21 -17
- package/dist/chunk-AIJL2W7N.js.map +1 -0
- package/dist/index.cjs +56 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +38 -12
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +19 -15
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +2 -2
- package/dist/services/index.d.ts +2 -2
- package/dist/services/index.js +1 -1
- package/dist/{types-kTe_j8tm.d.cts → types-CLOj9j8f.d.cts} +6 -2
- package/dist/{types-lZQpMvHU.d.ts → types-vlbILiF3.d.ts} +6 -2
- package/package.json +1 -1
- package/dist/chunk-3WS4U4B7.js.map +0 -1
package/dist/services/index.cjs
CHANGED
|
@@ -3359,13 +3359,13 @@ var RECENT_GAMES_QUERY = gql`
|
|
|
3359
3359
|
}
|
|
3360
3360
|
`;
|
|
3361
3361
|
var ADD_FAVORITE_GAME_MUTATION = gql`
|
|
3362
|
-
mutation AddFavoriteGame($
|
|
3363
|
-
addFavoriteGame(input:
|
|
3362
|
+
mutation AddFavoriteGame($input: AddFavoriteGameInput!) {
|
|
3363
|
+
addFavoriteGame(input: $input)
|
|
3364
3364
|
}
|
|
3365
3365
|
`;
|
|
3366
3366
|
var REMOVE_FAVORITE_GAME_MUTATION = gql`
|
|
3367
|
-
mutation RemoveFavoriteGame($
|
|
3368
|
-
removeFavoriteGame(input:
|
|
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
|
|
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 (
|
|
4533
|
+
if (body.code === "ACCOUNT_BLACKLISTED") {
|
|
4534
4534
|
return {
|
|
4535
4535
|
ok: false,
|
|
4536
4536
|
error: createOperationError("AccountBlacklistedError")
|
|
4537
4537
|
};
|
|
4538
4538
|
}
|
|
4539
|
-
if (
|
|
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 (
|
|
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
|
|
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 (
|
|
4633
|
+
if (body.code === "ACCOUNT_BLACKLISTED") {
|
|
4634
4634
|
return {
|
|
4635
4635
|
ok: false,
|
|
4636
4636
|
error: createOperationError("AccountBlacklistedError")
|
|
4637
4637
|
};
|
|
4638
4638
|
}
|
|
4639
|
-
if (
|
|
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
|
-
|
|
4665
|
-
|
|
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(
|