Compare commits
50 Commits
d483a245f8
...
3.x
| Author | SHA1 | Date | |
|---|---|---|---|
| 8774d93f9e | |||
| a08414717d | |||
| bc1911e26d | |||
|
|
a22c15da0d | ||
| f63ab127ab | |||
| 1d4fb2f180 | |||
| c5a3f47a4f | |||
| 63998a9859 | |||
| 4301da7dae | |||
| d7a3e9d790 | |||
| ac2751c2fd | |||
| d400a74e59 | |||
| dfb68e99b5 | |||
| 04df85bdbc | |||
| 78f6673179 | |||
| 60cc76c3c8 | |||
| 4f1f3e26e5 | |||
| 99cfb97e3c | |||
| cff48d1e96 | |||
| dfa40e5397 | |||
| c08588d5e8 | |||
| 0b212e701b | |||
| 8dd92f32b7 | |||
| 8b8fe1402b | |||
| 2abc690bf9 | |||
| 5937c0cc5b | |||
| df4ab60ee0 | |||
| e1397d781c | |||
| 696c3577a7 | |||
| c538aed244 | |||
| a75edc31e1 | |||
| b4a9bdb1d4 | |||
| 1fea26987e | |||
| 209775f968 | |||
| c2db3785e1 | |||
| 67a999796a | |||
| 6e533bd945 | |||
| eb9f59cd31 | |||
| d13248277f | |||
| 40aa20e96f | |||
| 19ec1fa701 | |||
| cc2c4bc8d3 | |||
| d1c1abaf65 | |||
| 41478c893e | |||
| 233190f578 | |||
| 871d41962c | |||
| 0daedc28dc | |||
| 4092b128bc | |||
| 7ee9b2dc24 | |||
| 927e9d4e36 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@mtlsz/common",
|
||||
"version": "1.0.0",
|
||||
"version": "3.3.8",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@mtlsz/common",
|
||||
"version": "1.0.0",
|
||||
"version": "3.3.8",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"typescript": "^5.8.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mtlsz/common",
|
||||
"version": "1.0.2",
|
||||
"version": "3.4.2",
|
||||
"description": "MTLSZ frontend packages",
|
||||
"main": "dist/index.ts",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
51
src/index.ts
51
src/index.ts
@@ -1,17 +1,34 @@
|
||||
export * from './interfaces/club';
|
||||
export * from './interfaces/player';
|
||||
export * from './interfaces/api-pagination';
|
||||
export * from './interfaces/api-result';
|
||||
export * from './interfaces/category';
|
||||
export * from './interfaces/entry';
|
||||
export * from './interfaces/in-memory-cache';
|
||||
export * from './interfaces/official';
|
||||
export * from './interfaces/pagination';
|
||||
export * from './interfaces/ranking-entry';
|
||||
export * from './interfaces/ranking';
|
||||
export * from './interfaces/system-data';
|
||||
export * from './interfaces/team-administrator';
|
||||
export * from './interfaces/team-category';
|
||||
export * from './interfaces/team-entry';
|
||||
export * from './interfaces/team';
|
||||
export * from './interfaces/tournament';
|
||||
export * from "./interfaces/club";
|
||||
export * from "./interfaces/player";
|
||||
export * from "./interfaces/api-pagination";
|
||||
export * from "./interfaces/api-result";
|
||||
export * from "./interfaces/category";
|
||||
export * from "./interfaces/entry";
|
||||
export * from "./interfaces/in-memory-cache";
|
||||
export * from "./interfaces/official";
|
||||
export * from "./interfaces/pagination";
|
||||
export * from "./interfaces/ranking-entry";
|
||||
export * from "./interfaces/ranking";
|
||||
export * from "./interfaces/system-data";
|
||||
export * from "./interfaces/team-administrator";
|
||||
export * from "./interfaces/team-category";
|
||||
export * from "./interfaces/team-entry";
|
||||
export * from "./interfaces/team";
|
||||
export * from "./interfaces/tournament";
|
||||
export * from "./interfaces/guest-player-request";
|
||||
export * from "./interfaces/guest-player-from-other-country-request";
|
||||
export * from "./interfaces/single-tournament";
|
||||
export * from "./interfaces/team-championship";
|
||||
export * from "./interfaces/tag";
|
||||
export * from "./interfaces/role";
|
||||
export * from "./interfaces/confirmation-request";
|
||||
export * from "./interfaces/confirmation-request/adult-confirmation-request";
|
||||
export * from "./interfaces/confirmation-request/official-confirmation-request";
|
||||
export * from "./interfaces/confirmation-request/player-confirmation-request";
|
||||
export * from "./interfaces/confirmation-request/team-admin-confirmation-request";
|
||||
export * from "./interfaces/confirmation-request/team-manager-confirmation-request";
|
||||
export * from "./interfaces/confirmation-requests";
|
||||
export * from "./interfaces/generic-user";
|
||||
export * from "./interfaces/adult";
|
||||
export * from "./interfaces/team-manager";
|
||||
export * from "./interfaces/confirmation-request/confirmation-request-status";
|
||||
|
||||
7
src/interfaces/adult.ts
Normal file
7
src/interfaces/adult.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { GenericUser } from "./generic-user";
|
||||
import { Player } from "./player";
|
||||
|
||||
export interface Adult extends GenericUser {
|
||||
id?: number;
|
||||
kids: Player[];
|
||||
}
|
||||
@@ -8,5 +8,6 @@ export interface Category {
|
||||
gender: string;
|
||||
class: number;
|
||||
age?: string;
|
||||
allowedFrom: number | null;
|
||||
priority: number;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,5 @@ export interface Club {
|
||||
address?: string;
|
||||
phone?: string;
|
||||
active: boolean;
|
||||
hasManager?: boolean;
|
||||
}
|
||||
25
src/interfaces/confirmation-request.ts
Normal file
25
src/interfaces/confirmation-request.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { AdultConfirmationRequest } from "./confirmation-request/adult-confirmation-request";
|
||||
import { OfficialConfirmationRequest } from "./confirmation-request/official-confirmation-request";
|
||||
import { PlayerConfirmationRequest } from "./confirmation-request/player-confirmation-request";
|
||||
import { TeamAdminConfirmationRequest } from "./confirmation-request/team-admin-confirmation-request";
|
||||
import { TeamManagerConfirmationRequest } from "./confirmation-request/team-manager-confirmation-request";
|
||||
|
||||
export interface ConfirmationRequest {
|
||||
id: number;
|
||||
status: number;
|
||||
roleString: string;
|
||||
lastName: string | null;
|
||||
firstName: string | null;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
keycloakUserId: string | null;
|
||||
entity:
|
||||
| PlayerConfirmationRequest
|
||||
| AdultConfirmationRequest
|
||||
| TeamManagerConfirmationRequest
|
||||
| TeamAdminConfirmationRequest
|
||||
| OfficialConfirmationRequest;
|
||||
canBeRevoked: boolean | null;
|
||||
hasMissingData: boolean | null;
|
||||
createdAt: string | null;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Player } from "../player";
|
||||
|
||||
export interface AdultConfirmationRequest {
|
||||
id?: number;
|
||||
kids: Player[];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const enum ConfirmationRequestStatus {
|
||||
PENDING = 1,
|
||||
APPROVED = 2,
|
||||
DECLINED = 3,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface OfficialConfirmationRequest {
|
||||
id?: number;
|
||||
referee: boolean;
|
||||
umpire: boolean;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Club } from "../club";
|
||||
|
||||
export interface PlayerConfirmationRequest {
|
||||
id?: number;
|
||||
club: Club;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { Club } from "../club";
|
||||
|
||||
export interface TeamAdminConfirmationRequest {
|
||||
id?: number;
|
||||
active: boolean;
|
||||
club: Club;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Club } from "../club";
|
||||
|
||||
export interface TeamManagerConfirmationRequest {
|
||||
id?: number;
|
||||
club: Club;
|
||||
}
|
||||
6
src/interfaces/confirmation-requests.ts
Normal file
6
src/interfaces/confirmation-requests.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { ConfirmationRequest } from "./confirmation-request";
|
||||
|
||||
export interface ConfirmationRequests {
|
||||
roles: ConfirmationRequest[];
|
||||
canAddNewRole: boolean;
|
||||
}
|
||||
7
src/interfaces/generic-user.ts
Normal file
7
src/interfaces/generic-user.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface GenericUser {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
email: string;
|
||||
phone: string | null;
|
||||
keycloakUserId?: string | null;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface GuestPlayerFromOtherCountryRequest {
|
||||
id?: number;
|
||||
lastName: string;
|
||||
firstName: string;
|
||||
gender: string;
|
||||
rankingSingles: number | null;
|
||||
rankingDoubles: number | null;
|
||||
rankingMixed: number | null;
|
||||
}
|
||||
11
src/interfaces/guest-player-request.ts
Normal file
11
src/interfaces/guest-player-request.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Player } from "./player";
|
||||
import { TeamEntry } from "./team-entry";
|
||||
|
||||
export interface GuestPlayerRequest {
|
||||
id: number;
|
||||
// aki kéri a playert
|
||||
applicant: TeamEntry;
|
||||
// a kért játékos
|
||||
requestedPlayer: Player;
|
||||
status: number;
|
||||
}
|
||||
@@ -1,10 +1,24 @@
|
||||
export interface Official {
|
||||
id?: number;
|
||||
name: string;
|
||||
email: string;
|
||||
phone?: string;
|
||||
/** @deprecated Use referee and umpire booleans instead */
|
||||
type?: number;
|
||||
referee: boolean;
|
||||
umpire: boolean;
|
||||
import { GenericUser } from "./generic-user";
|
||||
|
||||
export interface Official extends GenericUser {
|
||||
id?: number;
|
||||
/** @deprecated since 3.0.0. Use lastName and firstName instead */
|
||||
name?: string;
|
||||
/** @deprecated Use referee and umpire booleans instead */
|
||||
type?: number;
|
||||
referee: boolean;
|
||||
umpire: boolean;
|
||||
umpireLevel?: string;
|
||||
refereeLevel?: string;
|
||||
grade?: string;
|
||||
birthDate?: string;
|
||||
didUmpireExamAt?: string;
|
||||
didRefereeExamAt?: string;
|
||||
city?: string;
|
||||
shirtSize?: string;
|
||||
otherInfo?: string;
|
||||
tshirtCount?: number;
|
||||
hasCards?: boolean;
|
||||
hasCoin?: boolean;
|
||||
isJVB?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
import { Club } from "./club";
|
||||
import { GenericUser } from "./generic-user";
|
||||
import { RankingEntry } from "./ranking-entry";
|
||||
|
||||
export interface Player {
|
||||
id?: number;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
gender: string;
|
||||
birthDate: string;
|
||||
officialId?: number;
|
||||
club: Club;
|
||||
email?: string;
|
||||
keycloakUserId?: string;
|
||||
active?: boolean;
|
||||
export interface Player extends GenericUser {
|
||||
id?: number;
|
||||
gender: string;
|
||||
birthDate: string;
|
||||
birthPlace?: string | null;
|
||||
officialId?: number;
|
||||
club: Club;
|
||||
active?: boolean;
|
||||
licenceFrom?: string;
|
||||
licenceTo?: string;
|
||||
disabledBecauseRanking?: boolean;
|
||||
disabledBecauseSimilarEntry?: boolean;
|
||||
rankingEntries?: RankingEntry[];
|
||||
}
|
||||
|
||||
4
src/interfaces/role.ts
Normal file
4
src/interfaces/role.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface Role {
|
||||
role: string;
|
||||
status: number;
|
||||
}
|
||||
8
src/interfaces/single-tournament.ts
Normal file
8
src/interfaces/single-tournament.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Category } from "./category";
|
||||
import { Tournament } from "./tournament";
|
||||
|
||||
export interface SingleTournament extends Tournament {
|
||||
categories: Array<Category>;
|
||||
allowedWithoutPartner: boolean;
|
||||
allowedSimilarEntries: boolean;
|
||||
}
|
||||
4
src/interfaces/tag.ts
Normal file
4
src/interfaces/tag.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface Tag {
|
||||
id?: number;
|
||||
label: string;
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
import { Club } from "./club";
|
||||
import { GenericUser } from "./generic-user";
|
||||
|
||||
export interface TeamAdministrator {
|
||||
id?: number;
|
||||
keycloakId?: string;
|
||||
lastName: string;
|
||||
firstName: string;
|
||||
email: string;
|
||||
active?: boolean;
|
||||
club: Club;
|
||||
export interface TeamAdministrator extends GenericUser {
|
||||
id?: number;
|
||||
/** @deprecated since 3.0.0. Use keycloakUserId instead */
|
||||
keycloakId?: string;
|
||||
active?: boolean;
|
||||
club: Club;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Category } from "./category";
|
||||
|
||||
export interface TeamCategory {
|
||||
id?: number;
|
||||
name: string;
|
||||
class: number;
|
||||
gender: string;
|
||||
age?: string;
|
||||
categories?: Category[];
|
||||
}
|
||||
id?: number;
|
||||
name: string;
|
||||
gender: string;
|
||||
class: number;
|
||||
age: string | null;
|
||||
minMalePlayerCount: number | null;
|
||||
minFemalePlayerCount: number | null;
|
||||
maxNumberOfGuestPlayers: number | null;
|
||||
priority: number;
|
||||
}
|
||||
|
||||
6
src/interfaces/team-championship.ts
Normal file
6
src/interfaces/team-championship.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { TeamCategory } from "./team-category";
|
||||
import { Tournament } from "./tournament";
|
||||
|
||||
export interface TeamChampionship extends Tournament {
|
||||
teamCategories: Array<TeamCategory>;
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
import { Club } from "./club";
|
||||
import { Team } from "./team";
|
||||
import { TeamCategory } from "./team-category";
|
||||
import { Tournament } from "./tournament";
|
||||
import { TeamChampionship } from "./team-championship";
|
||||
|
||||
export interface TeamEntry {
|
||||
id?: number;
|
||||
sentBy: Club;
|
||||
status: number;
|
||||
category: TeamCategory;
|
||||
tournament: Tournament;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
team: Team;
|
||||
id?: number;
|
||||
sentBy: Club;
|
||||
teamChampionship: TeamChampionship;
|
||||
category: TeamCategory;
|
||||
team: Team;
|
||||
missingMalePlayerCount?: number;
|
||||
missingFemalePlayerCount?: number;
|
||||
canAddGuestPlayers: boolean;
|
||||
remainingGuestsCount?: number;
|
||||
}
|
||||
|
||||
7
src/interfaces/team-manager.ts
Normal file
7
src/interfaces/team-manager.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Club } from "./club";
|
||||
import { GenericUser } from "./generic-user";
|
||||
|
||||
export interface TeamManager extends GenericUser {
|
||||
id?: number;
|
||||
club: Club;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Category } from "./category";
|
||||
import { Club } from "./club";
|
||||
import { Official } from "./official";
|
||||
import { Tag } from "./tag";
|
||||
import { TeamCategory } from "./team-category";
|
||||
|
||||
export interface Tournament {
|
||||
@@ -10,8 +11,6 @@ export interface Tournament {
|
||||
dateTo?: string;
|
||||
entryDeadline?: string;
|
||||
entryOpenFrom?: string;
|
||||
categories: Array<Category>;
|
||||
teamCategories?: Array<TeamCategory>;
|
||||
/**
|
||||
* @deprecated use organizerName instead
|
||||
*/
|
||||
@@ -20,12 +19,11 @@ export interface Tournament {
|
||||
active: boolean;
|
||||
city?: string;
|
||||
onlyWithLicence: boolean;
|
||||
teamChampionship: boolean;
|
||||
allowedWithoutPartner: boolean;
|
||||
allowedSimilarEntries: boolean;
|
||||
entriesChecked?: boolean;
|
||||
referee: Official | null;
|
||||
deputyReferee: Official | null;
|
||||
drawUrl: string | null;
|
||||
notificationsSentAt?: Date | null;
|
||||
'@type'?: string;
|
||||
tags?: Tag[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user