@opexa/portal-sdk 0.0.227 → 0.2.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 +101 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -5
- package/dist/index.d.ts +29 -5
- package/dist/index.js +101 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -5
package/dist/index.cjs
CHANGED
|
@@ -1958,6 +1958,26 @@ var JACKPOT_PAYOUTS_QUERY = gql`
|
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
1960
1960
|
`;
|
|
1961
|
+
var REGISTER_FCM_DEVICE = gql`
|
|
1962
|
+
mutation RegisterFCMDevice($input: RegisterFCMDeviceInput!) {
|
|
1963
|
+
registerFCMDevice(input: $input)
|
|
1964
|
+
}
|
|
1965
|
+
`;
|
|
1966
|
+
var UNREGISTER_FCM_DEVICE = gql`
|
|
1967
|
+
mutation UnregisterFCMDevice($input: UnregisterFCMDeviceInput!) {
|
|
1968
|
+
unregisterFCMDevice(input: $input)
|
|
1969
|
+
}
|
|
1970
|
+
`;
|
|
1971
|
+
var MARK_GAME_AS_FAVORITE = gql`
|
|
1972
|
+
mutation MarkGameAsFavorite($input: MarkGameAsFavoriteInput!) {
|
|
1973
|
+
markGameAsFavorite(input: $input)
|
|
1974
|
+
}
|
|
1975
|
+
`;
|
|
1976
|
+
var UNMARK_GAME_AS_FAVORITE = gql`
|
|
1977
|
+
mutation UnmarkGameAsFavorite($input: UnmarkGameAsFavoriteInput!) {
|
|
1978
|
+
unmarkGameAsFavorite(input: $input)
|
|
1979
|
+
}
|
|
1980
|
+
`;
|
|
1961
1981
|
|
|
1962
1982
|
// src/services/utils.ts
|
|
1963
1983
|
function createOperationError(code) {
|
|
@@ -3080,6 +3100,38 @@ var TriggerService = class {
|
|
|
3080
3100
|
data: res.data.checkInDailyQuest
|
|
3081
3101
|
};
|
|
3082
3102
|
}
|
|
3103
|
+
async registerFCMDevice(variables) {
|
|
3104
|
+
const res = await this.client.request(REGISTER_FCM_DEVICE, variables);
|
|
3105
|
+
if (!res.ok) return res;
|
|
3106
|
+
if (!res.data.registerFCMDevice) {
|
|
3107
|
+
return {
|
|
3108
|
+
ok: false,
|
|
3109
|
+
error: {
|
|
3110
|
+
name: "UnknownError",
|
|
3111
|
+
message: "Something went wrong."
|
|
3112
|
+
}
|
|
3113
|
+
};
|
|
3114
|
+
}
|
|
3115
|
+
return {
|
|
3116
|
+
ok: true
|
|
3117
|
+
};
|
|
3118
|
+
}
|
|
3119
|
+
async unregisterFCMDevice(variables) {
|
|
3120
|
+
const res = await this.client.request(UNREGISTER_FCM_DEVICE, variables);
|
|
3121
|
+
if (!res.ok) return res;
|
|
3122
|
+
if (!res.data.unregisterFCMDevice) {
|
|
3123
|
+
return {
|
|
3124
|
+
ok: false,
|
|
3125
|
+
error: {
|
|
3126
|
+
name: "UnknownError",
|
|
3127
|
+
message: "Something went wrong."
|
|
3128
|
+
}
|
|
3129
|
+
};
|
|
3130
|
+
}
|
|
3131
|
+
return {
|
|
3132
|
+
ok: true
|
|
3133
|
+
};
|
|
3134
|
+
}
|
|
3083
3135
|
};
|
|
3084
3136
|
|
|
3085
3137
|
// src/services/wallet.service.ts
|
|
@@ -3588,6 +3640,38 @@ var WalletService = class {
|
|
|
3588
3640
|
ok: true
|
|
3589
3641
|
};
|
|
3590
3642
|
}
|
|
3643
|
+
async markGameAsFavorite(variables) {
|
|
3644
|
+
const res = await this.client.request(MARK_GAME_AS_FAVORITE, variables);
|
|
3645
|
+
if (!res.ok) return res;
|
|
3646
|
+
if (!res.data.markGameAsFavorite) {
|
|
3647
|
+
return {
|
|
3648
|
+
ok: false,
|
|
3649
|
+
error: {
|
|
3650
|
+
name: "UnknownError",
|
|
3651
|
+
message: "Something went wrong."
|
|
3652
|
+
}
|
|
3653
|
+
};
|
|
3654
|
+
}
|
|
3655
|
+
return {
|
|
3656
|
+
ok: true
|
|
3657
|
+
};
|
|
3658
|
+
}
|
|
3659
|
+
async unmarkGameAsFavorite(variables) {
|
|
3660
|
+
const res = await this.client.request(UNMARK_GAME_AS_FAVORITE, variables);
|
|
3661
|
+
if (!res.ok) return res;
|
|
3662
|
+
if (!res.data.unmarkGameAsFavorite) {
|
|
3663
|
+
return {
|
|
3664
|
+
ok: false,
|
|
3665
|
+
error: {
|
|
3666
|
+
name: "UnknownError",
|
|
3667
|
+
message: "Something went wrong."
|
|
3668
|
+
}
|
|
3669
|
+
};
|
|
3670
|
+
}
|
|
3671
|
+
return {
|
|
3672
|
+
ok: true
|
|
3673
|
+
};
|
|
3674
|
+
}
|
|
3591
3675
|
};
|
|
3592
3676
|
|
|
3593
3677
|
// src/utils/clone-date.ts
|
|
@@ -6196,6 +6280,12 @@ var Sdk = class {
|
|
|
6196
6280
|
const res1 = await this.gameService.endGameSession({ input: { id } });
|
|
6197
6281
|
return res1;
|
|
6198
6282
|
}
|
|
6283
|
+
async markGameAsFavorite(input) {
|
|
6284
|
+
return await this.walletService.markGameAsFavorite({ input });
|
|
6285
|
+
}
|
|
6286
|
+
async unmarkGameAsFavorite(input) {
|
|
6287
|
+
return await this.walletService.unmarkGameAsFavorite({ input });
|
|
6288
|
+
}
|
|
6199
6289
|
/**/
|
|
6200
6290
|
/*+----------------------------------------+*/
|
|
6201
6291
|
/*+ FILE +*/
|
|
@@ -6473,6 +6563,17 @@ var Sdk = class {
|
|
|
6473
6563
|
}
|
|
6474
6564
|
/**/
|
|
6475
6565
|
/*+----------------------------------------+*/
|
|
6566
|
+
/*+ FMC Device +*/
|
|
6567
|
+
/*+----------------------------------------+*/
|
|
6568
|
+
/**/
|
|
6569
|
+
async registerFCMDevice(input) {
|
|
6570
|
+
return await this.triggerService.registerFCMDevice({ input });
|
|
6571
|
+
}
|
|
6572
|
+
async unregisterFCMDevice(input) {
|
|
6573
|
+
return await this.triggerService.unregisterFCMDevice({ input });
|
|
6574
|
+
}
|
|
6575
|
+
/**/
|
|
6576
|
+
/*+----------------------------------------+*/
|
|
6476
6577
|
/*+ HELPERS +*/
|
|
6477
6578
|
/*+----------------------------------------+*/
|
|
6478
6579
|
/**/
|