zmp-sdk 2.14.1 → 2.15.0-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.
@@ -87,10 +87,12 @@ export declare const ACTION: {
87
87
  ZBROWSER_MPDS: string;
88
88
  WEBVIEW_SET_RESULT: string;
89
89
  MP_GET_NUMBER: string;
90
+ MP_OPEN_PROFILE_PICKER: string;
90
91
  };
91
92
  export declare const ACTION_HAVE_CALLBACK: string[];
92
93
  export declare const RESPONSE_CODE: {
93
94
  BAD_REQUEST: number;
95
+ INTERNAL_SERVER_ERROR: number;
94
96
  UNAUTHORIZED: number;
95
97
  FORBIDDEN: number;
96
98
  };
@@ -57,7 +57,7 @@ export declare abstract class SDKCreator {
57
57
  errorKeys: string[];
58
58
  }>;
59
59
  clearStorage(object: InputDataType.ClearStorageDataType): Promise<void>;
60
- getUserInfo(object?: InputDataType.CallbackType<CallbackDataType.GetUserInfoSuccessCallback>): Promise<CallbackDataType.GetUserInfoSuccessCallback>;
60
+ getUserInfo(object?: InputDataType.GetUserInfoDataType<CallbackDataType.GetUserInfoSuccessCallback>): Promise<CallbackDataType.GetUserInfoSuccessCallback>;
61
61
  getNetworkType(object: InputDataType.CallbackType): Promise<CallbackDataType.NetworkTypeSuccessCallback>;
62
62
  onNetworkStatusChange(callback: (res: InputDataType.OnNetworkStatusChangeCallback) => void): Promise<void>;
63
63
  startBeaconDiscovery(object: InputDataType.StartBeaconDiscoveryDataType): Promise<boolean>;
@@ -103,6 +103,7 @@ export declare abstract class SDKCreator {
103
103
  sendDataToPreviousMiniApp(object: InputDataType.RedirectCallbackData): Promise<void>;
104
104
  onCallbackData(callback: (res: InputDataType.OnCallbackData) => void): Promise<void>;
105
105
  getPhoneNumber(object?: InputDataType.CallbackType<CallbackDataType.GetPhoneNumberSuccessCallBack>): Promise<CallbackDataType.GetPhoneNumberSuccessCallBack>;
106
+ openProfilePicker(object?: InputDataType.CallbackType<CallbackDataType.OpenProfilePickerSuccessCallBack>): Promise<CallbackDataType.OpenProfilePickerSuccessCallBack>;
106
107
  }
107
108
  export declare class ZaloMiniAppSDKCreator extends SDKCreator {
108
109
  protected getInstance(): SDKInterface;
@@ -69,4 +69,5 @@ export interface SDKInterface {
69
69
  sendDataToPreviousMiniApp: (object: InputDataType.RedirectCallbackData) => Promise<void>;
70
70
  onCallbackData: (callback: (res: InputDataType.OnCallbackData) => void) => Promise<void>;
71
71
  getPhoneNumber: (object?: InputDataType.CallbackType<CallbackDataType.GetPhoneNumberSuccessCallBack>) => Promise<CallbackDataType.GetPhoneNumberSuccessCallBack>;
72
+ openProfilePicker: (object?: InputDataType.CallbackType<CallbackDataType.OpenProfilePickerSuccessCallBack>) => Promise<CallbackDataType.OpenProfilePickerSuccessCallBack>;
72
73
  }
@@ -73,4 +73,5 @@ export default class MockSDK implements SDKInterface {
73
73
  once<T extends string>(event: T, fn: (...args: any[]) => void, context?: any): void;
74
74
  off<T extends string>(event: T, fn?: (...args: any[]) => void, context?: any, once?: boolean): void;
75
75
  removeAllListeners(event?: string): void;
76
+ openProfilePicker: (object?: InputDataType.CallbackType) => Promise<CallbackDataType.OpenProfilePickerSuccessCallBack>;
76
77
  }
@@ -81,4 +81,5 @@ export default class ZaloMiniProgramSDK extends ZJSBridgeProvider implements SDK
81
81
  sendDataToPreviousMiniApp: typeof Routing.sendDataToPreviousMiniApp;
82
82
  onCallbackData: typeof Routing.onCallbackData;
83
83
  getPhoneNumber: typeof OpenApi.getPhoneNumber;
84
+ openProfilePicker: typeof Zalo.openProfilePicker;
84
85
  }
@@ -71,4 +71,13 @@ export declare class Zalo {
71
71
  *
72
72
  */
73
73
  static createShortcut(this: ZaloMiniProgramSDK, object: InputDataType.CallbackType): Promise<void>;
74
+ /**
75
+ * Cho phép ứng dụng mở giao diện chọn user và get về list noise id
76
+ *
77
+ * @async
78
+ * @function openProfilePicker
79
+ * @category Zalo
80
+ *
81
+ */
82
+ static openProfilePicker(this: ZaloMiniProgramSDK, object?: InputDataType.CallbackType<CallbackDataType.OpenProfilePickerSuccessCallBack>): Promise<CallbackDataType.OpenProfilePickerSuccessCallBack>;
74
83
  }
@@ -123,3 +123,10 @@ export declare type AppInfoSuccessCallBack = {
123
123
  export declare type GetPhoneNumberSuccessCallBack = {
124
124
  number: string;
125
125
  };
126
+ /**
127
+ * open profile success callback
128
+ * @typedef OpenProfilePickerSuccessCallBack
129
+ */
130
+ export declare type OpenProfilePickerSuccessCallBack = {
131
+ userIDs: Array<string>;
132
+ };
@@ -39,7 +39,8 @@ export declare enum ShareSheetType {
39
39
  gif = 11,
40
40
  video = 12,
41
41
  link = 4,
42
- oa = 5
42
+ oa = 5,
43
+ zmp = "zmp"
43
44
  }
44
45
  export declare enum OrientationType {
45
46
  auto = 1,
@@ -281,6 +281,9 @@ export declare type OpenShareSheet<T> = CallbackType<T> & {
281
281
  link: string;
282
282
  chatOnly: boolean;
283
283
  id: string;
284
+ title: string;
285
+ description: string;
286
+ thumbnail: string;
284
287
  };
285
288
  };
286
289
  /**
@@ -61,3 +61,4 @@ export declare const getAppUrl: (appId: string) => string;
61
61
  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
+ export declare const showUserInfoPermissionModal: (acceptHandler?: (() => void) | undefined, denyHandler?: (() => void) | undefined) => void;
@@ -5,5 +5,7 @@ export declare const apiResponse: {
5
5
  loginRequired: () => CommonError;
6
6
  missingParam: (params: string[] | string) => CommonError;
7
7
  wrongTypeParam: (arg: string, expected: string, got: string) => CommonError;
8
+ cannotGetShareInfo: () => CommonError;
9
+ lengthInvalid: (arg: string) => CommonError;
8
10
  };
9
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmp-sdk",
3
- "version": "2.14.1",
3
+ "version": "2.15.0-1",
4
4
  "description": "Zalo Mini App SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",