@srating-io/types 1.1.6 → 2.0.1

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.
Files changed (39) hide show
  1. package/dist/api/api_key.d.ts +5 -0
  2. package/dist/api/audit_gui.d.ts +48 -0
  3. package/dist/api/billing.d.ts +55 -0
  4. package/dist/api/boxscore.d.ts +15 -0
  5. package/dist/api/coach_statistic_ranking.d.ts +7 -0
  6. package/dist/api/conference.d.ts +12 -0
  7. package/dist/api/conference_player_statistic_ranking.d.ts +9 -0
  8. package/dist/api/conference_statistic_ranking.d.ts +9 -0
  9. package/dist/api/dashboard.d.ts +136 -0
  10. package/dist/api/fantasy_bracket_slot.d.ts +10 -0
  11. package/dist/api/fantasy_draft_order.d.ts +15 -0
  12. package/dist/api/fantasy_entry.d.ts +37 -0
  13. package/dist/api/fantasy_entry_player_statistic_ranking.d.ts +9 -0
  14. package/dist/api/fantasy_group.d.ts +77 -0
  15. package/dist/api/fantasy_group_comment.d.ts +10 -0
  16. package/dist/api/fantasy_group_invite.d.ts +10 -0
  17. package/dist/api/favorite.d.ts +33 -0
  18. package/dist/api/league_player_statistic_ranking.d.ts +9 -0
  19. package/dist/api/league_statistic_ranking.d.ts +9 -0
  20. package/dist/api/notification.d.ts +7 -0
  21. package/dist/api/play_by_play.d.ts +17 -0
  22. package/dist/api/player.d.ts +18 -0
  23. package/dist/api/player_boxscore.d.ts +15 -0
  24. package/dist/api/player_statistic_ranking.d.ts +9 -0
  25. package/dist/api/prediction.d.ts +17 -0
  26. package/dist/api/ranking.d.ts +22 -0
  27. package/dist/api/search.d.ts +36 -0
  28. package/dist/api/secret.d.ts +3 -0
  29. package/dist/api/session.d.ts +5 -0
  30. package/dist/api/statistic_ranking.d.ts +9 -0
  31. package/dist/api/user.d.ts +44 -0
  32. package/dist/api/user_payment_token.d.ts +51 -0
  33. package/dist/audit.d.ts +88 -0
  34. package/dist/auth.d.ts +83 -0
  35. package/dist/fantasy.d.ts +200 -0
  36. package/dist/general.d.ts +6 -308
  37. package/dist/index.d.ts +36 -0
  38. package/dist/payments.d.ts +58 -0
  39. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import { ApiKey } from '../auth.ts';
2
+ export type regenerateArguments = {
3
+ key: string;
4
+ };
5
+ export type regenerateResults = ApiKey | {};
@@ -0,0 +1,48 @@
1
+ import { AuditGui } from '../audit.ts';
2
+ export type listOrderBy = 'last_seen' | 'occurrences' | 'date_of_entry';
3
+ export type listArguments = {
4
+ /** 0 or 1. Left out means both, which is what the "all" filter sends. */
5
+ resolved?: number;
6
+ release?: string;
7
+ source?: string;
8
+ route?: string;
9
+ /** Matched against `name` and `message`. */
10
+ search?: string;
11
+ order_by?: listOrderBy;
12
+ order?: 'asc' | 'desc';
13
+ limit?: number;
14
+ offset?: number;
15
+ };
16
+ /**
17
+ * `rows` is an array rather than the id-keyed map the generic `read` returns. `audit_gui_id` is an
18
+ * integer, and an object with integer-like keys is iterated in numeric order by every javascript
19
+ * engine -- which would silently throw away the sort the caller asked for.
20
+ *
21
+ * `release` and `source` are the distinct values present in the table, for populating the filters.
22
+ */
23
+ export type listResults = {
24
+ error: string;
25
+ } | {
26
+ rows: AuditGui[];
27
+ total: number;
28
+ release: string[];
29
+ source: string[];
30
+ };
31
+ export type detailArguments = {
32
+ audit_gui_id: number | string;
33
+ };
34
+ export type detailResults = {
35
+ error: string;
36
+ } | {
37
+ row: AuditGui | null;
38
+ };
39
+ export type resolveArguments = {
40
+ audit_gui_id: number | string;
41
+ resolved: number | string;
42
+ };
43
+ export type resolveResults = {
44
+ error: string;
45
+ } | {
46
+ audit_gui_id: number;
47
+ resolved: number;
48
+ };
@@ -0,0 +1,55 @@
1
+ import { ApiKeys } from '../auth.ts';
2
+ import { Subscription, Subscriptions, Pricings, UserPaymentTokens, PaymentRouter } from '../payments.ts';
3
+ import { FantasyGroupUsers, FantasyGroups } from '../fantasy.ts';
4
+ import { loadUserResults } from './user.ts';
5
+ export type loadAccountResults = {} | {
6
+ subscription: Subscriptions;
7
+ pricing: Pricings;
8
+ api_key: ApiKeys;
9
+ user: loadUserResults;
10
+ fantasy_group_user: FantasyGroupUsers;
11
+ fantasy_group: FantasyGroups;
12
+ user_payment_token: UserPaymentTokens;
13
+ };
14
+ export type createFantasyGroupEntryArguments = {
15
+ fantasy_group_id: string;
16
+ name: string;
17
+ };
18
+ export type createFantasyGroupEntryResults = {
19
+ error: string;
20
+ } | {
21
+ error: {
22
+ message: string;
23
+ };
24
+ } | {
25
+ paymentIntent: unknown;
26
+ payment_router: PaymentRouter | null;
27
+ email: string;
28
+ };
29
+ export type createSubscriptionArguments = {
30
+ priceId: string;
31
+ email: string;
32
+ };
33
+ export type createSubscriptionResults = {
34
+ error: {
35
+ message: string;
36
+ };
37
+ } | {
38
+ type: 'setup' | 'payment';
39
+ clientSecret: string | null | undefined;
40
+ session_id: string;
41
+ };
42
+ export type cancelSubscriptionArguments = {
43
+ subscription_id: string;
44
+ };
45
+ export type cancelSubscriptionResults = {} | Subscription;
46
+ export type createTrialArguments = {
47
+ email: string;
48
+ };
49
+ export type createTrialResults = {
50
+ error: {
51
+ message: string;
52
+ };
53
+ } | {
54
+ session_id: string | null;
55
+ };
@@ -0,0 +1,15 @@
1
+ import { Boxscore } from '../general.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getBoxscoreArguments = {
5
+ organization_id: string;
6
+ } & Partial<Boxscore>;
7
+ export type getBoxscoreResults = Basketball.Boxscore | Football.Boxscore | {
8
+ error: string;
9
+ };
10
+ export type readBoxscoreArguments = {
11
+ organization_id: string;
12
+ } & Partial<Boxscore>;
13
+ export type readBoxscoreResults = Basketball.Boxscores | Football.Boxscores | {
14
+ error: string;
15
+ };
@@ -0,0 +1,7 @@
1
+ import { CoachStatisticRanking } from '../general.ts';
2
+ export type getStatsArguments = {
3
+ organization_id: string;
4
+ } & Partial<CoachStatisticRanking>;
5
+ export type getStatsResults = CoachStatisticRanking | {
6
+ error: string;
7
+ };
@@ -0,0 +1,12 @@
1
+ import * as Basketball from '../basketball.ts';
2
+ import * as Football from '../football.ts';
3
+ export type getConferencePredictionArguments = {
4
+ organization_id: string;
5
+ conference_id: string;
6
+ season: string | number;
7
+ };
8
+ export type getConferencePredictionResults = {
9
+ error: string;
10
+ } | ((Basketball.StatisticRankings | Football.StatisticRankings) & Record<string, {
11
+ hasAccess: boolean;
12
+ }>);
@@ -0,0 +1,9 @@
1
+ import { ConferencePlayerStatisticRanking } from '../general.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getStatsArguments = {
5
+ organization_id: string;
6
+ } & Partial<ConferencePlayerStatisticRanking>;
7
+ export type getStatsResults = Basketball.ConferencePlayerStatisticRanking | Football.ConferencePlayerStatisticRanking | {
8
+ error: string;
9
+ };
@@ -0,0 +1,9 @@
1
+ import { ConferenceStatisticRanking } from '../general.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getStatsArguments = {
5
+ organization_id: string;
6
+ } & Partial<ConferenceStatisticRanking>;
7
+ export type getStatsResults = Basketball.ConferenceStatisticRanking | Football.ConferenceStatisticRanking | {
8
+ error: string;
9
+ };
@@ -0,0 +1,136 @@
1
+ import { AuditApi, AuditError } from '../audit.ts';
2
+ import { Pricings } from '../payments.ts';
3
+ /**
4
+ * Every endpoint on this class is admin only and answers `{ error }` to everyone else, so each
5
+ * result is a union with the refusal rather than an optional-everything object.
6
+ */
7
+ export type overviewResults = {
8
+ error: string;
9
+ } | {
10
+ audit_gui: {
11
+ unresolved: number;
12
+ /** Summed `occurrences` over the unresolved rows -- how much the open bugs are actually firing. */
13
+ occurrences: number;
14
+ last_24h: number;
15
+ };
16
+ audit_error: {
17
+ last_24h: number;
18
+ last_7d: number;
19
+ };
20
+ audit_api: {
21
+ last_24h: number;
22
+ };
23
+ subscription: {
24
+ active: number;
25
+ type_x_active: {
26
+ [type: string]: number;
27
+ };
28
+ };
29
+ user: {
30
+ total: number;
31
+ last_7d: number;
32
+ };
33
+ payment_router: {
34
+ unhandled: number;
35
+ };
36
+ api_key: {
37
+ total: number;
38
+ /** Keys at or past 80% of their `usage_limit`. */
39
+ near_limit: number;
40
+ };
41
+ };
42
+ /**
43
+ * A subscription with the few joined columns the dashboard shows beside it. Not the whole `user`
44
+ * row -- `username` is the only part worth seeing in a list, and the rest of that table has no
45
+ * business being shipped here.
46
+ */
47
+ export interface RevenueSubscription {
48
+ subscription_id: string;
49
+ user_id: string | null;
50
+ username: string | null;
51
+ pricing_id: string | null;
52
+ pricing_name: string | null;
53
+ pricing_type: string | null;
54
+ stripe_subscription: string | null;
55
+ date_of_entry: string;
56
+ renewed: string | null;
57
+ expires: string | null;
58
+ }
59
+ export type revenueResults = {
60
+ error: string;
61
+ } | {
62
+ pricing: Pricings;
63
+ type_x_active: {
64
+ [type: string]: number;
65
+ };
66
+ pricing_id_x_active: {
67
+ [pricing_id: string]: number;
68
+ };
69
+ /** Active subscriptions whose `expires` falls inside the next 30 days. */
70
+ renewals: RevenueSubscription[];
71
+ /** Active subscriptions on a `trial` plan. */
72
+ trials: RevenueSubscription[];
73
+ /** Subscriptions created per day over the trailing window, as `Y-m-d` keys. */
74
+ date_x_created: {
75
+ [date: string]: number;
76
+ };
77
+ unhandled_payment_routers: number;
78
+ };
79
+ export interface ApiErrorCount {
80
+ class: string | null;
81
+ function: string | null;
82
+ total: number;
83
+ }
84
+ export type apiTrafficArguments = {
85
+ /**
86
+ * How far back to look. Bounded server side, because `audit_api` is the largest table in the
87
+ * database and `date_of_entry` is the only index on it.
88
+ */
89
+ days?: number;
90
+ };
91
+ export type apiTrafficResults = {
92
+ error: string;
93
+ } | {
94
+ days: number;
95
+ date_x_requests: {
96
+ [date: string]: number;
97
+ };
98
+ api_key_id_x_requests: {
99
+ [api_key_id: string]: number;
100
+ };
101
+ class_x_requests: {
102
+ [class_name: string]: number;
103
+ };
104
+ recent_requests: AuditApi[];
105
+ date_x_errors: {
106
+ [date: string]: number;
107
+ };
108
+ error_counts: ApiErrorCount[];
109
+ recent_errors: AuditError[];
110
+ };
111
+ /**
112
+ * An api key as the dashboard sees it. The `key` column itself is deliberately absent: it is the
113
+ * credential, and nothing on this page needs it to answer "who is near their limit".
114
+ */
115
+ export interface DashboardApiKey {
116
+ api_key_id: number;
117
+ user_id: string | null;
118
+ username: string | null;
119
+ subscription_id: string | null;
120
+ pricing_name: string | null;
121
+ pricing_type: string | null;
122
+ usage: number | null;
123
+ usage_limit: number | null;
124
+ read: number;
125
+ write: number;
126
+ hidden_access: number;
127
+ rate_limiter: number;
128
+ expires: string | null;
129
+ last_reset: string | null;
130
+ deleted: number;
131
+ }
132
+ export type apiKeysResults = {
133
+ error: string;
134
+ } | {
135
+ rows: DashboardApiKey[];
136
+ };
@@ -0,0 +1,10 @@
1
+ import { FantasyBracketSlots } from '../fantasy.ts';
2
+ export type pickArguments = {
3
+ fantasy_bracket_slot_id: string;
4
+ team_id: string | null;
5
+ };
6
+ export type pickResults = {
7
+ error: string;
8
+ } | {
9
+ fantasy_bracket_slots: FantasyBracketSlots;
10
+ };
@@ -0,0 +1,15 @@
1
+ import { PlayerTeamSeasons, Players } from '../general.ts';
2
+ import { FantasyDraftOrders, FantasyEntryPlayers, FantasyGroup } from '../fantasy.ts';
3
+ export type pickArguments = {
4
+ fantasy_draft_order_id: string;
5
+ player_team_season_id: string;
6
+ };
7
+ export type pickResults = {
8
+ error: string;
9
+ } | {
10
+ fantasy_draft_orders: FantasyDraftOrders;
11
+ fantasy_entry_players: FantasyEntryPlayers;
12
+ player_team_seasons: PlayerTeamSeasons;
13
+ players: Players;
14
+ fantasy_group?: FantasyGroup;
15
+ };
@@ -0,0 +1,37 @@
1
+ import * as Basketball from '../basketball.ts';
2
+ import * as Football from '../football.ts';
3
+ import { BracketTeams, PlayerTeamSeasons, Players, Games, Teams } from '../general.ts';
4
+ import { FantasyEntrys, FantasyGroupUsers, FantasyBracketSlots, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking } from '../fantasy.ts';
5
+ export type createEntryArguments = {
6
+ fantasy_group_id: string;
7
+ name: string;
8
+ };
9
+ export type createEntryResults = {
10
+ error: string;
11
+ } | {
12
+ fantasy_entrys: FantasyEntrys;
13
+ fantasy_group_users?: FantasyGroupUsers;
14
+ };
15
+ export type createBracketArguments = {
16
+ fantasy_entry_id: string;
17
+ };
18
+ export type createBracketResults = {
19
+ error: string;
20
+ } | FantasyBracketSlots;
21
+ export type loadArguments = {
22
+ fantasy_entry_id: string;
23
+ };
24
+ export type loadResults = {
25
+ error: string;
26
+ } | {
27
+ fantasy_entry_players: FantasyEntryPlayers | {};
28
+ fantasy_bracket_slots: FantasyBracketSlots;
29
+ bracket_teams: BracketTeams;
30
+ player_team_seasons: PlayerTeamSeasons;
31
+ players: Players;
32
+ games: Games;
33
+ fantasy_entry_player_statistic_rankings: {
34
+ [fantasy_entry_player_statistic_ranking_id: string]: FantasyEntryPlayerStatisticRanking & (Basketball.PlayerStatisticRanking | Football.PlayerStatisticRanking);
35
+ };
36
+ teams: Teams;
37
+ };
@@ -0,0 +1,9 @@
1
+ import { FantasyEntryPlayerStatisticRanking } from '../fantasy.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getStatsArguments = {
5
+ organization_id: string;
6
+ } & Partial<FantasyEntryPlayerStatisticRanking>;
7
+ export type getStatsResults = (FantasyEntryPlayerStatisticRanking & (Basketball.PlayerStatisticRanking | Football.PlayerStatisticRanking)) | {
8
+ error: string;
9
+ };
@@ -0,0 +1,77 @@
1
+ import * as Basketball from '../basketball.ts';
2
+ import * as Football from '../football.ts';
3
+ import { PlayerTeamSeasons, Players } from '../general.ts';
4
+ import { FantasyGroup, FantasyGroups, FantasyGroupUsers, FantasyGroupInvites, FantasyGroupComments, FantasyEntrys, FantasyRankings, FantasyDraftOrders, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking } from '../fantasy.ts';
5
+ export type createGroupArguments = Partial<Omit<FantasyGroup, 'fantasy_group_id' | 'owner_user_id' | 'guid' | 'deleted' | 'date_of_entry'>>;
6
+ export type createGroupResults = {
7
+ error: string;
8
+ } | FantasyGroup;
9
+ export type sendInvitesArguments = {
10
+ fantasy_group_id: string;
11
+ emails: string;
12
+ };
13
+ export type sendInvitesResults = {
14
+ error: string;
15
+ } | FantasyGroupInvites;
16
+ export type leaveArguments = {
17
+ fantasy_group_id: string;
18
+ };
19
+ export type leaveResults = {
20
+ error: string;
21
+ } | loadResults;
22
+ export type removeArguments = {
23
+ fantasy_group_id: string;
24
+ };
25
+ export type removeResults = {
26
+ error: string;
27
+ } | boolean;
28
+ export type lockArguments = {
29
+ fantasy_group_id: string;
30
+ };
31
+ export type lockResults = {
32
+ error: string;
33
+ } | {
34
+ fantasy_group: FantasyGroup;
35
+ fantasy_draft_orders: FantasyDraftOrders;
36
+ };
37
+ export type finishArguments = {
38
+ fantasy_group_id: string;
39
+ };
40
+ export type finishResults = {
41
+ error: string;
42
+ } | {
43
+ fantasy_group: FantasyGroup;
44
+ };
45
+ export type loadArguments = {
46
+ fantasy_group_id: string;
47
+ };
48
+ export type loadResults = {
49
+ error: string;
50
+ } | {
51
+ isOwner: boolean;
52
+ fantasy_group: FantasyGroup;
53
+ fantasy_group_users: FantasyGroupUsers;
54
+ fantasy_group_invites: FantasyGroupInvites;
55
+ fantasy_entrys: FantasyEntrys;
56
+ fantasy_rankings: FantasyRankings;
57
+ fantasy_group_comments: FantasyGroupComments;
58
+ fantasy_draft_orders: FantasyDraftOrders;
59
+ fantasy_entry_players: FantasyEntryPlayers;
60
+ player_team_seasons: PlayerTeamSeasons;
61
+ players: Players;
62
+ fantasy_entry_player_statistic_rankings: {
63
+ [fantasy_entry_player_statistic_ranking_id: string]: FantasyEntryPlayerStatisticRanking & (Basketball.PlayerStatisticRanking | Football.PlayerStatisticRanking);
64
+ };
65
+ };
66
+ export type loadHomeArguments = {
67
+ organization_id: string;
68
+ division_id: string;
69
+ season: number;
70
+ };
71
+ export type loadHomeResults = {
72
+ error: string;
73
+ } | {
74
+ fantasy_groups: FantasyGroups;
75
+ fantasy_group_users: FantasyGroupUsers;
76
+ fantasy_entrys: FantasyEntrys;
77
+ };
@@ -0,0 +1,10 @@
1
+ import { FantasyGroupComment } from '../fantasy.ts';
2
+ export type createCommentArguments = {
3
+ fantasy_group_id: string;
4
+ comment: string;
5
+ };
6
+ export type createCommentResults = {
7
+ error: string;
8
+ } | {
9
+ [fantasy_group_comment_id: string]: FantasyGroupComment;
10
+ };
@@ -0,0 +1,10 @@
1
+ export type joinArguments = {
2
+ fantasy_group_invite_id: string;
3
+ code: string;
4
+ };
5
+ export type joinResults = {
6
+ error: string;
7
+ } | {
8
+ fantasy_group_id: string;
9
+ session_id: string;
10
+ };
@@ -0,0 +1,33 @@
1
+ import * as Basketball from '../basketball.ts';
2
+ import * as Football from '../football.ts';
3
+ import { Players, PlayerTeamSeasons, Teams } from '../general.ts';
4
+ import { getGamesResults } from './game.ts';
5
+ export interface Favorite {
6
+ favorite_id: string;
7
+ user_id: string;
8
+ json_team_ids: string[];
9
+ json_player_ids: string[];
10
+ json_game_ids: string[];
11
+ guid: string;
12
+ deleted: number;
13
+ }
14
+ export type loadFavoriteDataArguments = {
15
+ season?: number;
16
+ };
17
+ export type loadFavoriteDataResults = {
18
+ schedule: {} | getGamesResults;
19
+ favorite: Partial<Favorite>;
20
+ teams: {} | Teams;
21
+ players: {} | Players;
22
+ gamelog: {} | Basketball.PlayerBoxscores | Football.PlayerBoxscores | {
23
+ error: string;
24
+ };
25
+ player_team_seasons: {} | PlayerTeamSeasons;
26
+ };
27
+ export type getFavoriteResults = Partial<Favorite>;
28
+ export type updateFavoriteArguments = {
29
+ team_id?: string;
30
+ player_id?: string;
31
+ game_id?: string;
32
+ };
33
+ export type updateFavoriteResults = Partial<Favorite>;
@@ -0,0 +1,9 @@
1
+ import { LeaguePlayerStatisticRanking } from '../general.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getStatsArguments = {
5
+ organization_id: string;
6
+ } & Partial<LeaguePlayerStatisticRanking>;
7
+ export type getStatsResults = Basketball.LeaguePlayerStatisticRanking | Football.LeaguePlayerStatisticRanking | {
8
+ error: string;
9
+ };
@@ -0,0 +1,9 @@
1
+ import { LeagueStatisticRanking } from '../general.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getStatsArguments = {
5
+ organization_id: string;
6
+ } & Partial<LeagueStatisticRanking>;
7
+ export type getStatsResults = Basketball.LeagueStatisticRanking | Football.LeagueStatisticRanking | {
8
+ error: string;
9
+ };
@@ -0,0 +1,7 @@
1
+ import { Notifications } from '../auth.ts';
2
+ export type clearArguments = {
3
+ notification_id: string[];
4
+ };
5
+ export type clearResults = Notifications | {
6
+ error: string;
7
+ };
@@ -0,0 +1,17 @@
1
+ import * as Basketball from '../basketball.ts';
2
+ export type readPlaybyPlayArguments = {
3
+ game_id: string;
4
+ organization_id?: string;
5
+ division_id?: string;
6
+ };
7
+ export type readPlaybyPlayResults = Basketball.PlaybyPlays | {
8
+ error: string;
9
+ };
10
+ export type getPlaybyPlayArguments = {
11
+ game_id: string;
12
+ organization_id?: string;
13
+ division_id?: string;
14
+ };
15
+ export type getPlaybyPlayResults = Basketball.PlaybyPlay | {
16
+ error: string;
17
+ };
@@ -0,0 +1,18 @@
1
+ import * as Basketball from '../basketball.ts';
2
+ import * as Football from '../football.ts';
3
+ import { PlayerTeamSeasons } from '../general.ts';
4
+ export type getSeasonsArguments = {
5
+ player_id: string;
6
+ };
7
+ export type getSeasonsResults = PlayerTeamSeasons | {
8
+ error: string;
9
+ };
10
+ export type getGameLogsArguments = {
11
+ organization_id: string;
12
+ division_id: string;
13
+ player_id: string;
14
+ season: number;
15
+ };
16
+ export type getGameLogsResults = Basketball.PlayerBoxscores | Football.PlayerBoxscores | {
17
+ error: string;
18
+ };
@@ -0,0 +1,15 @@
1
+ import { PlayerBoxscore } from '../general.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getPlayerBoxscoreArguments = {
5
+ organization_id: string;
6
+ } & Partial<PlayerBoxscore>;
7
+ export type getPlayerBoxscoreResults = Basketball.PlayerBoxscore | Football.PlayerBoxscore | {
8
+ error: string;
9
+ };
10
+ export type readPlayerBoxscoreArguments = {
11
+ organization_id: string;
12
+ } & Partial<PlayerBoxscore>;
13
+ export type readPlayerBoxscoreResults = Basketball.PlayerBoxscores | Football.PlayerBoxscores | {
14
+ error: string;
15
+ };
@@ -0,0 +1,9 @@
1
+ import { PlayerStatisticRanking } from '../general.ts';
2
+ import * as Basketball from '../basketball.ts';
3
+ import * as Football from '../football.ts';
4
+ export type getStatsArguments = {
5
+ organization_id: string;
6
+ } & Partial<PlayerStatisticRanking>;
7
+ export type getStatsResults = Basketball.PlayerStatisticRanking | Football.PlayerStatisticRanking | {
8
+ error: string;
9
+ };
@@ -0,0 +1,17 @@
1
+ export type compareArguments = {
2
+ organization_id: string;
3
+ division_id: string;
4
+ home_team_id: string;
5
+ away_team_id: string;
6
+ season: number;
7
+ neutral_site: boolean;
8
+ };
9
+ export interface PredictionRunResult {
10
+ home: number;
11
+ away: number;
12
+ home_score: number | null;
13
+ away_score: number | null;
14
+ }
15
+ export type compareResults = {
16
+ error: string;
17
+ } | {} | PredictionRunResult;
@@ -0,0 +1,22 @@
1
+ export type loadArguments = {
2
+ season: number;
3
+ organization_id: string;
4
+ division_id: string;
5
+ fxn: string;
6
+ career?: number;
7
+ career_active?: number;
8
+ };
9
+ export type loadResults = {
10
+ error: string;
11
+ } | unknown;
12
+ export type downloadArguments = {
13
+ season: number;
14
+ organization_id: string;
15
+ division_id: string;
16
+ view: string;
17
+ career?: number;
18
+ career_active?: number;
19
+ };
20
+ export type downloadResults = {
21
+ error: string;
22
+ } | false | unknown;