@srating-io/types 2.0.1 → 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
@@ -13,6 +13,24 @@ export interface FantasyPayoutRule {
13
13
  export type FantasyPayoutRules = {
14
14
  [fantasy_payout_rule_id: string]: FantasyPayoutRule;
15
15
  };
16
+ export interface FantasyPayout {
17
+ fantasy_payout_id: string;
18
+ fantasy_group_id: string;
19
+ fantasy_entry_id: string;
20
+ user_id: string;
21
+ rank: number | null;
22
+ amount: number;
23
+ method: string | null;
24
+ reference: string | null;
25
+ paid_at: string | null;
26
+ note: string | null;
27
+ date_of_entry: string;
28
+ guid: string;
29
+ deleted: number;
30
+ }
31
+ export type FantasyPayouts = {
32
+ [fantasy_payout_id: string]: FantasyPayout;
33
+ };
16
34
  export interface FantasyGroupInvite {
17
35
  fantasy_group_invite_id: string;
18
36
  fantasy_group_id: string;
@@ -55,6 +73,7 @@ export type FantasyGroupComments = {
55
73
  };
56
74
  export interface FantasyGroup {
57
75
  fantasy_group_id: string;
76
+ owner_user_id: string;
58
77
  organization_id: string;
59
78
  division_id: string;
60
79
  season: number;
@@ -81,6 +100,7 @@ export interface FantasyGroup {
81
100
  notified_15_mins: number;
82
101
  notified_finished: number;
83
102
  draft_time_per_user_in_seconds: number | null;
103
+ draft_order_seed: string | null;
84
104
  date_of_entry: string;
85
105
  guid: string;
86
106
  deleted: 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.1",
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",