@wvdsh/api 0.1.53 → 0.1.55

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.
@@ -216,7 +216,7 @@ export declare const UgcStorage: {
216
216
  readonly buildKey: (gameCloudId: GenericId<"gameClouds">, uuid: string) => string;
217
217
  readonly isUgcKey: (key: string) => boolean;
218
218
  readonly USERFS_INFIX: "/userfs/";
219
- readonly userfsPrefix: (gameCloudId: GenericId<"gameClouds">, userId: GenericId<"users">) => string;
219
+ readonly userfsPrefix: (gameCloudId: GenericId<"gameClouds">, userId?: GenericId<"users">) => string;
220
220
  readonly parseUserfsKey: (key: string) => {
221
221
  gameCloudId: GenericId<"gameClouds">;
222
222
  userId: GenericId<"users">;
@@ -150,7 +150,9 @@ export const UgcStorage = {
150
150
  USERFS_INFIX: '/userfs/',
151
151
  // R2 key prefix covering all of a user's cloud saves in a game cloud
152
152
  userfsPrefix(gameCloudId, userId) {
153
- return `${gameCloudId}${UgcStorage.USERFS_INFIX}${userId}/`;
153
+ return userId
154
+ ? `${gameCloudId}${UgcStorage.USERFS_INFIX}${userId}/`
155
+ : `${gameCloudId}${UgcStorage.USERFS_INFIX}`;
154
156
  },
155
157
  // Inverse of userfsPrefix; null when the key isn't a userfs key
156
158
  parseUserfsKey(key) {
@@ -145,7 +145,7 @@ export type PublicApiType = {
145
145
  }, {
146
146
  entry: null | {
147
147
  globalRank: number;
148
- metadata?: ArrayBuffer;
148
+ metadata?: Record<string, number | string>;
149
149
  score: number;
150
150
  timestamp: number;
151
151
  ugcId?: Id<"userGeneratedContent">;
@@ -170,7 +170,7 @@ export type PublicApiType = {
170
170
  }, {
171
171
  entries: Array<{
172
172
  globalRank: number;
173
- metadata?: ArrayBuffer;
173
+ metadata?: Record<string, number | string>;
174
174
  score: number;
175
175
  timestamp: number;
176
176
  ugcId?: Id<"userGeneratedContent">;
@@ -188,7 +188,7 @@ export type PublicApiType = {
188
188
  }, {
189
189
  entries: Array<{
190
190
  globalRank: number;
191
- metadata?: ArrayBuffer;
191
+ metadata?: Record<string, number | string>;
192
192
  score: number;
193
193
  timestamp: number;
194
194
  ugcId?: Id<"userGeneratedContent">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.53",
3
+ "version": "0.1.55",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",