pro-clubs-shared-dtos 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dtos/comment.dto.d.ts +24 -0
- package/dist/dtos/comment.dto.d.ts.map +1 -0
- package/dist/dtos/comment.dto.js +3 -0
- package/dist/dtos/comment.dto.js.map +1 -0
- package/dist/dtos/events/event.dto.d.ts +86 -0
- package/dist/dtos/events/event.dto.d.ts.map +1 -0
- package/dist/dtos/events/event.dto.js +34 -0
- package/dist/dtos/events/event.dto.js.map +1 -0
- package/dist/dtos/game.dto.d.ts +40 -0
- package/dist/dtos/game.dto.d.ts.map +1 -0
- package/dist/dtos/game.dto.js +3 -0
- package/dist/dtos/game.dto.js.map +1 -0
- package/dist/dtos/prediction.dto.d.ts +29 -0
- package/dist/dtos/prediction.dto.d.ts.map +1 -0
- package/dist/dtos/prediction.dto.js +4 -0
- package/dist/dtos/prediction.dto.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/service-interfaces/comment/comment.interface.d.ts +10 -0
- package/dist/service-interfaces/comment/comment.interface.d.ts.map +1 -0
- package/dist/service-interfaces/comment/comment.interface.js +3 -0
- package/dist/service-interfaces/comment/comment.interface.js.map +1 -0
- package/dist/service-interfaces/comment/index.d.ts +2 -0
- package/dist/service-interfaces/comment/index.d.ts.map +1 -0
- package/dist/service-interfaces/comment/index.js +18 -0
- package/dist/service-interfaces/comment/index.js.map +1 -0
- package/dist/service-interfaces/game/game-controller.interface.d.ts +11 -0
- package/dist/service-interfaces/game/game-controller.interface.d.ts.map +1 -0
- package/dist/service-interfaces/game/game-controller.interface.js +3 -0
- package/dist/service-interfaces/game/game-controller.interface.js.map +1 -0
- package/dist/service-interfaces/game/game-repository.interface.d.ts +9 -0
- package/dist/service-interfaces/game/game-repository.interface.d.ts.map +1 -0
- package/dist/service-interfaces/game/game-repository.interface.js +3 -0
- package/dist/service-interfaces/game/game-repository.interface.js.map +1 -0
- package/dist/service-interfaces/game/game.interface.d.ts +38 -0
- package/dist/service-interfaces/game/game.interface.d.ts.map +1 -0
- package/dist/service-interfaces/game/game.interface.js +3 -0
- package/dist/service-interfaces/game/game.interface.js.map +1 -0
- package/dist/service-interfaces/game/index.d.ts +4 -0
- package/dist/service-interfaces/game/index.d.ts.map +1 -0
- package/dist/service-interfaces/game/index.js +20 -0
- package/dist/service-interfaces/game/index.js.map +1 -0
- package/dist/service-interfaces/index.d.ts +9 -0
- package/dist/service-interfaces/index.d.ts.map +1 -0
- package/dist/service-interfaces/index.js +25 -0
- package/dist/service-interfaces/index.js.map +1 -0
- package/dist/service-interfaces/notification.interface.d.ts +20 -0
- package/dist/service-interfaces/notification.interface.d.ts.map +1 -0
- package/dist/service-interfaces/notification.interface.js +3 -0
- package/dist/service-interfaces/notification.interface.js.map +1 -0
- package/dist/service-interfaces/prediction/index.d.ts +2 -0
- package/dist/service-interfaces/prediction/index.d.ts.map +1 -0
- package/dist/service-interfaces/prediction/index.js +18 -0
- package/dist/service-interfaces/prediction/index.js.map +1 -0
- package/dist/service-interfaces/prediction/prediction.interface.d.ts +8 -0
- package/dist/service-interfaces/prediction/prediction.interface.d.ts.map +1 -0
- package/dist/service-interfaces/prediction/prediction.interface.js +3 -0
- package/dist/service-interfaces/prediction/prediction.interface.js.map +1 -0
- package/dist/service-interfaces/team/index.d.ts +2 -0
- package/dist/service-interfaces/team/index.d.ts.map +1 -0
- package/dist/service-interfaces/team/index.js +18 -0
- package/dist/service-interfaces/team/index.js.map +1 -0
- package/dist/service-interfaces/team/team.interface.d.ts +32 -0
- package/dist/service-interfaces/team/team.interface.d.ts.map +1 -0
- package/dist/service-interfaces/team/team.interface.js +3 -0
- package/dist/service-interfaces/team/team.interface.js.map +1 -0
- package/dist/service-interfaces/transfer-request.interface.d.ts +32 -0
- package/dist/service-interfaces/transfer-request.interface.d.ts.map +1 -0
- package/dist/service-interfaces/transfer-request.interface.js +3 -0
- package/dist/service-interfaces/transfer-request.interface.js.map +1 -0
- package/dist/service-interfaces/user/index.d.ts +4 -0
- package/dist/service-interfaces/user/index.d.ts.map +1 -0
- package/dist/service-interfaces/user/index.js +20 -0
- package/dist/service-interfaces/user/index.js.map +1 -0
- package/dist/service-interfaces/user/user-controller.interface.d.ts +18 -0
- package/dist/service-interfaces/user/user-controller.interface.d.ts.map +1 -0
- package/dist/service-interfaces/user/user-controller.interface.js +3 -0
- package/dist/service-interfaces/user/user-controller.interface.js.map +1 -0
- package/dist/service-interfaces/user/user-repository.interface.d.ts +9 -0
- package/dist/service-interfaces/user/user-repository.interface.d.ts.map +1 -0
- package/dist/service-interfaces/user/user-repository.interface.js +3 -0
- package/dist/service-interfaces/user/user-repository.interface.js.map +1 -0
- package/dist/service-interfaces/user/user.interface.d.ts +48 -0
- package/dist/service-interfaces/user/user.interface.d.ts.map +1 -0
- package/dist/service-interfaces/user/user.interface.js +3 -0
- package/dist/service-interfaces/user/user.interface.js.map +1 -0
- package/dist/service-interfaces/wrapper-services/index.d.ts +50 -0
- package/dist/service-interfaces/wrapper-services/index.d.ts.map +1 -0
- package/dist/service-interfaces/wrapper-services/index.js +3 -0
- package/dist/service-interfaces/wrapper-services/index.js.map +1 -0
- package/package.json +1 -1
- package/src/dtos/comment.dto.ts +24 -0
- package/src/dtos/events/event.dto.ts +99 -0
- package/src/dtos/game.dto.ts +44 -0
- package/src/dtos/prediction.dto.ts +31 -0
- package/src/index.ts +15 -1
- package/src/service-interfaces/comment/comment.interface.ts +9 -0
- package/src/service-interfaces/comment/index.ts +1 -0
- package/src/service-interfaces/game/game-controller.interface.ts +10 -0
- package/src/service-interfaces/game/game-repository.interface.ts +8 -0
- package/src/service-interfaces/game/game.interface.ts +43 -0
- package/src/service-interfaces/game/index.ts +3 -0
- package/src/service-interfaces/index.ts +9 -0
- package/src/service-interfaces/notification.interface.ts +20 -0
- package/src/service-interfaces/prediction/index.ts +1 -0
- package/src/service-interfaces/prediction/prediction.interface.ts +7 -0
- package/src/service-interfaces/team/index.ts +1 -0
- package/src/service-interfaces/team/team.interface.ts +33 -0
- package/src/service-interfaces/transfer-request.interface.ts +34 -0
- package/src/service-interfaces/user/index.ts +3 -0
- package/src/service-interfaces/user/user-controller.interface.ts +17 -0
- package/src/service-interfaces/user/user-repository.interface.ts +8 -0
- package/src/service-interfaces/user/user.interface.ts +55 -0
- package/src/service-interfaces/wrapper-services/index.ts +57 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./prediction.interface"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/service-interfaces/prediction/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface IPredictionService {
|
|
2
|
+
createOrUpdatePrediction(gameId: string, userId: string, predictedOutcome: any, confidence?: number): Promise<any>;
|
|
3
|
+
deletePrediction(predictionId: string, userId: string): Promise<void>;
|
|
4
|
+
getPredictionDistribution(gameId: string, userId?: string): Promise<any>;
|
|
5
|
+
getUserPredictions(userId: string, limit?: number): Promise<any[]>;
|
|
6
|
+
getPredictionById(predictionId: string): Promise<any>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=prediction.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prediction.interface.d.ts","sourceRoot":"","sources":["../../../src/service-interfaces/prediction/prediction.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACnH,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACzE,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACnE,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CACvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prediction.interface.js","sourceRoot":"","sources":["../../../src/service-interfaces/prediction/prediction.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service-interfaces/team/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./team.interface"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/service-interfaces/team/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ITeamService {
|
|
2
|
+
getTeamById(teamId: string): Promise<any>;
|
|
3
|
+
getTeams(limit?: number, skip?: number): Promise<any[]>;
|
|
4
|
+
createTeam(teamData: any): Promise<any>;
|
|
5
|
+
updateTeam(teamId: string, updateData: any): Promise<any>;
|
|
6
|
+
deleteTeam(teamId: string): Promise<boolean>;
|
|
7
|
+
getTeamByName(teamName: string): Promise<any>;
|
|
8
|
+
getAllTeamsByLeague(leagueId: string): Promise<any[]>;
|
|
9
|
+
getTeamPlayers(teamId: string): Promise<any[]>;
|
|
10
|
+
addPlayerToTeam(teamId: string, playerId: string): Promise<any>;
|
|
11
|
+
removePlayerFromTeam(teamId: string, playerId: string): Promise<any>;
|
|
12
|
+
updateTeamCaptain(teamId: string, newCaptainId: string): Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
export interface ITeamController {
|
|
15
|
+
createTeam(req: any, res: any): Promise<void>;
|
|
16
|
+
getTeamById(req: any, res: any): Promise<void>;
|
|
17
|
+
getAllTeams(req: any, res: any): Promise<void>;
|
|
18
|
+
updateTeam(req: any, res: any): Promise<void>;
|
|
19
|
+
deleteTeam(req: any, res: any): Promise<void>;
|
|
20
|
+
getTeamPlayers(req: any, res: any): Promise<void>;
|
|
21
|
+
addPlayer(req: any, res: any): Promise<void>;
|
|
22
|
+
removePlayer(req: any, res: any): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface ITeamRepository {
|
|
25
|
+
create(teamData: any): Promise<any>;
|
|
26
|
+
findById(id: string): Promise<any | null>;
|
|
27
|
+
findByName(name: string): Promise<any | null>;
|
|
28
|
+
findAll(): Promise<any[]>;
|
|
29
|
+
update(id: string, updateData: any): Promise<any | null>;
|
|
30
|
+
delete(id: string): Promise<boolean>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=team.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.interface.d.ts","sourceRoot":"","sources":["../../../src/service-interfaces/team/team.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACxD,UAAU,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,OAAO,CA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AC,CAAC;IAClD,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC1C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC9C,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IACzD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.interface.js","sourceRoot":"","sources":["../../../src/service-interfaces/team/team.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface CreateTransferRequestData {
|
|
2
|
+
playerId: string;
|
|
3
|
+
fromTeamId?: string | null;
|
|
4
|
+
toTeamId: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ProcessTransferRequestData {
|
|
8
|
+
requestId: string;
|
|
9
|
+
action: 'approve' | 'reject';
|
|
10
|
+
reason?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PaginatedTransferRequests {
|
|
13
|
+
data: any[];
|
|
14
|
+
page: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
totalItems: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
hasNextPage: boolean;
|
|
19
|
+
hasPreviousPage: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ITransferRequestService {
|
|
22
|
+
createTransferRequest(requestedBy: string, data: CreateTransferRequestData): Promise<any>;
|
|
23
|
+
processTransferRequest(processedBy: string, data: ProcessTransferRequestData): Promise<any>;
|
|
24
|
+
getTransferRequestsByTeam(teamId: string, status?: string): Promise<any[]>;
|
|
25
|
+
getTransferRequestsByPlayer(playerId: string, status?: string): Promise<any[]>;
|
|
26
|
+
getAllTransferRequests(status?: string, leagueId?: string): Promise<any[]>;
|
|
27
|
+
getAllTransferRequestsPaginated(status: string | undefined, leagueId: string | undefined, page: number, pageSize: number): Promise<PaginatedTransferRequests>;
|
|
28
|
+
getTransferRequestById(requestId: string): Promise<any>;
|
|
29
|
+
cancelTransferRequest(requestId: string, userId: string): Promise<void>;
|
|
30
|
+
cleanupExpiredRequests(): Promise<number>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=transfer-request.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer-request.interface.d.ts","sourceRoot":"","sources":["../../src/service-interfaces/transfer-request.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UA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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service-interfaces/user/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./user.interface"), exports);
|
|
18
|
+
__exportStar(require("./user-controller.interface"), exports);
|
|
19
|
+
__exportStar(require("./user-repository.interface"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/service-interfaces/user/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,8DAA4C;AAC5C,8DAA4C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IUserController {
|
|
2
|
+
createUser(req: any, res: any): Promise<void>;
|
|
3
|
+
loginUser(req: any, res: any): Promise<void>;
|
|
4
|
+
googleAuth(req: any, res: any): Promise<void>;
|
|
5
|
+
getUserById(req: any, res: any): Promise<void>;
|
|
6
|
+
updateUser(req: any, res: any): Promise<void>;
|
|
7
|
+
deleteUser(req: any, res: any): Promise<void>;
|
|
8
|
+
verifyEmail(req: any, res: any): Promise<void>;
|
|
9
|
+
associatePlayer(req: any, res: any): Promise<void>;
|
|
10
|
+
removePlayer(req: any, res: any): Promise<void>;
|
|
11
|
+
searchPlayers(req: any, res: any): Promise<void>;
|
|
12
|
+
getUserPlayers(req: any, res: any): Promise<void>;
|
|
13
|
+
createPlayer(req: any, res: any): Promise<void>;
|
|
14
|
+
requestPasswordReset(req: any, res: any): Promise<void>;
|
|
15
|
+
verifyResetCode(req: any, res: any): Promise<void>;
|
|
16
|
+
resetPassword(req: any, res: any): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=user-controller.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-controller.interface.d.ts","sourceRoot":"","sources":["../../../src/service-interfaces/user/user-controller.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,oBAAoB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-controller.interface.js","sourceRoot":"","sources":["../../../src/service-interfaces/user/user-controller.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface IUserRepository {
|
|
2
|
+
create(userData: any): Promise<any>;
|
|
3
|
+
findById(id: string): Promise<any | null>;
|
|
4
|
+
findByEmail(email: string): Promise<any | null>;
|
|
5
|
+
update(id: string, updateData: any): Promise<any | null>;
|
|
6
|
+
delete(id: string): Promise<boolean>;
|
|
7
|
+
findAll(): Promise<any[]>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=user-repository.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-repository.interface.d.ts","sourceRoot":"","sources":["../../../src/service-interfaces/user/user-repository.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC1C,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IACzD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-repository.interface.js","sourceRoot":"","sources":["../../../src/service-interfaces/user/user-repository.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface CreateUserRequest {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LoginRequest {
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GoogleAuthRequest {
|
|
12
|
+
googleId: string;
|
|
13
|
+
email: string;
|
|
14
|
+
firstName: string;
|
|
15
|
+
lastName: string;
|
|
16
|
+
profilePicture?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface UpdateUserRequest {
|
|
19
|
+
firstName?: string;
|
|
20
|
+
lastName?: string;
|
|
21
|
+
email?: string;
|
|
22
|
+
profileImage?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface AuthResponse {
|
|
25
|
+
user: any;
|
|
26
|
+
token: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IUserService {
|
|
29
|
+
createUser(userData: CreateUserRequest): Promise<AuthResponse>;
|
|
30
|
+
loginUser(loginData: LoginRequest): Promise<AuthResponse>;
|
|
31
|
+
googleAuth(googleData: GoogleAuthRequest): Promise<AuthResponse>;
|
|
32
|
+
getUserById(userId: string): Promise<any | null>;
|
|
33
|
+
getUserByEmail(email: string): Promise<any | null>;
|
|
34
|
+
updateUser(userId: string, updateData: Partial<any>): Promise<any | null>;
|
|
35
|
+
deleteUser(userId: string): Promise<boolean>;
|
|
36
|
+
associatePlayerWithUser(userId: string, playerId?: string, playerEmail?: string): Promise<any | null>;
|
|
37
|
+
removePlayerFromUser(userId: string, playerId: string): Promise<any | null>;
|
|
38
|
+
verifyEmail(userId: string): Promise<any | null>;
|
|
39
|
+
searchAvailablePlayers(search?: string, email?: string): Promise<any[]>;
|
|
40
|
+
getUserAssociatedPlayers(userId: string): Promise<any[]>;
|
|
41
|
+
checkPlayerOwnership(userId: string, playerId: string): Promise<boolean>;
|
|
42
|
+
isPlayerAssociated(playerId: string): Promise<boolean>;
|
|
43
|
+
createPlayerForUser(userId: string, playerData: any): Promise<any>;
|
|
44
|
+
requestPasswordReset(email: string): Promise<void>;
|
|
45
|
+
verifyResetCode(email: string, code: string): Promise<boolean>;
|
|
46
|
+
resetPassword(email: string, code: string, newPassword: string): Promise<AuthResponse>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=user.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.interface.d.ts","sourceRoot":"","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,CAAC;CACxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.interface.js","sourceRoot":"","sources":["../../../src/service-interfaces/user/user.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface ITeamStatsService {
|
|
2
|
+
getCurrentSeasonAdvancedTeamStats(teamId: string, session?: any): Promise<any | null>;
|
|
3
|
+
getCurrentSeasonTeamPlayersStats(teamId: string, limit?: number, session?: any): Promise<any>;
|
|
4
|
+
getTeamTopScorersAndAssists(teamId: string, limit?: number, session?: any): Promise<{
|
|
5
|
+
topScorers: any[];
|
|
6
|
+
topAssists: any[];
|
|
7
|
+
}>;
|
|
8
|
+
getTeamTopContributors(teamId: string, limit?: number, session?: any): Promise<any[]>;
|
|
9
|
+
}
|
|
10
|
+
export interface IPlayerStatsService {
|
|
11
|
+
getCurrentSeasonAdvancedPlayerStats(playerId: string, session?: any): Promise<any | null>;
|
|
12
|
+
getPlayerCareerStats(playerId: string): Promise<any | null>;
|
|
13
|
+
getPlayerAchievements(playerId: string): Promise<any[]>;
|
|
14
|
+
}
|
|
15
|
+
export interface ITeamLeagueService {
|
|
16
|
+
getTeamLeaguePositions(teamId: string): Promise<any[]>;
|
|
17
|
+
getCurrentSeasonTeamPosition(teamId: string): Promise<any | null>;
|
|
18
|
+
getTeamHistoricalPositions(teamId: string): Promise<any[]>;
|
|
19
|
+
}
|
|
20
|
+
export interface IPlayerTeamService {
|
|
21
|
+
getPlayerCurrentTeam(playerId: string): Promise<any | null>;
|
|
22
|
+
getPlayerTeamHistory(playerId: string): Promise<any[]>;
|
|
23
|
+
getTeamPlayers(teamId: string): Promise<any[]>;
|
|
24
|
+
}
|
|
25
|
+
export interface ITeamOfTheWeekService {
|
|
26
|
+
getTeamOfTheWeek(leagueId: string, seasonNumber: number, weekNumber?: number): Promise<any>;
|
|
27
|
+
getAllTeamsOfTheWeek(leagueId: string, seasonNumber: number): Promise<any[]>;
|
|
28
|
+
createTeamOfTheWeek(leagueId: string, seasonNumber: number, weekNumber: number, players: string[]): Promise<any>;
|
|
29
|
+
}
|
|
30
|
+
export interface ITeamOfTheSeasonService {
|
|
31
|
+
getTeamOfTheSeason(leagueId: string, seasonNumber: number): Promise<any>;
|
|
32
|
+
createTeamOfTheSeason(leagueId: string, seasonNumber: number, formation: any, players: string[]): Promise<any>;
|
|
33
|
+
}
|
|
34
|
+
export interface ISeasonCompletionService {
|
|
35
|
+
getSeasonCompletionStatus(leagueId: string, seasonNumber: number): Promise<any>;
|
|
36
|
+
completeSeason(leagueId: string, seasonNumber: number, endDate?: Date): Promise<any>;
|
|
37
|
+
}
|
|
38
|
+
export interface ISeasonAchievementService {
|
|
39
|
+
getSeasonAchievements(leagueId: string, seasonNumber: number): Promise<any>;
|
|
40
|
+
getPlayerAchievementsInSeason(playerId: string, leagueId: string, seasonNumber: number): Promise<any>;
|
|
41
|
+
getTeamAchievementsInSeason(teamId: string, leagueId: string, seasonNumber: number): Promise<any>;
|
|
42
|
+
previewSeasonEnd(leagueId: string, seasonNumber: number): Promise<any>;
|
|
43
|
+
endSeason(leagueId: string, seasonNumber: number, endDate?: Date, forceEnd?: boolean): Promise<any>;
|
|
44
|
+
}
|
|
45
|
+
export interface ILeagueStatsService {
|
|
46
|
+
getCurrentSeasonTopScorers(leagueId: string, limit?: number): Promise<any[]>;
|
|
47
|
+
getCurrentSeasonTopAssists(leagueId: string, limit?: number): Promise<any[]>;
|
|
48
|
+
getLeagueStandings(leagueId: string, seasonNumber?: number): Promise<any>;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service-interfaces/wrapper-services/index.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,iCAAiC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,OAAO,CAA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AG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5E,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACtG,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAClG,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACvE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CACrG;AAED,MAAM,WAAW,mBAAmB;IAClC,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7E,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7E,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CAC3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/service-interfaces/wrapper-services/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface CommentDTO {
|
|
2
|
+
id: string;
|
|
3
|
+
gameId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
content: string;
|
|
6
|
+
parentCommentId?: string;
|
|
7
|
+
likesCount: number;
|
|
8
|
+
isLikedByUser: boolean;
|
|
9
|
+
isEdited: boolean;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
user: {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
profileImage?: string;
|
|
16
|
+
};
|
|
17
|
+
replies?: CommentDTO[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CommentsResponse {
|
|
21
|
+
comments: CommentDTO[];
|
|
22
|
+
totalCount: number;
|
|
23
|
+
hasMore: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { EVENT_TYPE, EVENT_STATUS } from "../../models/event";
|
|
2
|
+
import { SERIES_FORMAT } from "../../models/game/game";
|
|
3
|
+
|
|
4
|
+
export class AllStarTeamDTO {
|
|
5
|
+
id!: string;
|
|
6
|
+
name!: string;
|
|
7
|
+
captainId!: string;
|
|
8
|
+
players!: string[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class AllStarDraftConfigDTO {
|
|
12
|
+
numberOfCaptains!: number;
|
|
13
|
+
matchFormat!: SERIES_FORMAT;
|
|
14
|
+
registrationOpenDate!: Date;
|
|
15
|
+
registrationCloseDate!: Date;
|
|
16
|
+
teams?: AllStarTeamDTO[];
|
|
17
|
+
captainIds?: string[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class EventStatsDTO {
|
|
21
|
+
playerId!: string;
|
|
22
|
+
goals!: number;
|
|
23
|
+
assists!: number;
|
|
24
|
+
appearances!: number;
|
|
25
|
+
playerOfTheMatch!: number;
|
|
26
|
+
avgRating!: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export class EventDTO {
|
|
30
|
+
id!: string;
|
|
31
|
+
name!: string;
|
|
32
|
+
type!: EVENT_TYPE;
|
|
33
|
+
league!: string;
|
|
34
|
+
seasonNumber!: number;
|
|
35
|
+
date!: Date;
|
|
36
|
+
status!: EVENT_STATUS;
|
|
37
|
+
createdBy!: string;
|
|
38
|
+
createdAt!: Date;
|
|
39
|
+
updatedAt!: Date;
|
|
40
|
+
|
|
41
|
+
// All-Star specific fields
|
|
42
|
+
allStarConfig?: AllStarDraftConfigDTO;
|
|
43
|
+
registeredPlayers?: string[];
|
|
44
|
+
fixtures?: string[];
|
|
45
|
+
stats?: EventStatsDTO[];
|
|
46
|
+
|
|
47
|
+
// Event outcome
|
|
48
|
+
winnerTeam?: AllStarTeamDTO;
|
|
49
|
+
completedDate?: Date;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export class CreateEventDTO {
|
|
53
|
+
name!: string;
|
|
54
|
+
type!: EVENT_TYPE;
|
|
55
|
+
league!: string;
|
|
56
|
+
seasonNumber!: number;
|
|
57
|
+
date!: Date;
|
|
58
|
+
allStarConfig?: {
|
|
59
|
+
numberOfCaptains: number;
|
|
60
|
+
matchFormat: SERIES_FORMAT;
|
|
61
|
+
registrationOpenDate: Date;
|
|
62
|
+
registrationCloseDate: Date;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export class RegisterForEventDTO {
|
|
67
|
+
eventId!: string;
|
|
68
|
+
playerId!: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export class SelectCaptainsDTO {
|
|
72
|
+
eventId!: string;
|
|
73
|
+
captainIds!: string[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export class AddPlayerToDraftTeamDTO {
|
|
77
|
+
eventId!: string;
|
|
78
|
+
teamIndex!: number;
|
|
79
|
+
playerId!: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export class FinishDraftDTO {
|
|
83
|
+
eventId!: string;
|
|
84
|
+
teams!: {
|
|
85
|
+
index: number;
|
|
86
|
+
name: string;
|
|
87
|
+
captainId: string;
|
|
88
|
+
}[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export class UpdateEventStatsDTO {
|
|
92
|
+
eventId!: string;
|
|
93
|
+
playerId!: string;
|
|
94
|
+
goals?: number;
|
|
95
|
+
assists?: number;
|
|
96
|
+
appearances?: number;
|
|
97
|
+
playerOfTheMatch?: number;
|
|
98
|
+
avgRating?: number;
|
|
99
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PlayerGamePerformance } from "../models/game/game-types";
|
|
2
|
+
import { IGame } from "../models/game/game";
|
|
3
|
+
|
|
4
|
+
// Extended PlayerPerformanceDTO for internal use (matches frontend ExtendedPlayerPerformanceDTO)
|
|
5
|
+
export interface ExtendedPlayerPerformanceDTO extends PlayerGamePerformance {
|
|
6
|
+
isBotPlayer?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type ExtendedGameResult = {
|
|
10
|
+
homeTeamGoals: number;
|
|
11
|
+
awayTeamGoals: number;
|
|
12
|
+
penalties?: {
|
|
13
|
+
homeTeamPenalties: number;
|
|
14
|
+
awayTeamPenalties: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Extended GameDTO with playoff and broadcast properties (wraps IGame)
|
|
19
|
+
export interface ExtendedGameDTO {
|
|
20
|
+
id: string;
|
|
21
|
+
isPlayoff?: boolean;
|
|
22
|
+
playoffStage?: string | null;
|
|
23
|
+
broadcast?: {
|
|
24
|
+
streamUrl: string;
|
|
25
|
+
broadcastingTeam: string;
|
|
26
|
+
};
|
|
27
|
+
aiAnalysisImage?: string; // URL to the saved AI analysis image (deprecated)
|
|
28
|
+
homeTeamPlayersImage?: string; // URL to the home team's player stats screenshot
|
|
29
|
+
awayTeamPlayersImage?: string; // URL to the away team's player stats screenshot
|
|
30
|
+
eaGameDetails?: any; // EA game statistics from Clubs API
|
|
31
|
+
homeTeam: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
imgUrl?: string;
|
|
35
|
+
playersPerformance?: ExtendedPlayerPerformanceDTO[];
|
|
36
|
+
};
|
|
37
|
+
awayTeam: {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
imgUrl?: string;
|
|
41
|
+
playersPerformance?: ExtendedPlayerPerformanceDTO[];
|
|
42
|
+
};
|
|
43
|
+
result?: ExtendedGameResult;
|
|
44
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PREDICTION_OUTCOME } from "../models/prediction/prediction";
|
|
2
|
+
|
|
3
|
+
export interface PredictionDTO {
|
|
4
|
+
id: string;
|
|
5
|
+
gameId: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
predictedOutcome: PREDICTION_OUTCOME;
|
|
8
|
+
confidence: number;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
user?: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
profileImage?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface PredictionDistribution {
|
|
19
|
+
[PREDICTION_OUTCOME.DRAW]?: number;
|
|
20
|
+
[PREDICTION_OUTCOME.HOME_WIN]?: number;
|
|
21
|
+
[PREDICTION_OUTCOME.AWAY_WIN]?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface PredictionDistributionWithUser extends PredictionDistribution {
|
|
25
|
+
userPrediction?: {
|
|
26
|
+
id: string;
|
|
27
|
+
outcome: PREDICTION_OUTCOME;
|
|
28
|
+
confidence: number;
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
};
|
|
31
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -24,5 +24,19 @@ export * from './models/comment/comment';
|
|
|
24
24
|
// Export Enums
|
|
25
25
|
export * from './enums/extended-game-status';
|
|
26
26
|
|
|
27
|
-
// Export
|
|
27
|
+
// Export DTOs (Data Transfer Objects)
|
|
28
28
|
export * from './dtos/api-error-response';
|
|
29
|
+
export * from './dtos/prediction.dto';
|
|
30
|
+
export * from './dtos/comment.dto';
|
|
31
|
+
export * from './dtos/game.dto';
|
|
32
|
+
export * from './dtos/events/event.dto';
|
|
33
|
+
|
|
34
|
+
// Export Service Interfaces (Contracts for service implementations)
|
|
35
|
+
export * from './service-interfaces/user/index';
|
|
36
|
+
export * from './service-interfaces/game/index';
|
|
37
|
+
export * from './service-interfaces/team/index';
|
|
38
|
+
export * from './service-interfaces/prediction/index';
|
|
39
|
+
export * from './service-interfaces/comment/index';
|
|
40
|
+
export * from './service-interfaces/transfer-request.interface';
|
|
41
|
+
export * from './service-interfaces/notification.interface';
|
|
42
|
+
export * from './service-interfaces/wrapper-services/index';
|