diff --git a/availabili.tf/src/client/index.ts b/availabili.tf/src/client/index.ts index b486b79..d1cd3b4 100644 --- a/availabili.tf/src/client/index.ts +++ b/availabili.tf/src/client/index.ts @@ -21,6 +21,7 @@ export type { EventSchema } from './models/EventSchema'; export type { EventWithPlayerSchema } from './models/EventWithPlayerSchema'; export type { EventWithPlayerSchemaList } from './models/EventWithPlayerSchemaList'; export type { GetEventPlayersResponse } from './models/GetEventPlayersResponse'; +export type { MatchSchema } from './models/MatchSchema'; export type { PlayerEventRolesSchema } from './models/PlayerEventRolesSchema'; export type { PlayerRoleSchema } from './models/PlayerRoleSchema'; export type { PlayerSchema } from './models/PlayerSchema'; @@ -28,11 +29,14 @@ export type { PlayerTeamAvailabilityRoleSchema } from './models/PlayerTeamAvaila export type { PutScheduleForm } from './models/PutScheduleForm'; export type { RoleSchema } from './models/RoleSchema'; export type { SetUsernameJson } from './models/SetUsernameJson'; +export type { SubmitMatchJson } from './models/SubmitMatchJson'; export type { TeamDiscordIntegrationSchema } from './models/TeamDiscordIntegrationSchema'; export type { TeamIntegrationSchema } from './models/TeamIntegrationSchema'; export type { TeamInviteSchema } from './models/TeamInviteSchema'; export type { TeamInviteSchemaList } from './models/TeamInviteSchemaList'; export type { TeamLogsTfIntegrationSchema } from './models/TeamLogsTfIntegrationSchema'; +export type { TeamMatchSchema } from './models/TeamMatchSchema'; +export type { TeamMatchSchemaList } from './models/TeamMatchSchemaList'; export { TeamRole } from './models/TeamRole'; export type { TeamSchema } from './models/TeamSchema'; export type { TeamWithRoleSchema } from './models/TeamWithRoleSchema'; diff --git a/availabili.tf/src/client/models/MatchSchema.ts b/availabili.tf/src/client/models/MatchSchema.ts new file mode 100644 index 0000000..bb1b131 --- /dev/null +++ b/availabili.tf/src/client/models/MatchSchema.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type MatchSchema = { + blueScore: number; + createdAt: string; + duration: string; + logsTfId: number; + logsTfTitle: string; + matchTime: string; + redScore: number; +}; + diff --git a/availabili.tf/src/client/models/SubmitMatchJson.ts b/availabili.tf/src/client/models/SubmitMatchJson.ts new file mode 100644 index 0000000..3316a65 --- /dev/null +++ b/availabili.tf/src/client/models/SubmitMatchJson.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type SubmitMatchJson = { + matchIds: Array; +}; + diff --git a/availabili.tf/src/client/models/TeamMatchSchema.ts b/availabili.tf/src/client/models/TeamMatchSchema.ts new file mode 100644 index 0000000..740e2d9 --- /dev/null +++ b/availabili.tf/src/client/models/TeamMatchSchema.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { MatchSchema } from './MatchSchema'; +export type TeamMatchSchema = { + match: MatchSchema; + ourScore: number; + theirScore: number; +}; + diff --git a/availabili.tf/src/client/models/TeamMatchSchemaList.ts b/availabili.tf/src/client/models/TeamMatchSchemaList.ts new file mode 100644 index 0000000..8966983 --- /dev/null +++ b/availabili.tf/src/client/models/TeamMatchSchemaList.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { TeamMatchSchema } from './TeamMatchSchema'; +export type TeamMatchSchemaList = Array; diff --git a/availabili.tf/src/client/services/DefaultService.ts b/availabili.tf/src/client/services/DefaultService.ts index a3c00d2..dec8f07 100644 --- a/availabili.tf/src/client/services/DefaultService.ts +++ b/availabili.tf/src/client/services/DefaultService.ts @@ -12,12 +12,15 @@ import type { EventSchema } from '../models/EventSchema'; import type { EventWithPlayerSchema } from '../models/EventWithPlayerSchema'; import type { EventWithPlayerSchemaList } from '../models/EventWithPlayerSchemaList'; import type { GetEventPlayersResponse } from '../models/GetEventPlayersResponse'; +import type { MatchSchema } from '../models/MatchSchema'; import type { PlayerSchema } from '../models/PlayerSchema'; import type { PutScheduleForm } from '../models/PutScheduleForm'; import type { SetUsernameJson } from '../models/SetUsernameJson'; +import type { SubmitMatchJson } from '../models/SubmitMatchJson'; import type { TeamIntegrationSchema } from '../models/TeamIntegrationSchema'; import type { TeamInviteSchema } from '../models/TeamInviteSchema'; import type { TeamInviteSchemaList } from '../models/TeamInviteSchemaList'; +import type { TeamMatchSchemaList } from '../models/TeamMatchSchemaList'; import type { TeamSchema } from '../models/TeamSchema'; import type { UpdateEventJson } from '../models/UpdateEventJson'; import type { ViewAvailablePlayersResponse } from '../models/ViewAvailablePlayersResponse'; @@ -289,6 +292,79 @@ export class DefaultService { }, }); } + /** + * submit_match + * @param requestBody + * @returns void + * @throws ApiError + */ + public submitMatch( + requestBody?: SubmitMatchJson, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'PUT', + url: '/api/match/', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Unprocessable Content`, + }, + }); + } + /** + * get_match + * @param matchId + * @returns MatchSchema OK + * @throws ApiError + */ + public getApiMatchIdMatchId( + matchId: number, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/match/id/{match_id}', + path: { + 'match_id': matchId, + }, + errors: { + 422: `Unprocessable Content`, + }, + }); + } + /** + * get_matches_for_player_teams + * @returns TeamMatchSchemaList OK + * @throws ApiError + */ + public getMatchesForPlayerTeams(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/match/player', + errors: { + 422: `Unprocessable Content`, + }, + }); + } + /** + * get_matches_for_team + * @param teamId + * @returns TeamMatchSchemaList OK + * @throws ApiError + */ + public getMatchesForTeam( + teamId: number, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/match/team/{team_id}', + path: { + 'team_id': teamId, + }, + errors: { + 422: `Unprocessable Content`, + }, + }); + } /** * get * @param windowStart diff --git a/availabili.tf/src/components/AddMatchDialog.vue b/availabili.tf/src/components/AddMatchDialog.vue new file mode 100644 index 0000000..24a3717 --- /dev/null +++ b/availabili.tf/src/components/AddMatchDialog.vue @@ -0,0 +1,63 @@ + + +