@wvdsh/api 0.1.55 → 0.1.57
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;
|
|
@@ -126,6 +132,7 @@ export declare const IFRAME_MESSAGE_TYPE: {
|
|
|
126
132
|
readonly GAMEPLAY_JWT_READY: "GameplayJwtReady";
|
|
127
133
|
readonly END_SESSION: "EndSession";
|
|
128
134
|
readonly TRIGGER_PAYWALL: "TriggerPaywall";
|
|
135
|
+
readonly LINK_COPIED: "LinkCopied";
|
|
129
136
|
};
|
|
130
137
|
export declare const SERVICE_WORKER_MESSAGE_TYPE: {
|
|
131
138
|
readonly EMBED_CONFIGURE: "embed.configure";
|
|
@@ -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,
|
|
@@ -106,7 +112,8 @@ export const IFRAME_MESSAGE_TYPE = {
|
|
|
106
112
|
OVERLAY_CHANGED: 'OverlayChanged',
|
|
107
113
|
GAMEPLAY_JWT_READY: 'GameplayJwtReady',
|
|
108
114
|
END_SESSION: 'EndSession',
|
|
109
|
-
TRIGGER_PAYWALL: 'TriggerPaywall'
|
|
115
|
+
TRIGGER_PAYWALL: 'TriggerPaywall',
|
|
116
|
+
LINK_COPIED: 'LinkCopied'
|
|
110
117
|
};
|
|
111
118
|
export const SERVICE_WORKER_MESSAGE_TYPE = {
|
|
112
119
|
EMBED_CONFIGURE: 'embed.configure',
|
|
@@ -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;
|