@opexa/portal-sdk 0.59.71 → 0.59.72
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 +1634 -1634
- package/dist/{chunk-7APXFZ5G.js → chunk-5WRVWQBT.js} +3 -3
- package/dist/chunk-5WRVWQBT.js.map +1 -0
- package/dist/{chunk-YZWPC2FD.js → chunk-MQC7EE6J.js} +95 -3
- package/dist/chunk-MQC7EE6J.js.map +1 -0
- package/dist/{chunk-WVFSGB7Y.js → chunk-ROBGEUSE.js} +2 -2
- package/dist/chunk-ROBGEUSE.js.map +1 -0
- package/dist/index.cjs +152 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +63 -3
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +92 -0
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +7 -3
- package/dist/services/index.d.ts +7 -3
- package/dist/services/index.js +2 -2
- package/dist/{types-CEPxVuIs.d.ts → types-B8RFcTu9.d.ts} +29 -1
- package/dist/{types-FjtMTuKB.d.cts → types-BqFODW6R.d.cts} +29 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-7APXFZ5G.js.map +0 -1
- package/dist/chunk-WVFSGB7Y.js.map +0 -1
- package/dist/chunk-YZWPC2FD.js.map +0 -1
package/dist/services/index.cjs
CHANGED
|
@@ -3319,6 +3319,30 @@ var FAVORITE_GAMES_QUERY = gql`
|
|
|
3319
3319
|
}
|
|
3320
3320
|
}
|
|
3321
3321
|
`;
|
|
3322
|
+
var FAVORITE_GAMES_QUERY__NEXT = gql`
|
|
3323
|
+
query FavoriteGames {
|
|
3324
|
+
favoriteGames {
|
|
3325
|
+
id
|
|
3326
|
+
}
|
|
3327
|
+
}
|
|
3328
|
+
`;
|
|
3329
|
+
var RECENT_GAMES_QUERY = gql`
|
|
3330
|
+
query RecentGames {
|
|
3331
|
+
recentGames {
|
|
3332
|
+
id
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3335
|
+
`;
|
|
3336
|
+
var ADD_FAVORITE_GAME_MUTATION = gql`
|
|
3337
|
+
mutation AddFavoriteGame($game: ObjectId!) {
|
|
3338
|
+
addFavoriteGame(input: { game: $game })
|
|
3339
|
+
}
|
|
3340
|
+
`;
|
|
3341
|
+
var REMOVE_FAVORITE_GAME_MUTATION = gql`
|
|
3342
|
+
mutation RemoveFavoriteGame($game: ObjectId!) {
|
|
3343
|
+
removeFavoriteGame(input: { game: $game })
|
|
3344
|
+
}
|
|
3345
|
+
`;
|
|
3322
3346
|
var WALLET_GAMES_QUERY = gql`
|
|
3323
3347
|
query Games($first: Int $after: Cursor, $filter: GameFilterInput) {
|
|
3324
3348
|
games(first: $first, after: $after, filter: $filter) {
|
|
@@ -5057,6 +5081,74 @@ var PortalService = class {
|
|
|
5057
5081
|
data: res.data.recommendedGames
|
|
5058
5082
|
};
|
|
5059
5083
|
}
|
|
5084
|
+
async favoriteGames() {
|
|
5085
|
+
const res = await this.client.request(
|
|
5086
|
+
FAVORITE_GAMES_QUERY__NEXT
|
|
5087
|
+
);
|
|
5088
|
+
if (!res.ok) return res;
|
|
5089
|
+
if (!res.data.favoriteGames) {
|
|
5090
|
+
return {
|
|
5091
|
+
ok: false,
|
|
5092
|
+
error: {
|
|
5093
|
+
name: "UnknownError",
|
|
5094
|
+
message: "Something went wrong."
|
|
5095
|
+
}
|
|
5096
|
+
};
|
|
5097
|
+
}
|
|
5098
|
+
return {
|
|
5099
|
+
ok: true,
|
|
5100
|
+
data: res.data.favoriteGames
|
|
5101
|
+
};
|
|
5102
|
+
}
|
|
5103
|
+
async recentGames() {
|
|
5104
|
+
const res = await this.client.request(RECENT_GAMES_QUERY);
|
|
5105
|
+
if (!res.ok) return res;
|
|
5106
|
+
if (!res.data.recentGames) {
|
|
5107
|
+
return {
|
|
5108
|
+
ok: false,
|
|
5109
|
+
error: {
|
|
5110
|
+
name: "UnknownError",
|
|
5111
|
+
message: "Something went wrong."
|
|
5112
|
+
}
|
|
5113
|
+
};
|
|
5114
|
+
}
|
|
5115
|
+
return {
|
|
5116
|
+
ok: true,
|
|
5117
|
+
data: res.data.recentGames
|
|
5118
|
+
};
|
|
5119
|
+
}
|
|
5120
|
+
async addFavoriteGame(variables) {
|
|
5121
|
+
const res = await this.client.request(ADD_FAVORITE_GAME_MUTATION, variables);
|
|
5122
|
+
if (!res.ok) return res;
|
|
5123
|
+
if (!res.data.addFavoriteGame) {
|
|
5124
|
+
return {
|
|
5125
|
+
ok: false,
|
|
5126
|
+
error: {
|
|
5127
|
+
name: "UnknownError",
|
|
5128
|
+
message: "Something went wrong."
|
|
5129
|
+
}
|
|
5130
|
+
};
|
|
5131
|
+
}
|
|
5132
|
+
return {
|
|
5133
|
+
ok: true
|
|
5134
|
+
};
|
|
5135
|
+
}
|
|
5136
|
+
async removeFavoriteGame(variables) {
|
|
5137
|
+
const res = await this.client.request(REMOVE_FAVORITE_GAME_MUTATION, variables);
|
|
5138
|
+
if (!res.ok) return res;
|
|
5139
|
+
if (!res.data.removeFavoriteGame) {
|
|
5140
|
+
return {
|
|
5141
|
+
ok: false,
|
|
5142
|
+
error: {
|
|
5143
|
+
name: "UnknownError",
|
|
5144
|
+
message: "Something went wrong."
|
|
5145
|
+
}
|
|
5146
|
+
};
|
|
5147
|
+
}
|
|
5148
|
+
return {
|
|
5149
|
+
ok: true
|
|
5150
|
+
};
|
|
5151
|
+
}
|
|
5060
5152
|
async onboardingStatus() {
|
|
5061
5153
|
const res = await this.client.request(
|
|
5062
5154
|
ONBOARDING_STATUS_QUERY
|