Skip to content

Commit d832dea

Browse files
authored
Merge pull request #70 from takker99:user
fix(api): Adjust `UserInfo` definition
2 parents 1b2b933 + d2012be commit d832dea

File tree

1 file changed

+96
-3
lines changed

1 file changed

+96
-3
lines changed

api/pages/project/title.ts

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,112 @@ export interface UserInfo extends User {
2626
/** user e-mail */
2727
email: string;
2828

29-
/** whether the user is a pro user or not */
30-
pro: boolean;
31-
3229
/** login provider */
3330
provider: "google" | "microsoft" | "email";
3431

32+
/** The settings for [Page list filter](https://scrapbox.io/shokai/Page_list_filter) */
33+
pageFilters: PageFilter[];
34+
35+
/** The setting for [Translation mode (beta)](https://scrapbox.io/help-jp/Translation_mode_(beta)) */
36+
translation: TranslationSetting;
37+
3538
/** creation time of the account */
3639
created: UnixTime;
3740

3841
/** update time of the account */
3942
updated: UnixTime;
4043
}
4144

45+
/** Setting for [Page list filter](https://scrapbox.io/shokai/Page_list_filter) */
46+
export interface PageFilter {
47+
/** filter type */
48+
type: string;
49+
50+
/** icon name to filter */
51+
value: string;
52+
}
53+
54+
/** Setting for [Translation mode (beta)](https://scrapbox.io/help-jp/Translation_mode_(beta)) */
55+
export interface TranslationSetting {
56+
/** User native language */
57+
nativeLanguage: string;
58+
59+
/** The language that the user wants to translate any language into */
60+
to: string;
61+
}
62+
63+
/**
64+
* Available languages you can use in [Translation mode (beta)](https://scrapbox.io/help-jp/Translation_mode_(beta))
65+
*
66+
* | language | value |
67+
* | ---------------------- | ------- |
68+
* | Arabic | `AR` |
69+
* | Bulgarian | `BG` |
70+
* | Czech | `CS` |
71+
* | Danish | `DA` |
72+
* | German | `DE` |
73+
* | Greek | `EL` |
74+
* | English (British) | `EN-GB` |
75+
* | English (American) | `EN-US` |
76+
* | Spanish | `ES` |
77+
* | Estonian | `ET` |
78+
* | Finnish | `FI` |
79+
* | French | `FR` |
80+
* | Hungarian | `HU` |
81+
* | Indonesian | `ID` |
82+
* | Italian | `IT` |
83+
* | Japanese | `JA` |
84+
* | Korean | `KO` |
85+
* | Lithuanian | `LT` |
86+
* | Latvian | `LV` |
87+
* | Norwegian | `NB` |
88+
* | Dutch | `NL` |
89+
* | Polish | `PL` |
90+
* | Portuguese (Brazilian) | `PT-BR` |
91+
* | Portuguese (European) | `PT-PT` |
92+
* | Romanian | `RO` |
93+
* | Russian | `RU` |
94+
* | Slovak | `SK` |
95+
* | Slovenian | `SL` |
96+
* | Swedish | `SV` |
97+
* | Turkish | `TR` |
98+
* | Ukrainian | `UK` |
99+
* | Chinese (simplified) | `ZH` |
100+
*/
101+
export type TranslationLanguage =
102+
| "AR"
103+
| "BG"
104+
| "CS"
105+
| "DA"
106+
| "DE"
107+
| "EL"
108+
| "EN-GB"
109+
| "EN-US"
110+
| "ES"
111+
| "ET"
112+
| "FI"
113+
| "FR"
114+
| "HU"
115+
| "ID"
116+
| "IT"
117+
| "JA"
118+
| "KO"
119+
| "LT"
120+
| "LV"
121+
| "NB"
122+
| "NL"
123+
| "PL"
124+
| "PT-BR"
125+
| "PT-PT"
126+
| "RO"
127+
| "RU"
128+
| "SK"
129+
| "SL"
130+
| "SV"
131+
| "TR"
132+
| "UK"
133+
| "ZH";
134+
42135
/** page information */
43136
export interface Page extends BasePage {
44137
/** APIを叩いたuserの最終アクセス日時。

0 commit comments

Comments
 (0)