@wvdsh/api 0.1.9 → 0.1.11

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.
@@ -102,6 +102,8 @@ export declare const IFRAME_MESSAGE_TYPE: {
102
102
  readonly SET_FULLSCREEN: "SetFullscreen";
103
103
  readonly TOGGLE_FULLSCREEN: "ToggleFullscreen";
104
104
  readonly FULLSCREEN_CHANGED: "FullscreenChanged";
105
+ readonly GAMEPLAY_JWT_READY: "GameplayJwtReady";
106
+ readonly END_SESSION: "EndSession";
105
107
  };
106
108
  export interface IFrameResponse<T> {
107
109
  requestId: string;
@@ -138,6 +140,10 @@ export type IFrameEventPayloadMap = {
138
140
  success: boolean;
139
141
  isFullscreen: boolean;
140
142
  };
143
+ [IFRAME_MESSAGE_TYPE.END_SESSION]: void;
144
+ [IFRAME_MESSAGE_TYPE.GAMEPLAY_JWT_READY]: {
145
+ gameplayJwt: string;
146
+ };
141
147
  };
142
148
  export interface GameLaunchParams {
143
149
  lobby?: GenericId<'lobbies'>;
@@ -78,7 +78,9 @@ export const IFRAME_MESSAGE_TYPE = {
78
78
  GET_DEVICE_FINGERPRINT: 'GetDeviceFingerprint',
79
79
  SET_FULLSCREEN: 'SetFullscreen',
80
80
  TOGGLE_FULLSCREEN: 'ToggleFullscreen',
81
- FULLSCREEN_CHANGED: 'FullscreenChanged'
81
+ FULLSCREEN_CHANGED: 'FullscreenChanged',
82
+ GAMEPLAY_JWT_READY: 'GameplayJwtReady',
83
+ END_SESSION: 'EndSession'
82
84
  };
83
85
  // URL params referenced by external consumers
84
86
  export const UrlParams = {
@@ -230,13 +230,6 @@ export type PublicApiType = {
230
230
  }>;
231
231
  };
232
232
  presence: {
233
- endGameplaySession: FunctionReference<"mutation", "public", {
234
- achievements?: Array<string>;
235
- stats?: Array<{
236
- identifier: string;
237
- value: number;
238
- }>;
239
- }, null>;
240
233
  heartbeat: FunctionReference<"mutation", "public", {
241
234
  data?: Record<string, any>;
242
235
  deviceFingerprint?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",