@lichess-org/types 2.0.72 → 2.0.74
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.
- package/lichess-api.d.ts +93 -19
- package/package.json +1 -1
package/lichess-api.d.ts
CHANGED
|
@@ -1494,6 +1494,33 @@ export interface paths {
|
|
|
1494
1494
|
patch?: never;
|
|
1495
1495
|
trace?: never;
|
|
1496
1496
|
};
|
|
1497
|
+
"/api/study/{studyId}/{chapterId}/tags": {
|
|
1498
|
+
parameters: {
|
|
1499
|
+
query?: never;
|
|
1500
|
+
header?: never;
|
|
1501
|
+
path?: never;
|
|
1502
|
+
cookie?: never;
|
|
1503
|
+
};
|
|
1504
|
+
get?: never;
|
|
1505
|
+
put?: never;
|
|
1506
|
+
/**
|
|
1507
|
+
* Update PGN tags of a study chapter
|
|
1508
|
+
* @description Add, update and delete the PGN tags of a study.
|
|
1509
|
+
* By providing a list of PGN tags in the usual PGN format, you can:
|
|
1510
|
+
* - Add new tags if the chapter doesn't have them yet
|
|
1511
|
+
* - Update existing chapter tags
|
|
1512
|
+
* - Delete existing chapter tags, by providing a tag with an empty value.
|
|
1513
|
+
*
|
|
1514
|
+
* The chapter keeps the tags that you don't provide.
|
|
1515
|
+
*
|
|
1516
|
+
*/
|
|
1517
|
+
post: operations["apiStudyChapterTags"];
|
|
1518
|
+
delete?: never;
|
|
1519
|
+
options?: never;
|
|
1520
|
+
head?: never;
|
|
1521
|
+
patch?: never;
|
|
1522
|
+
trace?: never;
|
|
1523
|
+
};
|
|
1497
1524
|
"/study/by/{username}/export.pgn": {
|
|
1498
1525
|
parameters: {
|
|
1499
1526
|
query?: never;
|
|
@@ -6053,13 +6080,13 @@ export interface components {
|
|
|
6053
6080
|
* One line per player, formatted as such:
|
|
6054
6081
|
*
|
|
6055
6082
|
* ```txt
|
|
6056
|
-
* player name
|
|
6083
|
+
* player name / FIDE ID
|
|
6057
6084
|
* ```
|
|
6058
6085
|
*
|
|
6059
6086
|
* Example:
|
|
6060
6087
|
*
|
|
6061
6088
|
* ```txt
|
|
6062
|
-
* Magnus Carlsen
|
|
6089
|
+
* Magnus Carlsen / 1503014
|
|
6063
6090
|
* ```
|
|
6064
6091
|
*
|
|
6065
6092
|
* Player names ignore case and punctuation, and match all possible combinations of 2 words: "Jorge Rick Vito" will match "Jorge Rick", "jorge vito", "Rick, Vito", etc.
|
|
@@ -6067,7 +6094,7 @@ export interface components {
|
|
|
6067
6094
|
* If the player is NM or WNM, you can:
|
|
6068
6095
|
*
|
|
6069
6096
|
* ```txt
|
|
6070
|
-
*
|
|
6097
|
+
* player name / FIDE ID / title
|
|
6071
6098
|
* ```
|
|
6072
6099
|
*
|
|
6073
6100
|
* Alternatively, you may set tags manually, like so:
|
|
@@ -30732,6 +30759,47 @@ export interface operations {
|
|
|
30732
30759
|
};
|
|
30733
30760
|
};
|
|
30734
30761
|
};
|
|
30762
|
+
apiStudyChapterTags: {
|
|
30763
|
+
parameters: {
|
|
30764
|
+
query?: never;
|
|
30765
|
+
header?: never;
|
|
30766
|
+
path: {
|
|
30767
|
+
/** @description The study ID */
|
|
30768
|
+
studyId: string;
|
|
30769
|
+
/** @description The chapter ID */
|
|
30770
|
+
chapterId: string;
|
|
30771
|
+
};
|
|
30772
|
+
cookie?: never;
|
|
30773
|
+
};
|
|
30774
|
+
requestBody: {
|
|
30775
|
+
content: {
|
|
30776
|
+
"application/x-www-form-urlencoded": {
|
|
30777
|
+
/** @description PGN text containing the tags. Only the tags are used. Moves are just ignored.
|
|
30778
|
+
* */
|
|
30779
|
+
pgn: string;
|
|
30780
|
+
};
|
|
30781
|
+
};
|
|
30782
|
+
};
|
|
30783
|
+
responses: {
|
|
30784
|
+
/** @description Tags updated successfully, if the chapter exists and you are authorized the update the study. */
|
|
30785
|
+
204: {
|
|
30786
|
+
headers: {
|
|
30787
|
+
"Access-Control-Allow-Origin"?: string;
|
|
30788
|
+
[name: string]: unknown;
|
|
30789
|
+
};
|
|
30790
|
+
content?: never;
|
|
30791
|
+
};
|
|
30792
|
+
/** @description The creation of the chapter(s) failed. */
|
|
30793
|
+
400: {
|
|
30794
|
+
headers: {
|
|
30795
|
+
[name: string]: unknown;
|
|
30796
|
+
};
|
|
30797
|
+
content: {
|
|
30798
|
+
"application/json": components["schemas"]["Error"];
|
|
30799
|
+
};
|
|
30800
|
+
};
|
|
30801
|
+
};
|
|
30802
|
+
};
|
|
30735
30803
|
studyExportAllPgn: {
|
|
30736
30804
|
parameters: {
|
|
30737
30805
|
query?: {
|
|
@@ -35561,27 +35629,33 @@ export interface operations {
|
|
|
35561
35629
|
/** @description Parameters of the challenge */
|
|
35562
35630
|
requestBody?: {
|
|
35563
35631
|
content: {
|
|
35564
|
-
"application/x-www-form-urlencoded":
|
|
35632
|
+
"application/x-www-form-urlencoded": (
|
|
35633
|
+
| {
|
|
35634
|
+
/**
|
|
35635
|
+
* @description Clock initial time in seconds. If empty, a correspondence game is created. Valid values are 0, 15, 30, 45, 60, 90, and any multiple of 60 up to 10800 (3 hours).
|
|
35636
|
+
* @example 300
|
|
35637
|
+
*/
|
|
35638
|
+
"clock.limit": number;
|
|
35639
|
+
/**
|
|
35640
|
+
* @description Clock increment in seconds. If empty, a correspondence game is created.
|
|
35641
|
+
* @example 1
|
|
35642
|
+
*/
|
|
35643
|
+
"clock.increment": number;
|
|
35644
|
+
}
|
|
35645
|
+
| {
|
|
35646
|
+
/**
|
|
35647
|
+
* @description Days per move, for correspondence games. Clock settings must be omitted.
|
|
35648
|
+
* @enum {integer}
|
|
35649
|
+
*/
|
|
35650
|
+
days: 1 | 2 | 3 | 5 | 7 | 10 | 14;
|
|
35651
|
+
}
|
|
35652
|
+
| Record<string, never>
|
|
35653
|
+
) & {
|
|
35565
35654
|
/**
|
|
35566
35655
|
* @description Game is rated and impacts players ratings
|
|
35567
35656
|
* @default false
|
|
35568
35657
|
*/
|
|
35569
35658
|
rated?: boolean;
|
|
35570
|
-
/**
|
|
35571
|
-
* @description Clock initial time in seconds. If empty, a correspondence game is created. Valid values are 0, 15, 30, 45, 60, 90, and any multiple of 60 up to 10800 (3 hours).
|
|
35572
|
-
* @example 300
|
|
35573
|
-
*/
|
|
35574
|
-
"clock.limit"?: number;
|
|
35575
|
-
/**
|
|
35576
|
-
* @description Clock increment in seconds. If empty, a correspondence game is created.
|
|
35577
|
-
* @example 1
|
|
35578
|
-
*/
|
|
35579
|
-
"clock.increment"?: number;
|
|
35580
|
-
/**
|
|
35581
|
-
* @description Days per move, for correspondence games. Clock settings must be omitted.
|
|
35582
|
-
* @enum {integer}
|
|
35583
|
-
*/
|
|
35584
|
-
days?: 1 | 2 | 3 | 5 | 7 | 10 | 14;
|
|
35585
35659
|
/**
|
|
35586
35660
|
* @description Which color you get to play
|
|
35587
35661
|
* @default random
|