@wvdsh/api 0.1.8 → 0.1.10
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,7 @@ 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 END_SESSION: "EndSession";
|
|
105
106
|
};
|
|
106
107
|
export interface IFrameResponse<T> {
|
|
107
108
|
requestId: string;
|
|
@@ -121,6 +122,7 @@ export interface SDKConfig {
|
|
|
121
122
|
ugcHost: string;
|
|
122
123
|
uploadsHost: string;
|
|
123
124
|
launchParams: GameLaunchParams;
|
|
125
|
+
parentOrigin: string;
|
|
124
126
|
}
|
|
125
127
|
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;
|
|
126
128
|
export type IFrameEventPayloadMap = {
|
|
@@ -137,6 +139,7 @@ export type IFrameEventPayloadMap = {
|
|
|
137
139
|
success: boolean;
|
|
138
140
|
isFullscreen: boolean;
|
|
139
141
|
};
|
|
142
|
+
[IFRAME_MESSAGE_TYPE.END_SESSION]: void;
|
|
140
143
|
};
|
|
141
144
|
export interface GameLaunchParams {
|
|
142
145
|
lobby?: GenericId<'lobbies'>;
|
|
@@ -78,7 +78,8 @@ 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
|
+
END_SESSION: 'EndSession'
|
|
82
83
|
};
|
|
83
84
|
// URL params referenced by external consumers
|
|
84
85
|
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?: {
|