zmp-sdk 2.47.2 → 2.48.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/apis/apis/authorize.js +1 -1
- package/apis/apis/native-storage/clear.js +1 -1
- package/apis/apis/native-storage/getItem.js +1 -1
- package/apis/apis/native-storage/getStorageInfoSync.js +1 -1
- package/apis/apis/native-storage/removeItem.js +1 -1
- package/apis/apis/native-storage/setItem.js +1 -1
- package/apis/apis/openDocument.js +1 -0
- package/apis/apis/scanNFC.js +1 -1
- package/apis/common/apis/general/openDocument.js +1 -0
- package/apis/common/apis/general/payment/checkTransaction.js +1 -1
- package/apis/common/apis/general/payment/createOrder.js +1 -1
- package/apis/common/apis/general/payment/createOrderIAP.js +1 -1
- package/apis/common/apis/general/payment/purchase.js +1 -1
- package/apis/common/utils.js +1 -1
- package/apis/constants.js +1 -1
- package/apis/index.d.ts +99 -1
- package/apis/index.es.js +1 -1
- package/apis/index.js +1 -1
- package/apis/package.json.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +100 -1
- package/index.es.js +2 -2
- package/index.js +2 -2
- package/index.umd.js +3 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -991,6 +991,43 @@ declare const ACTION: {
|
|
|
991
991
|
MP_APP_LIFECYCLE_TRACKING: {
|
|
992
992
|
skipJump: boolean;
|
|
993
993
|
};
|
|
994
|
+
OPEN_DOCUMENT: {
|
|
995
|
+
skipJump: boolean;
|
|
996
|
+
errorList: {
|
|
997
|
+
all: {
|
|
998
|
+
"-10": {
|
|
999
|
+
mapTo: {
|
|
1000
|
+
code: number;
|
|
1001
|
+
message: string;
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
"-700": {
|
|
1005
|
+
mapTo: {
|
|
1006
|
+
code: number;
|
|
1007
|
+
message: string;
|
|
1008
|
+
};
|
|
1009
|
+
};
|
|
1010
|
+
"-701": {
|
|
1011
|
+
mapTo: {
|
|
1012
|
+
code: number;
|
|
1013
|
+
message: string;
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
"-702": {
|
|
1017
|
+
mapTo: {
|
|
1018
|
+
code: number;
|
|
1019
|
+
message: string;
|
|
1020
|
+
};
|
|
1021
|
+
};
|
|
1022
|
+
"-703": {
|
|
1023
|
+
mapTo: {
|
|
1024
|
+
code: number;
|
|
1025
|
+
message: string;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
};
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
994
1031
|
};
|
|
995
1032
|
declare const AUTHEN_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber"];
|
|
996
1033
|
declare const GET_SETTINGS_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.camera", "scope.micro"];
|
|
@@ -5656,6 +5693,67 @@ declare const CheckoutKit: {
|
|
|
5656
5693
|
purchase: typeof purchase$1;
|
|
5657
5694
|
};
|
|
5658
5695
|
|
|
5696
|
+
declare const openDocumentArgs: ZodObject<{
|
|
5697
|
+
url: ZodString;
|
|
5698
|
+
title: ZodOptional<ZodString>;
|
|
5699
|
+
download: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
5700
|
+
edit: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
5701
|
+
}, "strip", ZodTypeAny, {
|
|
5702
|
+
title?: string | undefined;
|
|
5703
|
+
download?: boolean | undefined;
|
|
5704
|
+
edit?: boolean | undefined;
|
|
5705
|
+
url: string;
|
|
5706
|
+
}, {
|
|
5707
|
+
title?: string | undefined;
|
|
5708
|
+
download?: boolean | undefined;
|
|
5709
|
+
edit?: boolean | undefined;
|
|
5710
|
+
url: string;
|
|
5711
|
+
}>[];
|
|
5712
|
+
/**
|
|
5713
|
+
* API cho phép ứng dụng xem trực tiếp tài liệu (PDF) từ URL.
|
|
5714
|
+
*
|
|
5715
|
+
* @minimumVersion 2.47.0
|
|
5716
|
+
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
5717
|
+
* @param {string} url URL của tài liệu cần mở. Hiện chỉ hỗ trợ định dạng tài liệu PDF.
|
|
5718
|
+
* @param {string} [title] Tiêu đề của tài liệu trên header bar. Mặc định lấy tên từ URL.
|
|
5719
|
+
* @param {boolean} [download=false] Bật tính năng tải tài liệu. Mặc định là false.
|
|
5720
|
+
* @param {boolean} [edit=false] Bật tính năng chỉnh sửa tài liệu (chỉ hỗ trợ trên ios). Mặc định là false.
|
|
5721
|
+
*
|
|
5722
|
+
* @example Mở tài liệu PDF từ URL:
|
|
5723
|
+
* ```ts
|
|
5724
|
+
* openDocument({
|
|
5725
|
+
* url: "https://pdfobject.com/pdf/sample.pdf"
|
|
5726
|
+
* });
|
|
5727
|
+
* ```
|
|
5728
|
+
*
|
|
5729
|
+
* @example Mở tài liệu PDF từ URL với tiêu đề tùy chỉnh:
|
|
5730
|
+
* ```ts
|
|
5731
|
+
* openDocument({
|
|
5732
|
+
* url: "https://pdfobject.com/pdf/sample.pdf",
|
|
5733
|
+
* title: "Tài liệu mẫu"
|
|
5734
|
+
* });
|
|
5735
|
+
* ```
|
|
5736
|
+
*
|
|
5737
|
+
* @example Mở tài liệu PDF từ URL với tiêu đề tùy chỉnh và mở tính năng tải xuống:
|
|
5738
|
+
* ```ts
|
|
5739
|
+
* openDocument({
|
|
5740
|
+
* url: "https://pdfobject.com/pdf/sample.pdf",
|
|
5741
|
+
* title: "Tài liệu mẫu",
|
|
5742
|
+
* download: true
|
|
5743
|
+
* });
|
|
5744
|
+
* ```
|
|
5745
|
+
*
|
|
5746
|
+
* @example Mở tài liệu PDF từ URL với tiêu đề tùy chỉnh và mở tính năng chỉnh sửa (chỉ hỗ trợ trên ios):
|
|
5747
|
+
* ```ts
|
|
5748
|
+
* openDocument({
|
|
5749
|
+
* url: "https://pdfobject.com/pdf/sample.pdf",
|
|
5750
|
+
* title: "Tài liệu mẫu",
|
|
5751
|
+
* edit: true
|
|
5752
|
+
* });
|
|
5753
|
+
* ```
|
|
5754
|
+
*/
|
|
5755
|
+
declare function openDocument(args: AsyncVoidCallback & TypeOf<(typeof openDocumentArgs)[0]>): Promise<void>;
|
|
5756
|
+
|
|
5659
5757
|
declare class AppError {
|
|
5660
5758
|
code: number;
|
|
5661
5759
|
message: string | string[];
|
|
@@ -5795,6 +5893,7 @@ declare const otherApis: {
|
|
|
5795
5893
|
showWidget: typeof showWidget;
|
|
5796
5894
|
purchase: typeof purchase$1;
|
|
5797
5895
|
};
|
|
5896
|
+
openDocument: typeof openDocument;
|
|
5798
5897
|
FacingMode: typeof FacingMode;
|
|
5799
5898
|
PhotoFormat: typeof PhotoFormat;
|
|
5800
5899
|
PhotoQuality: typeof PhotoQuality;
|
|
@@ -5802,4 +5901,4 @@ declare const otherApis: {
|
|
|
5802
5901
|
ZMACameraImp: typeof ZMACameraImp;
|
|
5803
5902
|
};
|
|
5804
5903
|
|
|
5805
|
-
export { Action, AndroidBottomNavigationBarType, AppError, AsyncCallback, AsyncCallbackFailObject, AsyncProgressCallback, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, CheckoutKit, CheckoutSDK, ChooseImageReturns, Common, ContextInfo, CreateOrderIAPReturns, CreateOrderReturns, Events as EventName, Events, FacingMode, FunctionProps, GetAppInfoReturns, GetAuthCodeReturns, GetBeaconDiscoveryReturns, GetLocationReturns, GetNetworkTypeReturns, GetPhoneNumberReturns, GetSettingReturn, GetStorageReturns, GetUserInfoReturns, GetZPITokenReturns, IAPMethodType, IAPPayType, IAPPayTypeType, IOSSafeAreaBottomType, JumpStatus, KeepScreenReturns, LogData, MediaConstraints, MediaDevice, MediaPickerType, NativeCallBackData, NetworkType, OpenBioAuthenticationReturns, OpenMediaPickerReturns, OpenPostFeedReturns, OpenProfilePickerReturns, OpenProfilePickerType, OpenShareSheetReturns, OpenWebviewReturns, OrientationType, Payment, PhotoConstraint, PhotoFormat, PhotoFrame, PhotoQuality, PickAttr, PickedProfile, PlatformType, PostFeedType, ProfileInfo, ProfileType, ProrationMode, ProrationModeType, RemoveStorageReturns, RequestCameraPermissionReturns, SaveFileReturns, ScanNFCType, ScanQRCodeReturns, SelectPaymentMethodReturns, SetStorageReturns, ShareSheetType, StatusBarType, StorageInfo, StreamType, SystemInfo, TempFile, TextAlignType, UserInfo, VibrateType, ZMACamera, ZMACameraImp, addRating, authorize, checkNFC, checkStateBioAuthentication, checkTransaction, checkZaloCameraPermission, chooseImage, clearStorage, closeApp, closeLoading, configAppView, connectWifi, createCameraContext, createOrder, createOrderIAP, createShortcut, otherApis as default, displayAd, downloadFile, events, favoriteApp, followOA, getAccessToken, getAppInfo, getAuthCode, getBeacons, getContext, getContextAsync, getDeviceId, getDeviceIdAsync, getIDToken, getLocation, getNetworkType, getPhoneNumber, getRouteParams, getSetting, getShareableLink, getStorage, getStorageInfo, getSystemInfo, getUserID, getUserInfo, getVersion, getZPIToken, hideKeyboard, iBeaconInfo, interactOA, interactOA as interactOa, checkIsAllowedInteractWithOA as isAllowedInteractWithOA, keepScreen, loadAd, login, minimizeApp, nativeStorage, offConfirmToExit, offKeepScreen, onCallbackData, onConfirmToExit, onKeepScreen, onNetworkStatusChange, openBioAuthentication, openChat, openGroupList, openMediaPicker, openMiniApp, openOutApp, openPermissionSetting, openPhone, openPostFeed, openProfile, openProfilePicker, openSMS, openShareSheet, openWebview, purchase, refreshAd, removeStorage, requestCameraPermission, requestSendNotification, requestUpdateZalo, saveImageToGallery, saveVideoToGallery, scanNFC, scanQRCode, selectPaymentMethod, sendDataToPreviousMiniApp, setAccessToken, setAndroidBottomNavigationBar, setIOSBottomSafeArea, setNavigationBarColor, setNavigationBarLeftButton, setNavigationBarTitle, setStatusBar, setStorage, setupAd, showCustomOAWidget, showFunctionButtonWidget, showOAWidget, showToast, startBeaconDiscovery, stopBeaconDiscovery, trackingManager, unfollowOA, vibrate, viewOAQr };
|
|
5904
|
+
export { Action, AndroidBottomNavigationBarType, AppError, AsyncCallback, AsyncCallbackFailObject, AsyncProgressCallback, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, CheckoutKit, CheckoutSDK, ChooseImageReturns, Common, ContextInfo, CreateOrderIAPReturns, CreateOrderReturns, Events as EventName, Events, FacingMode, FunctionProps, GetAppInfoReturns, GetAuthCodeReturns, GetBeaconDiscoveryReturns, GetLocationReturns, GetNetworkTypeReturns, GetPhoneNumberReturns, GetSettingReturn, GetStorageReturns, GetUserInfoReturns, GetZPITokenReturns, IAPMethodType, IAPPayType, IAPPayTypeType, IOSSafeAreaBottomType, JumpStatus, KeepScreenReturns, LogData, MediaConstraints, MediaDevice, MediaPickerType, NativeCallBackData, NetworkType, OpenBioAuthenticationReturns, OpenMediaPickerReturns, OpenPostFeedReturns, OpenProfilePickerReturns, OpenProfilePickerType, OpenShareSheetReturns, OpenWebviewReturns, OrientationType, Payment, PhotoConstraint, PhotoFormat, PhotoFrame, PhotoQuality, PickAttr, PickedProfile, PlatformType, PostFeedType, ProfileInfo, ProfileType, ProrationMode, ProrationModeType, RemoveStorageReturns, RequestCameraPermissionReturns, SaveFileReturns, ScanNFCType, ScanQRCodeReturns, SelectPaymentMethodReturns, SetStorageReturns, ShareSheetType, StatusBarType, StorageInfo, StreamType, SystemInfo, TempFile, TextAlignType, UserInfo, VibrateType, ZMACamera, ZMACameraImp, addRating, authorize, checkNFC, checkStateBioAuthentication, checkTransaction, checkZaloCameraPermission, chooseImage, clearStorage, closeApp, closeLoading, configAppView, connectWifi, createCameraContext, createOrder, createOrderIAP, createShortcut, otherApis as default, displayAd, downloadFile, events, favoriteApp, followOA, getAccessToken, getAppInfo, getAuthCode, getBeacons, getContext, getContextAsync, getDeviceId, getDeviceIdAsync, getIDToken, getLocation, getNetworkType, getPhoneNumber, getRouteParams, getSetting, getShareableLink, getStorage, getStorageInfo, getSystemInfo, getUserID, getUserInfo, getVersion, getZPIToken, hideKeyboard, iBeaconInfo, interactOA, interactOA as interactOa, checkIsAllowedInteractWithOA as isAllowedInteractWithOA, keepScreen, loadAd, login, minimizeApp, nativeStorage, offConfirmToExit, offKeepScreen, onCallbackData, onConfirmToExit, onKeepScreen, onNetworkStatusChange, openBioAuthentication, openChat, openDocument, openGroupList, openMediaPicker, openMiniApp, openOutApp, openPermissionSetting, openPhone, openPostFeed, openProfile, openProfilePicker, openSMS, openShareSheet, openWebview, purchase, refreshAd, removeStorage, requestCameraPermission, requestSendNotification, requestUpdateZalo, saveImageToGallery, saveVideoToGallery, scanNFC, scanQRCode, selectPaymentMethod, sendDataToPreviousMiniApp, setAccessToken, setAndroidBottomNavigationBar, setIOSBottomSafeArea, setNavigationBarColor, setNavigationBarLeftButton, setNavigationBarTitle, setStatusBar, setStorage, setupAd, showCustomOAWidget, showFunctionButtonWidget, showOAWidget, showToast, startBeaconDiscovery, stopBeaconDiscovery, trackingManager, unfollowOA, vibrate, viewOAQr };
|