@opexa/portal-sdk 0.59.71 → 0.59.73
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-YZWPC2FD.js → chunk-2KACCSX3.js} +108 -2
- package/dist/chunk-2KACCSX3.js.map +1 -0
- package/dist/index.cjs +264 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +159 -89
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +106 -0
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +8 -3
- package/dist/services/index.d.ts +8 -3
- package/dist/services/index.js +1 -1
- package/dist/{types-CEPxVuIs.d.ts → types-C2Mdipgs.d.ts} +41 -1
- package/dist/{types-FjtMTuKB.d.cts → types-DXuCcBxY.d.cts} +41 -1
- package/package.json +1 -1
- package/dist/chunk-YZWPC2FD.js.map +0 -1
package/dist/services/index.cjs
CHANGED
|
@@ -66,6 +66,14 @@ var MEMBER_WALLET_ACCOUNT_QUERY = gql`
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
`;
|
|
69
|
+
var MEMBER_LEVEL_HISTORY_QUERY = gql`
|
|
70
|
+
query MemberLevelHistory {
|
|
71
|
+
self {
|
|
72
|
+
id
|
|
73
|
+
memberLevelHistory
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
69
77
|
var POINTS_WALLET_QUERY = gql`
|
|
70
78
|
query PointsWallet {
|
|
71
79
|
pointsWallet {
|
|
@@ -3319,6 +3327,30 @@ var FAVORITE_GAMES_QUERY = gql`
|
|
|
3319
3327
|
}
|
|
3320
3328
|
}
|
|
3321
3329
|
`;
|
|
3330
|
+
var FAVORITE_GAMES_QUERY__NEXT = gql`
|
|
3331
|
+
query FavoriteGames {
|
|
3332
|
+
favoriteGames {
|
|
3333
|
+
id
|
|
3334
|
+
}
|
|
3335
|
+
}
|
|
3336
|
+
`;
|
|
3337
|
+
var RECENT_GAMES_QUERY = gql`
|
|
3338
|
+
query RecentGames {
|
|
3339
|
+
recentGames {
|
|
3340
|
+
id
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
`;
|
|
3344
|
+
var ADD_FAVORITE_GAME_MUTATION = gql`
|
|
3345
|
+
mutation AddFavoriteGame($game: ObjectId!) {
|
|
3346
|
+
addFavoriteGame(input: { game: $game })
|
|
3347
|
+
}
|
|
3348
|
+
`;
|
|
3349
|
+
var REMOVE_FAVORITE_GAME_MUTATION = gql`
|
|
3350
|
+
mutation RemoveFavoriteGame($game: ObjectId!) {
|
|
3351
|
+
removeFavoriteGame(input: { game: $game })
|
|
3352
|
+
}
|
|
3353
|
+
`;
|
|
3322
3354
|
var WALLET_GAMES_QUERY = gql`
|
|
3323
3355
|
query Games($first: Int $after: Cursor, $filter: GameFilterInput) {
|
|
3324
3356
|
games(first: $first, after: $after, filter: $filter) {
|
|
@@ -5057,6 +5089,74 @@ var PortalService = class {
|
|
|
5057
5089
|
data: res.data.recommendedGames
|
|
5058
5090
|
};
|
|
5059
5091
|
}
|
|
5092
|
+
async favoriteGames() {
|
|
5093
|
+
const res = await this.client.request(
|
|
5094
|
+
FAVORITE_GAMES_QUERY__NEXT
|
|
5095
|
+
);
|
|
5096
|
+
if (!res.ok) return res;
|
|
5097
|
+
if (!res.data.favoriteGames) {
|
|
5098
|
+
return {
|
|
5099
|
+
ok: false,
|
|
5100
|
+
error: {
|
|
5101
|
+
name: "UnknownError",
|
|
5102
|
+
message: "Something went wrong."
|
|
5103
|
+
}
|
|
5104
|
+
};
|
|
5105
|
+
}
|
|
5106
|
+
return {
|
|
5107
|
+
ok: true,
|
|
5108
|
+
data: res.data.favoriteGames
|
|
5109
|
+
};
|
|
5110
|
+
}
|
|
5111
|
+
async recentGames() {
|
|
5112
|
+
const res = await this.client.request(RECENT_GAMES_QUERY);
|
|
5113
|
+
if (!res.ok) return res;
|
|
5114
|
+
if (!res.data.recentGames) {
|
|
5115
|
+
return {
|
|
5116
|
+
ok: false,
|
|
5117
|
+
error: {
|
|
5118
|
+
name: "UnknownError",
|
|
5119
|
+
message: "Something went wrong."
|
|
5120
|
+
}
|
|
5121
|
+
};
|
|
5122
|
+
}
|
|
5123
|
+
return {
|
|
5124
|
+
ok: true,
|
|
5125
|
+
data: res.data.recentGames
|
|
5126
|
+
};
|
|
5127
|
+
}
|
|
5128
|
+
async addFavoriteGame(variables) {
|
|
5129
|
+
const res = await this.client.request(ADD_FAVORITE_GAME_MUTATION, variables);
|
|
5130
|
+
if (!res.ok) return res;
|
|
5131
|
+
if (!res.data.addFavoriteGame) {
|
|
5132
|
+
return {
|
|
5133
|
+
ok: false,
|
|
5134
|
+
error: {
|
|
5135
|
+
name: "UnknownError",
|
|
5136
|
+
message: "Something went wrong."
|
|
5137
|
+
}
|
|
5138
|
+
};
|
|
5139
|
+
}
|
|
5140
|
+
return {
|
|
5141
|
+
ok: true
|
|
5142
|
+
};
|
|
5143
|
+
}
|
|
5144
|
+
async removeFavoriteGame(variables) {
|
|
5145
|
+
const res = await this.client.request(REMOVE_FAVORITE_GAME_MUTATION, variables);
|
|
5146
|
+
if (!res.ok) return res;
|
|
5147
|
+
if (!res.data.removeFavoriteGame) {
|
|
5148
|
+
return {
|
|
5149
|
+
ok: false,
|
|
5150
|
+
error: {
|
|
5151
|
+
name: "UnknownError",
|
|
5152
|
+
message: "Something went wrong."
|
|
5153
|
+
}
|
|
5154
|
+
};
|
|
5155
|
+
}
|
|
5156
|
+
return {
|
|
5157
|
+
ok: true
|
|
5158
|
+
};
|
|
5159
|
+
}
|
|
5060
5160
|
async onboardingStatus() {
|
|
5061
5161
|
const res = await this.client.request(
|
|
5062
5162
|
ONBOARDING_STATUS_QUERY
|
|
@@ -5541,6 +5641,12 @@ var WalletService = class {
|
|
|
5541
5641
|
);
|
|
5542
5642
|
return res.ok ? { ok: res.ok, data: res.data.self } : res;
|
|
5543
5643
|
}
|
|
5644
|
+
async memberLevelHistory() {
|
|
5645
|
+
const res = await this.client.request(
|
|
5646
|
+
MEMBER_LEVEL_HISTORY_QUERY
|
|
5647
|
+
);
|
|
5648
|
+
return res.ok ? { ok: res.ok, data: res.data.self } : res;
|
|
5649
|
+
}
|
|
5544
5650
|
async deposit(variables) {
|
|
5545
5651
|
const res = await this.client.request(
|
|
5546
5652
|
DEPOSIT_QUERY,
|