@koloseum/types 0.2.1 → 0.2.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.
@@ -1185,9 +1185,9 @@ export type Database = {
1185
1185
  };
1186
1186
  check_annual_update_limit: {
1187
1187
  Args: {
1188
- p_user_id: string;
1189
- p_account_type: Database["compliance"]["Enums"]["account_type"];
1190
1188
  p_field: string;
1189
+ p_account_type: Database["compliance"]["Enums"]["account_type"];
1190
+ p_user_id: string;
1191
1191
  };
1192
1192
  Returns: boolean;
1193
1193
  };
@@ -1197,44 +1197,44 @@ export type Database = {
1197
1197
  };
1198
1198
  create_lounge: {
1199
1199
  Args: {
1200
- p_company_name: string;
1201
- p_registration_date: string;
1202
- p_trade_name?: string;
1203
- p_website?: string;
1204
- p_phone?: string;
1205
1200
  p_email?: string;
1201
+ p_phone?: string;
1202
+ p_website?: string;
1203
+ p_trade_name?: string;
1204
+ p_registration_date: string;
1205
+ p_company_name: string;
1206
1206
  };
1207
1207
  Returns: string;
1208
1208
  };
1209
1209
  create_player: {
1210
1210
  Args: {
1211
+ p_nationality: string;
1212
+ p_middle_names?: string;
1213
+ p_show_pronouns?: boolean;
1214
+ p_pronouns?: Database["compliance"]["Enums"]["pronouns"][];
1215
+ p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
1216
+ p_show_birth_date?: boolean;
1217
+ p_pseudonym?: string;
1211
1218
  p_first_name: string;
1212
1219
  p_last_name: string;
1213
1220
  p_birth_date: string;
1214
- p_nationality: string;
1215
1221
  p_sex: Database["compliance"]["Enums"]["sex"];
1216
- p_middle_names?: string;
1217
- p_pseudonym?: string;
1218
- p_show_birth_date?: boolean;
1219
- p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
1220
- p_pronouns?: Database["compliance"]["Enums"]["pronouns"][];
1221
- p_show_pronouns?: boolean;
1222
1222
  };
1223
1223
  Returns: string;
1224
1224
  };
1225
1225
  create_player_minor_rep: {
1226
1226
  Args: {
1227
- p_phone: string;
1228
- p_first_name: string;
1229
- p_last_name: string;
1230
- p_birth_date: string;
1227
+ p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
1228
+ p_other_relation?: string;
1231
1229
  p_nationality: string;
1232
1230
  p_sex: Database["compliance"]["Enums"]["sex"];
1233
1231
  p_relation: Database["compliance"]["Enums"]["minor_relation"];
1234
1232
  p_middle_names?: string;
1235
- p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
1236
1233
  p_pronouns?: Database["compliance"]["Enums"]["pronouns"][];
1237
- p_other_relation?: string;
1234
+ p_phone: string;
1235
+ p_first_name: string;
1236
+ p_last_name: string;
1237
+ p_birth_date: string;
1238
1238
  };
1239
1239
  Returns: string;
1240
1240
  };
@@ -1259,15 +1259,15 @@ export type Database = {
1259
1259
  input_string: string;
1260
1260
  };
1261
1261
  Returns: {
1262
- first_name: string;
1263
1262
  middle_names: string;
1263
+ first_name: string;
1264
1264
  last_name: string;
1265
1265
  }[];
1266
1266
  };
1267
1267
  generate_platform_id: {
1268
1268
  Args: {
1269
- account_type: Database["compliance"]["Enums"]["account_type"];
1270
1269
  is_for_staff?: boolean;
1270
+ account_type: Database["compliance"]["Enums"]["account_type"];
1271
1271
  is_for_branch?: boolean;
1272
1272
  };
1273
1273
  Returns: string;
@@ -1282,13 +1282,13 @@ export type Database = {
1282
1282
  is_for_minor_rep?: boolean;
1283
1283
  };
1284
1284
  Returns: {
1285
- id: string;
1286
1285
  account_type: Database["compliance"]["Enums"]["account_type"];
1287
- updates: Json;
1288
1286
  status: Database["compliance"]["Enums"]["data_update_request_status"];
1287
+ updates: Json;
1289
1288
  rejection_reason: string;
1290
1289
  created_at: string;
1291
1290
  updated_at: string;
1291
+ id: string;
1292
1292
  }[];
1293
1293
  };
1294
1294
  get_data_updates: {
@@ -1297,10 +1297,10 @@ export type Database = {
1297
1297
  is_for_minor_rep?: boolean;
1298
1298
  };
1299
1299
  Returns: {
1300
- id: string;
1301
1300
  account_type: Database["compliance"]["Enums"]["account_type"];
1302
- updates: Json;
1303
1301
  created_at: string;
1302
+ id: string;
1303
+ updates: Json;
1304
1304
  }[];
1305
1305
  };
1306
1306
  get_lounge_branches: {
@@ -1344,11 +1344,11 @@ export type Database = {
1344
1344
  p_player_id: string;
1345
1345
  };
1346
1346
  Returns: {
1347
- institution_code: string;
1348
- institution_name: string;
1349
1347
  enrollment_year: number;
1350
- exit_year: number;
1351
1348
  graduated: boolean;
1349
+ exit_year: number;
1350
+ institution_code: string;
1351
+ institution_name: string;
1352
1352
  }[];
1353
1353
  };
1354
1354
  get_user_phone: {
@@ -1359,34 +1359,27 @@ export type Database = {
1359
1359
  };
1360
1360
  is_current_user_permanent: {
1361
1361
  Args: {
1362
- user_id: string;
1363
1362
  user_is_anonymous?: boolean;
1364
- };
1365
- Returns: boolean;
1366
- };
1367
- is_user_permanent: {
1368
- Args: {
1369
1363
  user_id: string;
1370
- user_is_anonymous?: boolean;
1371
1364
  };
1372
1365
  Returns: boolean;
1373
1366
  };
1374
1367
  link_existing_minor_rep: {
1375
1368
  Args: {
1376
- p_user_id: string;
1377
1369
  p_minor_relation: Database["compliance"]["Enums"]["minor_relation"];
1370
+ p_user_id: string;
1378
1371
  p_other_relation: string;
1379
1372
  };
1380
1373
  Returns: undefined;
1381
1374
  };
1382
1375
  log_phone_verification: {
1383
1376
  Args: {
1384
- p_twilio_sid: string;
1385
- p_status: Database["compliance"]["Enums"]["twilio_verification_status"];
1386
1377
  p_updated_at: string;
1387
- p_phone?: string;
1388
1378
  p_send_code_attempts?: Json;
1389
1379
  p_created_at?: string;
1380
+ p_twilio_sid: string;
1381
+ p_status: Database["compliance"]["Enums"]["twilio_verification_status"];
1382
+ p_phone?: string;
1390
1383
  };
1391
1384
  Returns: undefined;
1392
1385
  };
@@ -1396,9 +1389,9 @@ export type Database = {
1396
1389
  search_type?: string;
1397
1390
  };
1398
1391
  Returns: {
1392
+ company_name: string;
1399
1393
  id: string;
1400
1394
  user_id: string;
1401
- company_name: string;
1402
1395
  registration_date: string;
1403
1396
  trade_name: string;
1404
1397
  website: string;
@@ -1412,34 +1405,34 @@ export type Database = {
1412
1405
  enforce_preferences?: boolean;
1413
1406
  };
1414
1407
  Returns: {
1408
+ created_at: string;
1409
+ nationality: string;
1410
+ pseudonym: string;
1411
+ pronouns: Database["compliance"]["Enums"]["pronouns"][];
1415
1412
  id: string;
1416
1413
  user_id: string;
1417
1414
  first_name: string;
1418
1415
  middle_names: string;
1419
1416
  last_name: string;
1420
1417
  birth_date: string;
1421
- nationality: string;
1422
- pseudonym: string;
1423
- pronouns: Database["compliance"]["Enums"]["pronouns"][];
1424
- created_at: string;
1425
1418
  }[];
1426
1419
  };
1427
1420
  submit_gaming_and_socials_data: {
1428
1421
  Args: {
1429
- p_primary_platform: Json;
1430
- p_consoles: Json[];
1431
1422
  p_socials: Json[];
1423
+ p_consoles: Json[];
1424
+ p_primary_platform: Json;
1432
1425
  };
1433
1426
  Returns: undefined;
1434
1427
  };
1435
1428
  validate_data_update_log_fields: {
1436
1429
  Args: {
1430
+ p_new_record?: Record<string, unknown>;
1437
1431
  p_account_type: Database["compliance"]["Enums"]["account_type"];
1438
1432
  p_is_for_minor_rep: boolean;
1439
1433
  p_is_for_branch: boolean;
1440
1434
  p_user_id?: string;
1441
1435
  p_old_record?: Record<string, unknown>;
1442
- p_new_record?: Record<string, unknown>;
1443
1436
  };
1444
1437
  Returns: undefined;
1445
1438
  };
@@ -1477,10 +1470,10 @@ export type Database = {
1477
1470
  Functions: {
1478
1471
  graphql: {
1479
1472
  Args: {
1480
- operationName?: string;
1481
- query?: string;
1482
1473
  variables?: Json;
1474
+ operationName?: string;
1483
1475
  extensions?: Json;
1476
+ query?: string;
1484
1477
  };
1485
1478
  Returns: Json;
1486
1479
  };
@@ -1698,10 +1691,10 @@ export type Database = {
1698
1691
  search_type?: string;
1699
1692
  };
1700
1693
  Returns: {
1694
+ created_at: string;
1701
1695
  id: string;
1702
1696
  name: string;
1703
1697
  registration_date: string;
1704
- created_at: string;
1705
1698
  }[];
1706
1699
  };
1707
1700
  search_active_players: {
@@ -1710,15 +1703,15 @@ export type Database = {
1710
1703
  search_type?: string;
1711
1704
  };
1712
1705
  Returns: {
1706
+ birth_date: string;
1707
+ pseudonym: string;
1708
+ created_at: string;
1713
1709
  id: string;
1714
1710
  first_name: string;
1711
+ pronouns: Database["compliance"]["Enums"]["pronouns"][];
1712
+ nationality: string;
1715
1713
  middle_names: string;
1716
1714
  last_name: string;
1717
- birth_date: string;
1718
- nationality: string;
1719
- pseudonym: string;
1720
- pronouns: Database["compliance"]["Enums"]["pronouns"][];
1721
- created_at: string;
1722
1715
  }[];
1723
1716
  };
1724
1717
  };
@@ -1991,8 +1984,8 @@ export type Database = {
1991
1984
  next_upload_token?: string;
1992
1985
  };
1993
1986
  Returns: {
1994
- key: string;
1995
1987
  id: string;
1988
+ key: string;
1996
1989
  created_at: string;
1997
1990
  }[];
1998
1991
  };
@@ -2018,22 +2011,22 @@ export type Database = {
2018
2011
  };
2019
2012
  search: {
2020
2013
  Args: {
2014
+ sortorder?: string;
2021
2015
  prefix: string;
2022
- bucketname: string;
2023
- limits?: number;
2024
- levels?: number;
2025
- offsets?: number;
2026
- search?: string;
2027
2016
  sortcolumn?: string;
2028
- sortorder?: string;
2017
+ search?: string;
2018
+ offsets?: number;
2019
+ levels?: number;
2020
+ limits?: number;
2021
+ bucketname: string;
2029
2022
  };
2030
2023
  Returns: {
2031
- name: string;
2032
- id: string;
2033
- updated_at: string;
2034
2024
  created_at: string;
2035
- last_accessed_at: string;
2025
+ updated_at: string;
2026
+ id: string;
2027
+ name: string;
2036
2028
  metadata: Json;
2029
+ last_accessed_at: string;
2037
2030
  }[];
2038
2031
  };
2039
2032
  };
@@ -1,6 +1,6 @@
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
4
  import { MergeDeep } from "type-fest";
5
5
  export type Database = MergeDeep<DatabaseGenerated, {
6
6
  compliance: {
@@ -21,48 +21,33 @@ export type Database = MergeDeep<DatabaseGenerated, {
21
21
  };
22
22
  data_update_requests: {
23
23
  Row: {
24
- account_type: AccountType & "player";
25
- updates: PersonalDataUpdateRequestJson;
26
- } | {
27
- account_type: AccountType & "lounge";
28
- updates: CompanyInformationUpdateJson;
24
+ account_type: AccountType;
25
+ status: DataUpdateRequestStatus;
26
+ updates: PersonalDataUpdateRequestJson | CompanyInformationUpdateRequestJson;
29
27
  };
30
28
  Insert: {
31
- account_type: AccountType & "player";
32
- updates: PersonalDataUpdateRequestJson;
33
- } | {
34
- account_type: AccountType & "lounge";
35
- updates: CompanyInformationUpdateJson;
29
+ account_type: AccountType;
30
+ status?: DataUpdateRequestStatus;
31
+ updates: PersonalDataUpdateRequestJson | CompanyInformationUpdateRequestJson;
36
32
  };
37
33
  Update: {
38
- account_type: AccountType & "player";
39
- updates: PersonalDataUpdateRequestJson;
40
- } | {
41
- account_type: AccountType & "lounge";
42
- updates: CompanyInformationUpdateJson;
34
+ account_type?: AccountType;
35
+ status?: DataUpdateRequestStatus;
36
+ updates?: PersonalDataUpdateRequestJson | CompanyInformationUpdateRequestJson;
43
37
  };
44
38
  };
45
39
  data_updates: {
46
40
  Row: {
47
- account_type: AccountType & "player";
48
- updates: PersonalDataUpdateRequestJson;
49
- } | {
50
- account_type: AccountType & "lounge";
51
- updates: CompanyInformationUpdateJson;
41
+ account_type: AccountType;
42
+ updates: PersonalDataUpdateJson | CompanyInformationUpdateJson;
52
43
  };
53
44
  Insert: {
54
- account_type: AccountType & "player";
55
- updates: PersonalDataUpdateRequestJson;
56
- } | {
57
- account_type: AccountType & "lounge";
58
- updates: CompanyInformationUpdateJson;
45
+ account_type: AccountType;
46
+ updates: PersonalDataUpdateRequestJson | CompanyInformationUpdateJson;
59
47
  };
60
48
  Update: {
61
- account_type: AccountType & "player";
62
- updates: PersonalDataUpdateRequestJson;
63
- } | {
64
- account_type: AccountType & "lounge";
65
- updates: CompanyInformationUpdateJson;
49
+ account_type?: AccountType;
50
+ updates?: PersonalDataUpdateRequestJson | CompanyInformationUpdateJson;
66
51
  };
67
52
  };
68
53
  lounge_branches: {
@@ -229,7 +214,7 @@ export type Database = MergeDeep<DatabaseGenerated, {
229
214
  user_id: string;
230
215
  }[];
231
216
  };
232
- gen_platform_id: {
217
+ generate_platform_id: {
233
218
  Args: {
234
219
  account_type: AccountType;
235
220
  };
@@ -265,6 +250,9 @@ export type Database = MergeDeep<DatabaseGenerated, {
265
250
  user_id: string | null;
266
251
  };
267
252
  };
253
+ get_minor_rep_phone: {
254
+ Returns: string | null;
255
+ };
268
256
  get_player_ids: {
269
257
  Returns: {
270
258
  player_id: string;
@@ -277,7 +265,7 @@ export type Database = MergeDeep<DatabaseGenerated, {
277
265
  p_other_relation: string | null;
278
266
  };
279
267
  };
280
- log_minor_rep_phone_verification: {
268
+ log_phone_verification: {
281
269
  Args: {
282
270
  p_status: PhoneOTPRequestStatus;
283
271
  p_updated_at: Date;
@@ -285,9 +273,6 @@ export type Database = MergeDeep<DatabaseGenerated, {
285
273
  p_created_at?: Date;
286
274
  };
287
275
  };
288
- minor_rep_phone: {
289
- Returns: string | null;
290
- };
291
276
  search_players: {
292
277
  Returns: {
293
278
  id: string;
@@ -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">;
@@ -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.1",
3
+ "version": "0.2.3",
4
4
  "author": "Koloseum Technologies Limited",
5
5
  "type": "module",
6
6
  "description": "Type definitions for use across web apps (TypeScript)",