@opexa/portal-sdk 0.59.77 → 0.59.78
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/README.md +1634 -1634
- package/dist/{chunk-7APXFZ5G.js → chunk-5WRVWQBT.js} +3 -3
- package/dist/chunk-5WRVWQBT.js.map +1 -0
- package/dist/{chunk-WVFSGB7Y.js → chunk-ROBGEUSE.js} +2 -2
- package/dist/chunk-ROBGEUSE.js.map +1 -0
- package/dist/{chunk-3WS4U4B7.js → chunk-YL46WJBV.js} +13 -15
- package/dist/chunk-YL46WJBV.js.map +1 -0
- package/dist/index.cjs +45 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +38 -12
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +10 -12
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-3WS4U4B7.js.map +0 -1
- package/dist/chunk-7APXFZ5G.js.map +0 -1
- package/dist/chunk-WVFSGB7Y.js.map +0 -1
package/dist/services/index.cjs
CHANGED
|
@@ -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,9 +4661,7 @@ var AuthService = class {
|
|
|
4661
4661
|
}
|
|
4662
4662
|
async destroySession(accessToken, version = 1) {
|
|
4663
4663
|
const headers = new Headers(this.headers);
|
|
4664
|
-
|
|
4665
|
-
headers.append("Authorization", `Bearer ${accessToken}`);
|
|
4666
|
-
}
|
|
4664
|
+
headers.append("Authorization", `Bearer ${accessToken}`);
|
|
4667
4665
|
try {
|
|
4668
4666
|
const res = await fetch(
|
|
4669
4667
|
`${this.url}${version !== 1 ? `/v${version}/session` : "/session"}`,
|