@koloseum/types 0.3.0 → 0.3.2

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 type { Database as DatabaseGenerated } from "./database-generated.js";
2
2
  import type { AccountType, DataUpdateRequestStatus, PhoneOTPRequestStatus, PhoneOTPSendCodeAttempt } from "./general.js";
3
- import type { BranchAddressObject, BranchAmenitiesObject, CompanyInformationUpdateJson, CompanyInformationUpdateRequestJson, CompanyVerificationDataObject, GamingSocialsDataObject, GenderIdentity, Institution, InstitutionNameIssue, MinorRelation, PersonVerificationLogDataObject, PersonalDataUpdateJson, PersonalDataUpdateRequestJson, PronounsItem, RegistrationCheckObject, RegistrationStep, Sex, SocialMediaPlatform } from "./public/auth.js";
4
- import type { TournamentMetadata } from "./backroom/competitions.js";
3
+ import type { BranchAddressObject, BranchAmenitiesObject, CompanyInformationUpdateJson, CompanyInformationUpdateRequestJson, CompanyVerificationDataObject, GamingSocialsDataObject, GenderIdentity, Institution, InstitutionNameIssue, MinorRelation, PersonVerificationLogDataObject, PersonalDataUpdateJson, PersonalDataUpdateRequestJson, PlayerRegistrationStep, PronounsItem, RegistrationCheckObject, RegistrationStep, Sex, SocialMediaPlatform } from "./public/auth.js";
4
+ import type { TournamentMetadata } from "./players/competitions.js";
5
5
  import { MergeDeep } from "type-fest";
6
6
  export type Database = MergeDeep<DatabaseGenerated, {
7
7
  competitions: {
@@ -343,7 +343,7 @@ export type Database = MergeDeep<DatabaseGenerated, {
343
343
  };
344
344
  };
345
345
  Enums: {
346
- registration_step: 1 | 2 | 3 | 4 | 0;
346
+ registration_step: PlayerRegistrationStep;
347
347
  };
348
348
  };
349
349
  public: {
package/dist/general.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Database } from "./database.js";
1
+ import type { Database } from "./database-generated.js";
2
2
  import type { User } from "@supabase/supabase-js";
3
3
  export type AccountType = "player" | "lounge";
4
4
  export interface AppMetadata {
@@ -138,3 +138,10 @@ export interface PhoneOTPSendCodeAttempt {
138
138
  channel: string;
139
139
  time: string;
140
140
  }
141
+ export interface Game {
142
+ id: string;
143
+ name: string;
144
+ genres: string[];
145
+ initialReleaseDate: string;
146
+ coverUrl?: string;
147
+ }
@@ -0,0 +1,109 @@
1
+ import type { Database } from "../database-generated.js";
2
+ import type { BranchAddressObject } from "../public/auth.js";
3
+ export type AgeCheckType = Database["competitions"]["Enums"]["age_check_type"];
4
+ export type EventParticipantType = Database["competitions"]["Enums"]["event_participant_type"];
5
+ export type EventStatus = Database["competitions"]["Enums"]["event_status"];
6
+ export type LeagueRegularScoringType = Database["competitions"]["Enums"]["league_regular_scoring_type"];
7
+ export type SeasonPhaseType = Database["competitions"]["Enums"]["season_phase_type"];
8
+ export interface League {
9
+ id: string;
10
+ name: string;
11
+ description?: string;
12
+ participantType: EventParticipantType;
13
+ minimumAgeYears?: number | null;
14
+ minimumAgeCheckType?: AgeCheckType | null;
15
+ maximumAgeYears?: number | null;
16
+ maximumAgeCheckType?: AgeCheckType | null;
17
+ metadata?: Record<string, unknown> | null;
18
+ createdAt?: string;
19
+ createdBy?: string;
20
+ }
21
+ export interface Tier {
22
+ id: string;
23
+ leagueId?: string;
24
+ name: string;
25
+ description?: string;
26
+ order: number;
27
+ metadata?: Record<string, unknown> | null;
28
+ createdAt?: string;
29
+ discontinuedAt?: string;
30
+ divisions?: Division[];
31
+ }
32
+ export interface Division {
33
+ id: string;
34
+ tierId?: string;
35
+ name: string;
36
+ description?: string;
37
+ metadata?: Record<string, unknown> | null;
38
+ createdAt?: string;
39
+ discontinuedAt?: string;
40
+ }
41
+ export interface Season {
42
+ id: string;
43
+ divisionId?: string;
44
+ name: string;
45
+ description?: string;
46
+ startDate: string;
47
+ endDate: string;
48
+ minimumAgeYears?: number | null;
49
+ minimumAgeCheckType?: AgeCheckType | null;
50
+ maximumAgeYears?: number | null;
51
+ maximumAgeCheckType?: AgeCheckType | null;
52
+ regularPhaseScoring?: LeagueRegularScoringType;
53
+ includeRedemption?: boolean;
54
+ includeDecider?: boolean;
55
+ metadata?: Record<string, unknown> | null;
56
+ createdAt?: string;
57
+ status?: EventStatus | null;
58
+ suspendedAt?: string | null;
59
+ cancelledAt?: string | null;
60
+ }
61
+ export interface Tournament {
62
+ id: string;
63
+ seasonId?: string;
64
+ name: string;
65
+ description?: string;
66
+ venue?: BranchAddressObject | null;
67
+ loungeBranchId?: string | null;
68
+ startTime: string;
69
+ endTime?: string | null;
70
+ seasonPhase?: SeasonPhaseType;
71
+ metadata?: TournamentMetadata | null;
72
+ createdAt?: string;
73
+ }
74
+ export interface TournamentMetadata {
75
+ [key: string]: unknown;
76
+ minimum_age?: number;
77
+ has_online_crossplay?: boolean;
78
+ external_provider?: {
79
+ provider: string;
80
+ provider_id: string;
81
+ };
82
+ }
83
+ export interface CompetitionEvent {
84
+ id: string;
85
+ name: string;
86
+ description?: string | null;
87
+ participantType: EventParticipantType;
88
+ minimumAgeYears?: number | null;
89
+ minimumAgeCheckType?: AgeCheckType | null;
90
+ maximumAgeYears?: number | null;
91
+ maximumAgeCheckType?: AgeCheckType | null;
92
+ challengesEditionId?: string | null;
93
+ leagueTournamentId?: string | null;
94
+ localsTournamentId?: string | null;
95
+ startTime?: string | null;
96
+ endTime?: string | null;
97
+ isOnline: boolean;
98
+ venue?: BranchAddressObject | null;
99
+ loungeBranchId?: string | null;
100
+ gameId?: string | null;
101
+ gameTitle?: string | null;
102
+ consoleId?: string | null;
103
+ registrationBuffer?: string | null;
104
+ checkInBuffer?: string | null;
105
+ checkInDuration?: string | null;
106
+ metadata?: TournamentMetadata | null;
107
+ createdAt?: string | null;
108
+ status?: EventStatus | null;
109
+ }
@@ -1,7 +1,7 @@
1
- import type { Database } from "../database.js";
1
+ import type { Database } from "../database-generated.js";
2
2
  import type { CustomError, PhoneOTPData as PhoneOTPDataGeneral } from "../general.js";
3
- export type PlayerRegistrationStep = Database["compliance"]["Enums"]["registration_step"];
4
- export type LoungeRegistrationStep = Exclude<Database["compliance"]["Enums"]["registration_step"], 4>;
3
+ export type PlayerRegistrationStep = 1 | 2 | 3 | 4 | 0;
4
+ export type LoungeRegistrationStep = Exclude<PlayerRegistrationStep, 4>;
5
5
  export type RegistrationStep<AccountType> = AccountType extends "player" ? PlayerRegistrationStep : LoungeRegistrationStep;
6
6
  export interface RegistrationCheckObject<AccountType> {
7
7
  type?: AccountType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koloseum/types",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "author": "Koloseum Technologies Limited",
5
5
  "type": "module",
6
6
  "description": "Type definitions for use across web apps (TypeScript)",
@@ -19,8 +19,8 @@
19
19
  "./database": "./dist/database.d.ts",
20
20
  "./database-generated": "./dist/database-generated.d.ts",
21
21
  "./general": "./dist/general.d.ts",
22
- "./public-auth": "./dist/public/auth.d.ts",
23
- "./competitions": "./dist/backroom/competitions.d.ts"
22
+ "./public/auth": "./dist/public/auth.d.ts",
23
+ "./players/competitions": "./dist/players/competitions.d.ts"
24
24
  },
25
25
  "files": [
26
26
  "./dist/**/*.d.ts"
@@ -31,11 +31,11 @@
31
31
  "format": "prettier --write ."
32
32
  },
33
33
  "devDependencies": {
34
- "@supabase/supabase-js": "^2.57.4",
35
- "prettier": "^3.6.2",
36
- "typescript": "^5.9.2"
34
+ "@supabase/supabase-js": "^2.95.3",
35
+ "prettier": "^3.8.1",
36
+ "typescript": "^5.9.3"
37
37
  },
38
38
  "dependencies": {
39
- "type-fest": "^5.0.0"
39
+ "type-fest": "^5.4.4"
40
40
  }
41
41
  }
@@ -1,91 +0,0 @@
1
- import type { Database } from "../database.js";
2
- import type { BranchAddressObject } from "../public/auth.js";
3
- export type CompetitionMarket = "fbl" | "fgc" | "bryl";
4
- export type EventParticipantType = Database["competitions"]["Enums"]["event_participant_type"];
5
- export type EventStatus = Database["competitions"]["Enums"]["event_status"];
6
- export interface Game {
7
- id: string;
8
- name: string;
9
- genres: string[];
10
- initialReleaseDate: string;
11
- coverUrl?: string;
12
- }
13
- export interface League {
14
- id: string;
15
- name: string;
16
- description?: string;
17
- participantType: EventParticipantType;
18
- createdAt?: string;
19
- createdBy?: string;
20
- }
21
- export interface Tier {
22
- id: string;
23
- leagueId?: string;
24
- name: string;
25
- description?: string;
26
- order: number;
27
- createdAt?: string;
28
- discontinuedAt?: string;
29
- divisions?: Division[];
30
- }
31
- export interface Division {
32
- id: string;
33
- tierId?: string;
34
- name: string;
35
- description?: string;
36
- createdAt?: string;
37
- discontinuedAt?: string;
38
- }
39
- export interface Season {
40
- id: string;
41
- divisionId?: string;
42
- name: string;
43
- description?: string;
44
- order: number;
45
- startDate: string;
46
- endDate: string;
47
- createdAt?: string;
48
- status?: EventStatus;
49
- }
50
- export interface Tournament {
51
- id: string;
52
- seasonId?: string;
53
- name: string;
54
- description?: string;
55
- venue: BranchAddressObject;
56
- startTime: string;
57
- endTime: string;
58
- metadata?: TournamentMetadata;
59
- createdAt?: string;
60
- }
61
- export interface TournamentMetadata {
62
- [key: string]: unknown;
63
- minimum_age?: number;
64
- has_online_crossplay?: boolean;
65
- external_provider?: {
66
- provider: string;
67
- provider_id: string;
68
- };
69
- }
70
- export interface CompetitionEvent {
71
- id: string;
72
- name: string;
73
- description?: string;
74
- participantType: EventParticipantType;
75
- challengesEditionId?: string;
76
- leagueTournamentId?: string;
77
- localsTournamentId?: string;
78
- startTime?: string;
79
- endTime?: string;
80
- isOnline: boolean;
81
- venue?: BranchAddressObject;
82
- loungeBranchId?: string;
83
- gameId?: string;
84
- gameTitle?: string;
85
- consoleId?: string;
86
- checkInBuffer?: string;
87
- checkInDuration?: string;
88
- metadata?: TournamentMetadata;
89
- createdAt?: string;
90
- status?: EventStatus;
91
- }