@koloseum/types 0.2.2 → 0.2.4

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,8 +1,41 @@
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, CompanyVerificationDataObject, GamingSocialsDataObject, GenderIdentity, Institution, InstitutionNameIssue, MinorRelation, PersonVerificationLogDataObject, PersonalDataUpdateRequestJson, PronounsItem, RegistrationCheckObject, RegistrationStep, Sex, SocialMediaPlatform } from "./public/auth.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";
4
5
  import { MergeDeep } from "type-fest";
5
6
  export type Database = MergeDeep<DatabaseGenerated, {
7
+ competitions: {
8
+ Tables: {
9
+ events: {
10
+ Row: {
11
+ metadata: TournamentMetadata | null;
12
+ venue: BranchAddressObject | null;
13
+ };
14
+ Insert: {
15
+ metadata?: TournamentMetadata | null;
16
+ venue?: BranchAddressObject | null;
17
+ };
18
+ Update: {
19
+ metadata?: TournamentMetadata | null;
20
+ venue?: BranchAddressObject | null;
21
+ };
22
+ };
23
+ league_tournaments: {
24
+ Row: {
25
+ metadata: TournamentMetadata | null;
26
+ venue: BranchAddressObject | null;
27
+ };
28
+ Insert: {
29
+ metadata?: TournamentMetadata | null;
30
+ venue?: BranchAddressObject | null;
31
+ };
32
+ Update: {
33
+ metadata?: TournamentMetadata | null;
34
+ venue?: BranchAddressObject | null;
35
+ };
36
+ };
37
+ };
38
+ };
6
39
  compliance: {
7
40
  Tables: {
8
41
  active_registrations: {
@@ -21,48 +54,33 @@ export type Database = MergeDeep<DatabaseGenerated, {
21
54
  };
22
55
  data_update_requests: {
23
56
  Row: {
24
- account_type: AccountType & "player";
25
- updates: PersonalDataUpdateRequestJson;
26
- } | {
27
- account_type: AccountType & "lounge";
28
- updates: CompanyInformationUpdateJson;
57
+ account_type: AccountType;
58
+ status: DataUpdateRequestStatus;
59
+ updates: PersonalDataUpdateRequestJson | CompanyInformationUpdateRequestJson;
29
60
  };
30
61
  Insert: {
31
- account_type: AccountType & "player";
32
- updates: PersonalDataUpdateRequestJson;
33
- } | {
34
- account_type: AccountType & "lounge";
35
- updates: CompanyInformationUpdateJson;
62
+ account_type: AccountType;
63
+ status?: DataUpdateRequestStatus;
64
+ updates: PersonalDataUpdateRequestJson | CompanyInformationUpdateRequestJson;
36
65
  };
37
66
  Update: {
38
- account_type: AccountType & "player";
39
- updates: PersonalDataUpdateRequestJson;
40
- } | {
41
- account_type: AccountType & "lounge";
42
- updates: CompanyInformationUpdateJson;
67
+ account_type?: AccountType;
68
+ status?: DataUpdateRequestStatus;
69
+ updates?: PersonalDataUpdateRequestJson | CompanyInformationUpdateRequestJson;
43
70
  };
44
71
  };
45
72
  data_updates: {
46
73
  Row: {
47
- account_type: AccountType & "player";
48
- updates: PersonalDataUpdateRequestJson;
49
- } | {
50
- account_type: AccountType & "lounge";
51
- updates: CompanyInformationUpdateJson;
74
+ account_type: AccountType;
75
+ updates: PersonalDataUpdateJson | CompanyInformationUpdateJson;
52
76
  };
53
77
  Insert: {
54
- account_type: AccountType & "player";
55
- updates: PersonalDataUpdateRequestJson;
56
- } | {
57
- account_type: AccountType & "lounge";
58
- updates: CompanyInformationUpdateJson;
78
+ account_type: AccountType;
79
+ updates: PersonalDataUpdateRequestJson | CompanyInformationUpdateJson;
59
80
  };
60
81
  Update: {
61
- account_type: AccountType & "player";
62
- updates: PersonalDataUpdateRequestJson;
63
- } | {
64
- account_type: AccountType & "lounge";
65
- updates: CompanyInformationUpdateJson;
82
+ account_type?: AccountType;
83
+ updates?: PersonalDataUpdateRequestJson | CompanyInformationUpdateJson;
66
84
  };
67
85
  };
68
86
  lounge_branches: {
@@ -111,19 +111,39 @@ export interface PersonalDataObject {
111
111
  relation?: MinorRelation;
112
112
  otherRelation?: string;
113
113
  }
114
+ export interface PersonalDataUpdateJson {
115
+ first_name?: {
116
+ old: string;
117
+ new: string;
118
+ };
119
+ middle_names?: {
120
+ old: string | null;
121
+ new: string | null;
122
+ };
123
+ last_name?: {
124
+ old: string;
125
+ new: string;
126
+ };
127
+ birth_date?: {
128
+ old: string;
129
+ new: string;
130
+ };
131
+ nationality?: {
132
+ old: string;
133
+ new: string;
134
+ };
135
+ minor_rep?: PersonalDataUpdateJson & {
136
+ id: string;
137
+ };
138
+ }
114
139
  export interface PersonalDataUpdateRequestJson {
115
140
  first_name?: string;
116
141
  middle_names?: string | null;
117
142
  last_name?: string;
118
143
  birth_date?: string;
119
144
  nationality?: string;
120
- minor_rep?: {
145
+ minor_rep?: PersonalDataUpdateRequestJson & {
121
146
  id: string;
122
- first_name?: string;
123
- middle_names?: string | null;
124
- last_name?: string;
125
- birth_date?: string;
126
- nationality?: string;
127
147
  };
128
148
  }
129
149
  export interface VarsityDataObject {
@@ -207,10 +227,25 @@ export interface CompanyInformationFormattingObject {
207
227
  registrationCertificateCopy?: File;
208
228
  }
209
229
  export interface CompanyInformationUpdateJson {
230
+ company_name?: {
231
+ old: string;
232
+ new: string;
233
+ };
234
+ registration_date?: {
235
+ old: string;
236
+ new: string;
237
+ };
238
+ trade_name?: {
239
+ old: string;
240
+ new: string;
241
+ };
242
+ branch?: BranchInformationUpdateJson;
243
+ }
244
+ export interface CompanyInformationUpdateRequestJson {
210
245
  company_name?: string;
211
246
  registration_date?: string;
212
247
  trade_name?: string;
213
- branch?: BranchInformationUpdateJson;
248
+ branch?: BranchInformationUpdateRequestJson;
214
249
  }
215
250
  export type SuperuserIdentityDataObject = Omit<IdentityDataObject, "isForMinorRep">;
216
251
  export type SuperuserPersonalDataObject = Omit<PersonalDataObject, "showDateOfBirth" | "relation" | "otherRelation">;
@@ -241,7 +276,7 @@ export interface BranchAddressObject {
241
276
  boxNumber?: string;
242
277
  postalCode?: string;
243
278
  town: string;
244
- subCounty: string;
279
+ subCounty?: string;
245
280
  county: string;
246
281
  additionalInfo?: string;
247
282
  }
@@ -266,6 +301,17 @@ export interface BranchInformationFormattingObject {
266
301
  formattedAmenities?: BranchAmenitiesObject | null;
267
302
  }
268
303
  export interface BranchInformationUpdateJson {
304
+ id?: string;
305
+ address?: {
306
+ old: BranchAddressObject;
307
+ new: BranchAddressObject;
308
+ };
309
+ amenities?: {
310
+ old: BranchAmenitiesObject | null;
311
+ new: BranchAmenitiesObject | null;
312
+ };
313
+ }
314
+ export interface BranchInformationUpdateRequestJson {
269
315
  id?: string;
270
316
  address?: BranchAddressObject;
271
317
  amenities?: BranchAmenitiesObject | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koloseum/types",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "author": "Koloseum Technologies Limited",
5
5
  "type": "module",
6
6
  "description": "Type definitions for use across web apps (TypeScript)",
@@ -19,7 +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"
22
+ "./public-auth": "./dist/public/auth.d.ts",
23
+ "./competitions": "./dist/backroom/competitions.d.ts"
23
24
  },
24
25
  "files": [
25
26
  "./dist/**/*.d.ts"