Skip to content

Commit

Permalink
feat(api): add page filter and translation settings to UserInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
takker99 committed Feb 9, 2025
1 parent 8b5d162 commit d2012be
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions api/pages/project/title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,109 @@ export interface UserInfo extends User {
/** login provider */
provider: "google" | "microsoft" | "email";

/** The settings for [Page list filter](https://scrapbox.io/shokai/Page_list_filter) */
pageFilters: PageFilter[];

/** The setting for [Translation mode (beta)](https://scrapbox.io/help-jp/Translation_mode_(beta)) */
translation: TranslationSetting;

/** creation time of the account */
created: UnixTime;

/** update time of the account */
updated: UnixTime;
}

/** Setting for [Page list filter](https://scrapbox.io/shokai/Page_list_filter) */
export interface PageFilter {
/** filter type */
type: string;

/** icon name to filter */
value: string;
}

/** Setting for [Translation mode (beta)](https://scrapbox.io/help-jp/Translation_mode_(beta)) */
export interface TranslationSetting {
/** User native language */
nativeLanguage: string;

/** The language that the user wants to translate any language into */
to: string;
}

/**
* Available languages you can use in [Translation mode (beta)](https://scrapbox.io/help-jp/Translation_mode_(beta))
*
* | language | value |
* | ---------------------- | ------- |
* | Arabic | `AR` |
* | Bulgarian | `BG` |
* | Czech | `CS` |
* | Danish | `DA` |
* | German | `DE` |
* | Greek | `EL` |
* | English (British) | `EN-GB` |
* | English (American) | `EN-US` |
* | Spanish | `ES` |
* | Estonian | `ET` |
* | Finnish | `FI` |
* | French | `FR` |
* | Hungarian | `HU` |
* | Indonesian | `ID` |
* | Italian | `IT` |
* | Japanese | `JA` |
* | Korean | `KO` |
* | Lithuanian | `LT` |
* | Latvian | `LV` |
* | Norwegian | `NB` |
* | Dutch | `NL` |
* | Polish | `PL` |
* | Portuguese (Brazilian) | `PT-BR` |
* | Portuguese (European) | `PT-PT` |
* | Romanian | `RO` |
* | Russian | `RU` |
* | Slovak | `SK` |
* | Slovenian | `SL` |
* | Swedish | `SV` |
* | Turkish | `TR` |
* | Ukrainian | `UK` |
* | Chinese (simplified) | `ZH` |
*/
export type TranslationLanguage =
| "AR"
| "BG"
| "CS"
| "DA"
| "DE"
| "EL"
| "EN-GB"
| "EN-US"
| "ES"
| "ET"
| "FI"
| "FR"
| "HU"
| "ID"
| "IT"
| "JA"
| "KO"
| "LT"
| "LV"
| "NB"
| "NL"
| "PL"
| "PT-BR"
| "PT-PT"
| "RO"
| "RU"
| "SK"
| "SL"
| "SV"
| "TR"
| "UK"
| "ZH";

/** page information */
export interface Page extends BasePage {
/** APIを叩いたuserの最終アクセス日時。
Expand Down

0 comments on commit d2012be

Please sign in to comment.