@koloseum/types 0.1.3 → 0.1.5
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/package.json +1 -1
- package/types/database-generated.d.ts +55 -40
- package/types/database.d.ts +7 -8
- package/types/public/auth.d.ts +8 -5
package/package.json
CHANGED
|
@@ -140,7 +140,7 @@ export type Database = {
|
|
|
140
140
|
company_number: string;
|
|
141
141
|
country_code: string;
|
|
142
142
|
created_at: string;
|
|
143
|
-
id:
|
|
143
|
+
id: string;
|
|
144
144
|
user_id: string;
|
|
145
145
|
};
|
|
146
146
|
Insert: {
|
|
@@ -148,7 +148,7 @@ export type Database = {
|
|
|
148
148
|
company_number: string;
|
|
149
149
|
country_code: string;
|
|
150
150
|
created_at?: string;
|
|
151
|
-
id?:
|
|
151
|
+
id?: string;
|
|
152
152
|
user_id?: string;
|
|
153
153
|
};
|
|
154
154
|
Update: {
|
|
@@ -156,7 +156,7 @@ export type Database = {
|
|
|
156
156
|
company_number?: string;
|
|
157
157
|
country_code?: string;
|
|
158
158
|
created_at?: string;
|
|
159
|
-
id?:
|
|
159
|
+
id?: string;
|
|
160
160
|
user_id?: string;
|
|
161
161
|
};
|
|
162
162
|
Relationships: [];
|
|
@@ -179,7 +179,7 @@ export type Database = {
|
|
|
179
179
|
phone: string;
|
|
180
180
|
phone_updated_at: string | null;
|
|
181
181
|
pronouns: Database["compliance"]["Enums"]["pronouns"][] | null;
|
|
182
|
-
role:
|
|
182
|
+
role: string;
|
|
183
183
|
sex: Database["compliance"]["Enums"]["sex"] | null;
|
|
184
184
|
show_pronouns: boolean | null;
|
|
185
185
|
user_id: string;
|
|
@@ -201,7 +201,7 @@ export type Database = {
|
|
|
201
201
|
phone: string;
|
|
202
202
|
phone_updated_at?: string | null;
|
|
203
203
|
pronouns?: Database["compliance"]["Enums"]["pronouns"][] | null;
|
|
204
|
-
role:
|
|
204
|
+
role: string;
|
|
205
205
|
sex?: Database["compliance"]["Enums"]["sex"] | null;
|
|
206
206
|
show_pronouns?: boolean | null;
|
|
207
207
|
user_id?: string;
|
|
@@ -223,7 +223,7 @@ export type Database = {
|
|
|
223
223
|
phone?: string;
|
|
224
224
|
phone_updated_at?: string | null;
|
|
225
225
|
pronouns?: Database["compliance"]["Enums"]["pronouns"][] | null;
|
|
226
|
-
role?:
|
|
226
|
+
role?: string;
|
|
227
227
|
sex?: Database["compliance"]["Enums"]["sex"] | null;
|
|
228
228
|
show_pronouns?: boolean | null;
|
|
229
229
|
user_id?: string;
|
|
@@ -235,13 +235,20 @@ export type Database = {
|
|
|
235
235
|
isOneToOne: false;
|
|
236
236
|
referencedRelation: "lounges";
|
|
237
237
|
referencedColumns: ["id"];
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
foreignKeyName: "lounge_staff_role_fkey";
|
|
241
|
+
columns: ["role"];
|
|
242
|
+
isOneToOne: false;
|
|
243
|
+
referencedRelation: "user_roles";
|
|
244
|
+
referencedColumns: ["name"];
|
|
238
245
|
}
|
|
239
246
|
];
|
|
240
247
|
};
|
|
241
248
|
lounge_staff_verification_attempts: {
|
|
242
249
|
Row: {
|
|
243
250
|
created_at: string;
|
|
244
|
-
id:
|
|
251
|
+
id: string;
|
|
245
252
|
id_country: string;
|
|
246
253
|
id_number: string;
|
|
247
254
|
id_type: Database["compliance"]["Enums"]["id_type"];
|
|
@@ -250,7 +257,7 @@ export type Database = {
|
|
|
250
257
|
};
|
|
251
258
|
Insert: {
|
|
252
259
|
created_at?: string;
|
|
253
|
-
id?:
|
|
260
|
+
id?: string;
|
|
254
261
|
id_country: string;
|
|
255
262
|
id_number: string;
|
|
256
263
|
id_type: Database["compliance"]["Enums"]["id_type"];
|
|
@@ -259,7 +266,7 @@ export type Database = {
|
|
|
259
266
|
};
|
|
260
267
|
Update: {
|
|
261
268
|
created_at?: string;
|
|
262
|
-
id?:
|
|
269
|
+
id?: string;
|
|
263
270
|
id_country?: string;
|
|
264
271
|
id_number?: string;
|
|
265
272
|
id_type?: Database["compliance"]["Enums"]["id_type"];
|
|
@@ -893,7 +900,7 @@ export type Database = {
|
|
|
893
900
|
nationality: string;
|
|
894
901
|
pronouns: Database["compliance"]["Enums"]["pronouns"][] | null;
|
|
895
902
|
pseudonym: string | null;
|
|
896
|
-
role:
|
|
903
|
+
role: string;
|
|
897
904
|
sex: Database["compliance"]["Enums"]["sex"] | null;
|
|
898
905
|
show_birth_date: boolean;
|
|
899
906
|
show_pronouns: boolean | null;
|
|
@@ -912,7 +919,7 @@ export type Database = {
|
|
|
912
919
|
nationality: string;
|
|
913
920
|
pronouns?: Database["compliance"]["Enums"]["pronouns"][] | null;
|
|
914
921
|
pseudonym?: string | null;
|
|
915
|
-
role?:
|
|
922
|
+
role?: string;
|
|
916
923
|
sex?: Database["compliance"]["Enums"]["sex"] | null;
|
|
917
924
|
show_birth_date: boolean;
|
|
918
925
|
show_pronouns?: boolean | null;
|
|
@@ -931,29 +938,34 @@ export type Database = {
|
|
|
931
938
|
nationality?: string;
|
|
932
939
|
pronouns?: Database["compliance"]["Enums"]["pronouns"][] | null;
|
|
933
940
|
pseudonym?: string | null;
|
|
934
|
-
role?:
|
|
941
|
+
role?: string;
|
|
935
942
|
sex?: Database["compliance"]["Enums"]["sex"] | null;
|
|
936
943
|
show_birth_date?: boolean;
|
|
937
944
|
show_pronouns?: boolean | null;
|
|
938
945
|
user_id?: string | null;
|
|
939
946
|
};
|
|
940
|
-
Relationships: [
|
|
947
|
+
Relationships: [
|
|
948
|
+
{
|
|
949
|
+
foreignKeyName: "players_role_fkey";
|
|
950
|
+
columns: ["role"];
|
|
951
|
+
isOneToOne: false;
|
|
952
|
+
referencedRelation: "user_roles";
|
|
953
|
+
referencedColumns: ["name"];
|
|
954
|
+
}
|
|
955
|
+
];
|
|
941
956
|
};
|
|
942
957
|
role_permissions: {
|
|
943
958
|
Row: {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
role: Database["compliance"]["Enums"]["app_role"];
|
|
959
|
+
permission: string;
|
|
960
|
+
role: string;
|
|
947
961
|
};
|
|
948
962
|
Insert: {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
role: Database["compliance"]["Enums"]["app_role"];
|
|
963
|
+
permission: string;
|
|
964
|
+
role: string;
|
|
952
965
|
};
|
|
953
966
|
Update: {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
role?: Database["compliance"]["Enums"]["app_role"];
|
|
967
|
+
permission?: string;
|
|
968
|
+
role?: string;
|
|
957
969
|
};
|
|
958
970
|
Relationships: [];
|
|
959
971
|
};
|
|
@@ -1026,11 +1038,29 @@ export type Database = {
|
|
|
1026
1038
|
};
|
|
1027
1039
|
Relationships: [];
|
|
1028
1040
|
};
|
|
1041
|
+
user_roles: {
|
|
1042
|
+
Row: {
|
|
1043
|
+
created_at: string;
|
|
1044
|
+
id: number;
|
|
1045
|
+
name: string;
|
|
1046
|
+
};
|
|
1047
|
+
Insert: {
|
|
1048
|
+
created_at?: string;
|
|
1049
|
+
id?: number;
|
|
1050
|
+
name: string;
|
|
1051
|
+
};
|
|
1052
|
+
Update: {
|
|
1053
|
+
created_at?: string;
|
|
1054
|
+
id?: number;
|
|
1055
|
+
name?: string;
|
|
1056
|
+
};
|
|
1057
|
+
Relationships: [];
|
|
1058
|
+
};
|
|
1029
1059
|
};
|
|
1030
1060
|
Views: {
|
|
1031
1061
|
active_user_roles: {
|
|
1032
1062
|
Row: {
|
|
1033
|
-
app_role:
|
|
1063
|
+
app_role: string | null;
|
|
1034
1064
|
user_id: string | null;
|
|
1035
1065
|
};
|
|
1036
1066
|
Relationships: [];
|
|
@@ -1039,7 +1069,7 @@ export type Database = {
|
|
|
1039
1069
|
Functions: {
|
|
1040
1070
|
authorize: {
|
|
1041
1071
|
Args: {
|
|
1042
|
-
requested_permission:
|
|
1072
|
+
requested_permission: string;
|
|
1043
1073
|
};
|
|
1044
1074
|
Returns: boolean;
|
|
1045
1075
|
};
|
|
@@ -1063,7 +1093,7 @@ export type Database = {
|
|
|
1063
1093
|
p_birth_date: string;
|
|
1064
1094
|
p_nationality: string;
|
|
1065
1095
|
p_sex: Database["compliance"]["Enums"]["sex"];
|
|
1066
|
-
p_role:
|
|
1096
|
+
p_role: string;
|
|
1067
1097
|
p_middle_names?: string;
|
|
1068
1098
|
p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
|
|
1069
1099
|
p_pronouns?: Database["compliance"]["Enums"]["pronouns"][];
|
|
@@ -1222,12 +1252,6 @@ export type Database = {
|
|
|
1222
1252
|
};
|
|
1223
1253
|
Returns: undefined;
|
|
1224
1254
|
};
|
|
1225
|
-
validate_country_code: {
|
|
1226
|
-
Args: {
|
|
1227
|
-
country_code: string;
|
|
1228
|
-
};
|
|
1229
|
-
Returns: boolean;
|
|
1230
|
-
};
|
|
1231
1255
|
validate_pronouns: {
|
|
1232
1256
|
Args: {
|
|
1233
1257
|
pronouns: Database["compliance"]["Enums"]["pronouns"][];
|
|
@@ -1237,15 +1261,6 @@ export type Database = {
|
|
|
1237
1261
|
};
|
|
1238
1262
|
Enums: {
|
|
1239
1263
|
account_type: "player" | "lounge";
|
|
1240
|
-
app_permission:
|
|
1241
|
-
| "players.player"
|
|
1242
|
-
| "lounges.superuser"
|
|
1243
|
-
| "lounges.manager"
|
|
1244
|
-
| "lounges.desk"
|
|
1245
|
-
| "lounges.inventory"
|
|
1246
|
-
| "lounges.kitchen"
|
|
1247
|
-
| "lounges.human_resources";
|
|
1248
|
-
app_role: "player" | "lounge_superuser";
|
|
1249
1264
|
data_update_request_status: "pending" | "approved" | "rejected" | "cancelled";
|
|
1250
1265
|
gender_identity: "cisgender" | "transgender" | "nonbinary";
|
|
1251
1266
|
id_type: "national" | "alien" | "passport" | "driver_licence";
|
package/types/database.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Database as DatabaseGenerated } from "./database-generated";
|
|
2
2
|
import type {
|
|
3
3
|
AccountType,
|
|
4
|
-
AppRole,
|
|
5
4
|
BranchAddressObject,
|
|
6
5
|
BranchAmenitiesObject,
|
|
7
6
|
CompanyInformationUpdateJson,
|
|
@@ -87,32 +86,32 @@ export type Database = MergeDeep<
|
|
|
87
86
|
};
|
|
88
87
|
lounge_company_verification_attempts: {
|
|
89
88
|
Row: {
|
|
90
|
-
company_data: Omit<CompanyVerificationDataObject, "companyNumber" | "
|
|
89
|
+
company_data: Omit<CompanyVerificationDataObject, "companyNumber" | "countryCode">;
|
|
91
90
|
};
|
|
92
91
|
Insert: {
|
|
93
|
-
company_data: Omit<CompanyVerificationDataObject, "companyNumber" | "
|
|
92
|
+
company_data: Omit<CompanyVerificationDataObject, "companyNumber" | "countryCode">;
|
|
94
93
|
};
|
|
95
94
|
Update: {
|
|
96
|
-
company_data?: Omit<CompanyVerificationDataObject, "companyNumber" | "
|
|
95
|
+
company_data?: Omit<CompanyVerificationDataObject, "companyNumber" | "countryCode">;
|
|
97
96
|
};
|
|
98
97
|
};
|
|
99
98
|
lounge_staff: {
|
|
100
99
|
Row: {
|
|
101
100
|
gender_identity: GenderIdentity | null;
|
|
102
101
|
pronouns: PronounsItem[] | null;
|
|
103
|
-
role:
|
|
102
|
+
role: string;
|
|
104
103
|
sex: Sex;
|
|
105
104
|
};
|
|
106
105
|
Insert: {
|
|
107
106
|
gender_identity?: GenderIdentity | null;
|
|
108
107
|
pronouns?: PronounsItem[] | null;
|
|
109
|
-
role:
|
|
108
|
+
role: string;
|
|
110
109
|
sex?: Sex;
|
|
111
110
|
};
|
|
112
111
|
Update: {
|
|
113
112
|
gender_identity?: GenderIdentity | null;
|
|
114
113
|
pronouns?: PronounsItem[] | null;
|
|
115
|
-
role?:
|
|
114
|
+
role?: string;
|
|
116
115
|
sex?: Sex;
|
|
117
116
|
};
|
|
118
117
|
};
|
|
@@ -220,7 +219,7 @@ export type Database = MergeDeep<
|
|
|
220
219
|
create_lounge_staff: {
|
|
221
220
|
Args: {
|
|
222
221
|
p_sex: Sex;
|
|
223
|
-
p_role?:
|
|
222
|
+
p_role?: string;
|
|
224
223
|
p_gender_identity?: GenderIdentity;
|
|
225
224
|
p_pronouns?: PronounsItem[];
|
|
226
225
|
};
|
package/types/public/auth.d.ts
CHANGED
|
@@ -4,8 +4,6 @@ import type { Database } from "../database";
|
|
|
4
4
|
/* GENERAL */
|
|
5
5
|
export type AccountType = "player" | "lounge";
|
|
6
6
|
|
|
7
|
-
export type AppRole = Database["compliance"]["Enums"]["app_role"] | null;
|
|
8
|
-
|
|
9
7
|
export interface AuthenticationJWT {
|
|
10
8
|
aud: string;
|
|
11
9
|
exp: number;
|
|
@@ -16,7 +14,7 @@ export interface AuthenticationJWT {
|
|
|
16
14
|
app_metadata: {
|
|
17
15
|
provider: string;
|
|
18
16
|
providers: string[];
|
|
19
|
-
role:
|
|
17
|
+
role: string;
|
|
20
18
|
};
|
|
21
19
|
user_metadata: {
|
|
22
20
|
email_verified: boolean;
|
|
@@ -46,7 +44,7 @@ export interface IGDBPlatformsResponse {
|
|
|
46
44
|
platform_family: number;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
|
-
export type UserWithRole = User & { app_metadata: { role:
|
|
47
|
+
export type UserWithRole = User & { app_metadata: { role: string } };
|
|
50
48
|
|
|
51
49
|
/* REGISTRATION */
|
|
52
50
|
export type PlayerRegistrationStep = Database["compliance"]["Enums"]["registration_step"];
|
|
@@ -294,7 +292,8 @@ export interface CompanyPerson {
|
|
|
294
292
|
number: string;
|
|
295
293
|
}
|
|
296
294
|
|
|
297
|
-
export interface
|
|
295
|
+
export interface RawCompanyVerificationDataObject {
|
|
296
|
+
attemptId: string;
|
|
298
297
|
companyName: string;
|
|
299
298
|
companyNumber: string;
|
|
300
299
|
companyType: string;
|
|
@@ -304,6 +303,10 @@ export interface CompanyVerificationDataObject {
|
|
|
304
303
|
persons: CompanyPerson[];
|
|
305
304
|
}
|
|
306
305
|
|
|
306
|
+
export type CompanyVerificationLogDataObject = Omit<CompanyVerificationDataObject, "attemptId" | "companyNumber" | "countryCode">;
|
|
307
|
+
|
|
308
|
+
export type CompanyVerificationDataObject = Omit<RawCompanyVerificationDataObject, "attemptId">;
|
|
309
|
+
|
|
307
310
|
export interface CompanyInformationObject {
|
|
308
311
|
companyName: string;
|
|
309
312
|
dateOfRegistration: string;
|