@wvdsh/api 0.1.17 → 0.1.19
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.
|
@@ -106,6 +106,18 @@ export declare const IFRAME_MESSAGE_TYPE: {
|
|
|
106
106
|
readonly GAMEPLAY_JWT_READY: "GameplayJwtReady";
|
|
107
107
|
readonly END_SESSION: "EndSession";
|
|
108
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
|
+
};
|
|
109
121
|
export interface IFrameResponse<T> {
|
|
110
122
|
requestId: string;
|
|
111
123
|
requestType: (typeof IFRAME_MESSAGE_TYPE)[keyof typeof IFRAME_MESSAGE_TYPE];
|
|
@@ -150,7 +162,6 @@ export interface GameLaunchParams {
|
|
|
150
162
|
[key: string]: string | undefined;
|
|
151
163
|
}
|
|
152
164
|
export declare const UrlParams: {
|
|
153
|
-
readonly GameCloudId: "gcid";
|
|
154
165
|
readonly RedirectUrl: "rdurl";
|
|
155
166
|
readonly EntrypointParams: "entrypointparams";
|
|
156
167
|
readonly Entrypoint: "entrypoint";
|
|
@@ -83,9 +83,23 @@ export const IFRAME_MESSAGE_TYPE = {
|
|
|
83
83
|
GAMEPLAY_JWT_READY: 'GameplayJwtReady',
|
|
84
84
|
END_SESSION: 'EndSession'
|
|
85
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
|
+
};
|
|
86
101
|
// URL params referenced by external consumers
|
|
87
102
|
export const UrlParams = {
|
|
88
|
-
GameCloudId: 'gcid',
|
|
89
103
|
RedirectUrl: 'rdurl',
|
|
90
104
|
EntrypointParams: 'entrypointparams',
|
|
91
105
|
Entrypoint: 'entrypoint',
|