Skip to content

Commit

Permalink
sync with latest api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
myssto committed Dec 22, 2024
1 parent 1a1b8cd commit bcdff84
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
28 changes: 20 additions & 8 deletions src/clients/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4975,7 +4975,7 @@ export type TournamentsListRequestParams = {
/**
* (optional) Filters results for only tournaments with a partially matching name or abbreviation (case insensitive)
*/
name?: string | undefined;
searchQuery?: string | undefined;
/**
* (optional) Filters results for only tournaments that occurred on or after a specified date
*/
Expand All @@ -4985,7 +4985,7 @@ export type TournamentsListRequestParams = {
*/
dateMax?: Date | undefined;
/**
* (optional) Filters results for only matches with a specified verification status
* (optional) Filters results for only tournaments with a specified verification status
*/
verificationStatus?: VerificationStatus | undefined;
/**
Expand All @@ -5004,6 +5004,10 @@ export type TournamentsListRequestParams = {
* (optional) Filters results for only tournaments verified by a user with a specified id
*/
verifiedBy?: number | undefined;
/**
* (optional) Filters results for only tournaments played with a specified lobby size
*/
lobbySize?: number | undefined;
/**
* (optional) The key used to sort results by
*/
Expand Down Expand Up @@ -5952,14 +5956,15 @@ export class TournamentsWrapper extends OtrApiWrapperBase {
pageSize,
verified,
ruleset,
name,
searchQuery,
dateMin,
dateMax,
verificationStatus,
rejectionReason,
processingStatus,
submittedBy,
verifiedBy,
lobbySize,
sort,
descending,
} = params;
Expand All @@ -5983,9 +5988,10 @@ export class TournamentsWrapper extends OtrApiWrapperBase {
throw new Error("The parameter 'ruleset' cannot be null.");
else if (ruleset !== undefined)
url_ += "ruleset=" + encodeURIComponent("" + ruleset) + "&";
if (name === null) throw new Error("The parameter 'name' cannot be null.");
else if (name !== undefined)
url_ += "name=" + encodeURIComponent("" + name) + "&";
if (searchQuery === null)
throw new Error("The parameter 'searchQuery' cannot be null.");
else if (searchQuery !== undefined)
url_ += "searchQuery=" + encodeURIComponent("" + searchQuery) + "&";
if (dateMin === null)
throw new Error("The parameter 'dateMin' cannot be null.");
else if (dateMin !== undefined)
Expand Down Expand Up @@ -6025,6 +6031,10 @@ export class TournamentsWrapper extends OtrApiWrapperBase {
throw new Error("The parameter 'verifiedBy' cannot be null.");
else if (verifiedBy !== undefined)
url_ += "verifiedBy=" + encodeURIComponent("" + verifiedBy) + "&";
if (lobbySize === null)
throw new Error("The parameter 'lobbySize' cannot be null.");
else if (lobbySize !== undefined)
url_ += "lobbySize=" + encodeURIComponent("" + lobbySize) + "&";
if (sort === null) throw new Error("The parameter 'sort' cannot be null.");
else if (sort !== undefined)
url_ += "sort=" + encodeURIComponent("" + sort) + "&";
Expand Down Expand Up @@ -8791,12 +8801,14 @@ export enum TournamentQuerySortType {
Id = 0,
/** Sort by start date */
StartTime = 1,
/** Sort by start date */
/** Sort by end date */
EndTime = 2,
/** Sort by name */
Name = 3,
SearchQueryRelevance = 3,
/** Sort by created date */
Created = 4,
/** Sort by lobby size */
LobbySize = 5,
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/clients/ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@osu-tournament-rating/otr-api-client",
"version": "0.0.13",
"version": "0.0.14",
"description": "Client code for interacting with the o!TR API",
"files": [
"index.js",
Expand Down
29 changes: 21 additions & 8 deletions swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4728,7 +4728,7 @@
}
},
{
"name": "name",
"name": "searchQuery",
"in": "query",
"description": "Filters results for only tournaments with a partially matching name or abbreviation (case insensitive)",
"style": "form",
Expand Down Expand Up @@ -4759,7 +4759,7 @@
{
"name": "verificationStatus",
"in": "query",
"description": "Filters results for only matches with a specified verification status",
"description": "Filters results for only tournaments with a specified verification status",
"style": "form",
"schema": {
"allOf": [
Expand Down Expand Up @@ -4815,6 +4815,16 @@
"format": "int32"
}
},
{
"name": "lobbySize",
"in": "query",
"description": "Filters results for only tournaments played with a specified lobby size",
"style": "form",
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "sort",
"in": "query",
Expand All @@ -4826,7 +4836,7 @@
"$ref": "#/components/schemas/TournamentQuerySortType"
}
],
"default": 1
"default": 2
}
},
{
Expand Down Expand Up @@ -8945,7 +8955,8 @@
1,
2,
3,
4
4,
5
],
"type": "integer",
"description": "Defines how to sort the results of fetching all tournaments",
Expand All @@ -8954,15 +8965,17 @@
"Id",
"StartTime",
"EndTime",
"Name",
"Created"
"SearchQueryRelevance",
"Created",
"LobbySize"
],
"x-enumDescriptions": [
"Sort by primary key",
"Sort by start date",
"Sort by start date",
"Sort by end date",
"Sort by name",
"Sort by created date"
"Sort by created date",
"Sort by lobby size"
]
},
"TournamentRejectionReason": {
Expand Down

0 comments on commit bcdff84

Please sign in to comment.