fansunited-frontend-core 0.0.88 → 0.0.89
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/functions/sportsEvents.d.ts +27 -0
- package/functions/sportsEvents.d.ts.map +1 -0
- package/index.es.js +1870 -1758
- package/interfaces/interfaces.d.ts +65 -32
- package/interfaces/interfaces.d.ts.map +1 -1
- package/locales/ar.json.d.ts +7 -0
- package/locales/bg.json.d.ts +7 -0
- package/locales/de.json.d.ts +7 -0
- package/locales/el.json.d.ts +7 -0
- package/locales/en.json.d.ts +7 -0
- package/locales/es.json.d.ts +7 -0
- package/locales/fr-be.json.d.ts +7 -0
- package/locales/fr.json.d.ts +7 -0
- package/locales/it.json.d.ts +7 -0
- package/locales/pl.json.d.ts +7 -0
- package/locales/pt-br.json.d.ts +7 -0
- package/locales/pt.json.d.ts +7 -0
- package/locales/ro.json.d.ts +7 -0
- package/locales/sk.json.d.ts +7 -0
- package/locales/sr.json.d.ts +7 -0
- package/locales/tr.json.d.ts +7 -0
- package/package.json +1 -1
- package/types/types.d.ts +29 -5
- package/types/types.d.ts.map +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FansUnitedSDKModel } from 'fansunited-sdk-esm';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Raw payload from the single-event-by-id endpoint (`GET /v1/events/{event_id}`). `event` carries
|
|
5
|
+
* `sport`, `status` and both competitor objects; the rest is bundled alongside it.
|
|
6
|
+
*/
|
|
7
|
+
export interface RawEvent {
|
|
8
|
+
event: Record<string, any>;
|
|
9
|
+
form?: Record<string, any>;
|
|
10
|
+
stats?: Record<string, any>;
|
|
11
|
+
standings?: Record<string, any>;
|
|
12
|
+
head_to_head?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export interface SportsApiCredentials {
|
|
15
|
+
apiKey: string;
|
|
16
|
+
clientId: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const getSportsApiCredentials: (sdk: FansUnitedSDKModel) => SportsApiCredentials | null;
|
|
19
|
+
/**
|
|
20
|
+
* One event by id. Null on any failure (missing credentials, network error, non-2xx, malformed
|
|
21
|
+
* body), so callers render their "not available" state rather than throwing.
|
|
22
|
+
*
|
|
23
|
+
* `disableCache` is for live polling: a timestamp makes each request a distinct URL, so neither the
|
|
24
|
+
* SDK's cache nor a CDN in front of the API serves the same score back every interval.
|
|
25
|
+
*/
|
|
26
|
+
export declare const fetchEventById: (sdk: FansUnitedSDKModel, eventId: string, signal?: AbortSignal, disableCache?: boolean) => Promise<RawEvent | null>;
|
|
27
|
+
//# sourceMappingURL=sportsEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sportsEvents.d.ts","sourceRoot":"","sources":["../../src/functions/sportsEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAIxD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,QAC7B,kBAAkB,KACtB,oBAAoB,GAAG,IAQzB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QACpB,kBAAkB,WACd,MAAM,WACN,WAAW,6BAEnB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAmBzB,CAAC"}
|