zmp-sdk 2.19.0 → 2.20.0
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/dist/browser.min.js +56 -59
- package/dist/index.es.js +56 -59
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/src/apis/index.d.ts +3 -0
- package/dist/types/src/constants.d.ts +1 -0
- package/dist/types/src/services/mock-mp-service.d.ts +2 -1
- package/dist/types/src/services/navigationBar.d.ts +2 -37
- package/dist/types/src/services/zalo-mp-service.d.ts +1 -0
- package/dist/types/src/types/enum.d.ts +2 -1
- package/dist/types/src/types/inputData.d.ts +7 -2
- package/dist/types/src/types/interface.d.ts +2 -1
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ export default class ZaloMiniProgramSDKService extends ZJSBridgeProvider impleme
|
|
|
26
26
|
getLoginStatus(): boolean;
|
|
27
27
|
getAppId(): string;
|
|
28
28
|
getZAppId(): string;
|
|
29
|
+
getDeviceId(): string;
|
|
29
30
|
login(object?: InputDataType.CallbackType): Promise<string>;
|
|
30
31
|
loginZaloV3(): Promise<string | null>;
|
|
31
32
|
loginZaloV4(): Promise<string | null>;
|
|
@@ -61,7 +61,8 @@ export declare enum Events {
|
|
|
61
61
|
AppResumed = "h5.event.resumed",
|
|
62
62
|
NetworkChanged = "h5.event.connection.changed",
|
|
63
63
|
OnDataCallback = "h5.event.webview.result",
|
|
64
|
-
OpenApp = "h5.event.open.mp"
|
|
64
|
+
OpenApp = "h5.event.open.mp",
|
|
65
|
+
AppClose = "h5.event.action.close"
|
|
65
66
|
}
|
|
66
67
|
export declare enum MediaPickerType {
|
|
67
68
|
photo = 4,
|
|
@@ -242,6 +242,7 @@ export declare type OpenChatData = CallbackType & {
|
|
|
242
242
|
type: keyof typeof ChatType;
|
|
243
243
|
sourceId?: any;
|
|
244
244
|
sourceIndex?: any;
|
|
245
|
+
message?: string;
|
|
245
246
|
};
|
|
246
247
|
/**
|
|
247
248
|
* Open Post feed input data
|
|
@@ -361,8 +362,8 @@ export declare type KeepScreen = CallbackType & {
|
|
|
361
362
|
* Save image to gallery
|
|
362
363
|
*/
|
|
363
364
|
export declare type SaveImageToPhotosAlbumType = CallbackType & {
|
|
364
|
-
imageBase64Data
|
|
365
|
-
imageUrl
|
|
365
|
+
imageBase64Data?: string;
|
|
366
|
+
imageUrl?: string;
|
|
366
367
|
};
|
|
367
368
|
/**
|
|
368
369
|
* Open Mini App
|
|
@@ -479,4 +480,8 @@ export declare type CheckTransaction = CallbackType & {
|
|
|
479
480
|
[key: string]: string;
|
|
480
481
|
};
|
|
481
482
|
};
|
|
483
|
+
export declare type ConfigCloseButtonRequest<T> = CallbackType<T> & {
|
|
484
|
+
confirmToExit?: boolean;
|
|
485
|
+
onExit?: () => void;
|
|
486
|
+
};
|
|
482
487
|
export {};
|
|
@@ -5,6 +5,7 @@ import { MediaPickerType } from './enum';
|
|
|
5
5
|
import { SDKCreator } from '..';
|
|
6
6
|
export interface SDKServiceInterface {
|
|
7
7
|
getAppId: () => string;
|
|
8
|
+
getDeviceId: () => string;
|
|
8
9
|
login: (object?: InputDataType.CallbackType) => Promise<string>;
|
|
9
10
|
getLoginStatus: () => boolean;
|
|
10
11
|
getAccessToken: (object?: InputDataType.CallbackType) => Promise<string | null>;
|
|
@@ -13,7 +14,7 @@ export interface SDKServiceInterface {
|
|
|
13
14
|
setNavigationBarTitle: (object: InputDataType.NavBarTitleType) => Promise<any>;
|
|
14
15
|
setNavigationBarColor: (object: InputDataType.NavBarColorType) => Promise<any>;
|
|
15
16
|
setBackgroundColor: (object: InputDataType.BackgroundColorType) => Promise<any>;
|
|
16
|
-
setNavigationBarLeftButton: (
|
|
17
|
+
setNavigationBarLeftButton: (type?: "none" | "back" | "home" | "both", confirmToExit?: 0 | 2) => Promise<any>;
|
|
17
18
|
setDeviceOrientation: (object: InputDataType.DeviceOrientationType) => Promise<void>;
|
|
18
19
|
setStorage: (object: InputDataType.SetStorageDataType) => Promise<{
|
|
19
20
|
errorKeys: Array<string>;
|