diff --git a/package-lock.json b/package-lock.json index 574f702..7f01004 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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" diff --git a/package.json b/package.json index 218f2f9..899fe1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mtlsz/common", - "version": "1.0.4", + "version": "2.0.2", "description": "MTLSZ frontend packages", "main": "dist/index.ts", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 76b13ab..cf8398f 100644 --- a/src/index.ts +++ b/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'; \ No newline at end of file +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"; diff --git a/src/interfaces/guest-player-request.ts b/src/interfaces/guest-player-request.ts new file mode 100644 index 0000000..2fa066c --- /dev/null +++ b/src/interfaces/guest-player-request.ts @@ -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; +} diff --git a/src/interfaces/official.ts b/src/interfaces/official.ts index ef24dec..61125ed 100644 --- a/src/interfaces/official.ts +++ b/src/interfaces/official.ts @@ -1,10 +1,22 @@ export interface Official { - id?: number; - name: string; - email: string; - phone?: string; - /** @deprecated Use referee and umpire booleans instead */ - type?: number; - referee: boolean; - umpire: boolean; + id?: number; + name: string; + email: string; + phone?: 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; } diff --git a/src/interfaces/single-tournament.ts b/src/interfaces/single-tournament.ts new file mode 100644 index 0000000..a30ce90 --- /dev/null +++ b/src/interfaces/single-tournament.ts @@ -0,0 +1,8 @@ +import { Category } from "./category"; +import { Tournament } from "./tournament"; + +export interface SingleTournament extends Tournament { + categories: Array; + allowedWithoutPartner: boolean; + allowedSimilarEntries: boolean; +} diff --git a/src/interfaces/team-category.ts b/src/interfaces/team-category.ts index 36cfb99..3eaee73 100644 --- a/src/interfaces/team-category.ts +++ b/src/interfaces/team-category.ts @@ -1,10 +1,11 @@ -import { Category } from "./category"; - export interface TeamCategory { - id?: number; - name: string; - class: number; - gender: string; - age?: string; - categories?: Category[]; -} \ No newline at end of file + id?: number; + name: string; + gender: string; + class: number; + age: string | null; + minMalePlayerCount: number | null; + minFemalePlayerCount: number | null; + maxNumberOfGuestPlayers: number | null; + priority: number; +} diff --git a/src/interfaces/team-championship.ts b/src/interfaces/team-championship.ts new file mode 100644 index 0000000..93ec7d5 --- /dev/null +++ b/src/interfaces/team-championship.ts @@ -0,0 +1,6 @@ +import { TeamCategory } from "./team-category"; +import { Tournament } from "./tournament"; + +export interface TeamChampionship extends Tournament { + teamCategories: Array; +} \ No newline at end of file diff --git a/src/interfaces/team-entry.ts b/src/interfaces/team-entry.ts index d76e93f..00a1782 100644 --- a/src/interfaces/team-entry.ts +++ b/src/interfaces/team-entry.ts @@ -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; } diff --git a/src/interfaces/tournament.ts b/src/interfaces/tournament.ts index 7182590..5c6231d 100644 --- a/src/interfaces/tournament.ts +++ b/src/interfaces/tournament.ts @@ -10,8 +10,6 @@ export interface Tournament { dateTo?: string; entryDeadline?: string; entryOpenFrom?: string; - categories: Array; - teamCategories?: Array; /** * @deprecated use organizerName instead */ @@ -20,12 +18,10 @@ 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; }