@looplay/sdk 0.8.5 → 0.8.7
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.
- package/dist/looplay-sdk.cjs.js +95 -10
- package/dist/looplay-sdk.cjs.js.map +1 -1
- package/dist/looplay-sdk.esm.js +95 -11
- package/dist/looplay-sdk.esm.js.map +1 -1
- package/dist/looplay-sdk.min.js +5 -2
- package/dist/looplay-sdk.min.js.map +1 -1
- package/dist/types/apps/LooplaySDK.types.d.ts +6 -0
- package/dist/types/apps/api-client.d.ts +3 -0
- package/dist/types/apps/service-client.d.ts +8 -1
- package/dist/types/iframe/iframe-auth.d.ts +12 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/version.d.ts +1 -0
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export declare class LooplayIframeAuth {
|
|
|
22
22
|
private initialized;
|
|
23
23
|
private lifecycleTrackingInitialized;
|
|
24
24
|
private lastGameStartedKey;
|
|
25
|
+
private readonly integrationDetectionKeys;
|
|
25
26
|
private client;
|
|
26
27
|
private readonly listeners;
|
|
27
28
|
private readonly options;
|
|
@@ -64,7 +65,15 @@ export declare class LooplayIframeAuth {
|
|
|
64
65
|
trackPlay(playTimeSeconds?: number): Promise<boolean>;
|
|
65
66
|
trackMatch(matchId: string, opts: TrackMatchOptions): Promise<boolean>;
|
|
66
67
|
emitGameEvent(actionCode: GameEventKey | string, opts?: EmitGameEventOptions): Promise<EmitGameEventResponse | null>;
|
|
67
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Idempotent; auto-emits GAME_STARTED exactly once per distinct auth
|
|
70
|
+
* session (bearer or anonymous), and self-reports SDK integration the
|
|
71
|
+
* same way the standalone `LooplaySDK.init()` does — without this, games
|
|
72
|
+
* embedded via iframe never trigger the active detect call, only the
|
|
73
|
+
* passive heartbeat that tracking calls leave behind (which doesn't fire
|
|
74
|
+
* at all while the game is still IN_REVIEW/not LIVE, since tracking is
|
|
75
|
+
* blocked until then).
|
|
76
|
+
*/
|
|
68
77
|
initLifecycleTracking(): void;
|
|
69
78
|
private getTrackingKey;
|
|
70
79
|
/** Generates (or restores) a persisted anonymous device id and activates anonymous tracking. */
|
|
@@ -74,6 +83,8 @@ export declare class LooplayIframeAuth {
|
|
|
74
83
|
private handleRequestAdsUnavailable;
|
|
75
84
|
private handleIncomingMessage;
|
|
76
85
|
private setState;
|
|
86
|
+
/** Detects each resolved game/API pair at most once for this iframe session. */
|
|
87
|
+
private detectIntegrationOnce;
|
|
77
88
|
private resolveParentOrigin;
|
|
78
89
|
private debug;
|
|
79
90
|
private recordAutoRequestAdsActivity;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LOOPLAY_SDK_VERSION = "0.8.5";
|