@arkadiuminc/sdk 2.15.1 → 2.16.1

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 CHANGED
@@ -32,7 +32,7 @@ main();
32
32
  ## Reference documents
33
33
 
34
34
  - Analytics
35
- - [App Insights](TODO)
35
+ - [App Insights](https://arkadium.atlassian.net/wiki/spaces/PhoenixGames/pages/23897655/AppInsights+game+integration)
36
36
  - [Standardized Spec for every game](https://arkadium.atlassian.net/wiki/spaces/DepartmentBusinessOperations/pages/23675756/Standardized+Spec+for+every+game+-+GA+AppInsights)
37
37
  - [AppInsight stamper](https://arkadium.atlassian.net/wiki/spaces/PhoenixGames/pages/23993424/AppInsight+stamper)
38
38
  - [Adaptive Sampling Implementation](https://arkadium.atlassian.net/wiki/spaces/PhoenixGames/pages/23897949/Adaptive+Sampling+Implementation)
@@ -104,13 +104,23 @@ export declare class AnalyticsApiProxy implements AnalyticsApiContract {
104
104
  */
105
105
  sendFirstRightAnswerEvent(dimensions?: DimensionsObject): void;
106
106
  /**
107
+ * @deprecated
107
108
  * User made first match (for match-3, mahjongg and other applicable games)
108
109
  */
109
110
  sendFirsMatchEvent(dimensions?: DimensionsObject): void;
110
111
  /**
112
+ * User made first match (for match-3, mahjongg and other applicable games)
113
+ */
114
+ sendFirstMatchEvent(dimensions?: DimensionsObject): void;
115
+ /**
116
+ * @deprecated
111
117
  * User made first shot (for shooters and other applicable games)
112
118
  */
113
119
  sendFirsShotEvent(dimensions?: DimensionsObject): void;
120
+ /**
121
+ * User made first shot (for shooters and other applicable games)
122
+ */
123
+ sendFirstShotEvent(dimensions?: DimensionsObject): void;
114
124
  /**
115
125
  * Users started new Round (Level). First round is Round 1 (not 0) (applicable for games with evergreen logic, not infinite games - before Nest changes to gameplay)
116
126
  */
@@ -8,10 +8,12 @@ declare enum LifecycleEvent {
8
8
  GAME_END = 5,
9
9
  PAUSE_READY = 6,
10
10
  GAME_PAUSE = 7,
11
- GAME_RESUME = 8
11
+ GAME_RESUME = 8,
12
+ GEMS_UPDATE = 9
12
13
  }
13
14
  declare type LifecycleFn = (event: LifecycleEvent, payload?: any) => void;
14
15
  export interface GameLifecycleContract {
16
+ subscribe(fn: LifecycleFn): void;
15
17
  onTestReady(): Promise<void>;
16
18
  onPauseReady(): Promise<void>;
17
19
  onGamePause(): Promise<void>;
@@ -20,7 +22,7 @@ export interface GameLifecycleContract {
20
22
  onInteract(): Promise<void>;
21
23
  onChangeScore(score: number): Promise<void>;
22
24
  onGameEnd(): Promise<void>;
23
- subscribe(fn: LifecycleFn): void;
25
+ onGemsUpdate(): Promise<void>;
24
26
  }
25
27
  /** @hidden */
26
28
  export declare class GameLifecycle implements GameLifecycleContract {
@@ -28,15 +30,16 @@ export declare class GameLifecycle implements GameLifecycleContract {
28
30
  private subscribers;
29
31
  constructor(rpcProvider: RpcProvider);
30
32
  private processLifecycleEvent;
33
+ subscribe(cb: LifecycleFn): void;
31
34
  onTestReady(): Promise<void>;
32
35
  onGameStart(): Promise<void>;
33
36
  onInteract(): Promise<void>;
34
37
  onChangeScore(score: number): Promise<void>;
35
38
  onGameEnd(): Promise<void>;
36
- subscribe(cb: LifecycleFn): void;
37
39
  onGamePause(): Promise<void>;
38
40
  onGameResume(): Promise<void>;
39
41
  onPauseReady(): Promise<void>;
42
+ onGemsUpdate(): Promise<void>;
40
43
  }
41
44
  export declare class GameLifecycleProxy implements GameLifecycleContract {
42
45
  private rpcProvider;
@@ -54,5 +57,6 @@ export declare class GameLifecycleProxy implements GameLifecycleContract {
54
57
  onGamePause(): Promise<void>;
55
58
  onGameResume(): Promise<void>;
56
59
  onPauseReady(): Promise<void>;
60
+ onGemsUpdate(): Promise<void>;
57
61
  }
58
62
  export {};
@@ -1,4 +1,5 @@
1
1
  import { ApiEnv, Backend } from '../backend/backend.api';
2
+ import { GameLifecycleContract } from '../game-lifecycle/game-lifecycle.api';
2
3
 
3
4
  export interface Wallet {
4
5
  init(env: ApiEnv): Promise<void>;
@@ -7,10 +8,11 @@ export interface Wallet {
7
8
  }
8
9
  export declare class WalletGame implements Wallet {
9
10
  private backendApi;
11
+ private lifecycle;
10
12
  private virtualItemsApi;
11
13
  private virtualItemGateway;
12
14
  private currencySku;
13
- constructor(backendApi: Backend);
15
+ constructor(backendApi: Backend, lifecycle: GameLifecycleContract);
14
16
  init(env: ApiEnv): Promise<void>;
15
17
  /**
16
18
  * Allows querying for the wallet balance
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkadiuminc/sdk",
3
- "version": "2.15.1",
3
+ "version": "2.16.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/pkg/arkadium-sdk.umd.js",