-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add docs site and improve types (#19)
* docs: run setup command * docs: start working on docusaurus website * docs: start working on docusaurus website * feat(docs): add more docusaurus pages * docs: finish up on docusaurus * docs: switch to nextra * chore: update docs
- Loading branch information
1 parent
33a920a
commit be76de7
Showing
59 changed files
with
5,394 additions
and
529 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,9 +1,18 @@ | ||
export interface AccessTokenResponse { | ||
/** Used to retrieve data from the PSN API. */ | ||
accessToken: string; | ||
|
||
/** When the access token will expire. */ | ||
expiresIn: number; | ||
|
||
idToken: string; | ||
|
||
/** Used to retrieve a new access token. */ | ||
refreshToken: string; | ||
|
||
/** When the refresh token will expire. */ | ||
refreshTokenExpiresIn: number; | ||
|
||
scope: string; | ||
tokenType: string; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Trophy } from "./trophy.model"; | ||
|
||
export type RarestThinTrophy = Pick< | ||
Trophy, | ||
| "trophyId" | ||
| "trophyHidden" | ||
| "earned" | ||
| "trophyType" | ||
| "trophyRare" | ||
| "trophyEarnedRate" | ||
>; |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { Trophy } from "./trophy.model"; | ||
|
||
export type TitleThinTrophy = Pick< | ||
Trophy, | ||
| "trophyId" | ||
| "trophyHidden" | ||
| "trophyType" | ||
| "trophyName" | ||
| "trophyDetail" | ||
| "trophyIconUrl" | ||
| "trophyGroupId" | ||
>; |
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,13 +1,13 @@ | ||
export interface TrophyCounts { | ||
/** Total bronze trophies from all trophy groups. */ | ||
/** Total count of bronze trophies. */ | ||
bronze: number; | ||
|
||
/** Total silver trophies from all trophy groups. */ | ||
/** Total count of silver trophies. */ | ||
silver: number; | ||
|
||
/** Total gold trophies from all trophy groups. */ | ||
/** Total count of gold trophies. */ | ||
gold: number; | ||
|
||
/** Total platinum trophies from all trophy groups. */ | ||
platinum: number; | ||
/** 1 if the group contains a platinum trophy. */ | ||
platinum: 0 | 1; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { TrophyCounts } from "./trophy-counts.model"; | ||
import type { TrophyGroup } from "./trophy-group.model"; | ||
|
||
type FromTrophyGroup = Pick<TrophyGroup, "trophyGroupId">; | ||
|
||
export interface TrophyGroupEarnings extends FromTrophyGroup { | ||
/** | ||
* The percentage completion of the trophy group by the user. | ||
* @example `100` | ||
* @example `20` | ||
*/ | ||
progress: number; | ||
|
||
/** The account's number of earned trophies for the trophy group by grade. */ | ||
earnedTrophies: TrophyCounts; | ||
|
||
/** | ||
* An ISO 8601 string representing the date the | ||
* group progress was updated (such as when a | ||
* trophy was earned). | ||
* @example `"2021-08-15T21:22:08Z"` | ||
*/ | ||
lastUpdatedDateTime: string; | ||
} |
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
Oops, something went wrong.