@arkadiuminc/sdk 2.8.0 → 2.9.0
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.
|
@@ -27,12 +27,25 @@ interface AuthUIManagerContract {
|
|
|
27
27
|
export declare class Auth {
|
|
28
28
|
private userProfileReader;
|
|
29
29
|
private authUIManager;
|
|
30
|
+
private authProblem;
|
|
30
31
|
constructor(userProfileReader: UserProfileReaderContract, authUIManager: AuthUIManagerContract);
|
|
31
32
|
init(env: ApiEnv): Promise<void>;
|
|
32
33
|
isUserAuthorized(): Promise<boolean>;
|
|
33
34
|
getUserProfile(): Promise<UserProfile | null>;
|
|
34
35
|
onAuthStatusChange(observer: any): () => void;
|
|
35
36
|
openAuthForm(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* this method should be exercised on the game side to let game know about
|
|
39
|
+
* issues that happen during auth outside the scope of direct API calls
|
|
40
|
+
*/
|
|
41
|
+
onAuthProblemChange(observer: any): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* this method should be internally called every time a problem happens
|
|
44
|
+
* outside the scope of direct API calls
|
|
45
|
+
* @private
|
|
46
|
+
* @param error string
|
|
47
|
+
*/
|
|
48
|
+
raiseOnAuthProblem(error: string): void;
|
|
36
49
|
onOpenAuthForm(observer: any): () => void;
|
|
37
50
|
static getArenaApi(backendApi: Backend, host: IHost, rpcProvider: RpcProvider): Auth;
|
|
38
51
|
static getGameApi(backendApi: Backend, host: IHost, rpcProvider: RpcProvider): Auth;
|
|
@@ -35,7 +35,15 @@ export declare class NakamaProvider implements NakamaProviderContract {
|
|
|
35
35
|
private initNakamaSessionViaFingerprint;
|
|
36
36
|
private initNakamaSessionViaEagle;
|
|
37
37
|
private onAuthBootstrap;
|
|
38
|
+
/**
|
|
39
|
+
* this method is called when the user is logged in
|
|
40
|
+
* CAUTION: this method is called from eagle login status change, therefore it can't throw
|
|
41
|
+
*/
|
|
38
42
|
private onEagleLogIn;
|
|
43
|
+
/**
|
|
44
|
+
* this method is called when the user is logged out
|
|
45
|
+
* CAUTION: this method is called from eagle login status change, therefore it can't throw
|
|
46
|
+
*/
|
|
39
47
|
private onEagleLogOut;
|
|
40
48
|
private getAccount;
|
|
41
49
|
}
|
|
@@ -9,6 +9,10 @@ import { TimeoutTesterContract } from './api/core/timeout-tester';
|
|
|
9
9
|
import { PersistenceGame } from './api/features/persistence';
|
|
10
10
|
import { HostGame } from './api/features/host';
|
|
11
11
|
export declare class ArkadiumGameSdk {
|
|
12
|
+
version: string;
|
|
13
|
+
private currentEnv;
|
|
14
|
+
private arenaPingSender;
|
|
15
|
+
private arenaPingListener;
|
|
12
16
|
private rpcProvider;
|
|
13
17
|
backendApi: Backend;
|
|
14
18
|
host: HostGame;
|
|
@@ -19,11 +23,18 @@ export declare class ArkadiumGameSdk {
|
|
|
19
23
|
analytics: AnalyticsApiContract;
|
|
20
24
|
private timeoutTester;
|
|
21
25
|
persistence: PersistenceGame;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
constructor({ rpcProvider, backendApi, host, lifecycle, ads, auth, nakamaProvider, analytics, timeoutTester, persistence }: {
|
|
27
|
+
rpcProvider: RpcProvider;
|
|
28
|
+
backendApi: Backend;
|
|
29
|
+
host: HostGame;
|
|
30
|
+
lifecycle: GameLifecycleContract;
|
|
31
|
+
ads: GameAdsContract;
|
|
32
|
+
auth: Auth;
|
|
33
|
+
nakamaProvider?: NakamaProvider;
|
|
34
|
+
analytics: AnalyticsApiContract;
|
|
35
|
+
timeoutTester: TimeoutTesterContract;
|
|
36
|
+
persistence: PersistenceGame;
|
|
37
|
+
});
|
|
27
38
|
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
28
39
|
getEnv(): ApiEnv;
|
|
29
40
|
updateWinReference(target: any): void;
|