@wvdsh/api 0.1.56 → 0.1.58

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.
@@ -76,6 +76,12 @@ export declare const LEADERBOARD_DISPLAY_TYPE: {
76
76
  readonly TIME_MILLISECONDS: 2;
77
77
  readonly TIME_GAME_TICKS: 3;
78
78
  };
79
+ export declare const LEADERBOARD_METADATA_LIMITS: {
80
+ readonly MAX_KEYS: 16;
81
+ readonly MAX_KEY_LENGTH: 64;
82
+ readonly MAX_STRING_VALUE_LENGTH: 256;
83
+ readonly MAX_TOTAL_BYTES: 2048;
84
+ };
79
85
  export declare const UGC_TYPE: {
80
86
  readonly SCREENSHOT: 0;
81
87
  readonly VIDEO: 1;
@@ -55,6 +55,12 @@ export const LEADERBOARD_DISPLAY_TYPE = {
55
55
  TIME_MILLISECONDS: 2,
56
56
  TIME_GAME_TICKS: 3 // Added for PGRC, assumes 60fps game ticks for proper display, probably don't want to let other games do this
57
57
  };
58
+ export const LEADERBOARD_METADATA_LIMITS = {
59
+ MAX_KEYS: 16,
60
+ MAX_KEY_LENGTH: 64,
61
+ MAX_STRING_VALUE_LENGTH: 256,
62
+ MAX_TOTAL_BYTES: 2048
63
+ };
58
64
  // ========== USER GENERATED CONTENT ==========
59
65
  export const UGC_TYPE = {
60
66
  SCREENSHOT: 0,
@@ -201,14 +201,18 @@ export type PublicApiType = {
201
201
  upsertLeaderboardEntry: FunctionReference<"mutation", "public", {
202
202
  keepBest: boolean;
203
203
  leaderboardId: Id<"leaderboards">;
204
+ metadata?: Record<string, number | string>;
204
205
  score: number;
205
206
  ugcId?: Id<"userGeneratedContent">;
206
207
  }, {
207
208
  entry: {
208
209
  entryId: Id<"leaderboardEntries">;
209
210
  globalRank: number;
211
+ metadata?: Record<string, number | string>;
210
212
  score: number;
211
213
  scoreChanged: boolean;
214
+ timestamp: number;
215
+ ugcId?: Id<"userGeneratedContent">;
212
216
  };
213
217
  submission: {
214
218
  globalRank: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",