diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37e61c3f7..e71164e3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,9 +4,12 @@ repos: hooks: - id: check-merge-conflict - id: end-of-file-fixer + exclude: ^frontend2/src/utils/types - id: mixed-line-ending args: ["--fix=lf"] + exclude: ^frontend2/src/utils/types - id: trailing-whitespace + exclude: ^frontend2/src/utils/types - repo: https://github.com/dnephin/pre-commit-golang rev: v0.5.1 diff --git a/backend/siarnaq/api/compete/views.py b/backend/siarnaq/api/compete/views.py index a492dd8e7..89c6f9bb0 100644 --- a/backend/siarnaq/api/compete/views.py +++ b/backend/siarnaq/api/compete/views.py @@ -7,7 +7,7 @@ from django.db.models import Exists, OuterRef, Q, Subquery from django.utils import timezone from drf_spectacular.utils import OpenApiParameter, OpenApiResponse, extend_schema -from rest_framework import mixins, status, viewsets +from rest_framework import mixins, serializers, status, viewsets from rest_framework.decorators import action from rest_framework.exceptions import APIException from rest_framework.permissions import IsAdminUser, IsAuthenticated @@ -149,6 +149,10 @@ def create(self, request, *, episode_id): headers=headers, ) + @extend_schema( + # https://drf-spectacular.readthedocs.io/en/latest/faq.html#i-m-using-action-detail-false-but-the-response-schema-is-not-a-list + responses=TournamentSubmissionSerializer(many=True) + ) @action( detail=False, methods=["get"], serializer_class=TournamentSubmissionSerializer ) @@ -409,7 +413,7 @@ def report(self, request, pk=None, *, episode_id): detail=True, methods=["post"], permission_classes=(IsAdminUser,), - serializer_class=None, + serializer_class=serializers.Serializer, throttle_classes=(), ) def rating_update(self, request, pk=None, *, episode_id): @@ -424,7 +428,7 @@ def rating_update(self, request, pk=None, *, episode_id): detail=True, methods=["post"], permission_classes=(IsAdminUser,), - serializer_class=None, + serializer_class=serializers.Serializer, throttle_classes=(), ) def publish_public_bracket(self, request, pk=None, *, episode_id): diff --git a/backend/siarnaq/api/teams/views.py b/backend/siarnaq/api/teams/views.py index 20a97b090..d3a63dd5d 100644 --- a/backend/siarnaq/api/teams/views.py +++ b/backend/siarnaq/api/teams/views.py @@ -7,7 +7,7 @@ from django.http import Http404 from django.shortcuts import get_object_or_404 from drf_spectacular.utils import extend_schema -from rest_framework import filters, mixins, status, viewsets +from rest_framework import filters, mixins, serializers, status, viewsets from rest_framework.decorators import action from rest_framework.permissions import IsAdminUser, IsAuthenticated from rest_framework.response import Response @@ -114,7 +114,7 @@ def me(self, request, *, episode_id): @action( detail=False, methods=["post"], - serializer_class=None, + serializer_class=serializers.Serializer, permission_classes=(IsAuthenticated, IsEpisodeAvailable), ) def leave(self, request, *, episode_id): diff --git a/backend/siarnaq/settings.py b/backend/siarnaq/settings.py index e1bb418a2..57a9d2a71 100644 --- a/backend/siarnaq/settings.py +++ b/backend/siarnaq/settings.py @@ -510,3 +510,10 @@ def dropper(logger, method_name, event_dict): raise structlog.DropEvent structlog.configure(processors=[dropper]) + +SPECTACULAR_SETTINGS = { + # Split components into request and response parts where appropriate + # This setting is highly recommended to achieve the most accurate API + # description, however it comes at the cost of having more components. + "COMPONENT_SPLIT_REQUEST": True, +} diff --git a/frontend2/.prettierignore b/frontend2/.prettierignore index f94045d21..0282f4b13 100644 --- a/frontend2/.prettierignore +++ b/frontend2/.prettierignore @@ -2,7 +2,6 @@ /node_modules /.pnp .pnp.js -/types # production /build diff --git a/frontend2/generate_types.bat b/frontend2/generate_types.bat index 3e5ccb73d..dfbdeeec9 100644 --- a/frontend2/generate_types.bat +++ b/frontend2/generate_types.bat @@ -3,9 +3,10 @@ call conda activate galaxy echo "navigate to galaxy folder" cd .. echo "Generate OpenAPI 3.0 backend schema from siarnaq" -python backend/manage.py spectacular --file schema.yml +python backend/manage.py spectacular --file schema.yml --validate + :: echo "Download openapitools" :: npm install @openapitools/openapi-generator-cli -g :: if you have a java error, just install java 8 and reload terminal echo "Generate typescript types from schema" -npx @openapitools/openapi-generator-cli generate -i schema.yml -o frontend2/src/utils/types -g typescript-jquery --additional-properties=modelPropertyNaming=camelCase --additional-properties=disallowAdditionalPropertiesIfNotPresent=false +npx @openapitools/openapi-generator-cli generate -i schema.yml -o frontend2/src/utils/types -g typescript-fetch --additional-properties=modelPropertyNaming=original --additional-properties=disallowAdditionalPropertiesIfNotPresent=false --additional-properties=stringEnums=true diff --git a/frontend2/src/utils/types/.openapi-generator/FILES b/frontend2/src/utils/types/.openapi-generator/FILES index 45ab4061d..6a01fcb18 100644 --- a/frontend2/src/utils/types/.openapi-generator/FILES +++ b/frontend2/src/utils/types/.openapi-generator/FILES @@ -1,65 +1,86 @@ -api/ApiApi.ts -api/api.ts -configuration.ts -git_push.sh +.openapi-generator-ignore +apis/CompeteApi.ts +apis/EpisodeApi.ts +apis/SpecsApi.ts +apis/TeamApi.ts +apis/TokenApi.ts +apis/UserApi.ts +apis/index.ts index.ts -model/Autoscrim.ts -model/ClassRequirement.ts -model/CountryEnum.ts -model/EligibilityCriterion.ts -model/Email.ts -model/Episode.ts -model/GenderEnum.ts -model/HistoricalRating.ts -model/LanguageEnum.ts -model/Match.ts -model/MatchParticipant.ts -model/MatchReport.ts -model/ModelMap.ts -model/PaginatedClassRequirementList.ts -model/PaginatedEpisodeList.ts -model/PaginatedMatchList.ts -model/PaginatedScrimmageRequestList.ts -model/PaginatedSubmissionList.ts -model/PaginatedTeamPublicList.ts -model/PaginatedTournamentList.ts -model/PaginatedTournamentRoundList.ts -model/PasswordToken.ts -model/PatchedTeamPrivate.ts -model/PatchedUserPrivate.ts -model/PlayerOrderEnum.ts -model/ReleaseStatusEnum.ts -model/ResetToken.ts -model/SaturnInvocation.ts -model/ScrimmageRequest.ts -model/ScrimmageRequestStatusEnum.ts -model/Status526Enum.ts -model/StatusBccEnum.ts -model/StyleEnum.ts -model/Submission.ts -model/SubmissionDownload.ts -model/SubmissionReport.ts -model/TeamAvatar.ts -model/TeamCreate.ts -model/TeamJoin.ts -model/TeamPrivate.ts -model/TeamProfilePrivate.ts -model/TeamProfilePublic.ts -model/TeamPublic.ts -model/TeamReport.ts -model/TokenObtainPair.ts -model/TokenRefresh.ts -model/TokenVerify.ts -model/Tournament.ts -model/TournamentRound.ts -model/TournamentSubmission.ts -model/UserAvatar.ts -model/UserCreate.ts -model/UserPassed.ts -model/UserPrivate.ts -model/UserProfilePrivate.ts -model/UserProfilePublic.ts -model/UserPublic.ts -model/UserResume.ts -model/models.ts -variables.ts +models/AutoscrimRequest.ts +models/ClassRequirement.ts +models/CountryEnum.ts +models/EligibilityCriterion.ts +models/Email.ts +models/EmailRequest.ts +models/Episode.ts +models/GenderEnum.ts +models/HistoricalRating.ts +models/LanguageEnum.ts +models/Match.ts +models/MatchParticipant.ts +models/MatchReportRequest.ts +models/ModelMap.ts +models/PaginatedClassRequirementList.ts +models/PaginatedEpisodeList.ts +models/PaginatedMatchList.ts +models/PaginatedScrimmageRequestList.ts +models/PaginatedSubmissionList.ts +models/PaginatedTeamPublicList.ts +models/PaginatedTournamentList.ts +models/PaginatedTournamentRoundList.ts +models/PaginatedTournamentSubmissionList.ts +models/PasswordToken.ts +models/PasswordTokenRequest.ts +models/PatchedTeamPrivateRequest.ts +models/PatchedUserPrivateRequest.ts +models/PlayerOrderEnum.ts +models/ReleaseStatusEnum.ts +models/ResetToken.ts +models/ResetTokenRequest.ts +models/SaturnInvocationRequest.ts +models/ScrimmageRequest.ts +models/ScrimmageRequestRequest.ts +models/ScrimmageStatusEnum.ts +models/Status526Enum.ts +models/StatusBccEnum.ts +models/StyleEnum.ts +models/Submission.ts +models/SubmissionDownload.ts +models/SubmissionReportRequest.ts +models/SubmissionRequest.ts +models/TeamAvatarRequest.ts +models/TeamCreate.ts +models/TeamCreateRequest.ts +models/TeamJoinRequest.ts +models/TeamPrivate.ts +models/TeamPrivateRequest.ts +models/TeamProfilePrivate.ts +models/TeamProfilePrivateRequest.ts +models/TeamProfilePublic.ts +models/TeamPublic.ts +models/TeamReportRequest.ts +models/TokenObtainPair.ts +models/TokenObtainPairRequest.ts +models/TokenRefresh.ts +models/TokenRefreshRequest.ts +models/TokenVerifyRequest.ts +models/Tournament.ts +models/TournamentRound.ts +models/TournamentSubmission.ts +models/UserAvatarRequest.ts +models/UserCreate.ts +models/UserCreateRequest.ts +models/UserPassed.ts +models/UserPrivate.ts +models/UserPrivateRequest.ts +models/UserProfilePrivate.ts +models/UserProfilePrivateRequest.ts +models/UserProfilePublic.ts +models/UserProfilePublicRequest.ts +models/UserPublic.ts +models/UserPublicRequest.ts +models/UserResume.ts +models/UserResumeRequest.ts +models/index.ts +runtime.ts diff --git a/frontend2/src/utils/types/.openapi-generator/VERSION b/frontend2/src/utils/types/.openapi-generator/VERSION index 826f5ce03..cd802a1ec 100644 --- a/frontend2/src/utils/types/.openapi-generator/VERSION +++ b/frontend2/src/utils/types/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 +6.6.0 \ No newline at end of file diff --git a/frontend2/src/utils/types/api/ApiApi.ts b/frontend2/src/utils/types/api/ApiApi.ts deleted file mode 100644 index fb30c624c..000000000 --- a/frontend2/src/utils/types/api/ApiApi.ts +++ /dev/null @@ -1,4442 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as $ from 'jquery'; -import * as models from '../model/models'; -import { COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - -/* tslint:disable:no-unused-variable member-ordering */ - - -export class ApiApi { - protected basePath = 'http://localhost'; - public defaultHeaders: Array = []; - public defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings = undefined; - public configuration: Configuration = new Configuration(); - - constructor(basePath?: string, configuration?: Configuration, defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings) { - if (basePath) { - this.basePath = basePath; - } - if (configuration) { - this.configuration = configuration; - } - if (defaultExtraJQueryAjaxSettings) { - this.defaultExtraJQueryAjaxSettings = defaultExtraJQueryAjaxSettings; - } - } - - private extendObj(objA: T2, objB: T2): T1|T2 { - for (let key in objB) { - if (objB.hasOwnProperty(key)) { - objA[key] = objB[key]; - } - } - return objA; - } - - /** - * List the historical rating of a team. - * @param episodeId - * @param teamId A team to filter for. Defaults to your own team. - */ - public apiCompeteMatchHistoricalRatingRetrieve(episodeId: string, teamId?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.HistoricalRating; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/historical_rating/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchHistoricalRatingRetrieve.'); - } - - if (teamId !== null && teamId !== undefined) { - queryParameters['team_id'] = teamId; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.HistoricalRating; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.HistoricalRating, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for viewing and retrieving Matches. - * @param episodeId - * @param page A page number within the paginated result set. - */ - public apiCompeteMatchList(episodeId: string, page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedMatchList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedMatchList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedMatchList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Publish the result of a tournament match to the public bracket. - * @param episodeId - * @param id - */ - public apiCompeteMatchPublishPublicBracketCreate(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/{id}/publish_public_bracket/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchPublishPublicBracketCreate.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteMatchPublishPublicBracketCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Try to finalize the rating of this match. - * @param episodeId - * @param id - */ - public apiCompeteMatchRatingUpdateCreate(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/{id}/rating_update/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchRatingUpdateCreate.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteMatchRatingUpdateCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Report the outcome of this match on Saturn. - * @param episodeId - * @param id - * @param matchReport - */ - public apiCompeteMatchReportCreate(episodeId: string, id: string, matchReport: models.MatchReport, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/{id}/report/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchReportCreate.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteMatchReportCreate.'); - } - - // verify required parameter 'matchReport' is not null or undefined - if (matchReport === null || matchReport === undefined) { - throw new Error('Required parameter matchReport was null or undefined when calling apiCompeteMatchReportCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(matchReport); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for viewing and retrieving Matches. - * @param episodeId - * @param id - */ - public apiCompeteMatchRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.Match; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteMatchRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.Match; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.Match, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * List all scrimmages that a particular team participated in. - * @param episodeId - * @param page A page number within the paginated result set. - * @param teamId A team to filter for. Defaults to your own team. - */ - public apiCompeteMatchScrimmageList(episodeId: string, page?: number, teamId?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedMatchList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/scrimmage/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchScrimmageList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - if (teamId !== null && teamId !== undefined) { - queryParameters['team_id'] = teamId; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedMatchList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedMatchList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * List matches played in a tournament. - * @param episodeId - * @param page A page number within the paginated result set. - * @param roundId A tournament round to filter for. - * @param teamId A team to filter for. - * @param tournamentId A tournament to filter for. - */ - public apiCompeteMatchTournamentList(episodeId: string, page?: number, roundId?: number, teamId?: number, tournamentId?: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedMatchList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/match/tournament/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteMatchTournamentList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - if (roundId !== null && roundId !== undefined) { - queryParameters['round_id'] = roundId; - } - if (teamId !== null && teamId !== undefined) { - queryParameters['team_id'] = teamId; - } - if (tournamentId !== null && tournamentId !== undefined) { - queryParameters['tournament_id'] = tournamentId; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedMatchList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedMatchList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Accept a scrimmage request. - * @param episodeId - * @param id - */ - public apiCompeteRequestAcceptCreate(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/request/{id}/accept/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteRequestAcceptCreate.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteRequestAcceptCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for creating and responding to Scrimmage Requests. - * @param episodeId - * @param scrimmageRequest - */ - public apiCompeteRequestCreate(episodeId: string, scrimmageRequest: models.ScrimmageRequest, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.ScrimmageRequest; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/request/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteRequestCreate.'); - } - - // verify required parameter 'scrimmageRequest' is not null or undefined - if (scrimmageRequest === null || scrimmageRequest === undefined) { - throw new Error('Required parameter scrimmageRequest was null or undefined when calling apiCompeteRequestCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(scrimmageRequest); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.ScrimmageRequest; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.ScrimmageRequest, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Cancel a scrimmage request. - * @param episodeId - * @param id - */ - public apiCompeteRequestDestroy(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/request/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteRequestDestroy.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteRequestDestroy.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'DELETE', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Get all pending scrimmage requests received. - * @param episodeId - * @param page A page number within the paginated result set. - */ - public apiCompeteRequestInboxList(episodeId: string, page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedScrimmageRequestList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/request/inbox/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteRequestInboxList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedScrimmageRequestList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedScrimmageRequestList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Get all pending scrimmage requests sent. - * @param episodeId - * @param page A page number within the paginated result set. - */ - public apiCompeteRequestOutboxList(episodeId: string, page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedScrimmageRequestList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/request/outbox/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteRequestOutboxList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedScrimmageRequestList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedScrimmageRequestList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Reject a scrimmage request. - * @param episodeId - * @param id - */ - public apiCompeteRequestRejectCreate(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/request/{id}/reject/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteRequestRejectCreate.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteRequestRejectCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Create a new submission. This operation creates a submission record in the database, saves the source code to the storage bucket on Google cloud, and enqueues the submission for compilation on Saturn. - * @param episodeId - * @param submission - */ - public apiCompeteSubmissionCreate(episodeId: string, submission: models.Submission, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.Submission; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/submission/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteSubmissionCreate.'); - } - - // verify required parameter 'submission' is not null or undefined - if (submission === null || submission === undefined) { - throw new Error('Required parameter submission was null or undefined when calling apiCompeteSubmissionCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(submission); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.Submission; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.Submission, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Download the source code associated with a submission. - * @param episodeId - * @param id - */ - public apiCompeteSubmissionDownloadRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.SubmissionDownload; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/submission/{id}/download/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteSubmissionDownloadRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteSubmissionDownloadRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.SubmissionDownload; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.SubmissionDownload, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for creating and retrieving Submissions. - * @param episodeId - * @param page A page number within the paginated result set. - */ - public apiCompeteSubmissionList(episodeId: string, page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedSubmissionList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/submission/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteSubmissionList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedSubmissionList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedSubmissionList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Report the outcome of this submission on Saturn. - * @param episodeId - * @param id - * @param submissionReport - */ - public apiCompeteSubmissionReportCreate(episodeId: string, id: string, submissionReport: models.SubmissionReport, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/submission/{id}/report/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteSubmissionReportCreate.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteSubmissionReportCreate.'); - } - - // verify required parameter 'submissionReport' is not null or undefined - if (submissionReport === null || submissionReport === undefined) { - throw new Error('Required parameter submissionReport was null or undefined when calling apiCompeteSubmissionReportCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(submissionReport); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for creating and retrieving Submissions. - * @param episodeId - * @param id - */ - public apiCompeteSubmissionRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.Submission; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/submission/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteSubmissionRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiCompeteSubmissionRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.Submission; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.Submission, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve the submissions used in tournaments by the current team.. - * @param episodeId - */ - public apiCompeteSubmissionTournamentRetrieve(episodeId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TournamentSubmission; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/compete/{episode_id}/submission/tournament/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiCompeteSubmissionTournamentRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TournamentSubmission; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TournamentSubmission, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Trigger a round of autoscrimmages. - * @param id - * @param autoscrim - */ - public apiEpisodeEAutoscrimCreate(id: string, autoscrim: models.Autoscrim, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/e/{id}/autoscrim/'.replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiEpisodeEAutoscrimCreate.'); - } - - // verify required parameter 'autoscrim' is not null or undefined - if (autoscrim === null || autoscrim === undefined) { - throw new Error('Required parameter autoscrim was null or undefined when calling apiEpisodeEAutoscrimCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(autoscrim); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving Episodes. - * @param page A page number within the paginated result set. - */ - public apiEpisodeEList(page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedEpisodeList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/e/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedEpisodeList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedEpisodeList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving Episodes. - * @param id - */ - public apiEpisodeERetrieve(id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.Episode; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/e/{id}/'.replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiEpisodeERetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.Episode; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.Episode, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving Maps. - * @param episodeId - */ - public apiEpisodeMapList(episodeId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: Array; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/{episode_id}/map/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiEpisodeMapList.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: Array; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: Array, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving Maps. - * @param episodeId - * @param id - */ - public apiEpisodeMapRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/{episode_id}/map/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiEpisodeMapRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiEpisodeMapRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving Tournaments. - * @param episodeId - * @param page A page number within the paginated result set. - */ - public apiEpisodeTournamentList(episodeId: string, page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedTournamentList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/{episode_id}/tournament/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiEpisodeTournamentList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedTournamentList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedTournamentList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve the next upcoming tournament, as ordered by submission freeze time. - * @param episodeId - */ - public apiEpisodeTournamentNextRetrieve(episodeId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.Tournament; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/{episode_id}/tournament/next/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiEpisodeTournamentNextRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.Tournament; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.Tournament, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving Tournaments. - * @param episodeId - * @param id - */ - public apiEpisodeTournamentRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.Tournament; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/{episode_id}/tournament/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiEpisodeTournamentRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiEpisodeTournamentRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.Tournament; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.Tournament, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving tournament rounds. - * @param episodeId - * @param tournament - * @param page A page number within the paginated result set. - */ - public apiEpisodeTournamentRoundList(episodeId: string, tournament: string, page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedTournamentRoundList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/{episode_id}/tournament/{tournament}/round/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'tournament' + '}', encodeURIComponent(String(tournament))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiEpisodeTournamentRoundList.'); - } - - // verify required parameter 'tournament' is not null or undefined - if (tournament === null || tournament === undefined) { - throw new Error('Required parameter tournament was null or undefined when calling apiEpisodeTournamentRoundList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedTournamentRoundList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedTournamentRoundList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving tournament rounds. - * @param episodeId - * @param id - * @param tournament - */ - public apiEpisodeTournamentRoundRetrieve(episodeId: string, id: string, tournament: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TournamentRound; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/episode/{episode_id}/tournament/{tournament}/round/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))).replace('{' + 'tournament' + '}', encodeURIComponent(String(tournament))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiEpisodeTournamentRoundRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiEpisodeTournamentRoundRetrieve.'); - } - - // verify required parameter 'tournament' is not null or undefined - if (tournament === null || tournament === undefined) { - throw new Error('Required parameter tournament was null or undefined when calling apiEpisodeTournamentRoundRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TournamentRound; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TournamentRound, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json - * @param format - * @param lang - */ - public apiSpecsRetrieve(format?: 'json' | 'yaml', lang?: 'af' | 'ar' | 'ar-dz' | 'ast' | 'az' | 'be' | 'bg' | 'bn' | 'br' | 'bs' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'dsb' | 'el' | 'en' | 'en-au' | 'en-gb' | 'eo' | 'es' | 'es-ar' | 'es-co' | 'es-mx' | 'es-ni' | 'es-ve' | 'et' | 'eu' | 'fa' | 'fi' | 'fr' | 'fy' | 'ga' | 'gd' | 'gl' | 'he' | 'hi' | 'hr' | 'hsb' | 'hu' | 'hy' | 'ia' | 'id' | 'ig' | 'io' | 'is' | 'it' | 'ja' | 'ka' | 'kab' | 'kk' | 'km' | 'kn' | 'ko' | 'ky' | 'lb' | 'lt' | 'lv' | 'mk' | 'ml' | 'mn' | 'mr' | 'my' | 'nb' | 'ne' | 'nl' | 'nn' | 'os' | 'pa' | 'pl' | 'pt' | 'pt-br' | 'ro' | 'ru' | 'sk' | 'sl' | 'sq' | 'sr' | 'sr-latn' | 'sv' | 'sw' | 'ta' | 'te' | 'tg' | 'th' | 'tk' | 'tr' | 'tt' | 'udm' | 'uk' | 'ur' | 'uz' | 'vi' | 'zh-hans' | 'zh-hant', extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: { [key: string]: any; }; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/specs/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - if (format !== null && format !== undefined) { - queryParameters['format'] = format; - } - if (lang !== null && lang !== undefined) { - queryParameters['lang'] = lang; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/vnd.oai.openapi', - 'application/yaml', - 'application/vnd.oai.openapi+json', - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: { [key: string]: any; }; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: { [key: string]: any; }, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and checking class requirements. - * @param episodeId - * @param id - */ - public apiTeamRequirementCheckRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserPassed; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/requirement/{id}/check/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamRequirementCheckRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiTeamRequirementCheckRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserPassed; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserPassed, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and checking class requirements. - * @param episodeId - * @param id - */ - public apiTeamRequirementComputeRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserPassed; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/requirement/{id}/compute/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamRequirementComputeRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiTeamRequirementComputeRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserPassed; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserPassed, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and checking class requirements. - * @param episodeId - * @param page A page number within the paginated result set. - */ - public apiTeamRequirementList(episodeId: string, page?: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedClassRequirementList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/requirement/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamRequirementList.'); - } - - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedClassRequirementList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedClassRequirementList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update team strategy report - * @param episodeId - */ - public apiTeamRequirementReportRetrieve(episodeId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/requirement/report/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamRequirementReportRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update team strategy report - * @param episodeId - * @param teamReport - */ - public apiTeamRequirementReportUpdate(episodeId: string, teamReport: models.TeamReport, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/requirement/report/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamRequirementReportUpdate.'); - } - - // verify required parameter 'teamReport' is not null or undefined - if (teamReport === null || teamReport === undefined) { - throw new Error('Required parameter teamReport was null or undefined when calling apiTeamRequirementReportUpdate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'PUT', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(teamReport); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and checking class requirements. - * @param episodeId - * @param id - */ - public apiTeamRequirementRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.ClassRequirement; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/requirement/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamRequirementRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiTeamRequirementRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.ClassRequirement; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.ClassRequirement, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Update uploaded avatar. - * @param episodeId - * @param teamAvatar - */ - public apiTeamTAvatarCreate(episodeId: string, teamAvatar: models.TeamAvatar, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/avatar/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTAvatarCreate.'); - } - - // verify required parameter 'teamAvatar' is not null or undefined - if (teamAvatar === null || teamAvatar === undefined) { - throw new Error('Required parameter teamAvatar was null or undefined when calling apiTeamTAvatarCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(teamAvatar); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. - * @param episodeId - * @param teamCreate - */ - public apiTeamTCreate(episodeId: string, teamCreate: models.TeamCreate, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TeamCreate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTCreate.'); - } - - // verify required parameter 'teamCreate' is not null or undefined - if (teamCreate === null || teamCreate === undefined) { - throw new Error('Required parameter teamCreate was null or undefined when calling apiTeamTCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(teamCreate); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TeamCreate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TeamCreate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. - * @param episodeId - * @param teamJoin - */ - public apiTeamTJoinCreate(episodeId: string, teamJoin: models.TeamJoin, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/join/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTJoinCreate.'); - } - - // verify required parameter 'teamJoin' is not null or undefined - if (teamJoin === null || teamJoin === undefined) { - throw new Error('Required parameter teamJoin was null or undefined when calling apiTeamTJoinCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(teamJoin); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Leave a team. - * @param episodeId - */ - public apiTeamTLeaveCreate(episodeId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/leave/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTLeaveCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. - * @param episodeId - * @param ordering Which field to use when ordering the results. - * @param page A page number within the paginated result set. - * @param search A search term. - */ - public apiTeamTList(episodeId: string, ordering?: string, page?: number, search?: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PaginatedTeamPublicList; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTList.'); - } - - if (ordering !== null && ordering !== undefined) { - queryParameters['ordering'] = ordering; - } - if (page !== null && page !== undefined) { - queryParameters['page'] = page; - } - if (search !== null && search !== undefined) { - queryParameters['search'] = search; - } - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PaginatedTeamPublicList; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PaginatedTeamPublicList, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update information about the current team. - * @param episodeId - * @param patchedTeamPrivate - */ - public apiTeamTMePartialUpdate(episodeId: string, patchedTeamPrivate?: models.PatchedTeamPrivate, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TeamPrivate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/me/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTMePartialUpdate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'PATCH', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(patchedTeamPrivate); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TeamPrivate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TeamPrivate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update information about the current team. - * @param episodeId - */ - public apiTeamTMeRetrieve(episodeId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TeamPrivate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/me/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTMeRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TeamPrivate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TeamPrivate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update information about the current team. - * @param episodeId - * @param teamPrivate - */ - public apiTeamTMeUpdate(episodeId: string, teamPrivate?: models.TeamPrivate, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TeamPrivate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/me/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTMeUpdate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'PUT', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(teamPrivate); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TeamPrivate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TeamPrivate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. - * @param episodeId - * @param id - */ - public apiTeamTRetrieve(episodeId: string, id: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TeamPublic; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/team/{episode_id}/t/{id}/'.replace('{' + 'episode_id' + '}', encodeURIComponent(String(episodeId))).replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'episodeId' is not null or undefined - if (episodeId === null || episodeId === undefined) { - throw new Error('Required parameter episodeId was null or undefined when calling apiTeamTRetrieve.'); - } - - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiTeamTRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TeamPublic; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TeamPublic, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials. - * @param tokenObtainPair - */ - public apiTokenCreate(tokenObtainPair: models.TokenObtainPair, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TokenObtainPair; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/token/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'tokenObtainPair' is not null or undefined - if (tokenObtainPair === null || tokenObtainPair === undefined) { - throw new Error('Required parameter tokenObtainPair was null or undefined when calling apiTokenCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(tokenObtainPair); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TokenObtainPair; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TokenObtainPair, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid. - * @param tokenRefresh - */ - public apiTokenRefreshCreate(tokenRefresh: models.TokenRefresh, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TokenRefresh; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/token/refresh/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'tokenRefresh' is not null or undefined - if (tokenRefresh === null || tokenRefresh === undefined) { - throw new Error('Required parameter tokenRefresh was null or undefined when calling apiTokenRefreshCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(tokenRefresh); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TokenRefresh; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TokenRefresh, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Takes a token and indicates if it is valid. This view provides no information about a token\'s fitness for a particular use. - * @param tokenVerify - */ - public apiTokenVerifyCreate(tokenVerify: models.TokenVerify, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TokenVerify; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/token/verify/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'tokenVerify' is not null or undefined - if (tokenVerify === null || tokenVerify === undefined) { - throw new Error('Required parameter tokenVerify was null or undefined when calling apiTokenVerifyCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(tokenVerify); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TokenVerify; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TokenVerify, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * An Api View which provides a method to reset a password based on a unique token - * @param passwordToken - */ - public apiUserPasswordResetConfirmCreate(passwordToken: models.PasswordToken, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.PasswordToken; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/password_reset/confirm/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'passwordToken' is not null or undefined - if (passwordToken === null || passwordToken === undefined) { - throw new Error('Required parameter passwordToken was null or undefined when calling apiUserPasswordResetConfirmCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(passwordToken); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.PasswordToken; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.PasswordToken, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * An Api View which provides a method to request a password reset token based on an e-mail address Sends a signal reset_password_token_created when a reset token was created - * @param email - */ - public apiUserPasswordResetCreate(email: models.Email, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.Email; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/password_reset/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'email' is not null or undefined - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling apiUserPasswordResetCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(email); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.Email; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.Email, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * An Api View which provides a method to verify that a token is valid - * @param resetToken - */ - public apiUserPasswordResetValidateTokenCreate(resetToken: models.ResetToken, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.ResetToken; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/password_reset/validate_token/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'resetToken' is not null or undefined - if (resetToken === null || resetToken === undefined) { - throw new Error('Required parameter resetToken was null or undefined when calling apiUserPasswordResetValidateTokenCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(resetToken); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.ResetToken; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.ResetToken, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Update uploaded avatar. - * @param userAvatar - */ - public apiUserUAvatarCreate(userAvatar: models.UserAvatar, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/avatar/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'userAvatar' is not null or undefined - if (userAvatar === null || userAvatar === undefined) { - throw new Error('Required parameter userAvatar was null or undefined when calling apiUserUAvatarCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(userAvatar); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body?: any; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and updating all user info. - * @param userCreate - */ - public apiUserUCreate(userCreate: models.UserCreate, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserCreate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'userCreate' is not null or undefined - if (userCreate === null || userCreate === undefined) { - throw new Error('Required parameter userCreate was null or undefined when calling apiUserUCreate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'POST', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(userCreate); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserCreate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserCreate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update information about the logged-in user. - * @param patchedUserPrivate - */ - public apiUserUMePartialUpdate(patchedUserPrivate?: models.PatchedUserPrivate, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserPrivate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/me/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'PATCH', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(patchedUserPrivate); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserPrivate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserPrivate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update information about the logged-in user. - */ - public apiUserUMeRetrieve(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserPrivate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/me/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserPrivate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserPrivate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update information about the logged-in user. - * @param userPrivate - */ - public apiUserUMeUpdate(userPrivate: models.UserPrivate, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserPrivate; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/me/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'userPrivate' is not null or undefined - if (userPrivate === null || userPrivate === undefined) { - throw new Error('Required parameter userPrivate was null or undefined when calling apiUserUMeUpdate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'PUT', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(userPrivate); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserPrivate; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserPrivate, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update the uploaded resume. - */ - public apiUserUResumeRetrieve(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserResume; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/resume/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserResume; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserResume, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve or update the uploaded resume. - * @param userResume - */ - public apiUserUResumeUpdate(userResume: models.UserResume, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserResume; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/resume/'; - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'userResume' is not null or undefined - if (userResume === null || userResume === undefined) { - throw new Error('Required parameter userResume was null or undefined when calling apiUserUResumeUpdate.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - headerParams['Content-Type'] = 'application/json'; - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'PUT', - headers: headerParams, - processData: false - }; - - requestOptions.data = JSON.stringify(userResume); - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserResume; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserResume, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * A viewset for retrieving and updating all user info. - * @param id A unique integer value identifying this user. - */ - public apiUserURetrieve(id: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.UserPublic; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/{id}/'.replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiUserURetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.UserPublic; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.UserPublic, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - - /** - * Retrieve all teams associated with a user. - * @param id A unique integer value identifying this user. - */ - public apiUserUTeamsRetrieve(id: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; body: models.TeamPublic; }, - { response: JQueryXHR; errorThrown: string } - > { - let localVarPath = this.basePath + '/api/user/u/{id}/teams/'.replace('{' + 'id' + '}', encodeURIComponent(String(id))); - - let queryParameters: any = {}; - let headerParams: any = {}; - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiUserUTeamsRetrieve.'); - } - - - localVarPath = localVarPath + "?" + $.param(queryParameters); - // to determine the Content-Type header - let consumes: string[] = [ - ]; - - // to determine the Accept header - let produces: string[] = [ - 'application/json' - ]; - - // authentication (jwtAuth) required - // http basic authentication required - if (this.configuration.username || this.configuration.password) { - headerParams['Authorization'] = 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password); - } - - - let requestOptions: JQueryAjaxSettings = { - url: localVarPath, - type: 'GET', - headers: headerParams, - processData: false - }; - - if (headerParams['Content-Type']) { - requestOptions.contentType = headerParams['Content-Type']; - } - - if (extraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); - } - - if (this.defaultExtraJQueryAjaxSettings) { - requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); - } - - let dfd = $.Deferred< - { response: JQueryXHR; body: models.TeamPublic; }, - { response: JQueryXHR; errorThrown: string } - >(); - $.ajax(requestOptions).then( - (data: models.TeamPublic, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve({response: jqXHR, body: data}), - (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject({response: xhr, errorThrown: errorThrown}) - ); - return dfd.promise(); - } - -} diff --git a/frontend2/src/utils/types/api/api.ts b/frontend2/src/utils/types/api/api.ts deleted file mode 100644 index 9adbafe17..000000000 --- a/frontend2/src/utils/types/api/api.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './ApiApi'; -import { ApiApi } from './ApiApi'; -export const APIS = [ApiApi]; diff --git a/frontend2/src/utils/types/apis/CompeteApi.ts b/frontend2/src/utils/types/apis/CompeteApi.ts new file mode 100644 index 000000000..1d647d442 --- /dev/null +++ b/frontend2/src/utils/types/apis/CompeteApi.ts @@ -0,0 +1,1041 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + HistoricalRating, + Match, + MatchReportRequest, + PaginatedMatchList, + PaginatedScrimmageRequestList, + PaginatedSubmissionList, + PaginatedTournamentSubmissionList, + ScrimmageRequest, + ScrimmageRequestRequest, + Submission, + SubmissionDownload, + SubmissionReportRequest, + SubmissionRequest, +} from '../models'; +import { + HistoricalRatingFromJSON, + HistoricalRatingToJSON, + MatchFromJSON, + MatchToJSON, + MatchReportRequestFromJSON, + MatchReportRequestToJSON, + PaginatedMatchListFromJSON, + PaginatedMatchListToJSON, + PaginatedScrimmageRequestListFromJSON, + PaginatedScrimmageRequestListToJSON, + PaginatedSubmissionListFromJSON, + PaginatedSubmissionListToJSON, + PaginatedTournamentSubmissionListFromJSON, + PaginatedTournamentSubmissionListToJSON, + ScrimmageRequestFromJSON, + ScrimmageRequestToJSON, + ScrimmageRequestRequestFromJSON, + ScrimmageRequestRequestToJSON, + SubmissionFromJSON, + SubmissionToJSON, + SubmissionDownloadFromJSON, + SubmissionDownloadToJSON, + SubmissionReportRequestFromJSON, + SubmissionReportRequestToJSON, + SubmissionRequestFromJSON, + SubmissionRequestToJSON, +} from '../models'; + +export interface CompeteMatchHistoricalRatingRetrieveRequest { + episodeId: string; + teamId?: number; +} + +export interface CompeteMatchListRequest { + episodeId: string; + page?: number; +} + +export interface CompeteMatchPublishPublicBracketCreateRequest { + episodeId: string; + id: string; +} + +export interface CompeteMatchRatingUpdateCreateRequest { + episodeId: string; + id: string; +} + +export interface CompeteMatchReportCreateRequest { + episodeId: string; + id: string; + matchReportRequest: MatchReportRequest; +} + +export interface CompeteMatchRetrieveRequest { + episodeId: string; + id: string; +} + +export interface CompeteMatchScrimmageListRequest { + episodeId: string; + page?: number; + teamId?: number; +} + +export interface CompeteMatchTournamentListRequest { + episodeId: string; + page?: number; + roundId?: number; + teamId?: number; + tournamentId?: string; +} + +export interface CompeteRequestAcceptCreateRequest { + episodeId: string; + id: string; +} + +export interface CompeteRequestCreateRequest { + episodeId: string; + scrimmageRequestRequest: ScrimmageRequestRequest; +} + +export interface CompeteRequestDestroyRequest { + episodeId: string; + id: string; +} + +export interface CompeteRequestInboxListRequest { + episodeId: string; + page?: number; +} + +export interface CompeteRequestOutboxListRequest { + episodeId: string; + page?: number; +} + +export interface CompeteRequestRejectCreateRequest { + episodeId: string; + id: string; +} + +export interface CompeteSubmissionCreateRequest { + episodeId: string; + submissionRequest: SubmissionRequest; +} + +export interface CompeteSubmissionDownloadRetrieveRequest { + episodeId: string; + id: string; +} + +export interface CompeteSubmissionListRequest { + episodeId: string; + page?: number; +} + +export interface CompeteSubmissionReportCreateRequest { + episodeId: string; + id: string; + submissionReportRequest: SubmissionReportRequest; +} + +export interface CompeteSubmissionRetrieveRequest { + episodeId: string; + id: string; +} + +export interface CompeteSubmissionTournamentListRequest { + episodeId: string; + page?: number; +} + +/** + * + */ +export class CompeteApi extends runtime.BaseAPI { + + /** + * List the historical rating of a team. + */ + async competeMatchHistoricalRatingRetrieveRaw(requestParameters: CompeteMatchHistoricalRatingRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchHistoricalRatingRetrieve.'); + } + + const queryParameters: any = {}; + + if (requestParameters.teamId !== undefined) { + queryParameters['team_id'] = requestParameters.teamId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/historical_rating/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HistoricalRatingFromJSON(jsonValue)); + } + + /** + * List the historical rating of a team. + */ + async competeMatchHistoricalRatingRetrieve(requestParameters: CompeteMatchHistoricalRatingRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeMatchHistoricalRatingRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for viewing and retrieving Matches. + */ + async competeMatchListRaw(requestParameters: CompeteMatchListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMatchListFromJSON(jsonValue)); + } + + /** + * A viewset for viewing and retrieving Matches. + */ + async competeMatchList(requestParameters: CompeteMatchListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeMatchListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Publish the result of a tournament match to the public bracket. + */ + async competeMatchPublishPublicBracketCreateRaw(requestParameters: CompeteMatchPublishPublicBracketCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchPublishPublicBracketCreate.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeMatchPublishPublicBracketCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/{id}/publish_public_bracket/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Publish the result of a tournament match to the public bracket. + */ + async competeMatchPublishPublicBracketCreate(requestParameters: CompeteMatchPublishPublicBracketCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.competeMatchPublishPublicBracketCreateRaw(requestParameters, initOverrides); + } + + /** + * Try to finalize the rating of this match. + */ + async competeMatchRatingUpdateCreateRaw(requestParameters: CompeteMatchRatingUpdateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchRatingUpdateCreate.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeMatchRatingUpdateCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/{id}/rating_update/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Try to finalize the rating of this match. + */ + async competeMatchRatingUpdateCreate(requestParameters: CompeteMatchRatingUpdateCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.competeMatchRatingUpdateCreateRaw(requestParameters, initOverrides); + } + + /** + * Report the outcome of this match on Saturn. + */ + async competeMatchReportCreateRaw(requestParameters: CompeteMatchReportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchReportCreate.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeMatchReportCreate.'); + } + + if (requestParameters.matchReportRequest === null || requestParameters.matchReportRequest === undefined) { + throw new runtime.RequiredError('matchReportRequest','Required parameter requestParameters.matchReportRequest was null or undefined when calling competeMatchReportCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/{id}/report/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: MatchReportRequestToJSON(requestParameters.matchReportRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Report the outcome of this match on Saturn. + */ + async competeMatchReportCreate(requestParameters: CompeteMatchReportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.competeMatchReportCreateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for viewing and retrieving Matches. + */ + async competeMatchRetrieveRaw(requestParameters: CompeteMatchRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeMatchRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => MatchFromJSON(jsonValue)); + } + + /** + * A viewset for viewing and retrieving Matches. + */ + async competeMatchRetrieve(requestParameters: CompeteMatchRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeMatchRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List all scrimmages that a particular team participated in. + */ + async competeMatchScrimmageListRaw(requestParameters: CompeteMatchScrimmageListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchScrimmageList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + if (requestParameters.teamId !== undefined) { + queryParameters['team_id'] = requestParameters.teamId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/scrimmage/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMatchListFromJSON(jsonValue)); + } + + /** + * List all scrimmages that a particular team participated in. + */ + async competeMatchScrimmageList(requestParameters: CompeteMatchScrimmageListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeMatchScrimmageListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List matches played in a tournament. + */ + async competeMatchTournamentListRaw(requestParameters: CompeteMatchTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeMatchTournamentList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + if (requestParameters.roundId !== undefined) { + queryParameters['round_id'] = requestParameters.roundId; + } + + if (requestParameters.teamId !== undefined) { + queryParameters['team_id'] = requestParameters.teamId; + } + + if (requestParameters.tournamentId !== undefined) { + queryParameters['tournament_id'] = requestParameters.tournamentId; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/match/tournament/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMatchListFromJSON(jsonValue)); + } + + /** + * List matches played in a tournament. + */ + async competeMatchTournamentList(requestParameters: CompeteMatchTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeMatchTournamentListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Accept a scrimmage request. + */ + async competeRequestAcceptCreateRaw(requestParameters: CompeteRequestAcceptCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeRequestAcceptCreate.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeRequestAcceptCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/request/{id}/accept/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Accept a scrimmage request. + */ + async competeRequestAcceptCreate(requestParameters: CompeteRequestAcceptCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.competeRequestAcceptCreateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for creating and responding to Scrimmage Requests. + */ + async competeRequestCreateRaw(requestParameters: CompeteRequestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeRequestCreate.'); + } + + if (requestParameters.scrimmageRequestRequest === null || requestParameters.scrimmageRequestRequest === undefined) { + throw new runtime.RequiredError('scrimmageRequestRequest','Required parameter requestParameters.scrimmageRequestRequest was null or undefined when calling competeRequestCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/request/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ScrimmageRequestRequestToJSON(requestParameters.scrimmageRequestRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScrimmageRequestFromJSON(jsonValue)); + } + + /** + * A viewset for creating and responding to Scrimmage Requests. + */ + async competeRequestCreate(requestParameters: CompeteRequestCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeRequestCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Cancel a scrimmage request. + */ + async competeRequestDestroyRaw(requestParameters: CompeteRequestDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeRequestDestroy.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeRequestDestroy.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/request/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Cancel a scrimmage request. + */ + async competeRequestDestroy(requestParameters: CompeteRequestDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.competeRequestDestroyRaw(requestParameters, initOverrides); + } + + /** + * Get all pending scrimmage requests received. + */ + async competeRequestInboxListRaw(requestParameters: CompeteRequestInboxListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeRequestInboxList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/request/inbox/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedScrimmageRequestListFromJSON(jsonValue)); + } + + /** + * Get all pending scrimmage requests received. + */ + async competeRequestInboxList(requestParameters: CompeteRequestInboxListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeRequestInboxListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get all pending scrimmage requests sent. + */ + async competeRequestOutboxListRaw(requestParameters: CompeteRequestOutboxListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeRequestOutboxList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/request/outbox/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedScrimmageRequestListFromJSON(jsonValue)); + } + + /** + * Get all pending scrimmage requests sent. + */ + async competeRequestOutboxList(requestParameters: CompeteRequestOutboxListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeRequestOutboxListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Reject a scrimmage request. + */ + async competeRequestRejectCreateRaw(requestParameters: CompeteRequestRejectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeRequestRejectCreate.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeRequestRejectCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/request/{id}/reject/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Reject a scrimmage request. + */ + async competeRequestRejectCreate(requestParameters: CompeteRequestRejectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.competeRequestRejectCreateRaw(requestParameters, initOverrides); + } + + /** + * Create a new submission. This operation creates a submission record in the database, saves the source code to the storage bucket on Google cloud, and enqueues the submission for compilation on Saturn. + */ + async competeSubmissionCreateRaw(requestParameters: CompeteSubmissionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeSubmissionCreate.'); + } + + if (requestParameters.submissionRequest === null || requestParameters.submissionRequest === undefined) { + throw new runtime.RequiredError('submissionRequest','Required parameter requestParameters.submissionRequest was null or undefined when calling competeSubmissionCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/submission/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SubmissionRequestToJSON(requestParameters.submissionRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SubmissionFromJSON(jsonValue)); + } + + /** + * Create a new submission. This operation creates a submission record in the database, saves the source code to the storage bucket on Google cloud, and enqueues the submission for compilation on Saturn. + */ + async competeSubmissionCreate(requestParameters: CompeteSubmissionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeSubmissionCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Download the source code associated with a submission. + */ + async competeSubmissionDownloadRetrieveRaw(requestParameters: CompeteSubmissionDownloadRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeSubmissionDownloadRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeSubmissionDownloadRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/submission/{id}/download/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SubmissionDownloadFromJSON(jsonValue)); + } + + /** + * Download the source code associated with a submission. + */ + async competeSubmissionDownloadRetrieve(requestParameters: CompeteSubmissionDownloadRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeSubmissionDownloadRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for creating and retrieving Submissions. + */ + async competeSubmissionListRaw(requestParameters: CompeteSubmissionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeSubmissionList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/submission/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSubmissionListFromJSON(jsonValue)); + } + + /** + * A viewset for creating and retrieving Submissions. + */ + async competeSubmissionList(requestParameters: CompeteSubmissionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeSubmissionListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Report the outcome of this submission on Saturn. + */ + async competeSubmissionReportCreateRaw(requestParameters: CompeteSubmissionReportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeSubmissionReportCreate.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeSubmissionReportCreate.'); + } + + if (requestParameters.submissionReportRequest === null || requestParameters.submissionReportRequest === undefined) { + throw new runtime.RequiredError('submissionReportRequest','Required parameter requestParameters.submissionReportRequest was null or undefined when calling competeSubmissionReportCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/submission/{id}/report/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SubmissionReportRequestToJSON(requestParameters.submissionReportRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Report the outcome of this submission on Saturn. + */ + async competeSubmissionReportCreate(requestParameters: CompeteSubmissionReportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.competeSubmissionReportCreateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for creating and retrieving Submissions. + */ + async competeSubmissionRetrieveRaw(requestParameters: CompeteSubmissionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeSubmissionRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling competeSubmissionRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/submission/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SubmissionFromJSON(jsonValue)); + } + + /** + * A viewset for creating and retrieving Submissions. + */ + async competeSubmissionRetrieve(requestParameters: CompeteSubmissionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeSubmissionRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve the submissions used in tournaments by the current team.. + */ + async competeSubmissionTournamentListRaw(requestParameters: CompeteSubmissionTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling competeSubmissionTournamentList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/compete/{episode_id}/submission/tournament/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTournamentSubmissionListFromJSON(jsonValue)); + } + + /** + * Retrieve the submissions used in tournaments by the current team.. + */ + async competeSubmissionTournamentList(requestParameters: CompeteSubmissionTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.competeSubmissionTournamentListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/frontend2/src/utils/types/apis/EpisodeApi.ts b/frontend2/src/utils/types/apis/EpisodeApi.ts new file mode 100644 index 000000000..3ca16ed4a --- /dev/null +++ b/frontend2/src/utils/types/apis/EpisodeApi.ts @@ -0,0 +1,514 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AutoscrimRequest, + Episode, + PaginatedEpisodeList, + PaginatedTournamentList, + PaginatedTournamentRoundList, + Tournament, + TournamentRound, +} from '../models'; +import { + AutoscrimRequestFromJSON, + AutoscrimRequestToJSON, + EpisodeFromJSON, + EpisodeToJSON, + PaginatedEpisodeListFromJSON, + PaginatedEpisodeListToJSON, + PaginatedTournamentListFromJSON, + PaginatedTournamentListToJSON, + PaginatedTournamentRoundListFromJSON, + PaginatedTournamentRoundListToJSON, + TournamentFromJSON, + TournamentToJSON, + TournamentRoundFromJSON, + TournamentRoundToJSON, +} from '../models'; + +export interface EpisodeEAutoscrimCreateRequest { + id: string; + autoscrimRequest: AutoscrimRequest; +} + +export interface EpisodeEListRequest { + page?: number; +} + +export interface EpisodeERetrieveRequest { + id: string; +} + +export interface EpisodeMapListRequest { + episodeId: string; +} + +export interface EpisodeMapRetrieveRequest { + episodeId: string; + id: string; +} + +export interface EpisodeTournamentListRequest { + episodeId: string; + page?: number; +} + +export interface EpisodeTournamentNextRetrieveRequest { + episodeId: string; +} + +export interface EpisodeTournamentRetrieveRequest { + episodeId: string; + id: string; +} + +export interface EpisodeTournamentRoundListRequest { + episodeId: string; + tournament: string; + page?: number; +} + +export interface EpisodeTournamentRoundRetrieveRequest { + episodeId: string; + id: string; + tournament: string; +} + +/** + * + */ +export class EpisodeApi extends runtime.BaseAPI { + + /** + * Trigger a round of autoscrimmages. + */ + async episodeEAutoscrimCreateRaw(requestParameters: EpisodeEAutoscrimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling episodeEAutoscrimCreate.'); + } + + if (requestParameters.autoscrimRequest === null || requestParameters.autoscrimRequest === undefined) { + throw new runtime.RequiredError('autoscrimRequest','Required parameter requestParameters.autoscrimRequest was null or undefined when calling episodeEAutoscrimCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/e/{id}/autoscrim/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AutoscrimRequestToJSON(requestParameters.autoscrimRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Trigger a round of autoscrimmages. + */ + async episodeEAutoscrimCreate(requestParameters: EpisodeEAutoscrimCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.episodeEAutoscrimCreateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for retrieving Episodes. + */ + async episodeEListRaw(requestParameters: EpisodeEListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/e/`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEpisodeListFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving Episodes. + */ + async episodeEList(requestParameters: EpisodeEListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeEListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving Episodes. + */ + async episodeERetrieveRaw(requestParameters: EpisodeERetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling episodeERetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/e/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EpisodeFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving Episodes. + */ + async episodeERetrieve(requestParameters: EpisodeERetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeERetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving Maps. + */ + async episodeMapListRaw(requestParameters: EpisodeMapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling episodeMapList.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/{episode_id}/map/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * A viewset for retrieving Maps. + */ + async episodeMapList(requestParameters: EpisodeMapListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.episodeMapListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving Maps. + */ + async episodeMapRetrieveRaw(requestParameters: EpisodeMapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling episodeMapRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling episodeMapRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/{episode_id}/map/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * A viewset for retrieving Maps. + */ + async episodeMapRetrieve(requestParameters: EpisodeMapRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeMapRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving Tournaments. + */ + async episodeTournamentListRaw(requestParameters: EpisodeTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling episodeTournamentList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/{episode_id}/tournament/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTournamentListFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving Tournaments. + */ + async episodeTournamentList(requestParameters: EpisodeTournamentListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeTournamentListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve the next upcoming tournament, as ordered by submission freeze time. + */ + async episodeTournamentNextRetrieveRaw(requestParameters: EpisodeTournamentNextRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling episodeTournamentNextRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/{episode_id}/tournament/next/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TournamentFromJSON(jsonValue)); + } + + /** + * Retrieve the next upcoming tournament, as ordered by submission freeze time. + */ + async episodeTournamentNextRetrieve(requestParameters: EpisodeTournamentNextRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeTournamentNextRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving Tournaments. + */ + async episodeTournamentRetrieveRaw(requestParameters: EpisodeTournamentRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling episodeTournamentRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling episodeTournamentRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/{episode_id}/tournament/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TournamentFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving Tournaments. + */ + async episodeTournamentRetrieve(requestParameters: EpisodeTournamentRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeTournamentRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving tournament rounds. + */ + async episodeTournamentRoundListRaw(requestParameters: EpisodeTournamentRoundListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling episodeTournamentRoundList.'); + } + + if (requestParameters.tournament === null || requestParameters.tournament === undefined) { + throw new runtime.RequiredError('tournament','Required parameter requestParameters.tournament was null or undefined when calling episodeTournamentRoundList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/{episode_id}/tournament/{tournament}/round/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"tournament"}}`, encodeURIComponent(String(requestParameters.tournament))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTournamentRoundListFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving tournament rounds. + */ + async episodeTournamentRoundList(requestParameters: EpisodeTournamentRoundListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeTournamentRoundListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving tournament rounds. + */ + async episodeTournamentRoundRetrieveRaw(requestParameters: EpisodeTournamentRoundRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling episodeTournamentRoundRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling episodeTournamentRoundRetrieve.'); + } + + if (requestParameters.tournament === null || requestParameters.tournament === undefined) { + throw new runtime.RequiredError('tournament','Required parameter requestParameters.tournament was null or undefined when calling episodeTournamentRoundRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/episode/{episode_id}/tournament/{tournament}/round/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"tournament"}}`, encodeURIComponent(String(requestParameters.tournament))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TournamentRoundFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving tournament rounds. + */ + async episodeTournamentRoundRetrieve(requestParameters: EpisodeTournamentRoundRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.episodeTournamentRoundRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/frontend2/src/utils/types/apis/SpecsApi.ts b/frontend2/src/utils/types/apis/SpecsApi.ts new file mode 100644 index 000000000..1894e6ca9 --- /dev/null +++ b/frontend2/src/utils/types/apis/SpecsApi.ts @@ -0,0 +1,182 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +export interface SpecsRetrieveRequest { + format?: SpecsRetrieveFormatEnum; + lang?: SpecsRetrieveLangEnum; +} + +/** + * + */ +export class SpecsApi extends runtime.BaseAPI { + + /** + * OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json + */ + async specsRetrieveRaw(requestParameters: SpecsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters.format !== undefined) { + queryParameters['format'] = requestParameters.format; + } + + if (requestParameters.lang !== undefined) { + queryParameters['lang'] = requestParameters.lang; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/specs/`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json + */ + async specsRetrieve(requestParameters: SpecsRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> { + const response = await this.specsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + * @enum {string} + */ +export enum SpecsRetrieveFormatEnum { + Json = 'json', + Yaml = 'yaml' +} +/** + * @export + * @enum {string} + */ +export enum SpecsRetrieveLangEnum { + Af = 'af', + Ar = 'ar', + ArDz = 'ar-dz', + Ast = 'ast', + Az = 'az', + Be = 'be', + Bg = 'bg', + Bn = 'bn', + Br = 'br', + Bs = 'bs', + Ca = 'ca', + Cs = 'cs', + Cy = 'cy', + Da = 'da', + De = 'de', + Dsb = 'dsb', + El = 'el', + En = 'en', + EnAu = 'en-au', + EnGb = 'en-gb', + Eo = 'eo', + Es = 'es', + EsAr = 'es-ar', + EsCo = 'es-co', + EsMx = 'es-mx', + EsNi = 'es-ni', + EsVe = 'es-ve', + Et = 'et', + Eu = 'eu', + Fa = 'fa', + Fi = 'fi', + Fr = 'fr', + Fy = 'fy', + Ga = 'ga', + Gd = 'gd', + Gl = 'gl', + He = 'he', + Hi = 'hi', + Hr = 'hr', + Hsb = 'hsb', + Hu = 'hu', + Hy = 'hy', + Ia = 'ia', + Id = 'id', + Ig = 'ig', + Io = 'io', + Is = 'is', + It = 'it', + Ja = 'ja', + Ka = 'ka', + Kab = 'kab', + Kk = 'kk', + Km = 'km', + Kn = 'kn', + Ko = 'ko', + Ky = 'ky', + Lb = 'lb', + Lt = 'lt', + Lv = 'lv', + Mk = 'mk', + Ml = 'ml', + Mn = 'mn', + Mr = 'mr', + Ms = 'ms', + My = 'my', + Nb = 'nb', + Ne = 'ne', + Nl = 'nl', + Nn = 'nn', + Os = 'os', + Pa = 'pa', + Pl = 'pl', + Pt = 'pt', + PtBr = 'pt-br', + Ro = 'ro', + Ru = 'ru', + Sk = 'sk', + Sl = 'sl', + Sq = 'sq', + Sr = 'sr', + SrLatn = 'sr-latn', + Sv = 'sv', + Sw = 'sw', + Ta = 'ta', + Te = 'te', + Tg = 'tg', + Th = 'th', + Tk = 'tk', + Tr = 'tr', + Tt = 'tt', + Udm = 'udm', + Uk = 'uk', + Ur = 'ur', + Uz = 'uz', + Vi = 'vi', + ZhHans = 'zh-hans', + ZhHant = 'zh-hant' +} diff --git a/frontend2/src/utils/types/apis/TeamApi.ts b/frontend2/src/utils/types/apis/TeamApi.ts new file mode 100644 index 000000000..960c2aa8b --- /dev/null +++ b/frontend2/src/utils/types/apis/TeamApi.ts @@ -0,0 +1,771 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ClassRequirement, + PaginatedClassRequirementList, + PaginatedTeamPublicList, + PatchedTeamPrivateRequest, + TeamAvatarRequest, + TeamCreate, + TeamCreateRequest, + TeamJoinRequest, + TeamPrivate, + TeamPrivateRequest, + TeamPublic, + TeamReportRequest, + UserPassed, +} from '../models'; +import { + ClassRequirementFromJSON, + ClassRequirementToJSON, + PaginatedClassRequirementListFromJSON, + PaginatedClassRequirementListToJSON, + PaginatedTeamPublicListFromJSON, + PaginatedTeamPublicListToJSON, + PatchedTeamPrivateRequestFromJSON, + PatchedTeamPrivateRequestToJSON, + TeamAvatarRequestFromJSON, + TeamAvatarRequestToJSON, + TeamCreateFromJSON, + TeamCreateToJSON, + TeamCreateRequestFromJSON, + TeamCreateRequestToJSON, + TeamJoinRequestFromJSON, + TeamJoinRequestToJSON, + TeamPrivateFromJSON, + TeamPrivateToJSON, + TeamPrivateRequestFromJSON, + TeamPrivateRequestToJSON, + TeamPublicFromJSON, + TeamPublicToJSON, + TeamReportRequestFromJSON, + TeamReportRequestToJSON, + UserPassedFromJSON, + UserPassedToJSON, +} from '../models'; + +export interface TeamRequirementCheckRetrieveRequest { + episodeId: string; + id: string; +} + +export interface TeamRequirementComputeRetrieveRequest { + episodeId: string; + id: string; +} + +export interface TeamRequirementListRequest { + episodeId: string; + page?: number; +} + +export interface TeamRequirementReportRetrieveRequest { + episodeId: string; +} + +export interface TeamRequirementReportUpdateRequest { + episodeId: string; + teamReportRequest: TeamReportRequest; +} + +export interface TeamRequirementRetrieveRequest { + episodeId: string; + id: string; +} + +export interface TeamTAvatarCreateRequest { + episodeId: string; + teamAvatarRequest: TeamAvatarRequest; +} + +export interface TeamTCreateRequest { + episodeId: string; + teamCreateRequest: TeamCreateRequest; +} + +export interface TeamTJoinCreateRequest { + episodeId: string; + teamJoinRequest: TeamJoinRequest; +} + +export interface TeamTLeaveCreateRequest { + episodeId: string; +} + +export interface TeamTListRequest { + episodeId: string; + ordering?: string; + page?: number; + search?: string; +} + +export interface TeamTMePartialUpdateRequest { + episodeId: string; + patchedTeamPrivateRequest?: PatchedTeamPrivateRequest; +} + +export interface TeamTMeRetrieveRequest { + episodeId: string; +} + +export interface TeamTMeUpdateRequest { + episodeId: string; + teamPrivateRequest?: TeamPrivateRequest; +} + +export interface TeamTRetrieveRequest { + episodeId: string; + id: string; +} + +/** + * + */ +export class TeamApi extends runtime.BaseAPI { + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementCheckRetrieveRaw(requestParameters: TeamRequirementCheckRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamRequirementCheckRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling teamRequirementCheckRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/requirement/{id}/check/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPassedFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementCheckRetrieve(requestParameters: TeamRequirementCheckRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamRequirementCheckRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementComputeRetrieveRaw(requestParameters: TeamRequirementComputeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamRequirementComputeRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling teamRequirementComputeRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/requirement/{id}/compute/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPassedFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementComputeRetrieve(requestParameters: TeamRequirementComputeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamRequirementComputeRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementListRaw(requestParameters: TeamRequirementListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamRequirementList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/requirement/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedClassRequirementListFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementList(requestParameters: TeamRequirementListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamRequirementListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve or update team strategy report + */ + async teamRequirementReportRetrieveRaw(requestParameters: TeamRequirementReportRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamRequirementReportRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/requirement/report/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Retrieve or update team strategy report + */ + async teamRequirementReportRetrieve(requestParameters: TeamRequirementReportRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.teamRequirementReportRetrieveRaw(requestParameters, initOverrides); + } + + /** + * Retrieve or update team strategy report + */ + async teamRequirementReportUpdateRaw(requestParameters: TeamRequirementReportUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamRequirementReportUpdate.'); + } + + if (requestParameters.teamReportRequest === null || requestParameters.teamReportRequest === undefined) { + throw new runtime.RequiredError('teamReportRequest','Required parameter requestParameters.teamReportRequest was null or undefined when calling teamRequirementReportUpdate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/requirement/report/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TeamReportRequestToJSON(requestParameters.teamReportRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Retrieve or update team strategy report + */ + async teamRequirementReportUpdate(requestParameters: TeamRequirementReportUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.teamRequirementReportUpdateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementRetrieveRaw(requestParameters: TeamRequirementRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamRequirementRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling teamRequirementRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/requirement/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClassRequirementFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and checking class requirements. + */ + async teamRequirementRetrieve(requestParameters: TeamRequirementRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamRequirementRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update uploaded avatar. + */ + async teamTAvatarCreateRaw(requestParameters: TeamTAvatarCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTAvatarCreate.'); + } + + if (requestParameters.teamAvatarRequest === null || requestParameters.teamAvatarRequest === undefined) { + throw new runtime.RequiredError('teamAvatarRequest','Required parameter requestParameters.teamAvatarRequest was null or undefined when calling teamTAvatarCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/avatar/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TeamAvatarRequestToJSON(requestParameters.teamAvatarRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update uploaded avatar. + */ + async teamTAvatarCreate(requestParameters: TeamTAvatarCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.teamTAvatarCreateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTCreateRaw(requestParameters: TeamTCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTCreate.'); + } + + if (requestParameters.teamCreateRequest === null || requestParameters.teamCreateRequest === undefined) { + throw new runtime.RequiredError('teamCreateRequest','Required parameter requestParameters.teamCreateRequest was null or undefined when calling teamTCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TeamCreateRequestToJSON(requestParameters.teamCreateRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TeamCreateFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTCreate(requestParameters: TeamTCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamTCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTJoinCreateRaw(requestParameters: TeamTJoinCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTJoinCreate.'); + } + + if (requestParameters.teamJoinRequest === null || requestParameters.teamJoinRequest === undefined) { + throw new runtime.RequiredError('teamJoinRequest','Required parameter requestParameters.teamJoinRequest was null or undefined when calling teamTJoinCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/join/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TeamJoinRequestToJSON(requestParameters.teamJoinRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTJoinCreate(requestParameters: TeamTJoinCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.teamTJoinCreateRaw(requestParameters, initOverrides); + } + + /** + * Leave a team. + */ + async teamTLeaveCreateRaw(requestParameters: TeamTLeaveCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTLeaveCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/leave/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Leave a team. + */ + async teamTLeaveCreate(requestParameters: TeamTLeaveCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.teamTLeaveCreateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTListRaw(requestParameters: TeamTListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTList.'); + } + + const queryParameters: any = {}; + + if (requestParameters.ordering !== undefined) { + queryParameters['ordering'] = requestParameters.ordering; + } + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + if (requestParameters.search !== undefined) { + queryParameters['search'] = requestParameters.search; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTeamPublicListFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTList(requestParameters: TeamTListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamTListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve or update information about the current team. + */ + async teamTMePartialUpdateRaw(requestParameters: TeamTMePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTMePartialUpdate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/me/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedTeamPrivateRequestToJSON(requestParameters.patchedTeamPrivateRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TeamPrivateFromJSON(jsonValue)); + } + + /** + * Retrieve or update information about the current team. + */ + async teamTMePartialUpdate(requestParameters: TeamTMePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamTMePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve or update information about the current team. + */ + async teamTMeRetrieveRaw(requestParameters: TeamTMeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTMeRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/me/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TeamPrivateFromJSON(jsonValue)); + } + + /** + * Retrieve or update information about the current team. + */ + async teamTMeRetrieve(requestParameters: TeamTMeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamTMeRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve or update information about the current team. + */ + async teamTMeUpdateRaw(requestParameters: TeamTMeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTMeUpdate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/me/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: TeamPrivateRequestToJSON(requestParameters.teamPrivateRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TeamPrivateFromJSON(jsonValue)); + } + + /** + * Retrieve or update information about the current team. + */ + async teamTMeUpdate(requestParameters: TeamTMeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamTMeUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTRetrieveRaw(requestParameters: TeamTRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.episodeId === null || requestParameters.episodeId === undefined) { + throw new runtime.RequiredError('episodeId','Required parameter requestParameters.episodeId was null or undefined when calling teamTRetrieve.'); + } + + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling teamTRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/team/{episode_id}/t/{id}/`.replace(`{${"episode_id"}}`, encodeURIComponent(String(requestParameters.episodeId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TeamPublicFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and updating all team/team profile info. When creating a team, add the logged in user as the sole member. + */ + async teamTRetrieve(requestParameters: TeamTRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.teamTRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/frontend2/src/utils/types/apis/TokenApi.ts b/frontend2/src/utils/types/apis/TokenApi.ts new file mode 100644 index 000000000..c190e4f21 --- /dev/null +++ b/frontend2/src/utils/types/apis/TokenApi.ts @@ -0,0 +1,152 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + TokenObtainPair, + TokenObtainPairRequest, + TokenRefresh, + TokenRefreshRequest, + TokenVerifyRequest, +} from '../models'; +import { + TokenObtainPairFromJSON, + TokenObtainPairToJSON, + TokenObtainPairRequestFromJSON, + TokenObtainPairRequestToJSON, + TokenRefreshFromJSON, + TokenRefreshToJSON, + TokenRefreshRequestFromJSON, + TokenRefreshRequestToJSON, + TokenVerifyRequestFromJSON, + TokenVerifyRequestToJSON, +} from '../models'; + +export interface TokenCreateRequest { + tokenObtainPairRequest: TokenObtainPairRequest; +} + +export interface TokenRefreshCreateRequest { + tokenRefreshRequest: TokenRefreshRequest; +} + +export interface TokenVerifyCreateRequest { + tokenVerifyRequest: TokenVerifyRequest; +} + +/** + * + */ +export class TokenApi extends runtime.BaseAPI { + + /** + * Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials. + */ + async tokenCreateRaw(requestParameters: TokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.tokenObtainPairRequest === null || requestParameters.tokenObtainPairRequest === undefined) { + throw new runtime.RequiredError('tokenObtainPairRequest','Required parameter requestParameters.tokenObtainPairRequest was null or undefined when calling tokenCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/token/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TokenObtainPairRequestToJSON(requestParameters.tokenObtainPairRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenObtainPairFromJSON(jsonValue)); + } + + /** + * Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials. + */ + async tokenCreate(requestParameters: TokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tokenCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid. + */ + async tokenRefreshCreateRaw(requestParameters: TokenRefreshCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.tokenRefreshRequest === null || requestParameters.tokenRefreshRequest === undefined) { + throw new runtime.RequiredError('tokenRefreshRequest','Required parameter requestParameters.tokenRefreshRequest was null or undefined when calling tokenRefreshCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/token/refresh/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TokenRefreshRequestToJSON(requestParameters.tokenRefreshRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenRefreshFromJSON(jsonValue)); + } + + /** + * Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid. + */ + async tokenRefreshCreate(requestParameters: TokenRefreshCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.tokenRefreshCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Takes a token and indicates if it is valid. This view provides no information about a token\'s fitness for a particular use. + */ + async tokenVerifyCreateRaw(requestParameters: TokenVerifyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.tokenVerifyRequest === null || requestParameters.tokenVerifyRequest === undefined) { + throw new runtime.RequiredError('tokenVerifyRequest','Required parameter requestParameters.tokenVerifyRequest was null or undefined when calling tokenVerifyCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/token/verify/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: TokenVerifyRequestToJSON(requestParameters.tokenVerifyRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Takes a token and indicates if it is valid. This view provides no information about a token\'s fitness for a particular use. + */ + async tokenVerifyCreate(requestParameters: TokenVerifyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.tokenVerifyCreateRaw(requestParameters, initOverrides); + } + +} diff --git a/frontend2/src/utils/types/apis/UserApi.ts b/frontend2/src/utils/types/apis/UserApi.ts new file mode 100644 index 000000000..7c18e7422 --- /dev/null +++ b/frontend2/src/utils/types/apis/UserApi.ts @@ -0,0 +1,558 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Email, + EmailRequest, + PasswordToken, + PasswordTokenRequest, + PatchedUserPrivateRequest, + ResetToken, + ResetTokenRequest, + TeamPublic, + UserAvatarRequest, + UserCreate, + UserCreateRequest, + UserPrivate, + UserPrivateRequest, + UserPublic, + UserResume, + UserResumeRequest, +} from '../models'; +import { + EmailFromJSON, + EmailToJSON, + EmailRequestFromJSON, + EmailRequestToJSON, + PasswordTokenFromJSON, + PasswordTokenToJSON, + PasswordTokenRequestFromJSON, + PasswordTokenRequestToJSON, + PatchedUserPrivateRequestFromJSON, + PatchedUserPrivateRequestToJSON, + ResetTokenFromJSON, + ResetTokenToJSON, + ResetTokenRequestFromJSON, + ResetTokenRequestToJSON, + TeamPublicFromJSON, + TeamPublicToJSON, + UserAvatarRequestFromJSON, + UserAvatarRequestToJSON, + UserCreateFromJSON, + UserCreateToJSON, + UserCreateRequestFromJSON, + UserCreateRequestToJSON, + UserPrivateFromJSON, + UserPrivateToJSON, + UserPrivateRequestFromJSON, + UserPrivateRequestToJSON, + UserPublicFromJSON, + UserPublicToJSON, + UserResumeFromJSON, + UserResumeToJSON, + UserResumeRequestFromJSON, + UserResumeRequestToJSON, +} from '../models'; + +export interface UserPasswordResetConfirmCreateRequest { + passwordTokenRequest: PasswordTokenRequest; +} + +export interface UserPasswordResetCreateRequest { + emailRequest: EmailRequest; +} + +export interface UserPasswordResetValidateTokenCreateRequest { + resetTokenRequest: ResetTokenRequest; +} + +export interface UserUAvatarCreateRequest { + userAvatarRequest: UserAvatarRequest; +} + +export interface UserUCreateRequest { + userCreateRequest: UserCreateRequest; +} + +export interface UserUMePartialUpdateRequest { + patchedUserPrivateRequest?: PatchedUserPrivateRequest; +} + +export interface UserUMeUpdateRequest { + userPrivateRequest: UserPrivateRequest; +} + +export interface UserUResumeUpdateRequest { + userResumeRequest: UserResumeRequest; +} + +export interface UserURetrieveRequest { + id: number; +} + +export interface UserUTeamsRetrieveRequest { + id: number; +} + +/** + * + */ +export class UserApi extends runtime.BaseAPI { + + /** + * An Api View which provides a method to reset a password based on a unique token + */ + async userPasswordResetConfirmCreateRaw(requestParameters: UserPasswordResetConfirmCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.passwordTokenRequest === null || requestParameters.passwordTokenRequest === undefined) { + throw new runtime.RequiredError('passwordTokenRequest','Required parameter requestParameters.passwordTokenRequest was null or undefined when calling userPasswordResetConfirmCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/user/password_reset/confirm/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PasswordTokenRequestToJSON(requestParameters.passwordTokenRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PasswordTokenFromJSON(jsonValue)); + } + + /** + * An Api View which provides a method to reset a password based on a unique token + */ + async userPasswordResetConfirmCreate(requestParameters: UserPasswordResetConfirmCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userPasswordResetConfirmCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * An Api View which provides a method to request a password reset token based on an e-mail address Sends a signal reset_password_token_created when a reset token was created + */ + async userPasswordResetCreateRaw(requestParameters: UserPasswordResetCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.emailRequest === null || requestParameters.emailRequest === undefined) { + throw new runtime.RequiredError('emailRequest','Required parameter requestParameters.emailRequest was null or undefined when calling userPasswordResetCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/user/password_reset/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: EmailRequestToJSON(requestParameters.emailRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EmailFromJSON(jsonValue)); + } + + /** + * An Api View which provides a method to request a password reset token based on an e-mail address Sends a signal reset_password_token_created when a reset token was created + */ + async userPasswordResetCreate(requestParameters: UserPasswordResetCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userPasswordResetCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * An Api View which provides a method to verify that a token is valid + */ + async userPasswordResetValidateTokenCreateRaw(requestParameters: UserPasswordResetValidateTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.resetTokenRequest === null || requestParameters.resetTokenRequest === undefined) { + throw new runtime.RequiredError('resetTokenRequest','Required parameter requestParameters.resetTokenRequest was null or undefined when calling userPasswordResetValidateTokenCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/user/password_reset/validate_token/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ResetTokenRequestToJSON(requestParameters.resetTokenRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResetTokenFromJSON(jsonValue)); + } + + /** + * An Api View which provides a method to verify that a token is valid + */ + async userPasswordResetValidateTokenCreate(requestParameters: UserPasswordResetValidateTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userPasswordResetValidateTokenCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update uploaded avatar. + */ + async userUAvatarCreateRaw(requestParameters: UserUAvatarCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.userAvatarRequest === null || requestParameters.userAvatarRequest === undefined) { + throw new runtime.RequiredError('userAvatarRequest','Required parameter requestParameters.userAvatarRequest was null or undefined when calling userUAvatarCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/avatar/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserAvatarRequestToJSON(requestParameters.userAvatarRequest), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update uploaded avatar. + */ + async userUAvatarCreate(requestParameters: UserUAvatarCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.userUAvatarCreateRaw(requestParameters, initOverrides); + } + + /** + * A viewset for retrieving and updating all user info. + */ + async userUCreateRaw(requestParameters: UserUCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.userCreateRequest === null || requestParameters.userCreateRequest === undefined) { + throw new runtime.RequiredError('userCreateRequest','Required parameter requestParameters.userCreateRequest was null or undefined when calling userUCreate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserCreateRequestToJSON(requestParameters.userCreateRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserCreateFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and updating all user info. + */ + async userUCreate(requestParameters: UserUCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userUCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve or update information about the logged-in user. + */ + async userUMePartialUpdateRaw(requestParameters: UserUMePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/me/`, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchedUserPrivateRequestToJSON(requestParameters.patchedUserPrivateRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPrivateFromJSON(jsonValue)); + } + + /** + * Retrieve or update information about the logged-in user. + */ + async userUMePartialUpdate(requestParameters: UserUMePartialUpdateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userUMePartialUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve or update information about the logged-in user. + */ + async userUMeRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/me/`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPrivateFromJSON(jsonValue)); + } + + /** + * Retrieve or update information about the logged-in user. + */ + async userUMeRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userUMeRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Retrieve or update information about the logged-in user. + */ + async userUMeUpdateRaw(requestParameters: UserUMeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.userPrivateRequest === null || requestParameters.userPrivateRequest === undefined) { + throw new runtime.RequiredError('userPrivateRequest','Required parameter requestParameters.userPrivateRequest was null or undefined when calling userUMeUpdate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/me/`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserPrivateRequestToJSON(requestParameters.userPrivateRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPrivateFromJSON(jsonValue)); + } + + /** + * Retrieve or update information about the logged-in user. + */ + async userUMeUpdate(requestParameters: UserUMeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userUMeUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve or update the uploaded resume. + */ + async userUResumeRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/resume/`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserResumeFromJSON(jsonValue)); + } + + /** + * Retrieve or update the uploaded resume. + */ + async userUResumeRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userUResumeRetrieveRaw(initOverrides); + return await response.value(); + } + + /** + * Retrieve or update the uploaded resume. + */ + async userUResumeUpdateRaw(requestParameters: UserUResumeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.userResumeRequest === null || requestParameters.userResumeRequest === undefined) { + throw new runtime.RequiredError('userResumeRequest','Required parameter requestParameters.userResumeRequest was null or undefined when calling userUResumeUpdate.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/resume/`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserResumeRequestToJSON(requestParameters.userResumeRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserResumeFromJSON(jsonValue)); + } + + /** + * Retrieve or update the uploaded resume. + */ + async userUResumeUpdate(requestParameters: UserUResumeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userUResumeUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A viewset for retrieving and updating all user info. + */ + async userURetrieveRaw(requestParameters: UserURetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling userURetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserPublicFromJSON(jsonValue)); + } + + /** + * A viewset for retrieving and updating all user info. + */ + async userURetrieve(requestParameters: UserURetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userURetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve all teams associated with a user. + */ + async userUTeamsRetrieveRaw(requestParameters: UserUTeamsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.id === null || requestParameters.id === undefined) { + throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling userUTeamsRetrieve.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwtAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/api/user/u/{id}/teams/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TeamPublicFromJSON(jsonValue)); + } + + /** + * Retrieve all teams associated with a user. + */ + async userUTeamsRetrieve(requestParameters: UserUTeamsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userUTeamsRetrieveRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/frontend2/src/utils/types/apis/index.ts b/frontend2/src/utils/types/apis/index.ts new file mode 100644 index 000000000..1dd22d776 --- /dev/null +++ b/frontend2/src/utils/types/apis/index.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './CompeteApi'; +export * from './EpisodeApi'; +export * from './SpecsApi'; +export * from './TeamApi'; +export * from './TokenApi'; +export * from './UserApi'; diff --git a/frontend2/src/utils/types/configuration.ts b/frontend2/src/utils/types/configuration.ts deleted file mode 100644 index 2d46dcf69..000000000 --- a/frontend2/src/utils/types/configuration.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class Configuration { - apiKey: string | undefined; - username: string | undefined; - password: string | undefined; - accessToken: string | (() => string) | undefined; -} diff --git a/frontend2/src/utils/types/git_push.sh b/frontend2/src/utils/types/git_push.sh deleted file mode 100644 index f53a75d4f..000000000 --- a/frontend2/src/utils/types/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/frontend2/src/utils/types/index.ts b/frontend2/src/utils/types/index.ts index 72558f282..be9d1edee 100644 --- a/frontend2/src/utils/types/index.ts +++ b/frontend2/src/utils/types/index.ts @@ -1,4 +1,5 @@ -export * from './api/api'; -export * from './model/models'; -export * from './variables'; -export * from './configuration'; +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis'; +export * from './models'; diff --git a/frontend2/src/utils/types/model/Autoscrim.ts b/frontend2/src/utils/types/model/Autoscrim.ts deleted file mode 100644 index e3eba6644..000000000 --- a/frontend2/src/utils/types/model/Autoscrim.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface Autoscrim { - bestOf: number; - -} diff --git a/frontend2/src/utils/types/model/ClassRequirement.ts b/frontend2/src/utils/types/model/ClassRequirement.ts deleted file mode 100644 index 3c37c9c57..000000000 --- a/frontend2/src/utils/types/model/ClassRequirement.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface ClassRequirement { - episode: string; - - referencePlayer: number; - - maps: Array; - - minScore: number; - -} diff --git a/frontend2/src/utils/types/model/CountryEnum.ts b/frontend2/src/utils/types/model/CountryEnum.ts deleted file mode 100644 index 9b19a2735..000000000 --- a/frontend2/src/utils/types/model/CountryEnum.ts +++ /dev/null @@ -1,265 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum CountryEnum { - Af = 'AF', - Ax = 'AX', - Al = 'AL', - Dz = 'DZ', - As = 'AS', - Ad = 'AD', - Ao = 'AO', - Ai = 'AI', - Aq = 'AQ', - Ag = 'AG', - Ar = 'AR', - Am = 'AM', - Aw = 'AW', - Au = 'AU', - At = 'AT', - Az = 'AZ', - Bs = 'BS', - Bh = 'BH', - Bd = 'BD', - Bb = 'BB', - By = 'BY', - Be = 'BE', - Bz = 'BZ', - Bj = 'BJ', - Bm = 'BM', - Bt = 'BT', - Bo = 'BO', - Bq = 'BQ', - Ba = 'BA', - Bw = 'BW', - Bv = 'BV', - Br = 'BR', - Io = 'IO', - Bn = 'BN', - Bg = 'BG', - Bf = 'BF', - Bi = 'BI', - Cv = 'CV', - Kh = 'KH', - Cm = 'CM', - Ca = 'CA', - Ky = 'KY', - Cf = 'CF', - Td = 'TD', - Cl = 'CL', - Cn = 'CN', - Cx = 'CX', - Cc = 'CC', - Co = 'CO', - Km = 'KM', - Cg = 'CG', - Cd = 'CD', - Ck = 'CK', - Cr = 'CR', - Ci = 'CI', - Hr = 'HR', - Cu = 'CU', - Cw = 'CW', - Cy = 'CY', - Cz = 'CZ', - Dk = 'DK', - Dj = 'DJ', - Dm = 'DM', - Do = 'DO', - Ec = 'EC', - Eg = 'EG', - Sv = 'SV', - Gq = 'GQ', - Er = 'ER', - Ee = 'EE', - Sz = 'SZ', - Et = 'ET', - Fk = 'FK', - Fo = 'FO', - Fj = 'FJ', - Fi = 'FI', - Fr = 'FR', - Gf = 'GF', - Pf = 'PF', - Tf = 'TF', - Ga = 'GA', - Gm = 'GM', - Ge = 'GE', - De = 'DE', - Gh = 'GH', - Gi = 'GI', - Gr = 'GR', - Gl = 'GL', - Gd = 'GD', - Gp = 'GP', - Gu = 'GU', - Gt = 'GT', - Gg = 'GG', - Gn = 'GN', - Gw = 'GW', - Gy = 'GY', - Ht = 'HT', - Hm = 'HM', - Va = 'VA', - Hn = 'HN', - Hk = 'HK', - Hu = 'HU', - Is = 'IS', - In = 'IN', - Id = 'ID', - Ir = 'IR', - Iq = 'IQ', - Ie = 'IE', - Im = 'IM', - Il = 'IL', - It = 'IT', - Jm = 'JM', - Jp = 'JP', - Je = 'JE', - Jo = 'JO', - Kz = 'KZ', - Ke = 'KE', - Ki = 'KI', - Kw = 'KW', - Kg = 'KG', - La = 'LA', - Lv = 'LV', - Lb = 'LB', - Ls = 'LS', - Lr = 'LR', - Ly = 'LY', - Li = 'LI', - Lt = 'LT', - Lu = 'LU', - Mo = 'MO', - Mg = 'MG', - Mw = 'MW', - My = 'MY', - Mv = 'MV', - Ml = 'ML', - Mt = 'MT', - Mh = 'MH', - Mq = 'MQ', - Mr = 'MR', - Mu = 'MU', - Yt = 'YT', - Mx = 'MX', - Fm = 'FM', - Md = 'MD', - Mc = 'MC', - Mn = 'MN', - Me = 'ME', - Ms = 'MS', - Ma = 'MA', - Mz = 'MZ', - Mm = 'MM', - Na = 'NA', - Nr = 'NR', - Np = 'NP', - Nl = 'NL', - Nc = 'NC', - Nz = 'NZ', - Ni = 'NI', - Ne = 'NE', - Ng = 'NG', - Nu = 'NU', - Nf = 'NF', - Kp = 'KP', - Mk = 'MK', - Mp = 'MP', - No = 'NO', - Om = 'OM', - Pk = 'PK', - Pw = 'PW', - Ps = 'PS', - Pa = 'PA', - Pg = 'PG', - Py = 'PY', - Pe = 'PE', - Ph = 'PH', - Pn = 'PN', - Pl = 'PL', - Pt = 'PT', - Pr = 'PR', - Qa = 'QA', - Re = 'RE', - Ro = 'RO', - Ru = 'RU', - Rw = 'RW', - Bl = 'BL', - Sh = 'SH', - Kn = 'KN', - Lc = 'LC', - Mf = 'MF', - Pm = 'PM', - Vc = 'VC', - Ws = 'WS', - Sm = 'SM', - St = 'ST', - Sa = 'SA', - Sn = 'SN', - Rs = 'RS', - Sc = 'SC', - Sl = 'SL', - Sg = 'SG', - Sx = 'SX', - Sk = 'SK', - Si = 'SI', - Sb = 'SB', - So = 'SO', - Za = 'ZA', - Gs = 'GS', - Kr = 'KR', - Ss = 'SS', - Es = 'ES', - Lk = 'LK', - Sd = 'SD', - Sr = 'SR', - Sj = 'SJ', - Se = 'SE', - Ch = 'CH', - Sy = 'SY', - Tw = 'TW', - Tj = 'TJ', - Tz = 'TZ', - Th = 'TH', - Tl = 'TL', - Tg = 'TG', - Tk = 'TK', - To = 'TO', - Tt = 'TT', - Tn = 'TN', - Tr = 'TR', - Tm = 'TM', - Tc = 'TC', - Tv = 'TV', - Ug = 'UG', - Ua = 'UA', - Ae = 'AE', - Gb = 'GB', - Um = 'UM', - Us = 'US', - Uy = 'UY', - Uz = 'UZ', - Vu = 'VU', - Ve = 'VE', - Vn = 'VN', - Vg = 'VG', - Vi = 'VI', - Wf = 'WF', - Eh = 'EH', - Ye = 'YE', - Zm = 'ZM', - Zw = 'ZW' -} diff --git a/frontend2/src/utils/types/model/EligibilityCriterion.ts b/frontend2/src/utils/types/model/EligibilityCriterion.ts deleted file mode 100644 index d3187d5c4..000000000 --- a/frontend2/src/utils/types/model/EligibilityCriterion.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface EligibilityCriterion { - id: number; - - title: string; - - description: string; - - icon: string; - -} diff --git a/frontend2/src/utils/types/model/Email.ts b/frontend2/src/utils/types/model/Email.ts deleted file mode 100644 index 5556bb3bb..000000000 --- a/frontend2/src/utils/types/model/Email.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface Email { - email: string; - -} diff --git a/frontend2/src/utils/types/model/Episode.ts b/frontend2/src/utils/types/model/Episode.ts deleted file mode 100644 index 59032eaf1..000000000 --- a/frontend2/src/utils/types/model/Episode.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface Episode { - nameShort: string; - - nameLong: string; - - blurb?: string; - - gameRelease: string; - - language: models.LanguageEnum; - - scaffold?: string; - - artifactName?: string; - - releaseVersionPublic?: string; - - releaseVersionSaturn?: string; - - eligibilityCriteria: Array; - - frozen: boolean; - -} -export namespace Episode { -} diff --git a/frontend2/src/utils/types/model/GenderEnum.ts b/frontend2/src/utils/types/model/GenderEnum.ts deleted file mode 100644 index d19ce4722..000000000 --- a/frontend2/src/utils/types/model/GenderEnum.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum GenderEnum { - F = 'F', - M = 'M', - N = 'N', - Star = '*', - QuestionMark = '?' -} diff --git a/frontend2/src/utils/types/model/HistoricalRating.ts b/frontend2/src/utils/types/model/HistoricalRating.ts deleted file mode 100644 index 8b762aabb..000000000 --- a/frontend2/src/utils/types/model/HistoricalRating.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface HistoricalRating { - rating: number; - - timestamp: string; - -} diff --git a/frontend2/src/utils/types/model/LanguageEnum.ts b/frontend2/src/utils/types/model/LanguageEnum.ts deleted file mode 100644 index 8d8c93b64..000000000 --- a/frontend2/src/utils/types/model/LanguageEnum.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum LanguageEnum { - Java8 = 'java8', - Py3 = 'py3' -} diff --git a/frontend2/src/utils/types/model/Match.ts b/frontend2/src/utils/types/model/Match.ts deleted file mode 100644 index 8b5d50d91..000000000 --- a/frontend2/src/utils/types/model/Match.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface Match { - id: number; - - status: models.StatusBccEnum; - - episode: string; - - tournamentRound: number; - - participants: Array; - - maps: Array; - - alternateOrder: boolean; - - created: string; - - isRanked: boolean; - - replayUrl: string; - -} -export namespace Match { -} diff --git a/frontend2/src/utils/types/model/MatchParticipant.ts b/frontend2/src/utils/types/model/MatchParticipant.ts deleted file mode 100644 index 8d2a3cb68..000000000 --- a/frontend2/src/utils/types/model/MatchParticipant.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface MatchParticipant { - team: number; - - teamname: string; - - submission: number; - - match: number; - - playerIndex: number; - - score: number; - - rating: number; - - oldRating: number; - -} diff --git a/frontend2/src/utils/types/model/MatchReport.ts b/frontend2/src/utils/types/model/MatchReport.ts deleted file mode 100644 index f04f3327d..000000000 --- a/frontend2/src/utils/types/model/MatchReport.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface MatchReport { - invocation: models.SaturnInvocation; - - scores?: Array; - -} diff --git a/frontend2/src/utils/types/model/ModelMap.ts b/frontend2/src/utils/types/model/ModelMap.ts deleted file mode 100644 index 6825f7e3b..000000000 --- a/frontend2/src/utils/types/model/ModelMap.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface ModelMap { - id: number; - - episode: string; - - name: string; - - isPublic: boolean; - -} diff --git a/frontend2/src/utils/types/model/PaginatedClassRequirementList.ts b/frontend2/src/utils/types/model/PaginatedClassRequirementList.ts deleted file mode 100644 index 73f0d45b2..000000000 --- a/frontend2/src/utils/types/model/PaginatedClassRequirementList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedClassRequirementList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PaginatedEpisodeList.ts b/frontend2/src/utils/types/model/PaginatedEpisodeList.ts deleted file mode 100644 index 082c42568..000000000 --- a/frontend2/src/utils/types/model/PaginatedEpisodeList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedEpisodeList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PaginatedMatchList.ts b/frontend2/src/utils/types/model/PaginatedMatchList.ts deleted file mode 100644 index ec2e70dd1..000000000 --- a/frontend2/src/utils/types/model/PaginatedMatchList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedMatchList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PaginatedScrimmageRequestList.ts b/frontend2/src/utils/types/model/PaginatedScrimmageRequestList.ts deleted file mode 100644 index 165fbb273..000000000 --- a/frontend2/src/utils/types/model/PaginatedScrimmageRequestList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedScrimmageRequestList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PaginatedSubmissionList.ts b/frontend2/src/utils/types/model/PaginatedSubmissionList.ts deleted file mode 100644 index dac76ca19..000000000 --- a/frontend2/src/utils/types/model/PaginatedSubmissionList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedSubmissionList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PaginatedTeamPublicList.ts b/frontend2/src/utils/types/model/PaginatedTeamPublicList.ts deleted file mode 100644 index 23846d493..000000000 --- a/frontend2/src/utils/types/model/PaginatedTeamPublicList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedTeamPublicList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PaginatedTournamentList.ts b/frontend2/src/utils/types/model/PaginatedTournamentList.ts deleted file mode 100644 index ced9e6bc5..000000000 --- a/frontend2/src/utils/types/model/PaginatedTournamentList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedTournamentList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PaginatedTournamentRoundList.ts b/frontend2/src/utils/types/model/PaginatedTournamentRoundList.ts deleted file mode 100644 index 1a9cda415..000000000 --- a/frontend2/src/utils/types/model/PaginatedTournamentRoundList.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PaginatedTournamentRoundList { - count?: number; - - next?: string; - - previous?: string; - - results?: Array; - -} diff --git a/frontend2/src/utils/types/model/PasswordToken.ts b/frontend2/src/utils/types/model/PasswordToken.ts deleted file mode 100644 index e84538c35..000000000 --- a/frontend2/src/utils/types/model/PasswordToken.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PasswordToken { - password: string; - - token: string; - -} diff --git a/frontend2/src/utils/types/model/PatchedTeamPrivate.ts b/frontend2/src/utils/types/model/PatchedTeamPrivate.ts deleted file mode 100644 index 09303d076..000000000 --- a/frontend2/src/utils/types/model/PatchedTeamPrivate.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PatchedTeamPrivate { - id?: number; - - profile?: models.TeamProfilePrivate; - - episode?: string; - - name?: string; - - members?: Array; - - joinKey?: string; - - status?: models.Status526Enum; - -} -export namespace PatchedTeamPrivate { -} diff --git a/frontend2/src/utils/types/model/PatchedUserPrivate.ts b/frontend2/src/utils/types/model/PatchedUserPrivate.ts deleted file mode 100644 index 27702920a..000000000 --- a/frontend2/src/utils/types/model/PatchedUserPrivate.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface PatchedUserPrivate { - id?: number; - - profile?: models.UserProfilePrivate; - - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - */ - username?: string; - - email?: string; - - firstName?: string; - - lastName?: string; - - /** - * Designates whether the user can log into this admin site. - */ - isStaff?: boolean; - -} diff --git a/frontend2/src/utils/types/model/PlayerOrderEnum.ts b/frontend2/src/utils/types/model/PlayerOrderEnum.ts deleted file mode 100644 index 966150b93..000000000 --- a/frontend2/src/utils/types/model/PlayerOrderEnum.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum PlayerOrderEnum { - Plus = '+', - Minus = '-', - QuestionMark = '?' -} diff --git a/frontend2/src/utils/types/model/ReleaseStatusEnum.ts b/frontend2/src/utils/types/model/ReleaseStatusEnum.ts deleted file mode 100644 index 5179c41eb..000000000 --- a/frontend2/src/utils/types/model/ReleaseStatusEnum.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum ReleaseStatusEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 -} diff --git a/frontend2/src/utils/types/model/ResetToken.ts b/frontend2/src/utils/types/model/ResetToken.ts deleted file mode 100644 index 088c77d03..000000000 --- a/frontend2/src/utils/types/model/ResetToken.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface ResetToken { - token: string; - -} diff --git a/frontend2/src/utils/types/model/SaturnInvocation.ts b/frontend2/src/utils/types/model/SaturnInvocation.ts deleted file mode 100644 index 4aec52b37..000000000 --- a/frontend2/src/utils/types/model/SaturnInvocation.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface SaturnInvocation { - status: models.StatusBccEnum; - - logs?: string; - - interrupted?: boolean; - -} -export namespace SaturnInvocation { -} diff --git a/frontend2/src/utils/types/model/ScrimmageRequest.ts b/frontend2/src/utils/types/model/ScrimmageRequest.ts deleted file mode 100644 index 469ca2cbc..000000000 --- a/frontend2/src/utils/types/model/ScrimmageRequest.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface ScrimmageRequest { - id: number; - - episode: string; - - created: string; - - status: models.ScrimmageRequestStatusEnum; - - isRanked: boolean; - - requestedBy: number; - - requestedByName: string; - - requestedByRating: number; - - requestedTo: number; - - requestedToName: string; - - requestedToRating: number; - - playerOrder: models.PlayerOrderEnum; - - maps: Array; - - mapNames: Array; - -} -export namespace ScrimmageRequest { -} diff --git a/frontend2/src/utils/types/model/ScrimmageRequestStatusEnum.ts b/frontend2/src/utils/types/model/ScrimmageRequestStatusEnum.ts deleted file mode 100644 index 7a68a8633..000000000 --- a/frontend2/src/utils/types/model/ScrimmageRequestStatusEnum.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum ScrimmageRequestStatusEnum { - P = 'P', - Y = 'Y', - N = 'N' -} diff --git a/frontend2/src/utils/types/model/Status526Enum.ts b/frontend2/src/utils/types/model/Status526Enum.ts deleted file mode 100644 index 7b64f78fd..000000000 --- a/frontend2/src/utils/types/model/Status526Enum.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum Status526Enum { - R = 'R', - X = 'X', - S = 'S', - O = 'O' -} diff --git a/frontend2/src/utils/types/model/StatusBccEnum.ts b/frontend2/src/utils/types/model/StatusBccEnum.ts deleted file mode 100644 index ee9bbd219..000000000 --- a/frontend2/src/utils/types/model/StatusBccEnum.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum StatusBccEnum { - New = 'NEW', - Que = 'QUE', - Run = 'RUN', - Try = 'TRY', - Ok = 'OK!', - Err = 'ERR', - Can = 'CAN' -} diff --git a/frontend2/src/utils/types/model/StyleEnum.ts b/frontend2/src/utils/types/model/StyleEnum.ts deleted file mode 100644 index 2aa75ee19..000000000 --- a/frontend2/src/utils/types/model/StyleEnum.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export enum StyleEnum { - Se = 'SE', - De = 'DE' -} diff --git a/frontend2/src/utils/types/model/Submission.ts b/frontend2/src/utils/types/model/Submission.ts deleted file mode 100644 index 8874e82ef..000000000 --- a/frontend2/src/utils/types/model/Submission.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface Submission { - id: number; - - status: models.StatusBccEnum; - - logs: string; - - episode: string; - - team: number; - - teamname: string; - - user: number; - - username: string; - - created: string; - - accepted: boolean; - - _package?: string; - - description?: string; - - sourceCode: string; - -} -export namespace Submission { -} diff --git a/frontend2/src/utils/types/model/SubmissionDownload.ts b/frontend2/src/utils/types/model/SubmissionDownload.ts deleted file mode 100644 index 263cd6273..000000000 --- a/frontend2/src/utils/types/model/SubmissionDownload.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface SubmissionDownload { - ready: boolean; - - url: string; - - reason: string; - -} diff --git a/frontend2/src/utils/types/model/SubmissionReport.ts b/frontend2/src/utils/types/model/SubmissionReport.ts deleted file mode 100644 index 7e994183d..000000000 --- a/frontend2/src/utils/types/model/SubmissionReport.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface SubmissionReport { - invocation: models.SaturnInvocation; - - accepted?: boolean; - -} diff --git a/frontend2/src/utils/types/model/TeamAvatar.ts b/frontend2/src/utils/types/model/TeamAvatar.ts deleted file mode 100644 index 508493f7e..000000000 --- a/frontend2/src/utils/types/model/TeamAvatar.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamAvatar { - avatar: string; - -} diff --git a/frontend2/src/utils/types/model/TeamCreate.ts b/frontend2/src/utils/types/model/TeamCreate.ts deleted file mode 100644 index ce7d8ab22..000000000 --- a/frontend2/src/utils/types/model/TeamCreate.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamCreate { - id: number; - - profile?: models.TeamProfilePrivate; - - episode?: string; - - name: string; - - members: Array; - - joinKey: string; - - status: models.Status526Enum; - -} -export namespace TeamCreate { -} diff --git a/frontend2/src/utils/types/model/TeamJoin.ts b/frontend2/src/utils/types/model/TeamJoin.ts deleted file mode 100644 index c9dc4dd6b..000000000 --- a/frontend2/src/utils/types/model/TeamJoin.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamJoin { - joinKey: string; - - name: string; - -} diff --git a/frontend2/src/utils/types/model/TeamPrivate.ts b/frontend2/src/utils/types/model/TeamPrivate.ts deleted file mode 100644 index 10eb24edb..000000000 --- a/frontend2/src/utils/types/model/TeamPrivate.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamPrivate { - id: number; - - profile?: models.TeamProfilePrivate; - - episode?: string; - - name: string; - - members: Array; - - joinKey: string; - - status: models.Status526Enum; - -} -export namespace TeamPrivate { -} diff --git a/frontend2/src/utils/types/model/TeamProfilePrivate.ts b/frontend2/src/utils/types/model/TeamProfilePrivate.ts deleted file mode 100644 index de3c1c20f..000000000 --- a/frontend2/src/utils/types/model/TeamProfilePrivate.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamProfilePrivate { - quote?: string; - - biography?: string; - - hasAvatar: boolean; - - hasReport?: boolean; - - avatarUrl: string; - - rating: number; - - autoAcceptRanked?: boolean; - - autoAcceptUnranked?: boolean; - - eligibleFor?: Array; - -} diff --git a/frontend2/src/utils/types/model/TeamProfilePublic.ts b/frontend2/src/utils/types/model/TeamProfilePublic.ts deleted file mode 100644 index e428cc7c5..000000000 --- a/frontend2/src/utils/types/model/TeamProfilePublic.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamProfilePublic { - quote?: string; - - biography?: string; - - hasAvatar: boolean; - - avatarUrl: string; - - rating: number; - - autoAcceptRanked?: boolean; - - autoAcceptUnranked?: boolean; - - eligibleFor?: Array; - -} diff --git a/frontend2/src/utils/types/model/TeamPublic.ts b/frontend2/src/utils/types/model/TeamPublic.ts deleted file mode 100644 index 2e102017c..000000000 --- a/frontend2/src/utils/types/model/TeamPublic.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamPublic { - id: number; - - profile?: models.TeamProfilePublic; - - episode: string; - - name: string; - - members: Array; - - status: models.Status526Enum; - - hasActiveSubmission: string; - -} -export namespace TeamPublic { -} diff --git a/frontend2/src/utils/types/model/TeamReport.ts b/frontend2/src/utils/types/model/TeamReport.ts deleted file mode 100644 index 7a32ca8d3..000000000 --- a/frontend2/src/utils/types/model/TeamReport.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TeamReport { - report: string; - -} diff --git a/frontend2/src/utils/types/model/TokenObtainPair.ts b/frontend2/src/utils/types/model/TokenObtainPair.ts deleted file mode 100644 index cd699aa9c..000000000 --- a/frontend2/src/utils/types/model/TokenObtainPair.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TokenObtainPair { - username: string; - - password: string; - - access: string; - - refresh: string; - -} diff --git a/frontend2/src/utils/types/model/TokenRefresh.ts b/frontend2/src/utils/types/model/TokenRefresh.ts deleted file mode 100644 index 9f8539417..000000000 --- a/frontend2/src/utils/types/model/TokenRefresh.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TokenRefresh { - access: string; - - refresh: string; - -} diff --git a/frontend2/src/utils/types/model/TokenVerify.ts b/frontend2/src/utils/types/model/TokenVerify.ts deleted file mode 100644 index bf7273fe3..000000000 --- a/frontend2/src/utils/types/model/TokenVerify.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TokenVerify { - token: string; - -} diff --git a/frontend2/src/utils/types/model/Tournament.ts b/frontend2/src/utils/types/model/Tournament.ts deleted file mode 100644 index 4b2e9c1b1..000000000 --- a/frontend2/src/utils/types/model/Tournament.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface Tournament { - nameShort: string; - - nameLong: string; - - blurb?: string; - - episode: string; - - style: models.StyleEnum; - - displayDate: string; - - eligibilityIncludes?: Array; - - eligibilityExcludes?: Array; - - requireResume: boolean; - - isPublic: boolean; - - submissionFreeze: string; - - submissionUnfreeze: string; - - isEligible: boolean; - -} -export namespace Tournament { -} diff --git a/frontend2/src/utils/types/model/TournamentRound.ts b/frontend2/src/utils/types/model/TournamentRound.ts deleted file mode 100644 index 43f0d80ac..000000000 --- a/frontend2/src/utils/types/model/TournamentRound.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TournamentRound { - id: number; - - tournament: string; - - externalId?: number; - - name: string; - - maps?: Array; - - releaseStatus?: models.ReleaseStatusEnum; - -} -export namespace TournamentRound { -} diff --git a/frontend2/src/utils/types/model/TournamentSubmission.ts b/frontend2/src/utils/types/model/TournamentSubmission.ts deleted file mode 100644 index 4d8c6f5dc..000000000 --- a/frontend2/src/utils/types/model/TournamentSubmission.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface TournamentSubmission { - id: number; - - status: models.StatusBccEnum; - - logs: string; - - episode: string; - - team: number; - - teamname: string; - - user: number; - - username: string; - - created: string; - - accepted: boolean; - - _package: string; - - description: string; - - sourceCode: string; - - tournament: string; - -} -export namespace TournamentSubmission { -} diff --git a/frontend2/src/utils/types/model/UserAvatar.ts b/frontend2/src/utils/types/model/UserAvatar.ts deleted file mode 100644 index d8efdc720..000000000 --- a/frontend2/src/utils/types/model/UserAvatar.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserAvatar { - avatar: string; - -} diff --git a/frontend2/src/utils/types/model/UserCreate.ts b/frontend2/src/utils/types/model/UserCreate.ts deleted file mode 100644 index fe6738e0a..000000000 --- a/frontend2/src/utils/types/model/UserCreate.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserCreate { - id: number; - - profile?: models.UserProfilePrivate; - - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - */ - username: string; - - password: string; - - email: string; - - firstName: string; - - lastName: string; - - /** - * Designates whether the user can log into this admin site. - */ - isStaff: boolean; - -} diff --git a/frontend2/src/utils/types/model/UserPassed.ts b/frontend2/src/utils/types/model/UserPassed.ts deleted file mode 100644 index 4e0acce94..000000000 --- a/frontend2/src/utils/types/model/UserPassed.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserPassed { - id: number; - - username: string; - - email: string; - - passed: boolean; - -} diff --git a/frontend2/src/utils/types/model/UserPrivate.ts b/frontend2/src/utils/types/model/UserPrivate.ts deleted file mode 100644 index 0c890aeb2..000000000 --- a/frontend2/src/utils/types/model/UserPrivate.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserPrivate { - id: number; - - profile?: models.UserProfilePrivate; - - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - */ - username: string; - - email: string; - - firstName: string; - - lastName: string; - - /** - * Designates whether the user can log into this admin site. - */ - isStaff: boolean; - -} diff --git a/frontend2/src/utils/types/model/UserProfilePrivate.ts b/frontend2/src/utils/types/model/UserProfilePrivate.ts deleted file mode 100644 index 496c9133f..000000000 --- a/frontend2/src/utils/types/model/UserProfilePrivate.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserProfilePrivate { - gender: models.GenderEnum; - - genderDetails?: string; - - school?: string; - - biography?: string; - - kerberos?: string; - - avatarUrl: string; - - hasAvatar: boolean; - - hasResume: boolean; - - country: models.CountryEnum; - -} -export namespace UserProfilePrivate { -} diff --git a/frontend2/src/utils/types/model/UserProfilePublic.ts b/frontend2/src/utils/types/model/UserProfilePublic.ts deleted file mode 100644 index 59d3f2de7..000000000 --- a/frontend2/src/utils/types/model/UserProfilePublic.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserProfilePublic { - school?: string; - - biography?: string; - - avatarUrl: string; - - hasAvatar: boolean; - -} diff --git a/frontend2/src/utils/types/model/UserPublic.ts b/frontend2/src/utils/types/model/UserPublic.ts deleted file mode 100644 index 79da6787c..000000000 --- a/frontend2/src/utils/types/model/UserPublic.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserPublic { - id: number; - - profile?: models.UserProfilePublic; - - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - */ - username: string; - - /** - * Designates whether the user can log into this admin site. - */ - isStaff: boolean; - -} diff --git a/frontend2/src/utils/types/model/UserResume.ts b/frontend2/src/utils/types/model/UserResume.ts deleted file mode 100644 index 44c4cd7f0..000000000 --- a/frontend2/src/utils/types/model/UserResume.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as models from './models'; - -export interface UserResume { - resume: string; - - ready: boolean; - - url: string; - - reason: string; - -} diff --git a/frontend2/src/utils/types/models/AutoscrimRequest.ts b/frontend2/src/utils/types/models/AutoscrimRequest.ts new file mode 100644 index 000000000..c8fb33c6a --- /dev/null +++ b/frontend2/src/utils/types/models/AutoscrimRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface AutoscrimRequest + */ +export interface AutoscrimRequest { + /** + * + * @type {number} + * @memberof AutoscrimRequest + */ + best_of: number; +} + +/** + * Check if a given object implements the AutoscrimRequest interface. + */ +export function instanceOfAutoscrimRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "best_of" in value; + + return isInstance; +} + +export function AutoscrimRequestFromJSON(json: any): AutoscrimRequest { + return AutoscrimRequestFromJSONTyped(json, false); +} + +export function AutoscrimRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoscrimRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'best_of': json['best_of'], + }; +} + +export function AutoscrimRequestToJSON(value?: AutoscrimRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'best_of': value.best_of, + }; +} + diff --git a/frontend2/src/utils/types/models/ClassRequirement.ts b/frontend2/src/utils/types/models/ClassRequirement.ts new file mode 100644 index 000000000..505769c50 --- /dev/null +++ b/frontend2/src/utils/types/models/ClassRequirement.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ClassRequirement + */ +export interface ClassRequirement { + /** + * + * @type {string} + * @memberof ClassRequirement + */ + episode: string; + /** + * + * @type {number} + * @memberof ClassRequirement + */ + reference_player: number; + /** + * + * @type {Array} + * @memberof ClassRequirement + */ + maps: Array; + /** + * + * @type {number} + * @memberof ClassRequirement + */ + min_score: number; +} + +/** + * Check if a given object implements the ClassRequirement interface. + */ +export function instanceOfClassRequirement(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "episode" in value; + isInstance = isInstance && "reference_player" in value; + isInstance = isInstance && "maps" in value; + isInstance = isInstance && "min_score" in value; + + return isInstance; +} + +export function ClassRequirementFromJSON(json: any): ClassRequirement { + return ClassRequirementFromJSONTyped(json, false); +} + +export function ClassRequirementFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClassRequirement { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'episode': json['episode'], + 'reference_player': json['reference_player'], + 'maps': json['maps'], + 'min_score': json['min_score'], + }; +} + +export function ClassRequirementToJSON(value?: ClassRequirement | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'episode': value.episode, + 'reference_player': value.reference_player, + 'maps': value.maps, + 'min_score': value.min_score, + }; +} + diff --git a/frontend2/src/utils/types/models/CountryEnum.ts b/frontend2/src/utils/types/models/CountryEnum.ts new file mode 100644 index 000000000..1050652a2 --- /dev/null +++ b/frontend2/src/utils/types/models/CountryEnum.ts @@ -0,0 +1,284 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum CountryEnum { + Af = 'AF', + Ax = 'AX', + Al = 'AL', + Dz = 'DZ', + As = 'AS', + Ad = 'AD', + Ao = 'AO', + Ai = 'AI', + Aq = 'AQ', + Ag = 'AG', + Ar = 'AR', + Am = 'AM', + Aw = 'AW', + Au = 'AU', + At = 'AT', + Az = 'AZ', + Bs = 'BS', + Bh = 'BH', + Bd = 'BD', + Bb = 'BB', + By = 'BY', + Be = 'BE', + Bz = 'BZ', + Bj = 'BJ', + Bm = 'BM', + Bt = 'BT', + Bo = 'BO', + Bq = 'BQ', + Ba = 'BA', + Bw = 'BW', + Bv = 'BV', + Br = 'BR', + Io = 'IO', + Bn = 'BN', + Bg = 'BG', + Bf = 'BF', + Bi = 'BI', + Cv = 'CV', + Kh = 'KH', + Cm = 'CM', + Ca = 'CA', + Ky = 'KY', + Cf = 'CF', + Td = 'TD', + Cl = 'CL', + Cn = 'CN', + Cx = 'CX', + Cc = 'CC', + Co = 'CO', + Km = 'KM', + Cg = 'CG', + Cd = 'CD', + Ck = 'CK', + Cr = 'CR', + Ci = 'CI', + Hr = 'HR', + Cu = 'CU', + Cw = 'CW', + Cy = 'CY', + Cz = 'CZ', + Dk = 'DK', + Dj = 'DJ', + Dm = 'DM', + Do = 'DO', + Ec = 'EC', + Eg = 'EG', + Sv = 'SV', + Gq = 'GQ', + Er = 'ER', + Ee = 'EE', + Sz = 'SZ', + Et = 'ET', + Fk = 'FK', + Fo = 'FO', + Fj = 'FJ', + Fi = 'FI', + Fr = 'FR', + Gf = 'GF', + Pf = 'PF', + Tf = 'TF', + Ga = 'GA', + Gm = 'GM', + Ge = 'GE', + De = 'DE', + Gh = 'GH', + Gi = 'GI', + Gr = 'GR', + Gl = 'GL', + Gd = 'GD', + Gp = 'GP', + Gu = 'GU', + Gt = 'GT', + Gg = 'GG', + Gn = 'GN', + Gw = 'GW', + Gy = 'GY', + Ht = 'HT', + Hm = 'HM', + Va = 'VA', + Hn = 'HN', + Hk = 'HK', + Hu = 'HU', + Is = 'IS', + In = 'IN', + Id = 'ID', + Ir = 'IR', + Iq = 'IQ', + Ie = 'IE', + Im = 'IM', + Il = 'IL', + It = 'IT', + Jm = 'JM', + Jp = 'JP', + Je = 'JE', + Jo = 'JO', + Kz = 'KZ', + Ke = 'KE', + Ki = 'KI', + Kw = 'KW', + Kg = 'KG', + La = 'LA', + Lv = 'LV', + Lb = 'LB', + Ls = 'LS', + Lr = 'LR', + Ly = 'LY', + Li = 'LI', + Lt = 'LT', + Lu = 'LU', + Mo = 'MO', + Mg = 'MG', + Mw = 'MW', + My = 'MY', + Mv = 'MV', + Ml = 'ML', + Mt = 'MT', + Mh = 'MH', + Mq = 'MQ', + Mr = 'MR', + Mu = 'MU', + Yt = 'YT', + Mx = 'MX', + Fm = 'FM', + Md = 'MD', + Mc = 'MC', + Mn = 'MN', + Me = 'ME', + Ms = 'MS', + Ma = 'MA', + Mz = 'MZ', + Mm = 'MM', + Na = 'NA', + Nr = 'NR', + Np = 'NP', + Nl = 'NL', + Nc = 'NC', + Nz = 'NZ', + Ni = 'NI', + Ne = 'NE', + Ng = 'NG', + Nu = 'NU', + Nf = 'NF', + Kp = 'KP', + Mk = 'MK', + Mp = 'MP', + No = 'NO', + Om = 'OM', + Pk = 'PK', + Pw = 'PW', + Ps = 'PS', + Pa = 'PA', + Pg = 'PG', + Py = 'PY', + Pe = 'PE', + Ph = 'PH', + Pn = 'PN', + Pl = 'PL', + Pt = 'PT', + Pr = 'PR', + Qa = 'QA', + Re = 'RE', + Ro = 'RO', + Ru = 'RU', + Rw = 'RW', + Bl = 'BL', + Sh = 'SH', + Kn = 'KN', + Lc = 'LC', + Mf = 'MF', + Pm = 'PM', + Vc = 'VC', + Ws = 'WS', + Sm = 'SM', + St = 'ST', + Sa = 'SA', + Sn = 'SN', + Rs = 'RS', + Sc = 'SC', + Sl = 'SL', + Sg = 'SG', + Sx = 'SX', + Sk = 'SK', + Si = 'SI', + Sb = 'SB', + So = 'SO', + Za = 'ZA', + Gs = 'GS', + Kr = 'KR', + Ss = 'SS', + Es = 'ES', + Lk = 'LK', + Sd = 'SD', + Sr = 'SR', + Sj = 'SJ', + Se = 'SE', + Ch = 'CH', + Sy = 'SY', + Tw = 'TW', + Tj = 'TJ', + Tz = 'TZ', + Th = 'TH', + Tl = 'TL', + Tg = 'TG', + Tk = 'TK', + To = 'TO', + Tt = 'TT', + Tn = 'TN', + Tr = 'TR', + Tm = 'TM', + Tc = 'TC', + Tv = 'TV', + Ug = 'UG', + Ua = 'UA', + Ae = 'AE', + Gb = 'GB', + Um = 'UM', + Us = 'US', + Uy = 'UY', + Uz = 'UZ', + Vu = 'VU', + Ve = 'VE', + Vn = 'VN', + Vg = 'VG', + Vi = 'VI', + Wf = 'WF', + Eh = 'EH', + Ye = 'YE', + Zm = 'ZM', + Zw = 'ZW' +} + + +export function CountryEnumFromJSON(json: any): CountryEnum { + return CountryEnumFromJSONTyped(json, false); +} + +export function CountryEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): CountryEnum { + return json as CountryEnum; +} + +export function CountryEnumToJSON(value?: CountryEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/EligibilityCriterion.ts b/frontend2/src/utils/types/models/EligibilityCriterion.ts new file mode 100644 index 000000000..479cdc383 --- /dev/null +++ b/frontend2/src/utils/types/models/EligibilityCriterion.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface EligibilityCriterion + */ +export interface EligibilityCriterion { + /** + * + * @type {number} + * @memberof EligibilityCriterion + */ + readonly id: number; + /** + * + * @type {string} + * @memberof EligibilityCriterion + */ + readonly title: string; + /** + * + * @type {string} + * @memberof EligibilityCriterion + */ + readonly description: string; + /** + * + * @type {string} + * @memberof EligibilityCriterion + */ + readonly icon: string; +} + +/** + * Check if a given object implements the EligibilityCriterion interface. + */ +export function instanceOfEligibilityCriterion(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "title" in value; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "icon" in value; + + return isInstance; +} + +export function EligibilityCriterionFromJSON(json: any): EligibilityCriterion { + return EligibilityCriterionFromJSONTyped(json, false); +} + +export function EligibilityCriterionFromJSONTyped(json: any, ignoreDiscriminator: boolean): EligibilityCriterion { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'title': json['title'], + 'description': json['description'], + 'icon': json['icon'], + }; +} + +export function EligibilityCriterionToJSON(value?: EligibilityCriterion | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/Email.ts b/frontend2/src/utils/types/models/Email.ts new file mode 100644 index 000000000..7f767d4bd --- /dev/null +++ b/frontend2/src/utils/types/models/Email.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface Email + */ +export interface Email { + /** + * + * @type {string} + * @memberof Email + */ + email: string; +} + +/** + * Check if a given object implements the Email interface. + */ +export function instanceOfEmail(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "email" in value; + + return isInstance; +} + +export function EmailFromJSON(json: any): Email { + return EmailFromJSONTyped(json, false); +} + +export function EmailFromJSONTyped(json: any, ignoreDiscriminator: boolean): Email { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'email': json['email'], + }; +} + +export function EmailToJSON(value?: Email | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'email': value.email, + }; +} + diff --git a/frontend2/src/utils/types/models/EmailRequest.ts b/frontend2/src/utils/types/models/EmailRequest.ts new file mode 100644 index 000000000..9c9e039d8 --- /dev/null +++ b/frontend2/src/utils/types/models/EmailRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface EmailRequest + */ +export interface EmailRequest { + /** + * + * @type {string} + * @memberof EmailRequest + */ + email: string; +} + +/** + * Check if a given object implements the EmailRequest interface. + */ +export function instanceOfEmailRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "email" in value; + + return isInstance; +} + +export function EmailRequestFromJSON(json: any): EmailRequest { + return EmailRequestFromJSONTyped(json, false); +} + +export function EmailRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'email': json['email'], + }; +} + +export function EmailRequestToJSON(value?: EmailRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'email': value.email, + }; +} + diff --git a/frontend2/src/utils/types/models/Episode.ts b/frontend2/src/utils/types/models/Episode.ts new file mode 100644 index 000000000..fdef961bc --- /dev/null +++ b/frontend2/src/utils/types/models/Episode.ts @@ -0,0 +1,163 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { EligibilityCriterion } from './EligibilityCriterion'; +import { + EligibilityCriterionFromJSON, + EligibilityCriterionFromJSONTyped, + EligibilityCriterionToJSON, +} from './EligibilityCriterion'; +import type { LanguageEnum } from './LanguageEnum'; +import { + LanguageEnumFromJSON, + LanguageEnumFromJSONTyped, + LanguageEnumToJSON, +} from './LanguageEnum'; + +/** + * + * @export + * @interface Episode + */ +export interface Episode { + /** + * + * @type {string} + * @memberof Episode + */ + name_short: string; + /** + * + * @type {string} + * @memberof Episode + */ + name_long: string; + /** + * + * @type {string} + * @memberof Episode + */ + blurb?: string; + /** + * + * @type {Date} + * @memberof Episode + */ + game_release: Date; + /** + * + * @type {LanguageEnum} + * @memberof Episode + */ + language: LanguageEnum; + /** + * + * @type {string} + * @memberof Episode + */ + scaffold?: string; + /** + * + * @type {string} + * @memberof Episode + */ + artifact_name?: string; + /** + * + * @type {string} + * @memberof Episode + */ + release_version_public?: string; + /** + * + * @type {string} + * @memberof Episode + */ + release_version_saturn?: string; + /** + * + * @type {Array} + * @memberof Episode + */ + eligibility_criteria: Array; + /** + * + * @type {boolean} + * @memberof Episode + */ + readonly frozen: boolean; +} + +/** + * Check if a given object implements the Episode interface. + */ +export function instanceOfEpisode(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name_short" in value; + isInstance = isInstance && "name_long" in value; + isInstance = isInstance && "game_release" in value; + isInstance = isInstance && "language" in value; + isInstance = isInstance && "eligibility_criteria" in value; + isInstance = isInstance && "frozen" in value; + + return isInstance; +} + +export function EpisodeFromJSON(json: any): Episode { + return EpisodeFromJSONTyped(json, false); +} + +export function EpisodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Episode { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name_short': json['name_short'], + 'name_long': json['name_long'], + 'blurb': !exists(json, 'blurb') ? undefined : json['blurb'], + 'game_release': (new Date(json['game_release'])), + 'language': LanguageEnumFromJSON(json['language']), + 'scaffold': !exists(json, 'scaffold') ? undefined : json['scaffold'], + 'artifact_name': !exists(json, 'artifact_name') ? undefined : json['artifact_name'], + 'release_version_public': !exists(json, 'release_version_public') ? undefined : json['release_version_public'], + 'release_version_saturn': !exists(json, 'release_version_saturn') ? undefined : json['release_version_saturn'], + 'eligibility_criteria': ((json['eligibility_criteria'] as Array).map(EligibilityCriterionFromJSON)), + 'frozen': json['frozen'], + }; +} + +export function EpisodeToJSON(value?: Episode | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name_short': value.name_short, + 'name_long': value.name_long, + 'blurb': value.blurb, + 'game_release': (value.game_release.toISOString()), + 'language': LanguageEnumToJSON(value.language), + 'scaffold': value.scaffold, + 'artifact_name': value.artifact_name, + 'release_version_public': value.release_version_public, + 'release_version_saturn': value.release_version_saturn, + 'eligibility_criteria': ((value.eligibility_criteria as Array).map(EligibilityCriterionToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/GenderEnum.ts b/frontend2/src/utils/types/models/GenderEnum.ts new file mode 100644 index 000000000..a6be0865e --- /dev/null +++ b/frontend2/src/utils/types/models/GenderEnum.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum GenderEnum { + F = 'F', + M = 'M', + N = 'N', + Star = '*', + QuestionMark = '?' +} + + +export function GenderEnumFromJSON(json: any): GenderEnum { + return GenderEnumFromJSONTyped(json, false); +} + +export function GenderEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenderEnum { + return json as GenderEnum; +} + +export function GenderEnumToJSON(value?: GenderEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/HistoricalRating.ts b/frontend2/src/utils/types/models/HistoricalRating.ts new file mode 100644 index 000000000..c2c661b62 --- /dev/null +++ b/frontend2/src/utils/types/models/HistoricalRating.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface HistoricalRating + */ +export interface HistoricalRating { + /** + * + * @type {number} + * @memberof HistoricalRating + */ + rating: number; + /** + * + * @type {Date} + * @memberof HistoricalRating + */ + timestamp: Date; +} + +/** + * Check if a given object implements the HistoricalRating interface. + */ +export function instanceOfHistoricalRating(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "rating" in value; + isInstance = isInstance && "timestamp" in value; + + return isInstance; +} + +export function HistoricalRatingFromJSON(json: any): HistoricalRating { + return HistoricalRatingFromJSONTyped(json, false); +} + +export function HistoricalRatingFromJSONTyped(json: any, ignoreDiscriminator: boolean): HistoricalRating { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rating': json['rating'], + 'timestamp': (new Date(json['timestamp'])), + }; +} + +export function HistoricalRatingToJSON(value?: HistoricalRating | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rating': value.rating, + 'timestamp': (value.timestamp.toISOString()), + }; +} + diff --git a/frontend2/src/utils/types/models/LanguageEnum.ts b/frontend2/src/utils/types/models/LanguageEnum.ts new file mode 100644 index 000000000..352b481ee --- /dev/null +++ b/frontend2/src/utils/types/models/LanguageEnum.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum LanguageEnum { + Java8 = 'java8', + Py3 = 'py3' +} + + +export function LanguageEnumFromJSON(json: any): LanguageEnum { + return LanguageEnumFromJSONTyped(json, false); +} + +export function LanguageEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LanguageEnum { + return json as LanguageEnum; +} + +export function LanguageEnumToJSON(value?: LanguageEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/Match.ts b/frontend2/src/utils/types/models/Match.ts new file mode 100644 index 000000000..595eb688c --- /dev/null +++ b/frontend2/src/utils/types/models/Match.ts @@ -0,0 +1,151 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { MatchParticipant } from './MatchParticipant'; +import { + MatchParticipantFromJSON, + MatchParticipantFromJSONTyped, + MatchParticipantToJSON, +} from './MatchParticipant'; +import type { StatusBccEnum } from './StatusBccEnum'; +import { + StatusBccEnumFromJSON, + StatusBccEnumFromJSONTyped, + StatusBccEnumToJSON, +} from './StatusBccEnum'; + +/** + * + * @export + * @interface Match + */ +export interface Match { + /** + * + * @type {number} + * @memberof Match + */ + readonly id: number; + /** + * + * @type {StatusBccEnum} + * @memberof Match + */ + readonly status: StatusBccEnum; + /** + * + * @type {string} + * @memberof Match + */ + readonly episode: string; + /** + * + * @type {number} + * @memberof Match + */ + readonly tournament_round: number | null; + /** + * + * @type {Array} + * @memberof Match + */ + participants: Array; + /** + * + * @type {Array} + * @memberof Match + */ + readonly maps: Array; + /** + * + * @type {boolean} + * @memberof Match + */ + readonly alternate_order: boolean; + /** + * + * @type {Date} + * @memberof Match + */ + readonly created: Date; + /** + * + * @type {boolean} + * @memberof Match + */ + readonly is_ranked: boolean; + /** + * + * @type {string} + * @memberof Match + */ + readonly replay_url: string; +} + +/** + * Check if a given object implements the Match interface. + */ +export function instanceOfMatch(value: object): boolean { + let isInstance = true; + 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; + isInstance = isInstance && "created" in value; + isInstance = isInstance && "is_ranked" in value; + isInstance = isInstance && "replay_url" in value; + + return isInstance; +} + +export function MatchFromJSON(json: any): Match { + return MatchFromJSONTyped(json, false); +} + +export function MatchFromJSONTyped(json: any, ignoreDiscriminator: boolean): Match { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'status': StatusBccEnumFromJSON(json['status']), + 'episode': json['episode'], + 'tournament_round': json['tournament_round'], + 'participants': ((json['participants'] as Array).map(MatchParticipantFromJSON)), + 'maps': json['maps'], + 'alternate_order': json['alternate_order'], + 'created': (new Date(json['created'])), + 'is_ranked': json['is_ranked'], + 'replay_url': json['replay_url'], + }; +} + +export function MatchToJSON(value?: Match | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'participants': ((value.participants as Array).map(MatchParticipantToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/MatchParticipant.ts b/frontend2/src/utils/types/models/MatchParticipant.ts new file mode 100644 index 000000000..f2f33acb5 --- /dev/null +++ b/frontend2/src/utils/types/models/MatchParticipant.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface MatchParticipant + */ +export interface MatchParticipant { + /** + * + * @type {number} + * @memberof MatchParticipant + */ + readonly team: number; + /** + * + * @type {string} + * @memberof MatchParticipant + */ + readonly teamname: string; + /** + * + * @type {number} + * @memberof MatchParticipant + */ + readonly submission: number; + /** + * + * @type {number} + * @memberof MatchParticipant + */ + readonly match: number; + /** + * + * @type {number} + * @memberof MatchParticipant + */ + readonly player_index: number; + /** + * + * @type {number} + * @memberof MatchParticipant + */ + readonly score: number | null; + /** + * + * @type {number} + * @memberof MatchParticipant + */ + readonly rating: number; + /** + * + * @type {number} + * @memberof MatchParticipant + */ + readonly old_rating: number; +} + +/** + * Check if a given object implements the MatchParticipant interface. + */ +export function instanceOfMatchParticipant(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "team" in value; + isInstance = isInstance && "teamname" in value; + isInstance = isInstance && "submission" in value; + isInstance = isInstance && "match" in value; + isInstance = isInstance && "player_index" in value; + isInstance = isInstance && "score" in value; + isInstance = isInstance && "rating" in value; + isInstance = isInstance && "old_rating" in value; + + return isInstance; +} + +export function MatchParticipantFromJSON(json: any): MatchParticipant { + return MatchParticipantFromJSONTyped(json, false); +} + +export function MatchParticipantFromJSONTyped(json: any, ignoreDiscriminator: boolean): MatchParticipant { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'team': json['team'], + 'teamname': json['teamname'], + 'submission': json['submission'], + 'match': json['match'], + 'player_index': json['player_index'], + 'score': json['score'], + 'rating': json['rating'], + 'old_rating': json['old_rating'], + }; +} + +export function MatchParticipantToJSON(value?: MatchParticipant | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/MatchReportRequest.ts b/frontend2/src/utils/types/models/MatchReportRequest.ts new file mode 100644 index 000000000..683141a1e --- /dev/null +++ b/frontend2/src/utils/types/models/MatchReportRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SaturnInvocationRequest } from './SaturnInvocationRequest'; +import { + SaturnInvocationRequestFromJSON, + SaturnInvocationRequestFromJSONTyped, + SaturnInvocationRequestToJSON, +} from './SaturnInvocationRequest'; + +/** + * + * @export + * @interface MatchReportRequest + */ +export interface MatchReportRequest { + /** + * + * @type {SaturnInvocationRequest} + * @memberof MatchReportRequest + */ + invocation: SaturnInvocationRequest; + /** + * + * @type {Array} + * @memberof MatchReportRequest + */ + scores?: Array; +} + +/** + * Check if a given object implements the MatchReportRequest interface. + */ +export function instanceOfMatchReportRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "invocation" in value; + + return isInstance; +} + +export function MatchReportRequestFromJSON(json: any): MatchReportRequest { + return MatchReportRequestFromJSONTyped(json, false); +} + +export function MatchReportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MatchReportRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'invocation': SaturnInvocationRequestFromJSON(json['invocation']), + 'scores': !exists(json, 'scores') ? undefined : json['scores'], + }; +} + +export function MatchReportRequestToJSON(value?: MatchReportRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'invocation': SaturnInvocationRequestToJSON(value.invocation), + 'scores': value.scores, + }; +} + diff --git a/frontend2/src/utils/types/models/ModelMap.ts b/frontend2/src/utils/types/models/ModelMap.ts new file mode 100644 index 000000000..90a30ca9a --- /dev/null +++ b/frontend2/src/utils/types/models/ModelMap.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ModelMap + */ +export interface ModelMap { + /** + * + * @type {number} + * @memberof ModelMap + */ + readonly id: number; + /** + * + * @type {string} + * @memberof ModelMap + */ + readonly episode: string; + /** + * + * @type {string} + * @memberof ModelMap + */ + readonly name: string; + /** + * + * @type {boolean} + * @memberof ModelMap + */ + readonly is_public: boolean; +} + +/** + * Check if a given object implements the ModelMap interface. + */ +export function instanceOfModelMap(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "episode" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "is_public" in value; + + return isInstance; +} + +export function ModelMapFromJSON(json: any): ModelMap { + return ModelMapFromJSONTyped(json, false); +} + +export function ModelMapFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelMap { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'episode': json['episode'], + 'name': json['name'], + 'is_public': json['is_public'], + }; +} + +export function ModelMapToJSON(value?: ModelMap | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedClassRequirementList.ts b/frontend2/src/utils/types/models/PaginatedClassRequirementList.ts new file mode 100644 index 000000000..3d31c3796 --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedClassRequirementList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ClassRequirement } from './ClassRequirement'; +import { + ClassRequirementFromJSON, + ClassRequirementFromJSONTyped, + ClassRequirementToJSON, +} from './ClassRequirement'; + +/** + * + * @export + * @interface PaginatedClassRequirementList + */ +export interface PaginatedClassRequirementList { + /** + * + * @type {number} + * @memberof PaginatedClassRequirementList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedClassRequirementList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedClassRequirementList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedClassRequirementList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedClassRequirementList interface. + */ +export function instanceOfPaginatedClassRequirementList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedClassRequirementListFromJSON(json: any): PaginatedClassRequirementList { + return PaginatedClassRequirementListFromJSONTyped(json, false); +} + +export function PaginatedClassRequirementListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedClassRequirementList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(ClassRequirementFromJSON)), + }; +} + +export function PaginatedClassRequirementListToJSON(value?: PaginatedClassRequirementList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(ClassRequirementToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedEpisodeList.ts b/frontend2/src/utils/types/models/PaginatedEpisodeList.ts new file mode 100644 index 000000000..cda29c105 --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedEpisodeList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Episode } from './Episode'; +import { + EpisodeFromJSON, + EpisodeFromJSONTyped, + EpisodeToJSON, +} from './Episode'; + +/** + * + * @export + * @interface PaginatedEpisodeList + */ +export interface PaginatedEpisodeList { + /** + * + * @type {number} + * @memberof PaginatedEpisodeList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedEpisodeList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedEpisodeList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedEpisodeList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedEpisodeList interface. + */ +export function instanceOfPaginatedEpisodeList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedEpisodeListFromJSON(json: any): PaginatedEpisodeList { + return PaginatedEpisodeListFromJSONTyped(json, false); +} + +export function PaginatedEpisodeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEpisodeList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(EpisodeFromJSON)), + }; +} + +export function PaginatedEpisodeListToJSON(value?: PaginatedEpisodeList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(EpisodeToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedMatchList.ts b/frontend2/src/utils/types/models/PaginatedMatchList.ts new file mode 100644 index 000000000..10abaff07 --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedMatchList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Match } from './Match'; +import { + MatchFromJSON, + MatchFromJSONTyped, + MatchToJSON, +} from './Match'; + +/** + * + * @export + * @interface PaginatedMatchList + */ +export interface PaginatedMatchList { + /** + * + * @type {number} + * @memberof PaginatedMatchList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedMatchList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedMatchList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedMatchList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedMatchList interface. + */ +export function instanceOfPaginatedMatchList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedMatchListFromJSON(json: any): PaginatedMatchList { + return PaginatedMatchListFromJSONTyped(json, false); +} + +export function PaginatedMatchListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMatchList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(MatchFromJSON)), + }; +} + +export function PaginatedMatchListToJSON(value?: PaginatedMatchList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(MatchToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedScrimmageRequestList.ts b/frontend2/src/utils/types/models/PaginatedScrimmageRequestList.ts new file mode 100644 index 000000000..d15746e02 --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedScrimmageRequestList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ScrimmageRequest } from './ScrimmageRequest'; +import { + ScrimmageRequestFromJSON, + ScrimmageRequestFromJSONTyped, + ScrimmageRequestToJSON, +} from './ScrimmageRequest'; + +/** + * + * @export + * @interface PaginatedScrimmageRequestList + */ +export interface PaginatedScrimmageRequestList { + /** + * + * @type {number} + * @memberof PaginatedScrimmageRequestList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedScrimmageRequestList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedScrimmageRequestList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedScrimmageRequestList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedScrimmageRequestList interface. + */ +export function instanceOfPaginatedScrimmageRequestList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedScrimmageRequestListFromJSON(json: any): PaginatedScrimmageRequestList { + return PaginatedScrimmageRequestListFromJSONTyped(json, false); +} + +export function PaginatedScrimmageRequestListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedScrimmageRequestList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(ScrimmageRequestFromJSON)), + }; +} + +export function PaginatedScrimmageRequestListToJSON(value?: PaginatedScrimmageRequestList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(ScrimmageRequestToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedSubmissionList.ts b/frontend2/src/utils/types/models/PaginatedSubmissionList.ts new file mode 100644 index 000000000..8ddd795ba --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedSubmissionList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Submission } from './Submission'; +import { + SubmissionFromJSON, + SubmissionFromJSONTyped, + SubmissionToJSON, +} from './Submission'; + +/** + * + * @export + * @interface PaginatedSubmissionList + */ +export interface PaginatedSubmissionList { + /** + * + * @type {number} + * @memberof PaginatedSubmissionList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedSubmissionList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedSubmissionList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedSubmissionList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedSubmissionList interface. + */ +export function instanceOfPaginatedSubmissionList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedSubmissionListFromJSON(json: any): PaginatedSubmissionList { + return PaginatedSubmissionListFromJSONTyped(json, false); +} + +export function PaginatedSubmissionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSubmissionList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(SubmissionFromJSON)), + }; +} + +export function PaginatedSubmissionListToJSON(value?: PaginatedSubmissionList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(SubmissionToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedTeamPublicList.ts b/frontend2/src/utils/types/models/PaginatedTeamPublicList.ts new file mode 100644 index 000000000..0cfc5a24d --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedTeamPublicList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TeamPublic } from './TeamPublic'; +import { + TeamPublicFromJSON, + TeamPublicFromJSONTyped, + TeamPublicToJSON, +} from './TeamPublic'; + +/** + * + * @export + * @interface PaginatedTeamPublicList + */ +export interface PaginatedTeamPublicList { + /** + * + * @type {number} + * @memberof PaginatedTeamPublicList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedTeamPublicList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedTeamPublicList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedTeamPublicList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedTeamPublicList interface. + */ +export function instanceOfPaginatedTeamPublicList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedTeamPublicListFromJSON(json: any): PaginatedTeamPublicList { + return PaginatedTeamPublicListFromJSONTyped(json, false); +} + +export function PaginatedTeamPublicListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTeamPublicList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(TeamPublicFromJSON)), + }; +} + +export function PaginatedTeamPublicListToJSON(value?: PaginatedTeamPublicList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(TeamPublicToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedTournamentList.ts b/frontend2/src/utils/types/models/PaginatedTournamentList.ts new file mode 100644 index 000000000..9a8ab2cc6 --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedTournamentList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Tournament } from './Tournament'; +import { + TournamentFromJSON, + TournamentFromJSONTyped, + TournamentToJSON, +} from './Tournament'; + +/** + * + * @export + * @interface PaginatedTournamentList + */ +export interface PaginatedTournamentList { + /** + * + * @type {number} + * @memberof PaginatedTournamentList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedTournamentList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedTournamentList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedTournamentList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedTournamentList interface. + */ +export function instanceOfPaginatedTournamentList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedTournamentListFromJSON(json: any): PaginatedTournamentList { + return PaginatedTournamentListFromJSONTyped(json, false); +} + +export function PaginatedTournamentListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTournamentList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(TournamentFromJSON)), + }; +} + +export function PaginatedTournamentListToJSON(value?: PaginatedTournamentList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(TournamentToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedTournamentRoundList.ts b/frontend2/src/utils/types/models/PaginatedTournamentRoundList.ts new file mode 100644 index 000000000..34920c46b --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedTournamentRoundList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TournamentRound } from './TournamentRound'; +import { + TournamentRoundFromJSON, + TournamentRoundFromJSONTyped, + TournamentRoundToJSON, +} from './TournamentRound'; + +/** + * + * @export + * @interface PaginatedTournamentRoundList + */ +export interface PaginatedTournamentRoundList { + /** + * + * @type {number} + * @memberof PaginatedTournamentRoundList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedTournamentRoundList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedTournamentRoundList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedTournamentRoundList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedTournamentRoundList interface. + */ +export function instanceOfPaginatedTournamentRoundList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedTournamentRoundListFromJSON(json: any): PaginatedTournamentRoundList { + return PaginatedTournamentRoundListFromJSONTyped(json, false); +} + +export function PaginatedTournamentRoundListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTournamentRoundList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(TournamentRoundFromJSON)), + }; +} + +export function PaginatedTournamentRoundListToJSON(value?: PaginatedTournamentRoundList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(TournamentRoundToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PaginatedTournamentSubmissionList.ts b/frontend2/src/utils/types/models/PaginatedTournamentSubmissionList.ts new file mode 100644 index 000000000..e5d3bb0ad --- /dev/null +++ b/frontend2/src/utils/types/models/PaginatedTournamentSubmissionList.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TournamentSubmission } from './TournamentSubmission'; +import { + TournamentSubmissionFromJSON, + TournamentSubmissionFromJSONTyped, + TournamentSubmissionToJSON, +} from './TournamentSubmission'; + +/** + * + * @export + * @interface PaginatedTournamentSubmissionList + */ +export interface PaginatedTournamentSubmissionList { + /** + * + * @type {number} + * @memberof PaginatedTournamentSubmissionList + */ + count?: number; + /** + * + * @type {string} + * @memberof PaginatedTournamentSubmissionList + */ + next?: string | null; + /** + * + * @type {string} + * @memberof PaginatedTournamentSubmissionList + */ + previous?: string | null; + /** + * + * @type {Array} + * @memberof PaginatedTournamentSubmissionList + */ + results?: Array; +} + +/** + * Check if a given object implements the PaginatedTournamentSubmissionList interface. + */ +export function instanceOfPaginatedTournamentSubmissionList(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PaginatedTournamentSubmissionListFromJSON(json: any): PaginatedTournamentSubmissionList { + return PaginatedTournamentSubmissionListFromJSONTyped(json, false); +} + +export function PaginatedTournamentSubmissionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTournamentSubmissionList { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'count': !exists(json, 'count') ? undefined : json['count'], + 'next': !exists(json, 'next') ? undefined : json['next'], + 'previous': !exists(json, 'previous') ? undefined : json['previous'], + 'results': !exists(json, 'results') ? undefined : ((json['results'] as Array).map(TournamentSubmissionFromJSON)), + }; +} + +export function PaginatedTournamentSubmissionListToJSON(value?: PaginatedTournamentSubmissionList | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'count': value.count, + 'next': value.next, + 'previous': value.previous, + 'results': value.results === undefined ? undefined : ((value.results as Array).map(TournamentSubmissionToJSON)), + }; +} + diff --git a/frontend2/src/utils/types/models/PasswordToken.ts b/frontend2/src/utils/types/models/PasswordToken.ts new file mode 100644 index 000000000..eb0694171 --- /dev/null +++ b/frontend2/src/utils/types/models/PasswordToken.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PasswordToken + */ +export interface PasswordToken { + /** + * + * @type {string} + * @memberof PasswordToken + */ + password: string; + /** + * + * @type {string} + * @memberof PasswordToken + */ + token: string; +} + +/** + * Check if a given object implements the PasswordToken interface. + */ +export function instanceOfPasswordToken(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "password" in value; + isInstance = isInstance && "token" in value; + + return isInstance; +} + +export function PasswordTokenFromJSON(json: any): PasswordToken { + return PasswordTokenFromJSONTyped(json, false); +} + +export function PasswordTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordToken { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'password': json['password'], + 'token': json['token'], + }; +} + +export function PasswordTokenToJSON(value?: PasswordToken | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'password': value.password, + 'token': value.token, + }; +} + diff --git a/frontend2/src/utils/types/models/PasswordTokenRequest.ts b/frontend2/src/utils/types/models/PasswordTokenRequest.ts new file mode 100644 index 000000000..55b43a506 --- /dev/null +++ b/frontend2/src/utils/types/models/PasswordTokenRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PasswordTokenRequest + */ +export interface PasswordTokenRequest { + /** + * + * @type {string} + * @memberof PasswordTokenRequest + */ + password: string; + /** + * + * @type {string} + * @memberof PasswordTokenRequest + */ + token: string; +} + +/** + * Check if a given object implements the PasswordTokenRequest interface. + */ +export function instanceOfPasswordTokenRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "password" in value; + isInstance = isInstance && "token" in value; + + return isInstance; +} + +export function PasswordTokenRequestFromJSON(json: any): PasswordTokenRequest { + return PasswordTokenRequestFromJSONTyped(json, false); +} + +export function PasswordTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordTokenRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'password': json['password'], + 'token': json['token'], + }; +} + +export function PasswordTokenRequestToJSON(value?: PasswordTokenRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'password': value.password, + 'token': value.token, + }; +} + diff --git a/frontend2/src/utils/types/models/PatchedTeamPrivateRequest.ts b/frontend2/src/utils/types/models/PatchedTeamPrivateRequest.ts new file mode 100644 index 000000000..2ff69cec4 --- /dev/null +++ b/frontend2/src/utils/types/models/PatchedTeamPrivateRequest.ts @@ -0,0 +1,80 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TeamProfilePrivateRequest } from './TeamProfilePrivateRequest'; +import { + TeamProfilePrivateRequestFromJSON, + TeamProfilePrivateRequestFromJSONTyped, + TeamProfilePrivateRequestToJSON, +} from './TeamProfilePrivateRequest'; + +/** + * + * @export + * @interface PatchedTeamPrivateRequest + */ +export interface PatchedTeamPrivateRequest { + /** + * + * @type {TeamProfilePrivateRequest} + * @memberof PatchedTeamPrivateRequest + */ + profile?: TeamProfilePrivateRequest; + /** + * + * @type {string} + * @memberof PatchedTeamPrivateRequest + */ + episode?: string; +} + +/** + * Check if a given object implements the PatchedTeamPrivateRequest interface. + */ +export function instanceOfPatchedTeamPrivateRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PatchedTeamPrivateRequestFromJSON(json: any): PatchedTeamPrivateRequest { + return PatchedTeamPrivateRequestFromJSONTyped(json, false); +} + +export function PatchedTeamPrivateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedTeamPrivateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'profile': !exists(json, 'profile') ? undefined : TeamProfilePrivateRequestFromJSON(json['profile']), + 'episode': !exists(json, 'episode') ? undefined : json['episode'], + }; +} + +export function PatchedTeamPrivateRequestToJSON(value?: PatchedTeamPrivateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': TeamProfilePrivateRequestToJSON(value.profile), + 'episode': value.episode, + }; +} + diff --git a/frontend2/src/utils/types/models/PatchedUserPrivateRequest.ts b/frontend2/src/utils/types/models/PatchedUserPrivateRequest.ts new file mode 100644 index 000000000..47180ee4e --- /dev/null +++ b/frontend2/src/utils/types/models/PatchedUserPrivateRequest.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserProfilePrivateRequest } from './UserProfilePrivateRequest'; +import { + UserProfilePrivateRequestFromJSON, + UserProfilePrivateRequestFromJSONTyped, + UserProfilePrivateRequestToJSON, +} from './UserProfilePrivateRequest'; + +/** + * + * @export + * @interface PatchedUserPrivateRequest + */ +export interface PatchedUserPrivateRequest { + /** + * + * @type {UserProfilePrivateRequest} + * @memberof PatchedUserPrivateRequest + */ + profile?: UserProfilePrivateRequest; + /** + * + * @type {string} + * @memberof PatchedUserPrivateRequest + */ + email?: string; + /** + * + * @type {string} + * @memberof PatchedUserPrivateRequest + */ + first_name?: string; + /** + * + * @type {string} + * @memberof PatchedUserPrivateRequest + */ + last_name?: string; +} + +/** + * Check if a given object implements the PatchedUserPrivateRequest interface. + */ +export function instanceOfPatchedUserPrivateRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function PatchedUserPrivateRequestFromJSON(json: any): PatchedUserPrivateRequest { + return PatchedUserPrivateRequestFromJSONTyped(json, false); +} + +export function PatchedUserPrivateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserPrivateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'profile': !exists(json, 'profile') ? undefined : UserProfilePrivateRequestFromJSON(json['profile']), + 'email': !exists(json, 'email') ? undefined : json['email'], + 'first_name': !exists(json, 'first_name') ? undefined : json['first_name'], + 'last_name': !exists(json, 'last_name') ? undefined : json['last_name'], + }; +} + +export function PatchedUserPrivateRequestToJSON(value?: PatchedUserPrivateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': UserProfilePrivateRequestToJSON(value.profile), + 'email': value.email, + 'first_name': value.first_name, + 'last_name': value.last_name, + }; +} + diff --git a/frontend2/src/utils/types/models/PlayerOrderEnum.ts b/frontend2/src/utils/types/models/PlayerOrderEnum.ts new file mode 100644 index 000000000..3e732e91e --- /dev/null +++ b/frontend2/src/utils/types/models/PlayerOrderEnum.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum PlayerOrderEnum { + Plus = '+', + Minus = '-', + QuestionMark = '?' +} + + +export function PlayerOrderEnumFromJSON(json: any): PlayerOrderEnum { + return PlayerOrderEnumFromJSONTyped(json, false); +} + +export function PlayerOrderEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlayerOrderEnum { + return json as PlayerOrderEnum; +} + +export function PlayerOrderEnumToJSON(value?: PlayerOrderEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/ReleaseStatusEnum.ts b/frontend2/src/utils/types/models/ReleaseStatusEnum.ts new file mode 100644 index 000000000..6c6ab342e --- /dev/null +++ b/frontend2/src/utils/types/models/ReleaseStatusEnum.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum ReleaseStatusEnum { + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_2 = 2 +} + + +export function ReleaseStatusEnumFromJSON(json: any): ReleaseStatusEnum { + return ReleaseStatusEnumFromJSONTyped(json, false); +} + +export function ReleaseStatusEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReleaseStatusEnum { + return json as ReleaseStatusEnum; +} + +export function ReleaseStatusEnumToJSON(value?: ReleaseStatusEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/ResetToken.ts b/frontend2/src/utils/types/models/ResetToken.ts new file mode 100644 index 000000000..378f3eae3 --- /dev/null +++ b/frontend2/src/utils/types/models/ResetToken.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ResetToken + */ +export interface ResetToken { + /** + * + * @type {string} + * @memberof ResetToken + */ + token: string; +} + +/** + * Check if a given object implements the ResetToken interface. + */ +export function instanceOfResetToken(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "token" in value; + + return isInstance; +} + +export function ResetTokenFromJSON(json: any): ResetToken { + return ResetTokenFromJSONTyped(json, false); +} + +export function ResetTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResetToken { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function ResetTokenToJSON(value?: ResetToken | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'token': value.token, + }; +} + diff --git a/frontend2/src/utils/types/models/ResetTokenRequest.ts b/frontend2/src/utils/types/models/ResetTokenRequest.ts new file mode 100644 index 000000000..3c67f83b3 --- /dev/null +++ b/frontend2/src/utils/types/models/ResetTokenRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ResetTokenRequest + */ +export interface ResetTokenRequest { + /** + * + * @type {string} + * @memberof ResetTokenRequest + */ + token: string; +} + +/** + * Check if a given object implements the ResetTokenRequest interface. + */ +export function instanceOfResetTokenRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "token" in value; + + return isInstance; +} + +export function ResetTokenRequestFromJSON(json: any): ResetTokenRequest { + return ResetTokenRequestFromJSONTyped(json, false); +} + +export function ResetTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResetTokenRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function ResetTokenRequestToJSON(value?: ResetTokenRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'token': value.token, + }; +} + diff --git a/frontend2/src/utils/types/models/SaturnInvocationRequest.ts b/frontend2/src/utils/types/models/SaturnInvocationRequest.ts new file mode 100644 index 000000000..9095c3d3e --- /dev/null +++ b/frontend2/src/utils/types/models/SaturnInvocationRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { StatusBccEnum } from './StatusBccEnum'; +import { + StatusBccEnumFromJSON, + StatusBccEnumFromJSONTyped, + StatusBccEnumToJSON, +} from './StatusBccEnum'; + +/** + * + * @export + * @interface SaturnInvocationRequest + */ +export interface SaturnInvocationRequest { + /** + * + * @type {StatusBccEnum} + * @memberof SaturnInvocationRequest + */ + status: StatusBccEnum; + /** + * + * @type {string} + * @memberof SaturnInvocationRequest + */ + logs?: string; + /** + * + * @type {boolean} + * @memberof SaturnInvocationRequest + */ + interrupted?: boolean; +} + +/** + * Check if a given object implements the SaturnInvocationRequest interface. + */ +export function instanceOfSaturnInvocationRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "status" in value; + + return isInstance; +} + +export function SaturnInvocationRequestFromJSON(json: any): SaturnInvocationRequest { + return SaturnInvocationRequestFromJSONTyped(json, false); +} + +export function SaturnInvocationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaturnInvocationRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'status': StatusBccEnumFromJSON(json['status']), + 'logs': !exists(json, 'logs') ? undefined : json['logs'], + 'interrupted': !exists(json, 'interrupted') ? undefined : json['interrupted'], + }; +} + +export function SaturnInvocationRequestToJSON(value?: SaturnInvocationRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'status': StatusBccEnumToJSON(value.status), + 'logs': value.logs, + 'interrupted': value.interrupted, + }; +} + diff --git a/frontend2/src/utils/types/models/ScrimmageRequest.ts b/frontend2/src/utils/types/models/ScrimmageRequest.ts new file mode 100644 index 000000000..19b0161c3 --- /dev/null +++ b/frontend2/src/utils/types/models/ScrimmageRequest.ts @@ -0,0 +1,177 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PlayerOrderEnum } from './PlayerOrderEnum'; +import { + PlayerOrderEnumFromJSON, + PlayerOrderEnumFromJSONTyped, + PlayerOrderEnumToJSON, +} from './PlayerOrderEnum'; +import type { ScrimmageStatusEnum } from './ScrimmageStatusEnum'; +import { + ScrimmageStatusEnumFromJSON, + ScrimmageStatusEnumFromJSONTyped, + ScrimmageStatusEnumToJSON, +} from './ScrimmageStatusEnum'; + +/** + * + * @export + * @interface ScrimmageRequest + */ +export interface ScrimmageRequest { + /** + * + * @type {number} + * @memberof ScrimmageRequest + */ + readonly id: number; + /** + * + * @type {string} + * @memberof ScrimmageRequest + */ + readonly episode: string; + /** + * + * @type {Date} + * @memberof ScrimmageRequest + */ + readonly created: Date; + /** + * + * @type {ScrimmageStatusEnum} + * @memberof ScrimmageRequest + */ + readonly status: ScrimmageStatusEnum; + /** + * + * @type {boolean} + * @memberof ScrimmageRequest + */ + is_ranked: boolean; + /** + * + * @type {number} + * @memberof ScrimmageRequest + */ + readonly requested_by: number; + /** + * + * @type {string} + * @memberof ScrimmageRequest + */ + readonly requested_by_name: string; + /** + * + * @type {number} + * @memberof ScrimmageRequest + */ + readonly requested_by_rating: number; + /** + * + * @type {number} + * @memberof ScrimmageRequest + */ + requested_to: number; + /** + * + * @type {string} + * @memberof ScrimmageRequest + */ + readonly requested_to_name: string; + /** + * + * @type {number} + * @memberof ScrimmageRequest + */ + readonly requested_to_rating: number; + /** + * + * @type {PlayerOrderEnum} + * @memberof ScrimmageRequest + */ + player_order: PlayerOrderEnum; + /** + * + * @type {Array} + * @memberof ScrimmageRequest + */ + readonly maps: Array; +} + +/** + * Check if a given object implements the ScrimmageRequest interface. + */ +export function instanceOfScrimmageRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "episode" in value; + isInstance = isInstance && "created" in value; + isInstance = isInstance && "status" in value; + isInstance = isInstance && "is_ranked" in value; + isInstance = isInstance && "requested_by" in value; + isInstance = isInstance && "requested_by_name" in value; + isInstance = isInstance && "requested_by_rating" in value; + isInstance = isInstance && "requested_to" in value; + isInstance = isInstance && "requested_to_name" in value; + isInstance = isInstance && "requested_to_rating" in value; + isInstance = isInstance && "player_order" in value; + isInstance = isInstance && "maps" in value; + + return isInstance; +} + +export function ScrimmageRequestFromJSON(json: any): ScrimmageRequest { + return ScrimmageRequestFromJSONTyped(json, false); +} + +export function ScrimmageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScrimmageRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'episode': json['episode'], + 'created': (new Date(json['created'])), + 'status': ScrimmageStatusEnumFromJSON(json['status']), + 'is_ranked': json['is_ranked'], + 'requested_by': json['requested_by'], + 'requested_by_name': json['requested_by_name'], + 'requested_by_rating': json['requested_by_rating'], + 'requested_to': json['requested_to'], + 'requested_to_name': json['requested_to_name'], + 'requested_to_rating': json['requested_to_rating'], + 'player_order': PlayerOrderEnumFromJSON(json['player_order']), + 'maps': json['maps'], + }; +} + +export function ScrimmageRequestToJSON(value?: ScrimmageRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'is_ranked': value.is_ranked, + 'requested_to': value.requested_to, + 'player_order': PlayerOrderEnumToJSON(value.player_order), + }; +} + diff --git a/frontend2/src/utils/types/models/ScrimmageRequestRequest.ts b/frontend2/src/utils/types/models/ScrimmageRequestRequest.ts new file mode 100644 index 000000000..583ff1136 --- /dev/null +++ b/frontend2/src/utils/types/models/ScrimmageRequestRequest.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PlayerOrderEnum } from './PlayerOrderEnum'; +import { + PlayerOrderEnumFromJSON, + PlayerOrderEnumFromJSONTyped, + PlayerOrderEnumToJSON, +} from './PlayerOrderEnum'; + +/** + * + * @export + * @interface ScrimmageRequestRequest + */ +export interface ScrimmageRequestRequest { + /** + * + * @type {boolean} + * @memberof ScrimmageRequestRequest + */ + is_ranked: boolean; + /** + * + * @type {number} + * @memberof ScrimmageRequestRequest + */ + requested_to: number; + /** + * + * @type {PlayerOrderEnum} + * @memberof ScrimmageRequestRequest + */ + player_order: PlayerOrderEnum; + /** + * + * @type {Array} + * @memberof ScrimmageRequestRequest + */ + map_names: Array; +} + +/** + * Check if a given object implements the ScrimmageRequestRequest interface. + */ +export function instanceOfScrimmageRequestRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "is_ranked" in value; + isInstance = isInstance && "requested_to" in value; + isInstance = isInstance && "player_order" in value; + isInstance = isInstance && "map_names" in value; + + return isInstance; +} + +export function ScrimmageRequestRequestFromJSON(json: any): ScrimmageRequestRequest { + return ScrimmageRequestRequestFromJSONTyped(json, false); +} + +export function ScrimmageRequestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScrimmageRequestRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'is_ranked': json['is_ranked'], + 'requested_to': json['requested_to'], + 'player_order': PlayerOrderEnumFromJSON(json['player_order']), + 'map_names': json['map_names'], + }; +} + +export function ScrimmageRequestRequestToJSON(value?: ScrimmageRequestRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'is_ranked': value.is_ranked, + 'requested_to': value.requested_to, + 'player_order': PlayerOrderEnumToJSON(value.player_order), + 'map_names': value.map_names, + }; +} + diff --git a/frontend2/src/utils/types/models/ScrimmageStatusEnum.ts b/frontend2/src/utils/types/models/ScrimmageStatusEnum.ts new file mode 100644 index 000000000..04eb6fd7b --- /dev/null +++ b/frontend2/src/utils/types/models/ScrimmageStatusEnum.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum ScrimmageStatusEnum { + P = 'P', + Y = 'Y', + N = 'N' +} + + +export function ScrimmageStatusEnumFromJSON(json: any): ScrimmageStatusEnum { + return ScrimmageStatusEnumFromJSONTyped(json, false); +} + +export function ScrimmageStatusEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScrimmageStatusEnum { + return json as ScrimmageStatusEnum; +} + +export function ScrimmageStatusEnumToJSON(value?: ScrimmageStatusEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/Status526Enum.ts b/frontend2/src/utils/types/models/Status526Enum.ts new file mode 100644 index 000000000..243c4e075 --- /dev/null +++ b/frontend2/src/utils/types/models/Status526Enum.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum Status526Enum { + R = 'R', + X = 'X', + S = 'S', + O = 'O' +} + + +export function Status526EnumFromJSON(json: any): Status526Enum { + return Status526EnumFromJSONTyped(json, false); +} + +export function Status526EnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): Status526Enum { + return json as Status526Enum; +} + +export function Status526EnumToJSON(value?: Status526Enum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/StatusBccEnum.ts b/frontend2/src/utils/types/models/StatusBccEnum.ts new file mode 100644 index 000000000..3778772fe --- /dev/null +++ b/frontend2/src/utils/types/models/StatusBccEnum.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum StatusBccEnum { + New = 'NEW', + Que = 'QUE', + Run = 'RUN', + Try = 'TRY', + Ok = 'OK!', + Err = 'ERR', + Can = 'CAN' +} + + +export function StatusBccEnumFromJSON(json: any): StatusBccEnum { + return StatusBccEnumFromJSONTyped(json, false); +} + +export function StatusBccEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusBccEnum { + return json as StatusBccEnum; +} + +export function StatusBccEnumToJSON(value?: StatusBccEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/StyleEnum.ts b/frontend2/src/utils/types/models/StyleEnum.ts new file mode 100644 index 000000000..c9186f55c --- /dev/null +++ b/frontend2/src/utils/types/models/StyleEnum.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum StyleEnum { + Se = 'SE', + De = 'DE' +} + + +export function StyleEnumFromJSON(json: any): StyleEnum { + return StyleEnumFromJSONTyped(json, false); +} + +export function StyleEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): StyleEnum { + return json as StyleEnum; +} + +export function StyleEnumToJSON(value?: StyleEnum | null): any { + return value as any; +} + diff --git a/frontend2/src/utils/types/models/Submission.ts b/frontend2/src/utils/types/models/Submission.ts new file mode 100644 index 000000000..d61410819 --- /dev/null +++ b/frontend2/src/utils/types/models/Submission.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { StatusBccEnum } from './StatusBccEnum'; +import { + StatusBccEnumFromJSON, + StatusBccEnumFromJSONTyped, + StatusBccEnumToJSON, +} from './StatusBccEnum'; + +/** + * + * @export + * @interface Submission + */ +export interface Submission { + /** + * + * @type {number} + * @memberof Submission + */ + readonly id: number; + /** + * + * @type {StatusBccEnum} + * @memberof Submission + */ + readonly status: StatusBccEnum; + /** + * + * @type {string} + * @memberof Submission + */ + readonly logs: string; + /** + * + * @type {string} + * @memberof Submission + */ + readonly episode: string; + /** + * + * @type {number} + * @memberof Submission + */ + readonly team: number; + /** + * + * @type {string} + * @memberof Submission + */ + readonly teamname: string; + /** + * + * @type {number} + * @memberof Submission + */ + readonly user: number; + /** + * + * @type {string} + * @memberof Submission + */ + readonly username: string; + /** + * + * @type {Date} + * @memberof Submission + */ + readonly created: Date; + /** + * + * @type {boolean} + * @memberof Submission + */ + readonly accepted: boolean; + /** + * + * @type {string} + * @memberof Submission + */ + _package?: string; + /** + * + * @type {string} + * @memberof Submission + */ + description?: string; +} + +/** + * Check if a given object implements the Submission interface. + */ +export function instanceOfSubmission(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "status" in value; + isInstance = isInstance && "logs" in value; + isInstance = isInstance && "episode" in value; + isInstance = isInstance && "team" in value; + isInstance = isInstance && "teamname" in value; + isInstance = isInstance && "user" in value; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "created" in value; + isInstance = isInstance && "accepted" in value; + + return isInstance; +} + +export function SubmissionFromJSON(json: any): Submission { + return SubmissionFromJSONTyped(json, false); +} + +export function SubmissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Submission { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'status': StatusBccEnumFromJSON(json['status']), + 'logs': json['logs'], + 'episode': json['episode'], + 'team': json['team'], + 'teamname': json['teamname'], + 'user': json['user'], + 'username': json['username'], + 'created': (new Date(json['created'])), + 'accepted': json['accepted'], + '_package': !exists(json, 'package') ? undefined : json['package'], + 'description': !exists(json, 'description') ? undefined : json['description'], + }; +} + +export function SubmissionToJSON(value?: Submission | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'package': value._package, + 'description': value.description, + }; +} + diff --git a/frontend2/src/utils/types/models/SubmissionDownload.ts b/frontend2/src/utils/types/models/SubmissionDownload.ts new file mode 100644 index 000000000..3364931ed --- /dev/null +++ b/frontend2/src/utils/types/models/SubmissionDownload.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SubmissionDownload + */ +export interface SubmissionDownload { + /** + * + * @type {boolean} + * @memberof SubmissionDownload + */ + readonly ready: boolean; + /** + * + * @type {string} + * @memberof SubmissionDownload + */ + readonly url: string; + /** + * + * @type {string} + * @memberof SubmissionDownload + */ + readonly reason: string; +} + +/** + * Check if a given object implements the SubmissionDownload interface. + */ +export function instanceOfSubmissionDownload(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "ready" in value; + isInstance = isInstance && "url" in value; + isInstance = isInstance && "reason" in value; + + return isInstance; +} + +export function SubmissionDownloadFromJSON(json: any): SubmissionDownload { + return SubmissionDownloadFromJSONTyped(json, false); +} + +export function SubmissionDownloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubmissionDownload { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'ready': json['ready'], + 'url': json['url'], + 'reason': json['reason'], + }; +} + +export function SubmissionDownloadToJSON(value?: SubmissionDownload | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/SubmissionReportRequest.ts b/frontend2/src/utils/types/models/SubmissionReportRequest.ts new file mode 100644 index 000000000..1759f25fb --- /dev/null +++ b/frontend2/src/utils/types/models/SubmissionReportRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SaturnInvocationRequest } from './SaturnInvocationRequest'; +import { + SaturnInvocationRequestFromJSON, + SaturnInvocationRequestFromJSONTyped, + SaturnInvocationRequestToJSON, +} from './SaturnInvocationRequest'; + +/** + * + * @export + * @interface SubmissionReportRequest + */ +export interface SubmissionReportRequest { + /** + * + * @type {SaturnInvocationRequest} + * @memberof SubmissionReportRequest + */ + invocation: SaturnInvocationRequest; + /** + * + * @type {boolean} + * @memberof SubmissionReportRequest + */ + accepted?: boolean; +} + +/** + * Check if a given object implements the SubmissionReportRequest interface. + */ +export function instanceOfSubmissionReportRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "invocation" in value; + + return isInstance; +} + +export function SubmissionReportRequestFromJSON(json: any): SubmissionReportRequest { + return SubmissionReportRequestFromJSONTyped(json, false); +} + +export function SubmissionReportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubmissionReportRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'invocation': SaturnInvocationRequestFromJSON(json['invocation']), + 'accepted': !exists(json, 'accepted') ? undefined : json['accepted'], + }; +} + +export function SubmissionReportRequestToJSON(value?: SubmissionReportRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'invocation': SaturnInvocationRequestToJSON(value.invocation), + 'accepted': value.accepted, + }; +} + diff --git a/frontend2/src/utils/types/models/SubmissionRequest.ts b/frontend2/src/utils/types/models/SubmissionRequest.ts new file mode 100644 index 000000000..e73345527 --- /dev/null +++ b/frontend2/src/utils/types/models/SubmissionRequest.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SubmissionRequest + */ +export interface SubmissionRequest { + /** + * + * @type {string} + * @memberof SubmissionRequest + */ + _package?: string; + /** + * + * @type {string} + * @memberof SubmissionRequest + */ + description?: string; + /** + * + * @type {Blob} + * @memberof SubmissionRequest + */ + source_code: Blob; +} + +/** + * Check if a given object implements the SubmissionRequest interface. + */ +export function instanceOfSubmissionRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "source_code" in value; + + return isInstance; +} + +export function SubmissionRequestFromJSON(json: any): SubmissionRequest { + return SubmissionRequestFromJSONTyped(json, false); +} + +export function SubmissionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubmissionRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + '_package': !exists(json, 'package') ? undefined : json['package'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'source_code': json['source_code'], + }; +} + +export function SubmissionRequestToJSON(value?: SubmissionRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'package': value._package, + 'description': value.description, + 'source_code': value.source_code, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamAvatarRequest.ts b/frontend2/src/utils/types/models/TeamAvatarRequest.ts new file mode 100644 index 000000000..34b25ad73 --- /dev/null +++ b/frontend2/src/utils/types/models/TeamAvatarRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TeamAvatarRequest + */ +export interface TeamAvatarRequest { + /** + * + * @type {Blob} + * @memberof TeamAvatarRequest + */ + avatar: Blob; +} + +/** + * Check if a given object implements the TeamAvatarRequest interface. + */ +export function instanceOfTeamAvatarRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "avatar" in value; + + return isInstance; +} + +export function TeamAvatarRequestFromJSON(json: any): TeamAvatarRequest { + return TeamAvatarRequestFromJSONTyped(json, false); +} + +export function TeamAvatarRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamAvatarRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'avatar': json['avatar'], + }; +} + +export function TeamAvatarRequestToJSON(value?: TeamAvatarRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'avatar': value.avatar, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamCreate.ts b/frontend2/src/utils/types/models/TeamCreate.ts new file mode 100644 index 000000000..ff7853c7f --- /dev/null +++ b/frontend2/src/utils/types/models/TeamCreate.ts @@ -0,0 +1,133 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Status526Enum } from './Status526Enum'; +import { + Status526EnumFromJSON, + Status526EnumFromJSONTyped, + Status526EnumToJSON, +} from './Status526Enum'; +import type { TeamProfilePrivate } from './TeamProfilePrivate'; +import { + TeamProfilePrivateFromJSON, + TeamProfilePrivateFromJSONTyped, + TeamProfilePrivateToJSON, +} from './TeamProfilePrivate'; +import type { UserPublic } from './UserPublic'; +import { + UserPublicFromJSON, + UserPublicFromJSONTyped, + UserPublicToJSON, +} from './UserPublic'; + +/** + * + * @export + * @interface TeamCreate + */ +export interface TeamCreate { + /** + * + * @type {number} + * @memberof TeamCreate + */ + readonly id: number; + /** + * + * @type {TeamProfilePrivate} + * @memberof TeamCreate + */ + profile?: TeamProfilePrivate; + /** + * + * @type {string} + * @memberof TeamCreate + */ + episode?: string; + /** + * + * @type {string} + * @memberof TeamCreate + */ + name: string; + /** + * + * @type {Array} + * @memberof TeamCreate + */ + readonly members: Array; + /** + * + * @type {string} + * @memberof TeamCreate + */ + readonly join_key: string; + /** + * + * @type {Status526Enum} + * @memberof TeamCreate + */ + readonly status: Status526Enum; +} + +/** + * Check if a given object implements the TeamCreate interface. + */ +export function instanceOfTeamCreate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "members" in value; + isInstance = isInstance && "join_key" in value; + isInstance = isInstance && "status" in value; + + return isInstance; +} + +export function TeamCreateFromJSON(json: any): TeamCreate { + return TeamCreateFromJSONTyped(json, false); +} + +export function TeamCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamCreate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'profile': !exists(json, 'profile') ? undefined : TeamProfilePrivateFromJSON(json['profile']), + 'episode': !exists(json, 'episode') ? undefined : json['episode'], + 'name': json['name'], + 'members': ((json['members'] as Array).map(UserPublicFromJSON)), + 'join_key': json['join_key'], + 'status': Status526EnumFromJSON(json['status']), + }; +} + +export function TeamCreateToJSON(value?: TeamCreate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': TeamProfilePrivateToJSON(value.profile), + 'episode': value.episode, + 'name': value.name, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamCreateRequest.ts b/frontend2/src/utils/types/models/TeamCreateRequest.ts new file mode 100644 index 000000000..e34df8a47 --- /dev/null +++ b/frontend2/src/utils/types/models/TeamCreateRequest.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TeamProfilePrivateRequest } from './TeamProfilePrivateRequest'; +import { + TeamProfilePrivateRequestFromJSON, + TeamProfilePrivateRequestFromJSONTyped, + TeamProfilePrivateRequestToJSON, +} from './TeamProfilePrivateRequest'; + +/** + * + * @export + * @interface TeamCreateRequest + */ +export interface TeamCreateRequest { + /** + * + * @type {TeamProfilePrivateRequest} + * @memberof TeamCreateRequest + */ + profile?: TeamProfilePrivateRequest; + /** + * + * @type {string} + * @memberof TeamCreateRequest + */ + episode?: string; + /** + * + * @type {string} + * @memberof TeamCreateRequest + */ + name: string; +} + +/** + * Check if a given object implements the TeamCreateRequest interface. + */ +export function instanceOfTeamCreateRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function TeamCreateRequestFromJSON(json: any): TeamCreateRequest { + return TeamCreateRequestFromJSONTyped(json, false); +} + +export function TeamCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamCreateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'profile': !exists(json, 'profile') ? undefined : TeamProfilePrivateRequestFromJSON(json['profile']), + 'episode': !exists(json, 'episode') ? undefined : json['episode'], + 'name': json['name'], + }; +} + +export function TeamCreateRequestToJSON(value?: TeamCreateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': TeamProfilePrivateRequestToJSON(value.profile), + 'episode': value.episode, + 'name': value.name, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamJoinRequest.ts b/frontend2/src/utils/types/models/TeamJoinRequest.ts new file mode 100644 index 000000000..9afd02d27 --- /dev/null +++ b/frontend2/src/utils/types/models/TeamJoinRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TeamJoinRequest + */ +export interface TeamJoinRequest { + /** + * + * @type {string} + * @memberof TeamJoinRequest + */ + join_key: string; + /** + * + * @type {string} + * @memberof TeamJoinRequest + */ + name: string; +} + +/** + * Check if a given object implements the TeamJoinRequest interface. + */ +export function instanceOfTeamJoinRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "join_key" in value; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function TeamJoinRequestFromJSON(json: any): TeamJoinRequest { + return TeamJoinRequestFromJSONTyped(json, false); +} + +export function TeamJoinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamJoinRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'join_key': json['join_key'], + 'name': json['name'], + }; +} + +export function TeamJoinRequestToJSON(value?: TeamJoinRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'join_key': value.join_key, + 'name': value.name, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamPrivate.ts b/frontend2/src/utils/types/models/TeamPrivate.ts new file mode 100644 index 000000000..ed3e6fb54 --- /dev/null +++ b/frontend2/src/utils/types/models/TeamPrivate.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Status526Enum } from './Status526Enum'; +import { + Status526EnumFromJSON, + Status526EnumFromJSONTyped, + Status526EnumToJSON, +} from './Status526Enum'; +import type { TeamProfilePrivate } from './TeamProfilePrivate'; +import { + TeamProfilePrivateFromJSON, + TeamProfilePrivateFromJSONTyped, + TeamProfilePrivateToJSON, +} from './TeamProfilePrivate'; +import type { UserPublic } from './UserPublic'; +import { + UserPublicFromJSON, + UserPublicFromJSONTyped, + UserPublicToJSON, +} from './UserPublic'; + +/** + * + * @export + * @interface TeamPrivate + */ +export interface TeamPrivate { + /** + * + * @type {number} + * @memberof TeamPrivate + */ + readonly id: number; + /** + * + * @type {TeamProfilePrivate} + * @memberof TeamPrivate + */ + profile?: TeamProfilePrivate; + /** + * + * @type {string} + * @memberof TeamPrivate + */ + episode?: string; + /** + * + * @type {string} + * @memberof TeamPrivate + */ + readonly name: string; + /** + * + * @type {Array} + * @memberof TeamPrivate + */ + readonly members: Array; + /** + * + * @type {string} + * @memberof TeamPrivate + */ + readonly join_key: string; + /** + * + * @type {Status526Enum} + * @memberof TeamPrivate + */ + readonly status: Status526Enum; +} + +/** + * Check if a given object implements the TeamPrivate interface. + */ +export function instanceOfTeamPrivate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "members" in value; + isInstance = isInstance && "join_key" in value; + isInstance = isInstance && "status" in value; + + return isInstance; +} + +export function TeamPrivateFromJSON(json: any): TeamPrivate { + return TeamPrivateFromJSONTyped(json, false); +} + +export function TeamPrivateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamPrivate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'profile': !exists(json, 'profile') ? undefined : TeamProfilePrivateFromJSON(json['profile']), + 'episode': !exists(json, 'episode') ? undefined : json['episode'], + 'name': json['name'], + 'members': ((json['members'] as Array).map(UserPublicFromJSON)), + 'join_key': json['join_key'], + 'status': Status526EnumFromJSON(json['status']), + }; +} + +export function TeamPrivateToJSON(value?: TeamPrivate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': TeamProfilePrivateToJSON(value.profile), + 'episode': value.episode, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamPrivateRequest.ts b/frontend2/src/utils/types/models/TeamPrivateRequest.ts new file mode 100644 index 000000000..845e0748d --- /dev/null +++ b/frontend2/src/utils/types/models/TeamPrivateRequest.ts @@ -0,0 +1,80 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { TeamProfilePrivateRequest } from './TeamProfilePrivateRequest'; +import { + TeamProfilePrivateRequestFromJSON, + TeamProfilePrivateRequestFromJSONTyped, + TeamProfilePrivateRequestToJSON, +} from './TeamProfilePrivateRequest'; + +/** + * + * @export + * @interface TeamPrivateRequest + */ +export interface TeamPrivateRequest { + /** + * + * @type {TeamProfilePrivateRequest} + * @memberof TeamPrivateRequest + */ + profile?: TeamProfilePrivateRequest; + /** + * + * @type {string} + * @memberof TeamPrivateRequest + */ + episode?: string; +} + +/** + * Check if a given object implements the TeamPrivateRequest interface. + */ +export function instanceOfTeamPrivateRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function TeamPrivateRequestFromJSON(json: any): TeamPrivateRequest { + return TeamPrivateRequestFromJSONTyped(json, false); +} + +export function TeamPrivateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamPrivateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'profile': !exists(json, 'profile') ? undefined : TeamProfilePrivateRequestFromJSON(json['profile']), + 'episode': !exists(json, 'episode') ? undefined : json['episode'], + }; +} + +export function TeamPrivateRequestToJSON(value?: TeamPrivateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': TeamProfilePrivateRequestToJSON(value.profile), + 'episode': value.episode, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamProfilePrivate.ts b/frontend2/src/utils/types/models/TeamProfilePrivate.ts new file mode 100644 index 000000000..7e6430a9b --- /dev/null +++ b/frontend2/src/utils/types/models/TeamProfilePrivate.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TeamProfilePrivate + */ +export interface TeamProfilePrivate { + /** + * + * @type {string} + * @memberof TeamProfilePrivate + */ + quote?: string; + /** + * + * @type {string} + * @memberof TeamProfilePrivate + */ + biography?: string; + /** + * + * @type {boolean} + * @memberof TeamProfilePrivate + */ + readonly has_avatar: boolean; + /** + * + * @type {boolean} + * @memberof TeamProfilePrivate + */ + has_report?: boolean; + /** + * + * @type {string} + * @memberof TeamProfilePrivate + */ + readonly avatar_url: string; + /** + * + * @type {number} + * @memberof TeamProfilePrivate + */ + readonly rating: number; + /** + * + * @type {boolean} + * @memberof TeamProfilePrivate + */ + auto_accept_ranked?: boolean; + /** + * + * @type {boolean} + * @memberof TeamProfilePrivate + */ + auto_accept_unranked?: boolean; + /** + * + * @type {Array} + * @memberof TeamProfilePrivate + */ + eligible_for?: Array; +} + +/** + * Check if a given object implements the TeamProfilePrivate interface. + */ +export function instanceOfTeamProfilePrivate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "has_avatar" in value; + isInstance = isInstance && "avatar_url" in value; + isInstance = isInstance && "rating" in value; + + return isInstance; +} + +export function TeamProfilePrivateFromJSON(json: any): TeamProfilePrivate { + return TeamProfilePrivateFromJSONTyped(json, false); +} + +export function TeamProfilePrivateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamProfilePrivate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'quote': !exists(json, 'quote') ? undefined : json['quote'], + 'biography': !exists(json, 'biography') ? undefined : json['biography'], + 'has_avatar': json['has_avatar'], + 'has_report': !exists(json, 'has_report') ? undefined : json['has_report'], + 'avatar_url': json['avatar_url'], + 'rating': json['rating'], + 'auto_accept_ranked': !exists(json, 'auto_accept_ranked') ? undefined : json['auto_accept_ranked'], + 'auto_accept_unranked': !exists(json, 'auto_accept_unranked') ? undefined : json['auto_accept_unranked'], + 'eligible_for': !exists(json, 'eligible_for') ? undefined : json['eligible_for'], + }; +} + +export function TeamProfilePrivateToJSON(value?: TeamProfilePrivate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'quote': value.quote, + 'biography': value.biography, + 'has_report': value.has_report, + 'auto_accept_ranked': value.auto_accept_ranked, + 'auto_accept_unranked': value.auto_accept_unranked, + 'eligible_for': value.eligible_for, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamProfilePrivateRequest.ts b/frontend2/src/utils/types/models/TeamProfilePrivateRequest.ts new file mode 100644 index 000000000..da1a26b61 --- /dev/null +++ b/frontend2/src/utils/types/models/TeamProfilePrivateRequest.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TeamProfilePrivateRequest + */ +export interface TeamProfilePrivateRequest { + /** + * + * @type {string} + * @memberof TeamProfilePrivateRequest + */ + quote?: string; + /** + * + * @type {string} + * @memberof TeamProfilePrivateRequest + */ + biography?: string; + /** + * + * @type {boolean} + * @memberof TeamProfilePrivateRequest + */ + has_report?: boolean; + /** + * + * @type {boolean} + * @memberof TeamProfilePrivateRequest + */ + auto_accept_ranked?: boolean; + /** + * + * @type {boolean} + * @memberof TeamProfilePrivateRequest + */ + auto_accept_unranked?: boolean; + /** + * + * @type {Array} + * @memberof TeamProfilePrivateRequest + */ + eligible_for?: Array; +} + +/** + * Check if a given object implements the TeamProfilePrivateRequest interface. + */ +export function instanceOfTeamProfilePrivateRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function TeamProfilePrivateRequestFromJSON(json: any): TeamProfilePrivateRequest { + return TeamProfilePrivateRequestFromJSONTyped(json, false); +} + +export function TeamProfilePrivateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamProfilePrivateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'quote': !exists(json, 'quote') ? undefined : json['quote'], + 'biography': !exists(json, 'biography') ? undefined : json['biography'], + 'has_report': !exists(json, 'has_report') ? undefined : json['has_report'], + 'auto_accept_ranked': !exists(json, 'auto_accept_ranked') ? undefined : json['auto_accept_ranked'], + 'auto_accept_unranked': !exists(json, 'auto_accept_unranked') ? undefined : json['auto_accept_unranked'], + 'eligible_for': !exists(json, 'eligible_for') ? undefined : json['eligible_for'], + }; +} + +export function TeamProfilePrivateRequestToJSON(value?: TeamProfilePrivateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'quote': value.quote, + 'biography': value.biography, + 'has_report': value.has_report, + 'auto_accept_ranked': value.auto_accept_ranked, + 'auto_accept_unranked': value.auto_accept_unranked, + 'eligible_for': value.eligible_for, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamProfilePublic.ts b/frontend2/src/utils/types/models/TeamProfilePublic.ts new file mode 100644 index 000000000..495b32552 --- /dev/null +++ b/frontend2/src/utils/types/models/TeamProfilePublic.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TeamProfilePublic + */ +export interface TeamProfilePublic { + /** + * + * @type {string} + * @memberof TeamProfilePublic + */ + quote?: string; + /** + * + * @type {string} + * @memberof TeamProfilePublic + */ + biography?: string; + /** + * + * @type {boolean} + * @memberof TeamProfilePublic + */ + readonly has_avatar: boolean; + /** + * + * @type {string} + * @memberof TeamProfilePublic + */ + readonly avatar_url: string; + /** + * + * @type {number} + * @memberof TeamProfilePublic + */ + readonly rating: number; + /** + * + * @type {boolean} + * @memberof TeamProfilePublic + */ + auto_accept_ranked?: boolean; + /** + * + * @type {boolean} + * @memberof TeamProfilePublic + */ + auto_accept_unranked?: boolean; + /** + * + * @type {Array} + * @memberof TeamProfilePublic + */ + eligible_for?: Array; +} + +/** + * Check if a given object implements the TeamProfilePublic interface. + */ +export function instanceOfTeamProfilePublic(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "has_avatar" in value; + isInstance = isInstance && "avatar_url" in value; + isInstance = isInstance && "rating" in value; + + return isInstance; +} + +export function TeamProfilePublicFromJSON(json: any): TeamProfilePublic { + return TeamProfilePublicFromJSONTyped(json, false); +} + +export function TeamProfilePublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamProfilePublic { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'quote': !exists(json, 'quote') ? undefined : json['quote'], + 'biography': !exists(json, 'biography') ? undefined : json['biography'], + 'has_avatar': json['has_avatar'], + 'avatar_url': json['avatar_url'], + 'rating': json['rating'], + 'auto_accept_ranked': !exists(json, 'auto_accept_ranked') ? undefined : json['auto_accept_ranked'], + 'auto_accept_unranked': !exists(json, 'auto_accept_unranked') ? undefined : json['auto_accept_unranked'], + 'eligible_for': !exists(json, 'eligible_for') ? undefined : json['eligible_for'], + }; +} + +export function TeamProfilePublicToJSON(value?: TeamProfilePublic | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'quote': value.quote, + 'biography': value.biography, + 'auto_accept_ranked': value.auto_accept_ranked, + 'auto_accept_unranked': value.auto_accept_unranked, + 'eligible_for': value.eligible_for, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamPublic.ts b/frontend2/src/utils/types/models/TeamPublic.ts new file mode 100644 index 000000000..d4597813e --- /dev/null +++ b/frontend2/src/utils/types/models/TeamPublic.ts @@ -0,0 +1,133 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Status526Enum } from './Status526Enum'; +import { + Status526EnumFromJSON, + Status526EnumFromJSONTyped, + Status526EnumToJSON, +} from './Status526Enum'; +import type { TeamProfilePublic } from './TeamProfilePublic'; +import { + TeamProfilePublicFromJSON, + TeamProfilePublicFromJSONTyped, + TeamProfilePublicToJSON, +} from './TeamProfilePublic'; +import type { UserPublic } from './UserPublic'; +import { + UserPublicFromJSON, + UserPublicFromJSONTyped, + UserPublicToJSON, +} from './UserPublic'; + +/** + * + * @export + * @interface TeamPublic + */ +export interface TeamPublic { + /** + * + * @type {number} + * @memberof TeamPublic + */ + readonly id: number; + /** + * + * @type {TeamProfilePublic} + * @memberof TeamPublic + */ + profile?: TeamProfilePublic; + /** + * + * @type {string} + * @memberof TeamPublic + */ + readonly episode: string; + /** + * + * @type {string} + * @memberof TeamPublic + */ + name: string; + /** + * + * @type {Array} + * @memberof TeamPublic + */ + readonly members: Array; + /** + * + * @type {Status526Enum} + * @memberof TeamPublic + */ + readonly status: Status526Enum; + /** + * + * @type {string} + * @memberof TeamPublic + */ + readonly has_active_submission: string; +} + +/** + * Check if a given object implements the TeamPublic interface. + */ +export function instanceOfTeamPublic(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "episode" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "members" in value; + isInstance = isInstance && "status" in value; + isInstance = isInstance && "has_active_submission" in value; + + return isInstance; +} + +export function TeamPublicFromJSON(json: any): TeamPublic { + return TeamPublicFromJSONTyped(json, false); +} + +export function TeamPublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamPublic { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'profile': !exists(json, 'profile') ? undefined : TeamProfilePublicFromJSON(json['profile']), + 'episode': json['episode'], + 'name': json['name'], + 'members': ((json['members'] as Array).map(UserPublicFromJSON)), + 'status': Status526EnumFromJSON(json['status']), + 'has_active_submission': json['has_active_submission'], + }; +} + +export function TeamPublicToJSON(value?: TeamPublic | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': TeamProfilePublicToJSON(value.profile), + 'name': value.name, + }; +} + diff --git a/frontend2/src/utils/types/models/TeamReportRequest.ts b/frontend2/src/utils/types/models/TeamReportRequest.ts new file mode 100644 index 000000000..5bd60f38e --- /dev/null +++ b/frontend2/src/utils/types/models/TeamReportRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TeamReportRequest + */ +export interface TeamReportRequest { + /** + * + * @type {Blob} + * @memberof TeamReportRequest + */ + report: Blob; +} + +/** + * Check if a given object implements the TeamReportRequest interface. + */ +export function instanceOfTeamReportRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "report" in value; + + return isInstance; +} + +export function TeamReportRequestFromJSON(json: any): TeamReportRequest { + return TeamReportRequestFromJSONTyped(json, false); +} + +export function TeamReportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TeamReportRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'report': json['report'], + }; +} + +export function TeamReportRequestToJSON(value?: TeamReportRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'report': value.report, + }; +} + diff --git a/frontend2/src/utils/types/models/TokenObtainPair.ts b/frontend2/src/utils/types/models/TokenObtainPair.ts new file mode 100644 index 000000000..a86a966b0 --- /dev/null +++ b/frontend2/src/utils/types/models/TokenObtainPair.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TokenObtainPair + */ +export interface TokenObtainPair { + /** + * + * @type {string} + * @memberof TokenObtainPair + */ + readonly access: string; + /** + * + * @type {string} + * @memberof TokenObtainPair + */ + readonly refresh: string; +} + +/** + * Check if a given object implements the TokenObtainPair interface. + */ +export function instanceOfTokenObtainPair(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "access" in value; + isInstance = isInstance && "refresh" in value; + + return isInstance; +} + +export function TokenObtainPairFromJSON(json: any): TokenObtainPair { + return TokenObtainPairFromJSONTyped(json, false); +} + +export function TokenObtainPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenObtainPair { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'access': json['access'], + 'refresh': json['refresh'], + }; +} + +export function TokenObtainPairToJSON(value?: TokenObtainPair | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/TokenObtainPairRequest.ts b/frontend2/src/utils/types/models/TokenObtainPairRequest.ts new file mode 100644 index 000000000..a872aa54d --- /dev/null +++ b/frontend2/src/utils/types/models/TokenObtainPairRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TokenObtainPairRequest + */ +export interface TokenObtainPairRequest { + /** + * + * @type {string} + * @memberof TokenObtainPairRequest + */ + username: string; + /** + * + * @type {string} + * @memberof TokenObtainPairRequest + */ + password: string; +} + +/** + * Check if a given object implements the TokenObtainPairRequest interface. + */ +export function instanceOfTokenObtainPairRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "password" in value; + + return isInstance; +} + +export function TokenObtainPairRequestFromJSON(json: any): TokenObtainPairRequest { + return TokenObtainPairRequestFromJSONTyped(json, false); +} + +export function TokenObtainPairRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenObtainPairRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'username': json['username'], + 'password': json['password'], + }; +} + +export function TokenObtainPairRequestToJSON(value?: TokenObtainPairRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'username': value.username, + 'password': value.password, + }; +} + diff --git a/frontend2/src/utils/types/models/TokenRefresh.ts b/frontend2/src/utils/types/models/TokenRefresh.ts new file mode 100644 index 000000000..c5d688eb2 --- /dev/null +++ b/frontend2/src/utils/types/models/TokenRefresh.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TokenRefresh + */ +export interface TokenRefresh { + /** + * + * @type {string} + * @memberof TokenRefresh + */ + readonly access: string; +} + +/** + * Check if a given object implements the TokenRefresh interface. + */ +export function instanceOfTokenRefresh(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "access" in value; + + return isInstance; +} + +export function TokenRefreshFromJSON(json: any): TokenRefresh { + return TokenRefreshFromJSONTyped(json, false); +} + +export function TokenRefreshFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenRefresh { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'access': json['access'], + }; +} + +export function TokenRefreshToJSON(value?: TokenRefresh | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/TokenRefreshRequest.ts b/frontend2/src/utils/types/models/TokenRefreshRequest.ts new file mode 100644 index 000000000..e171b65ee --- /dev/null +++ b/frontend2/src/utils/types/models/TokenRefreshRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TokenRefreshRequest + */ +export interface TokenRefreshRequest { + /** + * + * @type {string} + * @memberof TokenRefreshRequest + */ + refresh: string; +} + +/** + * Check if a given object implements the TokenRefreshRequest interface. + */ +export function instanceOfTokenRefreshRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "refresh" in value; + + return isInstance; +} + +export function TokenRefreshRequestFromJSON(json: any): TokenRefreshRequest { + return TokenRefreshRequestFromJSONTyped(json, false); +} + +export function TokenRefreshRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenRefreshRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'refresh': json['refresh'], + }; +} + +export function TokenRefreshRequestToJSON(value?: TokenRefreshRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'refresh': value.refresh, + }; +} + diff --git a/frontend2/src/utils/types/models/TokenVerifyRequest.ts b/frontend2/src/utils/types/models/TokenVerifyRequest.ts new file mode 100644 index 000000000..b204aa9e0 --- /dev/null +++ b/frontend2/src/utils/types/models/TokenVerifyRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface TokenVerifyRequest + */ +export interface TokenVerifyRequest { + /** + * + * @type {string} + * @memberof TokenVerifyRequest + */ + token: string; +} + +/** + * Check if a given object implements the TokenVerifyRequest interface. + */ +export function instanceOfTokenVerifyRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "token" in value; + + return isInstance; +} + +export function TokenVerifyRequestFromJSON(json: any): TokenVerifyRequest { + return TokenVerifyRequestFromJSONTyped(json, false); +} + +export function TokenVerifyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenVerifyRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function TokenVerifyRequestToJSON(value?: TokenVerifyRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'token': value.token, + }; +} + diff --git a/frontend2/src/utils/types/models/Tournament.ts b/frontend2/src/utils/types/models/Tournament.ts new file mode 100644 index 000000000..ab6a97ba5 --- /dev/null +++ b/frontend2/src/utils/types/models/Tournament.ts @@ -0,0 +1,177 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { StyleEnum } from './StyleEnum'; +import { + StyleEnumFromJSON, + StyleEnumFromJSONTyped, + StyleEnumToJSON, +} from './StyleEnum'; + +/** + * + * @export + * @interface Tournament + */ +export interface Tournament { + /** + * + * @type {string} + * @memberof Tournament + */ + name_short: string; + /** + * + * @type {string} + * @memberof Tournament + */ + name_long: string; + /** + * + * @type {string} + * @memberof Tournament + */ + blurb?: string; + /** + * + * @type {string} + * @memberof Tournament + */ + episode: string; + /** + * + * @type {StyleEnum} + * @memberof Tournament + */ + style: StyleEnum; + /** + * + * @type {Date} + * @memberof Tournament + */ + display_date: Date; + /** + * + * @type {Array} + * @memberof Tournament + */ + eligibility_includes?: Array; + /** + * + * @type {Array} + * @memberof Tournament + */ + eligibility_excludes?: Array; + /** + * + * @type {boolean} + * @memberof Tournament + */ + require_resume: boolean; + /** + * + * @type {boolean} + * @memberof Tournament + */ + is_public: boolean; + /** + * + * @type {Date} + * @memberof Tournament + */ + submission_freeze: Date; + /** + * + * @type {Date} + * @memberof Tournament + */ + submission_unfreeze: Date; + /** + * + * @type {boolean} + * @memberof Tournament + */ + readonly is_eligible: boolean; +} + +/** + * Check if a given object implements the Tournament interface. + */ +export function instanceOfTournament(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name_short" in value; + isInstance = isInstance && "name_long" in value; + isInstance = isInstance && "episode" in value; + isInstance = isInstance && "style" in value; + isInstance = isInstance && "display_date" in value; + isInstance = isInstance && "require_resume" in value; + isInstance = isInstance && "is_public" in value; + isInstance = isInstance && "submission_freeze" in value; + isInstance = isInstance && "submission_unfreeze" in value; + isInstance = isInstance && "is_eligible" in value; + + return isInstance; +} + +export function TournamentFromJSON(json: any): Tournament { + return TournamentFromJSONTyped(json, false); +} + +export function TournamentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tournament { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name_short': json['name_short'], + 'name_long': json['name_long'], + 'blurb': !exists(json, 'blurb') ? undefined : json['blurb'], + 'episode': json['episode'], + 'style': StyleEnumFromJSON(json['style']), + 'display_date': (new Date(json['display_date'])), + 'eligibility_includes': !exists(json, 'eligibility_includes') ? undefined : json['eligibility_includes'], + 'eligibility_excludes': !exists(json, 'eligibility_excludes') ? undefined : json['eligibility_excludes'], + 'require_resume': json['require_resume'], + 'is_public': json['is_public'], + 'submission_freeze': (new Date(json['submission_freeze'])), + 'submission_unfreeze': (new Date(json['submission_unfreeze'])), + 'is_eligible': json['is_eligible'], + }; +} + +export function TournamentToJSON(value?: Tournament | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name_short': value.name_short, + 'name_long': value.name_long, + 'blurb': value.blurb, + 'episode': value.episode, + 'style': StyleEnumToJSON(value.style), + 'display_date': (value.display_date.toISOString().substr(0,10)), + 'eligibility_includes': value.eligibility_includes, + 'eligibility_excludes': value.eligibility_excludes, + 'require_resume': value.require_resume, + 'is_public': value.is_public, + 'submission_freeze': (value.submission_freeze.toISOString()), + 'submission_unfreeze': (value.submission_unfreeze.toISOString()), + }; +} + diff --git a/frontend2/src/utils/types/models/TournamentRound.ts b/frontend2/src/utils/types/models/TournamentRound.ts new file mode 100644 index 000000000..90ad8d19d --- /dev/null +++ b/frontend2/src/utils/types/models/TournamentRound.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ReleaseStatusEnum } from './ReleaseStatusEnum'; +import { + ReleaseStatusEnumFromJSON, + ReleaseStatusEnumFromJSONTyped, + ReleaseStatusEnumToJSON, +} from './ReleaseStatusEnum'; + +/** + * + * @export + * @interface TournamentRound + */ +export interface TournamentRound { + /** + * + * @type {number} + * @memberof TournamentRound + */ + readonly id: number; + /** + * + * @type {string} + * @memberof TournamentRound + */ + tournament: string; + /** + * + * @type {number} + * @memberof TournamentRound + */ + external_id?: number | null; + /** + * + * @type {string} + * @memberof TournamentRound + */ + name: string; + /** + * + * @type {Array} + * @memberof TournamentRound + */ + maps?: Array; + /** + * + * @type {ReleaseStatusEnum} + * @memberof TournamentRound + */ + release_status?: ReleaseStatusEnum; +} + +/** + * Check if a given object implements the TournamentRound interface. + */ +export function instanceOfTournamentRound(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "tournament" in value; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function TournamentRoundFromJSON(json: any): TournamentRound { + return TournamentRoundFromJSONTyped(json, false); +} + +export function TournamentRoundFromJSONTyped(json: any, ignoreDiscriminator: boolean): TournamentRound { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'tournament': json['tournament'], + 'external_id': !exists(json, 'external_id') ? undefined : json['external_id'], + 'name': json['name'], + 'maps': !exists(json, 'maps') ? undefined : json['maps'], + 'release_status': !exists(json, 'release_status') ? undefined : ReleaseStatusEnumFromJSON(json['release_status']), + }; +} + +export function TournamentRoundToJSON(value?: TournamentRound | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'tournament': value.tournament, + 'external_id': value.external_id, + 'name': value.name, + 'maps': value.maps, + 'release_status': ReleaseStatusEnumToJSON(value.release_status), + }; +} + diff --git a/frontend2/src/utils/types/models/TournamentSubmission.ts b/frontend2/src/utils/types/models/TournamentSubmission.ts new file mode 100644 index 000000000..0a8d04fc3 --- /dev/null +++ b/frontend2/src/utils/types/models/TournamentSubmission.ts @@ -0,0 +1,168 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { StatusBccEnum } from './StatusBccEnum'; +import { + StatusBccEnumFromJSON, + StatusBccEnumFromJSONTyped, + StatusBccEnumToJSON, +} from './StatusBccEnum'; + +/** + * + * @export + * @interface TournamentSubmission + */ +export interface TournamentSubmission { + /** + * + * @type {number} + * @memberof TournamentSubmission + */ + readonly id: number; + /** + * + * @type {StatusBccEnum} + * @memberof TournamentSubmission + */ + readonly status: StatusBccEnum; + /** + * + * @type {string} + * @memberof TournamentSubmission + */ + readonly logs: string; + /** + * + * @type {string} + * @memberof TournamentSubmission + */ + readonly episode: string; + /** + * + * @type {number} + * @memberof TournamentSubmission + */ + readonly team: number; + /** + * + * @type {string} + * @memberof TournamentSubmission + */ + readonly teamname: string; + /** + * + * @type {number} + * @memberof TournamentSubmission + */ + readonly user: number; + /** + * + * @type {string} + * @memberof TournamentSubmission + */ + readonly username: string; + /** + * + * @type {Date} + * @memberof TournamentSubmission + */ + readonly created: Date; + /** + * + * @type {boolean} + * @memberof TournamentSubmission + */ + readonly accepted: boolean; + /** + * + * @type {string} + * @memberof TournamentSubmission + */ + readonly _package: string; + /** + * + * @type {string} + * @memberof TournamentSubmission + */ + readonly description: string; + /** + * + * @type {string} + * @memberof TournamentSubmission + */ + readonly tournament: string; +} + +/** + * Check if a given object implements the TournamentSubmission interface. + */ +export function instanceOfTournamentSubmission(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "status" in value; + isInstance = isInstance && "logs" in value; + isInstance = isInstance && "episode" in value; + isInstance = isInstance && "team" in value; + isInstance = isInstance && "teamname" in value; + isInstance = isInstance && "user" in value; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "created" in value; + isInstance = isInstance && "accepted" in value; + isInstance = isInstance && "_package" in value; + isInstance = isInstance && "description" in value; + isInstance = isInstance && "tournament" in value; + + return isInstance; +} + +export function TournamentSubmissionFromJSON(json: any): TournamentSubmission { + return TournamentSubmissionFromJSONTyped(json, false); +} + +export function TournamentSubmissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TournamentSubmission { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'status': StatusBccEnumFromJSON(json['status']), + 'logs': json['logs'], + 'episode': json['episode'], + 'team': json['team'], + 'teamname': json['teamname'], + 'user': json['user'], + 'username': json['username'], + 'created': (new Date(json['created'])), + 'accepted': json['accepted'], + '_package': json['package'], + 'description': json['description'], + 'tournament': json['tournament'], + }; +} + +export function TournamentSubmissionToJSON(value?: TournamentSubmission | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/UserAvatarRequest.ts b/frontend2/src/utils/types/models/UserAvatarRequest.ts new file mode 100644 index 000000000..78f412142 --- /dev/null +++ b/frontend2/src/utils/types/models/UserAvatarRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserAvatarRequest + */ +export interface UserAvatarRequest { + /** + * + * @type {Blob} + * @memberof UserAvatarRequest + */ + avatar: Blob; +} + +/** + * Check if a given object implements the UserAvatarRequest interface. + */ +export function instanceOfUserAvatarRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "avatar" in value; + + return isInstance; +} + +export function UserAvatarRequestFromJSON(json: any): UserAvatarRequest { + return UserAvatarRequestFromJSONTyped(json, false); +} + +export function UserAvatarRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAvatarRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'avatar': json['avatar'], + }; +} + +export function UserAvatarRequestToJSON(value?: UserAvatarRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'avatar': value.avatar, + }; +} + diff --git a/frontend2/src/utils/types/models/UserCreate.ts b/frontend2/src/utils/types/models/UserCreate.ts new file mode 100644 index 000000000..4a39682de --- /dev/null +++ b/frontend2/src/utils/types/models/UserCreate.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserProfilePrivate } from './UserProfilePrivate'; +import { + UserProfilePrivateFromJSON, + UserProfilePrivateFromJSONTyped, + UserProfilePrivateToJSON, +} from './UserProfilePrivate'; + +/** + * + * @export + * @interface UserCreate + */ +export interface UserCreate { + /** + * + * @type {number} + * @memberof UserCreate + */ + readonly id: number; + /** + * + * @type {UserProfilePrivate} + * @memberof UserCreate + */ + profile?: UserProfilePrivate; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof UserCreate + */ + username: string; + /** + * + * @type {string} + * @memberof UserCreate + */ + email: string; + /** + * + * @type {string} + * @memberof UserCreate + */ + first_name: string; + /** + * + * @type {string} + * @memberof UserCreate + */ + last_name: string; + /** + * Designates whether the user can log into this admin site. + * @type {boolean} + * @memberof UserCreate + */ + readonly is_staff: boolean; +} + +/** + * Check if a given object implements the UserCreate interface. + */ +export function instanceOfUserCreate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "email" in value; + isInstance = isInstance && "first_name" in value; + isInstance = isInstance && "last_name" in value; + isInstance = isInstance && "is_staff" in value; + + return isInstance; +} + +export function UserCreateFromJSON(json: any): UserCreate { + return UserCreateFromJSONTyped(json, false); +} + +export function UserCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserCreate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'profile': !exists(json, 'profile') ? undefined : UserProfilePrivateFromJSON(json['profile']), + 'username': json['username'], + 'email': json['email'], + 'first_name': json['first_name'], + 'last_name': json['last_name'], + 'is_staff': json['is_staff'], + }; +} + +export function UserCreateToJSON(value?: UserCreate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': UserProfilePrivateToJSON(value.profile), + 'username': value.username, + 'email': value.email, + 'first_name': value.first_name, + 'last_name': value.last_name, + }; +} + diff --git a/frontend2/src/utils/types/models/UserCreateRequest.ts b/frontend2/src/utils/types/models/UserCreateRequest.ts new file mode 100644 index 000000000..b7b7a995d --- /dev/null +++ b/frontend2/src/utils/types/models/UserCreateRequest.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserProfilePrivateRequest } from './UserProfilePrivateRequest'; +import { + UserProfilePrivateRequestFromJSON, + UserProfilePrivateRequestFromJSONTyped, + UserProfilePrivateRequestToJSON, +} from './UserProfilePrivateRequest'; + +/** + * + * @export + * @interface UserCreateRequest + */ +export interface UserCreateRequest { + /** + * + * @type {UserProfilePrivateRequest} + * @memberof UserCreateRequest + */ + profile?: UserProfilePrivateRequest; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof UserCreateRequest + */ + username: string; + /** + * + * @type {string} + * @memberof UserCreateRequest + */ + password: string; + /** + * + * @type {string} + * @memberof UserCreateRequest + */ + email: string; + /** + * + * @type {string} + * @memberof UserCreateRequest + */ + first_name: string; + /** + * + * @type {string} + * @memberof UserCreateRequest + */ + last_name: string; +} + +/** + * Check if a given object implements the UserCreateRequest interface. + */ +export function instanceOfUserCreateRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "password" in value; + isInstance = isInstance && "email" in value; + isInstance = isInstance && "first_name" in value; + isInstance = isInstance && "last_name" in value; + + return isInstance; +} + +export function UserCreateRequestFromJSON(json: any): UserCreateRequest { + return UserCreateRequestFromJSONTyped(json, false); +} + +export function UserCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserCreateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'profile': !exists(json, 'profile') ? undefined : UserProfilePrivateRequestFromJSON(json['profile']), + 'username': json['username'], + 'password': json['password'], + 'email': json['email'], + 'first_name': json['first_name'], + 'last_name': json['last_name'], + }; +} + +export function UserCreateRequestToJSON(value?: UserCreateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': UserProfilePrivateRequestToJSON(value.profile), + 'username': value.username, + 'password': value.password, + 'email': value.email, + 'first_name': value.first_name, + 'last_name': value.last_name, + }; +} + diff --git a/frontend2/src/utils/types/models/UserPassed.ts b/frontend2/src/utils/types/models/UserPassed.ts new file mode 100644 index 000000000..8c4826e70 --- /dev/null +++ b/frontend2/src/utils/types/models/UserPassed.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserPassed + */ +export interface UserPassed { + /** + * + * @type {number} + * @memberof UserPassed + */ + id: number; + /** + * + * @type {string} + * @memberof UserPassed + */ + username: string; + /** + * + * @type {string} + * @memberof UserPassed + */ + email: string; + /** + * + * @type {boolean} + * @memberof UserPassed + */ + passed: boolean; +} + +/** + * Check if a given object implements the UserPassed interface. + */ +export function instanceOfUserPassed(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "email" in value; + isInstance = isInstance && "passed" in value; + + return isInstance; +} + +export function UserPassedFromJSON(json: any): UserPassed { + return UserPassedFromJSONTyped(json, false); +} + +export function UserPassedFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPassed { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'username': json['username'], + 'email': json['email'], + 'passed': json['passed'], + }; +} + +export function UserPassedToJSON(value?: UserPassed | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'username': value.username, + 'email': value.email, + 'passed': value.passed, + }; +} + diff --git a/frontend2/src/utils/types/models/UserPrivate.ts b/frontend2/src/utils/types/models/UserPrivate.ts new file mode 100644 index 000000000..c30308a95 --- /dev/null +++ b/frontend2/src/utils/types/models/UserPrivate.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserProfilePrivate } from './UserProfilePrivate'; +import { + UserProfilePrivateFromJSON, + UserProfilePrivateFromJSONTyped, + UserProfilePrivateToJSON, +} from './UserProfilePrivate'; + +/** + * + * @export + * @interface UserPrivate + */ +export interface UserPrivate { + /** + * + * @type {number} + * @memberof UserPrivate + */ + readonly id: number; + /** + * + * @type {UserProfilePrivate} + * @memberof UserPrivate + */ + profile?: UserProfilePrivate; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof UserPrivate + */ + readonly username: string; + /** + * + * @type {string} + * @memberof UserPrivate + */ + email: string; + /** + * + * @type {string} + * @memberof UserPrivate + */ + first_name: string; + /** + * + * @type {string} + * @memberof UserPrivate + */ + last_name: string; + /** + * Designates whether the user can log into this admin site. + * @type {boolean} + * @memberof UserPrivate + */ + readonly is_staff: boolean; +} + +/** + * Check if a given object implements the UserPrivate interface. + */ +export function instanceOfUserPrivate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "email" in value; + isInstance = isInstance && "first_name" in value; + isInstance = isInstance && "last_name" in value; + isInstance = isInstance && "is_staff" in value; + + return isInstance; +} + +export function UserPrivateFromJSON(json: any): UserPrivate { + return UserPrivateFromJSONTyped(json, false); +} + +export function UserPrivateFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPrivate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'profile': !exists(json, 'profile') ? undefined : UserProfilePrivateFromJSON(json['profile']), + 'username': json['username'], + 'email': json['email'], + 'first_name': json['first_name'], + 'last_name': json['last_name'], + 'is_staff': json['is_staff'], + }; +} + +export function UserPrivateToJSON(value?: UserPrivate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': UserProfilePrivateToJSON(value.profile), + 'email': value.email, + 'first_name': value.first_name, + 'last_name': value.last_name, + }; +} + diff --git a/frontend2/src/utils/types/models/UserPrivateRequest.ts b/frontend2/src/utils/types/models/UserPrivateRequest.ts new file mode 100644 index 000000000..b65dd4f9a --- /dev/null +++ b/frontend2/src/utils/types/models/UserPrivateRequest.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserProfilePrivateRequest } from './UserProfilePrivateRequest'; +import { + UserProfilePrivateRequestFromJSON, + UserProfilePrivateRequestFromJSONTyped, + UserProfilePrivateRequestToJSON, +} from './UserProfilePrivateRequest'; + +/** + * + * @export + * @interface UserPrivateRequest + */ +export interface UserPrivateRequest { + /** + * + * @type {UserProfilePrivateRequest} + * @memberof UserPrivateRequest + */ + profile?: UserProfilePrivateRequest; + /** + * + * @type {string} + * @memberof UserPrivateRequest + */ + email: string; + /** + * + * @type {string} + * @memberof UserPrivateRequest + */ + first_name: string; + /** + * + * @type {string} + * @memberof UserPrivateRequest + */ + last_name: string; +} + +/** + * Check if a given object implements the UserPrivateRequest interface. + */ +export function instanceOfUserPrivateRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "email" in value; + isInstance = isInstance && "first_name" in value; + isInstance = isInstance && "last_name" in value; + + return isInstance; +} + +export function UserPrivateRequestFromJSON(json: any): UserPrivateRequest { + return UserPrivateRequestFromJSONTyped(json, false); +} + +export function UserPrivateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPrivateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'profile': !exists(json, 'profile') ? undefined : UserProfilePrivateRequestFromJSON(json['profile']), + 'email': json['email'], + 'first_name': json['first_name'], + 'last_name': json['last_name'], + }; +} + +export function UserPrivateRequestToJSON(value?: UserPrivateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': UserProfilePrivateRequestToJSON(value.profile), + 'email': value.email, + 'first_name': value.first_name, + 'last_name': value.last_name, + }; +} + diff --git a/frontend2/src/utils/types/models/UserProfilePrivate.ts b/frontend2/src/utils/types/models/UserProfilePrivate.ts new file mode 100644 index 000000000..9871c4553 --- /dev/null +++ b/frontend2/src/utils/types/models/UserProfilePrivate.ts @@ -0,0 +1,144 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CountryEnum } from './CountryEnum'; +import { + CountryEnumFromJSON, + CountryEnumFromJSONTyped, + CountryEnumToJSON, +} from './CountryEnum'; +import type { GenderEnum } from './GenderEnum'; +import { + GenderEnumFromJSON, + GenderEnumFromJSONTyped, + GenderEnumToJSON, +} from './GenderEnum'; + +/** + * + * @export + * @interface UserProfilePrivate + */ +export interface UserProfilePrivate { + /** + * + * @type {GenderEnum} + * @memberof UserProfilePrivate + */ + gender: GenderEnum; + /** + * + * @type {string} + * @memberof UserProfilePrivate + */ + gender_details?: string; + /** + * + * @type {string} + * @memberof UserProfilePrivate + */ + school?: string; + /** + * + * @type {string} + * @memberof UserProfilePrivate + */ + biography?: string; + /** + * + * @type {string} + * @memberof UserProfilePrivate + */ + kerberos?: string; + /** + * + * @type {string} + * @memberof UserProfilePrivate + */ + readonly avatar_url: string; + /** + * + * @type {boolean} + * @memberof UserProfilePrivate + */ + readonly has_avatar: boolean; + /** + * + * @type {boolean} + * @memberof UserProfilePrivate + */ + readonly has_resume: boolean; + /** + * + * @type {CountryEnum} + * @memberof UserProfilePrivate + */ + country: CountryEnum; +} + +/** + * Check if a given object implements the UserProfilePrivate interface. + */ +export function instanceOfUserProfilePrivate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "gender" in value; + isInstance = isInstance && "avatar_url" in value; + isInstance = isInstance && "has_avatar" in value; + isInstance = isInstance && "has_resume" in value; + isInstance = isInstance && "country" in value; + + return isInstance; +} + +export function UserProfilePrivateFromJSON(json: any): UserProfilePrivate { + return UserProfilePrivateFromJSONTyped(json, false); +} + +export function UserProfilePrivateFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserProfilePrivate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'gender': GenderEnumFromJSON(json['gender']), + 'gender_details': !exists(json, 'gender_details') ? undefined : json['gender_details'], + 'school': !exists(json, 'school') ? undefined : json['school'], + 'biography': !exists(json, 'biography') ? undefined : json['biography'], + 'kerberos': !exists(json, 'kerberos') ? undefined : json['kerberos'], + 'avatar_url': json['avatar_url'], + 'has_avatar': json['has_avatar'], + 'has_resume': json['has_resume'], + 'country': CountryEnumFromJSON(json['country']), + }; +} + +export function UserProfilePrivateToJSON(value?: UserProfilePrivate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'gender': GenderEnumToJSON(value.gender), + 'gender_details': value.gender_details, + 'school': value.school, + 'biography': value.biography, + 'kerberos': value.kerberos, + 'country': CountryEnumToJSON(value.country), + }; +} + diff --git a/frontend2/src/utils/types/models/UserProfilePrivateRequest.ts b/frontend2/src/utils/types/models/UserProfilePrivateRequest.ts new file mode 100644 index 000000000..3cffe1073 --- /dev/null +++ b/frontend2/src/utils/types/models/UserProfilePrivateRequest.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { CountryEnum } from './CountryEnum'; +import { + CountryEnumFromJSON, + CountryEnumFromJSONTyped, + CountryEnumToJSON, +} from './CountryEnum'; +import type { GenderEnum } from './GenderEnum'; +import { + GenderEnumFromJSON, + GenderEnumFromJSONTyped, + GenderEnumToJSON, +} from './GenderEnum'; + +/** + * + * @export + * @interface UserProfilePrivateRequest + */ +export interface UserProfilePrivateRequest { + /** + * + * @type {GenderEnum} + * @memberof UserProfilePrivateRequest + */ + gender: GenderEnum; + /** + * + * @type {string} + * @memberof UserProfilePrivateRequest + */ + gender_details?: string; + /** + * + * @type {string} + * @memberof UserProfilePrivateRequest + */ + school?: string; + /** + * + * @type {string} + * @memberof UserProfilePrivateRequest + */ + biography?: string; + /** + * + * @type {string} + * @memberof UserProfilePrivateRequest + */ + kerberos?: string; + /** + * + * @type {CountryEnum} + * @memberof UserProfilePrivateRequest + */ + country: CountryEnum; +} + +/** + * Check if a given object implements the UserProfilePrivateRequest interface. + */ +export function instanceOfUserProfilePrivateRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "gender" in value; + isInstance = isInstance && "country" in value; + + return isInstance; +} + +export function UserProfilePrivateRequestFromJSON(json: any): UserProfilePrivateRequest { + return UserProfilePrivateRequestFromJSONTyped(json, false); +} + +export function UserProfilePrivateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserProfilePrivateRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'gender': GenderEnumFromJSON(json['gender']), + 'gender_details': !exists(json, 'gender_details') ? undefined : json['gender_details'], + 'school': !exists(json, 'school') ? undefined : json['school'], + 'biography': !exists(json, 'biography') ? undefined : json['biography'], + 'kerberos': !exists(json, 'kerberos') ? undefined : json['kerberos'], + 'country': CountryEnumFromJSON(json['country']), + }; +} + +export function UserProfilePrivateRequestToJSON(value?: UserProfilePrivateRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'gender': GenderEnumToJSON(value.gender), + 'gender_details': value.gender_details, + 'school': value.school, + 'biography': value.biography, + 'kerberos': value.kerberos, + 'country': CountryEnumToJSON(value.country), + }; +} + diff --git a/frontend2/src/utils/types/models/UserProfilePublic.ts b/frontend2/src/utils/types/models/UserProfilePublic.ts new file mode 100644 index 000000000..1a92c544f --- /dev/null +++ b/frontend2/src/utils/types/models/UserProfilePublic.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserProfilePublic + */ +export interface UserProfilePublic { + /** + * + * @type {string} + * @memberof UserProfilePublic + */ + school?: string; + /** + * + * @type {string} + * @memberof UserProfilePublic + */ + biography?: string; + /** + * + * @type {string} + * @memberof UserProfilePublic + */ + readonly avatar_url: string; + /** + * + * @type {boolean} + * @memberof UserProfilePublic + */ + readonly has_avatar: boolean; +} + +/** + * Check if a given object implements the UserProfilePublic interface. + */ +export function instanceOfUserProfilePublic(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "avatar_url" in value; + isInstance = isInstance && "has_avatar" in value; + + return isInstance; +} + +export function UserProfilePublicFromJSON(json: any): UserProfilePublic { + return UserProfilePublicFromJSONTyped(json, false); +} + +export function UserProfilePublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserProfilePublic { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'school': !exists(json, 'school') ? undefined : json['school'], + 'biography': !exists(json, 'biography') ? undefined : json['biography'], + 'avatar_url': json['avatar_url'], + 'has_avatar': json['has_avatar'], + }; +} + +export function UserProfilePublicToJSON(value?: UserProfilePublic | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'school': value.school, + 'biography': value.biography, + }; +} + diff --git a/frontend2/src/utils/types/models/UserProfilePublicRequest.ts b/frontend2/src/utils/types/models/UserProfilePublicRequest.ts new file mode 100644 index 000000000..782702085 --- /dev/null +++ b/frontend2/src/utils/types/models/UserProfilePublicRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserProfilePublicRequest + */ +export interface UserProfilePublicRequest { + /** + * + * @type {string} + * @memberof UserProfilePublicRequest + */ + school?: string; + /** + * + * @type {string} + * @memberof UserProfilePublicRequest + */ + biography?: string; +} + +/** + * Check if a given object implements the UserProfilePublicRequest interface. + */ +export function instanceOfUserProfilePublicRequest(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function UserProfilePublicRequestFromJSON(json: any): UserProfilePublicRequest { + return UserProfilePublicRequestFromJSONTyped(json, false); +} + +export function UserProfilePublicRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserProfilePublicRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'school': !exists(json, 'school') ? undefined : json['school'], + 'biography': !exists(json, 'biography') ? undefined : json['biography'], + }; +} + +export function UserProfilePublicRequestToJSON(value?: UserProfilePublicRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'school': value.school, + 'biography': value.biography, + }; +} + diff --git a/frontend2/src/utils/types/models/UserPublic.ts b/frontend2/src/utils/types/models/UserPublic.ts new file mode 100644 index 000000000..ec0c0c5cb --- /dev/null +++ b/frontend2/src/utils/types/models/UserPublic.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserProfilePublic } from './UserProfilePublic'; +import { + UserProfilePublicFromJSON, + UserProfilePublicFromJSONTyped, + UserProfilePublicToJSON, +} from './UserProfilePublic'; + +/** + * + * @export + * @interface UserPublic + */ +export interface UserPublic { + /** + * + * @type {number} + * @memberof UserPublic + */ + readonly id: number; + /** + * + * @type {UserProfilePublic} + * @memberof UserPublic + */ + profile?: UserProfilePublic; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof UserPublic + */ + username: string; + /** + * Designates whether the user can log into this admin site. + * @type {boolean} + * @memberof UserPublic + */ + readonly is_staff: boolean; +} + +/** + * Check if a given object implements the UserPublic interface. + */ +export function instanceOfUserPublic(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "username" in value; + isInstance = isInstance && "is_staff" in value; + + return isInstance; +} + +export function UserPublicFromJSON(json: any): UserPublic { + return UserPublicFromJSONTyped(json, false); +} + +export function UserPublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPublic { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'profile': !exists(json, 'profile') ? undefined : UserProfilePublicFromJSON(json['profile']), + 'username': json['username'], + 'is_staff': json['is_staff'], + }; +} + +export function UserPublicToJSON(value?: UserPublic | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': UserProfilePublicToJSON(value.profile), + 'username': value.username, + }; +} + diff --git a/frontend2/src/utils/types/models/UserPublicRequest.ts b/frontend2/src/utils/types/models/UserPublicRequest.ts new file mode 100644 index 000000000..4300a4afb --- /dev/null +++ b/frontend2/src/utils/types/models/UserPublicRequest.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { UserProfilePublicRequest } from './UserProfilePublicRequest'; +import { + UserProfilePublicRequestFromJSON, + UserProfilePublicRequestFromJSONTyped, + UserProfilePublicRequestToJSON, +} from './UserProfilePublicRequest'; + +/** + * + * @export + * @interface UserPublicRequest + */ +export interface UserPublicRequest { + /** + * + * @type {UserProfilePublicRequest} + * @memberof UserPublicRequest + */ + profile?: UserProfilePublicRequest; + /** + * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + * @type {string} + * @memberof UserPublicRequest + */ + username: string; +} + +/** + * Check if a given object implements the UserPublicRequest interface. + */ +export function instanceOfUserPublicRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "username" in value; + + return isInstance; +} + +export function UserPublicRequestFromJSON(json: any): UserPublicRequest { + return UserPublicRequestFromJSONTyped(json, false); +} + +export function UserPublicRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPublicRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'profile': !exists(json, 'profile') ? undefined : UserProfilePublicRequestFromJSON(json['profile']), + 'username': json['username'], + }; +} + +export function UserPublicRequestToJSON(value?: UserPublicRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'profile': UserProfilePublicRequestToJSON(value.profile), + 'username': value.username, + }; +} + diff --git a/frontend2/src/utils/types/models/UserResume.ts b/frontend2/src/utils/types/models/UserResume.ts new file mode 100644 index 000000000..e119e173a --- /dev/null +++ b/frontend2/src/utils/types/models/UserResume.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserResume + */ +export interface UserResume { + /** + * + * @type {boolean} + * @memberof UserResume + */ + readonly ready: boolean; + /** + * + * @type {string} + * @memberof UserResume + */ + readonly url: string; + /** + * + * @type {string} + * @memberof UserResume + */ + readonly reason: string; +} + +/** + * Check if a given object implements the UserResume interface. + */ +export function instanceOfUserResume(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "ready" in value; + isInstance = isInstance && "url" in value; + isInstance = isInstance && "reason" in value; + + return isInstance; +} + +export function UserResumeFromJSON(json: any): UserResume { + return UserResumeFromJSONTyped(json, false); +} + +export function UserResumeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserResume { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'ready': json['ready'], + 'url': json['url'], + 'reason': json['reason'], + }; +} + +export function UserResumeToJSON(value?: UserResume | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + }; +} + diff --git a/frontend2/src/utils/types/models/UserResumeRequest.ts b/frontend2/src/utils/types/models/UserResumeRequest.ts new file mode 100644 index 000000000..a27268b56 --- /dev/null +++ b/frontend2/src/utils/types/models/UserResumeRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface UserResumeRequest + */ +export interface UserResumeRequest { + /** + * + * @type {Blob} + * @memberof UserResumeRequest + */ + resume: Blob; +} + +/** + * Check if a given object implements the UserResumeRequest interface. + */ +export function instanceOfUserResumeRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "resume" in value; + + return isInstance; +} + +export function UserResumeRequestFromJSON(json: any): UserResumeRequest { + return UserResumeRequestFromJSONTyped(json, false); +} + +export function UserResumeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserResumeRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'resume': json['resume'], + }; +} + +export function UserResumeRequestToJSON(value?: UserResumeRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'resume': value.resume, + }; +} + diff --git a/frontend2/src/utils/types/model/models.ts b/frontend2/src/utils/types/models/index.ts similarity index 57% rename from frontend2/src/utils/types/model/models.ts rename to frontend2/src/utils/types/models/index.ts index 3c401c30e..18746a8be 100644 --- a/frontend2/src/utils/types/model/models.ts +++ b/frontend2/src/utils/types/models/index.ts @@ -1,15 +1,18 @@ -export * from './Autoscrim'; +/* tslint:disable */ +/* eslint-disable */ +export * from './AutoscrimRequest'; export * from './ClassRequirement'; export * from './CountryEnum'; export * from './EligibilityCriterion'; export * from './Email'; +export * from './EmailRequest'; export * from './Episode'; export * from './GenderEnum'; export * from './HistoricalRating'; export * from './LanguageEnum'; export * from './Match'; export * from './MatchParticipant'; -export * from './MatchReport'; +export * from './MatchReportRequest'; export * from './ModelMap'; export * from './PaginatedClassRequirementList'; export * from './PaginatedEpisodeList'; @@ -19,40 +22,56 @@ export * from './PaginatedSubmissionList'; export * from './PaginatedTeamPublicList'; export * from './PaginatedTournamentList'; export * from './PaginatedTournamentRoundList'; +export * from './PaginatedTournamentSubmissionList'; export * from './PasswordToken'; -export * from './PatchedTeamPrivate'; -export * from './PatchedUserPrivate'; +export * from './PasswordTokenRequest'; +export * from './PatchedTeamPrivateRequest'; +export * from './PatchedUserPrivateRequest'; export * from './PlayerOrderEnum'; export * from './ReleaseStatusEnum'; export * from './ResetToken'; -export * from './SaturnInvocation'; +export * from './ResetTokenRequest'; +export * from './SaturnInvocationRequest'; export * from './ScrimmageRequest'; -export * from './ScrimmageRequestStatusEnum'; +export * from './ScrimmageRequestRequest'; +export * from './ScrimmageStatusEnum'; export * from './Status526Enum'; export * from './StatusBccEnum'; export * from './StyleEnum'; export * from './Submission'; export * from './SubmissionDownload'; -export * from './SubmissionReport'; -export * from './TeamAvatar'; +export * from './SubmissionReportRequest'; +export * from './SubmissionRequest'; +export * from './TeamAvatarRequest'; export * from './TeamCreate'; -export * from './TeamJoin'; +export * from './TeamCreateRequest'; +export * from './TeamJoinRequest'; export * from './TeamPrivate'; +export * from './TeamPrivateRequest'; export * from './TeamProfilePrivate'; +export * from './TeamProfilePrivateRequest'; export * from './TeamProfilePublic'; export * from './TeamPublic'; -export * from './TeamReport'; +export * from './TeamReportRequest'; export * from './TokenObtainPair'; +export * from './TokenObtainPairRequest'; export * from './TokenRefresh'; -export * from './TokenVerify'; +export * from './TokenRefreshRequest'; +export * from './TokenVerifyRequest'; export * from './Tournament'; export * from './TournamentRound'; export * from './TournamentSubmission'; -export * from './UserAvatar'; +export * from './UserAvatarRequest'; export * from './UserCreate'; +export * from './UserCreateRequest'; export * from './UserPassed'; export * from './UserPrivate'; +export * from './UserPrivateRequest'; export * from './UserProfilePrivate'; +export * from './UserProfilePrivateRequest'; export * from './UserProfilePublic'; +export * from './UserProfilePublicRequest'; export * from './UserPublic'; +export * from './UserPublicRequest'; export * from './UserResume'; +export * from './UserResumeRequest'; diff --git a/frontend2/src/utils/types/runtime.ts b/frontend2/src/utils/types/runtime.ts new file mode 100644 index 000000000..100723068 --- /dev/null +++ b/frontend2/src/utils/types/runtime.ts @@ -0,0 +1,425 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | ((name: string) => string); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + const init: RequestInit = { + ...overriddenInit, + body: + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/frontend2/src/utils/types/variables.ts b/frontend2/src/utils/types/variables.ts deleted file mode 100644 index d52a33f70..000000000 --- a/frontend2/src/utils/types/variables.ts +++ /dev/null @@ -1,7 +0,0 @@ - -export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} diff --git a/schema.yml b/schema.yml index 721942fec..b56572263 100644 --- a/schema.yml +++ b/schema.yml @@ -5,7 +5,7 @@ info: paths: /api/compete/{episode_id}/match/: get: - operationId: api_compete_match_list + operationId: compete_match_list description: A viewset for viewing and retrieving Matches. parameters: - in: path @@ -21,7 +21,7 @@ paths: schema: type: integer tags: - - api + - compete security: - jwtAuth: [] responses: @@ -33,7 +33,7 @@ paths: description: '' /api/compete/{episode_id}/match/{id}/: get: - operationId: api_compete_match_retrieve + operationId: compete_match_retrieve description: A viewset for viewing and retrieving Matches. parameters: - in: path @@ -48,7 +48,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -60,7 +60,7 @@ paths: description: '' /api/compete/{episode_id}/match/{id}/publish_public_bracket/: post: - operationId: api_compete_match_publish_public_bracket_create + operationId: compete_match_publish_public_bracket_create description: Publish the result of a tournament match to the public bracket. parameters: - in: path @@ -75,7 +75,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -83,7 +83,7 @@ paths: description: No response body /api/compete/{episode_id}/match/{id}/rating_update/: post: - operationId: api_compete_match_rating_update_create + operationId: compete_match_rating_update_create description: Try to finalize the rating of this match. parameters: - in: path @@ -98,7 +98,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -106,7 +106,7 @@ paths: description: No response body /api/compete/{episode_id}/match/{id}/report/: post: - operationId: api_compete_match_report_create + operationId: compete_match_report_create description: Report the outcome of this match on Saturn. parameters: - in: path @@ -121,18 +121,18 @@ paths: type: string required: true tags: - - api + - compete requestBody: content: application/json: schema: - $ref: '#/components/schemas/MatchReport' + $ref: '#/components/schemas/MatchReportRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/MatchReport' + $ref: '#/components/schemas/MatchReportRequest' multipart/form-data: schema: - $ref: '#/components/schemas/MatchReport' + $ref: '#/components/schemas/MatchReportRequest' required: true security: - jwtAuth: [] @@ -143,7 +143,7 @@ paths: description: This match was already finalized /api/compete/{episode_id}/match/historical_rating/: get: - operationId: api_compete_match_historical_rating_retrieve + operationId: compete_match_historical_rating_retrieve description: List the historical rating of a team. parameters: - in: path @@ -158,7 +158,7 @@ paths: type: integer description: A team to filter for. Defaults to your own team. tags: - - api + - compete security: - jwtAuth: [] responses: @@ -172,7 +172,7 @@ paths: description: '' /api/compete/{episode_id}/match/scrimmage/: get: - operationId: api_compete_match_scrimmage_list + operationId: compete_match_scrimmage_list description: List all scrimmages that a particular team participated in. parameters: - in: path @@ -193,7 +193,7 @@ paths: type: integer description: A team to filter for. Defaults to your own team. tags: - - api + - compete security: - jwtAuth: [] responses: @@ -205,7 +205,7 @@ paths: description: '' /api/compete/{episode_id}/match/tournament/: get: - operationId: api_compete_match_tournament_list + operationId: compete_match_tournament_list description: List matches played in a tournament. parameters: - in: path @@ -236,7 +236,7 @@ paths: type: string description: A tournament to filter for. tags: - - api + - compete security: - jwtAuth: [] responses: @@ -248,7 +248,7 @@ paths: description: '' /api/compete/{episode_id}/request/: post: - operationId: api_compete_request_create + operationId: compete_request_create description: A viewset for creating and responding to Scrimmage Requests. parameters: - in: path @@ -258,18 +258,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - compete requestBody: content: application/json: schema: - $ref: '#/components/schemas/ScrimmageRequest' + $ref: '#/components/schemas/ScrimmageRequestRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ScrimmageRequest' + $ref: '#/components/schemas/ScrimmageRequestRequest' multipart/form-data: schema: - $ref: '#/components/schemas/ScrimmageRequest' + $ref: '#/components/schemas/ScrimmageRequestRequest' required: true security: - jwtAuth: [] @@ -282,7 +282,7 @@ paths: description: '' /api/compete/{episode_id}/request/{id}/: delete: - operationId: api_compete_request_destroy + operationId: compete_request_destroy description: Cancel a scrimmage request. parameters: - in: path @@ -297,7 +297,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -305,7 +305,7 @@ paths: description: No response body /api/compete/{episode_id}/request/{id}/accept/: post: - operationId: api_compete_request_accept_create + operationId: compete_request_accept_create description: Accept a scrimmage request. parameters: - in: path @@ -320,7 +320,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -328,7 +328,7 @@ paths: description: Scrimmage request has been accepted /api/compete/{episode_id}/request/{id}/reject/: post: - operationId: api_compete_request_reject_create + operationId: compete_request_reject_create description: Reject a scrimmage request. parameters: - in: path @@ -343,7 +343,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -351,7 +351,7 @@ paths: description: Scrimmage request has been rejected /api/compete/{episode_id}/request/inbox/: get: - operationId: api_compete_request_inbox_list + operationId: compete_request_inbox_list description: Get all pending scrimmage requests received. parameters: - in: path @@ -367,7 +367,7 @@ paths: schema: type: integer tags: - - api + - compete security: - jwtAuth: [] responses: @@ -379,7 +379,7 @@ paths: description: '' /api/compete/{episode_id}/request/outbox/: get: - operationId: api_compete_request_outbox_list + operationId: compete_request_outbox_list description: Get all pending scrimmage requests sent. parameters: - in: path @@ -395,7 +395,7 @@ paths: schema: type: integer tags: - - api + - compete security: - jwtAuth: [] responses: @@ -407,7 +407,7 @@ paths: description: '' /api/compete/{episode_id}/submission/: get: - operationId: api_compete_submission_list + operationId: compete_submission_list description: A viewset for creating and retrieving Submissions. parameters: - in: path @@ -423,7 +423,7 @@ paths: schema: type: integer tags: - - api + - compete security: - jwtAuth: [] responses: @@ -434,7 +434,7 @@ paths: $ref: '#/components/schemas/PaginatedSubmissionList' description: '' post: - operationId: api_compete_submission_create + operationId: compete_submission_create description: |- Create a new submission. This operation creates a submission record in the database, saves the source code to the storage bucket on Google cloud, and @@ -447,18 +447,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - compete requestBody: content: application/json: schema: - $ref: '#/components/schemas/Submission' + $ref: '#/components/schemas/SubmissionRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/Submission' + $ref: '#/components/schemas/SubmissionRequest' multipart/form-data: schema: - $ref: '#/components/schemas/Submission' + $ref: '#/components/schemas/SubmissionRequest' required: true security: - jwtAuth: [] @@ -471,7 +471,7 @@ paths: description: '' /api/compete/{episode_id}/submission/{id}/: get: - operationId: api_compete_submission_retrieve + operationId: compete_submission_retrieve description: A viewset for creating and retrieving Submissions. parameters: - in: path @@ -486,7 +486,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -498,7 +498,7 @@ paths: description: '' /api/compete/{episode_id}/submission/{id}/download/: get: - operationId: api_compete_submission_download_retrieve + operationId: compete_submission_download_retrieve description: Download the source code associated with a submission. parameters: - in: path @@ -513,7 +513,7 @@ paths: type: string required: true tags: - - api + - compete security: - jwtAuth: [] responses: @@ -525,7 +525,7 @@ paths: description: '' /api/compete/{episode_id}/submission/{id}/report/: post: - operationId: api_compete_submission_report_create + operationId: compete_submission_report_create description: Report the outcome of this submission on Saturn. parameters: - in: path @@ -540,18 +540,18 @@ paths: type: string required: true tags: - - api + - compete requestBody: content: application/json: schema: - $ref: '#/components/schemas/SubmissionReport' + $ref: '#/components/schemas/SubmissionReportRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/SubmissionReport' + $ref: '#/components/schemas/SubmissionReportRequest' multipart/form-data: schema: - $ref: '#/components/schemas/SubmissionReport' + $ref: '#/components/schemas/SubmissionReportRequest' required: true security: - jwtAuth: [] @@ -562,7 +562,7 @@ paths: description: This submission was already finalized /api/compete/{episode_id}/submission/tournament/: get: - operationId: api_compete_submission_tournament_retrieve + operationId: compete_submission_tournament_list description: Retrieve the submissions used in tournaments by the current team.. parameters: - in: path @@ -571,8 +571,14 @@ paths: type: string pattern: ^[^\/.]+$ required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer tags: - - api + - compete security: - jwtAuth: [] responses: @@ -580,11 +586,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TournamentSubmission' + $ref: '#/components/schemas/PaginatedTournamentSubmissionList' description: '' /api/episode/{episode_id}/map/: get: - operationId: api_episode_map_list + operationId: episode_map_list description: A viewset for retrieving Maps. parameters: - in: path @@ -594,7 +600,7 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - episode security: - jwtAuth: [] responses: @@ -608,7 +614,7 @@ paths: description: '' /api/episode/{episode_id}/map/{id}/: get: - operationId: api_episode_map_retrieve + operationId: episode_map_retrieve description: A viewset for retrieving Maps. parameters: - in: path @@ -623,7 +629,7 @@ paths: type: string required: true tags: - - api + - episode security: - jwtAuth: [] responses: @@ -635,7 +641,7 @@ paths: description: '' /api/episode/{episode_id}/tournament/: get: - operationId: api_episode_tournament_list + operationId: episode_tournament_list description: A viewset for retrieving Tournaments. parameters: - in: path @@ -651,7 +657,7 @@ paths: schema: type: integer tags: - - api + - episode security: - jwtAuth: [] responses: @@ -663,7 +669,7 @@ paths: description: '' /api/episode/{episode_id}/tournament/{id}/: get: - operationId: api_episode_tournament_retrieve + operationId: episode_tournament_retrieve description: A viewset for retrieving Tournaments. parameters: - in: path @@ -678,7 +684,7 @@ paths: type: string required: true tags: - - api + - episode security: - jwtAuth: [] responses: @@ -690,7 +696,7 @@ paths: description: '' /api/episode/{episode_id}/tournament/{tournament}/round/: get: - operationId: api_episode_tournament_round_list + operationId: episode_tournament_round_list description: A viewset for retrieving tournament rounds. parameters: - in: path @@ -712,7 +718,7 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - episode security: - jwtAuth: [] responses: @@ -724,7 +730,7 @@ paths: description: '' /api/episode/{episode_id}/tournament/{tournament}/round/{id}/: get: - operationId: api_episode_tournament_round_retrieve + operationId: episode_tournament_round_retrieve description: A viewset for retrieving tournament rounds. parameters: - in: path @@ -745,7 +751,7 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - episode security: - jwtAuth: [] responses: @@ -757,7 +763,7 @@ paths: description: '' /api/episode/{episode_id}/tournament/next/: get: - operationId: api_episode_tournament_next_retrieve + operationId: episode_tournament_next_retrieve description: Retrieve the next upcoming tournament, as ordered by submission freeze time. parameters: @@ -768,7 +774,7 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - episode security: - jwtAuth: [] responses: @@ -780,7 +786,7 @@ paths: description: '' /api/episode/e/: get: - operationId: api_episode_e_list + operationId: episode_e_list description: A viewset for retrieving Episodes. parameters: - name: page @@ -790,7 +796,7 @@ paths: schema: type: integer tags: - - api + - episode security: - jwtAuth: [] - {} @@ -803,7 +809,7 @@ paths: description: '' /api/episode/e/{id}/: get: - operationId: api_episode_e_retrieve + operationId: episode_e_retrieve description: A viewset for retrieving Episodes. parameters: - in: path @@ -812,7 +818,7 @@ paths: type: string required: true tags: - - api + - episode security: - jwtAuth: [] - {} @@ -825,7 +831,7 @@ paths: description: '' /api/episode/e/{id}/autoscrim/: post: - operationId: api_episode_e_autoscrim_create + operationId: episode_e_autoscrim_create description: Trigger a round of autoscrimmages. parameters: - in: path @@ -834,18 +840,18 @@ paths: type: string required: true tags: - - api + - episode requestBody: content: application/json: schema: - $ref: '#/components/schemas/Autoscrim' + $ref: '#/components/schemas/AutoscrimRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/Autoscrim' + $ref: '#/components/schemas/AutoscrimRequest' multipart/form-data: schema: - $ref: '#/components/schemas/Autoscrim' + $ref: '#/components/schemas/AutoscrimRequest' required: true security: - jwtAuth: [] @@ -854,7 +860,7 @@ paths: description: Created successfully /api/specs/: get: - operationId: api_specs_retrieve + operationId: specs_retrieve description: |- OpenApi3 schema for this API. Format can be selected via content negotiation. @@ -936,6 +942,7 @@ paths: - ml - mn - mr + - ms - my - nb - ne @@ -970,7 +977,7 @@ paths: - zh-hans - zh-hant tags: - - api + - specs security: - jwtAuth: [] - {} @@ -996,7 +1003,7 @@ paths: description: '' /api/team/{episode_id}/requirement/: get: - operationId: api_team_requirement_list + operationId: team_requirement_list description: A viewset for retrieving and checking class requirements. parameters: - in: path @@ -1012,7 +1019,7 @@ paths: schema: type: integer tags: - - api + - team security: - jwtAuth: [] responses: @@ -1024,7 +1031,7 @@ paths: description: '' /api/team/{episode_id}/requirement/{id}/: get: - operationId: api_team_requirement_retrieve + operationId: team_requirement_retrieve description: A viewset for retrieving and checking class requirements. parameters: - in: path @@ -1039,7 +1046,7 @@ paths: type: string required: true tags: - - api + - team security: - jwtAuth: [] responses: @@ -1051,7 +1058,7 @@ paths: description: '' /api/team/{episode_id}/requirement/{id}/check/: get: - operationId: api_team_requirement_check_retrieve + operationId: team_requirement_check_retrieve description: A viewset for retrieving and checking class requirements. parameters: - in: path @@ -1066,7 +1073,7 @@ paths: type: string required: true tags: - - api + - team security: - jwtAuth: [] responses: @@ -1078,7 +1085,7 @@ paths: description: '' /api/team/{episode_id}/requirement/{id}/compute/: get: - operationId: api_team_requirement_compute_retrieve + operationId: team_requirement_compute_retrieve description: A viewset for retrieving and checking class requirements. parameters: - in: path @@ -1093,7 +1100,7 @@ paths: type: string required: true tags: - - api + - team security: - jwtAuth: [] responses: @@ -1105,7 +1112,7 @@ paths: description: '' /api/team/{episode_id}/requirement/report/: get: - operationId: api_team_requirement_report_retrieve + operationId: team_requirement_report_retrieve description: Retrieve or update team strategy report parameters: - in: path @@ -1115,14 +1122,14 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team security: - jwtAuth: [] responses: '204': description: No response body put: - operationId: api_team_requirement_report_update + operationId: team_requirement_report_update description: Retrieve or update team strategy report parameters: - in: path @@ -1132,18 +1139,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team requestBody: content: application/json: schema: - $ref: '#/components/schemas/TeamReport' + $ref: '#/components/schemas/TeamReportRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TeamReport' + $ref: '#/components/schemas/TeamReportRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TeamReport' + $ref: '#/components/schemas/TeamReportRequest' required: true security: - jwtAuth: [] @@ -1152,7 +1159,7 @@ paths: description: No response body /api/team/{episode_id}/t/: get: - operationId: api_team_t_list + operationId: team_t_list description: |- A viewset for retrieving and updating all team/team profile info. @@ -1183,7 +1190,7 @@ paths: schema: type: string tags: - - api + - team security: - jwtAuth: [] responses: @@ -1194,7 +1201,7 @@ paths: $ref: '#/components/schemas/PaginatedTeamPublicList' description: '' post: - operationId: api_team_t_create + operationId: team_t_create description: |- A viewset for retrieving and updating all team/team profile info. @@ -1207,18 +1214,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team requestBody: content: application/json: schema: - $ref: '#/components/schemas/TeamCreate' + $ref: '#/components/schemas/TeamCreateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TeamCreate' + $ref: '#/components/schemas/TeamCreateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TeamCreate' + $ref: '#/components/schemas/TeamCreateRequest' required: true security: - jwtAuth: [] @@ -1231,7 +1238,7 @@ paths: description: '' /api/team/{episode_id}/t/{id}/: get: - operationId: api_team_t_retrieve + operationId: team_t_retrieve description: |- A viewset for retrieving and updating all team/team profile info. @@ -1249,7 +1256,7 @@ paths: type: string required: true tags: - - api + - team security: - jwtAuth: [] responses: @@ -1261,7 +1268,7 @@ paths: description: '' /api/team/{episode_id}/t/avatar/: post: - operationId: api_team_t_avatar_create + operationId: team_t_avatar_create description: Update uploaded avatar. parameters: - in: path @@ -1271,18 +1278,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team requestBody: content: application/json: schema: - $ref: '#/components/schemas/TeamAvatar' + $ref: '#/components/schemas/TeamAvatarRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TeamAvatar' + $ref: '#/components/schemas/TeamAvatarRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TeamAvatar' + $ref: '#/components/schemas/TeamAvatarRequest' required: true security: - jwtAuth: [] @@ -1291,7 +1298,7 @@ paths: description: No response body /api/team/{episode_id}/t/join/: post: - operationId: api_team_t_join_create + operationId: team_t_join_create description: |- A viewset for retrieving and updating all team/team profile info. @@ -1304,18 +1311,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team requestBody: content: application/json: schema: - $ref: '#/components/schemas/TeamJoin' + $ref: '#/components/schemas/TeamJoinRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TeamJoin' + $ref: '#/components/schemas/TeamJoinRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TeamJoin' + $ref: '#/components/schemas/TeamJoinRequest' required: true security: - jwtAuth: [] @@ -1324,7 +1331,7 @@ paths: description: No response body /api/team/{episode_id}/t/leave/: post: - operationId: api_team_t_leave_create + operationId: team_t_leave_create description: Leave a team. parameters: - in: path @@ -1334,7 +1341,7 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team security: - jwtAuth: [] responses: @@ -1342,7 +1349,7 @@ paths: description: No response body /api/team/{episode_id}/t/me/: get: - operationId: api_team_t_me_retrieve + operationId: team_t_me_retrieve description: Retrieve or update information about the current team. parameters: - in: path @@ -1352,7 +1359,7 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team security: - jwtAuth: [] responses: @@ -1363,7 +1370,7 @@ paths: $ref: '#/components/schemas/TeamPrivate' description: '' put: - operationId: api_team_t_me_update + operationId: team_t_me_update description: Retrieve or update information about the current team. parameters: - in: path @@ -1373,18 +1380,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team requestBody: content: application/json: schema: - $ref: '#/components/schemas/TeamPrivate' + $ref: '#/components/schemas/TeamPrivateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TeamPrivate' + $ref: '#/components/schemas/TeamPrivateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TeamPrivate' + $ref: '#/components/schemas/TeamPrivateRequest' security: - jwtAuth: [] responses: @@ -1395,7 +1402,7 @@ paths: $ref: '#/components/schemas/TeamPrivate' description: '' patch: - operationId: api_team_t_me_partial_update + operationId: team_t_me_partial_update description: Retrieve or update information about the current team. parameters: - in: path @@ -1405,18 +1412,18 @@ paths: pattern: ^[^\/.]+$ required: true tags: - - api + - team requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedTeamPrivate' + $ref: '#/components/schemas/PatchedTeamPrivateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedTeamPrivate' + $ref: '#/components/schemas/PatchedTeamPrivateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedTeamPrivate' + $ref: '#/components/schemas/PatchedTeamPrivateRequest' security: - jwtAuth: [] responses: @@ -1428,23 +1435,23 @@ paths: description: '' /api/token/: post: - operationId: api_token_create + operationId: token_create description: |- Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials. tags: - - api + - token requestBody: content: application/json: schema: - $ref: '#/components/schemas/TokenObtainPair' + $ref: '#/components/schemas/TokenObtainPairRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TokenObtainPair' + $ref: '#/components/schemas/TokenObtainPairRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TokenObtainPair' + $ref: '#/components/schemas/TokenObtainPairRequest' required: true responses: '200': @@ -1455,23 +1462,23 @@ paths: description: '' /api/token/refresh/: post: - operationId: api_token_refresh_create + operationId: token_refresh_create description: |- Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid. tags: - - api + - token requestBody: content: application/json: schema: - $ref: '#/components/schemas/TokenRefresh' + $ref: '#/components/schemas/TokenRefreshRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TokenRefresh' + $ref: '#/components/schemas/TokenRefreshRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TokenRefresh' + $ref: '#/components/schemas/TokenRefreshRequest' required: true responses: '200': @@ -1482,51 +1489,47 @@ paths: description: '' /api/token/verify/: post: - operationId: api_token_verify_create + operationId: token_verify_create description: |- Takes a token and indicates if it is valid. This view provides no information about a token's fitness for a particular use. tags: - - api + - token requestBody: content: application/json: schema: - $ref: '#/components/schemas/TokenVerify' + $ref: '#/components/schemas/TokenVerifyRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/TokenVerify' + $ref: '#/components/schemas/TokenVerifyRequest' multipart/form-data: schema: - $ref: '#/components/schemas/TokenVerify' + $ref: '#/components/schemas/TokenVerifyRequest' required: true responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TokenVerify' - description: '' + description: No response body /api/user/password_reset/: post: - operationId: api_user_password_reset_create + operationId: user_password_reset_create description: |- An Api View which provides a method to request a password reset token based on an e-mail address Sends a signal reset_password_token_created when a reset token was created tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/Email' + $ref: '#/components/schemas/EmailRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/Email' + $ref: '#/components/schemas/EmailRequest' multipart/form-data: schema: - $ref: '#/components/schemas/Email' + $ref: '#/components/schemas/EmailRequest' required: true responses: '200': @@ -1537,22 +1540,22 @@ paths: description: '' /api/user/password_reset/confirm/: post: - operationId: api_user_password_reset_confirm_create + operationId: user_password_reset_confirm_create description: An Api View which provides a method to reset a password based on a unique token tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/PasswordToken' + $ref: '#/components/schemas/PasswordTokenRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PasswordToken' + $ref: '#/components/schemas/PasswordTokenRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PasswordToken' + $ref: '#/components/schemas/PasswordTokenRequest' required: true responses: '200': @@ -1563,21 +1566,21 @@ paths: description: '' /api/user/password_reset/validate_token/: post: - operationId: api_user_password_reset_validate_token_create + operationId: user_password_reset_validate_token_create description: An Api View which provides a method to verify that a token is valid tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/ResetToken' + $ref: '#/components/schemas/ResetTokenRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ResetToken' + $ref: '#/components/schemas/ResetTokenRequest' multipart/form-data: schema: - $ref: '#/components/schemas/ResetToken' + $ref: '#/components/schemas/ResetTokenRequest' required: true responses: '200': @@ -1588,21 +1591,21 @@ paths: description: '' /api/user/u/: post: - operationId: api_user_u_create + operationId: user_u_create description: A viewset for retrieving and updating all user info. tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserCreate' + $ref: '#/components/schemas/UserCreateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/UserCreate' + $ref: '#/components/schemas/UserCreateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/UserCreate' + $ref: '#/components/schemas/UserCreateRequest' required: true security: - jwtAuth: [] @@ -1616,7 +1619,7 @@ paths: description: '' /api/user/u/{id}/: get: - operationId: api_user_u_retrieve + operationId: user_u_retrieve description: A viewset for retrieving and updating all user info. parameters: - in: path @@ -1626,7 +1629,7 @@ paths: description: A unique integer value identifying this user. required: true tags: - - api + - user security: - jwtAuth: [] - {} @@ -1639,7 +1642,7 @@ paths: description: '' /api/user/u/{id}/teams/: get: - operationId: api_user_u_teams_retrieve + operationId: user_u_teams_retrieve description: Retrieve all teams associated with a user. parameters: - in: path @@ -1649,7 +1652,7 @@ paths: description: A unique integer value identifying this user. required: true tags: - - api + - user security: - jwtAuth: [] - {} @@ -1662,21 +1665,21 @@ paths: description: '' /api/user/u/avatar/: post: - operationId: api_user_u_avatar_create + operationId: user_u_avatar_create description: Update uploaded avatar. tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserAvatar' + $ref: '#/components/schemas/UserAvatarRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/UserAvatar' + $ref: '#/components/schemas/UserAvatarRequest' multipart/form-data: schema: - $ref: '#/components/schemas/UserAvatar' + $ref: '#/components/schemas/UserAvatarRequest' required: true security: - jwtAuth: [] @@ -1685,10 +1688,10 @@ paths: description: No response body /api/user/u/me/: get: - operationId: api_user_u_me_retrieve + operationId: user_u_me_retrieve description: Retrieve or update information about the logged-in user. tags: - - api + - user security: - jwtAuth: [] responses: @@ -1699,21 +1702,21 @@ paths: $ref: '#/components/schemas/UserPrivate' description: '' put: - operationId: api_user_u_me_update + operationId: user_u_me_update description: Retrieve or update information about the logged-in user. tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserPrivate' + $ref: '#/components/schemas/UserPrivateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/UserPrivate' + $ref: '#/components/schemas/UserPrivateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/UserPrivate' + $ref: '#/components/schemas/UserPrivateRequest' required: true security: - jwtAuth: [] @@ -1725,21 +1728,21 @@ paths: $ref: '#/components/schemas/UserPrivate' description: '' patch: - operationId: api_user_u_me_partial_update + operationId: user_u_me_partial_update description: Retrieve or update information about the logged-in user. tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedUserPrivate' + $ref: '#/components/schemas/PatchedUserPrivateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedUserPrivate' + $ref: '#/components/schemas/PatchedUserPrivateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedUserPrivate' + $ref: '#/components/schemas/PatchedUserPrivateRequest' security: - jwtAuth: [] responses: @@ -1751,10 +1754,10 @@ paths: description: '' /api/user/u/resume/: get: - operationId: api_user_u_resume_retrieve + operationId: user_u_resume_retrieve description: Retrieve or update the uploaded resume. tags: - - api + - user security: - jwtAuth: [] responses: @@ -1765,21 +1768,21 @@ paths: $ref: '#/components/schemas/UserResume' description: '' put: - operationId: api_user_u_resume_update + operationId: user_u_resume_update description: Retrieve or update the uploaded resume. tags: - - api + - user requestBody: content: application/json: schema: - $ref: '#/components/schemas/UserResume' + $ref: '#/components/schemas/UserResumeRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/UserResume' + $ref: '#/components/schemas/UserResumeRequest' multipart/form-data: schema: - $ref: '#/components/schemas/UserResume' + $ref: '#/components/schemas/UserResumeRequest' required: true security: - jwtAuth: [] @@ -1792,7 +1795,7 @@ paths: description: '' components: schemas: - Autoscrim: + AutoscrimRequest: type: object properties: best_of: @@ -1813,8 +1816,6 @@ components: type: integer min_score: type: integer - maximum: 32767 - minimum: 0 required: - episode - maps @@ -2100,6 +2101,15 @@ components: format: email required: - email + EmailRequest: + type: object + properties: + email: + type: string + format: email + minLength: 1 + required: + - email Episode: type: object properties: @@ -2279,11 +2289,11 @@ components: - submission - team - teamname - MatchReport: + MatchReportRequest: type: object properties: invocation: - $ref: '#/components/schemas/SaturnInvocation' + $ref: '#/components/schemas/SaturnInvocationRequest' scores: type: array items: @@ -2451,6 +2461,26 @@ components: type: array items: $ref: '#/components/schemas/TournamentRound' + PaginatedTournamentSubmissionList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/TournamentSubmission' PasswordToken: type: object properties: @@ -2461,61 +2491,45 @@ components: required: - password - token - PatchedTeamPrivate: + PasswordTokenRequest: type: object properties: - id: - type: integer - readOnly: true - profile: - $ref: '#/components/schemas/TeamProfilePrivate' - episode: - type: string - name: + password: type: string - readOnly: true - members: - type: array - items: - $ref: '#/components/schemas/UserPublic' - readOnly: true - join_key: + minLength: 1 + token: type: string - readOnly: true - pattern: ^[-a-zA-Z0-9_]+$ - status: - allOf: - - $ref: '#/components/schemas/Status526Enum' - readOnly: true - PatchedUserPrivate: + minLength: 1 + required: + - password + - token + PatchedTeamPrivateRequest: type: object properties: - id: - type: integer - readOnly: true profile: - $ref: '#/components/schemas/UserProfilePrivate' - username: + $ref: '#/components/schemas/TeamProfilePrivateRequest' + episode: type: string - readOnly: true - description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ - only. + minLength: 1 + PatchedUserPrivateRequest: + type: object + properties: + profile: + $ref: '#/components/schemas/UserProfilePrivateRequest' email: type: string format: email + minLength: 1 title: Email address maxLength: 254 first_name: type: string + minLength: 1 maxLength: 30 last_name: type: string + minLength: 1 maxLength: 30 - is_staff: - type: boolean - readOnly: true - title: Staff status - description: Designates whether the user can log into this admin site. PlayerOrderEnum: enum: - + @@ -2535,7 +2549,15 @@ components: type: string required: - token - SaturnInvocation: + ResetTokenRequest: + type: object + properties: + token: + type: string + minLength: 1 + required: + - token + SaturnInvocationRequest: type: object properties: status: @@ -2561,7 +2583,7 @@ components: readOnly: true status: allOf: - - $ref: '#/components/schemas/ScrimmageRequestStatusEnum' + - $ref: '#/components/schemas/ScrimmageStatusEnum' readOnly: true is_ranked: type: boolean @@ -2591,18 +2613,11 @@ components: items: type: string readOnly: true - map_names: - type: array - items: - type: string - writeOnly: true - maxItems: 10 required: - created - episode - id - is_ranked - - map_names - maps - player_order - requested_by @@ -2612,7 +2627,28 @@ components: - requested_to_name - requested_to_rating - status - ScrimmageRequestStatusEnum: + ScrimmageRequestRequest: + type: object + properties: + is_ranked: + type: boolean + requested_to: + type: integer + player_order: + $ref: '#/components/schemas/PlayerOrderEnum' + map_names: + type: array + items: + type: string + minLength: 1 + writeOnly: true + maxItems: 10 + required: + - is_ranked + - map_names + - player_order + - requested_to + ScrimmageStatusEnum: enum: - P - Y @@ -2681,17 +2717,12 @@ components: description: type: string maxLength: 128 - source_code: - type: string - format: uri - writeOnly: true required: - accepted - created - episode - id - logs - - source_code - status - team - teamname @@ -2714,21 +2745,36 @@ components: - ready - reason - url - SubmissionReport: + SubmissionReportRequest: type: object properties: invocation: - $ref: '#/components/schemas/SaturnInvocation' + $ref: '#/components/schemas/SaturnInvocationRequest' accepted: type: boolean required: - invocation - TeamAvatar: + SubmissionRequest: + type: object + properties: + package: + type: string + maxLength: 32 + description: + type: string + maxLength: 128 + source_code: + type: string + format: binary + writeOnly: true + required: + - source_code + TeamAvatarRequest: type: object properties: avatar: type: string - format: uri + format: binary writeOnly: true required: - avatar @@ -2765,13 +2811,30 @@ components: - members - name - status - TeamJoin: + TeamCreateRequest: + type: object + properties: + profile: + $ref: '#/components/schemas/TeamProfilePrivateRequest' + episode: + type: string + minLength: 1 + name: + type: string + minLength: 1 + pattern: ^[ -~]*$ + maxLength: 32 + required: + - name + TeamJoinRequest: type: object properties: join_key: type: string + minLength: 1 name: type: string + minLength: 1 required: - join_key - name @@ -2807,6 +2870,14 @@ components: - members - name - status + TeamPrivateRequest: + type: object + properties: + profile: + $ref: '#/components/schemas/TeamProfilePrivateRequest' + episode: + type: string + minLength: 1 TeamProfilePrivate: type: object properties: @@ -2841,6 +2912,26 @@ components: - avatar_url - has_avatar - rating + TeamProfilePrivateRequest: + type: object + properties: + quote: + type: string + pattern: ^[ -~]*$ + maxLength: 80 + biography: + type: string + maxLength: 1024 + has_report: + type: boolean + auto_accept_ranked: + type: boolean + auto_accept_unranked: + type: boolean + eligible_for: + type: array + items: + type: integer TeamProfilePublic: type: object properties: @@ -2907,24 +2998,18 @@ components: - members - name - status - TeamReport: + TeamReportRequest: type: object properties: report: type: string - format: uri + format: binary writeOnly: true required: - report TokenObtainPair: type: object properties: - username: - type: string - writeOnly: true - password: - type: string - writeOnly: true access: type: string readOnly: true @@ -2933,8 +3018,20 @@ components: readOnly: true required: - access - - password - refresh + TokenObtainPairRequest: + type: object + properties: + username: + type: string + writeOnly: true + minLength: 1 + password: + type: string + writeOnly: true + minLength: 1 + required: + - password - username TokenRefresh: type: object @@ -2942,18 +3039,24 @@ components: access: type: string readOnly: true + required: + - access + TokenRefreshRequest: + type: object + properties: refresh: type: string writeOnly: true + minLength: 1 required: - - access - refresh - TokenVerify: + TokenVerifyRequest: type: object properties: token: type: string writeOnly: true + minLength: 1 required: - token Tournament: @@ -3017,8 +3120,6 @@ components: type: string external_id: type: integer - maximum: 32767 - minimum: -32768 nullable: true name: type: string @@ -3028,10 +3129,7 @@ components: items: type: integer release_status: - allOf: - - $ref: '#/components/schemas/ReleaseStatusEnum' - minimum: -2147483648 - maximum: 2147483647 + $ref: '#/components/schemas/ReleaseStatusEnum' required: - id - name @@ -3077,10 +3175,6 @@ components: description: type: string readOnly: true - source_code: - type: string - format: uri - writeOnly: true tournament: type: string readOnly: true @@ -3092,19 +3186,18 @@ components: - id - logs - package - - source_code - status - team - teamname - tournament - user - username - UserAvatar: + UserAvatarRequest: type: object properties: avatar: type: string - format: uri + format: binary writeOnly: true required: - avatar @@ -3122,9 +3215,6 @@ components: only. pattern: ^[\w.@+-]+$ maxLength: 150 - password: - type: string - writeOnly: true email: type: string format: email @@ -3147,6 +3237,41 @@ components: - id - is_staff - last_name + - username + UserCreateRequest: + type: object + properties: + profile: + $ref: '#/components/schemas/UserProfilePrivateRequest' + username: + type: string + minLength: 1 + description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ + only. + pattern: ^[\w.@+-]+$ + maxLength: 150 + password: + type: string + writeOnly: true + minLength: 1 + email: + type: string + format: email + minLength: 1 + title: Email address + maxLength: 254 + first_name: + type: string + minLength: 1 + maxLength: 30 + last_name: + type: string + minLength: 1 + maxLength: 30 + required: + - email + - first_name + - last_name - password - username UserPassed: @@ -3202,6 +3327,29 @@ components: - is_staff - last_name - username + UserPrivateRequest: + type: object + properties: + profile: + $ref: '#/components/schemas/UserProfilePrivateRequest' + email: + type: string + format: email + minLength: 1 + title: Email address + maxLength: 254 + first_name: + type: string + minLength: 1 + maxLength: 30 + last_name: + type: string + minLength: 1 + maxLength: 30 + required: + - email + - first_name + - last_name UserProfilePrivate: type: object properties: @@ -3237,6 +3385,29 @@ components: - gender - has_avatar - has_resume + UserProfilePrivateRequest: + type: object + properties: + gender: + $ref: '#/components/schemas/GenderEnum' + gender_details: + type: string + maxLength: 32 + school: + type: string + maxLength: 128 + biography: + type: string + maxLength: 1024 + kerberos: + type: string + maxLength: 16 + pattern: ^[-a-zA-Z0-9_]+$ + country: + $ref: '#/components/schemas/CountryEnum' + required: + - country + - gender UserProfilePublic: type: object properties: @@ -3255,6 +3426,15 @@ components: required: - avatar_url - has_avatar + UserProfilePublicRequest: + type: object + properties: + school: + type: string + maxLength: 128 + biography: + type: string + maxLength: 1024 UserPublic: type: object properties: @@ -3278,13 +3458,23 @@ components: - id - is_staff - username - UserResume: + UserPublicRequest: type: object properties: - resume: + profile: + $ref: '#/components/schemas/UserProfilePublicRequest' + username: type: string - format: uri - writeOnly: true + minLength: 1 + description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ + only. + pattern: ^[\w.@+-]+$ + maxLength: 150 + required: + - username + UserResume: + type: object + properties: ready: type: boolean readOnly: true @@ -3298,8 +3488,16 @@ components: required: - ready - reason - - resume - url + UserResumeRequest: + type: object + properties: + resume: + type: string + format: binary + writeOnly: true + required: + - resume securitySchemes: jwtAuth: type: http