Compare commits
9 Commits
4092b128bc
...
feature/ta
| Author | SHA1 | Date | |
|---|---|---|---|
| 6badb2bdff | |||
| 40aa20e96f | |||
| 19ec1fa701 | |||
| cc2c4bc8d3 | |||
| d1c1abaf65 | |||
| 41478c893e | |||
| 233190f578 | |||
| 871d41962c | |||
| 0daedc28dc |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
37
src/index.ts
37
src/index.ts
@@ -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";
|
||||
|
||||
@@ -9,4 +9,5 @@ export interface Club {
|
||||
address?: string;
|
||||
phone?: string;
|
||||
active: boolean;
|
||||
hasManager?: 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;
|
||||
}
|
||||
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,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;
|
||||
}
|
||||
|
||||
@@ -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[];
|
||||
}
|
||||
|
||||
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,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;
|
||||
}
|
||||
|
||||
@@ -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