@srating-io/types 2.2.0 → 2.3.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,4 +1,4 @@
1
- import { AuditApi, AuditError } from '../audit.ts';
1
+ import { AuditApi, AuditError, ShishaLog } from '../audit.ts';
2
2
  import { Pricings } from '../payments.ts';
3
3
  /**
4
4
  * Every endpoint on this class is admin only and answers `{ error }` to everyone else, so each
@@ -134,3 +134,20 @@ export type apiKeysResults = {
134
134
  } | {
135
135
  rows: DashboardApiKey[];
136
136
  };
137
+ export type shishaArguments = {
138
+ /**
139
+ * How far back to look. Bounded server side: `shisha_log` takes a row for every log call in
140
+ * the pipeline, so an unbounded window is the whole table.
141
+ */
142
+ days?: number;
143
+ };
144
+ export type shishaResults = {
145
+ error: string;
146
+ } | {
147
+ days: number;
148
+ rows: ShishaLog[];
149
+ /** Row count per logging class over the window, so the panel can offer a filter. */
150
+ class_x_rows: {
151
+ [class_name: string]: number;
152
+ };
153
+ };
@@ -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, FantasyGroupUser, FantasyGroupUsers, FantasyBracketSlots, FantasyDraftOrders, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking, FantasyRankings } from '../fantasy.ts';
4
+ import { FantasyEntry, FantasyEntrys, FantasyGroup, FantasyGroupUsers, FantasyBracketSlots, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking } from '../fantasy.ts';
5
5
  export type createEntryArguments = {
6
6
  fantasy_group_id: string;
7
7
  name: string;
@@ -36,24 +36,4 @@ 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
- };
59
39
  };
package/dist/audit.d.ts CHANGED
@@ -86,3 +86,15 @@ export interface AuditUpdated {
86
86
  export type AuditUpdateds = {
87
87
  [audit_updated_id: number]: AuditUpdated;
88
88
  };
89
+ export interface ShishaLog {
90
+ shisha_log_id: number;
91
+ message: string | null;
92
+ class: string | null;
93
+ file: string | null;
94
+ pid: number | null;
95
+ date_of_entry: string;
96
+ deleted: number;
97
+ }
98
+ export type ShishaLogs = {
99
+ [shisha_log_id: number]: ShishaLog;
100
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@srating-io/types",
3
3
  "private": false,
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "description": "srating.io shared TypeScript types for GUI and API",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",