@koloseum/types 0.3.0 → 0.3.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.
- package/dist/database-generated.d.ts +844 -40
- package/dist/database.d.ts +22 -16
- package/dist/general.d.ts +24 -6
- package/dist/players/competitions.d.ts +109 -0
- package/dist/public/auth.d.ts +3 -3
- package/package.json +7 -7
- package/dist/backroom/competitions.d.ts +0 -91
package/dist/database.d.ts
CHANGED
|
@@ -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 "./
|
|
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: {
|
|
@@ -234,19 +234,6 @@ export type Database = MergeDeep<DatabaseGenerated, {
|
|
|
234
234
|
last_name: string;
|
|
235
235
|
}[];
|
|
236
236
|
};
|
|
237
|
-
get_lounge_branches: {
|
|
238
|
-
Returns: {
|
|
239
|
-
address: BranchAddressObject;
|
|
240
|
-
amenities: BranchAmenitiesObject | null;
|
|
241
|
-
created_at: string;
|
|
242
|
-
deleted_at: string | null;
|
|
243
|
-
email: string | null;
|
|
244
|
-
id: string;
|
|
245
|
-
name: string;
|
|
246
|
-
phone: string;
|
|
247
|
-
user_id: string;
|
|
248
|
-
}[];
|
|
249
|
-
};
|
|
250
237
|
generate_platform_id: {
|
|
251
238
|
Args: {
|
|
252
239
|
account_type: AccountType;
|
|
@@ -277,6 +264,19 @@ export type Database = MergeDeep<DatabaseGenerated, {
|
|
|
277
264
|
created_at: string;
|
|
278
265
|
}[];
|
|
279
266
|
};
|
|
267
|
+
get_lounge_branches: {
|
|
268
|
+
Returns: {
|
|
269
|
+
id: string;
|
|
270
|
+
lounge_id: string;
|
|
271
|
+
name: string;
|
|
272
|
+
address: BranchAddressObject;
|
|
273
|
+
amenities: BranchAmenitiesObject | null;
|
|
274
|
+
email: string | null;
|
|
275
|
+
phone: string;
|
|
276
|
+
created_at: string;
|
|
277
|
+
deleted_at: string | null;
|
|
278
|
+
}[];
|
|
279
|
+
};
|
|
280
280
|
get_lounge_ids: {
|
|
281
281
|
Returns: {
|
|
282
282
|
lounge_id: string | null;
|
|
@@ -286,6 +286,12 @@ export type Database = MergeDeep<DatabaseGenerated, {
|
|
|
286
286
|
get_minor_rep_phone: {
|
|
287
287
|
Returns: string | null;
|
|
288
288
|
};
|
|
289
|
+
get_player_balances: {
|
|
290
|
+
Returns: {
|
|
291
|
+
kxp: number;
|
|
292
|
+
credits: number;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
289
295
|
get_player_ids: {
|
|
290
296
|
Returns: {
|
|
291
297
|
player_id: string | null;
|
|
@@ -343,7 +349,7 @@ export type Database = MergeDeep<DatabaseGenerated, {
|
|
|
343
349
|
};
|
|
344
350
|
};
|
|
345
351
|
Enums: {
|
|
346
|
-
registration_step:
|
|
352
|
+
registration_step: PlayerRegistrationStep;
|
|
347
353
|
};
|
|
348
354
|
};
|
|
349
355
|
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 {
|
|
@@ -54,11 +54,10 @@ export interface IGDBPlatformsResponse {
|
|
|
54
54
|
platform_family: number;
|
|
55
55
|
}
|
|
56
56
|
export type MicroserviceGroup = "public" | "players" | "lounges" | "backroom";
|
|
57
|
-
export type Microservice<MicroserviceGroup> = (MicroserviceGroup extends "players" ? "sessions" | "commerce" | "
|
|
57
|
+
export type Microservice<MicroserviceGroup> = (MicroserviceGroup extends "public" ? "landing" | "auth" | "help" | "legal" : never) | (MicroserviceGroup extends "players" ? "sessions" | "commerce" | "competitions" | "account" : never) | (MicroserviceGroup extends "lounges" ? "operations" | "staff" | "account" : never) | (MicroserviceGroup extends "backroom" ? "compliance" | "commerce" | "staff" : never);
|
|
58
58
|
export type MicroserviceFeature = {
|
|
59
59
|
name: string;
|
|
60
60
|
description: string;
|
|
61
|
-
tabs?: MicroserviceFeature[];
|
|
62
61
|
} & ({
|
|
63
62
|
slug: string;
|
|
64
63
|
root?: never;
|
|
@@ -82,15 +81,27 @@ export type MicroserviceRole = {
|
|
|
82
81
|
superuser?: never;
|
|
83
82
|
root?: never;
|
|
84
83
|
});
|
|
85
|
-
export type MicroserviceObject<MicroserviceGroup> = {
|
|
84
|
+
export type MicroserviceObject<G extends MicroserviceGroup> = {
|
|
86
85
|
name: string;
|
|
87
86
|
description: string;
|
|
88
87
|
features: MicroserviceFeature[];
|
|
89
|
-
} & ({
|
|
88
|
+
} & (G extends "public" ? {
|
|
89
|
+
slug: Microservice<"public">;
|
|
90
|
+
roles: null;
|
|
91
|
+
} : G extends "players" ? {
|
|
90
92
|
slug: "account";
|
|
91
93
|
roles: null;
|
|
92
94
|
} | {
|
|
93
|
-
slug: Exclude<Microservice<
|
|
95
|
+
slug: Exclude<Microservice<"players">, "account">;
|
|
96
|
+
roles: MicroserviceRole[];
|
|
97
|
+
} : G extends "lounges" ? {
|
|
98
|
+
slug: "account";
|
|
99
|
+
roles: MicroserviceRole[];
|
|
100
|
+
} | {
|
|
101
|
+
slug: Exclude<Microservice<"lounges">, "account">;
|
|
102
|
+
roles: MicroserviceRole[];
|
|
103
|
+
} : {
|
|
104
|
+
slug: Microservice<G>;
|
|
94
105
|
roles: MicroserviceRole[];
|
|
95
106
|
});
|
|
96
107
|
export type UserMetadata = {
|
|
@@ -138,3 +149,10 @@ export interface PhoneOTPSendCodeAttempt {
|
|
|
138
149
|
channel: string;
|
|
139
150
|
time: string;
|
|
140
151
|
}
|
|
152
|
+
export interface Game {
|
|
153
|
+
id: string;
|
|
154
|
+
name: string;
|
|
155
|
+
genres: string[];
|
|
156
|
+
initialReleaseDate: string;
|
|
157
|
+
coverUrl?: string;
|
|
158
|
+
}
|
|
@@ -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
|
+
}
|
package/dist/public/auth.d.ts
CHANGED
|
@@ -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 =
|
|
4
|
-
export type LoungeRegistrationStep = Exclude<
|
|
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.
|
|
3
|
+
"version": "0.3.3",
|
|
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
|
|
23
|
-
"./competitions": "./dist/
|
|
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.
|
|
35
|
-
"prettier": "^3.
|
|
36
|
-
"typescript": "^5.9.
|
|
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.
|
|
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
|
-
}
|