@opexa/portal-sdk 0.59.79 → 0.59.80
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-AIJL2W7N.js → chunk-CBF46HKK.js} +16 -4
- package/dist/chunk-CBF46HKK.js.map +1 -0
- package/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/services/index.cjs +14 -2
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AIJL2W7N.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-
|
|
1
|
+
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-CBF46HKK.js';
|
|
2
2
|
import { GraphQLClient, isPlainObject } from './chunk-7APXFZ5G.js';
|
|
3
3
|
import './chunk-WVFSGB7Y.js';
|
|
4
4
|
import { ObjectId } from '@opexa/object-id';
|
package/dist/services/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var core = require('@capacitor/core');
|
|
3
4
|
var thumbmarkjs = require('@thumbmarkjs/thumbmarkjs');
|
|
4
5
|
|
|
5
6
|
// src/utils/gql.ts
|
|
@@ -4464,6 +4465,13 @@ var ERROR_MAP = {
|
|
|
4464
4465
|
};
|
|
4465
4466
|
|
|
4466
4467
|
// src/services/auth.service.ts
|
|
4468
|
+
function isWebPlatform() {
|
|
4469
|
+
try {
|
|
4470
|
+
return core.Capacitor.getPlatform() === "web";
|
|
4471
|
+
} catch {
|
|
4472
|
+
return false;
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4467
4475
|
var AuthService = class {
|
|
4468
4476
|
url;
|
|
4469
4477
|
options;
|
|
@@ -4517,7 +4525,9 @@ var AuthService = class {
|
|
|
4517
4525
|
headers.set("test-pass", input.testPass);
|
|
4518
4526
|
}
|
|
4519
4527
|
try {
|
|
4520
|
-
const
|
|
4528
|
+
const isWeb = isWebPlatform();
|
|
4529
|
+
const queryParam = isWeb && version === 4 ? "?type=web" : "";
|
|
4530
|
+
const res = await fetch(`${this.url}${version !== 1 ? `/v${version}/sessions` : "/sessions"}${queryParam}`, {
|
|
4521
4531
|
method: "POST",
|
|
4522
4532
|
headers,
|
|
4523
4533
|
body: JSON.stringify(input),
|
|
@@ -4615,8 +4625,10 @@ var AuthService = class {
|
|
|
4615
4625
|
}
|
|
4616
4626
|
}
|
|
4617
4627
|
try {
|
|
4628
|
+
const isWeb = isWebPlatform();
|
|
4629
|
+
const queryParam = isWeb && version === 4 ? "?type=web" : "";
|
|
4618
4630
|
const res = await fetch(
|
|
4619
|
-
`${this.url}${version !== 1 ? `/v${version}/session/refresh` : "/session:refresh"}`,
|
|
4631
|
+
`${this.url}${version !== 1 ? `/v${version}/session/refresh` : "/session:refresh"}${queryParam}`,
|
|
4620
4632
|
{
|
|
4621
4633
|
method: "POST",
|
|
4622
4634
|
headers,
|