50 Commits

Author SHA1 Message Date
8774d93f9e 3.4.2 2025-12-16 10:58:56 +01:00
a08414717d 3.4.1 2025-12-16 09:39:10 +01:00
bc1911e26d 3.4.0 2025-12-11 14:26:07 +01:00
Richard Toth
a22c15da0d 3.3.8 2025-12-01 13:42:02 +01:00
f63ab127ab 3.3.7 2025-09-26 13:37:05 +02:00
1d4fb2f180 3.3.6 2025-09-20 11:50:46 +02:00
c5a3f47a4f 3.3.5 2025-08-21 22:08:50 +02:00
63998a9859 3.3.4 2025-08-21 15:34:33 +02:00
4301da7dae 3.3.3 2025-08-19 16:35:13 +02:00
d7a3e9d790 3.3.2 2025-08-15 15:27:17 +02:00
ac2751c2fd 3.3.1 2025-08-02 15:10:46 +02:00
d400a74e59 3.3.0 2025-08-02 15:09:31 +02:00
dfb68e99b5 3.2.6 2025-08-01 18:00:52 +02:00
04df85bdbc 3.2.5 2025-08-01 18:00:33 +02:00
78f6673179 3.2.4 2025-08-01 16:06:50 +02:00
60cc76c3c8 3.2.3 2025-08-01 12:28:01 +02:00
4f1f3e26e5 3.2.2 2025-07-24 13:53:55 +02:00
99cfb97e3c merge 3.x 2025-07-23 20:42:10 +02:00
cff48d1e96 3.2.1 2025-07-23 20:37:50 +02:00
dfa40e5397 3.2.0 2025-07-23 20:37:50 +02:00
c08588d5e8 3.1.1 2025-07-23 20:37:48 +02:00
0b212e701b 3.1.0 2025-07-23 20:37:00 +02:00
8dd92f32b7 3.0.6 2025-07-23 20:37:00 +02:00
8b8fe1402b 3.0.5 2025-07-23 20:37:00 +02:00
2abc690bf9 3.0.4 2025-07-23 20:37:00 +02:00
5937c0cc5b 3.0.3 2025-07-23 20:37:00 +02:00
df4ab60ee0 3.0.2 2025-07-23 20:37:00 +02:00
e1397d781c 3.0.1 2025-07-23 20:37:00 +02:00
696c3577a7 3.0.0 2025-07-23 20:36:54 +02:00
c538aed244 3.2.1 2025-07-11 14:45:45 +02:00
a75edc31e1 3.2.0 2025-07-08 16:35:20 +02:00
b4a9bdb1d4 3.1.1 2025-07-06 18:59:19 +02:00
1fea26987e 3.1.0 2025-07-06 18:55:27 +02:00
209775f968 2.1.1 2025-06-15 22:29:49 +02:00
c2db3785e1 Merge pull request 'Export tag interface' (#3) from feature/tags2 into 2.x
Reviewed-on: #3
2025-06-15 20:28:46 +00:00
67a999796a Export tag interface 2025-06-15 20:28:46 +00:00
6e533bd945 2.1.0 2025-06-15 19:57:16 +02:00
eb9f59cd31 Merge pull request 'Add Tag interface' (#2) from feature/tags2 into 2.x
Reviewed-on: #2
2025-06-15 17:52:52 +00:00
d13248277f Add Tag interface 2025-06-15 18:47:37 +01:00
40aa20e96f 3.0.6 2025-06-06 16:54:26 +02:00
19ec1fa701 3.0.5 2025-06-06 16:40:57 +02:00
cc2c4bc8d3 3.0.4 2025-05-06 13:33:58 +02:00
d1c1abaf65 3.0.3 2025-04-11 12:14:40 +02:00
41478c893e 3.0.2 2025-04-11 12:01:16 +02:00
233190f578 3.0.1 2025-04-11 11:55:47 +02:00
871d41962c 3.0.0 2025-04-11 11:40:09 +02:00
0daedc28dc update to v2 2025-03-22 14:12:21 +01:00
4092b128bc finalize v1.0.4 2025-03-21 17:05:15 +01:00
7ee9b2dc24 set version number 2025-03-21 16:40:09 +01:00
927e9d4e36 fix: add missing fields for mtlsz-public 2025-03-21 16:39:35 +01:00
28 changed files with 236 additions and 71 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@mtlsz/common", "name": "@mtlsz/common",
"version": "1.0.0", "version": "3.3.8",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@mtlsz/common", "name": "@mtlsz/common",
"version": "1.0.0", "version": "3.3.8",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"typescript": "^5.8.2" "typescript": "^5.8.2"

View File

@@ -1,6 +1,6 @@
{ {
"name": "@mtlsz/common", "name": "@mtlsz/common",
"version": "1.0.2", "version": "3.4.2",
"description": "MTLSZ frontend packages", "description": "MTLSZ frontend packages",
"main": "dist/index.ts", "main": "dist/index.ts",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@@ -1,17 +1,34 @@
export * from './interfaces/club'; export * from "./interfaces/club";
export * from './interfaces/player'; export * from "./interfaces/player";
export * from './interfaces/api-pagination'; export * from "./interfaces/api-pagination";
export * from './interfaces/api-result'; export * from "./interfaces/api-result";
export * from './interfaces/category'; export * from "./interfaces/category";
export * from './interfaces/entry'; export * from "./interfaces/entry";
export * from './interfaces/in-memory-cache'; export * from "./interfaces/in-memory-cache";
export * from './interfaces/official'; export * from "./interfaces/official";
export * from './interfaces/pagination'; export * from "./interfaces/pagination";
export * from './interfaces/ranking-entry'; export * from "./interfaces/ranking-entry";
export * from './interfaces/ranking'; export * from "./interfaces/ranking";
export * from './interfaces/system-data'; export * from "./interfaces/system-data";
export * from './interfaces/team-administrator'; export * from "./interfaces/team-administrator";
export * from './interfaces/team-category'; export * from "./interfaces/team-category";
export * from './interfaces/team-entry'; export * from "./interfaces/team-entry";
export * from './interfaces/team'; export * from "./interfaces/team";
export * from './interfaces/tournament'; 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
View File

@@ -0,0 +1,7 @@
import { GenericUser } from "./generic-user";
import { Player } from "./player";
export interface Adult extends GenericUser {
id?: number;
kids: Player[];
}

View File

@@ -8,5 +8,6 @@ export interface Category {
gender: string; gender: string;
class: number; class: number;
age?: string; age?: string;
allowedFrom: number | null;
priority: number; priority: number;
} }

View File

@@ -9,4 +9,5 @@ export interface Club {
address?: string; address?: string;
phone?: string; phone?: string;
active: boolean; active: boolean;
hasManager?: boolean;
} }

View 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;
}

View File

@@ -0,0 +1,6 @@
import { Player } from "../player";
export interface AdultConfirmationRequest {
id?: number;
kids: Player[];
}

View File

@@ -0,0 +1,5 @@
export const enum ConfirmationRequestStatus {
PENDING = 1,
APPROVED = 2,
DECLINED = 3,
}

View File

@@ -0,0 +1,5 @@
export interface OfficialConfirmationRequest {
id?: number;
referee: boolean;
umpire: boolean;
}

View File

@@ -0,0 +1,6 @@
import { Club } from "../club";
export interface PlayerConfirmationRequest {
id?: number;
club: Club;
}

View File

@@ -0,0 +1,7 @@
import { Club } from "../club";
export interface TeamAdminConfirmationRequest {
id?: number;
active: boolean;
club: Club;
}

View File

@@ -0,0 +1,6 @@
import { Club } from "../club";
export interface TeamManagerConfirmationRequest {
id?: number;
club: Club;
}

View File

@@ -0,0 +1,6 @@
import { ConfirmationRequest } from "./confirmation-request";
export interface ConfirmationRequests {
roles: ConfirmationRequest[];
canAddNewRole: boolean;
}

View File

@@ -0,0 +1,7 @@
export interface GenericUser {
firstName: string;
lastName: string;
email: string;
phone: string | null;
keycloakUserId?: string | null;
}

View File

@@ -0,0 +1,9 @@
export interface GuestPlayerFromOtherCountryRequest {
id?: number;
lastName: string;
firstName: string;
gender: string;
rankingSingles: number | null;
rankingDoubles: number | null;
rankingMixed: number | null;
}

View 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;
}

View File

@@ -1,10 +1,24 @@
export interface Official { import { GenericUser } from "./generic-user";
id?: number;
name: string; export interface Official extends GenericUser {
email: string; id?: number;
phone?: string; /** @deprecated since 3.0.0. Use lastName and firstName instead */
/** @deprecated Use referee and umpire booleans instead */ name?: string;
type?: number; /** @deprecated Use referee and umpire booleans instead */
referee: boolean; type?: number;
umpire: boolean; 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;
} }

View File

@@ -1,14 +1,18 @@
import { Club } from "./club"; import { Club } from "./club";
import { GenericUser } from "./generic-user";
import { RankingEntry } from "./ranking-entry";
export interface Player { export interface Player extends GenericUser {
id?: number; id?: number;
firstName: string; gender: string;
lastName: string; birthDate: string;
gender: string; birthPlace?: string | null;
birthDate: string; officialId?: number;
officialId?: number; club: Club;
club: Club; active?: boolean;
email?: string; licenceFrom?: string;
keycloakUserId?: string; licenceTo?: string;
active?: boolean; disabledBecauseRanking?: boolean;
disabledBecauseSimilarEntry?: boolean;
rankingEntries?: RankingEntry[];
} }

4
src/interfaces/role.ts Normal file
View File

@@ -0,0 +1,4 @@
export interface Role {
role: string;
status: number;
}

View 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
View File

@@ -0,0 +1,4 @@
export interface Tag {
id?: number;
label: string;
}

View File

@@ -1,11 +1,10 @@
import { Club } from "./club"; import { Club } from "./club";
import { GenericUser } from "./generic-user";
export interface TeamAdministrator { export interface TeamAdministrator extends GenericUser {
id?: number; id?: number;
keycloakId?: string; /** @deprecated since 3.0.0. Use keycloakUserId instead */
lastName: string; keycloakId?: string;
firstName: string; active?: boolean;
email: string; club: Club;
active?: boolean;
club: Club;
} }

View File

@@ -1,10 +1,11 @@
import { Category } from "./category";
export interface TeamCategory { export interface TeamCategory {
id?: number; id?: number;
name: string; name: string;
class: number; gender: string;
gender: string; class: number;
age?: string; age: string | null;
categories?: Category[]; minMalePlayerCount: number | null;
} minFemalePlayerCount: number | null;
maxNumberOfGuestPlayers: number | null;
priority: number;
}

View File

@@ -0,0 +1,6 @@
import { TeamCategory } from "./team-category";
import { Tournament } from "./tournament";
export interface TeamChampionship extends Tournament {
teamCategories: Array<TeamCategory>;
}

View File

@@ -1,15 +1,16 @@
import { Club } from "./club"; import { Club } from "./club";
import { Team } from "./team"; import { Team } from "./team";
import { TeamCategory } from "./team-category"; import { TeamCategory } from "./team-category";
import { Tournament } from "./tournament"; import { TeamChampionship } from "./team-championship";
export interface TeamEntry { export interface TeamEntry {
id?: number; id?: number;
sentBy: Club; sentBy: Club;
status: number; teamChampionship: TeamChampionship;
category: TeamCategory; category: TeamCategory;
tournament: Tournament; team: Team;
createdAt: string; missingMalePlayerCount?: number;
updatedAt?: string; missingFemalePlayerCount?: number;
team: Team; canAddGuestPlayers: boolean;
remainingGuestsCount?: number;
} }

View File

@@ -0,0 +1,7 @@
import { Club } from "./club";
import { GenericUser } from "./generic-user";
export interface TeamManager extends GenericUser {
id?: number;
club: Club;
}

View File

@@ -1,6 +1,7 @@
import { Category } from "./category"; import { Category } from "./category";
import { Club } from "./club"; import { Club } from "./club";
import { Official } from "./official"; import { Official } from "./official";
import { Tag } from "./tag";
import { TeamCategory } from "./team-category"; import { TeamCategory } from "./team-category";
export interface Tournament { export interface Tournament {
@@ -10,8 +11,6 @@ export interface Tournament {
dateTo?: string; dateTo?: string;
entryDeadline?: string; entryDeadline?: string;
entryOpenFrom?: string; entryOpenFrom?: string;
categories: Array<Category>;
teamCategories?: Array<TeamCategory>;
/** /**
* @deprecated use organizerName instead * @deprecated use organizerName instead
*/ */
@@ -20,12 +19,11 @@ export interface Tournament {
active: boolean; active: boolean;
city?: string; city?: string;
onlyWithLicence: boolean; onlyWithLicence: boolean;
teamChampionship: boolean;
allowedWithoutPartner: boolean;
allowedSimilarEntries: boolean;
entriesChecked?: boolean; entriesChecked?: boolean;
referee: Official | null; referee: Official | null;
deputyReferee: Official | null; deputyReferee: Official | null;
drawUrl: string | null; drawUrl: string | null;
notificationsSentAt?: Date | null; notificationsSentAt?: Date | null;
'@type'?: string;
tags?: Tag[];
} }