@ufcalendar/sdk 0.6.1 → 0.8.0
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 +0 -36
- package/dist/index.cjs +1 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -417
- package/dist/index.d.ts +8 -417
- package/dist/index.js +1 -84
- package/dist/index.js.map +1 -1
- package/package.json +1 -4
package/dist/index.d.cts
CHANGED
|
@@ -139,116 +139,6 @@ interface FightSearchRow extends Fight {
|
|
|
139
139
|
}
|
|
140
140
|
/** `method=` on `findFights`. */
|
|
141
141
|
type FightSearchMethod = 'ko' | 'sub' | 'dec' | 'finish' | 'any';
|
|
142
|
-
interface LiveStatLine {
|
|
143
|
-
knockdowns: number | null;
|
|
144
|
-
sig_strikes_landed: number | null;
|
|
145
|
-
sig_strikes_attempted: number | null;
|
|
146
|
-
total_strikes_landed: number | null;
|
|
147
|
-
total_strikes_attempted: number | null;
|
|
148
|
-
takedowns_landed: number | null;
|
|
149
|
-
takedowns_attempted: number | null;
|
|
150
|
-
submission_attempts: number | null;
|
|
151
|
-
reversals: number | null;
|
|
152
|
-
control_time_sec: number;
|
|
153
|
-
[k: string]: number | null;
|
|
154
|
-
}
|
|
155
|
-
interface LiveCorner {
|
|
156
|
-
src_id: number | null;
|
|
157
|
-
fighter_id: number | null;
|
|
158
|
-
name: string;
|
|
159
|
-
short: string;
|
|
160
|
-
}
|
|
161
|
-
interface LiveCardRow {
|
|
162
|
-
fight_id: number | null;
|
|
163
|
-
src_id: number | null;
|
|
164
|
-
order: number | null;
|
|
165
|
-
section: 'main' | 'prelims' | 'early_prelims';
|
|
166
|
-
status: 'upcoming' | 'live' | 'final' | 'cancelled';
|
|
167
|
-
weight_class: string | null;
|
|
168
|
-
possible_rounds: number | null;
|
|
169
|
-
referee: string | null;
|
|
170
|
-
a: LiveCorner | null;
|
|
171
|
-
b: LiveCorner | null;
|
|
172
|
-
result: {
|
|
173
|
-
winner: 'a' | 'b' | null;
|
|
174
|
-
method: string | null;
|
|
175
|
-
round: number | null;
|
|
176
|
-
time: string | null;
|
|
177
|
-
nc: boolean;
|
|
178
|
-
} | null;
|
|
179
|
-
}
|
|
180
|
-
interface LiveTimelineEntry {
|
|
181
|
-
t: string;
|
|
182
|
-
type: string;
|
|
183
|
-
round: number | null;
|
|
184
|
-
clock: string | null;
|
|
185
|
-
side: 'a' | 'b' | null;
|
|
186
|
-
}
|
|
187
|
-
interface LiveCurrent {
|
|
188
|
-
src_id: number | null;
|
|
189
|
-
fight_id: number | null;
|
|
190
|
-
phase: 'prefight' | 'round' | 'break' | 'over';
|
|
191
|
-
round: number | null;
|
|
192
|
-
possible_rounds: number | null;
|
|
193
|
-
round_length_sec: number;
|
|
194
|
-
round_started_at: string | null;
|
|
195
|
-
clock_sec: number | null;
|
|
196
|
-
clock_observed_at: number;
|
|
197
|
-
official: boolean;
|
|
198
|
-
stats: {
|
|
199
|
-
a: LiveStatLine | null;
|
|
200
|
-
b: LiveStatLine | null;
|
|
201
|
-
} | null;
|
|
202
|
-
rounds: {
|
|
203
|
-
n: number;
|
|
204
|
-
a: LiveStatLine | null;
|
|
205
|
-
b: LiveStatLine | null;
|
|
206
|
-
}[];
|
|
207
|
-
timeline: LiveTimelineEntry[];
|
|
208
|
-
}
|
|
209
|
-
/** The real-time document pushed over wss://live.ufcalendar.com/v1 and
|
|
210
|
-
* returned by GET /v1/events/{id}/live. */
|
|
211
|
-
interface LiveState {
|
|
212
|
-
v: 1;
|
|
213
|
-
seq: number;
|
|
214
|
-
ts: number;
|
|
215
|
-
hash: string;
|
|
216
|
-
event: {
|
|
217
|
-
id: number | null;
|
|
218
|
-
slug: string | null;
|
|
219
|
-
fmid: number | null;
|
|
220
|
-
name: string | null;
|
|
221
|
-
org: string;
|
|
222
|
-
status: 'upcoming' | 'live' | 'completed';
|
|
223
|
-
source: string;
|
|
224
|
-
};
|
|
225
|
-
card: LiveCardRow[];
|
|
226
|
-
current: LiveCurrent | null;
|
|
227
|
-
last: {
|
|
228
|
-
src_id: number | null;
|
|
229
|
-
fight_id: number | null;
|
|
230
|
-
winner: 'a' | 'b' | null;
|
|
231
|
-
method: string | null;
|
|
232
|
-
round: number | null;
|
|
233
|
-
time: string | null;
|
|
234
|
-
} | null;
|
|
235
|
-
}
|
|
236
|
-
/** One frame off the live WebSocket (`wss://live.ufcalendar.com/v1`).
|
|
237
|
-
*
|
|
238
|
-
* `snapshot` arrives on subscribe (`data` is null with `reason: "not_live"`
|
|
239
|
-
* when nothing is streaming yet), `update` on every change, `fight.final`
|
|
240
|
-
* when a bout is official and `event.completed` when the card is over. */
|
|
241
|
-
interface LiveFrame {
|
|
242
|
-
type: 'snapshot' | 'update' | 'fight.final' | 'event.completed' | 'pong' | 'error';
|
|
243
|
-
data?: LiveState | null;
|
|
244
|
-
/** On a `snapshot` with no document: why (`not_live`). */
|
|
245
|
-
reason?: string;
|
|
246
|
-
/** On `error`. */
|
|
247
|
-
code?: string;
|
|
248
|
-
message?: string;
|
|
249
|
-
/** On `pong`. */
|
|
250
|
-
ts?: number;
|
|
251
|
-
}
|
|
252
142
|
/** Normalized method vocabulary; `method` keeps the source's spelling. */
|
|
253
143
|
type MethodNormalized = 'ko_tko' | 'submission' | 'technical_submission' | 'decision_unanimous' | 'decision_split' | 'decision_majority' | 'decision' | 'draw' | 'no_contest' | 'dq' | 'other';
|
|
254
144
|
interface FightResult {
|
|
@@ -1226,8 +1116,8 @@ interface YearStats {
|
|
|
1226
1116
|
interface Plan {
|
|
1227
1117
|
key: string;
|
|
1228
1118
|
name: string;
|
|
1229
|
-
price_monthly_usd: number
|
|
1230
|
-
price_yearly_usd: number
|
|
1119
|
+
price_monthly_usd: number;
|
|
1120
|
+
price_yearly_usd: number;
|
|
1231
1121
|
requests_per_month: number;
|
|
1232
1122
|
rpm: number;
|
|
1233
1123
|
key_limit: number;
|
|
@@ -1244,9 +1134,6 @@ interface Plans {
|
|
|
1244
1134
|
per_account: number;
|
|
1245
1135
|
start_url: string;
|
|
1246
1136
|
};
|
|
1247
|
-
enterprise: {
|
|
1248
|
-
contact: string;
|
|
1249
|
-
};
|
|
1250
1137
|
mcp: {
|
|
1251
1138
|
url: string;
|
|
1252
1139
|
transport: string;
|
|
@@ -1409,9 +1296,6 @@ interface Article {
|
|
|
1409
1296
|
}
|
|
1410
1297
|
|
|
1411
1298
|
declare const DEFAULT_BASE_URL = "https://api.ufcalendar.com/v1";
|
|
1412
|
-
/** The live WebSocket (UFC fight nights, Pro plans and up) — the same document
|
|
1413
|
-
* `GET /v1/events/{id}/live` returns, pushed on every change. */
|
|
1414
|
-
declare const LIVE_WS_URL = "wss://live.ufcalendar.com/v1";
|
|
1415
1299
|
interface FightAPIOptions {
|
|
1416
1300
|
/** `ufcalendar_…` key from https://www.ufcalendar.com/account/api. Falls back
|
|
1417
1301
|
* to `UFCALENDAR_API_KEY` / `UFCAL_API_KEY` in the environment. Only
|
|
@@ -1535,32 +1419,6 @@ declare class FightAPI {
|
|
|
1535
1419
|
kind?: ChangeKind;
|
|
1536
1420
|
limit?: number;
|
|
1537
1421
|
}): AsyncGenerator<ChangeFeedEntry, void, void>;
|
|
1538
|
-
/** Latest real-time LiveState snapshot on fight night (Pro plans and up), or
|
|
1539
|
-
* null when nothing is being streamed. The WebSocket at
|
|
1540
|
-
* wss://live.ufcalendar.com/v1 pushes the same document as it changes — see
|
|
1541
|
-
* `subscribeLive()`. */
|
|
1542
|
-
eventLive(idOrSlug: string | number): Promise<LiveState | null>;
|
|
1543
|
-
/**
|
|
1544
|
-
* Subscribe to the live WebSocket and receive every frame (Pro plans and up).
|
|
1545
|
-
*
|
|
1546
|
-
* The live MMA data stream: opens `wss://live.ufcalendar.com/v1?key=…`, sends
|
|
1547
|
-
* `{"action":"subscribe","event":<slug>}` and calls `onFrame` with each
|
|
1548
|
-
* `LiveFrame` — round, running clock, unofficial in-fight statistics and the
|
|
1549
|
-
* action timeline, the same `LiveState` `eventLive()` returns.
|
|
1550
|
-
*
|
|
1551
|
-
* ```ts
|
|
1552
|
-
* const stop = api.subscribeLive('ufc-331', (f) => console.log(f.type), { until: 'final' });
|
|
1553
|
-
* ```
|
|
1554
|
-
*
|
|
1555
|
-
* Uses the global `WebSocket` (browser, Node >= 22) unless you inject one
|
|
1556
|
-
* (`ws` on older Node). A dropped socket reconnects and re-subscribes ONCE.
|
|
1557
|
-
*
|
|
1558
|
-
* @returns an unsubscribe function — call it to close the socket for good.
|
|
1559
|
-
*/
|
|
1560
|
-
subscribeLive(event: string, onFrame: (frame: LiveFrame) => void, opts?: {
|
|
1561
|
-
until?: 'final';
|
|
1562
|
-
WebSocketImpl?: typeof WebSocket;
|
|
1563
|
-
}): () => void;
|
|
1564
1422
|
/** One bout with its result. `include: ['odds']` adds the current consensus line (the closing line once the bout is settled). */
|
|
1565
1423
|
fight(fightId: number | string, opts?: {
|
|
1566
1424
|
include?: FightInclude[];
|
|
@@ -1836,7 +1694,7 @@ declare class FightAPI {
|
|
|
1836
1694
|
|
|
1837
1695
|
/** Kept in lockstep with package.json and the User-Agent by
|
|
1838
1696
|
* `apps/api/src/surfaces.test.ts`. Bump all three together. */
|
|
1839
|
-
declare const VERSION = "0.
|
|
1697
|
+
declare const VERSION = "0.8.0";
|
|
1840
1698
|
|
|
1841
1699
|
/**
|
|
1842
1700
|
* This file was auto-generated by openapi-typescript.
|
|
@@ -1894,9 +1752,6 @@ interface paths {
|
|
|
1894
1752
|
* "per_account": 1,
|
|
1895
1753
|
* "start_url": "https://www.ufcalendar.com/account/api?trial=1"
|
|
1896
1754
|
* },
|
|
1897
|
-
* "enterprise": {
|
|
1898
|
-
* "contact": "api@ufcalendar.com"
|
|
1899
|
-
* },
|
|
1900
1755
|
* "mcp": {
|
|
1901
1756
|
* "url": "https://api.ufcalendar.com/mcp",
|
|
1902
1757
|
* "transport": "streamable-http",
|
|
@@ -2689,134 +2544,6 @@ interface paths {
|
|
|
2689
2544
|
patch?: never;
|
|
2690
2545
|
trace?: never;
|
|
2691
2546
|
};
|
|
2692
|
-
"/v1/events/{idOrSlug}/live": {
|
|
2693
|
-
parameters: {
|
|
2694
|
-
query?: never;
|
|
2695
|
-
header?: never;
|
|
2696
|
-
path?: never;
|
|
2697
|
-
cookie?: never;
|
|
2698
|
-
};
|
|
2699
|
-
/**
|
|
2700
|
-
* Live snapshot (Pro+)
|
|
2701
|
-
* @description The latest real-time document for an event on fight night — the same `LiveState` the WebSocket pushes: card order and statuses, the bout in progress (`current`: phase, round, running clock, unofficial totals and per-round stats, referee, a timestamped action timeline), and the last result. `data` is `null` with `meta.live: false` when nothing is being streamed. Poll it at most every few seconds, or connect to the WebSocket in `meta.websocket` (`?key=` on the URL, then send `{"action":"subscribe","event":"<slug>"}`) and receive every change as it lands. UFC only in v1. Requires Pro or higher (403 `tier_required` otherwise).
|
|
2702
|
-
*/
|
|
2703
|
-
get: {
|
|
2704
|
-
parameters: {
|
|
2705
|
-
query?: never;
|
|
2706
|
-
header?: never;
|
|
2707
|
-
path: {
|
|
2708
|
-
/** @description Numeric id or slug of the event. Stale slugs 308-redirect to the canonical URL. */
|
|
2709
|
-
idOrSlug: string;
|
|
2710
|
-
};
|
|
2711
|
-
cookie?: never;
|
|
2712
|
-
};
|
|
2713
|
-
requestBody?: never;
|
|
2714
|
-
responses: {
|
|
2715
|
-
/** @description LiveState or null. The one GET whose `Cache-Control` is `no-store` (a snapshot changes every few seconds on fight night). */
|
|
2716
|
-
200: {
|
|
2717
|
-
headers: {
|
|
2718
|
-
/** @description Weak validator over the body, e.g. `W/"GKrimLo826WBqG27jbNFsW2ZHmA"`. Send it back as `If-None-Match` to get a 304. */
|
|
2719
|
-
ETag?: string;
|
|
2720
|
-
/** @description Always `private, no-cache`. */
|
|
2721
|
-
"Cache-Control"?: string;
|
|
2722
|
-
/** @description Monthly request quota of the plan. */
|
|
2723
|
-
"X-RateLimit-Limit"?: number;
|
|
2724
|
-
/** @description Requests left this month. */
|
|
2725
|
-
"X-RateLimit-Remaining"?: number;
|
|
2726
|
-
/** @description Unix seconds of the monthly reset. */
|
|
2727
|
-
"X-RateLimit-Reset"?: number;
|
|
2728
|
-
/** @description Quote it to support; the same id is in every error body. */
|
|
2729
|
-
"x-request-id"?: string;
|
|
2730
|
-
[name: string]: unknown;
|
|
2731
|
-
};
|
|
2732
|
-
content: {
|
|
2733
|
-
/**
|
|
2734
|
-
* @example {
|
|
2735
|
-
* "data": null,
|
|
2736
|
-
* "meta": {
|
|
2737
|
-
* "live": false,
|
|
2738
|
-
* "websocket": "wss://live.ufcalendar.com/v1",
|
|
2739
|
-
* "subscribe": {
|
|
2740
|
-
* "action": "subscribe",
|
|
2741
|
-
* "event": "ufc-320"
|
|
2742
|
-
* }
|
|
2743
|
-
* }
|
|
2744
|
-
* }
|
|
2745
|
-
*/
|
|
2746
|
-
"application/json": components["schemas"]["EventLiveResponse"];
|
|
2747
|
-
};
|
|
2748
|
-
};
|
|
2749
|
-
/** @description Not Modified — `If-None-Match` matched the current weak `ETag`. Empty body. */
|
|
2750
|
-
304: {
|
|
2751
|
-
headers: {
|
|
2752
|
-
[name: string]: unknown;
|
|
2753
|
-
};
|
|
2754
|
-
content?: never;
|
|
2755
|
-
};
|
|
2756
|
-
/** @description The slug is a retired alias (the event or fighter was renamed). Follow `Location` to the canonical URL; the numeric-id form never redirects. */
|
|
2757
|
-
308: {
|
|
2758
|
-
headers: {
|
|
2759
|
-
/** @description Canonical `/v1/...` path. */
|
|
2760
|
-
Location?: string;
|
|
2761
|
-
[name: string]: unknown;
|
|
2762
|
-
};
|
|
2763
|
-
content?: never;
|
|
2764
|
-
};
|
|
2765
|
-
/** @description Missing/invalid API key (`unauthorized`). */
|
|
2766
|
-
401: {
|
|
2767
|
-
headers: {
|
|
2768
|
-
[name: string]: unknown;
|
|
2769
|
-
};
|
|
2770
|
-
content: {
|
|
2771
|
-
"application/json": components["schemas"]["Error"];
|
|
2772
|
-
};
|
|
2773
|
-
};
|
|
2774
|
-
/** @description Requires Pro or above (`tier_required`). */
|
|
2775
|
-
403: {
|
|
2776
|
-
headers: {
|
|
2777
|
-
[name: string]: unknown;
|
|
2778
|
-
};
|
|
2779
|
-
content: {
|
|
2780
|
-
"application/json": components["schemas"]["Error"];
|
|
2781
|
-
};
|
|
2782
|
-
};
|
|
2783
|
-
/** @description Not found (`not_found`; staged-org data 404s until the org is promoted). */
|
|
2784
|
-
404: {
|
|
2785
|
-
headers: {
|
|
2786
|
-
[name: string]: unknown;
|
|
2787
|
-
};
|
|
2788
|
-
content: {
|
|
2789
|
-
"application/json": components["schemas"]["Error"];
|
|
2790
|
-
};
|
|
2791
|
-
};
|
|
2792
|
-
/** @description Rate limited (`rate_limited`) or monthly quota reached (`quota_exceeded`). Honor `Retry-After`. */
|
|
2793
|
-
429: {
|
|
2794
|
-
headers: {
|
|
2795
|
-
[name: string]: unknown;
|
|
2796
|
-
};
|
|
2797
|
-
content: {
|
|
2798
|
-
"application/json": components["schemas"]["Error"];
|
|
2799
|
-
};
|
|
2800
|
-
};
|
|
2801
|
-
/** @description Something broke on our side (`internal_error`). It has been logged under the `request_id`. */
|
|
2802
|
-
500: {
|
|
2803
|
-
headers: {
|
|
2804
|
-
[name: string]: unknown;
|
|
2805
|
-
};
|
|
2806
|
-
content: {
|
|
2807
|
-
"application/json": components["schemas"]["Error"];
|
|
2808
|
-
};
|
|
2809
|
-
};
|
|
2810
|
-
};
|
|
2811
|
-
};
|
|
2812
|
-
put?: never;
|
|
2813
|
-
post?: never;
|
|
2814
|
-
delete?: never;
|
|
2815
|
-
options?: never;
|
|
2816
|
-
head?: never;
|
|
2817
|
-
patch?: never;
|
|
2818
|
-
trace?: never;
|
|
2819
|
-
};
|
|
2820
2547
|
"/v1/events/{idOrSlug}/changes": {
|
|
2821
2548
|
parameters: {
|
|
2822
2549
|
query?: never;
|
|
@@ -3884,7 +3611,7 @@ interface paths {
|
|
|
3884
3611
|
};
|
|
3885
3612
|
/**
|
|
3886
3613
|
* Search completed bouts (filtered)
|
|
3887
|
-
* @description Completed bouts with a winner across the launch promotions, filtered — the one-call answer to "the last title fight to end by knockout" or "every submission win for this fighter". **At least one narrowing filter is required** (`title_only`, `method`, `division`, `fighter`, `winner`, `from`, `to`, `main_events_only`; `org`, `order`, `limit` and `cursor` do not count) — a bare call 400s `filter_required`, because the whole table is
|
|
3614
|
+
* @description Completed bouts with a winner across the launch promotions, filtered — the one-call answer to "the last title fight to end by knockout" or "every submission win for this fighter". **At least one narrowing filter is required** (`title_only`, `method`, `division`, `fighter`, `winner`, `from`, `to`, `main_events_only`; `org`, `order`, `limit` and `cursor` do not count) — a bare call 400s `filter_required`, because the whole table is not sold as a list or a bulk export on any plan. Newest first by default (`order=oldest` reverses it); inside one card the main event comes first, then card order. Up to 25 rows per page and at most 10 pages deep (`page_depth_exceeded` past that — narrow the filters). Each row is the bout (same shape as `/v1/fights/{id}`) plus its `event` (`id`, `slug`, `title`, `org`, `starts_at`); `meta.filters` echoes the filters applied. `fighter`/`winner` take a slug or id (404 when not on the roster).
|
|
3888
3615
|
*/
|
|
3889
3616
|
get: {
|
|
3890
3617
|
parameters: {
|
|
@@ -10260,91 +9987,6 @@ interface paths {
|
|
|
10260
9987
|
patch?: never;
|
|
10261
9988
|
trace?: never;
|
|
10262
9989
|
};
|
|
10263
|
-
"/v1/bulk/{kind}": {
|
|
10264
|
-
parameters: {
|
|
10265
|
-
query?: never;
|
|
10266
|
-
header?: never;
|
|
10267
|
-
path?: never;
|
|
10268
|
-
cookie?: never;
|
|
10269
|
-
};
|
|
10270
|
-
/**
|
|
10271
|
-
* Bulk snapshot (Enterprise only)
|
|
10272
|
-
* @description Enterprise only — the full dataset is licensed, not self-serve; contact api@ufcalendar.com. Downloads the full launch-scope dataset as gzipped JSON: `events.json.gz`, `fights.json.gz`, `fighters.json.gz` or `odds-closing.json.gz` (the closing-line archive: one row per priced, settled bout since 2012 with `fight_id`, `event_id`, `event_slug`, `org`, `starts_at`, `fighter_a_id`, `fighter_b_id`, `winner_fighter_id`, `opening_a` / `opening_b` / `opening_at`, `closing_a` / `closing_b` / `closing_at` as American moneylines, and `sources`; UFCalendar consensus only, no book identities, information only). Responds 302 to a presigned URL; snapshots regenerate at most every 6 hours. One request per download (the redirect is free).
|
|
10273
|
-
*/
|
|
10274
|
-
get: {
|
|
10275
|
-
parameters: {
|
|
10276
|
-
query?: never;
|
|
10277
|
-
header?: never;
|
|
10278
|
-
path: {
|
|
10279
|
-
kind: "events.json.gz" | "fights.json.gz" | "fighters.json.gz" | "odds-closing.json.gz";
|
|
10280
|
-
};
|
|
10281
|
-
cookie?: never;
|
|
10282
|
-
};
|
|
10283
|
-
requestBody?: never;
|
|
10284
|
-
responses: {
|
|
10285
|
-
/** @description Redirect to a time-limited download URL */
|
|
10286
|
-
302: {
|
|
10287
|
-
headers: {
|
|
10288
|
-
Location?: string;
|
|
10289
|
-
[name: string]: unknown;
|
|
10290
|
-
};
|
|
10291
|
-
content?: never;
|
|
10292
|
-
};
|
|
10293
|
-
/** @description Missing/invalid API key (`unauthorized`). */
|
|
10294
|
-
401: {
|
|
10295
|
-
headers: {
|
|
10296
|
-
[name: string]: unknown;
|
|
10297
|
-
};
|
|
10298
|
-
content: {
|
|
10299
|
-
"application/json": components["schemas"]["Error"];
|
|
10300
|
-
};
|
|
10301
|
-
};
|
|
10302
|
-
/** @description Requires an Enterprise agreement (`tier_required`). */
|
|
10303
|
-
403: {
|
|
10304
|
-
headers: {
|
|
10305
|
-
[name: string]: unknown;
|
|
10306
|
-
};
|
|
10307
|
-
content: {
|
|
10308
|
-
"application/json": components["schemas"]["Error"];
|
|
10309
|
-
};
|
|
10310
|
-
};
|
|
10311
|
-
/** @description Not found (`not_found`; staged-org data 404s until the org is promoted). */
|
|
10312
|
-
404: {
|
|
10313
|
-
headers: {
|
|
10314
|
-
[name: string]: unknown;
|
|
10315
|
-
};
|
|
10316
|
-
content: {
|
|
10317
|
-
"application/json": components["schemas"]["Error"];
|
|
10318
|
-
};
|
|
10319
|
-
};
|
|
10320
|
-
/** @description Rate limited (`rate_limited`) or monthly quota reached (`quota_exceeded`). Honor `Retry-After`. */
|
|
10321
|
-
429: {
|
|
10322
|
-
headers: {
|
|
10323
|
-
[name: string]: unknown;
|
|
10324
|
-
};
|
|
10325
|
-
content: {
|
|
10326
|
-
"application/json": components["schemas"]["Error"];
|
|
10327
|
-
};
|
|
10328
|
-
};
|
|
10329
|
-
/** @description Something broke on our side (`internal_error`). It has been logged under the `request_id`. */
|
|
10330
|
-
500: {
|
|
10331
|
-
headers: {
|
|
10332
|
-
[name: string]: unknown;
|
|
10333
|
-
};
|
|
10334
|
-
content: {
|
|
10335
|
-
"application/json": components["schemas"]["Error"];
|
|
10336
|
-
};
|
|
10337
|
-
};
|
|
10338
|
-
};
|
|
10339
|
-
};
|
|
10340
|
-
put?: never;
|
|
10341
|
-
post?: never;
|
|
10342
|
-
delete?: never;
|
|
10343
|
-
options?: never;
|
|
10344
|
-
head?: never;
|
|
10345
|
-
patch?: never;
|
|
10346
|
-
trace?: never;
|
|
10347
|
-
};
|
|
10348
9990
|
"/v1/usage": {
|
|
10349
9991
|
parameters: {
|
|
10350
9992
|
query?: never;
|
|
@@ -10516,7 +10158,7 @@ interface components {
|
|
|
10516
10158
|
* @description Plan tier.
|
|
10517
10159
|
* @enum {string}
|
|
10518
10160
|
*/
|
|
10519
|
-
Tier: "trial" | "hobby" | "pro" | "business"
|
|
10161
|
+
Tier: "trial" | "hobby" | "pro" | "business";
|
|
10520
10162
|
/**
|
|
10521
10163
|
* @description Webhook event types.
|
|
10522
10164
|
* @enum {string}
|
|
@@ -10711,35 +10353,6 @@ interface components {
|
|
|
10711
10353
|
/** Format: date-time */
|
|
10712
10354
|
observed_at: string;
|
|
10713
10355
|
};
|
|
10714
|
-
/** @description The real-time document the stream worker publishes (the same one the WebSocket pushes). Open-ended by design — `current`, `card[]` and the timeline grow with the feed. Pinned by `mobile/shared/fixtures/live-stream-cases.json`. */
|
|
10715
|
-
LiveState: {
|
|
10716
|
-
/** @description Document version. */
|
|
10717
|
-
v: number;
|
|
10718
|
-
/** @description Publish sequence within one run (restarts count from 1 again — order by `ts`). */
|
|
10719
|
-
seq: number;
|
|
10720
|
-
/** @description Unix milliseconds of this publish. */
|
|
10721
|
-
ts: number;
|
|
10722
|
-
/** @description Content hash; a new document is published only when it changes. */
|
|
10723
|
-
hash: string;
|
|
10724
|
-
/** @description `{id, slug, fmid, name, org, status, source}`. */
|
|
10725
|
-
event: {
|
|
10726
|
-
[key: string]: unknown;
|
|
10727
|
-
};
|
|
10728
|
-
/** @description Bout order and statuses (`upcoming` / `live` / `final`), corners (`a`/`b` with `fighter_id`, `name`, `short`) and results. */
|
|
10729
|
-
card: {
|
|
10730
|
-
[key: string]: unknown;
|
|
10731
|
-
}[];
|
|
10732
|
-
/** @description The bout in the cage: `phase`, `round`, `possible_rounds`, `round_length_sec`, `round_started_at`, `clock_sec`, `official`, `stats` (`a`/`b` totals), `rounds[]`, `timeline[]`. */
|
|
10733
|
-
current?: {
|
|
10734
|
-
[key: string]: unknown;
|
|
10735
|
-
} | null;
|
|
10736
|
-
/** @description The last finished bout: `fight_id`, `winner` (`a`/`b`/null), `method`, `round`, `time`. */
|
|
10737
|
-
last?: {
|
|
10738
|
-
[key: string]: unknown;
|
|
10739
|
-
} | null;
|
|
10740
|
-
} & {
|
|
10741
|
-
[key: string]: unknown;
|
|
10742
|
-
};
|
|
10743
10356
|
/** @description The one fighter-reference shape every card, fight and search row carries. */
|
|
10744
10357
|
FighterRef: {
|
|
10745
10358
|
id: number;
|
|
@@ -12470,9 +12083,8 @@ interface components {
|
|
|
12470
12083
|
Plan: {
|
|
12471
12084
|
key: components["schemas"]["Tier"];
|
|
12472
12085
|
name: string;
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
price_yearly_usd: number | null;
|
|
12086
|
+
price_monthly_usd: number;
|
|
12087
|
+
price_yearly_usd: number;
|
|
12476
12088
|
requests_per_month: number;
|
|
12477
12089
|
rpm: number;
|
|
12478
12090
|
key_limit: number;
|
|
@@ -12489,9 +12101,6 @@ interface components {
|
|
|
12489
12101
|
per_account: number;
|
|
12490
12102
|
start_url: string;
|
|
12491
12103
|
};
|
|
12492
|
-
enterprise: {
|
|
12493
|
-
contact: string;
|
|
12494
|
-
};
|
|
12495
12104
|
mcp: {
|
|
12496
12105
|
url: string;
|
|
12497
12106
|
transport: string;
|
|
@@ -12657,24 +12266,6 @@ interface components {
|
|
|
12657
12266
|
ignored_params?: string[];
|
|
12658
12267
|
};
|
|
12659
12268
|
};
|
|
12660
|
-
/** @description `data` is null with `meta.live: false` when nothing is being streamed. */
|
|
12661
|
-
EventLiveResponse: {
|
|
12662
|
-
data: components["schemas"]["LiveState"] | null;
|
|
12663
|
-
meta: {
|
|
12664
|
-
/** @description true only while the event is in progress on the stream. */
|
|
12665
|
-
live: boolean;
|
|
12666
|
-
/** @description `wss://live.ufcalendar.com/v1` — add `?key=<key>`. */
|
|
12667
|
-
websocket: string;
|
|
12668
|
-
subscribe: {
|
|
12669
|
-
/** @constant */
|
|
12670
|
-
action: "subscribe";
|
|
12671
|
-
/** @description The slug to send. */
|
|
12672
|
-
event: string;
|
|
12673
|
-
};
|
|
12674
|
-
/** @description Present only when the request carried query parameters this endpoint does not take — they were ignored. Same list as the `X-UFCalendar-Ignored-Params` header. Sorted, unique. */
|
|
12675
|
-
ignored_params?: string[];
|
|
12676
|
-
};
|
|
12677
|
-
};
|
|
12678
12269
|
FightResponse: {
|
|
12679
12270
|
data: components["schemas"]["FightDetail"];
|
|
12680
12271
|
meta: components["schemas"]["EmptyMeta"];
|
|
@@ -13080,4 +12671,4 @@ interface components {
|
|
|
13080
12671
|
}
|
|
13081
12672
|
type operations = Record<string, never>;
|
|
13082
12673
|
|
|
13083
|
-
export { type Article, type ArticleLocale, type ArticleSummary, type BonusAward, type BonusLedger, type Broadcast, type BroadcastRight, type CareerBout, type CareerStats, type Champion, type ChangeFeedEntry, type ChangeKind, type Compare, type CompareAggregates, type CompareBout, type CredentialConfidence, DEFAULT_BASE_URL, type DissentingJudge, type Envelope, type EventChange, type EventDetail, type EventHeadline, type EventInclude, type EventListInclude, type EventOdds, type EventOddsRow, type EventPickem, type EventRef, type EventStatus, type EventStorylines, type EventSummary, type EventWatch, type Fight, FightAPI, FightAPIError, type FightAPIOptions, type FightInclude, type FightOdds, type FightResult, type FightSearchMethod, type FightSearchRow, type Fighter, type FighterAffiliation, type FighterBout, type FighterCredential, type FighterCredentials, type FighterImage, type FighterInclude, type FighterRef, type FighterSummary, type HeadlineCorner, type Judge, type JudgeColleague, type JudgeLeague, type JudgeScorecardRow,
|
|
12674
|
+
export { type Article, type ArticleLocale, type ArticleSummary, type BonusAward, type BonusLedger, type Broadcast, type BroadcastRight, type CareerBout, type CareerStats, type Champion, type ChangeFeedEntry, type ChangeKind, type Compare, type CompareAggregates, type CompareBout, type CredentialConfidence, DEFAULT_BASE_URL, type DissentingJudge, type Envelope, type EventChange, type EventDetail, type EventHeadline, type EventInclude, type EventListInclude, type EventOdds, type EventOddsRow, type EventPickem, type EventRef, type EventStatus, type EventStorylines, type EventSummary, type EventWatch, type Fight, FightAPI, FightAPIError, type FightAPIOptions, type FightInclude, type FightOdds, type FightResult, type FightSearchMethod, type FightSearchRow, type Fighter, type FighterAffiliation, type FighterBout, type FighterCredential, type FighterCredentials, type FighterImage, type FighterInclude, type FighterRef, type FighterSummary, type HeadlineCorner, type Judge, type JudgeColleague, type JudgeLeague, type JudgeScorecardRow, type LeaderboardRow, type MatchmakerCorner, type MatchmakerTag, type Matchup, type Meta, type MethodNormalized, type OddsBlock, type OddsHistoryPoint, type OddsLine, type OddsMovement, type OddsPair, type Org, type OrgDivision, type PickemSplit, type Plan, type Plans, type PowerIndex, type PowerIndexFighter, type PowerIndexMover, type PowerIndexRow, type PowerIndexView, type ProbabilitySource, type PublicSource, type Query, type QueryValue, type RankingDivision, type RankingEntry, type RankingsBoard, type RateLimit, type RecordBookSection, type RecordEntry, type RightsSeries, type Scorecard, type ScorecardRound, type Scorecards, type SplitDecisionRow, type StatMetric, type StatScope, type StatsPanel, type StorylineCorner, type StorylineTag, type Usage, VERSION, type Venue, type WatchProvider, type WebhookEndpoint, type WhosNext, type YearStats, type operations, type paths };
|