@lichess-org/types 2.0.127 → 2.0.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lichess-api.d.ts +88 -0
  2. package/package.json +1 -1
package/lichess-api.d.ts CHANGED
@@ -1439,6 +1439,27 @@ export interface paths {
1439
1439
  patch?: never;
1440
1440
  trace?: never;
1441
1441
  };
1442
+ "/api/study": {
1443
+ parameters: {
1444
+ query?: never;
1445
+ header?: never;
1446
+ path?: never;
1447
+ cookie?: never;
1448
+ };
1449
+ get?: never;
1450
+ put?: never;
1451
+ /**
1452
+ * Create a new Study
1453
+ * @description Create a [study](https://lichess.org/study), and a new empty chapter within it.
1454
+ * You can make up to 30 new studies per day.
1455
+ */
1456
+ post: operations["apiStudyPost"];
1457
+ delete?: never;
1458
+ options?: never;
1459
+ head?: never;
1460
+ patch?: never;
1461
+ trace?: never;
1462
+ };
1442
1463
  "/api/study/{studyId}/import-pgn": {
1443
1464
  parameters: {
1444
1465
  query?: never;
@@ -5852,6 +5873,13 @@ export interface components {
5852
5873
  * 1. e4 c5 2. Nf3 { Simple developing move to control the d4 square } { [%csl Gd4,Gc5][%cal Gf3d4,Gc5d4] } 2... d6 { [%cal Gd6e5] } (2... e6 3. d4 cxd4 4. Nxd4 Nf6 5. e5 (5. Nc3 { [%cal Ge4e5] }) 5... Qa5+) 3. d4 { Whites want the exchange of pawns } { [%cal Gc5d4] } 3... cxd4 { [%cal Gf3d4] } 4. Nxd4 { Whites are now ahead in development but blacks still have the two central pawns whereas whites only one. } { [%csl Ge7,Gd6,Ge4] } 4... Nf6 { Blacks are now developing their knight and threatening the e4 pawn } { [%csl Ge4][%cal Gf6e4] } 5. Nc3 { The e4 pawn is now protected by the c3 knight } { [%csl Ge4,Bc3][%cal Rf6e4,Bc3e4] } 5... g6 { This is the DRAGON VARIATION. g6 allows the dark-squared bishop to develop and move to g7, controlling the long dark-squared diagonal } { [%csl Gd4] } 6. Be3 { [%cal Gd1d2,Gf2f3,Ge1c1,Gg2g4,Gh2h4,Gg4g5] } (6. Be2 Bg7 7. O-O Nc6 8. Be3 { [%cal Ge3d4] } (8. f3 Nxe4 { [%cal Gg7d4,Gc6d4] } 9. Nxc6 Qb6+ { [%cal Gb6c6,Gb6g1] } 10. Kh1 Nxc3 { [%cal Gc3d1,Gc3e2] } 11. bxc3 bxc6 { [%cal Gc8a6] }) 8... O-O 9. Nb3 a6 { [%cal Gb7b5,Gb5b4,Ge2c4] }) 6... Bg7 (6... Ng4 { [%cal Gg4e3] } 7. Bb5+ { [%cal Gb5e8,Gb8d7,Gc8d7,Gd1g4] } 7... Nc6 8. Nxc6 bxc6 9. Bxc6+ { [%cal Gc6a8] }) 7. f3 { The key opening moves for White, who attempt to castle queenside , whereas f3 strengthens the pawn structure, connecting e4 to the h2 and g2, while White also plan pushing to g4 and possibly h4. } { [%csl Bf3,Be3][%cal Rg2g4,Rh2h4,Rg4g5] } 7... O-O (7... h5 { Is operating against g4. }) 8. Qd2 { [%csl Gh6,Gg7][%cal Ge1c1,Ga1d1,Re3h6,Rd2h6] } 8... Nc6 { [%csl Gc6,Gh6][%cal Gb8c6,Ge1c1,Ga7a6,Ge3h6] } 9. g4 (9. Bh6 { [%cal Ge3d4] } 9... Bxh6 10. Qxh6 Nxd4) 9... Be6 10. Nxe6 fxe6 { [%cal Gf8f1] } 11. O-O-O Ne5 12. Be2 { [%csl Gf3][%cal Re5f3,Bd1h1,Bg1d1] } 12... Qc7 { [%csl Gc4][%cal Ge5c4,Gc4e3,Gc4d2,Bf8c8,Yc7c3] } 13. h4 Nc4 *
5853
5874
  */
5854
5875
  StudyPgn: string;
5876
+ /** @enum {string} */
5877
+ StudyUserSelection:
5878
+ | "nobody"
5879
+ | "owner"
5880
+ | "contributor"
5881
+ | "member"
5882
+ | "everyone";
5855
5883
  /**
5856
5884
  * @example {
5857
5885
  * "chapters": [
@@ -10995,6 +11023,66 @@ export interface operations {
10995
11023
  };
10996
11024
  };
10997
11025
  };
11026
+ apiStudyPost: {
11027
+ parameters: {
11028
+ query?: never;
11029
+ header?: never;
11030
+ path?: never;
11031
+ cookie?: never;
11032
+ };
11033
+ /** @description Parameters of the study */
11034
+ requestBody: {
11035
+ content: {
11036
+ "application/x-www-form-urlencoded": {
11037
+ /** @description The study name. */
11038
+ name: string;
11039
+ /**
11040
+ * @description Who can view the study.
11041
+ * * `public`: Default. Anyone can view the study, it appears on public listings
11042
+ * * `unlisted`: Only people with the link can view the study, it doesn't appear on public listings
11043
+ * * `private`: Only the study members can view the study
11044
+ * @default unlisted
11045
+ * @enum {string}
11046
+ */
11047
+ visibility: "public" | "unlisted" | "private";
11048
+ computer: components["schemas"]["StudyUserSelection"];
11049
+ explorer: components["schemas"]["StudyUserSelection"];
11050
+ cloneable: components["schemas"]["StudyUserSelection"];
11051
+ shareable: components["schemas"]["StudyUserSelection"];
11052
+ chat: components["schemas"]["StudyUserSelection"];
11053
+ /**
11054
+ * @description Keep everyone on the same chapter and position
11055
+ * @default true
11056
+ * @enum {string}
11057
+ */
11058
+ sticky?: "true" | "false";
11059
+ };
11060
+ };
11061
+ };
11062
+ responses: {
11063
+ /** @description The Study has been successfully created. */
11064
+ 200: {
11065
+ headers: {
11066
+ "Access-Control-Allow-Origin"?: string;
11067
+ [name: string]: unknown;
11068
+ };
11069
+ content: {
11070
+ "application/json": {
11071
+ id?: string;
11072
+ };
11073
+ };
11074
+ };
11075
+ /** @description The creation of the Study failed. */
11076
+ 400: {
11077
+ headers: {
11078
+ [name: string]: unknown;
11079
+ };
11080
+ content: {
11081
+ "application/json": components["schemas"]["Error"];
11082
+ };
11083
+ };
11084
+ };
11085
+ };
10998
11086
  apiStudyImportPGN: {
10999
11087
  parameters: {
11000
11088
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.127",
3
+ "version": "2.0.129",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",