diff --git a/availabili.tf/src/client/index.ts b/availabili.tf/src/client/index.ts index 1c4dac2..65f54fc 100644 --- a/availabili.tf/src/client/index.ts +++ b/availabili.tf/src/client/index.ts @@ -11,6 +11,7 @@ export { OpenAPI } from './core/OpenAPI'; export type { OpenAPIConfig } from './core/OpenAPI'; export type { AddPlayerJson } from './models/AddPlayerJson'; +export type { AvailabilitySchema } from './models/AvailabilitySchema'; export type { CreateTeamJson } from './models/CreateTeamJson'; export type { EditMemberRolesJson } from './models/EditMemberRolesJson'; export type { PlayerSchema } from './models/PlayerSchema'; @@ -30,6 +31,7 @@ export type { ViewScheduleResponse } from './models/ViewScheduleResponse'; export type { ViewTeamMembersResponse } from './models/ViewTeamMembersResponse'; export type { ViewTeamMembersResponseList } from './models/ViewTeamMembersResponseList'; export type { ViewTeamResponse } from './models/ViewTeamResponse'; +export type { ViewTeamScheduleResponse } from './models/ViewTeamScheduleResponse'; export type { ViewTeamsResponse } from './models/ViewTeamsResponse'; export { DefaultService } from './services/DefaultService'; diff --git a/availabili.tf/src/client/models/AvailabilitySchema.ts b/availabili.tf/src/client/models/AvailabilitySchema.ts new file mode 100644 index 0000000..686a724 --- /dev/null +++ b/availabili.tf/src/client/models/AvailabilitySchema.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type AvailabilitySchema = { + availability?: Array; + steamId: string; + username: string; +}; + diff --git a/availabili.tf/src/client/models/ViewTeamScheduleResponse.ts b/availabili.tf/src/client/models/ViewTeamScheduleResponse.ts new file mode 100644 index 0000000..e982714 --- /dev/null +++ b/availabili.tf/src/client/models/ViewTeamScheduleResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AvailabilitySchema } from './AvailabilitySchema'; +export type ViewTeamScheduleResponse = { + playerAvailability: Record; +}; + diff --git a/availabili.tf/src/client/services/DefaultService.ts b/availabili.tf/src/client/services/DefaultService.ts index fa5c8d3..c96288b 100644 --- a/availabili.tf/src/client/services/DefaultService.ts +++ b/availabili.tf/src/client/services/DefaultService.ts @@ -13,6 +13,7 @@ import type { ViewAvailablePlayersResponse } from '../models/ViewAvailablePlayer import type { ViewScheduleResponse } from '../models/ViewScheduleResponse'; import type { ViewTeamMembersResponseList } from '../models/ViewTeamMembersResponseList'; import type { ViewTeamResponse } from '../models/ViewTeamResponse'; +import type { ViewTeamScheduleResponse } from '../models/ViewTeamScheduleResponse'; import type { ViewTeamsResponse } from '../models/ViewTeamsResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; @@ -130,6 +131,32 @@ export class DefaultService { mediaType: 'application/json', }); } + /** + * get_team_availability + * @param windowStart + * @param teamId + * @param windowSizeDays + * @returns ViewTeamScheduleResponse OK + * @throws ApiError + */ + public getApiScheduleTeam( + windowStart: string, + teamId: number, + windowSizeDays: number = 7, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/schedule/team', + query: { + 'windowStart': windowStart, + 'teamId': teamId, + 'windowSizeDays': windowSizeDays, + }, + errors: { + 422: `Unprocessable Entity`, + }, + }); + } /** * view_available_at_time * @param startTime diff --git a/availabili.tf/src/components/AvailabilityGrid.vue b/availabili.tf/src/components/AvailabilityGrid.vue index b3a7812..d88a393 100644 --- a/availabili.tf/src/components/AvailabilityGrid.vue +++ b/availabili.tf/src/components/AvailabilityGrid.vue @@ -1,12 +1,18 @@