@lichess-org/types 2.0.177 → 2.0.179

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 +135 -11
  2. package/package.json +1 -1
package/lichess-api.d.ts CHANGED
@@ -820,6 +820,27 @@ export interface paths {
820
820
  patch?: never;
821
821
  trace?: never;
822
822
  };
823
+ "/api/version": {
824
+ parameters: {
825
+ query?: never;
826
+ header?: never;
827
+ path?: never;
828
+ cookie?: never;
829
+ };
830
+ /**
831
+ * Get server version
832
+ * @description Get the date and git commit of the server code currently deployed.
833
+ * Source code: [github.com/lichess-org/lila](https://github.com/lichess-org/lila).
834
+ */
835
+ get: operations["apiVersion"];
836
+ put?: never;
837
+ post?: never;
838
+ delete?: never;
839
+ options?: never;
840
+ head?: never;
841
+ patch?: never;
842
+ trace?: never;
843
+ };
823
844
  "/api/tv/channels": {
824
845
  parameters: {
825
846
  query?: never;
@@ -6670,6 +6691,8 @@ export interface components {
6670
6691
  };
6671
6692
  OpeningExplorerGamePlayer: {
6672
6693
  name: string;
6694
+ /** @description Title of the player, if any */
6695
+ title?: string;
6673
6696
  rating: number;
6674
6697
  };
6675
6698
  OpeningExplorerMastersGame: {
@@ -6678,7 +6701,8 @@ export interface components {
6678
6701
  white: components["schemas"]["OpeningExplorerGamePlayer"];
6679
6702
  black: components["schemas"]["OpeningExplorerGamePlayer"];
6680
6703
  year: number;
6681
- month?: string;
6704
+ /** @description Month of the game, if known */
6705
+ month: string | null;
6682
6706
  };
6683
6707
  OpeningExplorerMasters: {
6684
6708
  opening: components["schemas"]["OpeningExplorerOpening"] | null;
@@ -6703,10 +6727,12 @@ export interface components {
6703
6727
  id: string;
6704
6728
  winner: components["schemas"]["GameColor"] | null;
6705
6729
  speed?: components["schemas"]["Speed"];
6730
+ /** @enum {string} */
6731
+ mode: "rated" | "casual";
6706
6732
  white: components["schemas"]["OpeningExplorerGamePlayer"];
6707
6733
  black: components["schemas"]["OpeningExplorerGamePlayer"];
6708
6734
  year: number;
6709
- month: string | null;
6735
+ month: string;
6710
6736
  };
6711
6737
  OpeningExplorerLichess: {
6712
6738
  opening: components["schemas"]["OpeningExplorerOpening"] | null;
@@ -6726,9 +6752,10 @@ export interface components {
6726
6752
  topGames: ({
6727
6753
  uci: string;
6728
6754
  } & components["schemas"]["OpeningExplorerLichessGame"])[];
6729
- recentGames?: ({
6755
+ recentGames: ({
6730
6756
  uci: string;
6731
6757
  } & components["schemas"]["OpeningExplorerLichessGame"])[];
6758
+ /** @description Only with `history=true` */
6732
6759
  history?: {
6733
6760
  month: string;
6734
6761
  white: number;
@@ -8286,6 +8313,37 @@ export interface operations {
8286
8313
  };
8287
8314
  };
8288
8315
  };
8316
+ apiVersion: {
8317
+ parameters: {
8318
+ query?: never;
8319
+ header?: never;
8320
+ path?: never;
8321
+ cookie?: never;
8322
+ };
8323
+ requestBody?: never;
8324
+ responses: {
8325
+ /** @description The server version. */
8326
+ 200: {
8327
+ headers: {
8328
+ "Access-Control-Allow-Origin"?: string;
8329
+ [name: string]: unknown;
8330
+ };
8331
+ content: {
8332
+ "application/json": {
8333
+ server: {
8334
+ /**
8335
+ * Format: date-time
8336
+ * @description When the deployed server was built
8337
+ */
8338
+ date: string;
8339
+ /** @description Git commit hash of the deployed lila version */
8340
+ commit: string;
8341
+ };
8342
+ };
8343
+ };
8344
+ };
8345
+ };
8346
+ };
8289
8347
  tvChannels: {
8290
8348
  parameters: {
8291
8349
  query?: never;
@@ -14125,10 +14183,16 @@ export interface operations {
14125
14183
  * @example d2d4,d7d5,c2c4,c7c6,c4d5
14126
14184
  */
14127
14185
  play?: string;
14128
- /** @description Include only games from this year or later */
14129
- since?: number;
14130
- /** @description Include only games from this year or earlier */
14131
- until?: number;
14186
+ /**
14187
+ * @description Include only games from this month or later: `YYYY-MM`, or `YYYY`
14188
+ * for January of that year
14189
+ */
14190
+ since?: string;
14191
+ /**
14192
+ * @description Include only games from this month or earlier: `YYYY-MM`, or `YYYY`
14193
+ * for December of that year
14194
+ */
14195
+ until?: string;
14132
14196
  /** @description Number of most common moves to display */
14133
14197
  moves?: number;
14134
14198
  /** @description Number of top games to display */
@@ -14150,6 +14214,16 @@ export interface operations {
14150
14214
  "application/json": components["schemas"]["OpeningExplorerMasters"];
14151
14215
  };
14152
14216
  };
14217
+ /** @description Invalid parameters, position or moves. */
14218
+ 400: {
14219
+ headers: {
14220
+ [name: string]: unknown;
14221
+ };
14222
+ content: {
14223
+ /** @example bad request: illegal move e2e5: illegal uci move */
14224
+ "text/plain": string;
14225
+ };
14226
+ };
14153
14227
  };
14154
14228
  };
14155
14229
  openingExplorerLichess: {
@@ -14179,9 +14253,15 @@ export interface operations {
14179
14253
  * ..., `2500` from 2500 to any rating above).
14180
14254
  */
14181
14255
  ratings?: (0 | 1000 | 1200 | 1400 | 1600 | 1800 | 2000 | 2200 | 2500)[];
14182
- /** @description Include only games from this month or later */
14256
+ /**
14257
+ * @description Include only games from this month or later: `YYYY-MM`, or `YYYY`
14258
+ * for January of that year
14259
+ */
14183
14260
  since?: string;
14184
- /** @description Include only games from this month or earlier */
14261
+ /**
14262
+ * @description Include only games from this month or earlier: `YYYY-MM`, or `YYYY`
14263
+ * for December of that year
14264
+ */
14185
14265
  until?: string;
14186
14266
  /** @description Number of most common moves to display */
14187
14267
  moves?: number;
@@ -14218,6 +14298,16 @@ export interface operations {
14218
14298
  "application/json": components["schemas"]["OpeningExplorerLichess"];
14219
14299
  };
14220
14300
  };
14301
+ /** @description Invalid parameters, position or moves. */
14302
+ 400: {
14303
+ headers: {
14304
+ [name: string]: unknown;
14305
+ };
14306
+ content: {
14307
+ /** @example bad request: illegal move e2e5: illegal uci move */
14308
+ "text/plain": string;
14309
+ };
14310
+ };
14221
14311
  };
14222
14312
  };
14223
14313
  openingExplorerPlayer: {
@@ -14252,9 +14342,15 @@ export interface operations {
14252
14342
  speeds?: components["schemas"]["Speed"][];
14253
14343
  /** @description Comma separated list of modes */
14254
14344
  modes?: ("casual" | "rated")[];
14255
- /** @description Include only games from this month or later */
14345
+ /**
14346
+ * @description Include only games from this month or later: `YYYY-MM`, or `YYYY`
14347
+ * for January of that year
14348
+ */
14256
14349
  since?: string;
14257
- /** @description Include only games from this month or earlier */
14350
+ /**
14351
+ * @description Include only games from this month or earlier: `YYYY-MM`, or `YYYY`
14352
+ * for December of that year
14353
+ */
14258
14354
  until?: string;
14259
14355
  /** @description Number of most common moves to display */
14260
14356
  moves?: number;
@@ -14277,6 +14373,25 @@ export interface operations {
14277
14373
  "application/x-ndjson": components["schemas"]["OpeningExplorerPlayer"];
14278
14374
  };
14279
14375
  };
14376
+ /** @description Invalid parameters, position or moves. */
14377
+ 400: {
14378
+ headers: {
14379
+ [name: string]: unknown;
14380
+ };
14381
+ content: {
14382
+ /** @example bad request: illegal move e2e5: illegal uci move */
14383
+ "text/plain": string;
14384
+ };
14385
+ };
14386
+ /** @description The indexing queue is full. Try again later. */
14387
+ 503: {
14388
+ headers: {
14389
+ [name: string]: unknown;
14390
+ };
14391
+ content: {
14392
+ "text/plain": string;
14393
+ };
14394
+ };
14280
14395
  };
14281
14396
  };
14282
14397
  openingExplorerMasterGame: {
@@ -14300,6 +14415,15 @@ export interface operations {
14300
14415
  "application/x-chess-pgn": string;
14301
14416
  };
14302
14417
  };
14418
+ /** @description There is no game with this id. */
14419
+ 404: {
14420
+ headers: {
14421
+ [name: string]: unknown;
14422
+ };
14423
+ content: {
14424
+ "text/plain": string;
14425
+ };
14426
+ };
14303
14427
  };
14304
14428
  };
14305
14429
  tablebaseStandard: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichess-org/types",
3
- "version": "2.0.177",
3
+ "version": "2.0.179",
4
4
  "description": "Lichess.org API types",
5
5
  "homepage": "https://github.com/lichess-org/api",
6
6
  "license": "AGPL-3.0-or-later",