@jolibox/types 1.1.49 → 1.1.51

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 const API_GET_SYSTEM_INFO = "API.getSystemInfo";
4
4
  export declare const API_GET_SYSTEM_INFO_SYNC = "API.getSystemInfoSync";
5
5
  export declare const API_ENV = "API.env";
6
6
  export declare const API_IS_NATIVE_SUPPORT = "API.isNativeSupport";
7
+ export declare const API_CALL_HOST_METHOD = "API.callHostMethod";
7
8
  /**
8
9
  * @public
9
10
  * Describes the system information of the device and application environment.
@@ -25,10 +26,15 @@ export interface ISystemInfo {
25
26
  export interface INativeSupportParams {
26
27
  version: string;
27
28
  }
29
+ export interface ICallHostMethodParams {
30
+ method: string;
31
+ params: any;
32
+ }
28
33
  export interface APICommandParams {
29
34
  [API_GET_SYSTEM_INFO]: () => Promise<StandardResponse<ISystemInfo>>;
30
35
  [API_GET_SYSTEM_INFO_SYNC]: () => StandardResponse<ISystemInfo>;
31
36
  [API_ENV]: () => StandardResponse<Omit<Omit<Env, 'hostUserInfo'>, 'schema'>>;
32
37
  [API_IS_NATIVE_SUPPORT]: (params: INativeSupportParams) => StandardResponse<boolean>;
38
+ [API_CALL_HOST_METHOD]: (params: ICallHostMethodParams) => Promise<StandardResponse<void>>;
33
39
  }
34
40
  export type APICommandType = keyof APICommandParams;
@@ -9,11 +9,13 @@ export interface TaskTrackCommandParams {
9
9
  duration?: number;
10
10
  rating?: number;
11
11
  score?: number;
12
+ variation?: string;
12
13
  }) => TaskResponse;
13
14
  [GAME_PLAY_ENDED]: (params: {
14
15
  duration?: number;
15
16
  rating?: number;
16
17
  score: number;
18
+ variation?: string;
17
19
  }) => TaskResponse;
18
20
  [LEVEL_UPGRADE]: (params: {
19
21
  levelId: string | number;
@@ -6,6 +6,7 @@ export declare const ON_MODAL_IFRAME_LOADED = "onModalIframeLoaded";
6
6
  export declare const ON_INTERCEPT_SYSTEM_EXIT = "onInterceptSystemExit";
7
7
  export declare const ON_INTERCEPT_BACK_PRESS = "onInterceptBackPress";
8
8
  export declare const ON_BACK_PRESS = "onBackPress";
9
+ export declare const ON_GLOBAL_CONFIG_CHANGED = "onGlobalConfigChanged";
9
10
  export interface RumtimeEventParams {
10
11
  [DOCUMENT_READY]: (startTime: number) => void;
11
12
  [ON_LOGIN_COMPLETE]: (params: {
@@ -30,4 +31,7 @@ export interface RumtimeEventParams {
30
31
  [ON_BACK_PRESS]: (params: {
31
32
  intercept?: boolean;
32
33
  }) => void;
34
+ [ON_GLOBAL_CONFIG_CHANGED]: (params: {
35
+ globalConfig: any;
36
+ }) => void;
33
37
  }
@@ -16,6 +16,7 @@ export interface TaskTracker {
16
16
  duration?: number;
17
17
  rating?: number;
18
18
  score?: number;
19
+ variation?: string;
19
20
  }): Promise<TaskResponse>;
20
21
  /**
21
22
  * Records completion of a gameplay session with final metrics
@@ -31,6 +32,7 @@ export interface TaskTracker {
31
32
  duration?: number;
32
33
  rating?: number;
33
34
  score: number;
35
+ variation?: string;
34
36
  }): Promise<TaskResponse>;
35
37
  /**
36
38
  * Tracks player progression when they upgrade to a new level
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jolibox/types",
3
3
  "description": "This project is common types used for JS-SDk interfere & implement",
4
- "version": "1.1.49",
4
+ "version": "1.1.51",
5
5
  "typings": "dist/index.d.ts",
6
6
  "license": "MIT",
7
7
  "files": [