@opexa/portal-sdk 0.59.60 → 0.59.61
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-AKP5LBV2.js → chunk-FUFD2LUS.js} +44 -9
- package/dist/chunk-FUFD2LUS.js.map +1 -0
- package/dist/index.cjs +43 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -23
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +42 -6
- 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/package.json +1 -1
- package/dist/chunk-AKP5LBV2.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService } from './chunk-
|
|
1
|
+
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-FUFD2LUS.js';
|
|
2
2
|
import { GraphQLClient, isPlainObject } from './chunk-JTAO2DVT.js';
|
|
3
3
|
import './chunk-WVFSGB7Y.js';
|
|
4
4
|
import { ObjectId } from '@opexa/object-id';
|
|
5
5
|
export { ObjectId } from '@opexa/object-id';
|
|
6
6
|
import { Capacitor } from '@capacitor/core';
|
|
7
|
-
import { Thumbmark } from '@thumbmarkjs/thumbmarkjs';
|
|
8
7
|
import cookies from 'js-cookie';
|
|
9
8
|
|
|
10
9
|
// src/sdk/object-type.ts
|
|
@@ -189,6 +188,8 @@ function addHours(date, hours) {
|
|
|
189
188
|
result.setHours(result.getHours() + hours);
|
|
190
189
|
return result;
|
|
191
190
|
}
|
|
191
|
+
|
|
192
|
+
// src/sdk/utils.ts
|
|
192
193
|
function getLocaleByCurrency(currency) {
|
|
193
194
|
if (currency === "INR") return "en-IN";
|
|
194
195
|
if (currency === "MYR") return "en-MY";
|
|
@@ -218,26 +219,6 @@ function parseFbCxd(input) {
|
|
|
218
219
|
const fbAdditionalCxd = input.split(cxd)[1].slice(1);
|
|
219
220
|
return { cxd, fbAdditionalCxd };
|
|
220
221
|
}
|
|
221
|
-
var thumbmark_instance;
|
|
222
|
-
async function getFingerprint() {
|
|
223
|
-
if (typeof window === "undefined") return null;
|
|
224
|
-
if (!thumbmark_instance) {
|
|
225
|
-
thumbmark_instance = new Thumbmark({
|
|
226
|
-
logging: false,
|
|
227
|
-
timeout: 3e4,
|
|
228
|
-
cache_lifetime_in_ms: 1 * 60 * 60 * 1e3
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
try {
|
|
232
|
-
const cached = sessionStorage.getItem("fingerprint");
|
|
233
|
-
if (cached) return cached;
|
|
234
|
-
const result = await thumbmark_instance.get();
|
|
235
|
-
sessionStorage.setItem("fingerprint", result.thumbmark);
|
|
236
|
-
return result.thumbmark;
|
|
237
|
-
} catch {
|
|
238
|
-
return null;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
222
|
function getCookie(name) {
|
|
242
223
|
if (typeof document === "undefined") return null;
|
|
243
224
|
const nameLenPlus = name.length + 1;
|
|
@@ -3208,7 +3189,7 @@ var Sdk = class {
|
|
|
3208
3189
|
};
|
|
3209
3190
|
}
|
|
3210
3191
|
async fingerprint() {
|
|
3211
|
-
return await
|
|
3192
|
+
return await getFingerPrint();
|
|
3212
3193
|
}
|
|
3213
3194
|
get miscMiddleware() {
|
|
3214
3195
|
return async (request) => {
|