@arkadiuminc/sdk 2.12.0 → 2.13.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.
|
@@ -14,7 +14,7 @@ export declare type SessionStorageType = ReturnType<typeof UserApiGateway.protot
|
|
|
14
14
|
export declare class Backend {
|
|
15
15
|
user: Awaited<ReturnType<typeof UserApiGateway.prototype.getAuthApi>> | null;
|
|
16
16
|
private userGateway;
|
|
17
|
-
userGameData
|
|
17
|
+
private userGameData;
|
|
18
18
|
uiOpenRequest: import('../../utils/observable').Observable<boolean>;
|
|
19
19
|
authStatus: import('../../utils/observable').Observable<boolean>;
|
|
20
20
|
addEventListener(event: number, cb: () => void): void;
|
|
@@ -25,4 +25,5 @@ export declare class Backend {
|
|
|
25
25
|
isUserAuthorized(): boolean;
|
|
26
26
|
openAuthForm(): void;
|
|
27
27
|
logout(): void;
|
|
28
|
+
getUserGameData(): UserGameDataApi | undefined;
|
|
28
29
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { RpcProvider } from '../../core/rpc';
|
|
2
|
+
import { Backend } from '../backend/backend.api';
|
|
2
3
|
import { IHost } from '../host';
|
|
3
4
|
|
|
4
5
|
declare type RemoteStorageValueType = string | object;
|
|
5
6
|
export interface IPersistence {
|
|
7
|
+
getCookie(cookieName: string): Promise<string>;
|
|
6
8
|
getLocalStorageItem(key: string): Promise<string | null>;
|
|
7
9
|
setLocalStorageItem(key: string, value: string): Promise<void>;
|
|
8
10
|
removeLocalStorageItem(key: string): Promise<void>;
|
|
9
|
-
getCookie(cookieName: string): Promise<string>;
|
|
10
11
|
getRemoteStorageItem?(key: string): Promise<RemoteStorageValueType | null>;
|
|
11
12
|
setRemoteStorageItem?(key: string, value: RemoteStorageValueType): Promise<void>;
|
|
12
13
|
removeRemoteStorageItem?(key: string): Promise<boolean>;
|
|
@@ -17,36 +18,29 @@ export declare class PersistenceArena implements IPersistence {
|
|
|
17
18
|
* @internal
|
|
18
19
|
*/
|
|
19
20
|
constructor(rpcProvider: RpcProvider);
|
|
21
|
+
getCookie(cookieName: string): Promise<string>;
|
|
20
22
|
getLocalStorageItem(key: string): Promise<string | null>;
|
|
21
23
|
setLocalStorageItem(key: string, value: string): Promise<void>;
|
|
22
24
|
removeLocalStorageItem(key: string): Promise<void>;
|
|
23
|
-
getCookie(cookieName: string): Promise<string>;
|
|
24
25
|
}
|
|
25
26
|
export declare class PersistenceGame implements IPersistence {
|
|
26
27
|
private rpcProvider;
|
|
27
28
|
private host;
|
|
29
|
+
private backend;
|
|
28
30
|
private remoteStorageBlacklist;
|
|
29
31
|
/**
|
|
30
32
|
* @internal
|
|
31
33
|
*/
|
|
32
|
-
constructor(rpcProvider: RpcProvider, host: IHost);
|
|
34
|
+
constructor(rpcProvider: RpcProvider, host: IHost, backend: Backend);
|
|
35
|
+
getCookie(cookieName: string): Promise<string>;
|
|
33
36
|
getLocalStorageItem(key: string): Promise<string | null>;
|
|
34
37
|
setLocalStorageItem(key: string, value: string): Promise<void>;
|
|
35
38
|
removeLocalStorageItem(key: string): Promise<void>;
|
|
36
|
-
|
|
37
|
-
private
|
|
39
|
+
private getCollection;
|
|
40
|
+
private getRemoteToLocalStorageCollection;
|
|
38
41
|
private isRemoteStorageBlacklisted;
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated The method should not be used
|
|
41
|
-
*/
|
|
42
42
|
getRemoteStorageItem(key: string): Promise<RemoteStorageValueType | null>;
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated The method should not be used
|
|
45
|
-
*/
|
|
46
43
|
setRemoteStorageItem(key: string, value: RemoteStorageValueType): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated The method should not be used
|
|
49
|
-
*/
|
|
50
44
|
removeRemoteStorageItem(key: string): Promise<boolean>;
|
|
51
45
|
}
|
|
52
46
|
export {};
|