@opexa/portal-sdk 0.57.20 → 0.58.0
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/index.cjs +28 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -6
- package/dist/index.d.ts +13 -6
- package/dist/index.js +28 -42
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1642,6 +1642,9 @@ var MEMBER_ACCOUNT_QUERY_DEVELOPMENT = gql`
|
|
|
1642
1642
|
agent {
|
|
1643
1643
|
code
|
|
1644
1644
|
}
|
|
1645
|
+
gigRewardsQuestDetails {
|
|
1646
|
+
gigUserId
|
|
1647
|
+
}
|
|
1645
1648
|
}
|
|
1646
1649
|
}
|
|
1647
1650
|
}
|
|
@@ -1678,7 +1681,6 @@ var MEMBER_ACCOUNT_QUERY = gql`
|
|
|
1678
1681
|
dateTimeLastUpdated
|
|
1679
1682
|
domain
|
|
1680
1683
|
branchCode
|
|
1681
|
-
|
|
1682
1684
|
}
|
|
1683
1685
|
}
|
|
1684
1686
|
}
|
|
@@ -8791,7 +8793,6 @@ var Sdk = class {
|
|
|
8791
8793
|
middlewares: [
|
|
8792
8794
|
/**/
|
|
8793
8795
|
this.authMiddleware,
|
|
8794
|
-
this.domainMiddleware,
|
|
8795
8796
|
this.fingerprintMiddleware,
|
|
8796
8797
|
this.miscMiddleware,
|
|
8797
8798
|
this.middleware
|
|
@@ -8876,7 +8877,6 @@ var Sdk = class {
|
|
|
8876
8877
|
}
|
|
8877
8878
|
_fetch = null;
|
|
8878
8879
|
_middleware;
|
|
8879
|
-
_domain = null;
|
|
8880
8880
|
/**
|
|
8881
8881
|
* @deprecated use `setFetch` instead
|
|
8882
8882
|
*/
|
|
@@ -8904,15 +8904,17 @@ var Sdk = class {
|
|
|
8904
8904
|
get middleware() {
|
|
8905
8905
|
return this._middleware;
|
|
8906
8906
|
}
|
|
8907
|
-
|
|
8908
|
-
this._domain = value;
|
|
8909
|
-
}
|
|
8910
|
-
get domain() {
|
|
8911
|
-
return this._domain;
|
|
8912
|
-
}
|
|
8913
|
-
initWebDomain() {
|
|
8907
|
+
initMarketDomain() {
|
|
8914
8908
|
if (typeof window === "undefined") return;
|
|
8915
|
-
if (core.Capacitor.isNativePlatform())
|
|
8909
|
+
if (core.Capacitor.isNativePlatform()) {
|
|
8910
|
+
const platform = core.Capacitor.getPlatform();
|
|
8911
|
+
if (platform === "ios") {
|
|
8912
|
+
sessionStorage.setItem("domain", "happybingo.ph/ios");
|
|
8913
|
+
} else {
|
|
8914
|
+
sessionStorage.setItem("domain", "happybingo.ph/android");
|
|
8915
|
+
}
|
|
8916
|
+
return;
|
|
8917
|
+
}
|
|
8916
8918
|
const searchParams = new URLSearchParams(window.location.search);
|
|
8917
8919
|
const hostname = window.location.hostname;
|
|
8918
8920
|
const market = searchParams.get("market");
|
|
@@ -9021,30 +9023,6 @@ var Sdk = class {
|
|
|
9021
9023
|
async fingerprint() {
|
|
9022
9024
|
return await getFingerprint();
|
|
9023
9025
|
}
|
|
9024
|
-
/*
|
|
9025
|
-
*=============================================
|
|
9026
|
-
* DOMAIN MIDDLEWARE
|
|
9027
|
-
*=============================================
|
|
9028
|
-
*/
|
|
9029
|
-
get domainMiddleware() {
|
|
9030
|
-
return async (request) => {
|
|
9031
|
-
if (this._domain) {
|
|
9032
|
-
request.headers.set("Domain", this._domain);
|
|
9033
|
-
return request;
|
|
9034
|
-
}
|
|
9035
|
-
if (this.memberDomain?.includes("cabinet")) {
|
|
9036
|
-
request.headers.set("Domain", this.memberDomain);
|
|
9037
|
-
return request;
|
|
9038
|
-
}
|
|
9039
|
-
const domain = typeof window === "undefined" ? request.headers.get("Domain") : !core.Capacitor.isNativePlatform() ? request.headers.get("Domain") : core.Capacitor.getPlatform() === "ios" ? `ios/${this.config.platform}`.toLowerCase() : core.Capacitor.getPlatform() === "android" ? `android/${this.config.platform}`.toLowerCase() : request.headers.get("Domain");
|
|
9040
|
-
if (domain) {
|
|
9041
|
-
request.headers.set("Domain", domain);
|
|
9042
|
-
return request;
|
|
9043
|
-
}
|
|
9044
|
-
request.headers.delete("Domain");
|
|
9045
|
-
return request;
|
|
9046
|
-
};
|
|
9047
|
-
}
|
|
9048
9026
|
/*
|
|
9049
9027
|
*=============================================
|
|
9050
9028
|
* MISCELLANEOUS MIDDLEWARE
|
|
@@ -9353,7 +9331,8 @@ var Sdk = class {
|
|
|
9353
9331
|
domain: input.domain,
|
|
9354
9332
|
birthDay: typeof input.dateOfBirth === "string" ? input.dateOfBirth : this.formatYmd(input.dateOfBirth),
|
|
9355
9333
|
password: await sha256(input.password),
|
|
9356
|
-
mobileNumber: addAreaCode(input.mobileNumber, await this.locale)
|
|
9334
|
+
mobileNumber: addAreaCode(input.mobileNumber, await this.locale),
|
|
9335
|
+
gigRewardsQuestDetails: input.gigRewardsQuestDetails
|
|
9357
9336
|
},
|
|
9358
9337
|
referralCode: input.referralCode,
|
|
9359
9338
|
verificationCode: input.verificationCode,
|
|
@@ -9379,7 +9358,8 @@ var Sdk = class {
|
|
|
9379
9358
|
agentCode: input.agentCode,
|
|
9380
9359
|
...this.cxd && {
|
|
9381
9360
|
cellxpertCxd: this.cxd
|
|
9382
|
-
}
|
|
9361
|
+
},
|
|
9362
|
+
gigRewardsQuestDetails: input.gigRewardsQuestDetails
|
|
9383
9363
|
},
|
|
9384
9364
|
referralCode: input.referralCode,
|
|
9385
9365
|
verificationCode: input.verificationCode,
|
|
@@ -9398,7 +9378,8 @@ var Sdk = class {
|
|
|
9398
9378
|
id,
|
|
9399
9379
|
password: await sha256(input.password),
|
|
9400
9380
|
realName: input.realName,
|
|
9401
|
-
mobileNumber: addAreaCode(input.mobileNumber, await this.locale)
|
|
9381
|
+
mobileNumber: addAreaCode(input.mobileNumber, await this.locale),
|
|
9382
|
+
gigRewardsQuestDetails: input.gigRewardsQuestDetails
|
|
9402
9383
|
},
|
|
9403
9384
|
mobileNumberVerificationCode: input.mobileVerificationCode,
|
|
9404
9385
|
testPass: input.testPass,
|
|
@@ -9418,7 +9399,8 @@ var Sdk = class {
|
|
|
9418
9399
|
btag: input.btag,
|
|
9419
9400
|
domain: input.domain,
|
|
9420
9401
|
password: await sha256(input.password),
|
|
9421
|
-
mobileNumber: input.mobileNumber ? addAreaCode(input.mobileNumber, await this.locale) : void 0
|
|
9402
|
+
mobileNumber: input.mobileNumber ? addAreaCode(input.mobileNumber, await this.locale) : void 0,
|
|
9403
|
+
gigRewardsQuestDetails: input.gigRewardsQuestDetails
|
|
9422
9404
|
},
|
|
9423
9405
|
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9424
9406
|
...this.marketDomain && {
|
|
@@ -9435,7 +9417,8 @@ var Sdk = class {
|
|
|
9435
9417
|
mobileNumberVerificationCode: input.mobileNumberVerificationCode,
|
|
9436
9418
|
emailAddress: input.emailAddress,
|
|
9437
9419
|
branchCode: input.branchCode,
|
|
9438
|
-
agentCode: input.agentCode
|
|
9420
|
+
agentCode: input.agentCode,
|
|
9421
|
+
gigRewardsQuestDetails: input.gigRewardsQuestDetails
|
|
9439
9422
|
},
|
|
9440
9423
|
testPass: input.testPass,
|
|
9441
9424
|
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
@@ -9452,7 +9435,8 @@ var Sdk = class {
|
|
|
9452
9435
|
input: {
|
|
9453
9436
|
id,
|
|
9454
9437
|
name: input.name,
|
|
9455
|
-
password: await sha256(input.password)
|
|
9438
|
+
password: await sha256(input.password),
|
|
9439
|
+
gigRewardsQuestDetails: input.gigRewardsQuestDetails
|
|
9456
9440
|
},
|
|
9457
9441
|
reCAPTCHAResponse: input.reCAPTCHAResponse,
|
|
9458
9442
|
...this.marketDomain && {
|
|
@@ -9497,6 +9481,7 @@ var Sdk = class {
|
|
|
9497
9481
|
mobileNumber,
|
|
9498
9482
|
secretAnswer,
|
|
9499
9483
|
transactionPassword,
|
|
9484
|
+
gigRewardsQuestDetails,
|
|
9500
9485
|
...others
|
|
9501
9486
|
} = input;
|
|
9502
9487
|
return await this.accountService.updateMemberAccount({
|
|
@@ -9508,7 +9493,8 @@ var Sdk = class {
|
|
|
9508
9493
|
transactionPassword: transactionPassword ? await sha256(transactionPassword) : void 0,
|
|
9509
9494
|
mobileNumber: mobileNumber ? addAreaCode(mobileNumber, await this.locale) : void 0,
|
|
9510
9495
|
secretAnswer: secretAnswer ? await sha256(secretAnswer) : void 0,
|
|
9511
|
-
birthDay: dateOfBirth ? typeof dateOfBirth === "string" ? dateOfBirth : this.formatYmd(dateOfBirth) : void 0
|
|
9496
|
+
birthDay: dateOfBirth ? typeof dateOfBirth === "string" ? dateOfBirth : this.formatYmd(dateOfBirth) : void 0,
|
|
9497
|
+
gigRewardsQuestDetails
|
|
9512
9498
|
}
|
|
9513
9499
|
}
|
|
9514
9500
|
});
|