23 Commits
2.x ... main

Author SHA1 Message Date
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
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
16 changed files with 98 additions and 34 deletions

4
package-lock.json generated
View File

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

View File

@@ -1,13 +1,12 @@
{ {
"name": "@mtlsz/common", "name": "@mtlsz/common",
"version": "2.1.1", "version": "3.2.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

@@ -19,3 +19,11 @@ 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"; 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";

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,17 @@
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;
entity:
| PlayerConfirmationRequest
| AdultConfirmationRequest
| TeamManagerConfirmationRequest
| TeamAdminConfirmationRequest
| OfficialConfirmationRequest;
}

View File

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

View File

@@ -0,0 +1,4 @@
export interface OfficialConfirmationRequest {
referee: boolean;
umpire: boolean;
}

View File

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

View File

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

View File

@@ -0,0 +1,5 @@
import { Club } from "../club";
export interface TeamManagerConfirmationRequest {
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

@@ -1,8 +1,9 @@
export interface Official { import { GenericUser } from "./generic-user";
export interface Official extends GenericUser {
id?: number; id?: number;
name: string; /** @deprecated since 3.0.0. Use lastName and firstName instead */
email: string; name?: 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,17 +1,14 @@
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 { export interface Player extends GenericUser {
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/role.ts Normal file
View File

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

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