@jolibox/types 1.1.11 → 1.1.13-beta.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.
@@ -8,6 +8,7 @@ import { StorageCommandParams } from './storage';
8
8
  import { TaskTrackCommandParams } from './task-track';
9
9
  import { KeyboardCommandParams } from './native/keyboard';
10
10
  import { LoginCommandParams } from './native/login';
11
+ import { RouterCommandParams } from './native/navigate';
11
12
  export * from './runtime';
12
13
  export * from './report';
13
14
  export * from './api';
@@ -19,5 +20,6 @@ export * from './storage';
19
20
  export * from './task-track';
20
21
  export * from './native/keyboard';
21
22
  export * from './native/login';
22
- export type CommandParamsMap = RumtimeCommandParams & ReportCommandParams & APICommandParams & AdsCommandParams & LifeCycleCommandParams & HttpCommandParams & StorageCommandParams & KeyboardCommandParams & TaskTrackCommandParams & LoginCommandParams;
23
+ export * from './native/navigate';
24
+ export type CommandParamsMap = RumtimeCommandParams & ReportCommandParams & APICommandParams & AdsCommandParams & LifeCycleCommandParams & HttpCommandParams & StorageCommandParams & KeyboardCommandParams & TaskTrackCommandParams & LoginCommandParams & RouterCommandParams;
23
25
  export type CommandType = keyof CommandParamsMap;
@@ -4,7 +4,7 @@ export declare const LIFECYCLE_ONREADYEVENT = "LifecycleSDK.onReady";
4
4
  export declare const LIFECYCLE_ONGSHOW_EVENT = "LifecycleSDK.onJoliboxShow";
5
5
  export declare const LIFECYCLE_ONGHIDE_EVENT = "LifecycleSDK.onJoliboxHide";
6
6
  export interface LifeCycleCommandParams {
7
- [LIFECYCLE_EXITGAME]: (onBeforeExit: () => void) => void;
7
+ [LIFECYCLE_EXITGAME]: (onBeforeExit: () => void, shouldStay?: boolean) => void;
8
8
  [LIFECYCLE_ONREADYEVENT]: (onReady: (info?: Env['hostUserInfo']) => void) => void;
9
9
  [LIFECYCLE_ONGSHOW_EVENT]: (onShow: () => void) => void;
10
10
  [LIFECYCLE_ONGHIDE_EVENT]: (onHide: () => void) => void;
@@ -0,0 +1,12 @@
1
+ export declare const ROUTER_SDK_OPEN_SCHEMA = "RouterSDK.openSchema";
2
+ export declare const ROUTER_SDK_OPEN_PAGE = "RouterSDK.openPage";
3
+ export declare const ROUTER_SDK_CLOSE_PAGE = "RouterSDK.closePage";
4
+ import { StandardResponse } from '../response';
5
+ export interface RouterCommandParams {
6
+ [ROUTER_SDK_OPEN_SCHEMA]: (schema: string) => StandardResponse<void>;
7
+ [ROUTER_SDK_OPEN_PAGE]: (url: string) => StandardResponse<{
8
+ webviewId: number;
9
+ }>;
10
+ [ROUTER_SDK_CLOSE_PAGE]: (webviewId: number) => StandardResponse<void>;
11
+ }
12
+ export type RouterCommandType = keyof RouterCommandParams;
package/dist/env.d.ts CHANGED
@@ -27,4 +27,5 @@ export interface Env {
27
27
  platform: 'iOS' | 'android' | 'h5';
28
28
  clientSessionId?: string;
29
29
  webviewId?: number;
30
+ orientation?: 'HORIZONTAL' | 'VERTICAL';
30
31
  }
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './sdks/lifecycle';
3
3
  export * from './sdks/storage';
4
4
  export * from './sdks/task-tracker';
5
5
  export * from './sdks/native/keyboard';
6
+ export * from './sdks/router';
6
7
  export * from './events';
7
8
  export * from './commands';
8
9
  export * from './common';
@@ -3,7 +3,8 @@ export interface Lifecycle {
3
3
  onReady: (params: (info: Env['hostUserInfo']) => void) => void;
4
4
  onJoliboxShow: (params: () => void) => void;
5
5
  onJoliboxHide: (params: () => void) => void;
6
- exit: (param: {
6
+ exit: (params: {
7
7
  onBeforeExit: () => void;
8
+ shouldStay?: boolean;
8
9
  }) => void;
9
10
  }
@@ -0,0 +1,8 @@
1
+ import { StandardResponse } from '../commands';
2
+ export interface Router {
3
+ openSchema: (schema: string) => Promise<StandardResponse<void>>;
4
+ openPage: (url: string) => Promise<StandardResponse<{
5
+ webviewId: number;
6
+ }>>;
7
+ closePage: (webviewId: number) => Promise<StandardResponse<void>>;
8
+ }
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.11",
4
+ "version": "1.1.13-beta.1",
5
5
  "typings": "dist/index.d.ts",
6
6
  "license": "MIT",
7
7
  "files": [