Skip to content

Commit

Permalink
regenerate types, remove .vscode folder
Browse files Browse the repository at this point in the history
  • Loading branch information
acrantel committed Feb 8, 2024
1 parent f188c37 commit 65fb86d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 16 deletions.
6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

18 changes: 14 additions & 4 deletions frontend2/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,22 @@ paths:
/api/compete/{episode_id}/match/tournament/:
get:
operationId: compete_match_tournament_list
description: List matches played in a tournament.
description: |-
List matches played in a tournament, or in all tournaments if not specified.
Passing the external_id_private of a tournament allows match lookup for the
tournament, even if it's private. Client uses the external_id_private parameter
parameters:
- in: path
name: episode_id
schema:
type: string
pattern: ^[^\/.]+$
required: true
- in: query
name: external_id_private
schema:
type: string
description: A private id to filter for.
- name: page
required: false
in: query
Expand Down Expand Up @@ -2213,8 +2221,8 @@ components:
type: string
readOnly: true
tournament_round:
type: integer
readOnly: true
allOf:
- $ref: '#/components/schemas/TournamentRound'
nullable: true
participants:
type: array
Expand Down Expand Up @@ -2251,7 +2259,6 @@ components:
- participants
- replay_url
- status
- tournament_round
MatchParticipant:
type: object
properties:
Expand Down Expand Up @@ -3093,7 +3100,10 @@ components:
type: integer
release_status:
$ref: '#/components/schemas/ReleaseStatusEnum'
display_order:
type: integer
required:
- display_order
- id
- name
- tournament
Expand Down
9 changes: 7 additions & 2 deletions frontend2/src/api/_autogen/apis/CompeteApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export interface CompeteMatchScrimmageListRequest {

export interface CompeteMatchTournamentListRequest {
episodeId: string;
externalIdPrivate?: string;
page?: number;
roundId?: number;
teamId?: number;
Expand Down Expand Up @@ -470,7 +471,7 @@ export class CompeteApi extends runtime.BaseAPI {
}

/**
* List matches played in a tournament.
* List matches played in a tournament, or in all tournaments if not specified. Passing the external_id_private of a tournament allows match lookup for the tournament, even if it\'s private. Client uses the external_id_private parameter
*/
async competeMatchTournamentListRaw(requestParameters: CompeteMatchTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedMatchList>> {
if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) {
Expand All @@ -479,6 +480,10 @@ export class CompeteApi extends runtime.BaseAPI {

const queryParameters: any = {};

if (requestParameters.externalIdPrivate !== undefined) {
queryParameters['external_id_private'] = requestParameters.externalIdPrivate;
}

if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
Expand Down Expand Up @@ -516,7 +521,7 @@ export class CompeteApi extends runtime.BaseAPI {
}

/**
* List matches played in a tournament.
* List matches played in a tournament, or in all tournaments if not specified. Passing the external_id_private of a tournament allows match lookup for the tournament, even if it\'s private. Client uses the external_id_private parameter
*/
async competeMatchTournamentList(requestParameters: CompeteMatchTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedMatchList> {
const response = await this.competeMatchTournamentListRaw(requestParameters, initOverrides);
Expand Down
14 changes: 10 additions & 4 deletions frontend2/src/api/_autogen/models/Match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ import {
StatusBccEnumFromJSONTyped,
StatusBccEnumToJSON,
} from './StatusBccEnum';
import type { TournamentRound } from './TournamentRound';
import {
TournamentRoundFromJSON,
TournamentRoundFromJSONTyped,
TournamentRoundToJSON,
} from './TournamentRound';

/**
*
Expand Down Expand Up @@ -52,10 +58,10 @@ export interface Match {
readonly episode: string;
/**
*
* @type {number}
* @type {TournamentRound}
* @memberof Match
*/
readonly tournament_round: number | null;
tournament_round?: TournamentRound | null;
/**
*
* @type {Array<MatchParticipant>}
Expand Down Expand Up @@ -102,7 +108,6 @@ export function instanceOfMatch(value: object): boolean {
isInstance = isInstance && "id" in value;
isInstance = isInstance && "status" in value;
isInstance = isInstance && "episode" in value;
isInstance = isInstance && "tournament_round" in value;
isInstance = isInstance && "participants" in value;
isInstance = isInstance && "maps" in value;
isInstance = isInstance && "alternate_order" in value;
Expand All @@ -126,7 +131,7 @@ export function MatchFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mat
'id': json['id'],
'status': StatusBccEnumFromJSON(json['status']),
'episode': json['episode'],
'tournament_round': json['tournament_round'],
'tournament_round': !exists(json, 'tournament_round') ? undefined : TournamentRoundFromJSON(json['tournament_round']),
'participants': (json['participants'] === null ? null : (json['participants'] as Array<any>).map(MatchParticipantFromJSON)),
'maps': json['maps'],
'alternate_order': json['alternate_order'],
Expand All @@ -145,6 +150,7 @@ export function MatchToJSON(value?: Match | null): any {
}
return {

'tournament_round': TournamentRoundToJSON(value.tournament_round),
'participants': (value.participants === null ? null : (value.participants as Array<any>).map(MatchParticipantToJSON)),
};
}
Expand Down
9 changes: 9 additions & 0 deletions frontend2/src/api/_autogen/models/TournamentRound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export interface TournamentRound {
* @memberof TournamentRound
*/
release_status?: ReleaseStatusEnum;
/**
*
* @type {number}
* @memberof TournamentRound
*/
display_order: number;
}

/**
Expand All @@ -72,6 +78,7 @@ export function instanceOfTournamentRound(value: object): boolean {
isInstance = isInstance && "id" in value;
isInstance = isInstance && "tournament" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "display_order" in value;

return isInstance;
}
Expand All @@ -92,6 +99,7 @@ export function TournamentRoundFromJSONTyped(json: any, ignoreDiscriminator: boo
'name': json['name'],
'maps': !exists(json, 'maps') ? undefined : json['maps'],
'release_status': !exists(json, 'release_status') ? undefined : ReleaseStatusEnumFromJSON(json['release_status']),
'display_order': json['display_order'],
};
}

Expand All @@ -109,6 +117,7 @@ export function TournamentRoundToJSON(value?: TournamentRound | null): any {
'name': value.name,
'maps': value.maps,
'release_status': ReleaseStatusEnumToJSON(value.release_status),
'display_order': value.display_order,
};
}

0 comments on commit 65fb86d

Please sign in to comment.