zmp-sdk 2.15.0 → 2.15.4

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.
@@ -3,6 +3,7 @@ import { NativeError } from './middleware/error.middleware';
3
3
  /** @ignore */
4
4
  export declare abstract class ZJSBridgeProvider {
5
5
  #private;
6
+ private readonly debug;
6
7
  /** @ignore */
7
8
  constructor();
8
9
  protected setZAccSession(value: string): void;
@@ -39,3 +39,11 @@ export declare const ZALO_SUPPORT_STORAGE_VERSION: {
39
39
  unknown: number;
40
40
  };
41
41
  export declare const ZALO_IOS_ACTIONS_SUPPORTED_BEFORE_VER_402: string[];
42
+ export declare const ACTION_LEFT_BUTTON_TYPE: {
43
+ SHOW_BACK: number;
44
+ HIDE_BACK: number;
45
+ SHOW_HOME: number;
46
+ HIDE_HOME: number;
47
+ };
48
+ export declare const SHOW_ACTION_BAR = 5;
49
+ export declare const HIDE_ACTION_BAR = 6;
@@ -105,6 +105,7 @@ export declare abstract class SDKCreator {
105
105
  onCallbackData(callback: (res: InputDataType.OnCallbackData) => void): Promise<void>;
106
106
  getPhoneNumber(object?: InputDataType.CallbackType<CallbackDataType.GetPhoneNumberSuccessCallBack>): Promise<CallbackDataType.GetPhoneNumberSuccessCallBack>;
107
107
  openProfilePicker(object: InputDataType.OpenProfilePicker<CallbackDataType.OpenProfilePickerSuccessCallBack>): Promise<CallbackDataType.OpenProfilePickerSuccessCallBack>;
108
+ getShareableLink(object: InputDataType.GetShareableLink<string>): Promise<string>;
108
109
  }
109
110
  export declare class ZaloMiniAppSDKCreator extends SDKCreator {
110
111
  protected getInstance(): SDKInterface;
@@ -17,10 +17,11 @@ export default class ZaloMiniProgramSDK extends ZJSBridgeProvider implements SDK
17
17
  #private;
18
18
  events: ZMPEEmitter;
19
19
  isShowNavBar: boolean;
20
- isShowHomeButton: boolean;
21
20
  private static instance;
22
21
  static getInstance(): ZaloMiniProgramSDK;
23
22
  constructor();
23
+ getActionBarConfig: () => InputDataType.ActionBarConfig;
24
+ setActionBarConfig: (setState: (state: InputDataType.ActionBarConfig) => InputDataType.ActionBarConfig) => void;
24
25
  getLoginStatus(): boolean;
25
26
  getAppId(): string;
26
27
  getZAppId(): string;
@@ -411,4 +411,30 @@ export declare type GetUserInfoDataType<T> = CallbackType<T> & {
411
411
  export declare type OpenProfilePicker<T> = CallbackType<T> & {
412
412
  maxProfile?: number;
413
413
  };
414
+ export declare type ActionBarConfig = {
415
+ actionbarType: number;
416
+ buttonType: number;
417
+ dataConfig: {
418
+ backgroundColor: string;
419
+ textColor: string;
420
+ viewInLeftType: number;
421
+ confirmToExit: number;
422
+ };
423
+ homeConfig: {
424
+ enable: number;
425
+ url: string;
426
+ };
427
+ };
428
+ /**
429
+ * get zmp shareable link
430
+ */
431
+ export declare type GetShareableLink<T> = CallbackType<T> & {
432
+ title: string;
433
+ description: string | {
434
+ vi?: string;
435
+ en?: string;
436
+ };
437
+ thumbnail: string;
438
+ path: string;
439
+ };
414
440
  export {};
@@ -62,3 +62,11 @@ export declare const isSupportNativeStorage: () => boolean;
62
62
  export declare const stringifyData: (data: any) => string;
63
63
  export declare const stringToData: (data: string | null) => any;
64
64
  export declare const checkIOSSupportAction: (action: string) => boolean;
65
+ export declare const getZMPShareInfo: (appID: string, accessToken: string, shareTitle: string, shareDescription: string | {
66
+ vi?: string;
67
+ en?: string;
68
+ }, shareThumbnail: string, sharePath?: string | undefined) => Promise<{
69
+ zinstantApi: string;
70
+ shareId: string;
71
+ shareableLink: string;
72
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmp-sdk",
3
- "version": "2.15.0",
3
+ "version": "2.15.4",
4
4
  "description": "Zalo Mini App SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",