@looplay/sdk 0.8.8 → 0.8.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.
- package/README.md +10 -9
- package/dist/looplay-sdk.cjs.js +69 -17
- package/dist/looplay-sdk.cjs.js.map +1 -1
- package/dist/looplay-sdk.esm.js +66 -18
- package/dist/looplay-sdk.esm.js.map +1 -1
- package/dist/looplay-sdk.min.js +5 -5
- package/dist/looplay-sdk.min.js.map +1 -1
- package/dist/types/apps/api-client.d.ts +1 -1
- package/dist/types/apps/http.d.ts +2 -2
- package/dist/types/constants.d.ts +20 -0
- package/dist/types/iframe/iframe-auth.d.ts +1 -1
- package/dist/types/iframe/types.d.ts +4 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -37,7 +37,7 @@ export declare class LooplayIframeAuth {
|
|
|
37
37
|
constructor(options?: LooplayIframeAuthOptions);
|
|
38
38
|
getState(): LooplayIframeAuthState;
|
|
39
39
|
getJwt(): string | null;
|
|
40
|
-
getApiUrl(): string
|
|
40
|
+
getApiUrl(): string;
|
|
41
41
|
/** Resolves to the configured `appId`, falling back to whatever the parent pushed as `gameId`. */
|
|
42
42
|
getGameId(): string | null;
|
|
43
43
|
getAnonymousId(): string | null;
|
|
@@ -17,12 +17,12 @@ export interface LooplayIframeAuthOptions {
|
|
|
17
17
|
*/
|
|
18
18
|
appId?: string;
|
|
19
19
|
/**
|
|
20
|
-
* Backend API base URL.
|
|
21
|
-
*
|
|
22
|
-
* pushes.
|
|
20
|
+
* Backend API base URL. Defaults to `import.meta.env.VITE_API_URL` or
|
|
21
|
+
* `'https://api.looplay.gg'`. When embedded and omitted, falls back to
|
|
22
|
+
* whatever `apiUrl` the parent pushes.
|
|
23
23
|
*/
|
|
24
24
|
apiUrl?: string;
|
|
25
|
-
/** Restrict accepted postMessage origin. Defaults to `document.referrer`'s origin. */
|
|
25
|
+
/** Restrict accepted postMessage origin. Defaults to `import.meta.env.VITE_PARENT_ORIGIN` or `document.referrer`'s origin. */
|
|
26
26
|
parentOrigin?: string;
|
|
27
27
|
/** Opt-in tracing hook; called for every internal step (auth received, tracking calls, ...). */
|
|
28
28
|
onDebug?: (message: string, details?: Record<string, unknown>) => void;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { LooplayAuthOptions } from './auth/types';
|
|
|
2
2
|
import type { FetchLike } from './apps/http';
|
|
3
3
|
export interface LooplaySDKCreateOptions {
|
|
4
4
|
auth?: LooplayAuthOptions;
|
|
5
|
+
/** Backend API base URL. Defaults to `import.meta.env.VITE_API_URL` or `'https://api.looplay.gg'`. */
|
|
5
6
|
baseUrl?: string;
|
|
6
7
|
fetch?: FetchLike;
|
|
7
8
|
defaultHeaders?: Record<string, string>;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LOOPLAY_SDK_VERSION = "0.8.
|
|
1
|
+
export declare const LOOPLAY_SDK_VERSION = "0.8.10";
|