@azuro-org/toolkit 5.0.0-beta.4 → 5.0.0-beta.6
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/config.d.ts +0 -1
- package/dist/docs/bets/bets.d.ts +1 -0
- package/dist/docs/bets/fragments/bet.d.ts +1 -0
- package/dist/docs/feed/fragments/gameInfo.d.ts +1 -0
- package/dist/docs/feed/game.d.ts +1 -0
- package/dist/docs/feed/games.d.ts +1 -0
- package/dist/docs/feed/navigation.d.ts +4 -0
- package/dist/docs/feed/sports.d.ts +1 -0
- package/dist/docs/feed/sportsNavigation.d.ts +4 -0
- package/dist/docs/index.d.ts +2 -2
- package/dist/index.js +18 -6
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
package/dist/docs/bets/bets.d.ts
CHANGED
package/dist/docs/feed/game.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ export type NavigationQuery = {
|
|
|
16
16
|
activeGamesCount: number;
|
|
17
17
|
activeLiveGamesCount: number;
|
|
18
18
|
activePrematchGamesCount: number;
|
|
19
|
+
sporthub: {
|
|
20
|
+
__typename?: 'SportHub';
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
19
23
|
countries: Array<{
|
|
20
24
|
__typename?: 'Country';
|
|
21
25
|
id: string;
|
|
@@ -14,6 +14,10 @@ export type SportsNavigationQuery = {
|
|
|
14
14
|
activeGamesCount: number;
|
|
15
15
|
activeLiveGamesCount: number;
|
|
16
16
|
activePrematchGamesCount: number;
|
|
17
|
+
sporthub: {
|
|
18
|
+
__typename?: 'SportHub';
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
17
21
|
}>;
|
|
18
22
|
};
|
|
19
23
|
export declare const SportsNavigationDocument: import("graphql/language/ast").DocumentNode;
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -17,5 +17,5 @@ export * from './feed/navigation';
|
|
|
17
17
|
export * from './feed/sports';
|
|
18
18
|
export * from './feed/sportsNavigation';
|
|
19
19
|
export * from './legacy-live-feed/games';
|
|
20
|
-
export { BetResult, Bet_OrderBy as Legacy_Bet_OrderBy, GameStatus as LegacyGameStatus, SelectionResult, BetStatus as GraphBetStatus, V3_Bet_OrderBy as Bet_OrderBy, ConditionStatus as BetConditionStatus, } from './bets/types';
|
|
21
|
-
export
|
|
20
|
+
export { BetResult, Bet_OrderBy as Legacy_Bet_OrderBy, GameStatus as LegacyGameStatus, SelectionResult, BetStatus as GraphBetStatus, V3_Bet_OrderBy as Bet_OrderBy, ConditionStatus as BetConditionStatus, V3_SelectionConditionKind as SelectionKind, } from './bets/types';
|
|
21
|
+
export * from './feed/types';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {gnosis,polygon,polygonAmoy,chiliz,spicy,base,baseSepolia}from'viem/chains';import gql from'graphql-tag';import {getMarketKey,getMarketName,getMarketDescription,dictionaries,getSelectionName}from'@azuro-org/dictionaries';import {formatUnits
|
|
1
|
+
import {gnosis,polygon,polygonAmoy,chiliz,spicy,base,baseSepolia}from'viem/chains';import gql from'graphql-tag';import {getMarketKey,getMarketName,getMarketDescription,dictionaries,getSelectionName}from'@azuro-org/dictionaries';import {parseUnits,formatUnits}from'viem';const isDevEnabled = Boolean(JSON.parse(process.env.AZURO_UNSTABLE_DEV_ENABLED || 'false'));
|
|
2
2
|
var Environment;
|
|
3
3
|
(function (Environment) {
|
|
4
4
|
Environment["GnosisDevXDAI"] = "GnosisDevXDAI";
|
|
@@ -4548,8 +4548,7 @@ const getApiEndpoint = (chainId) => {
|
|
|
4548
4548
|
return 'https://preprod-api.azuro.org/api/v1/public';
|
|
4549
4549
|
}
|
|
4550
4550
|
return 'https://api.azuro.org/api/v1/public';
|
|
4551
|
-
};const
|
|
4552
|
-
const ODDS_DECIMALS = 12;
|
|
4551
|
+
};const ODDS_DECIMALS = 12;
|
|
4553
4552
|
const MIN_BET_AMOUNT = 1;
|
|
4554
4553
|
const CLIENT_DATA_TYPES = [
|
|
4555
4554
|
{ name: 'attention', type: 'string' },
|
|
@@ -4985,6 +4984,7 @@ const chainsDataByEnv = {
|
|
|
4985
4984
|
selections {
|
|
4986
4985
|
odds
|
|
4987
4986
|
result
|
|
4987
|
+
conditionKind
|
|
4988
4988
|
outcome {
|
|
4989
4989
|
outcomeId
|
|
4990
4990
|
title
|
|
@@ -5130,6 +5130,7 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
|
|
|
5130
5130
|
fragment GameInfo on Game {
|
|
5131
5131
|
id
|
|
5132
5132
|
gameId
|
|
5133
|
+
slug
|
|
5133
5134
|
title
|
|
5134
5135
|
startsAt
|
|
5135
5136
|
state
|
|
@@ -5209,6 +5210,9 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
|
|
|
5209
5210
|
slug
|
|
5210
5211
|
name
|
|
5211
5212
|
sportId
|
|
5213
|
+
sporthub {
|
|
5214
|
+
id
|
|
5215
|
+
}
|
|
5212
5216
|
activeGamesCount
|
|
5213
5217
|
activeLiveGamesCount
|
|
5214
5218
|
activePrematchGamesCount
|
|
@@ -5234,7 +5238,12 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
|
|
|
5234
5238
|
}
|
|
5235
5239
|
`;const SportsDocument = gql `
|
|
5236
5240
|
query Sports($first: Int, $sportFilter: Sport_filter, $countryFilter: Country_filter, $leagueFilter: League_filter, $gameFilter: Game_filter, $gameOrderBy: Game_orderBy, $gameOrderDirection: OrderDirection) {
|
|
5237
|
-
sports(
|
|
5241
|
+
sports(
|
|
5242
|
+
where: $sportFilter
|
|
5243
|
+
orderBy: turnover
|
|
5244
|
+
orderDirection: desc
|
|
5245
|
+
subgraphError: allow
|
|
5246
|
+
) {
|
|
5238
5247
|
id
|
|
5239
5248
|
slug
|
|
5240
5249
|
name
|
|
@@ -5267,6 +5276,9 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
|
|
|
5267
5276
|
slug
|
|
5268
5277
|
name
|
|
5269
5278
|
sportId
|
|
5279
|
+
sporthub {
|
|
5280
|
+
id
|
|
5281
|
+
}
|
|
5270
5282
|
activeGamesCount
|
|
5271
5283
|
activeLiveGamesCount
|
|
5272
5284
|
activePrematchGamesCount
|
|
@@ -6393,7 +6405,7 @@ const getBetStatus = (props) => {
|
|
|
6393
6405
|
conditionId,
|
|
6394
6406
|
state,
|
|
6395
6407
|
isExpressForbidden,
|
|
6396
|
-
margin
|
|
6408
|
+
margin,
|
|
6397
6409
|
outcomes: [],
|
|
6398
6410
|
};
|
|
6399
6411
|
new Array(...rawOutcomes).sort((a, b) => {
|
|
@@ -6902,4 +6914,4 @@ const createCashout = async (props) => {
|
|
|
6902
6914
|
}
|
|
6903
6915
|
const data = await response.json();
|
|
6904
6916
|
return data;
|
|
6905
|
-
};export{BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetResult,BetState,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BetsDocument,BettorFragmentDoc,BettorsDocument,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Environment,FreeBetStatus,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,
|
|
6917
|
+
};export{Aggregation_Interval,BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetResult,BetState,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BetsDocument,BettorFragmentDoc,BettorsDocument,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Country_OrderBy,Environment,EventName,Event_OrderBy,FreeBetStatus,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,League_OrderBy,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,MIN_BET_AMOUNT,NavigationDocument,ODDS_DECIMALS,OrderDirection,OutcomeResult,Outcome_OrderBy,Participant_OrderBy,V3_SelectionConditionKind as SelectionKind,SelectionResult,SportHub_OrderBy,Sport_OrderBy,SportsDocument,SportsNavigationDocument,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,VirtualCondition_OrderBy,VritualGame_OrderBy,WaveLevelName,_SubgraphErrorPolicy_,activateWave,azuroBetAbi,calcMindOdds,cashoutAbi,chainsData,chainsDataByEnv,coreAbi,createBet,createCashout,createComboBet,environments,FreeBet as freeBetAbi,getApiEndpoint,getBet,getBetFee,getBetStatus,getBetTypedData,getBetsGraphqlEndpoint,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getFeedGraphqlEndpoint,getFreeBets,getIsPendingResolution,getMaxBet,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,groupConditionsByMarket,lpAbi,relayerAbi,setupContracts};
|