-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update lib api types * fix: fix warning from data contract * fix: inline type on RequestParams
- Loading branch information
Showing
5 changed files
with
197 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
/* tslint:disable */ | ||
/* | ||
* --------------------------------------------------------------- | ||
|
@@ -51,6 +50,7 @@ export interface CategoryViewModel { | |
} | ||
|
||
export interface ChangePasswordRequest { | ||
/** @minLength 1 */ | ||
password: string | ||
} | ||
|
||
|
@@ -86,17 +86,19 @@ export interface CreateCategoryRequest { | |
export interface CreateLeaderboardRequest { | ||
/** | ||
* The display name of the `Leaderboard` to create. | ||
* @minLength 1 | ||
* @example "Foo Bar" | ||
*/ | ||
name: string | ||
/** | ||
* The URL-scoped unique identifier of the `Leaderboard`. | ||
* | ||
* Must be [2, 80] in length and consist only of alphanumeric characters and hyphens. | ||
* @minLength 1 | ||
* @example "foo-bar" | ||
*/ | ||
slug: string | ||
info: string | null | ||
info?: string | ||
} | ||
|
||
/** This request object is sent when creating a `Run`. */ | ||
|
@@ -142,7 +144,7 @@ export interface LeaderboardViewModel { | |
* The general information for the Leaderboard. | ||
* @example "Timer starts on selecting New Game and ends when the final boss is beaten." | ||
*/ | ||
info: string | null | ||
info: string | ||
/** | ||
* The time the Leaderboard was created. | ||
* @format date-time | ||
|
@@ -224,17 +226,20 @@ export interface RegisterRequest { | |
* Usernames are saved case-sensitively, but matched against case-insensitively. | ||
* A `User` may not register with the name 'Cool' when another `User` with the name 'cool' | ||
* exists. | ||
* @minLength 1 | ||
* @example "J'on-Doe" | ||
*/ | ||
username: string | ||
/** | ||
* The `User`'s email address. | ||
* @minLength 1 | ||
* @example "[email protected]" | ||
*/ | ||
email: string | ||
/** | ||
* The `User`'s password. It: | ||
* <ul><li>supports Unicode;</li><li>must be [8, 80] in length;</li><li>must have at least:</li><ul><li>one uppercase letter;</li><li>one lowercase letter; and</li><li>one number.</li></ul></ul> | ||
* @minLength 1 | ||
* @example "P4ssword" | ||
*/ | ||
password: string | ||
|
@@ -266,6 +271,12 @@ export type TimedRunViewModel = BaseRunViewModel & { | |
time: string | ||
} | ||
|
||
export interface UpdateLeaderboardRequest { | ||
name?: string | ||
slug?: string | ||
info?: string | ||
} | ||
|
||
export type UserRole = 'Registered' | 'Confirmed' | 'Administrator' | 'Banned' | ||
|
||
export interface UserViewModel { | ||
|
@@ -353,6 +364,7 @@ export interface GetLeaderboardBySlugParams { | |
slug: string | ||
} | ||
|
||
export interface GetLeaderboardsParams { | ||
ids?: number[] | ||
export interface ListLeaderboardsParams { | ||
/** @default false */ | ||
includeDeleted?: boolean | ||
} |