@liberfi.io/react-predict 0.3.66 → 0.3.68
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/index.d.mts +48 -6
- package/dist/index.d.ts +48 -6
- package/dist/index.js +559 -141
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +532 -143
- package/dist/index.mjs.map +1 -1
- package/dist/{server-pS5Vlydo.d.mts → server-CCZfNoWO.d.mts} +257 -3
- package/dist/{server-pS5Vlydo.d.ts → server-CCZfNoWO.d.ts} +257 -3
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +207 -2
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +178 -3
- package/dist/server.mjs.map +1 -1
- package/package.json +11 -4
package/dist/server.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { N as BalanceResponse, cv as BuildClobAuthMessageInput, cK as BuildOrderMessageInput, cm as CLOB_AUTH_DOMAIN, cn as CLOB_AUTH_TYPES, cw as CTF_EXCHANGE_ADDRESS, cB as CTF_ORDER_TYPES, V as CancelOrderResult, G as Candlestick, cJ as ClobOrderPayload, aA as CreateOrderInput, cN as DEFAULT_PAGE_SIZE, bh as DFlowOrderContext, a1 as DFlowQuoteRequest, a2 as DFlowQuoteResponse, a4 as DFlowSubmitRequest, a3 as DFlowSubmitResponse, bm as DepositBuildRequest, bn as DepositBuildResponse, bq as DepositStatusResponse, bo as DepositSubmitRequest, bp as DepositSubmitResponse, b3 as EsportsMatchDetailParams, l as EsportsMatchesParams, m as EsportsPropsParams, E as EsportsTaxonomyParams, v as EventSortField, u as EventStatus, b8 as EventSummary, cs as HttpMethod, F as ListCandlesticksParams, L as ListEventsParams, z as ListMarketTradesParams, Q as ListOrdersParams, $ as ListTradesParams, aK as MarketOutcome, aJ as MarketResult, aI as MarketStatus, b9 as MarketSummary, bA as MatchConfidenceTier, Y as MatchGroup, bw as MatchGroupEntry, bx as MatchGroupMarket, X as MatchGroupPage, bC as MatchLeg, bD as MatchMarketFlat, _ as MatchMarketPage, Z as MatchMarketParams, by as MatchSortField, bv as MatchStatus, W as MatchesParams, bz as MatchesStats, cx as NEG_RISK_CTF_EXCHANGE_ADDRESS, cC as ORDER_TYPE, cL as OrderMessage, bg as OrderSide, bf as OrderStatus, O as Orderbook, aL as OrderbookLevel, cz as POLYGON_CHAIN_ID, cu as PolymarketL2Headers, ct as PolymarketL2HeadersInput, bi as PolymarketOrderType, bd as PositionValue, be as PositionValueError, K as PositionValueResponse, J as PositionsResponse, P as PredictClient, aC as PredictClientOptions, c as PredictEvent, x as PredictMarket, R as PredictOrder, b as PredictPage, bc as PredictPosition, e as PredictSearchParams, f as PredictSearchResponse, b6 as PredictSearchResult, b4 as PredictSearchResultType, b5 as PredictSearchSortField, aG as PredictTag, A as PredictTrade, a as PredictWsClient, aE as PredictWsClientConfig, C as PriceHistoryParams, B as PriceHistoryRange, D as PriceHistoryResponse, bb as PricePoint, aF as ProviderMeta, d as ProviderSource, cd as ResolveEventsParamsInput, cD as SIDE, aH as SettlementSource, bB as SignalTag, cM as SignedOrder, w as SimilarEventsParams, aU as SportsBinaryOutcome, aR as SportsEventType, a_ as SportsInlineMarket, aY as SportsLiveState, a$ as SportsMarket, b0 as SportsMarketGroup, aZ as SportsMarketOutcome, b1 as SportsMatchCard, r as SportsMatchDetail, q as SportsMatchDetailParams, h as SportsMatchesParams, i as SportsMatchesResponse, s as SportsOrderbookKey, aX as SportsParticipant, b2 as SportsPropEventCard, j as SportsPropsParams, k as SportsPropsResponse, aQ as SportsProviderSource, aS as SportsRouteType, n as SportsRoutingParams, o as SportsRoutingResponse, p as SportsSection, aV as SportsTaxonomyNode, aT as SportsTaxonomyNodeType, S as SportsTaxonomyParams, g as SportsTaxonomyResponse, aW as SportsTaxonomySection, ce as TagSlugSelection, b7 as TradeType, cy as USDC_ADDRESS, br as UnsignedTx, bE as WsChannel, bF as WsChannelEvent, bG as WsClientMessage, av as WsConnectionStatus, aw as WsDataMessage, bM as WsErrorCode, bN as WsErrorMessage, ay as WsOrderbookEvent, bI as WsPingMessage, bK as WsPongMessage, ax as WsPriceEvent, bJ as WsServerMessage, bH as WsSubscribeMessage, bL as WsSubscribedMessage, az as WsTradeEvent, co as buildClobAuthMessage, cG as buildClobPayload, cA as buildCtfExchangeDomain, cE as buildOrderMessage, cq as buildPolymarketL2Headers, cF as buildSignedOrder, aB as createPredictClient, aD as createPredictWsClient, cr as derivePolymarketApiKey, cV as esportsMatchDetailQueryKey, c1 as esportsMatchesQueryKey, c3 as esportsPropsQueryKey, b$ as esportsTaxonomyQueryKey, bR as eventQueryKey, cY as fetchEsportsMatchDetail, c2 as fetchEsportsMatches, c4 as fetchEsportsProps, c0 as fetchEsportsTaxonomy, bS as fetchEvent, cc as fetchEventsPage, cg as fetchMarket, cl as fetchMatchMarketsPage, cj as fetchMatchesPage, bU as fetchPredictSearch, c8 as fetchSportsMatchDetail, bY as fetchSportsMatches, b_ as fetchSportsProps, c6 as fetchSportsRouting, bW as fetchSportsTaxonomy, cp as hmacSha256Base64, cb as infiniteEventsQueryKey, cf as marketQueryKey, ck as matchMarketsQueryKey, ci as matchQueryKey, ch as matchesQueryKey, bT as predictSearchQueryKey, cX as resolveEsportsMatchDetailParams, cS as resolveEsportsMatchesParams, cT as resolveEsportsPropsParams, cR as resolveEsportsTaxonomyParams, ca as resolveEventsParams, cZ as resolvePredictSearchParams, cW as resolveSportsMatchDetailParams, cP as resolveSportsMatchesParams, cQ as resolveSportsPropsParams, cU as resolveSportsRoutingParams, cO as resolveSportsTaxonomyParams, c9 as resolveTagSlug, c7 as sportsMatchDetailQueryKey, bX as sportsMatchesQueryKey, bZ as sportsPropsQueryKey, c5 as sportsRoutingQueryKey, bV as sportsTaxonomyQueryKey } from './server-CCZfNoWO.mjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { N as BalanceResponse, cv as BuildClobAuthMessageInput, cK as BuildOrderMessageInput, cm as CLOB_AUTH_DOMAIN, cn as CLOB_AUTH_TYPES, cw as CTF_EXCHANGE_ADDRESS, cB as CTF_ORDER_TYPES, V as CancelOrderResult, G as Candlestick, cJ as ClobOrderPayload, aA as CreateOrderInput, cN as DEFAULT_PAGE_SIZE, bh as DFlowOrderContext, a1 as DFlowQuoteRequest, a2 as DFlowQuoteResponse, a4 as DFlowSubmitRequest, a3 as DFlowSubmitResponse, bm as DepositBuildRequest, bn as DepositBuildResponse, bq as DepositStatusResponse, bo as DepositSubmitRequest, bp as DepositSubmitResponse, b3 as EsportsMatchDetailParams, l as EsportsMatchesParams, m as EsportsPropsParams, E as EsportsTaxonomyParams, v as EventSortField, u as EventStatus, b8 as EventSummary, cs as HttpMethod, F as ListCandlesticksParams, L as ListEventsParams, z as ListMarketTradesParams, Q as ListOrdersParams, $ as ListTradesParams, aK as MarketOutcome, aJ as MarketResult, aI as MarketStatus, b9 as MarketSummary, bA as MatchConfidenceTier, Y as MatchGroup, bw as MatchGroupEntry, bx as MatchGroupMarket, X as MatchGroupPage, bC as MatchLeg, bD as MatchMarketFlat, _ as MatchMarketPage, Z as MatchMarketParams, by as MatchSortField, bv as MatchStatus, W as MatchesParams, bz as MatchesStats, cx as NEG_RISK_CTF_EXCHANGE_ADDRESS, cC as ORDER_TYPE, cL as OrderMessage, bg as OrderSide, bf as OrderStatus, O as Orderbook, aL as OrderbookLevel, cz as POLYGON_CHAIN_ID, cu as PolymarketL2Headers, ct as PolymarketL2HeadersInput, bi as PolymarketOrderType, bd as PositionValue, be as PositionValueError, K as PositionValueResponse, J as PositionsResponse, P as PredictClient, aC as PredictClientOptions, c as PredictEvent, x as PredictMarket, R as PredictOrder, b as PredictPage, bc as PredictPosition, e as PredictSearchParams, f as PredictSearchResponse, b6 as PredictSearchResult, b4 as PredictSearchResultType, b5 as PredictSearchSortField, aG as PredictTag, A as PredictTrade, a as PredictWsClient, aE as PredictWsClientConfig, C as PriceHistoryParams, B as PriceHistoryRange, D as PriceHistoryResponse, bb as PricePoint, aF as ProviderMeta, d as ProviderSource, cd as ResolveEventsParamsInput, cD as SIDE, aH as SettlementSource, bB as SignalTag, cM as SignedOrder, w as SimilarEventsParams, aU as SportsBinaryOutcome, aR as SportsEventType, a_ as SportsInlineMarket, aY as SportsLiveState, a$ as SportsMarket, b0 as SportsMarketGroup, aZ as SportsMarketOutcome, b1 as SportsMatchCard, r as SportsMatchDetail, q as SportsMatchDetailParams, h as SportsMatchesParams, i as SportsMatchesResponse, s as SportsOrderbookKey, aX as SportsParticipant, b2 as SportsPropEventCard, j as SportsPropsParams, k as SportsPropsResponse, aQ as SportsProviderSource, aS as SportsRouteType, n as SportsRoutingParams, o as SportsRoutingResponse, p as SportsSection, aV as SportsTaxonomyNode, aT as SportsTaxonomyNodeType, S as SportsTaxonomyParams, g as SportsTaxonomyResponse, aW as SportsTaxonomySection, ce as TagSlugSelection, b7 as TradeType, cy as USDC_ADDRESS, br as UnsignedTx, bE as WsChannel, bF as WsChannelEvent, bG as WsClientMessage, av as WsConnectionStatus, aw as WsDataMessage, bM as WsErrorCode, bN as WsErrorMessage, ay as WsOrderbookEvent, bI as WsPingMessage, bK as WsPongMessage, ax as WsPriceEvent, bJ as WsServerMessage, bH as WsSubscribeMessage, bL as WsSubscribedMessage, az as WsTradeEvent, co as buildClobAuthMessage, cG as buildClobPayload, cA as buildCtfExchangeDomain, cE as buildOrderMessage, cq as buildPolymarketL2Headers, cF as buildSignedOrder, aB as createPredictClient, aD as createPredictWsClient, cr as derivePolymarketApiKey, cV as esportsMatchDetailQueryKey, c1 as esportsMatchesQueryKey, c3 as esportsPropsQueryKey, b$ as esportsTaxonomyQueryKey, bR as eventQueryKey, cY as fetchEsportsMatchDetail, c2 as fetchEsportsMatches, c4 as fetchEsportsProps, c0 as fetchEsportsTaxonomy, bS as fetchEvent, cc as fetchEventsPage, cg as fetchMarket, cl as fetchMatchMarketsPage, cj as fetchMatchesPage, bU as fetchPredictSearch, c8 as fetchSportsMatchDetail, bY as fetchSportsMatches, b_ as fetchSportsProps, c6 as fetchSportsRouting, bW as fetchSportsTaxonomy, cp as hmacSha256Base64, cb as infiniteEventsQueryKey, cf as marketQueryKey, ck as matchMarketsQueryKey, ci as matchQueryKey, ch as matchesQueryKey, bT as predictSearchQueryKey, cX as resolveEsportsMatchDetailParams, cS as resolveEsportsMatchesParams, cT as resolveEsportsPropsParams, cR as resolveEsportsTaxonomyParams, ca as resolveEventsParams, cZ as resolvePredictSearchParams, cW as resolveSportsMatchDetailParams, cP as resolveSportsMatchesParams, cQ as resolveSportsPropsParams, cU as resolveSportsRoutingParams, cO as resolveSportsTaxonomyParams, c9 as resolveTagSlug, c7 as sportsMatchDetailQueryKey, bX as sportsMatchesQueryKey, bZ as sportsPropsQueryKey, c5 as sportsRoutingQueryKey, bV as sportsTaxonomyQueryKey } from './server-CCZfNoWO.js';
|
package/dist/server.js
CHANGED
|
@@ -86,6 +86,119 @@ function matchMarketsQueryKey(params) {
|
|
|
86
86
|
async function fetchMatchMarketsPage(client, params) {
|
|
87
87
|
return client.listMatchMarkets(params);
|
|
88
88
|
}
|
|
89
|
+
|
|
90
|
+
// src/hooks/predict/sports.params.ts
|
|
91
|
+
function sportsTaxonomyQueryKey(params) {
|
|
92
|
+
return ["predict", "sports", "taxonomy", params];
|
|
93
|
+
}
|
|
94
|
+
function sportsMatchesQueryKey(params) {
|
|
95
|
+
return ["predict", "sports", "matches", params];
|
|
96
|
+
}
|
|
97
|
+
function sportsPropsQueryKey(params) {
|
|
98
|
+
return ["predict", "sports", "props", params];
|
|
99
|
+
}
|
|
100
|
+
function resolveSportsTaxonomyParams(params = {}) {
|
|
101
|
+
return { ...params, section: "sports" };
|
|
102
|
+
}
|
|
103
|
+
function resolveSportsMatchesParams(params = {}) {
|
|
104
|
+
return params;
|
|
105
|
+
}
|
|
106
|
+
function resolveSportsPropsParams(params = {}) {
|
|
107
|
+
return params;
|
|
108
|
+
}
|
|
109
|
+
async function fetchSportsTaxonomy(client, params) {
|
|
110
|
+
return client.getSportsTaxonomy(resolveSportsTaxonomyParams(params));
|
|
111
|
+
}
|
|
112
|
+
async function fetchSportsMatches(client, params) {
|
|
113
|
+
return client.getSportsMatches(resolveSportsMatchesParams(params));
|
|
114
|
+
}
|
|
115
|
+
async function fetchSportsProps(client, params) {
|
|
116
|
+
return client.getSportsProps(resolveSportsPropsParams(params));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// src/hooks/predict/esports.params.ts
|
|
120
|
+
function esportsTaxonomyQueryKey(params) {
|
|
121
|
+
return ["predict", "esports", "taxonomy", params];
|
|
122
|
+
}
|
|
123
|
+
function esportsMatchesQueryKey(params) {
|
|
124
|
+
return ["predict", "esports", "matches", params];
|
|
125
|
+
}
|
|
126
|
+
function esportsPropsQueryKey(params) {
|
|
127
|
+
return ["predict", "esports", "props", params];
|
|
128
|
+
}
|
|
129
|
+
function resolveEsportsTaxonomyParams(params = {}) {
|
|
130
|
+
return params;
|
|
131
|
+
}
|
|
132
|
+
function resolveEsportsMatchesParams(params = {}) {
|
|
133
|
+
return params;
|
|
134
|
+
}
|
|
135
|
+
function resolveEsportsPropsParams(params = {}) {
|
|
136
|
+
return params;
|
|
137
|
+
}
|
|
138
|
+
async function fetchEsportsTaxonomy(client, params) {
|
|
139
|
+
return client.getEsportsTaxonomy(resolveEsportsTaxonomyParams(params));
|
|
140
|
+
}
|
|
141
|
+
async function fetchEsportsMatches(client, params) {
|
|
142
|
+
return client.getEsportsMatches(resolveEsportsMatchesParams(params));
|
|
143
|
+
}
|
|
144
|
+
async function fetchEsportsProps(client, params) {
|
|
145
|
+
return client.getEsportsProps(resolveEsportsPropsParams(params));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// src/hooks/predict/sports-routing.params.ts
|
|
149
|
+
function sportsRoutingQueryKey(slug, params) {
|
|
150
|
+
return ["predict", "sports", "routing", slug, params];
|
|
151
|
+
}
|
|
152
|
+
function resolveSportsRoutingParams(params = {}) {
|
|
153
|
+
return params;
|
|
154
|
+
}
|
|
155
|
+
async function fetchSportsRouting(client, slug, params) {
|
|
156
|
+
return client.getSportsRouting(slug, resolveSportsRoutingParams(params));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// src/hooks/predict/sports-match-detail.params.ts
|
|
160
|
+
function sportsMatchDetailQueryKey(section, matchGroupSlug, params) {
|
|
161
|
+
return ["predict", section, "match-detail", matchGroupSlug, params];
|
|
162
|
+
}
|
|
163
|
+
function esportsMatchDetailQueryKey(matchGroupSlug, params) {
|
|
164
|
+
return sportsMatchDetailQueryKey("esports", matchGroupSlug, params);
|
|
165
|
+
}
|
|
166
|
+
function resolveSportsMatchDetailParams(params = {}) {
|
|
167
|
+
return params;
|
|
168
|
+
}
|
|
169
|
+
function resolveEsportsMatchDetailParams(params = {}) {
|
|
170
|
+
return params;
|
|
171
|
+
}
|
|
172
|
+
async function fetchSportsMatchDetail(client, section, matchGroupSlug, params) {
|
|
173
|
+
return client.getSportsMatchDetail(
|
|
174
|
+
section,
|
|
175
|
+
matchGroupSlug,
|
|
176
|
+
resolveSportsMatchDetailParams(params)
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
async function fetchEsportsMatchDetail(client, matchGroupSlug, params) {
|
|
180
|
+
return client.getEsportsMatchDetail(
|
|
181
|
+
matchGroupSlug,
|
|
182
|
+
resolveEsportsMatchDetailParams(params)
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// src/hooks/predict/search.params.ts
|
|
187
|
+
function predictSearchQueryKey(params) {
|
|
188
|
+
return ["predict", "search-documents", params];
|
|
189
|
+
}
|
|
190
|
+
function resolvePredictSearchParams(params = {}) {
|
|
191
|
+
const q = params.q ?? "";
|
|
192
|
+
return {
|
|
193
|
+
...params,
|
|
194
|
+
q,
|
|
195
|
+
sort_by: params.sort_by ?? (q ? "relevance" : "volume"),
|
|
196
|
+
sort_asc: params.sort_asc ?? (q ? void 0 : false)
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
async function fetchPredictSearch(client, params) {
|
|
200
|
+
return client.search(resolvePredictSearchParams(params));
|
|
201
|
+
}
|
|
89
202
|
function buildQuery(params) {
|
|
90
203
|
const qs = new URLSearchParams();
|
|
91
204
|
for (const [key, value] of Object.entries(params)) {
|
|
@@ -163,6 +276,67 @@ var PredictClient = class {
|
|
|
163
276
|
const url = `${this.endpoint}/api/v1/events/${encodeURIComponent(slug)}/similar${query}`;
|
|
164
277
|
return await utils.httpGet(url);
|
|
165
278
|
}
|
|
279
|
+
// -------------------------------------------------------------------------
|
|
280
|
+
// Sports / esports
|
|
281
|
+
// -------------------------------------------------------------------------
|
|
282
|
+
/** Maps to `GET /api/v1/sports/taxonomy`. */
|
|
283
|
+
async getSportsTaxonomy(params) {
|
|
284
|
+
const query = buildQuery(params ?? {});
|
|
285
|
+
const url = `${this.endpoint}/api/v1/sports/taxonomy${query}`;
|
|
286
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
287
|
+
}
|
|
288
|
+
/** Maps to `GET /api/v1/sports/matches`. */
|
|
289
|
+
async getSportsMatches(params) {
|
|
290
|
+
const query = buildQuery(params ?? {});
|
|
291
|
+
const url = `${this.endpoint}/api/v1/sports/matches${query}`;
|
|
292
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
293
|
+
}
|
|
294
|
+
/** Maps to `GET /api/v1/sports/props`. */
|
|
295
|
+
async getSportsProps(params) {
|
|
296
|
+
const query = buildQuery(params ?? {});
|
|
297
|
+
const url = `${this.endpoint}/api/v1/sports/props${query}`;
|
|
298
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
299
|
+
}
|
|
300
|
+
/** Maps to `GET /api/v1/esports/taxonomy`. */
|
|
301
|
+
async getEsportsTaxonomy(params) {
|
|
302
|
+
const query = buildQuery(params ?? {});
|
|
303
|
+
const url = `${this.endpoint}/api/v1/esports/taxonomy${query}`;
|
|
304
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
305
|
+
}
|
|
306
|
+
/** Maps to `GET /api/v1/esports/matches`. */
|
|
307
|
+
async getEsportsMatches(params) {
|
|
308
|
+
const query = buildQuery(params ?? {});
|
|
309
|
+
const url = `${this.endpoint}/api/v1/esports/matches${query}`;
|
|
310
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
311
|
+
}
|
|
312
|
+
/** Maps to `GET /api/v1/esports/props`. */
|
|
313
|
+
async getEsportsProps(params) {
|
|
314
|
+
const query = buildQuery(params ?? {});
|
|
315
|
+
const url = `${this.endpoint}/api/v1/esports/props${query}`;
|
|
316
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
317
|
+
}
|
|
318
|
+
/** Maps to `GET /api/v1/sports/routing/:slug`. */
|
|
319
|
+
async getSportsRouting(slug, params) {
|
|
320
|
+
const query = buildQuery(params ?? {});
|
|
321
|
+
const url = `${this.endpoint}/api/v1/sports/routing/${encodeURIComponent(slug)}${query}`;
|
|
322
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
323
|
+
}
|
|
324
|
+
/** Maps to `GET /api/v1/sports/matches/:match_group_slug`. */
|
|
325
|
+
async getSportsMatchDetail(section, matchGroupSlug, params) {
|
|
326
|
+
const query = buildQuery(params ?? {});
|
|
327
|
+
const url = `${this.endpoint}/api/v1/${encodeURIComponent(section)}/matches/${encodeURIComponent(matchGroupSlug)}${query}`;
|
|
328
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
329
|
+
}
|
|
330
|
+
/** Convenience wrapper for `GET /api/v1/esports/matches/:match_group_slug`. */
|
|
331
|
+
async getEsportsMatchDetail(matchGroupSlug, params) {
|
|
332
|
+
return this.getSportsMatchDetail("esports", matchGroupSlug, params);
|
|
333
|
+
}
|
|
334
|
+
/** Maps to `GET /api/v1/search`. */
|
|
335
|
+
async search(params) {
|
|
336
|
+
const query = buildQuery(params ?? {});
|
|
337
|
+
const url = `${this.endpoint}/api/v1/search${query}`;
|
|
338
|
+
return await utils.httpGet(url, this.requestOptions());
|
|
339
|
+
}
|
|
166
340
|
/**
|
|
167
341
|
* List comments for a prediction event.
|
|
168
342
|
*
|
|
@@ -224,8 +398,9 @@ var PredictClient = class {
|
|
|
224
398
|
return await utils.httpGet(url);
|
|
225
399
|
}
|
|
226
400
|
/** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
|
|
227
|
-
async getPriceHistory(slug,
|
|
228
|
-
const
|
|
401
|
+
async getPriceHistory(slug, sourceOrParams, range) {
|
|
402
|
+
const params = typeof sourceOrParams === "string" ? { source: sourceOrParams, range } : sourceOrParams;
|
|
403
|
+
const query = buildQuery(params);
|
|
229
404
|
const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}/price-history${query}`;
|
|
230
405
|
return await utils.httpGet(url);
|
|
231
406
|
}
|
|
@@ -1300,19 +1475,49 @@ exports.buildSignedOrder = buildSignedOrder;
|
|
|
1300
1475
|
exports.createPredictClient = createPredictClient;
|
|
1301
1476
|
exports.createPredictWsClient = createPredictWsClient;
|
|
1302
1477
|
exports.derivePolymarketApiKey = derivePolymarketApiKey;
|
|
1478
|
+
exports.esportsMatchDetailQueryKey = esportsMatchDetailQueryKey;
|
|
1479
|
+
exports.esportsMatchesQueryKey = esportsMatchesQueryKey;
|
|
1480
|
+
exports.esportsPropsQueryKey = esportsPropsQueryKey;
|
|
1481
|
+
exports.esportsTaxonomyQueryKey = esportsTaxonomyQueryKey;
|
|
1303
1482
|
exports.eventQueryKey = eventQueryKey;
|
|
1483
|
+
exports.fetchEsportsMatchDetail = fetchEsportsMatchDetail;
|
|
1484
|
+
exports.fetchEsportsMatches = fetchEsportsMatches;
|
|
1485
|
+
exports.fetchEsportsProps = fetchEsportsProps;
|
|
1486
|
+
exports.fetchEsportsTaxonomy = fetchEsportsTaxonomy;
|
|
1304
1487
|
exports.fetchEvent = fetchEvent;
|
|
1305
1488
|
exports.fetchEventsPage = fetchEventsPage;
|
|
1306
1489
|
exports.fetchMarket = fetchMarket;
|
|
1307
1490
|
exports.fetchMatchMarketsPage = fetchMatchMarketsPage;
|
|
1308
1491
|
exports.fetchMatchesPage = fetchMatchesPage;
|
|
1492
|
+
exports.fetchPredictSearch = fetchPredictSearch;
|
|
1493
|
+
exports.fetchSportsMatchDetail = fetchSportsMatchDetail;
|
|
1494
|
+
exports.fetchSportsMatches = fetchSportsMatches;
|
|
1495
|
+
exports.fetchSportsProps = fetchSportsProps;
|
|
1496
|
+
exports.fetchSportsRouting = fetchSportsRouting;
|
|
1497
|
+
exports.fetchSportsTaxonomy = fetchSportsTaxonomy;
|
|
1309
1498
|
exports.hmacSha256Base64 = hmacSha256Base64;
|
|
1310
1499
|
exports.infiniteEventsQueryKey = infiniteEventsQueryKey;
|
|
1311
1500
|
exports.marketQueryKey = marketQueryKey;
|
|
1312
1501
|
exports.matchMarketsQueryKey = matchMarketsQueryKey;
|
|
1313
1502
|
exports.matchQueryKey = matchQueryKey;
|
|
1314
1503
|
exports.matchesQueryKey = matchesQueryKey;
|
|
1504
|
+
exports.predictSearchQueryKey = predictSearchQueryKey;
|
|
1505
|
+
exports.resolveEsportsMatchDetailParams = resolveEsportsMatchDetailParams;
|
|
1506
|
+
exports.resolveEsportsMatchesParams = resolveEsportsMatchesParams;
|
|
1507
|
+
exports.resolveEsportsPropsParams = resolveEsportsPropsParams;
|
|
1508
|
+
exports.resolveEsportsTaxonomyParams = resolveEsportsTaxonomyParams;
|
|
1315
1509
|
exports.resolveEventsParams = resolveEventsParams;
|
|
1510
|
+
exports.resolvePredictSearchParams = resolvePredictSearchParams;
|
|
1511
|
+
exports.resolveSportsMatchDetailParams = resolveSportsMatchDetailParams;
|
|
1512
|
+
exports.resolveSportsMatchesParams = resolveSportsMatchesParams;
|
|
1513
|
+
exports.resolveSportsPropsParams = resolveSportsPropsParams;
|
|
1514
|
+
exports.resolveSportsRoutingParams = resolveSportsRoutingParams;
|
|
1515
|
+
exports.resolveSportsTaxonomyParams = resolveSportsTaxonomyParams;
|
|
1316
1516
|
exports.resolveTagSlug = resolveTagSlug;
|
|
1517
|
+
exports.sportsMatchDetailQueryKey = sportsMatchDetailQueryKey;
|
|
1518
|
+
exports.sportsMatchesQueryKey = sportsMatchesQueryKey;
|
|
1519
|
+
exports.sportsPropsQueryKey = sportsPropsQueryKey;
|
|
1520
|
+
exports.sportsRoutingQueryKey = sportsRoutingQueryKey;
|
|
1521
|
+
exports.sportsTaxonomyQueryKey = sportsTaxonomyQueryKey;
|
|
1317
1522
|
//# sourceMappingURL=server.js.map
|
|
1318
1523
|
//# sourceMappingURL=server.js.map
|