@arkadiuminc/sdk 2.40.0 → 2.41.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.
@@ -10,6 +10,9 @@ interface ConfigSchema {
10
10
  config: {
11
11
  refreshInterval: number;
12
12
  };
13
+ leaderboards: {
14
+ scoreBlacklist: string[];
15
+ };
13
16
  }
14
17
  export declare const schema: {
15
18
  type: string;
@@ -43,6 +46,19 @@ export declare const schema: {
43
46
  required: string[];
44
47
  additionalProperties: boolean;
45
48
  };
49
+ leaderboards: {
50
+ type: string;
51
+ properties: {
52
+ scoreBlacklist: {
53
+ type: string;
54
+ items: {
55
+ type: string;
56
+ };
57
+ };
58
+ };
59
+ required: string[];
60
+ additionalProperties: boolean;
61
+ };
46
62
  };
47
63
  required: string[];
48
64
  additionalProperties: boolean;
@@ -1,4 +1,5 @@
1
1
  import { RpcProvider } from '../../core/rpc';
2
+ import { IHost } from '../host';
2
3
 
3
4
  export declare enum LifecycleEvent {
4
5
  TEST_READY = 1,
@@ -24,10 +25,11 @@ declare global {
24
25
  /** @hidden */
25
26
  export declare class GameLifecycleArena {
26
27
  private rpcProvider;
28
+ private host;
27
29
  private subscribers;
28
30
  LifecycleEvent: typeof LifecycleEvent;
29
- constructor(rpcProvider: RpcProvider);
30
- onEvent(event: LifecycleEvent, payload?: any): void;
31
+ constructor(rpcProvider: RpcProvider, host: IHost);
32
+ onEvent(event: LifecycleEvent, payload?: any): Promise<void>;
31
33
  dispatchEvent(event: LifecycleEvent): Promise<void>;
32
34
  subscribe(cb: LifecycleFn, override?: boolean): void;
33
35
  OnTestReady(): Promise<void>;
@@ -54,7 +56,9 @@ export declare class GameLifecycleGame {
54
56
  * @deprecated The method should not be used
55
57
  */
56
58
  onInteract(): Promise<void>;
57
- onChangeScore(score: number): Promise<void>;
59
+ onChangeScore(score: number | {
60
+ score: number;
61
+ }): Promise<void>;
58
62
  onGameEnd(): Promise<void>;
59
63
  subscribe(fn: LifecycleFn): void;
60
64
  onGamePause(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkadiuminc/sdk",
3
- "version": "2.40.0",
3
+ "version": "2.41.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/pkg/arkadium-sdk.umd.js",