@opexa/portal-sdk 0.5.0 → 0.6.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/README.md +1623 -1623
- package/dist/index.cjs +35 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +35 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -358,6 +358,9 @@ var CREATE_GCASH_WITHDRAWAL_MUTATION = gql`
|
|
|
358
358
|
... on WalletDoesNotExistError {
|
|
359
359
|
__typename
|
|
360
360
|
}
|
|
361
|
+
... on TransactionPasswordNotSetError {
|
|
362
|
+
__typename
|
|
363
|
+
}
|
|
361
364
|
}
|
|
362
365
|
}
|
|
363
366
|
`;
|
|
@@ -406,6 +409,9 @@ var CREATE_MAYA_APP_WITHDRAWAL_MUTATION = gql`
|
|
|
406
409
|
... on WalletDoesNotExistError {
|
|
407
410
|
__typename
|
|
408
411
|
}
|
|
412
|
+
... on TransactionPasswordNotSetError {
|
|
413
|
+
__typename
|
|
414
|
+
}
|
|
409
415
|
}
|
|
410
416
|
}
|
|
411
417
|
`;
|
|
@@ -439,6 +445,9 @@ var CREATE_AIO_INSTAPAY_WITHDRAWAL_MUTATION = gql`
|
|
|
439
445
|
... on WalletDoesNotExistError {
|
|
440
446
|
__typename
|
|
441
447
|
}
|
|
448
|
+
... on TransactionPasswordNotSetError {
|
|
449
|
+
__typename
|
|
450
|
+
}
|
|
442
451
|
}
|
|
443
452
|
}
|
|
444
453
|
`;
|
|
@@ -727,6 +736,9 @@ var CREATE_MANUAL_UPI_DEPOSIT_MUTATION = gql`
|
|
|
727
736
|
... on WalletDoesNotExistError {
|
|
728
737
|
__typename
|
|
729
738
|
}
|
|
739
|
+
... on UPIReferenceNotAvailableError {
|
|
740
|
+
__typename
|
|
741
|
+
}
|
|
730
742
|
}
|
|
731
743
|
}
|
|
732
744
|
`;
|
|
@@ -1994,7 +2006,7 @@ var UNMARK_GAME_AS_FAVORITE = gql`
|
|
|
1994
2006
|
}
|
|
1995
2007
|
`;
|
|
1996
2008
|
var FAVORITE_GAMES_QUERY = gql`
|
|
1997
|
-
query
|
|
2009
|
+
query FavoriteGames {
|
|
1998
2010
|
favoriteGames {
|
|
1999
2011
|
id
|
|
2000
2012
|
}
|
|
@@ -2058,7 +2070,9 @@ function createOperationError(code) {
|
|
|
2058
2070
|
RateLimitExceededError: "Maximum number of requests reached",
|
|
2059
2071
|
RewardAlreadyClaimedError: "Reward is already claimed",
|
|
2060
2072
|
ReCAPTCHAVerificationFailedError: "Invalid reCAPTCHA",
|
|
2061
|
-
AccountSuspendedError: "Account is suspended"
|
|
2073
|
+
AccountSuspendedError: "Account is suspended",
|
|
2074
|
+
TransactionPasswordNotSetError: "Transaction password is not set",
|
|
2075
|
+
UPIReferenceNotAvailableError: "UPI reference is no longer available"
|
|
2062
2076
|
};
|
|
2063
2077
|
return {
|
|
2064
2078
|
name: code,
|
|
@@ -5365,6 +5379,9 @@ var Sdk = class {
|
|
|
5365
5379
|
});
|
|
5366
5380
|
}
|
|
5367
5381
|
async signIn(input) {
|
|
5382
|
+
if (input.type === "TOKEN") {
|
|
5383
|
+
console.warn("'TOKEN (signIn)' is deprecated. Please use 'SOCIALS' instead.");
|
|
5384
|
+
}
|
|
5368
5385
|
switch (input.type) {
|
|
5369
5386
|
case "NAME_AND_PASSWORD": {
|
|
5370
5387
|
const res = await this.sessionManager.create({
|
|
@@ -5494,6 +5511,7 @@ var Sdk = class {
|
|
|
5494
5511
|
/**/
|
|
5495
5512
|
/** @deprecated */
|
|
5496
5513
|
async platform() {
|
|
5514
|
+
console.warn("'platform' is deprecated. Please use 'platform__next' instead.");
|
|
5497
5515
|
const res = await this.accountService.platform();
|
|
5498
5516
|
if (!res.ok) return res;
|
|
5499
5517
|
return {
|
|
@@ -5534,6 +5552,7 @@ var Sdk = class {
|
|
|
5534
5552
|
* @deprecated use `createAccount__next`
|
|
5535
5553
|
*/
|
|
5536
5554
|
async createAccount(input) {
|
|
5555
|
+
console.warn("'createAccount' is deprecated. Please use 'createAccount__next' instead.");
|
|
5537
5556
|
const id = input.id ?? objectId.ObjectId.generate(ObjectType.Account).toString();
|
|
5538
5557
|
const res = await this.accountService.registerMemberAccount({
|
|
5539
5558
|
input: {
|
|
@@ -5687,6 +5706,9 @@ var Sdk = class {
|
|
|
5687
5706
|
* @deprecated use `sendVerificationCode__next`
|
|
5688
5707
|
*/
|
|
5689
5708
|
async sendVerificationCode(mobileNumber) {
|
|
5709
|
+
console.warn(
|
|
5710
|
+
"'sendVerificationCode' is deprecated. Please use 'sendVerificationCode__next' instead."
|
|
5711
|
+
);
|
|
5690
5712
|
return await this.accountService.sendVerificationCode({
|
|
5691
5713
|
input: {
|
|
5692
5714
|
channel: "SMS",
|
|
@@ -6140,6 +6162,7 @@ var Sdk = class {
|
|
|
6140
6162
|
}
|
|
6141
6163
|
/** @deprecated */
|
|
6142
6164
|
async bonus() {
|
|
6165
|
+
console.warn("'bonus' is deprecated. Please use 'bonuses' instead.");
|
|
6143
6166
|
const res = await this.walletService.bonus();
|
|
6144
6167
|
if (!res.ok) return res;
|
|
6145
6168
|
return {
|
|
@@ -6147,6 +6170,14 @@ var Sdk = class {
|
|
|
6147
6170
|
data: res.data ? this.transformer.transform.bonus(res.data) : null
|
|
6148
6171
|
};
|
|
6149
6172
|
}
|
|
6173
|
+
async bonuses() {
|
|
6174
|
+
const res = await this.walletService.bonuses();
|
|
6175
|
+
if (!res.ok) return res;
|
|
6176
|
+
return {
|
|
6177
|
+
ok: true,
|
|
6178
|
+
data: res.data.map(this.transformer.transform.bonus)
|
|
6179
|
+
};
|
|
6180
|
+
}
|
|
6150
6181
|
async cashbackBonuses() {
|
|
6151
6182
|
const res = await this.walletService.cashbackBonuses();
|
|
6152
6183
|
if (!res.ok) return res;
|
|
@@ -6182,7 +6213,9 @@ var Sdk = class {
|
|
|
6182
6213
|
data: res.data ? this.transformer.transform.game(res.data) : null
|
|
6183
6214
|
};
|
|
6184
6215
|
}
|
|
6216
|
+
/** @deprecated */
|
|
6185
6217
|
async games(input) {
|
|
6218
|
+
console.warn("'games' is deprecated. Please use 'games__next' instead.");
|
|
6186
6219
|
const res = await this.cmsPortalService.games(input);
|
|
6187
6220
|
if (!res.ok) return res;
|
|
6188
6221
|
return {
|
|
@@ -6528,14 +6561,6 @@ var Sdk = class {
|
|
|
6528
6561
|
async claimReward(id) {
|
|
6529
6562
|
return await this.triggerService.claimReward({ id });
|
|
6530
6563
|
}
|
|
6531
|
-
async bonuses() {
|
|
6532
|
-
const res = await this.walletService.bonuses();
|
|
6533
|
-
if (!res.ok) return res;
|
|
6534
|
-
return {
|
|
6535
|
-
ok: true,
|
|
6536
|
-
data: res.data.map(this.transformer.transform.bonus)
|
|
6537
|
-
};
|
|
6538
|
-
}
|
|
6539
6564
|
/**/
|
|
6540
6565
|
/*+----------------------------------------+*/
|
|
6541
6566
|
/*+ ONBOARDING +*/
|