9 Commits

Author SHA1 Message Date
6badb2bdff Add Tag interface 2025-06-15 18:23:56 +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
15 changed files with 126 additions and 79 deletions

4
package-lock.json generated
View File

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

View File

@@ -1,13 +1,12 @@
{
"name": "@mtlsz/common",
"version": "1.0.4",
"version": "3.0.6",
"description": "MTLSZ frontend packages",
"main": "dist/index.ts",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "echo \"Error: no test specified\" && exit 1",
"publish": "npm publish --registry http://registry.trweb.hu"
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",

View File

@@ -1,17 +1,20 @@
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/single-tournament";
export * from "./interfaces/team-championship";

View File

@@ -9,4 +9,5 @@ export interface Club {
address?: string;
phone?: string;
active: boolean;
hasManager?: 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,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,23 @@
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;
}

View File

@@ -1,21 +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;
birthPlace: string | null;
officialId?: number;
club: Club;
email?: string;
keycloakUserId?: string;
active?: boolean;
licenceFrom?: string;
licenceTo?: string;
disabledBecauseRanking?: boolean;
disabledBecauseSimilarEntry?: boolean;
rankingEntries?: RankingEntry[];
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[];
}

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

View File

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

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,15 @@
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;
}

View File

@@ -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[];
}