@wvdsh/api 0.1.54 → 0.1.56
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.
|
@@ -126,6 +126,7 @@ export declare const IFRAME_MESSAGE_TYPE: {
|
|
|
126
126
|
readonly GAMEPLAY_JWT_READY: "GameplayJwtReady";
|
|
127
127
|
readonly END_SESSION: "EndSession";
|
|
128
128
|
readonly TRIGGER_PAYWALL: "TriggerPaywall";
|
|
129
|
+
readonly LINK_COPIED: "LinkCopied";
|
|
129
130
|
};
|
|
130
131
|
export declare const SERVICE_WORKER_MESSAGE_TYPE: {
|
|
131
132
|
readonly EMBED_CONFIGURE: "embed.configure";
|
|
@@ -216,7 +217,7 @@ export declare const UgcStorage: {
|
|
|
216
217
|
readonly buildKey: (gameCloudId: GenericId<"gameClouds">, uuid: string) => string;
|
|
217
218
|
readonly isUgcKey: (key: string) => boolean;
|
|
218
219
|
readonly USERFS_INFIX: "/userfs/";
|
|
219
|
-
readonly userfsPrefix: (gameCloudId: GenericId<"gameClouds">, userId
|
|
220
|
+
readonly userfsPrefix: (gameCloudId: GenericId<"gameClouds">, userId?: GenericId<"users">) => string;
|
|
220
221
|
readonly parseUserfsKey: (key: string) => {
|
|
221
222
|
gameCloudId: GenericId<"gameClouds">;
|
|
222
223
|
userId: GenericId<"users">;
|
|
@@ -106,7 +106,8 @@ export const IFRAME_MESSAGE_TYPE = {
|
|
|
106
106
|
OVERLAY_CHANGED: 'OverlayChanged',
|
|
107
107
|
GAMEPLAY_JWT_READY: 'GameplayJwtReady',
|
|
108
108
|
END_SESSION: 'EndSession',
|
|
109
|
-
TRIGGER_PAYWALL: 'TriggerPaywall'
|
|
109
|
+
TRIGGER_PAYWALL: 'TriggerPaywall',
|
|
110
|
+
LINK_COPIED: 'LinkCopied'
|
|
110
111
|
};
|
|
111
112
|
export const SERVICE_WORKER_MESSAGE_TYPE = {
|
|
112
113
|
EMBED_CONFIGURE: 'embed.configure',
|
|
@@ -150,7 +151,9 @@ export const UgcStorage = {
|
|
|
150
151
|
USERFS_INFIX: '/userfs/',
|
|
151
152
|
// R2 key prefix covering all of a user's cloud saves in a game cloud
|
|
152
153
|
userfsPrefix(gameCloudId, userId) {
|
|
153
|
-
return
|
|
154
|
+
return userId
|
|
155
|
+
? `${gameCloudId}${UgcStorage.USERFS_INFIX}${userId}/`
|
|
156
|
+
: `${gameCloudId}${UgcStorage.USERFS_INFIX}`;
|
|
154
157
|
},
|
|
155
158
|
// Inverse of userfsPrefix; null when the key isn't a userfs key
|
|
156
159
|
parseUserfsKey(key) {
|
|
@@ -145,7 +145,7 @@ export type PublicApiType = {
|
|
|
145
145
|
}, {
|
|
146
146
|
entry: null | {
|
|
147
147
|
globalRank: number;
|
|
148
|
-
metadata?:
|
|
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?:
|
|
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?:
|
|
191
|
+
metadata?: Record<string, number | string>;
|
|
192
192
|
score: number;
|
|
193
193
|
timestamp: number;
|
|
194
194
|
ugcId?: Id<"userGeneratedContent">;
|