diff --git a/docs/docs/api/routes/admin.md b/docs/docs/api/routes/admin.md index f3f9b5183..023184349 100644 --- a/docs/docs/api/routes/admin.md +++ b/docs/docs/api/routes/admin.md @@ -1,7 +1,7 @@ # Admin Endpoints These endpoints are for adminstrator use. As such, they all -require an `authLevel` of atleast 3. For more information, see the [UserDocument](../../tachi-server/documents/user.md). +require an `authLevel` of atleast 3. For more information, see the [UserDocument](../../schemas/user.md). ***** diff --git a/docs/docs/api/routes/auth.md b/docs/docs/api/routes/auth.md index 915a26c3c..c53b0b778 100644 --- a/docs/docs/api/routes/auth.md +++ b/docs/docs/api/routes/auth.md @@ -91,7 +91,7 @@ POST /api/v1/auth/login | Property | Type | Description | | :: | :: | :: | -| `` | [UserDocument](../../tachi-server/documents/user.md) | The newly-created user's User Document. | +| `` | [UserDocument](../../schemas/user.md) | The newly-created user's User Document. | ### Example diff --git a/docs/docs/api/routes/gpt.md b/docs/docs/api/routes/gpt.md index 11c1b766a..9064deeb8 100644 --- a/docs/docs/api/routes/gpt.md +++ b/docs/docs/api/routes/gpt.md @@ -66,7 +66,7 @@ GET /api/v1/games/iidx/SP | Property | Type | Description | | :: | :: | :: | | `gameStats` | Array<GameStats> | The sorted statistics for the leaderboards. | -| `users` | Array<[UserDocument](../../tachi-server/documents/user.md)> | All of the related users for the above statistics. | +| `users` | Array<[UserDocument](../../schemas/user.md)> | All of the related users for the above statistics. | ### Example @@ -108,8 +108,8 @@ None. | Property | Type | Description | | :: | :: | :: | -| `song` | [SongDocument](../../tachi-server/documents/song.md) |The requested song document. | -| `charts` | [ChartDocument](../../tachi-server/documents/chart.md)[] | All of the charts that belong to this song for this playtype. | +| `song` | [SongDocument](../../schemas/song.md) |The requested song document. | +| `charts` | [ChartDocument](../../schemas/chart.md)[] | All of the charts that belong to this song for this playtype. | ### Example @@ -164,8 +164,8 @@ GET /api/v1/games/iidx/SP/songs/1 | Property | Type | Description | | :: | :: | :: | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md) with `__playcount`> | The chart documents that matched this search, or the most popular 100 charts for this game. | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The associated song documents for the charts. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md) with `__playcount`> | The chart documents that matched this search, or the most popular 100 charts for this game. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The associated song documents for the charts. | !!! info The `__playcount` property is patched onto the chart @@ -221,8 +221,8 @@ None. | Property | Type | Description | | :: | :: | :: | -| `song` | [SongDocument](../../tachi-server/documents/song.md) | The parent song for this chart. | -| `chart` | [ChartDocument](../../tachi-server/documents/chart.md) | The requested chart document. | +| `song` | [SongDocument](../../schemas/song.md) | The parent song for this chart. | +| `chart` | [ChartDocument](../../schemas/chart.md) | The requested chart document. | ### Example @@ -387,8 +387,8 @@ None. | Property | Type | Description | | :: | :: | :: | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The related song documents for this folder. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The related chart documents for this folder. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The related song documents for this folder. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The related chart documents for this folder. | | `folder` | FolderDocument | The folder document at this ID. | ### Example @@ -523,9 +523,9 @@ GET /api/v1/games/bms/7K/tableID/insane | Property | Type | Description | | :: | :: | :: | | `pbs` | Array<PBDocument> | The array of pbs part of the score leaderboard. | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The array of songs part of the PBs. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The array of charts part of the PBs. | -| `users` | Array<[UserDocument](../../tachi-server/documents/user.md)> | The array of users part of the PBs. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The array of songs part of the PBs. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The array of charts part of the PBs. | +| `users` | Array<[UserDocument](../../schemas/user.md)> | The array of users part of the PBs. | ***** @@ -588,7 +588,7 @@ GET /api/v1/games/bms/7K/player-distribution?class=stslDan | Property | Type | Description | | :: | :: | :: | -| `users` | Array<[UserDocument](../../tachi-server/documents/user.md)> | Array of the users who achieved the courses. | +| `users` | Array<[UserDocument](../../schemas/user.md)> | Array of the users who achieved the courses. | | `classes` | Array<ClassAchievementDocument> | Data about the recently achieved classes. | ***** @@ -607,7 +607,7 @@ GET /api/v1/games/bms/7K/player-distribution?class=stslDan | Property | Type | Description | | :: | :: | :: | -| `scores` | Array<[ScoreDocument](../../tachi-server/documents/score.md)> | The highlighted scores. | -| `users` | Array<[UserDocument](../../tachi-server/documents/user.md)> | The users who own the scores. | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The songs the scores are on. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The charts the scores are on. | +| `scores` | Array<[ScoreDocument](../../schemas/score.md)> | The highlighted scores. | +| `users` | Array<[UserDocument](../../schemas/user.md)> | The users who own the scores. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The songs the scores are on. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The charts the scores are on. | diff --git a/docs/docs/api/routes/scores.md b/docs/docs/api/routes/scores.md index 103a311d1..a68bafc88 100644 --- a/docs/docs/api/routes/scores.md +++ b/docs/docs/api/routes/scores.md @@ -20,9 +20,9 @@ | Property | Type | Description | | :: | :: | :: | -| `score` | [ScoreDocument](../../tachi-server/documents/score.md) | The score document with this scoreID. | -| `song` (Conditional) | [SongDocument](../../tachi-server/documents/song.md) | If `getRelated` is set, then this is the song the score belongs to. | -| `chart` (Conditional) | [ChartDocument](../../tachi-server/documents/chart.md) | Same as above, but for the chart document. | +| `score` | [ScoreDocument](../../schemas/score.md) | The score document with this scoreID. | +| `song` (Conditional) | [SongDocument](../../schemas/song.md) | If `getRelated` is set, then this is the song the score belongs to. | +| `chart` (Conditional) | [ChartDocument](../../schemas/chart.md) | Same as above, but for the chart document. | ### Example @@ -77,7 +77,7 @@ GET /api/v1/scores/Re7b00261b1d3ba8e5c9ee4e76e77ea9f07d9493b | Property | Type | Description | | :: | :: | :: | -| `` | [ScoreDocument](../../tachi-server/documents/score.md) | The new score document. +| `` | [ScoreDocument](../../schemas/score.md) | The new score document. ### Example diff --git a/docs/docs/api/routes/search.md b/docs/docs/api/routes/search.md index 5f7262f42..b9e7c8ed4 100644 --- a/docs/docs/api/routes/search.md +++ b/docs/docs/api/routes/search.md @@ -16,8 +16,8 @@ | Property | Type | Description | | :: | :: | :: | -| `users` | Array<[UserDocument](../../tachi-server/documents/user.md)> | The array of users whose usernames look like the search criterion. | -| `songs` | ([SongDocument](../../tachi-server/documents/song.md) With [__textScore](../../tachi-server/implementation-details/search.md) and `game`.)[] | An array of songs from all games, with `__textScore` and `game` properties attached. | +| `users` | Array<[UserDocument](../../schemas/user.md)> | The array of users whose usernames look like the search criterion. | +| `songs` | ([SongDocument](../../schemas/song.md) With [__textScore](../../tachi-server/implementation-details/search.md) and `game`.)[] | An array of songs from all games, with `__textScore` and `game` properties attached. | ### Example diff --git a/docs/docs/api/routes/sessions.md b/docs/docs/api/routes/sessions.md index 4bde6e083..3ec162371 100644 --- a/docs/docs/api/routes/sessions.md +++ b/docs/docs/api/routes/sessions.md @@ -14,11 +14,11 @@ None. | Property | Type | Description | | :: | :: | :: | -| `session` | [SessionDocument](../../tachi-server/documents/session.md) | The session document at this ID. | -| `scores` | Array<[ScoreDocument](../../tachi-server/documents/score.md)> | The score documents involved in this session. | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The songs these score documents belong to. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The charts these score documents belong to. | -| `user` | [UserDocument](../../tachi-server/documents/user.md) | The user that made this session. | +| `session` | [SessionDocument](../../schemas/session.md) | The session document at this ID. | +| `scores` | Array<[ScoreDocument](../../schemas/score.md)> | The score documents involved in this session. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The songs these score documents belong to. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The charts these score documents belong to. | +| `user` | [UserDocument](../../schemas/user.md) | The user that made this session. | ### Example @@ -89,7 +89,7 @@ GET /api/v1/sessions/Qe7b00261b1d3ba8e5c9ee4e76e77ea9f07d9493b | Property | Type | Description | | :: | :: | :: | -| `` | [SessionDocument](../../tachi-server/documents/session.md) | The new session document, after modifications. | +| `` | [SessionDocument](../../schemas/session.md) | The new session document, after modifications. | ### Example diff --git a/docs/docs/api/routes/user-gamept.md b/docs/docs/api/routes/user-gamept.md index 328fe93c6..6c1fc5a1f 100644 --- a/docs/docs/api/routes/user-gamept.md +++ b/docs/docs/api/routes/user-gamept.md @@ -19,8 +19,8 @@ None. | Property | Type | Description | | :: | :: | :: | | `gameStats` | UserGameStatsDocument | The User's GameStats for this game + playtype. | -| `firstScore` | [ScoreDocument](../../tachi-server/documents/score.md) or Null | The user's first score for this game + playtype. This is null if the user has no scores with timestamps. | -| `mostRecentScore` | [ScoreDocument](../../tachi-server/documents/score.md) or Null | The user's most recent score. This is null if the user has no scores with timestamps. | +| `firstScore` | [ScoreDocument](../../schemas/score.md) or Null | The user's first score for this game + playtype. This is null if the user has no scores with timestamps. | +| `mostRecentScore` | [ScoreDocument](../../schemas/score.md) or Null | The user's most recent score. This is null if the user has no scores with timestamps. | | `totalScores` | Integer | The total amount of scores this user has. | | `rankingData` | Record<Rating Algorithm, { ranking: integer, outOf: integer }> | The position of this player on the default leaderboards for this game, and how many players it is out of. | @@ -82,8 +82,8 @@ GET /api/v1/users/zkldi/games/iidx/SP | Property | Type | Description | | :: | :: | :: | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The array of songs this search returned. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The array of charts this search returned. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The array of songs this search returned. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The array of charts this search returned. | | `pbs` | Array<PBDocument> | The array of personal bests this search returned. This is limited to 30 returns. | ### Example @@ -143,8 +143,8 @@ different rating algorithm to sort under. | Property | Type | Description | | :: | :: | :: | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The array of songs this search returned. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The array of charts this search returned. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The array of songs this search returned. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The array of charts this search returned. | | `pbs` | Array<PBDocument> | The array of personal bests this search returned. | ### Example @@ -212,8 +212,8 @@ None. | Property | Type | Description | | :: | :: | :: | | `pbs` | Array<PBDocument> | All of the users PB Documents | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | All of the relevant songs. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | All of the relevant charts. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | All of the relevant songs. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | All of the relevant charts. | ### Example @@ -267,8 +267,8 @@ GET /api/v1/users/zkldi/games/iidx/SP/pbs/all | Property | Type | Description | | :: | :: | :: | | `pb` | PBDocument | The user's PB for this chart. | -| `chart` | [ChartDocument](../../tachi-server/documents/chart.md) | The chart this PB is on. | -| `scores` (Conditional) | Array<[ScoreDocument](../../tachi-server/documents/score.md)> | If `getComposition` is present, then this field contains the array of score documents that composed this PB. | +| `chart` | [ChartDocument](../../schemas/chart.md) | The chart this PB is on. | +| `scores` (Conditional) | Array<[ScoreDocument](../../schemas/score.md)> | If `getComposition` is present, then this field contains the array of score documents that composed this PB. | ### Example @@ -309,9 +309,9 @@ GET /api/v1/users/1/games/iidx/SP/pbs/some_chart_id | Property | Type | Description | | :: | :: | :: | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md) with __textScore> | The array of songs this search returned. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The array of charts this search returned. | -| `scores` | Array<[ScoreDocument](../../tachi-server/documents/score.md)> | The array of scores this search returned. This is limited to 30 returns. | +| `songs` | Array<[SongDocument](../../schemas/song.md) with __textScore> | The array of songs this search returned. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The array of charts this search returned. | +| `scores` | Array<[ScoreDocument](../../schemas/score.md)> | The array of scores this search returned. This is limited to 30 returns. | !!! info All `songs` returned also have the `__textScore` @@ -369,9 +369,9 @@ None. | Property | Type | Description | | :: | :: | :: | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The array of songs this search returned. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The array of charts this search returned. | -| `scores` | Array<[ScoreDocument](../../tachi-server/documents/score.md)> | The array of scores this search returned. This is limited to 30 returns. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The array of songs this search returned. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The array of charts this search returned. | +| `scores` | Array<[ScoreDocument](../../schemas/score.md)> | The array of scores this search returned. This is limited to 30 returns. | ### Example @@ -428,7 +428,7 @@ song titles of played songs inside sessions. | Property | Type | Description | | :: | :: | :: | -| `` | Array<[SessionDocument](../../tachi-server/documents/session.md)> | The array of sessions that matched this query. | +| `` | Array<[SessionDocument](../../schemas/session.md)> | The array of sessions that matched this query. | ### Example @@ -471,7 +471,7 @@ These are returned in descending order. | Property | Type | Description | | :: | :: | :: | -| `` | Array<[SessionDocument](../../tachi-server/documents/session.md)> | The array of the users best sessions. | +| `` | Array<[SessionDocument](../../schemas/session.md)> | The array of the users best sessions. | ### Example @@ -525,7 +525,7 @@ None. | Property | Type | Description | | :: | :: | :: | -| `` | Array<[SessionDocument](../../tachi-server/documents/session.md)> | The array of the users sessions. | +| `` | Array<[SessionDocument](../../schemas/session.md)> | The array of the users sessions. | ***** @@ -545,7 +545,7 @@ None. | Property | Type | Description | | :: | :: | :: | -| `` | [SessionDocument](../../tachi-server/documents/session.md) | The user's most recent session. | +| `` | [SessionDocument](../../schemas/session.md) | The user's most recent session. | ### Example @@ -581,7 +581,7 @@ None. | Property | Type | Description | | :: | :: | :: | -| `` | Array<[SessionDocument](../../tachi-server/documents/session.md)> | The array of the users highlighted sessions. | +| `` | Array<[SessionDocument](../../schemas/session.md)> | The array of the users highlighted sessions. | ### Example @@ -622,8 +622,8 @@ None. | Property | Type | Description | | :: | :: | :: | -| `songs` | Array<[SongDocument](../../tachi-server/documents/song.md)> | The array of songs related to the pbs. | -| `charts` | Array<[ChartDocument](../../tachi-server/documents/chart.md)> | The array of charts related to the pbs. | +| `songs` | Array<[SongDocument](../../schemas/song.md)> | The array of songs related to the pbs. | +| `charts` | Array<[ChartDocument](../../schemas/chart.md)> | The array of charts related to the pbs. | | `pbs` | Array<(PBDocument & {__playcount: integer})> | An array of PB documents with the `__playcount` property attached. This property dictates how many times the user has played this chart. | ### Example @@ -692,7 +692,7 @@ GET /api/v1/users/zkldi/games/iidx/SP/most-played | :: | :: | :: | | `above` | Array<UserGameStats> | Up to 5 users' game stats better than this user. | | `below` | Array<UserGameStats> | Same as above, but below the user. | -| `users` | Array<[UserDocument](../../tachi-server/documents/user.md)> | The user documents related to the above statistics. | +| `users` | Array<[UserDocument](../../schemas/user.md)> | The user documents related to the above statistics. | | `thisUsersStats` | UserGameStats | The requested user's stats for this GPT. | | `thisUsersRanking` | {outOf: integer, ranking: integer} | The requested user's ranking for this GPT. | diff --git a/docs/docs/api/routes/users.md b/docs/docs/api/routes/users.md index d5e09e694..b7dfcf5ff 100644 --- a/docs/docs/api/routes/users.md +++ b/docs/docs/api/routes/users.md @@ -19,7 +19,7 @@ These endpoints are related to users in general. | Property | Type | Description | | :: | :: | :: | -| `` | Array<[UserDocument](../../tachi-server/documents/user.md)> | The array of up to 100 users returned. | +| `` | Array<[UserDocument](../../schemas/user.md)> | The array of up to 100 users returned. | !!! note Users are guaranteeably returned in order of when they were `lastSeen`. @@ -66,7 +66,7 @@ None. | Property | Type | Description | | :: | :: | :: | -| `` | [UserDocument](../../tachi-server/documents/user.md) | The user this ID/username corresponds to. | +| `` | [UserDocument](../../schemas/user.md) | The user this ID/username corresponds to. | ### Example @@ -119,7 +119,7 @@ GET /api/v1/users/me IF authenticated as userID 1. | Property | Type | Description | | :: | :: | :: | -| `` | [UserDocument](../../tachi-server/documents/user.md) | The user document with all of those changes applied. | +| `` | [UserDocument](../../schemas/user.md) | The user document with all of those changes applied. | ### Example diff --git a/docs/docs/contributing/components.md b/docs/docs/contributing/components.md index 1a719b233..a1c1d0a6a 100644 --- a/docs/docs/contributing/components.md +++ b/docs/docs/contributing/components.md @@ -37,7 +37,7 @@ Writing, maintaining and proofreading the documentation is something that is **s at the moment. Simple things like typo fixes, all the way up to writing new explanations about major features are **thoroughly** appreciated, as `zkldi` prioritises maintaining the core of working code. -If you're interested in this, check out the [Documentation Contribution Guide](./docs.md). +If you're interested in this, check out the [Documentation Contribution Guide](./components/documentation.md). It'll teach you `shell` and `git` basics, setting up a programming environment for Tachi, @@ -64,7 +64,7 @@ our GitHub repository! That means you can: Or in general, if you just want to contribute and don't know what to -- **this is the MOST in need of help. Always.** -Want to get started on contributing to the Database? Check out our [Database Contribution Guide](./database.md). +Want to get started on contributing to the Database? Check out our [Database Contribution Guide](./components/seeds.md). It'll teach you `shell` and `git` basics, setting up a programming environment for Tachi, @@ -85,7 +85,7 @@ The client tries to then place a slick UI over that logic and its exposed API. That said, we still have a thorough guide -- It's not *from 0*, but it is *from some programming knowledge*. -Want to get started on contributing to the Core? Check out our [Core Contribution Guide](./core.md). +Want to get started on contributing to the Core? Check out our [Core Contribution Guide](./components/core.md). We'll cover... diff --git a/docs/docs/contributing/setup.md b/docs/docs/contributing/setup.md index 30c619ada..9ec29551b 100644 --- a/docs/docs/contributing/setup.md +++ b/docs/docs/contributing/setup.md @@ -71,7 +71,7 @@ Anyway, with a terminal open you can proceed to the next steps! ### Understanding the Terminal -If you're completely unfamiliar with the terminal, check out our [Terminal Guide](../tools/terminal.md). We'll be assuming you know terminal basics in the below instructions. +If you're completely unfamiliar with the terminal, check out our [Terminal Guide](./tools/terminal.md). We'll be assuming you know terminal basics in the below instructions. ## 1. Getting Node, PNPM and Docker. diff --git a/docs/docs/schemas/chart.md b/docs/docs/schemas/chart.md index 726020bd9..1c58745d8 100644 --- a/docs/docs/schemas/chart.md +++ b/docs/docs/schemas/chart.md @@ -30,7 +30,7 @@ interface ChartDocument { | `songID` | The corresponding parent [Song Document](./song.md)'s ID. | | `level` | A string representing the level for this chart. This is a string because games use identifiers like '12+'. | | `levelNum` | A number representing the level for this chart. This may be a decimal. | -| `isPrimary` | Whether this chart is primary or not. For more information on this, see [isPrimary](../implementation-details/songs-charts.md#isPrimary) +| `isPrimary` | Whether this chart is primary or not. For more information on this, see [isPrimary](../tachi-server/implementation-details/songs-charts.md#isPrimary) `difficulty` | A string representing what difficulty this chart is for. The valid values for this field depend on the GPT. | | `playtype` | What playtype this chart is for. | | `data` | Additional GPT Specific data about this chart, such as inGameIDs or SHA hashes. | diff --git a/docs/docs/schemas/goal-sub.md b/docs/docs/schemas/goal-sub.md index 9c3e8d168..fd03858d7 100644 --- a/docs/docs/schemas/goal-sub.md +++ b/docs/docs/schemas/goal-sub.md @@ -50,4 +50,4 @@ type GoalSubscriptionDocument = MongoDBDocument & { | `progress` | The user's raw progress towards this goal. This is a number, and should not be displayed to the user. | | `outOf` | The value this goal is out of - this is a number, and should not be displayed to the user. | | `progressHuman`, `outOfHuman` | These are humanised, stringified versions of the above two fields. These convert things like the enum value of lamps to their string equivalents. | -| `wasInstantlyAchieved` | Whether this goal was instantly achieved or not. Instantly achieved goals are excluded from some parts of the UI, and from being emitted as webhook events. [Read more here](../implementation-details/goals-milestones.md). | +| `wasInstantlyAchieved` | Whether this goal was instantly achieved or not. Instantly achieved goals are excluded from some parts of the UI, and from being emitted as webhook events. [Read more here](../tachi-server/implementation-details/goals-milestones.md). | diff --git a/docs/docs/schemas/index.md b/docs/docs/schemas/index.md index 759cf8cf8..3008b9743 100644 --- a/docs/docs/schemas/index.md +++ b/docs/docs/schemas/index.md @@ -1,7 +1,37 @@ # Documents -This section of the docs covers the various documents used in Tachi, such as song documents and score documents. +Tachi's database has specific documents for specific +things. This part of the documentation covers the +shape of those documents. + +!!! note + Quite often, the API exposes these documents as-is, + without running a projection step on the fields. + + This means that the API documentation will + involve frequent links to this part of the + codebase documentation. !!! help - This page isn't entirely finalised. You might have to check the [Tachi Common Source Code](https://github.com/TNG-dev/Tachi/tree/develop/common) for certain documents. + This section is a bit sparse, as I don't have the + time to populate it all. If you want to contribute + to this, please see [Documentation Contributing](../contributing/components/documentation.md). + If you need information on a document that is not specified here, + You will have to check [Tachi's source code](https://github.com/TNG-dev/Tachi/tree/develop/common) manually. + Sorry! + +***** + +## Definition + +This part of the documentation will define the shape of the +document, and explain fields where necessary. + +Depending on whats easiest, this may just be a raw +TypeScript interface definition, or it may be a table. + +## Example + +This part of the documentation will show an example document, +with some explainations if necessary. diff --git a/docs/docs/schemas/overview.md b/docs/docs/schemas/overview.md deleted file mode 100644 index 16c413693..000000000 --- a/docs/docs/schemas/overview.md +++ /dev/null @@ -1,37 +0,0 @@ -# Documents - -Tachi's database has specific documents for specific -things. This part of the documentation covers the -shape of those documents. - -!!! note - Quite often, the API exposes these documents as-is, - without running a projection step on the fields. - - This means that the API documentation will - involve frequent links to this part of the - codebase documentation. - -!!! help - This section is a bit sparse, as I don't have the - time to populate it all. If you want to contribute - to this, please see [Contributing](../contributing.md). - - If you need information on a document that is not specified here, - You will have to check [tachi-common](https://github.com/TNG-dev/Tachi/tree/staging/common) manually. - Sorry! - -***** - -## Definition - -This part of the documentation will define the shape of the -document, and explain fields where necessary. - -Depending on whats easiest, this may just be a raw -TypeScript interface definition, or it may be a table. - -## Example - -This part of the documentation will show an example document, -with some explainations if necessary. diff --git a/docs/docs/schemas/score.md b/docs/docs/schemas/score.md index dcd1cd528..71c41463b 100644 --- a/docs/docs/schemas/score.md +++ b/docs/docs/schemas/score.md @@ -55,17 +55,17 @@ The base score document is structured as follows: | Property | Description | | :: | :: | | `game` | This is the game this score is for. | -| `service` | This is a humanised string for representing the place this score came from. This is primarily used by [Batch-Manual](../batch-manual/overview.md) formats to declare where the scores are coming from. | +| `service` | This is a humanised string for representing the place this score came from. This is primarily used by [Batch-Manual](../tachi-server/batch-manual/overview.md) formats to declare where the scores are coming from. | | `userID` | The user that got this score. | | `timeAchieved` | This is the time this score was actually achieved. This is **NOT** the time this score was inserted into the database. If this is not known, it can be set to null. | | `timeAdded` | This is the time the score was added to the Tachi database. This is **NOT** the time the score was achieved by the player. | -| `songID` | The song this score is on. Even though this can be derived from `chartID`, it's kept next to the score for certain query optimisations. You can read on the difference between charts and songs [here](../implementation-details/songs-charts.md). | +| `songID` | The song this score is on. Even though this can be derived from `chartID`, it's kept next to the score for certain query optimisations. You can read on the difference between charts and songs [here](../tachi-server/implementation-details/songs-charts.md). | | `chartID` | The chart this score was achieved on. | -| `isPrimary` | Whether this score is was achieved on a "primary" chart or not. You can read more on what a primary chart is [here](../implementation-details/songs-charts.md#isPrimary). | +| `isPrimary` | Whether this score is was achieved on a "primary" chart or not. You can read more on what a primary chart is [here](../tachi-server/implementation-details/songs-charts.md#isPrimary). | | `highlight` | Whether this individual score was highlighted or not by the user. This is one of the few mutable fields on the score document. | | `comment` | A comment left by the user on this score. If one is not present, it is left as `null`. Comments are capped at 240 characters. | -| `scoreID` | A unique identifier for this score. Score IDs are prefixed with `R`. This identifier is derived from the content of the score, and thus can be used to dedupe scores. See [Score IDs](../implementation-details/score-id.md). | -| `importType` | The import type used to import this score. For more on this, see [Import Types](../import/import-types.md) | +| `scoreID` | A unique identifier for this score. Score IDs are prefixed with `R`. This identifier is derived from the content of the score, and thus can be used to dedupe scores. See [Score IDs](../tachi-server/implementation-details/score-id.md). | +| `importType` | The import type used to import this score. For more on this, see [Import Types](../tachi-server/import/import-types.md) | Now, absolutely none of the above fields contain information about the actual *score* the user got, @@ -82,11 +82,11 @@ sub-document. | Property | Description | | :: | :: | | `score` | A number describing the "score" the user got. Depending on the game, this may be bounded between various numbers. | -| `lamp` | The lamp the user got. For more information on what a lamp is, see [What are Lamps?](../../user/lamps.md) +| `lamp` | The lamp the user got. For more information on what a lamp is, see [What are Lamps?](../user/lamps.md) | `percent` | The 'percent' the user got. That is, their score scaled to the total amount of score they could have possibly got. There are some oddities with this field.[^1]. | | `grade` | The grade the user got. For most games, this is a set of discrete cutoffs for the score's `percent`.[^2] | | `lampIndex`, `gradeIndex` | While `lamp` and `grade` are both strings, these are the raw enum values for those fields. This can be used for filters (select scores where lampIndex > lamps.HARD_CLEAR), or other query methods. | -| `esd` | Some games support ESD. This field contains the ESD for that score. For more information on what ESD is, see [What is ESD?](../../user/stats/esd.md) +| `esd` | Some games support ESD. This field contains the ESD for that score. For more information on what ESD is, see [What is ESD?](../user/stats/esd.md) | `judgements` | A record of Judgement->Integer values. The keys for this property depend on the game the score is for. | | `hitMeta` | 'Meta' information about the user's *hits*. That is, things that aren't *literally* about the score, but are related to how the user played. This contains properties such as `maxCombo` and `fast` and `slow` counts. All the fields here are optional and nullable. Some games extend this to provide things like `gauge`. | @@ -169,9 +169,9 @@ For all games, the following changes are applied: | Property | Change | | :: | :: | -| `scoreData.lamp` | This field is restricted to only Lamps for that game. For more information, see [Game Enums](../implementation-details/game-configuration.md). | -| `scoreData.grade` | This field is restricted to only Grades for that game. For more information, see [Game Enums](../implementation-details/game-configuration.md). | -| `scoreData.judgements` | The keys of this field are set to only valid Judgements for that game. For more information, see [Game Judgements](../implementation-details/game-configuration.md). +| `scoreData.lamp` | This field is restricted to only Lamps for that game. For more information, see [Game Enums](../tachi-server/implementation-details/game-configuration.md). | +| `scoreData.grade` | This field is restricted to only Grades for that game. For more information, see [Game Enums](../tachi-server/implementation-details/game-configuration.md). | +| `scoreData.judgements` | The keys of this field are set to only valid Judgements for that game. For more information, see [Game Judgements](../tachi-server/implementation-details/game-configuration.md). !!! info All games implicitly have `fast`, `slow` and `maxCombo` diff --git a/docs/docs/schemas/session.md b/docs/docs/schemas/session.md index cbc673b46..1e31f3abb 100644 --- a/docs/docs/schemas/session.md +++ b/docs/docs/schemas/session.md @@ -32,11 +32,11 @@ interface SessionDocument { | `desc` | A Description for this session. Session descriptions default to null. | | `game` | The game this session was for. | | `playtype` | The playtype this session was for. | -| `importType` | The [Import Type](../import/import-types.md) that produced this session. Sessions converted from Kamaitachi 1 are given an importType of null. | +| `importType` | The [Import Type](../tachi-server/import/import-types.md) that produced this session. Sessions converted from Kamaitachi 1 are given an importType of null. | | `timeInserted` | The time this session was inserted into the database. This is **NOT** when the session started. | | `timeStarted` | The time the session started. | | `timeEnded` | The time the session ended. Note that if this is less than 2 hours ago, the session may still be extended by future scores. | -| `calculatedData` | Calculated Statistics about this session. The keys in this object depend on the game and playtype. For more information, see [Statistics](../../user/stats/tachi.md). +| `calculatedData` | Calculated Statistics about this session. The keys in this object depend on the game and playtype. For more information, see [Statistics](../user/stats/tachi.md). | `highlight` | Whether this session was highlighted or not by the user. | | `views` | How many people have viewed this session. | diff --git a/docs/docs/schemas/song.md b/docs/docs/schemas/song.md index 7afe07a3c..bd325011e 100644 --- a/docs/docs/schemas/song.md +++ b/docs/docs/schemas/song.md @@ -64,16 +64,6 @@ type maimaiSongData = { titleJP: string; artistJP: string; displayVersion: strin | `artistJP` | The artist for this song when the game is in Japanese locale. | | `displayVersion` | The version of the game that this song was released in. | -### Jubeat - -```ts -type jubeatSongData = { displayVersion: string }; -``` - -| Property | Description | -| :: | :: | -| `displayVersion` | The version of the game that this song was released in. | - ### SDVX ```ts diff --git a/docs/docs/schemas/user.md b/docs/docs/schemas/user.md index ff5efa18a..1755c60ad 100644 --- a/docs/docs/schemas/user.md +++ b/docs/docs/schemas/user.md @@ -7,25 +7,25 @@ ## Definition ```ts -interface Public[UserDocument](../../tachi-server/documents/user.md){ +interface PublicUserDocument { username: string; usernameLowercase: string; id: integer; socialMedia: { - discord?: String | null; - twitter?: String | null; - github?: String | null; - steam?: String | null; - youtube?: String | null; - twitch?: String | null; + discord?: string | null; + twitter?: string | null; + github?: string | null; + steam?: string | null; + youtube?: string | null; + twitch?: string | null; }; joinDate: integer; lastSeen: integer; about: string; - status: String | null; + status: string | null; customPfp: boolean; customBanner: boolean; - clan: String | null; // Clans are not implemented yet, so this field is null for everyone. + clan: string | null; // Clans are not implemented yet, so this field is null for everyone. badges: UserBadges[]; authLevel: UserAuthLevels; } diff --git a/docs/docs/tachi-server/batch-manual/overview.md b/docs/docs/tachi-server/batch-manual/overview.md index 058d05f9f..026787f1d 100644 --- a/docs/docs/tachi-server/batch-manual/overview.md +++ b/docs/docs/tachi-server/batch-manual/overview.md @@ -78,8 +78,8 @@ The properties are described as this: | `timeAchieved` (Optional) | integer \| null | This is *when* the score was achieved in unix milliseconds. This should be provided if possible, as Tachi uses it for a LOT of features. | | `comment` (Optional) | string \| null | A comment from the user about this score. | | `judgements` (Optional) | Record<Game Judgement, integer> | This should be a record of the judgements for your game + playtype, and the integer indicating how often they occured. | -| `hitMeta` (Optional) | See [Game Specific Hit Meta](../documents/score.md#game-specific) | This can be a partial record of various `hitMeta` props for this game. | -| `scoreMeta` (Optional) | See [Game Specific Score Meta](../documents/score.md#game-specific) | This can be a partial record of various `scoreMeta` props for this game. | +| `hitMeta` (Optional) | See [Game Specific Hit Meta](../../schemas/score.md#game-specific) | This can be a partial record of various `hitMeta` props for this game. | +| `scoreMeta` (Optional) | See [Game Specific Score Meta](../../schemas/score.md#game-specific) | This can be a partial record of various `scoreMeta` props for this game. | !!! warning `identifier` should always be a string. Even if it's something like a numeric ID! Tachi will handle this. diff --git a/docs/docs/tachi-server/implementation-details/game-configuration.md b/docs/docs/tachi-server/implementation-details/game-configuration.md index 24e798565..1a85f916b 100644 --- a/docs/docs/tachi-server/implementation-details/game-configuration.md +++ b/docs/docs/tachi-server/implementation-details/game-configuration.md @@ -15,8 +15,8 @@ lamps for the game. It would be really appreciated if someone formatted the configurations for every game! For the time being, the below documentation is just the raw configuration - for each game. Please see [Contributing to Tachi](../contributing.md). + for each game. Please see [Contributing to Tachi](../../contributing/overview.md). ***** -This documentation is unfinished. It is probably easier for you to [just read the config.ts file](https://github.com/TNG-dev/Tachi/tree/staging/common/src/config/config.ts) \ No newline at end of file +This documentation is unfinished. It is probably easier for you to [just read the config.ts file](https://github.com/TNG-dev/Tachi/tree/staging/common/src/config/config.ts) diff --git a/docs/docs/tachi-server/implementation-details/goal-id.md b/docs/docs/tachi-server/implementation-details/goal-id.md index ac578acac..7a7bc4435 100644 --- a/docs/docs/tachi-server/implementation-details/goal-id.md +++ b/docs/docs/tachi-server/implementation-details/goal-id.md @@ -3,7 +3,7 @@ Goal IDs exist to dedupe goals when a user creates a new goal. For example, if a user wants to create a HARD CLEAR Mei goal, but one already exists, we should -not insert two [Goal Documents](../documents/goal.md) +not insert two [Goal Documents](../../schemas/goal.md) representing the same thing. ***** diff --git a/docs/docs/tachi-server/implementation-details/goals-milestones.md b/docs/docs/tachi-server/implementation-details/goals-milestones.md index 4e5848d67..819a3b3ad 100644 --- a/docs/docs/tachi-server/implementation-details/goals-milestones.md +++ b/docs/docs/tachi-server/implementation-details/goals-milestones.md @@ -30,7 +30,7 @@ If they create a goal that does not already exist, it is created, and they are s Users may unsubscribe from goals that they no longer care about getting pinged for. -Subscriptions to goals are stored in a [GoalSubscriptionDocument](../documents/goal-sub.md). +Subscriptions to goals are stored in a [GoalSubscriptionDocument](../../schemas/goal-sub.md). This document is uniquely identified by the joining of the `goalID` with the `userID`. ### Instant Direct Achievements diff --git a/docs/docs/tachi-server/import/main.md b/docs/docs/tachi-server/import/main.md index afa2284a3..961ff9d64 100644 --- a/docs/docs/tachi-server/import/main.md +++ b/docs/docs/tachi-server/import/main.md @@ -11,7 +11,7 @@ This function can be found at `src/lib/score-import/framework/score-import-main. | Argument | Type | Description | | :: | :: | :: | -| `user` | [UserDocument](../../tachi-server/documents/user.md) | The user that is making this import request. | +| `user` | [UserDocument](../../schemas/user.md) | The user that is making this import request. | | `userIntent` | boolean | Whether this import was performed with User Intent - See [Import Types](./import-types.md#user-intent) | | `importType` | ImportType | What kind of import "type" this is. For more on this, see [Import Types](./import-types.md) | `InputParser` | Function | The parser function to call. For more info, see [Parsing and Converting](./parse-conv.md) diff --git a/docs/docs/tachi-server/infrastructure/database-seeds.md b/docs/docs/tachi-server/infrastructure/database-seeds.md index 18b721858..0f9d5d097 100644 --- a/docs/docs/tachi-server/infrastructure/database-seeds.md +++ b/docs/docs/tachi-server/infrastructure/database-seeds.md @@ -6,7 +6,7 @@ The databases in question aren't (normally) altered by the server code. We essen ## What's in the seeds? -The seeds contain all the [SongDocument](../documents/song.md)s and [ChartDocument](../documents/chart.md)s for all of the games supported by Tachi. +The seeds contain all the [SongDocument](../../schemas/song.md)s and [ChartDocument](../../schemas/chart.md)s for all of the games supported by Tachi. They also include all Folder Documents, Table Documents and BMS Course Documents. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index c5689bd25..8371bc606 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -53,7 +53,7 @@ nav: # - "user/stats/esd.md" - Documents: - - "schemas/overview.md" + - "schemas/index.md" - "schemas/user.md" - "schemas/session.md" - "schemas/score.md" @@ -96,10 +96,8 @@ nav: - Tachi Server Reference: - "tachi-server/overview.md" - - "tachi-server/contributing.md" - Setup: - - "tachi-server/setup/setup.md" - "tachi-server/setup/config.md" - Infrastructure: