@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.
@@ -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
- /** Idempotent; auto-emits GAME_STARTED exactly once per distinct auth session (bearer or anonymous). */
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;
@@ -4,4 +4,5 @@ export * from './errors';
4
4
  export * from './auth';
5
5
  export * from './apps';
6
6
  export * from './iframe';
7
+ export * from './version';
7
8
  export type { GameEventKey } from '@looplay/types';
@@ -0,0 +1 @@
1
+ export declare const LOOPLAY_SDK_VERSION = "0.8.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looplay/sdk",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "description": "LooplaySDK (auth + points) for game integrations",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",