@arkadiuminc/sdk
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -15,4 +15,11 @@ import { ApiGateway as UserApiGateway } from '@arkadium/eagle-user-client'; | ||
userGameData: UserGameDataApi | null; | ||
uiOpenRequest: { | ||
observers: import("../../utils/observable").ObserverFn<boolean>[]; | ||
value: boolean; | ||
subscribe: (observer: import("../../utils/observable").ObserverFn<boolean>) => void; | ||
update(newValue: boolean): void; | ||
}; | ||
init(e: ApiEnv, isGameSide: boolean): Promise<void>; | ||
isUserAuthorized(): boolean; | ||
openAuthForm(): void; | ||
} |
import { GameIdReaderContract } from '../environment/environment.api'; | ||
import { BackendApi } from '../backend/backend.api'; | ||
declare class SaveDataContract<T> { | ||
__cloudMeta__: { | ||
__version: number; | ||
}; | ||
data: T | null; | ||
clone<T>(p: Partial<SaveDataContract<T>>): SaveDataContract<T>; | ||
} | ||
export interface GameStateContract { | ||
@@ -11,2 +18,3 @@ loadGameState(key: string): Promise<any>; | ||
private gameIdReader; | ||
private knownStates; | ||
constructor(backendApi: BackendApi, gameIdReader: GameIdReaderContract); | ||
@@ -17,11 +25,19 @@ private getGameId; | ||
private isUserAuthorized; | ||
loadGameState(key: string): Promise<Record<any, any> | null>; | ||
private getStorageKey; | ||
loadGameState<T>(key: string): Promise<{ | ||
cloud: SaveDataContract<T>; | ||
local: SaveDataContract<T>; | ||
}>; | ||
private loadData; | ||
saveGameState(key: string, state: Record<any, any>): Promise<void>; | ||
private saveData; | ||
private isStateOutdated; | ||
saveGameState<T>(key: string, state: SaveDataContract<T>): Promise<void>; | ||
private saveDataToStorage; | ||
} | ||
export declare class GameStateApiProxy { | ||
loadGameState(): Promise<any>; | ||
saveGameState(state: any): Promise<any>; | ||
loadGameState<T>(key: string): Promise<{ | ||
cloud: SaveDataContract<T>; | ||
local: SaveDataContract<T>; | ||
}>; | ||
saveGameState<T>(key: string, state: SaveDataContract<T>): Promise<void>; | ||
} | ||
export {}; |
@@ -6,2 +6,3 @@ import { ApiEnv, BackendApi } from './api/features/backend/backend.api'; | ||
import { AdsApi } from './api/features/ads/'; | ||
import { UserStateApi } from './api/features/user-state/user-state.api'; | ||
export declare class ArkadiumGameSdk { | ||
@@ -13,3 +14,4 @@ backendApi: BackendApi; | ||
ads: AdsApi; | ||
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi); | ||
userStateApi: UserStateApi; | ||
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi); | ||
initialize(env: ApiEnv, isGameSide: boolean): Promise<void>; | ||
@@ -16,0 +18,0 @@ updateWinReference(target: any): void; |
@@ -6,2 +6,3 @@ import { ApiEnv, BackendApi } from './api/features/backend/backend.api'; | ||
import { AdsApi } from './api/features/ads/'; | ||
import { UserStateApi } from './api/features/user-state/user-state.api'; | ||
export declare class ArkadiumGameSdk { | ||
@@ -13,3 +14,4 @@ backendApi: BackendApi; | ||
ads: AdsApi; | ||
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi); | ||
userStateApi: UserStateApi; | ||
constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi); | ||
initialize(env: ApiEnv, isGameSide: boolean): Promise<void>; | ||
@@ -16,0 +18,0 @@ updateWinReference(target: any): void; |
{ | ||
"name": "@arkadiuminc/sdk", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "", | ||
@@ -128,3 +128,6 @@ "keywords": [], | ||
"vite-plugin-dts": "^3.6.3" | ||
}, | ||
"dependencies": { | ||
"jsonpack": "^1.1.5" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17872
21
334
1
+ Addedjsonpack@^1.1.5
+ Addedjsonpack@1.1.5(transitive)