@arkadiuminc/sdk 0.0.18 → 0.0.20

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.
@@ -4,6 +4,7 @@ export declare enum ApiEnv {
4
4
  DEV = "DEV",
5
5
  PROD = "PROD"
6
6
  }
7
+ export declare type SessionStorageType = ReturnType<typeof UserApiGateway.prototype.getSessionStorage>;
7
8
  export declare class BackendApi {
8
9
  user: Awaited<ReturnType<typeof UserApiGateway.prototype.getAuthApi>> | null;
9
10
  private paymentsApiGateway;
@@ -23,7 +24,7 @@ export declare class BackendApi {
23
24
  update(newValue: boolean): void;
24
25
  };
25
26
  addEventListener(event: number, cb: () => void): void;
26
- init(e: ApiEnv, isGameSide: boolean): Promise<void>;
27
+ init(e: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
27
28
  checkAuth(): void;
28
29
  isUserAuthorized(): boolean;
29
30
  openAuthForm(): void;
@@ -1,4 +1,4 @@
1
- import { ApiEnv, BackendApi } from './api/features/backend/backend.api';
1
+ import { ApiEnv, BackendApi, SessionStorageType } from './api/features/backend/backend.api';
2
2
  import { GameStateContract } from './api/features/game-state/game-state.api';
3
3
  import { GameLifecycleContract } from './api/features/game-lifecycle/game-lifecycle.api';
4
4
  import { EnvironmentApi } from './api/features/environment/environment.api';
@@ -14,7 +14,7 @@ export declare class ArkadiumGameSdk {
14
14
  userStateApi: UserStateApi;
15
15
  analytics: AnalyticsApiContract;
16
16
  constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract);
17
- initialize(env: ApiEnv, isGameSide: boolean): Promise<void>;
17
+ initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
18
18
  updateWinReference(target: any): void;
19
19
  }
20
20
  export { ApiEnv };
@@ -26,5 +26,5 @@ export declare class GameApi {
26
26
  export declare class ArenaApi {
27
27
  version: string;
28
28
  private static sdk;
29
- static getInstance(env: ApiEnv): Promise<ArkadiumGameSdk>;
29
+ static getInstance(env: ApiEnv, deferInit?: boolean): Promise<ArkadiumGameSdk>;
30
30
  }
@@ -1,4 +1,4 @@
1
- import { ApiEnv, BackendApi } from './api/features/backend/backend.api';
1
+ import { ApiEnv, BackendApi, SessionStorageType } from './api/features/backend/backend.api';
2
2
  import { GameStateContract } from './api/features/game-state/game-state.api';
3
3
  import { GameLifecycleContract } from './api/features/game-lifecycle/game-lifecycle.api';
4
4
  import { EnvironmentApi } from './api/features/environment/environment.api';
@@ -14,7 +14,7 @@ export declare class ArkadiumGameSdk {
14
14
  userStateApi: UserStateApi;
15
15
  analytics: AnalyticsApiContract;
16
16
  constructor(backendApi: BackendApi, environment: EnvironmentApi, gameState: GameStateContract, lifecycle: GameLifecycleContract, ads: AdsApi, userStateApi: UserStateApi, analytics: AnalyticsApiContract);
17
- initialize(env: ApiEnv, isGameSide: boolean): Promise<void>;
17
+ initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
18
18
  updateWinReference(target: any): void;
19
19
  }
20
20
  export { ApiEnv };
@@ -26,5 +26,5 @@ export declare class GameApi {
26
26
  export declare class ArenaApi {
27
27
  version: string;
28
28
  private static sdk;
29
- static getInstance(env: ApiEnv): Promise<ArkadiumGameSdk>;
29
+ static getInstance(env: ApiEnv, deferInit?: boolean): Promise<ArkadiumGameSdk>;
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkadiuminc/sdk",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/pkg/arkadium-sdk.umd.js",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "devDependencies": {
89
89
  "@arkadium/eagle-payments-api-client": "^0.0.35",
90
- "@arkadium/eagle-user-client": "^0.0.84",
90
+ "@arkadium/eagle-user-client": "^0.0.85",
91
91
  "@arkadium/eagle-virtual-items-api-client": "^0.0.27",
92
92
  "@commitlint/cli": "^17.0.3",
93
93
  "@commitlint/config-conventional": "^17.0.3",