zmp-sdk 2.49.4 → 2.50.0-beta.2
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/payment/index.js +1 -1
- package/apis/apis/payment/openCheckoutPopup.js +1 -0
- package/apis/apis/payment/openPaymentLink.js +1 -0
- package/apis/common/apis/general/getAppInfo.js +1 -1
- package/apis/common/apis/general/openWebview.js +1 -1
- package/apis/common/apis/general/payment/openCheckoutPopup.js +1 -0
- package/apis/constants.js +1 -1
- package/apis/index.d.ts +68 -0
- package/apis/package.json.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +73 -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
|
@@ -1031,6 +1031,14 @@ declare const ACTION: {
|
|
|
1031
1031
|
GET_DEVICE_INFO: {
|
|
1032
1032
|
skipJump: boolean;
|
|
1033
1033
|
};
|
|
1034
|
+
MP_OPEN_ZINSTANTVIEW: {
|
|
1035
|
+
skipJump: boolean;
|
|
1036
|
+
timeout: boolean;
|
|
1037
|
+
versionLive: {
|
|
1038
|
+
android: number;
|
|
1039
|
+
iOS: number;
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1034
1042
|
};
|
|
1035
1043
|
declare const AUTHEN_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber"];
|
|
1036
1044
|
declare const GET_SETTINGS_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.camera", "scope.micro"];
|
|
@@ -1454,6 +1462,16 @@ type GetSettingReturn = {
|
|
|
1454
1462
|
type SaveFileReturns = {
|
|
1455
1463
|
savedPath: string;
|
|
1456
1464
|
};
|
|
1465
|
+
type CheckoutPopupOpenParams = {
|
|
1466
|
+
qrContent: string;
|
|
1467
|
+
merchantLogo: string;
|
|
1468
|
+
merchantName: string;
|
|
1469
|
+
amount: number;
|
|
1470
|
+
orderDesscription: string;
|
|
1471
|
+
};
|
|
1472
|
+
type CheckoutPopupResponseData = {
|
|
1473
|
+
status: string;
|
|
1474
|
+
};
|
|
1457
1475
|
|
|
1458
1476
|
declare enum CameraEvents {
|
|
1459
1477
|
OnFrameCallback = "h5.event.camera.frame",
|
|
@@ -2493,6 +2511,52 @@ declare const eventTypeType: ZodEnum<["APP_INITIALIZING", "APP_READY"]>;
|
|
|
2493
2511
|
declare const payloadType: ZodAny;
|
|
2494
2512
|
declare function logEvent(eventType: TypeOf<typeof eventTypeType>, payload: TypeOf<typeof payloadType>): void;
|
|
2495
2513
|
|
|
2514
|
+
declare const checkoutPopupArgs: ZodObject<{
|
|
2515
|
+
amount: ZodUnion<[ZodString, ZodNumber]>;
|
|
2516
|
+
orderDesscription: ZodString;
|
|
2517
|
+
qrContent: ZodString;
|
|
2518
|
+
}, "strip", ZodTypeAny, {
|
|
2519
|
+
amount: string | number;
|
|
2520
|
+
orderDesscription: string;
|
|
2521
|
+
qrContent: string;
|
|
2522
|
+
}, {
|
|
2523
|
+
amount: string | number;
|
|
2524
|
+
orderDesscription: string;
|
|
2525
|
+
qrContent: string;
|
|
2526
|
+
}>[];
|
|
2527
|
+
/**
|
|
2528
|
+
* Gửi thông tin thanh toán đến Checkout để mở popup
|
|
2529
|
+
* @param args
|
|
2530
|
+
*/
|
|
2531
|
+
declare function openCheckoutPopup(args: AsyncCallback<CheckoutPopupOpenParams> & TypeOf<(typeof checkoutPopupArgs)[0]>): Promise<CheckoutPopupResponseData>;
|
|
2532
|
+
|
|
2533
|
+
declare const openPaymentLinkArgs: ZodObject<{
|
|
2534
|
+
url: ZodString;
|
|
2535
|
+
config: ZodOptional<ZodObject<{
|
|
2536
|
+
style: ZodOptional<ZodDefault<ZodEnum<["bottomSheet", "normal"]>>>;
|
|
2537
|
+
leftButton: ZodOptional<ZodDefault<ZodEnum<["back", "none"]>>>;
|
|
2538
|
+
}, "strip", ZodTypeAny, {
|
|
2539
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
2540
|
+
leftButton?: "none" | "back" | undefined;
|
|
2541
|
+
}, {
|
|
2542
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
2543
|
+
leftButton?: "none" | "back" | undefined;
|
|
2544
|
+
}>>;
|
|
2545
|
+
}, "strip", ZodTypeAny, {
|
|
2546
|
+
config?: {
|
|
2547
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
2548
|
+
leftButton?: "none" | "back" | undefined;
|
|
2549
|
+
} | undefined;
|
|
2550
|
+
url: string;
|
|
2551
|
+
}, {
|
|
2552
|
+
config?: {
|
|
2553
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
2554
|
+
leftButton?: "none" | "back" | undefined;
|
|
2555
|
+
} | undefined;
|
|
2556
|
+
url: string;
|
|
2557
|
+
}>[];
|
|
2558
|
+
declare function openPaymentLink(args: AsyncCallback<OpenWebviewReturns> & TypeOf<(typeof openPaymentLinkArgs)[0]>): Promise<void>;
|
|
2559
|
+
|
|
2496
2560
|
/**
|
|
2497
2561
|
* Lấy thông tin của cache theo cơ chế đồng bộ.
|
|
2498
2562
|
*
|
|
@@ -5579,6 +5643,8 @@ declare const Payment: {
|
|
|
5579
5643
|
checkTransaction: typeof checkTransaction;
|
|
5580
5644
|
createOrderIAP: typeof createOrderIAP;
|
|
5581
5645
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5646
|
+
openPaymentLink: typeof openPaymentLink;
|
|
5647
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5582
5648
|
};
|
|
5583
5649
|
declare const CheckoutSDK: {
|
|
5584
5650
|
purchase: typeof purchase;
|
|
@@ -5586,6 +5652,8 @@ declare const CheckoutSDK: {
|
|
|
5586
5652
|
checkTransaction: typeof checkTransaction;
|
|
5587
5653
|
createOrderIAP: typeof createOrderIAP;
|
|
5588
5654
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5655
|
+
openPaymentLink: typeof openPaymentLink;
|
|
5656
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5589
5657
|
};
|
|
5590
5658
|
|
|
5591
5659
|
declare const downloadFileArgs: ZodOptional<ZodObject<{
|
|
@@ -5918,6 +5986,8 @@ declare const otherApis: {
|
|
|
5918
5986
|
checkTransaction: typeof checkTransaction;
|
|
5919
5987
|
createOrderIAP: typeof createOrderIAP;
|
|
5920
5988
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5989
|
+
openPaymentLink: typeof openPaymentLink;
|
|
5990
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5921
5991
|
};
|
|
5922
5992
|
CheckoutSDK: {
|
|
5923
5993
|
purchase: typeof purchase;
|
|
@@ -5925,6 +5995,8 @@ declare const otherApis: {
|
|
|
5925
5995
|
checkTransaction: typeof checkTransaction;
|
|
5926
5996
|
createOrderIAP: typeof createOrderIAP;
|
|
5927
5997
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5998
|
+
openPaymentLink: typeof openPaymentLink;
|
|
5999
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5928
6000
|
};
|
|
5929
6001
|
downloadFile: typeof downloadFile;
|
|
5930
6002
|
trackingManager: {
|
|
@@ -5945,4 +6017,4 @@ declare const otherApis: {
|
|
|
5945
6017
|
ZMACameraImp: typeof ZMACameraImp;
|
|
5946
6018
|
};
|
|
5947
6019
|
|
|
5948
|
-
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, GetDeviceInfoReturn, 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, getDeviceInfo, getEntrySource, 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 };
|
|
6020
|
+
export { Action, AndroidBottomNavigationBarType, AppError, AsyncCallback, AsyncCallbackFailObject, AsyncProgressCallback, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, CheckoutKit, CheckoutPopupOpenParams, CheckoutPopupResponseData, CheckoutSDK, ChooseImageReturns, Common, ContextInfo, CreateOrderIAPReturns, CreateOrderReturns, Events as EventName, Events, FacingMode, FunctionProps, GetAppInfoReturns, GetAuthCodeReturns, GetBeaconDiscoveryReturns, GetDeviceInfoReturn, 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, getDeviceInfo, getEntrySource, 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 };
|