init commit
This commit is contained in:
17
src/index.ts
Normal file
17
src/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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';
|
||||
8
src/interfaces/api-pagination.ts
Normal file
8
src/interfaces/api-pagination.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface ApiPagination {
|
||||
'@id': string;
|
||||
'@type': string;
|
||||
'hydra:first': string;
|
||||
'hydra:last': string;
|
||||
'hydra:next'?: string;
|
||||
'hydra:previous'?: string;
|
||||
}
|
||||
10
src/interfaces/api-result.ts
Normal file
10
src/interfaces/api-result.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { ApiPagination } from "./api-pagination";
|
||||
|
||||
export interface ApiResult {
|
||||
'@context': string;
|
||||
'@id': string;
|
||||
type: string;
|
||||
'hydra:member': Array<any>;
|
||||
'hydra:totalItems': number;
|
||||
'hydra:view': ApiPagination
|
||||
}
|
||||
12
src/interfaces/category.ts
Normal file
12
src/interfaces/category.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export interface Category {
|
||||
id?: number;
|
||||
name: string;
|
||||
singles: boolean;
|
||||
doubles: boolean;
|
||||
mixed: boolean;
|
||||
shortName: string;
|
||||
gender: string;
|
||||
class: number;
|
||||
age?: string;
|
||||
priority: number;
|
||||
}
|
||||
12
src/interfaces/club.ts
Normal file
12
src/interfaces/club.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export interface Club {
|
||||
id?: number;
|
||||
name: string;
|
||||
shortName: string;
|
||||
players?: Array<any>;
|
||||
city?: string;
|
||||
contactName?: string;
|
||||
email?: string;
|
||||
address?: string;
|
||||
phone?: string;
|
||||
active: boolean;
|
||||
}
|
||||
18
src/interfaces/entry.ts
Normal file
18
src/interfaces/entry.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Category } from "./category";
|
||||
import { Club } from "./club";
|
||||
import { Player } from "./player";
|
||||
import { Tournament } from "./tournament";
|
||||
|
||||
export interface Entry {
|
||||
id?: number;
|
||||
player1: Player;
|
||||
player2?: Player;
|
||||
sentBy: Club;
|
||||
status: number;
|
||||
category: Category;
|
||||
tournament: Tournament;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
sameEntry?: Entry;
|
||||
missingEntryFromOtherClub?: boolean;
|
||||
}
|
||||
8
src/interfaces/in-memory-cache.ts
Normal file
8
src/interfaces/in-memory-cache.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* This is just a simple interface for clearCache method
|
||||
* which removes the data from the memory. E.g set
|
||||
* your list to empty array, null or whatever.
|
||||
*/
|
||||
export declare interface InMemoryCache {
|
||||
clearCache(): void;
|
||||
}
|
||||
10
src/interfaces/official.ts
Normal file
10
src/interfaces/official.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface Official {
|
||||
id?: number;
|
||||
name: string;
|
||||
email: string;
|
||||
phone?: string;
|
||||
/** @deprecated Use referee and umpire booleans instead */
|
||||
type?: number;
|
||||
referee: boolean;
|
||||
umpire: boolean;
|
||||
}
|
||||
4
src/interfaces/pagination.ts
Normal file
4
src/interfaces/pagination.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare interface Pagination {
|
||||
forward(): void;
|
||||
back(): void;
|
||||
}
|
||||
14
src/interfaces/player.ts
Normal file
14
src/interfaces/player.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Club } from "./club";
|
||||
|
||||
export interface Player {
|
||||
id?: number;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
gender: string;
|
||||
birthDate: string;
|
||||
officialId?: number;
|
||||
club: Club;
|
||||
email?: string;
|
||||
keycloakUserId?: string;
|
||||
active?: boolean;
|
||||
}
|
||||
12
src/interfaces/ranking-entry.ts
Normal file
12
src/interfaces/ranking-entry.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Player } from "./player";
|
||||
import { Ranking } from "./ranking";
|
||||
|
||||
export interface RankingEntry {
|
||||
id?: number;
|
||||
ranking: Ranking;
|
||||
player: Player;
|
||||
place: number;
|
||||
tournamentCount: number;
|
||||
points: number;
|
||||
validFrom: Date;
|
||||
}
|
||||
8
src/interfaces/ranking.ts
Normal file
8
src/interfaces/ranking.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface Ranking {
|
||||
id?: number;
|
||||
gender: string;
|
||||
age: string | null;
|
||||
singles: boolean;
|
||||
doubles: boolean;
|
||||
mixed: boolean;
|
||||
}
|
||||
4
src/interfaces/system-data.ts
Normal file
4
src/interfaces/system-data.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface SystemData {
|
||||
type: string;
|
||||
value: string;
|
||||
}
|
||||
11
src/interfaces/team-administrator.ts
Normal file
11
src/interfaces/team-administrator.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Club } from "./club";
|
||||
|
||||
export interface TeamAdministrator {
|
||||
id?: number;
|
||||
keycloakId?: string;
|
||||
lastName: string;
|
||||
firstName: string;
|
||||
email: string;
|
||||
active?: boolean;
|
||||
club: Club;
|
||||
}
|
||||
10
src/interfaces/team-category.ts
Normal file
10
src/interfaces/team-category.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Category } from "./category";
|
||||
|
||||
export interface TeamCategory {
|
||||
id?: number;
|
||||
name: string;
|
||||
class: number;
|
||||
gender: string;
|
||||
age?: string;
|
||||
categories?: Category[];
|
||||
}
|
||||
15
src/interfaces/team-entry.ts
Normal file
15
src/interfaces/team-entry.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Club } from "./club";
|
||||
import { Team } from "./team";
|
||||
import { TeamCategory } from "./team-category";
|
||||
import { Tournament } from "./tournament";
|
||||
|
||||
export interface TeamEntry {
|
||||
id?: number;
|
||||
sentBy: Club;
|
||||
status: number;
|
||||
category: TeamCategory;
|
||||
tournament: Tournament;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
team: Team;
|
||||
}
|
||||
7
src/interfaces/team.ts
Normal file
7
src/interfaces/team.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Club } from "./club";
|
||||
|
||||
export interface Team {
|
||||
id?: number;
|
||||
name: string;
|
||||
club: Club;
|
||||
}
|
||||
31
src/interfaces/tournament.ts
Normal file
31
src/interfaces/tournament.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Category } from "./category";
|
||||
import { Club } from "./club";
|
||||
import { Official } from "./official";
|
||||
import { TeamCategory } from "./team-category";
|
||||
|
||||
export interface Tournament {
|
||||
id?: number;
|
||||
name: string;
|
||||
dateFrom: string;
|
||||
dateTo?: string;
|
||||
entryDeadline?: string;
|
||||
entryOpenFrom?: string;
|
||||
categories: Array<Category>;
|
||||
teamCategories?: Array<TeamCategory>;
|
||||
/**
|
||||
* @deprecated use organizerName instead
|
||||
*/
|
||||
organizer?: Club;
|
||||
organizerName?: string;
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user