@wvdsh/api 0.1.88 → 0.1.90

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,27 @@ 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;
31
+ };
32
+ export type GameplayAttribution = {
33
+ embedAncestors?: string[] | undefined;
34
+ navigation?: {
35
+ campaign?: "continue_playing" | "embed" | "feed" | "friend_playing" | "invitations" | "more_from_developer" | "more_like_this" | "notifications" | "recommended" | "search_results" | undefined;
36
+ fromPageViewId: string;
37
+ position?: number | undefined;
38
+ source: string;
39
+ term?: string | undefined;
40
+ } | undefined;
41
+ pageViewId: string;
42
+ referrer?: string | undefined;
43
+ trackingParams?: {
44
+ [x: string]: string;
45
+ } | undefined;
25
46
  };
26
47
  /**
27
48
  * Default values used by Game SDKs
@@ -137,6 +158,7 @@ export declare const IFRAME_MESSAGE_TYPE: {
137
158
  readonly LOBBY_LEFT: "LobbyLeft";
138
159
  readonly GET_LOBBY_INVITE_LINK: "GetLobbyInviteLink";
139
160
  readonly GET_DEVICE_FINGERPRINT: "GetDeviceFingerprint";
161
+ readonly GET_GAMEPLAY_ATTRIBUTION: "GetGameplayAttribution";
140
162
  readonly SET_FULLSCREEN: "SetFullscreen";
141
163
  readonly TOGGLE_FULLSCREEN: "ToggleFullscreen";
142
164
  readonly FULLSCREEN_CHANGED: "FullscreenChanged";
@@ -177,7 +199,7 @@ export interface SDKConfig {
177
199
  parentOrigin: string;
178
200
  initialVolume: number;
179
201
  }
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;
202
+ 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
203
  export type IFrameEventPayloadMap = {
182
204
  [IFRAME_MESSAGE_TYPE.FULLSCREEN_CHANGED]: {
183
205
  isFullscreen: boolean;
@@ -191,6 +213,7 @@ export type IFrameEventPayloadMap = {
191
213
  [IFRAME_MESSAGE_TYPE.TAKE_FOCUS]: void;
192
214
  [IFRAME_MESSAGE_TYPE.GET_LOBBY_INVITE_LINK]: string;
193
215
  [IFRAME_MESSAGE_TYPE.GET_DEVICE_FINGERPRINT]: DeviceFingerprint;
216
+ [IFRAME_MESSAGE_TYPE.GET_GAMEPLAY_ATTRIBUTION]: GameplayAttribution;
194
217
  [IFRAME_MESSAGE_TYPE.SET_FULLSCREEN]: {
195
218
  success: boolean;
196
219
  };
@@ -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" | "feed" | "search_results" | "more_from_developer" | "more_like_this" | "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,6 +303,12 @@ 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
  };
294
313
  }, boolean>;
295
314
  lastHeartbeat: FunctionReference<"mutation", "public", Record<string, never>, null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.88",
3
+ "version": "0.1.90",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",