@wvdsh/api 0.1.68 → 0.1.70

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.
@@ -129,6 +129,8 @@ export declare const IFRAME_MESSAGE_TYPE: {
129
129
  readonly SET_FULLSCREEN: "SetFullscreen";
130
130
  readonly TOGGLE_FULLSCREEN: "ToggleFullscreen";
131
131
  readonly FULLSCREEN_CHANGED: "FullscreenChanged";
132
+ readonly VOLUME_CHANGED: "VolumeChanged";
133
+ readonly SDK_FUNCTION_CALLED: "SdkFunctionCalled";
132
134
  readonly SET_MUTE: "SetMute";
133
135
  readonly TOGGLE_MUTE: "ToggleMute";
134
136
  readonly MUTE_CHANGED: "MuteChanged";
@@ -164,12 +166,16 @@ export interface SDKConfig {
164
166
  uploadsHost: string;
165
167
  launchParams: GameLaunchParams;
166
168
  parentOrigin: string;
169
+ initialVolume: number;
167
170
  }
168
171
  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;
169
172
  export type IFrameEventPayloadMap = {
170
173
  [IFRAME_MESSAGE_TYPE.FULLSCREEN_CHANGED]: {
171
174
  isFullscreen: boolean;
172
175
  };
176
+ [IFRAME_MESSAGE_TYPE.VOLUME_CHANGED]: {
177
+ volume: number;
178
+ };
173
179
  [IFRAME_MESSAGE_TYPE.MUTE_CHANGED]: {
174
180
  isMuted: boolean;
175
181
  };
@@ -223,7 +229,6 @@ export declare const UrlParams: {
223
229
  readonly EngineVersion: "engineversion";
224
230
  readonly PlayKey: "pk";
225
231
  readonly SdkConfig: "sdkconfig";
226
- readonly Caller: "caller";
227
232
  readonly VirtualGamepad: "virtualGamepad";
228
233
  readonly GameSlug: "gameSlug";
229
234
  readonly UgcUploadExpires: "exp";
@@ -249,9 +254,6 @@ export declare const UgcStorage: {
249
254
  readonly encodeKeyPath: (objectKey: string) => string;
250
255
  readonly decodeKeyPath: (pathname: string) => string;
251
256
  };
252
- export declare const PlayRouteCaller: {
253
- readonly Wavedash: "wavedash";
254
- };
255
257
  export declare const PAID_CONTENT_PICOMATCH_OPTIONS: {
256
258
  readonly dot: true;
257
259
  };
@@ -109,6 +109,8 @@ export const IFRAME_MESSAGE_TYPE = {
109
109
  SET_FULLSCREEN: 'SetFullscreen',
110
110
  TOGGLE_FULLSCREEN: 'ToggleFullscreen',
111
111
  FULLSCREEN_CHANGED: 'FullscreenChanged',
112
+ VOLUME_CHANGED: 'VolumeChanged',
113
+ SDK_FUNCTION_CALLED: 'SdkFunctionCalled',
112
114
  SET_MUTE: 'SetMute',
113
115
  TOGGLE_MUTE: 'ToggleMute',
114
116
  MUTE_CHANGED: 'MuteChanged',
@@ -141,7 +143,6 @@ export const UrlParams = {
141
143
  EngineVersion: 'engineversion',
142
144
  PlayKey: 'pk',
143
145
  SdkConfig: 'sdkconfig',
144
- Caller: 'caller',
145
146
  VirtualGamepad: 'virtualGamepad',
146
147
  // Read by the cross-origin play iframe for its Sentry tags — it can't read this URL.
147
148
  GameSlug: 'gameSlug',
@@ -203,9 +204,6 @@ export const UgcStorage = {
203
204
  }
204
205
  }
205
206
  };
206
- export const PlayRouteCaller = {
207
- Wavedash: 'wavedash'
208
- };
209
207
  // ========== PAID CONTENT ==========
210
208
  export const PAID_CONTENT_PICOMATCH_OPTIONS = { dot: true };
211
209
  // ========== HEARTBEAT (client-side constants) ==========
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.68",
3
+ "version": "0.1.70",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",