@srating-io/types 2.1.1 → 2.2.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Basketball from '../basketball.ts';
|
|
2
2
|
import * as Football from '../football.ts';
|
|
3
3
|
import { BracketTeams, PlayerTeamSeasons, Players, Games, Teams } from '../general.ts';
|
|
4
|
-
import { FantasyEntry, FantasyEntrys, FantasyGroup, FantasyGroupUsers, FantasyBracketSlots, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking } from '../fantasy.ts';
|
|
4
|
+
import { FantasyEntry, FantasyEntrys, FantasyGroup, FantasyGroupUser, FantasyGroupUsers, FantasyBracketSlots, FantasyDraftOrders, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking, FantasyRankings } from '../fantasy.ts';
|
|
5
5
|
export type createEntryArguments = {
|
|
6
6
|
fantasy_group_id: string;
|
|
7
7
|
name: string;
|
|
@@ -36,4 +36,24 @@ export type loadResults = {
|
|
|
36
36
|
[fantasy_entry_player_statistic_ranking_id: string]: FantasyEntryPlayerStatisticRanking & (Basketball.PlayerStatisticRanking | Football.PlayerStatisticRanking);
|
|
37
37
|
};
|
|
38
38
|
teams: Teams;
|
|
39
|
+
/** Per game scoring for the rostered players, over the games this entry counts. */
|
|
40
|
+
player_boxscores: Basketball.PlayerBoxscores | Football.PlayerBoxscores;
|
|
41
|
+
/** The whole group at `current`, so an entry can show its rank and who is either side of it. */
|
|
42
|
+
fantasy_rankings: FantasyRankings;
|
|
43
|
+
/** This entry only, without the `current` filter, for rank and points over time. */
|
|
44
|
+
fantasy_ranking_history: FantasyRankings;
|
|
45
|
+
/** Id and name only - enough to label a standings row, and nothing the page does not need. */
|
|
46
|
+
fantasy_entrys: FantasyEntrys;
|
|
47
|
+
/** This entry only, for the pick column and the draft recap. */
|
|
48
|
+
fantasy_draft_orders: FantasyDraftOrders;
|
|
49
|
+
/** The entry owner, name only. */
|
|
50
|
+
fantasy_group_user: FantasyGroupUser | {};
|
|
51
|
+
/**
|
|
52
|
+
* Every drafted player in the group as `fantasy_entry_player_id` to its score, so a pick can be
|
|
53
|
+
* ranked against the pool it came from. A projection rather than the joined stat rows, which are
|
|
54
|
+
* what makes the group-wide payload heavy.
|
|
55
|
+
*/
|
|
56
|
+
league_player_ratings: {
|
|
57
|
+
[fantasy_entry_player_id: string]: number;
|
|
58
|
+
};
|
|
39
59
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PlayerTeamSeasons, Players } from '../general.ts';
|
|
2
|
+
import { FantasyEntryPrePicks } from '../fantasy.ts';
|
|
3
|
+
/**
|
|
4
|
+
* The whole list is replaced on every call, in the order given, so a reorder cannot collide
|
|
5
|
+
* with itself.
|
|
6
|
+
*/
|
|
7
|
+
export type setPrePicksArguments = {
|
|
8
|
+
fantasy_entry_id: string;
|
|
9
|
+
player_team_season_ids: string[];
|
|
10
|
+
};
|
|
11
|
+
export type setPrePicksResults = {
|
|
12
|
+
error: string;
|
|
13
|
+
} | {
|
|
14
|
+
fantasy_entry_pre_picks: FantasyEntryPrePicks;
|
|
15
|
+
player_team_seasons: PlayerTeamSeasons;
|
|
16
|
+
players: Players;
|
|
17
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Basketball from '../basketball.ts';
|
|
2
2
|
import * as Football from '../football.ts';
|
|
3
3
|
import { PlayerTeamSeasons, Players } from '../general.ts';
|
|
4
|
-
import { FantasyGroup, FantasyGroups, FantasyGroupUsers, FantasyGroupInvites, FantasyGroupComments, FantasyEntrys, FantasyRankings, FantasyDraftOrders, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking } from '../fantasy.ts';
|
|
4
|
+
import { FantasyGroup, FantasyGroups, FantasyGroupUsers, FantasyGroupInvites, FantasyGroupComments, FantasyEntrys, FantasyRankings, FantasyDraftOrders, FantasyEntryPlayers, FantasyEntryPrePicks, FantasyEntryPlayerStatisticRanking } from '../fantasy.ts';
|
|
5
5
|
export type createGroupArguments = Partial<Omit<FantasyGroup, 'fantasy_group_id' | 'owner_user_id' | 'guid' | 'deleted' | 'date_of_entry'>>;
|
|
6
6
|
export type createGroupResults = {
|
|
7
7
|
error: string;
|
|
@@ -78,6 +78,7 @@ export type loadResults = {
|
|
|
78
78
|
fantasy_group_comments: FantasyGroupComments;
|
|
79
79
|
fantasy_draft_orders: FantasyDraftOrders;
|
|
80
80
|
fantasy_entry_players: FantasyEntryPlayers;
|
|
81
|
+
fantasy_entry_pre_picks: FantasyEntryPrePicks;
|
|
81
82
|
player_team_seasons: PlayerTeamSeasons;
|
|
82
83
|
players: Players;
|
|
83
84
|
fantasy_entry_player_statistic_rankings: {
|
|
@@ -92,6 +93,7 @@ export type loadHomeArguments = {
|
|
|
92
93
|
export type loadHomeResults = {
|
|
93
94
|
error: string;
|
|
94
95
|
} | {
|
|
96
|
+
seasons: number[];
|
|
95
97
|
fantasy_groups: FantasyGroups;
|
|
96
98
|
fantasy_group_users: FantasyGroupUsers;
|
|
97
99
|
fantasy_entrys: FantasyEntrys;
|
package/dist/fantasy.d.ts
CHANGED
|
@@ -152,6 +152,23 @@ export interface FantasyEntryPlayer {
|
|
|
152
152
|
export type FantasyEntryPlayers = {
|
|
153
153
|
[fantasy_entry_player_id: string]: FantasyEntryPlayer;
|
|
154
154
|
};
|
|
155
|
+
/**
|
|
156
|
+
* A player an entry wants drafted for it, in preference order, if the pick clock runs out.
|
|
157
|
+
* Only ever returned to the entry's own owner -- the whole point is that rivals cannot see it.
|
|
158
|
+
*/
|
|
159
|
+
export interface FantasyEntryPrePick {
|
|
160
|
+
fantasy_entry_pre_pick_id: string;
|
|
161
|
+
fantasy_group_id: string;
|
|
162
|
+
fantasy_entry_id: string;
|
|
163
|
+
player_team_season_id: string;
|
|
164
|
+
ordinal: number;
|
|
165
|
+
date_of_entry: string;
|
|
166
|
+
guid: string;
|
|
167
|
+
deleted: number;
|
|
168
|
+
}
|
|
169
|
+
export type FantasyEntryPrePicks = {
|
|
170
|
+
[fantasy_entry_pre_pick_id: string]: FantasyEntryPrePick;
|
|
171
|
+
};
|
|
155
172
|
export interface FantasyBracketSlot {
|
|
156
173
|
fantasy_bracket_slot_id: string;
|
|
157
174
|
first_parent_fantasy_bracket_slot_id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * as FantasyBracketSlot from './api/fantasy_bracket_slot.ts';
|
|
|
11
11
|
export * as FantasyDraftOrder from './api/fantasy_draft_order.ts';
|
|
12
12
|
export * as FantasyEntry from './api/fantasy_entry.ts';
|
|
13
13
|
export * as FantasyEntryPlayerStatisticRanking from './api/fantasy_entry_player_statistic_ranking.ts';
|
|
14
|
+
export * as FantasyEntryPrePick from './api/fantasy_entry_pre_pick.ts';
|
|
14
15
|
export * as FantasyGroup from './api/fantasy_group.ts';
|
|
15
16
|
export * as FantasyGroupComment from './api/fantasy_group_comment.ts';
|
|
16
17
|
export * as FantasyGroupInvite from './api/fantasy_group_invite.ts';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@srating-io/types",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"description": "srating.io shared TypeScript types for GUI and API",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"keywords": [],
|
|
35
35
|
"author": "Evan Smalley",
|
|
36
|
+
"license": "Apache-2.0",
|
|
36
37
|
"bugs": {
|
|
37
38
|
"url": "https://github.com/srating-io/types/issues"
|
|
38
39
|
},
|