@opexa/portal-sdk 0.59.118 → 0.59.124
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-GAWJOZTO.js → chunk-TLSIHIY2.js} +39 -2
- package/dist/chunk-TLSIHIY2.js.map +1 -0
- package/dist/index.cjs +57 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +37 -0
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +4 -3
- package/dist/services/index.d.ts +4 -3
- package/dist/services/index.js +1 -1
- package/dist/{types-ixoGQiRn.d.ts → types-CBin14X0.d.ts} +7 -1
- package/dist/{types-DjRZ0eUU.d.cts → types-DVgdaYUD.d.cts} +7 -1
- package/package.json +1 -1
- package/dist/chunk-GAWJOZTO.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -3525,6 +3525,29 @@ var WALLET_GAMES_BY_NAME_QUERY = gql`
|
|
|
3525
3525
|
}
|
|
3526
3526
|
}
|
|
3527
3527
|
`;
|
|
3528
|
+
var WALLET_GAME_CARDS_BY_NAME_QUERY = gql`
|
|
3529
|
+
query WalletGameCardsByName(
|
|
3530
|
+
$search: String!
|
|
3531
|
+
$first: Int
|
|
3532
|
+
$filter: _GameFilterInput
|
|
3533
|
+
) {
|
|
3534
|
+
_gamesByName(search: $search, first: $first, filter: $filter) {
|
|
3535
|
+
id
|
|
3536
|
+
reference
|
|
3537
|
+
name
|
|
3538
|
+
displayName
|
|
3539
|
+
type
|
|
3540
|
+
provider
|
|
3541
|
+
status
|
|
3542
|
+
hidden
|
|
3543
|
+
hasFreeBet
|
|
3544
|
+
hasJackpot
|
|
3545
|
+
image {
|
|
3546
|
+
url
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
}
|
|
3550
|
+
`;
|
|
3528
3551
|
var GAME_GROUPS_QUERY = gql`
|
|
3529
3552
|
query GameGroups(
|
|
3530
3553
|
$first: Int
|
|
@@ -7005,6 +7028,20 @@ var WalletService = class {
|
|
|
7005
7028
|
data: res.data._gamesByName
|
|
7006
7029
|
};
|
|
7007
7030
|
}
|
|
7031
|
+
async _gameCardsByName(variables) {
|
|
7032
|
+
const res = await this.client.request(WALLET_GAME_CARDS_BY_NAME_QUERY, variables);
|
|
7033
|
+
if (!res.ok) return res;
|
|
7034
|
+
if (!res.data._gamesByName) {
|
|
7035
|
+
return {
|
|
7036
|
+
ok: false,
|
|
7037
|
+
error: {
|
|
7038
|
+
name: "UnknownError",
|
|
7039
|
+
message: "Something went wrong."
|
|
7040
|
+
}
|
|
7041
|
+
};
|
|
7042
|
+
}
|
|
7043
|
+
return { ok: true, data: res.data._gamesByName };
|
|
7044
|
+
}
|
|
7008
7045
|
async cabinetWithdrawal(variables) {
|
|
7009
7046
|
const res = await this.client.request(CABINET_WITHDRAWAL_QUERY, variables);
|
|
7010
7047
|
return res.ok ? { ok: res.ok, data: res.data.node } : res;
|
|
@@ -8761,6 +8798,7 @@ var Transformer = class {
|
|
|
8761
8798
|
transactionRecord: this.transactionRecord.bind(this),
|
|
8762
8799
|
game: this.game.bind(this),
|
|
8763
8800
|
_games: this._games.bind(this),
|
|
8801
|
+
_gamesByName: this._gamesByName.bind(this),
|
|
8764
8802
|
gameGroup: this.gameGroup.bind(this),
|
|
8765
8803
|
gameGroups: this.gameGroups.bind(this),
|
|
8766
8804
|
gameSession: this.gameSession.bind(this),
|
|
@@ -9942,7 +9980,7 @@ var Transformer = class {
|
|
|
9942
9980
|
return o;
|
|
9943
9981
|
}
|
|
9944
9982
|
walletGame(node) {
|
|
9945
|
-
if (node.hidden ||
|
|
9983
|
+
if (node.hidden || !node.type || !node.provider) {
|
|
9946
9984
|
return null;
|
|
9947
9985
|
}
|
|
9948
9986
|
const name = node.displayName?.trim() || node.name;
|
|
@@ -9976,6 +10014,12 @@ var Transformer = class {
|
|
|
9976
10014
|
endCursor: data.pageInfo.endCursor ?? void 0
|
|
9977
10015
|
};
|
|
9978
10016
|
}
|
|
10017
|
+
_gamesByName(data) {
|
|
10018
|
+
return data.flatMap((node) => {
|
|
10019
|
+
const game = this.walletGame(node);
|
|
10020
|
+
return game ? [game] : [];
|
|
10021
|
+
});
|
|
10022
|
+
}
|
|
9979
10023
|
gameGroup(data) {
|
|
9980
10024
|
return {
|
|
9981
10025
|
...data,
|
|
@@ -12425,6 +12469,18 @@ var Sdk = class {
|
|
|
12425
12469
|
data: this.transformer.transform._games(res.data)
|
|
12426
12470
|
};
|
|
12427
12471
|
}
|
|
12472
|
+
/**
|
|
12473
|
+
* Searches the Wallet-backed platform catalog by name in relevance order.
|
|
12474
|
+
* The backend currently caps results at 20 and does not provide pagination.
|
|
12475
|
+
*/
|
|
12476
|
+
async _gamesByName(input) {
|
|
12477
|
+
const res = await this.walletService._gameCardsByName(input);
|
|
12478
|
+
if (!res.ok) return res;
|
|
12479
|
+
return {
|
|
12480
|
+
ok: true,
|
|
12481
|
+
data: this.transformer.transform._gamesByName(res.data)
|
|
12482
|
+
};
|
|
12483
|
+
}
|
|
12428
12484
|
async gameGroups(input) {
|
|
12429
12485
|
const res = await this.walletService.gameGroups(input);
|
|
12430
12486
|
if (!res.ok) return res;
|