@srating-io/types 2.0.2 → 2.0.3

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 { FantasyEntrys, FantasyGroupUsers, FantasyBracketSlots, FantasyEntryPlayers, FantasyEntryPlayerStatisticRanking } 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;
@@ -24,6 +24,8 @@ export type loadArguments = {
24
24
  export type loadResults = {
25
25
  error: string;
26
26
  } | {
27
+ fantasy_entry: FantasyEntry;
28
+ fantasy_group: FantasyGroup;
27
29
  fantasy_entry_players: FantasyEntryPlayers | {};
28
30
  fantasy_bracket_slots: FantasyBracketSlots;
29
31
  bracket_teams: BracketTeams;
@@ -6,6 +6,27 @@ export type createGroupArguments = Partial<Omit<FantasyGroup, 'fantasy_group_id'
6
6
  export type createGroupResults = {
7
7
  error: string;
8
8
  } | FantasyGroup;
9
+ /**
10
+ * What an owner may change after the fact. Deliberately narrow: the sport, season, league type,
11
+ * draft style, entry fee and payout rule are what people join and pay on, so they are fixed.
12
+ * Omitting a key leaves it alone.
13
+ */
14
+ export type updateGroupArguments = {
15
+ fantasy_group_id: string;
16
+ name?: string;
17
+ start_date?: string | null;
18
+ end_date?: string | null;
19
+ draft_start_datetime?: string | null;
20
+ draft_time_per_user_in_seconds?: number | null;
21
+ cap?: number;
22
+ entries?: number | null;
23
+ entries_per_user?: number;
24
+ open_invites?: number;
25
+ private?: number;
26
+ };
27
+ export type updateGroupResults = {
28
+ error: string;
29
+ } | FantasyGroup;
9
30
  export type sendInvitesArguments = {
10
31
  fantasy_group_id: string;
11
32
  emails: string;
package/dist/fantasy.d.ts CHANGED
@@ -73,6 +73,7 @@ export type FantasyGroupComments = {
73
73
  };
74
74
  export interface FantasyGroup {
75
75
  fantasy_group_id: string;
76
+ owner_user_id: string;
76
77
  organization_id: string;
77
78
  division_id: string;
78
79
  season: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@srating-io/types",
3
3
  "private": false,
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "description": "srating.io shared TypeScript types for GUI and API",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",