6 Commits

Author SHA1 Message Date
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
8 changed files with 39 additions and 35 deletions

View File

@@ -1,12 +1,13 @@
{ {
"name": "@mtlsz/common", "name": "@mtlsz/common",
"version": "3.0.4", "version": "2.1.1",
"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",
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1",
"publish": "npm publish --registry http://registry.trweb.hu"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@@ -18,3 +18,4 @@ export * from "./interfaces/tournament";
export * from "./interfaces/guest-player-request"; export * from "./interfaces/guest-player-request";
export * from "./interfaces/single-tournament"; export * from "./interfaces/single-tournament";
export * from "./interfaces/team-championship"; export * from "./interfaces/team-championship";
export * from "./interfaces/tag";

View File

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

View File

@@ -1,9 +1,8 @@
import { GenericUser } from "./generic-user"; export interface Official {
export interface Official extends GenericUser {
id?: number; id?: number;
/** @deprecated since 3.0.0. Use lastName and firstName instead */ name: string;
name?: string; email: string;
phone?: string;
/** @deprecated Use referee and umpire booleans instead */ /** @deprecated Use referee and umpire booleans instead */
type?: number; type?: number;
referee: boolean; referee: boolean;

View File

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

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

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

View File

@@ -1,10 +1,11 @@
import { Club } from "./club"; import { Club } from "./club";
import { GenericUser } from "./generic-user";
export interface TeamAdministrator extends GenericUser { export interface TeamAdministrator {
id?: number; id?: number;
/** @deprecated since 3.0.0. Use keycloakUserId instead */
keycloakId?: string; keycloakId?: string;
lastName: string;
firstName: string;
email: string;
active?: boolean; active?: boolean;
club: Club; 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 {
@@ -24,4 +25,5 @@ export interface Tournament {
drawUrl: string | null; drawUrl: string | null;
notificationsSentAt?: Date | null; notificationsSentAt?: Date | null;
'@type'?: string; '@type'?: string;
tags?: Tag[];
} }