@flitt/api 1.0.0 → 1.1.0

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/src/types.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Response types of the Flitt Public API v1 (`/v1/public-api`) and of the
3
- * Vote API (`/v1/vote-api`). Dates are ISO 8601 strings, as sent by the API.
2
+ * Response types of the Flitt Public API v1 (`/v1/public-api`), votes and
3
+ * reviews included. Dates are ISO 8601 strings, as sent by the API.
4
4
  */
5
5
 
6
6
  export type Game = "GMOD" | "FIVEM" | "MC";
@@ -275,7 +275,7 @@ export type WebhookEvent<T = Record<string, unknown> | null> = {
275
275
  };
276
276
 
277
277
  // ---------------------------------------------------------------------------
278
- // Vote API
278
+ // Votes and reviews (part of the Public API)
279
279
  // ---------------------------------------------------------------------------
280
280
 
281
281
  type IdentityFields = {
@@ -355,7 +355,8 @@ export type VoteStats = {
355
355
  monthly: Array<{ month: string; votes: number; views: number; joinClicks: number; rank: number | null }>;
356
356
  };
357
357
 
358
- export type VoteServer = {
358
+ /** Vote counters, ranking, status and rating of a server (`flitt.votes.summary`). */
359
+ export type VoteSummary = {
359
360
  id: string;
360
361
  name: string | null;
361
362
  game: Game;
@@ -370,6 +371,9 @@ export type VoteServer = {
370
371
  stats?: VoteStats;
371
372
  };
372
373
 
374
+ /** @deprecated since 1.1: renamed VoteSummary. */
375
+ export type VoteServer = VoteSummary;
376
+
373
377
  export type Review = {
374
378
  id: string;
375
379
  rating: number;
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Package version, kept in sync with package.json by scripts/sync-version.mjs. */
2
- export const VERSION = "1.0.0";
2
+ export const VERSION = "1.1.0";