@wvdsh/api 0.1.101 → 0.1.103

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.
@@ -183,7 +183,6 @@ export declare const IFRAME_MESSAGE_TYPE: {
183
183
  readonly LOBBY_LEFT: "LobbyLeft";
184
184
  readonly GET_LOBBY_INVITE_LINK: "GetLobbyInviteLink";
185
185
  readonly GET_DEVICE_FINGERPRINT: "GetDeviceFingerprint";
186
- readonly GET_GAMEPLAY_ATTRIBUTION: "GetGameplayAttribution";
187
186
  readonly SET_FULLSCREEN: "SetFullscreen";
188
187
  readonly TOGGLE_FULLSCREEN: "ToggleFullscreen";
189
188
  readonly FULLSCREEN_CHANGED: "FullscreenChanged";
@@ -234,7 +233,7 @@ export interface SDKConfig {
234
233
  pageViewId?: string;
235
234
  recordingHotkey?: string;
236
235
  }
237
- export type IframeResponseMessageTypes = typeof IFRAME_MESSAGE_TYPE.GET_LOBBY_INVITE_LINK | typeof IFRAME_MESSAGE_TYPE.GET_DEVICE_FINGERPRINT | typeof IFRAME_MESSAGE_TYPE.GET_GAMEPLAY_ATTRIBUTION | typeof IFRAME_MESSAGE_TYPE.SET_FULLSCREEN | typeof IFRAME_MESSAGE_TYPE.TOGGLE_FULLSCREEN | typeof IFRAME_MESSAGE_TYPE.SET_MUTE | typeof IFRAME_MESSAGE_TYPE.TOGGLE_MUTE | typeof IFRAME_MESSAGE_TYPE.TRIGGER_PAYWALL;
236
+ export type IframeResponseMessageTypes = typeof IFRAME_MESSAGE_TYPE.GET_LOBBY_INVITE_LINK | typeof IFRAME_MESSAGE_TYPE.GET_DEVICE_FINGERPRINT | typeof IFRAME_MESSAGE_TYPE.SET_FULLSCREEN | typeof IFRAME_MESSAGE_TYPE.TOGGLE_FULLSCREEN | typeof IFRAME_MESSAGE_TYPE.SET_MUTE | typeof IFRAME_MESSAGE_TYPE.TOGGLE_MUTE | typeof IFRAME_MESSAGE_TYPE.TRIGGER_PAYWALL;
238
237
  export type RecordingCompletePayload = {
239
238
  success: true;
240
239
  recordingId?: number;
@@ -263,9 +262,6 @@ export type IFrameEventPayloadMap = {
263
262
  [IFRAME_MESSAGE_TYPE.TAKE_FOCUS]: void;
264
263
  [IFRAME_MESSAGE_TYPE.GET_LOBBY_INVITE_LINK]: string;
265
264
  [IFRAME_MESSAGE_TYPE.GET_DEVICE_FINGERPRINT]: DeviceFingerprint;
266
- [IFRAME_MESSAGE_TYPE.GET_GAMEPLAY_ATTRIBUTION]: {
267
- pageViewId: string;
268
- };
269
265
  [IFRAME_MESSAGE_TYPE.SET_FULLSCREEN]: {
270
266
  success: boolean;
271
267
  };
@@ -157,7 +157,6 @@ export const IFRAME_MESSAGE_TYPE = {
157
157
  LOBBY_LEFT: 'LobbyLeft',
158
158
  GET_LOBBY_INVITE_LINK: 'GetLobbyInviteLink',
159
159
  GET_DEVICE_FINGERPRINT: 'GetDeviceFingerprint',
160
- GET_GAMEPLAY_ATTRIBUTION: 'GetGameplayAttribution',
161
160
  SET_FULLSCREEN: 'SetFullscreen',
162
161
  TOGGLE_FULLSCREEN: 'ToggleFullscreen',
163
162
  FULLSCREEN_CHANGED: 'FullscreenChanged',
@@ -21,6 +21,12 @@ export type PublicApiType = {
21
21
  value: number;
22
22
  }>>;
23
23
  listAchievementIdentifiers: FunctionReference<"query", "public", Record<string, never>, Array<string>>;
24
+ listGameAchievementIdentifiers: FunctionReference<"query", "public", {
25
+ gameCloudId: Id<"gameClouds">;
26
+ }, Array<string>>;
27
+ listGameStatIdentifiers: FunctionReference<"query", "public", {
28
+ gameCloudId: Id<"gameClouds">;
29
+ }, Array<string>>;
24
30
  listStatIdentifiers: FunctionReference<"query", "public", Record<string, never>, Array<string>>;
25
31
  setUserGameAchievements: FunctionReference<"mutation", "public", {
26
32
  achievements: Array<string>;
@@ -104,15 +110,14 @@ export type PublicApiType = {
104
110
  playerCount: number;
105
111
  visibility: 0 | 1 | 2;
106
112
  }>>;
107
- lobbyMessages: FunctionReference<"query", "public", {
108
- lobbyId: Id<"lobbies">;
113
+ listPublicLobbies: FunctionReference<"query", "public", {
114
+ gameCloudId: Id<"gameClouds">;
109
115
  }, Array<{
110
116
  lobbyId: Id<"lobbies">;
111
- message: string;
112
- messageId: Id<"lobbyMessages">;
113
- timestamp: number;
114
- userId: Id<"users">;
115
- username: string;
117
+ maxPlayers: number;
118
+ metadata: Record<string, number | string | boolean>;
119
+ playerCount: number;
120
+ visibility: 0 | 1 | 2;
116
121
  }>>;
117
122
  lobbyUsers: FunctionReference<"query", "public", {
118
123
  lobbyId: Id<"lobbies">;
@@ -149,6 +154,14 @@ export type PublicApiType = {
149
154
  leaderboardId: Id<"leaderboards">;
150
155
  ugcId: Id<"userGeneratedContent">;
151
156
  }, boolean>;
157
+ findLeaderboard: FunctionReference<"query", "public", {
158
+ gameCloudId: Id<"gameClouds">;
159
+ name: string;
160
+ }, null | {
161
+ id: Id<"leaderboards">;
162
+ name: string;
163
+ totalEntries: number;
164
+ }>;
152
165
  getLeaderboard: FunctionReference<"query", "public", {
153
166
  name: string;
154
167
  }, {
@@ -214,6 +227,24 @@ export type PublicApiType = {
214
227
  }>;
215
228
  totalEntries: number;
216
229
  }>;
230
+ listGlobalEntries: FunctionReference<"query", "public", {
231
+ gameCloudId: Id<"gameClouds">;
232
+ leaderboardId: Id<"leaderboards">;
233
+ limit: number;
234
+ offset: number;
235
+ }, {
236
+ entries: Array<{
237
+ globalRank: number;
238
+ metadata?: Record<string, number | string | boolean>;
239
+ score: number;
240
+ timestamp: number;
241
+ ugcId?: Id<"userGeneratedContent">;
242
+ userAvatarUrl?: string;
243
+ userId: Id<"users">;
244
+ username: string;
245
+ }>;
246
+ totalEntries: number;
247
+ }>;
217
248
  upsertLeaderboardEntry: FunctionReference<"mutation", "public", {
218
249
  keepBest: boolean;
219
250
  leaderboardId: Id<"leaderboards">;
@@ -239,7 +270,7 @@ export type PublicApiType = {
239
270
  };
240
271
  p2pSignaling: {
241
272
  getSignalingMessages: FunctionReference<"query", "public", {
242
- after?: bigint;
273
+ after: bigint;
243
274
  lobbyId: Id<"lobbies">;
244
275
  }, Array<{
245
276
  _creationTime: number;
@@ -262,19 +293,6 @@ export type PublicApiType = {
262
293
  };
263
294
  presence: {
264
295
  heartbeat: FunctionReference<"mutation", "public", {
265
- attribution?: {
266
- embedAncestors?: Array<string>;
267
- navigation?: {
268
- campaign?: "continue_playing" | "recommended" | "trending" | "feed" | "category" | "search_results" | "more_from_developer" | "more_like_this" | "profile_games" | "profile_collection" | "team_games" | "friend_playing" | "notifications" | "invitations" | "embed";
269
- fromPageViewId: string;
270
- position?: number;
271
- source: string;
272
- term?: string;
273
- };
274
- pageViewId: string;
275
- referrer?: string;
276
- trackingParams?: Record<string, string>;
277
- };
278
296
  data?: Record<string, string | number | boolean | null>;
279
297
  deviceFingerprint?: {
280
298
  browser?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.101",
3
+ "version": "0.1.103",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",