@wvdsh/api 0.1.89 → 0.1.91

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.
@@ -22,6 +22,12 @@ export type DeviceFingerprint = {
22
22
  } | undefined;
23
23
  language?: string | undefined;
24
24
  os?: string | undefined;
25
+ pixelRatio?: number | undefined;
26
+ region?: string | undefined;
27
+ screenHeight?: number | undefined;
28
+ screenWidth?: number | undefined;
29
+ viewportHeight?: number | undefined;
30
+ viewportWidth?: number | undefined;
25
31
  };
26
32
  /**
27
33
  * Default values used by Game SDKs
@@ -137,6 +143,7 @@ export declare const IFRAME_MESSAGE_TYPE: {
137
143
  readonly LOBBY_LEFT: "LobbyLeft";
138
144
  readonly GET_LOBBY_INVITE_LINK: "GetLobbyInviteLink";
139
145
  readonly GET_DEVICE_FINGERPRINT: "GetDeviceFingerprint";
146
+ readonly GET_GAMEPLAY_ATTRIBUTION: "GetGameplayAttribution";
140
147
  readonly SET_FULLSCREEN: "SetFullscreen";
141
148
  readonly TOGGLE_FULLSCREEN: "ToggleFullscreen";
142
149
  readonly FULLSCREEN_CHANGED: "FullscreenChanged";
@@ -176,8 +183,9 @@ export interface SDKConfig {
176
183
  launchParams: GameLaunchParams;
177
184
  parentOrigin: string;
178
185
  initialVolume: number;
186
+ pageViewId?: string;
179
187
  }
180
- 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;
188
+ 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;
181
189
  export type IFrameEventPayloadMap = {
182
190
  [IFRAME_MESSAGE_TYPE.FULLSCREEN_CHANGED]: {
183
191
  isFullscreen: boolean;
@@ -191,6 +199,9 @@ export type IFrameEventPayloadMap = {
191
199
  [IFRAME_MESSAGE_TYPE.TAKE_FOCUS]: void;
192
200
  [IFRAME_MESSAGE_TYPE.GET_LOBBY_INVITE_LINK]: string;
193
201
  [IFRAME_MESSAGE_TYPE.GET_DEVICE_FINGERPRINT]: DeviceFingerprint;
202
+ [IFRAME_MESSAGE_TYPE.GET_GAMEPLAY_ATTRIBUTION]: {
203
+ pageViewId: string;
204
+ };
194
205
  [IFRAME_MESSAGE_TYPE.SET_FULLSCREEN]: {
195
206
  success: boolean;
196
207
  };
@@ -117,6 +117,7 @@ export const IFRAME_MESSAGE_TYPE = {
117
117
  LOBBY_LEFT: 'LobbyLeft',
118
118
  GET_LOBBY_INVITE_LINK: 'GetLobbyInviteLink',
119
119
  GET_DEVICE_FINGERPRINT: 'GetDeviceFingerprint',
120
+ GET_GAMEPLAY_ATTRIBUTION: 'GetGameplayAttribution',
120
121
  SET_FULLSCREEN: 'SetFullscreen',
121
122
  TOGGLE_FULLSCREEN: 'ToggleFullscreen',
122
123
  FULLSCREEN_CHANGED: 'FullscreenChanged',
@@ -265,6 +265,19 @@ export type PublicApiType = {
265
265
  };
266
266
  presence: {
267
267
  heartbeat: FunctionReference<"mutation", "public", {
268
+ attribution?: {
269
+ embedAncestors?: Array<string>;
270
+ navigation?: {
271
+ 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";
272
+ fromPageViewId: string;
273
+ position?: number;
274
+ source: string;
275
+ term?: string;
276
+ };
277
+ pageViewId: string;
278
+ referrer?: string;
279
+ trackingParams?: Record<string, string>;
280
+ };
268
281
  data?: Record<string, string | number | boolean | null>;
269
282
  deviceFingerprint?: {
270
283
  browser?: string;
@@ -290,7 +303,14 @@ export type PublicApiType = {
290
303
  };
291
304
  language?: string;
292
305
  os?: string;
306
+ pixelRatio?: number;
307
+ region?: string;
308
+ screenHeight?: number;
309
+ screenWidth?: number;
310
+ viewportHeight?: number;
311
+ viewportWidth?: number;
293
312
  };
313
+ pageViewId?: string;
294
314
  }, boolean>;
295
315
  lastHeartbeat: FunctionReference<"mutation", "public", Record<string, never>, null>;
296
316
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.89",
3
+ "version": "0.1.91",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",