zmp-sdk 2.43.4 → 2.44.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/index.d.ts CHANGED
@@ -32,7 +32,8 @@ declare enum Events {
32
32
  AppClose = "h5.event.action.close",
33
33
  PaymentCallback = "payment.callback",
34
34
  PaymentResult = "action.payment.result",
35
- PaymentClose = "action.payment.close"
35
+ PaymentClose = "action.payment.close",
36
+ DownloadProgress = "h5.event.webview.download.progress"
36
37
  }
37
38
  declare enum JumpStatus {
38
39
  DOING = "doing",
@@ -420,6 +421,38 @@ declare const ACTION: {
420
421
  OPEN_ADTIMA_ADS: {};
421
422
  GET_ADIDCLIENT: {};
422
423
  SCAN_IBEACON: {};
424
+ SAVE_VIDEO_GALLERY: {
425
+ versionLive: {
426
+ iOS: number;
427
+ };
428
+ errorList: {
429
+ android: {
430
+ "-101": {
431
+ mapTo: {
432
+ code: number;
433
+ message: string;
434
+ };
435
+ needMoreDetail: boolean;
436
+ };
437
+ "-102": {
438
+ mapTo: {
439
+ code: number;
440
+ message: string;
441
+ };
442
+ needMoreDetail: boolean;
443
+ };
444
+ };
445
+ iOS: {
446
+ "-10": {
447
+ mapTo: {
448
+ code: number;
449
+ message: string;
450
+ };
451
+ needMoreDetail: boolean;
452
+ };
453
+ };
454
+ };
455
+ };
423
456
  INTERACTIVE_VIBRATION: {};
424
457
  SAVE_IMAGE_GALLERY: {
425
458
  versionLive: {
@@ -895,6 +928,39 @@ declare const ACTION: {
895
928
  MP_CONFIRM_REQUEST_PAYMENT: {
896
929
  skipJump: boolean;
897
930
  };
931
+ SAVE_FILE: {
932
+ versionLive: {
933
+ iOS: number;
934
+ };
935
+ skipJump: boolean;
936
+ errorList: {
937
+ android: {
938
+ "-101": {
939
+ mapTo: {
940
+ code: number;
941
+ message: string;
942
+ };
943
+ needMoreDetail: boolean;
944
+ };
945
+ "-102": {
946
+ mapTo: {
947
+ code: number;
948
+ message: string;
949
+ };
950
+ needMoreDetail: boolean;
951
+ };
952
+ };
953
+ iOS: {
954
+ "-10": {
955
+ mapTo: {
956
+ code: number;
957
+ message: string;
958
+ };
959
+ needMoreDetail: boolean;
960
+ };
961
+ };
962
+ };
963
+ };
898
964
  };
899
965
  declare const AUTHEN_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber"];
900
966
  declare const GET_SETTINGS_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.camera", "scope.micro"];
@@ -918,6 +984,12 @@ type AsyncVoidCallback = {
918
984
  success?: () => void;
919
985
  fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
920
986
  };
987
+ type AsyncProgressCallback = {
988
+ action?: keyof typeof ACTION;
989
+ onProgress?: (progress: number) => void;
990
+ success?: () => void;
991
+ fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
992
+ };
921
993
  type GetLocationReturns = {
922
994
  /** latitude */
923
995
  latitude?: string;
@@ -1114,6 +1186,9 @@ type AuthorizeType<T extends ScopeValues> = Partial<{
1114
1186
  type GetSettingReturn = {
1115
1187
  authSetting: AuthorizeType<(typeof GET_SETTINGS_SCOPE_VALUES)[number]>;
1116
1188
  };
1189
+ type SaveFileReturns = {
1190
+ savedPath: string;
1191
+ };
1117
1192
 
1118
1193
  declare enum CameraEvents {
1119
1194
  OnFrameCallback = "h5.event.camera.frame",
@@ -2944,7 +3019,16 @@ declare const saveImageToGalleryArgs: ZodOptional<ZodObject<{
2944
3019
  imageUrl?: string | undefined;
2945
3020
  imageBase64Data?: string | undefined;
2946
3021
  }>>[];
2947
- declare function saveImageToGallery(args: AsyncVoidCallback & TypeOf<(typeof saveImageToGalleryArgs)[0]>): Promise<void>;
3022
+ declare function saveImageToGallery(args: AsyncProgressCallback & TypeOf<(typeof saveImageToGalleryArgs)[0]>): Promise<void>;
3023
+
3024
+ declare const saveVideoToGalleryArgs: ZodOptional<ZodObject<{
3025
+ videoUrl: ZodString;
3026
+ }, "strip", ZodTypeAny, {
3027
+ videoUrl: string;
3028
+ }, {
3029
+ videoUrl: string;
3030
+ }>>[];
3031
+ declare function saveVideoToGallery(args: AsyncProgressCallback & TypeOf<(typeof saveVideoToGalleryArgs)[0]>): Promise<void>;
2948
3032
 
2949
3033
  declare const openMiniAppArgs: ZodObject<{
2950
3034
  appId: ZodString;
@@ -3699,6 +3783,15 @@ declare const CheckoutSDK: {
3699
3783
  selectPaymentMethod: typeof selectPaymentMethod;
3700
3784
  };
3701
3785
 
3786
+ declare const downloadFileArgs: ZodOptional<ZodObject<{
3787
+ url: ZodString;
3788
+ }, "strip", ZodTypeAny, {
3789
+ url: string;
3790
+ }, {
3791
+ url: string;
3792
+ }>>[];
3793
+ declare function downloadFile(args: AsyncProgressCallback & TypeOf<(typeof downloadFileArgs)[0]>): Promise<void>;
3794
+
3702
3795
  declare const otherApis: {
3703
3796
  Events: typeof Events;
3704
3797
  EventName: typeof Events;
@@ -3742,6 +3835,7 @@ declare const otherApis: {
3742
3835
  onKeepScreen: typeof onKeepScreen;
3743
3836
  offKeepScreen: typeof offKeepScreen;
3744
3837
  saveImageToGallery: typeof saveImageToGallery;
3838
+ saveVideoToGallery: typeof saveVideoToGallery;
3745
3839
  openMiniApp: typeof openMiniApp;
3746
3840
  vibrate: typeof vibrate;
3747
3841
  openWebview: typeof openWebview;
@@ -3813,6 +3907,7 @@ declare const otherApis: {
3813
3907
  purchase: typeof purchase;
3814
3908
  selectPaymentMethod: typeof selectPaymentMethod;
3815
3909
  };
3910
+ downloadFile: typeof downloadFile;
3816
3911
  FacingMode: typeof FacingMode;
3817
3912
  PhotoFormat: typeof PhotoFormat;
3818
3913
  PhotoQuality: typeof PhotoQuality;
@@ -3820,4 +3915,4 @@ declare const otherApis: {
3820
3915
  ZMACameraImp: typeof ZMACameraImp;
3821
3916
  };
3822
3917
 
3823
- export { Action, AndroidBottomNavigationBarType, AsyncCallback, AsyncCallbackFailObject, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, 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, OpenShareSheetReturns, OpenWebviewReturns, OrientationType, Payment, PhotoConstraint, PhotoFormat, PhotoFrame, PhotoQuality, PickAttr, PlatformType, PostFeedType, ProfileType, ProrationMode, ProrationModeType, RemoveStorageReturns, RequestCameraPermissionReturns, ScanNFCType, ScanQRCodeReturns, SelectPaymentMethodReturns, SetStorageReturns, ShareSheetType, StatusBarType, StorageInfo, StreamType, SystemInfo, TextAlignType, VibrateType, ZMACamera, ZMACameraImp, addRating, authorize, checkNFC, checkStateBioAuthentication, checkTransaction, checkZaloCameraPermission, chooseImage, clearStorage, closeApp, closeLoading, configAppView, connectWifi, createCameraContext, createOrder, createOrderIAP, createShortcut, otherApis as default, displayAd, 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, scanNFC, scanQRCode, selectPaymentMethod, sendDataToPreviousMiniApp, setAccessToken, setAndroidBottomNavigationBar, setIOSBottomSafeArea, setNavigationBarColor, setNavigationBarLeftButton, setNavigationBarTitle, setStatusBar, setStorage, setupAd, showFunctionButtonWidget, showOAWidget, showToast, startBeaconDiscovery, stopBeaconDiscovery, unfollowOA, vibrate, viewOAQr };
3918
+ export { Action, AndroidBottomNavigationBarType, AsyncCallback, AsyncCallbackFailObject, AsyncProgressCallback, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, 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, OpenShareSheetReturns, OpenWebviewReturns, OrientationType, Payment, PhotoConstraint, PhotoFormat, PhotoFrame, PhotoQuality, PickAttr, PlatformType, PostFeedType, ProfileType, ProrationMode, ProrationModeType, RemoveStorageReturns, RequestCameraPermissionReturns, SaveFileReturns, ScanNFCType, ScanQRCodeReturns, SelectPaymentMethodReturns, SetStorageReturns, ShareSheetType, StatusBarType, StorageInfo, StreamType, SystemInfo, TextAlignType, 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, showFunctionButtonWidget, showOAWidget, showToast, startBeaconDiscovery, stopBeaconDiscovery, unfollowOA, vibrate, viewOAQr };