zmp-sdk 2.42.0 → 2.43.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
@@ -610,6 +610,107 @@ declare const ACTION: {
610
610
  versionLive: {
611
611
  iOS: number;
612
612
  };
613
+ errorList: {
614
+ android: {
615
+ "-100": {
616
+ mapTo: {
617
+ code: number;
618
+ message: string;
619
+ };
620
+ };
621
+ "-101": {
622
+ mapTo: {
623
+ code: number;
624
+ message: string;
625
+ };
626
+ };
627
+ "-105": {
628
+ mapTo: {
629
+ code: number;
630
+ message: string;
631
+ };
632
+ };
633
+ "-106": {
634
+ mapTo: {
635
+ code: number;
636
+ message: string;
637
+ };
638
+ };
639
+ };
640
+ iOS: {
641
+ "-10": {
642
+ mapTo: {
643
+ code: number;
644
+ message: string;
645
+ };
646
+ };
647
+ "-101": {
648
+ mapTo: {
649
+ code: number;
650
+ message: string;
651
+ };
652
+ };
653
+ "-102": {
654
+ mapTo: {
655
+ code: number;
656
+ message: string;
657
+ };
658
+ };
659
+ };
660
+ };
661
+ };
662
+ ZBROWSER_MPDS_SYNC: {
663
+ versionLive: {
664
+ iOS: number;
665
+ };
666
+ errorList: {
667
+ android: {
668
+ "-100": {
669
+ mapTo: {
670
+ code: number;
671
+ message: string;
672
+ };
673
+ };
674
+ "-101": {
675
+ mapTo: {
676
+ code: number;
677
+ message: string;
678
+ };
679
+ };
680
+ "-105": {
681
+ mapTo: {
682
+ code: number;
683
+ message: string;
684
+ };
685
+ };
686
+ "-106": {
687
+ mapTo: {
688
+ code: number;
689
+ message: string;
690
+ };
691
+ };
692
+ };
693
+ iOS: {
694
+ "-10": {
695
+ mapTo: {
696
+ code: number;
697
+ message: string;
698
+ };
699
+ };
700
+ "-101": {
701
+ mapTo: {
702
+ code: number;
703
+ message: string;
704
+ };
705
+ };
706
+ "-102": {
707
+ mapTo: {
708
+ code: number;
709
+ message: string;
710
+ };
711
+ };
712
+ };
713
+ };
613
714
  };
614
715
  WEBVIEW_SET_RESULT: {
615
716
  versionLive: {
@@ -2195,6 +2296,9 @@ declare const setStorageArgs: ZodOptional<ZodObject<{
2195
2296
  }, {
2196
2297
  data: Record<string, any>;
2197
2298
  }>>[];
2299
+ /**
2300
+ * @deprecated Use `nativeStorage.setItem(key, value)` instead
2301
+ */
2198
2302
  declare function setStorage(args: AsyncCallback<SetStorageReturns> & TypeOf<(typeof setStorageArgs)[0]>): Promise<SetStorageReturns>;
2199
2303
 
2200
2304
  declare const getStorageArgs: ZodOptional<ZodObject<{
@@ -2204,8 +2308,14 @@ declare const getStorageArgs: ZodOptional<ZodObject<{
2204
2308
  }, {
2205
2309
  keys: string[];
2206
2310
  }>>[];
2311
+ /**
2312
+ * @deprecated Use `nativeStorage.getItem(key)` instead
2313
+ */
2207
2314
  declare function getStorage(args: AsyncCallback<GetStorageReturns> & TypeOf<(typeof getStorageArgs)[0]>): Promise<GetStorageReturns>;
2208
2315
 
2316
+ /**
2317
+ * @deprecated Use `nativeStorage.getStorageInfo()` instead
2318
+ */
2209
2319
  declare function getStorageInfo(args?: AsyncCallback<StorageInfo>): Promise<StorageInfo>;
2210
2320
 
2211
2321
  declare const removeStorageArgs: ZodOptional<ZodObject<{
@@ -2215,6 +2325,9 @@ declare const removeStorageArgs: ZodOptional<ZodObject<{
2215
2325
  }, {
2216
2326
  keys: string[];
2217
2327
  }>>[];
2328
+ /**
2329
+ * @deprecated Use `nativeStorage.removeItem(key)` instead
2330
+ */
2218
2331
  declare function removeStorage(args: AsyncCallback<RemoveStorageReturns> & TypeOf<(typeof removeStorageArgs)[0]>): Promise<RemoveStorageReturns>;
2219
2332
 
2220
2333
  declare const clearStorageArgs: ZodOptional<ZodObject<{
@@ -2224,6 +2337,9 @@ declare const clearStorageArgs: ZodOptional<ZodObject<{
2224
2337
  }, {
2225
2338
  prefix?: string | undefined;
2226
2339
  }>>[];
2340
+ /**
2341
+ * @deprecated Use `nativeStorage.clear()` instead
2342
+ */
2227
2343
  declare function clearStorage(args: AsyncVoidCallback & TypeOf<(typeof clearStorageArgs)[0]>): Promise<void>;
2228
2344
 
2229
2345
  declare const getUserInfoArgs: ZodOptional<ZodObject<{
@@ -2400,20 +2516,20 @@ declare function openChat(args: AsyncVoidCallback & TypeOf<(typeof openChatArgs)
2400
2516
  declare const openPostFeedArgs: ZodUnion<[ZodObject<{
2401
2517
  type: ZodEnum<["image"]>;
2402
2518
  data: ZodObject<{
2403
- imageUrl: ZodOptional<ZodString>;
2519
+ imageUrl: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>;
2404
2520
  }, "strip", ZodTypeAny, {
2405
- imageUrl?: string | undefined;
2521
+ imageUrl?: string | string[] | undefined;
2406
2522
  }, {
2407
- imageUrl?: string | undefined;
2523
+ imageUrl?: string | string[] | undefined;
2408
2524
  }>;
2409
2525
  }, "strip", ZodTypeAny, {
2410
2526
  data: {
2411
- imageUrl?: string | undefined;
2527
+ imageUrl?: string | string[] | undefined;
2412
2528
  };
2413
2529
  type: "image";
2414
2530
  }, {
2415
2531
  data: {
2416
- imageUrl?: string | undefined;
2532
+ imageUrl?: string | string[] | undefined;
2417
2533
  };
2418
2534
  type: "image";
2419
2535
  }>, ZodObject<{
@@ -3545,6 +3661,19 @@ declare function scanNFC(args: AsyncCallback & TypeOf<(typeof scanNFCArgs)[0]>):
3545
3661
 
3546
3662
  declare function checkNFC(args: AsyncVoidCallback): Promise<any>;
3547
3663
 
3664
+ declare const getItemArgs: ZodString[];
3665
+ declare function getItem(key: TypeOf<(typeof getItemArgs)[0]>): string;
3666
+
3667
+ declare const setItemArgs: ZodString[];
3668
+ declare function setItem(key: TypeOf<(typeof setItemArgs)[0]>, value: TypeOf<(typeof setItemArgs)[1]>): void;
3669
+
3670
+ declare function clear(): void;
3671
+
3672
+ declare const removeItemArgs: ZodString[];
3673
+ declare function removeItem(key: TypeOf<(typeof removeItemArgs)[0]>): void;
3674
+
3675
+ declare function getStorageInfoSync(): StorageInfo;
3676
+
3548
3677
  declare const otherApis: {
3549
3678
  Events: typeof Events;
3550
3679
  EventName: typeof Events;
@@ -3648,6 +3777,13 @@ declare const otherApis: {
3648
3777
  StreamType: typeof StreamType;
3649
3778
  ZMACameraImp: typeof ZMACameraImp;
3650
3779
  };
3780
+ declare const storage: {
3781
+ getItem: typeof getItem;
3782
+ setItem: typeof setItem;
3783
+ removeItem: typeof removeItem;
3784
+ clear: typeof clear;
3785
+ getStorageInfo: typeof getStorageInfoSync;
3786
+ };
3651
3787
  declare const payment: {
3652
3788
  createOrder: typeof createOrder;
3653
3789
  checkTransaction: typeof checkTransaction;
@@ -3659,4 +3795,4 @@ declare const checkout: {
3659
3795
  purchase: typeof purchase;
3660
3796
  };
3661
3797
 
3662
- export { Action, AndroidBottomNavigationBarType, AsyncCallback, AsyncCallbackFailObject, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, checkout as 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 as 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, 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 };
3798
+ export { Action, AndroidBottomNavigationBarType, AsyncCallback, AsyncCallbackFailObject, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, checkout as 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 as 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, storage as 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 };