Compare commits
41 Commits
v2
...
1d4fb2f180
| Author | SHA1 | Date | |
|---|---|---|---|
| 1d4fb2f180 | |||
| c5a3f47a4f | |||
| 63998a9859 | |||
| 4301da7dae | |||
| d7a3e9d790 | |||
| ac2751c2fd | |||
| d400a74e59 | |||
| dfb68e99b5 | |||
| 04df85bdbc | |||
| 78f6673179 | |||
| 60cc76c3c8 | |||
| 4f1f3e26e5 | |||
| 99cfb97e3c | |||
| cff48d1e96 | |||
| dfa40e5397 | |||
| c08588d5e8 | |||
| 0b212e701b | |||
| 8dd92f32b7 | |||
| 8b8fe1402b | |||
| 2abc690bf9 | |||
| 5937c0cc5b | |||
| df4ab60ee0 | |||
| e1397d781c | |||
| 696c3577a7 | |||
| c538aed244 | |||
| a75edc31e1 | |||
| b4a9bdb1d4 | |||
| 1fea26987e | |||
| 209775f968 | |||
| c2db3785e1 | |||
| 67a999796a | |||
| 6e533bd945 | |||
| eb9f59cd31 | |||
| d13248277f | |||
| 40aa20e96f | |||
| 19ec1fa701 | |||
| cc2c4bc8d3 | |||
| d1c1abaf65 | |||
| 41478c893e | |||
| 233190f578 | |||
| 871d41962c |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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"
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@mtlsz/common",
|
"name": "@mtlsz/common",
|
||||||
"version": "2.0.2",
|
"version": "3.3.6",
|
||||||
"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",
|
||||||
|
|||||||
13
src/index.ts
13
src/index.ts
@@ -18,3 +18,16 @@ 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";
|
||||||
|
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";
|
||||||
|
export * from "./interfaces/generic-user";
|
||||||
|
export * from "./interfaces/adult";
|
||||||
|
export * from "./interfaces/team-manager";
|
||||||
|
export * from "./interfaces/confirmation-request/confirmation-request-status";
|
||||||
|
|||||||
7
src/interfaces/adult.ts
Normal file
7
src/interfaces/adult.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { GenericUser } from "./generic-user";
|
||||||
|
import { Player } from "./player";
|
||||||
|
|
||||||
|
export interface Adult extends GenericUser {
|
||||||
|
id?: number;
|
||||||
|
kids: Player[];
|
||||||
|
}
|
||||||
@@ -9,4 +9,5 @@ export interface Club {
|
|||||||
address?: string;
|
address?: string;
|
||||||
phone?: string;
|
phone?: string;
|
||||||
active: boolean;
|
active: boolean;
|
||||||
|
hasManager?: boolean;
|
||||||
}
|
}
|
||||||
24
src/interfaces/confirmation-request.ts
Normal file
24
src/interfaces/confirmation-request.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
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;
|
||||||
|
lastName: string | null;
|
||||||
|
firstName: string | null;
|
||||||
|
email: string | null;
|
||||||
|
phone: string | null;
|
||||||
|
keycloakUserId: string | null;
|
||||||
|
entity:
|
||||||
|
| PlayerConfirmationRequest
|
||||||
|
| AdultConfirmationRequest
|
||||||
|
| TeamManagerConfirmationRequest
|
||||||
|
| TeamAdminConfirmationRequest
|
||||||
|
| OfficialConfirmationRequest;
|
||||||
|
canBeRevoked: boolean | null;
|
||||||
|
createdAt: string | null;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { Player } from "../player";
|
||||||
|
|
||||||
|
export interface AdultConfirmationRequest {
|
||||||
|
id?: number;
|
||||||
|
kids: Player[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export const enum ConfirmationRequestStatus {
|
||||||
|
PENDING = 1,
|
||||||
|
APPROVED = 2,
|
||||||
|
DECLINED = 3,
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface OfficialConfirmationRequest {
|
||||||
|
id?: number;
|
||||||
|
referee: boolean;
|
||||||
|
umpire: boolean;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { Club } from "../club";
|
||||||
|
|
||||||
|
export interface PlayerConfirmationRequest {
|
||||||
|
id?: number;
|
||||||
|
club: Club;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { Club } from "../club";
|
||||||
|
|
||||||
|
export interface TeamAdminConfirmationRequest {
|
||||||
|
id?: number;
|
||||||
|
active: boolean;
|
||||||
|
club: Club;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { Club } from "../club";
|
||||||
|
|
||||||
|
export interface TeamManagerConfirmationRequest {
|
||||||
|
id?: number;
|
||||||
|
club: Club;
|
||||||
|
}
|
||||||
6
src/interfaces/confirmation-requests.ts
Normal file
6
src/interfaces/confirmation-requests.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { ConfirmationRequest } from "./confirmation-request";
|
||||||
|
|
||||||
|
export interface ConfirmationRequests {
|
||||||
|
roles: ConfirmationRequest[];
|
||||||
|
canAddNewRole: 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;
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
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;
|
gender: string;
|
||||||
lastName: string;
|
birthDate: string;
|
||||||
gender: string;
|
birthPlace?: string | null;
|
||||||
birthDate: string;
|
officialId?: number;
|
||||||
birthPlace: string | null;
|
club: Club;
|
||||||
officialId?: number;
|
active?: boolean;
|
||||||
club: Club;
|
licenceFrom?: string;
|
||||||
email?: string;
|
licenceTo?: string;
|
||||||
keycloakUserId?: string;
|
disabledBecauseRanking?: boolean;
|
||||||
active?: boolean;
|
disabledBecauseSimilarEntry?: boolean;
|
||||||
licenceFrom?: string;
|
rankingEntries?: RankingEntry[];
|
||||||
licenceTo?: string;
|
|
||||||
disabledBecauseRanking?: boolean;
|
|
||||||
disabledBecauseSimilarEntry?: boolean;
|
|
||||||
rankingEntries?: RankingEntry[];
|
|
||||||
}
|
}
|
||||||
|
|||||||
4
src/interfaces/role.ts
Normal file
4
src/interfaces/role.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export interface Role {
|
||||||
|
role: string;
|
||||||
|
status: number;
|
||||||
|
}
|
||||||
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 { Club } from "./club";
|
||||||
|
import { GenericUser } from "./generic-user";
|
||||||
|
|
||||||
export interface TeamAdministrator {
|
export interface TeamAdministrator extends GenericUser {
|
||||||
id?: number;
|
id?: number;
|
||||||
keycloakId?: string;
|
/** @deprecated since 3.0.0. Use keycloakUserId instead */
|
||||||
lastName: string;
|
keycloakId?: string;
|
||||||
firstName: string;
|
active?: boolean;
|
||||||
email: string;
|
club: Club;
|
||||||
active?: boolean;
|
|
||||||
club: Club;
|
|
||||||
}
|
}
|
||||||
|
|||||||
7
src/interfaces/team-manager.ts
Normal file
7
src/interfaces/team-manager.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { Club } from "./club";
|
||||||
|
import { GenericUser } from "./generic-user";
|
||||||
|
|
||||||
|
export interface TeamManager extends GenericUser {
|
||||||
|
id?: number;
|
||||||
|
club: Club;
|
||||||
|
}
|
||||||
@@ -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[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user