@databallr/sdk 0.3.3 → 0.3.5
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 +1 -0
- package/dist/generated/methods.d.ts +1 -1
- package/dist/generated/methods.js +1 -1
- package/dist/generated/schema.d.ts +48 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** First 12 hex characters of the SHA-256 of the key-callable spec these files came from. */
|
|
2
|
-
export declare const SPEC_HASH = "
|
|
2
|
+
export declare const SPEC_HASH = "4e8f67009423";
|
|
3
3
|
/**
|
|
4
4
|
* Every generated method: GET operations by path, POST queries as
|
|
5
5
|
* `POST <path>`. `Databallr` turns this table into `dbr.nba.players.search(...)`.
|
|
@@ -3088,15 +3088,30 @@ export interface components {
|
|
|
3088
3088
|
/** @description YYYY-MM-DD */
|
|
3089
3089
|
end_date?: string;
|
|
3090
3090
|
exclude_garbage_time?: boolean;
|
|
3091
|
+
/** @description Only games in which every one of these players was on the floor, for either team. A game-level choice: the game counts whole or not at all. Listed in the manifest's options as `games_with`. */
|
|
3092
|
+
games_with?: number[];
|
|
3093
|
+
/** @description Only games in which none of these players was on the floor: the games a player missed. Unlike `players_off`, which keeps his games and drops his minutes. Listed in the manifest's options as `games_without`. */
|
|
3094
|
+
games_without?: number[];
|
|
3091
3095
|
/** @description Also return the detail counters (possession start origin, turnover and foul types, rebounds by shot type, assists by type and zone, per-player possession phase). Off by default: on the lineup-stints fast path they need a second file read. */
|
|
3092
3096
|
include_detail?: boolean;
|
|
3097
|
+
/** @description Also return `game_log` (one line per counted game: what the filters kept of it and its final score) and `record` (wins and losses in the games the filters touched). Listed in the manifest's options as `include_games`. */
|
|
3098
|
+
include_games?: boolean;
|
|
3099
|
+
/** @description Only possessions at these leverage levels: how much the possession's result can move the offense's win probability (cuts at 0.02, 0.055 and 0.10; about 25%, 70%, 4% and 1% of possessions). NBA only. Answered from the plays (the engine path). Listed in the manifest's options as `leverage`. */
|
|
3100
|
+
leverage?: ("low" | "medium" | "high" | "very_high")[];
|
|
3093
3101
|
/**
|
|
3094
3102
|
* @description Only the team's home or away games, from its game logs. A neutral site (the 2020 bubble, Cup finals, international games) counts for the NBA's designated home team. A game the logs do not list is left out and counted in quality.location_unknown_games. Listed in the manifest's options as `location`.
|
|
3095
3103
|
* @enum {string}
|
|
3096
3104
|
*/
|
|
3097
3105
|
location?: "home" | "away";
|
|
3106
|
+
/** @description Only possessions the team started leading by min to max points (negative: trailing); either end may be left out. {min: -5, max: 5} is within five either way. Decided per possession from the score before its first play. Answered from the plays (the engine path), not the lineup-stints fast path. Listed in the manifest's options as `margin`. */
|
|
3107
|
+
margin?: {
|
|
3108
|
+
max?: number;
|
|
3109
|
+
min?: number;
|
|
3110
|
+
};
|
|
3098
3111
|
/** @description Only games in these calendar months (1-12), in any of the seasons: [12] is every December. Listed in the manifest's options as `months`. */
|
|
3099
3112
|
months?: number[];
|
|
3113
|
+
/** @description aWOWY's opponent adjustment (Ayomide Awoyemi, LUMA Basketball Research): the on/off states and lineups also count `oppadj_pts` on each side, the five opponents' ratings' share of that side's points (their defense on the team's possessions, their offense on theirs), with ratings fitted only on the three seasons before the game's (databallr's RAPM). Points minus oppadj_pts = points against an average opponent. Team totals are not adjusted. The answer's `opp_adjust` says whether it was applied. Listed in the manifest's options as `opp_adjust`. */
|
|
3114
|
+
opp_adjust?: boolean;
|
|
3100
3115
|
opp_filter?: {
|
|
3101
3116
|
/** @description Only games against these teams. */
|
|
3102
3117
|
opp_teams?: string[];
|
|
@@ -3121,7 +3136,7 @@ export interface components {
|
|
|
3121
3136
|
* @enum {string}
|
|
3122
3137
|
*/
|
|
3123
3138
|
season_type?: "regular" | "playoffs";
|
|
3124
|
-
/** @description 1-
|
|
3139
|
+
/** @description 1-10 seasons when the lineup-stints fast path answers; 1-5 with `margin`, `leverage` or a `time_range` that starts or ends inside a period (those read every game's plays), and 1-5 with `include_detail`. Defaults to ["2025-26"]. */
|
|
3125
3140
|
seasons?: (string | number)[] | (string | number);
|
|
3126
3141
|
/** @description YYYY-MM-DD */
|
|
3127
3142
|
start_date?: string;
|
|
@@ -3146,6 +3161,13 @@ export interface components {
|
|
|
3146
3161
|
};
|
|
3147
3162
|
};
|
|
3148
3163
|
NbaPbpAnalyticsResponse: {
|
|
3164
|
+
/** @description With `include_games`: one line per counted game, oldest first, as columns (game_id, date, opponent, seconds, off_poss, def_poss, points, opp_points, team_score, opp_score, won). seconds, possessions and points are what the filters kept; the scores are the game's final. */
|
|
3165
|
+
game_log?: {
|
|
3166
|
+
columns: {
|
|
3167
|
+
[key: string]: (number | string | boolean | (null))[];
|
|
3168
|
+
};
|
|
3169
|
+
rows: number;
|
|
3170
|
+
};
|
|
3149
3171
|
games: number;
|
|
3150
3172
|
lineups?: {
|
|
3151
3173
|
ids: number[];
|
|
@@ -3154,6 +3176,14 @@ export interface components {
|
|
|
3154
3176
|
[key: string]: number;
|
|
3155
3177
|
};
|
|
3156
3178
|
}[];
|
|
3179
|
+
/** @description With `opp_adjust`: whether the opponent adjustment was counted (every season has opponent ratings) and how, or the seasons without ratings (then nothing is adjusted). */
|
|
3180
|
+
opp_adjust?: {
|
|
3181
|
+
applied: boolean;
|
|
3182
|
+
credit?: string;
|
|
3183
|
+
levels?: string;
|
|
3184
|
+
method?: string;
|
|
3185
|
+
missing_seasons?: number[];
|
|
3186
|
+
};
|
|
3157
3187
|
players?: ({
|
|
3158
3188
|
id: number;
|
|
3159
3189
|
minutes: number;
|
|
@@ -3168,6 +3198,12 @@ export interface components {
|
|
|
3168
3198
|
location_unknown_games?: number;
|
|
3169
3199
|
unknown_team_events: number;
|
|
3170
3200
|
};
|
|
3201
|
+
/** @description With `include_games`: the team's record in the counted games that have any filtered time. */
|
|
3202
|
+
record?: {
|
|
3203
|
+
games: number;
|
|
3204
|
+
losses: number;
|
|
3205
|
+
wins: number;
|
|
3206
|
+
};
|
|
3171
3207
|
results?: {
|
|
3172
3208
|
off_ids: number[];
|
|
3173
3209
|
on_ids: number[];
|
|
@@ -3226,13 +3262,24 @@ export interface components {
|
|
|
3226
3262
|
/** @description YYYY-MM-DD */
|
|
3227
3263
|
end_date?: string;
|
|
3228
3264
|
exclude_garbage_time?: boolean;
|
|
3265
|
+
/** @description Only games in which every one of these players was on the floor, for either team. A game-level choice: the game counts whole or not at all. Listed in the manifest's options as `games_with`. */
|
|
3266
|
+
games_with?: number[];
|
|
3267
|
+
/** @description Only games in which none of these players was on the floor: the games a player missed. Unlike `players_off`, which keeps his games and drops his minutes. Listed in the manifest's options as `games_without`. */
|
|
3268
|
+
games_without?: number[];
|
|
3229
3269
|
/** @description Also return the detail counters (possession start origin, turnover and foul types, rebounds by shot type, assists by type and zone, per-player possession phase). Off by default: on the lineup-stints fast path they need a second file read. */
|
|
3230
3270
|
include_detail?: boolean;
|
|
3271
|
+
/** @description Only possessions at these leverage levels: how much the possession's result can move the offense's win probability (cuts at 0.02, 0.055 and 0.10; about 25%, 70%, 4% and 1% of possessions). NBA only. Answered from the plays (the engine path). Listed in the manifest's options as `leverage`. */
|
|
3272
|
+
leverage?: ("low" | "medium" | "high" | "very_high")[];
|
|
3231
3273
|
/**
|
|
3232
3274
|
* @description Only the team's home or away games, from its game logs. A neutral site (the 2020 bubble, Cup finals, international games) counts for the NBA's designated home team. A game the logs do not list is left out and counted in quality.location_unknown_games. Listed in the manifest's options as `location`.
|
|
3233
3275
|
* @enum {string}
|
|
3234
3276
|
*/
|
|
3235
3277
|
location?: "home" | "away";
|
|
3278
|
+
/** @description Only possessions the team started leading by min to max points (negative: trailing); either end may be left out. {min: -5, max: 5} is within five either way. Decided per possession from the score before its first play. Answered from the plays (the engine path), not the lineup-stints fast path. Listed in the manifest's options as `margin`. */
|
|
3279
|
+
margin?: {
|
|
3280
|
+
max?: number;
|
|
3281
|
+
min?: number;
|
|
3282
|
+
};
|
|
3236
3283
|
/** @description Only games in these calendar months (1-12), in any of the seasons: [12] is every December. Listed in the manifest's options as `months`. */
|
|
3237
3284
|
months?: number[];
|
|
3238
3285
|
/** @description The focus player. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databallr/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "TypeScript client for the databallr API (NBA and WNBA stats, SixRings)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"openapi-typescript": "7.13.0",
|
|
26
26
|
"publint": "0.3.25",
|
|
27
27
|
"typescript": "5.9.3",
|
|
28
|
-
"vite": "8.2.
|
|
29
|
-
"vitest": "4.1.
|
|
28
|
+
"vite": "8.2.6",
|
|
29
|
+
"vitest": "4.1.12",
|
|
30
30
|
"@databallr/api-schemas": "0.1.0"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|