@wvdsh/api 0.1.16 → 0.1.18

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.
@@ -35,6 +35,7 @@ export declare const GAME_ENGINE: {
35
35
  readonly UNREAL: "UNREAL";
36
36
  readonly JSDOS: "JSDOS";
37
37
  readonly RUFFLE: "RUFFLE";
38
+ readonly RENPY: "RENPY";
38
39
  readonly CUSTOM: "CUSTOM";
39
40
  };
40
41
  export declare const LOBBY_DEFAULTS: {
@@ -105,6 +106,18 @@ export declare const IFRAME_MESSAGE_TYPE: {
105
106
  readonly GAMEPLAY_JWT_READY: "GameplayJwtReady";
106
107
  readonly END_SESSION: "EndSession";
107
108
  };
109
+ export declare const SERVICE_WORKER_MESSAGE_TYPE: {
110
+ readonly EMBED_CONFIGURE: "embed.configure";
111
+ readonly EMBED_CONFIGURE_ACK: "embed.configure:ack";
112
+ readonly EMBED_JWT_UPDATE: "embed.jwt-update";
113
+ readonly EMBED_CREDS_REQUEST: "embed.creds-request";
114
+ readonly EMBED_CREDS_RESPONSE: "embed.creds-response";
115
+ };
116
+ export declare const SW_PRELOAD_MESSAGE_TYPE: {
117
+ readonly PROGRESS: "sw-progress";
118
+ readonly READY: "sw-ready";
119
+ readonly FAILED: "sw-failed";
120
+ };
108
121
  export interface IFrameResponse<T> {
109
122
  requestId: string;
110
123
  requestType: (typeof IFRAME_MESSAGE_TYPE)[keyof typeof IFRAME_MESSAGE_TYPE];
@@ -7,6 +7,7 @@ export const GAME_ENGINE = {
7
7
  UNREAL: 'UNREAL',
8
8
  JSDOS: 'JSDOS',
9
9
  RUFFLE: 'RUFFLE',
10
+ RENPY: 'RENPY',
10
11
  CUSTOM: 'CUSTOM'
11
12
  };
12
13
  // ========== LOBBIES ==========
@@ -82,6 +83,21 @@ export const IFRAME_MESSAGE_TYPE = {
82
83
  GAMEPLAY_JWT_READY: 'GameplayJwtReady',
83
84
  END_SESSION: 'EndSession'
84
85
  };
86
+ // Wire types for messages on the page ↔ service-worker MessageChannel.
87
+ // Mirror of play's ServiceWorkerMessageType enum — kept here so the SDK and
88
+ // mainsite can replace inline string literals once @wvdsh/api is republished.
89
+ export const SERVICE_WORKER_MESSAGE_TYPE = {
90
+ EMBED_CONFIGURE: 'embed.configure',
91
+ EMBED_CONFIGURE_ACK: 'embed.configure:ack',
92
+ EMBED_JWT_UPDATE: 'embed.jwt-update',
93
+ EMBED_CREDS_REQUEST: 'embed.creds-request',
94
+ EMBED_CREDS_RESPONSE: 'embed.creds-response'
95
+ };
96
+ export const SW_PRELOAD_MESSAGE_TYPE = {
97
+ PROGRESS: 'sw-progress',
98
+ READY: 'sw-ready',
99
+ FAILED: 'sw-failed'
100
+ };
85
101
  // URL params referenced by external consumers
86
102
  export const UrlParams = {
87
103
  GameCloudId: 'gcid',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",