zmp-sdk 2.53.3 → 2.54.0-beta.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.
- package/apis/apis/openShareSheet.js +1 -1
- package/apis/apis/sendMessage.js +1 -0
- package/apis/common/apis/general/getZMPShareInfo.js +1 -1
- package/apis/common/apis/general/openShareSheet.js +1 -1
- package/apis/common/apis/general/sendMessage.js +1 -0
- package/apis/constants.js +1 -1
- package/apis/index.d.ts +39 -17
- package/apis/index.es.js +1 -1
- package/apis/index.js +1 -1
- package/apis/package.json.js +1 -1
- package/apis/types/enum.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +40 -18
- 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
|
@@ -71,7 +71,6 @@ declare enum ShareSheetType {
|
|
|
71
71
|
video = 12,
|
|
72
72
|
link = 4,
|
|
73
73
|
oa = 5,
|
|
74
|
-
zmp = 20,
|
|
75
74
|
multi_image = 21,
|
|
76
75
|
zmp_deep_link = 4,
|
|
77
76
|
text = 22
|
|
@@ -1614,6 +1613,21 @@ type AddCardReturns = {
|
|
|
1614
1613
|
*/
|
|
1615
1614
|
oaMessageToken?: string;
|
|
1616
1615
|
};
|
|
1616
|
+
type SendMessageParams = {
|
|
1617
|
+
/**
|
|
1618
|
+
* Token để gửi tin nhắn.
|
|
1619
|
+
*/
|
|
1620
|
+
token: string;
|
|
1621
|
+
/**
|
|
1622
|
+
* Nội dung tin nhắn văn bản.
|
|
1623
|
+
*/
|
|
1624
|
+
text: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* Đường link gửi kèm sau tin nhắn văn bản. Không truyền thì chỉ gửi tin nhắn văn bản.
|
|
1627
|
+
*/
|
|
1628
|
+
link?: string;
|
|
1629
|
+
};
|
|
1630
|
+
type SendMessageReturns = any;
|
|
1617
1631
|
type TempFile = {
|
|
1618
1632
|
/**
|
|
1619
1633
|
* Đường dẫn các temp file đã chọn.
|
|
@@ -3979,7 +3993,7 @@ declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
|
3979
3993
|
title: string;
|
|
3980
3994
|
thumbnail: string;
|
|
3981
3995
|
};
|
|
3982
|
-
type: "
|
|
3996
|
+
type: "zmp_deep_link" | "zmp";
|
|
3983
3997
|
}, {
|
|
3984
3998
|
data: {
|
|
3985
3999
|
path?: string | undefined;
|
|
@@ -3987,7 +4001,7 @@ declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
|
3987
4001
|
title: string;
|
|
3988
4002
|
thumbnail: string;
|
|
3989
4003
|
};
|
|
3990
|
-
type: "
|
|
4004
|
+
type: "zmp_deep_link" | "zmp";
|
|
3991
4005
|
}>]>[];
|
|
3992
4006
|
/**
|
|
3993
4007
|
* API cho phép ứng dụng mở giao diện chia sẻ để người dùng chia sẻ thông tin với bạn bè Zalo.
|
|
@@ -4002,7 +4016,7 @@ declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
|
4002
4016
|
* - `oa`: Chia sẻ Official Account.
|
|
4003
4017
|
* - `gif`: Chia sẻ ảnh động.
|
|
4004
4018
|
* - `video`: Chia sẻ video.
|
|
4005
|
-
* - `zmp`:
|
|
4019
|
+
* - `zmp`: Đã ngừng hỗ trợ. SDK tự chuyển sang `zmp_deep_link`, Mini App nên đổi sang dùng `zmp_deep_link`.
|
|
4006
4020
|
* - `zmp_deep_link`: Chia sẻ page hiện tại của Zalo Mini App thông qua deep link (hỗ trợ từ API 2.25.7).
|
|
4007
4021
|
* @param {object} data Nội dung cần chia sẻ, tùy thuộc vào `type`.
|
|
4008
4022
|
*
|
|
@@ -4081,19 +4095,6 @@ declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
|
4081
4095
|
* console.log(data);
|
|
4082
4096
|
* ```
|
|
4083
4097
|
*
|
|
4084
|
-
* @example Chia sẻ page hiện tại của Zalo Mini App:
|
|
4085
|
-
* ```ts
|
|
4086
|
-
* const data = await openShareSheet({
|
|
4087
|
-
* type: "zmp",
|
|
4088
|
-
* data: {
|
|
4089
|
-
* title: "My Zalo Mini App - HomePage",
|
|
4090
|
-
* description: "Home page",
|
|
4091
|
-
* thumbnail: "https://sample-videos.com/img/Sample-jpg-image-50kb.jpg",
|
|
4092
|
-
* },
|
|
4093
|
-
* });
|
|
4094
|
-
* console.log(data);
|
|
4095
|
-
* ```
|
|
4096
|
-
*
|
|
4097
4098
|
* @example Chia sẻ page hiện tại của Zalo Mini App thông qua deep link:
|
|
4098
4099
|
* ```ts
|
|
4099
4100
|
* const data = await openShareSheet({
|
|
@@ -5581,6 +5582,26 @@ declare function addVoucher(args: AsyncCallback<AddVoucherReturns> & AddVoucherD
|
|
|
5581
5582
|
*/
|
|
5582
5583
|
declare function addCard(args: AsyncCallback<AddCardReturns> & AddCardParams): Promise<AddCardReturns>;
|
|
5583
5584
|
|
|
5585
|
+
/**
|
|
5586
|
+
* API gửi tin nhắn gồm một đoạn văn bản và một đường link.
|
|
5587
|
+
*
|
|
5588
|
+
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
5589
|
+
*
|
|
5590
|
+
* @param {string} token Token để gửi tin nhắn.
|
|
5591
|
+
* @param {string} text Nội dung tin nhắn văn bản.
|
|
5592
|
+
* @param {string} [link] Đường link gửi kèm sau tin nhắn văn bản. Không truyền thì chỉ gửi tin nhắn văn bản.
|
|
5593
|
+
*
|
|
5594
|
+
* @example
|
|
5595
|
+
* ```ts
|
|
5596
|
+
* await sendMessage({
|
|
5597
|
+
* token: "<token>",
|
|
5598
|
+
* text: "Tôi cần tư vấn sản phẩm này",
|
|
5599
|
+
* link: "https://zalo.me/s/4468790044699041621/products/P-20250908-5K5USI",
|
|
5600
|
+
* });
|
|
5601
|
+
* ```
|
|
5602
|
+
*/
|
|
5603
|
+
declare function sendMessage(args: AsyncCallback<SendMessageReturns> & SendMessageParams): Promise<SendMessageReturns>;
|
|
5604
|
+
|
|
5584
5605
|
declare const interactOAArgs$1: ZodObject<{
|
|
5585
5606
|
oaId: ZodString;
|
|
5586
5607
|
}, "strip", ZodTypeAny, {
|
|
@@ -6534,6 +6555,7 @@ declare const otherApis: {
|
|
|
6534
6555
|
addRating: typeof addRating;
|
|
6535
6556
|
addVoucher: typeof addVoucher;
|
|
6536
6557
|
addCard: typeof addCard;
|
|
6558
|
+
sendMessage: typeof sendMessage;
|
|
6537
6559
|
interactOA: typeof interactOA;
|
|
6538
6560
|
interactOa: typeof interactOA;
|
|
6539
6561
|
isAllowedInteractWithOA: typeof checkIsAllowedInteractWithOA;
|
|
@@ -6600,4 +6622,4 @@ declare const otherApis: {
|
|
|
6600
6622
|
ZMACameraImp: typeof ZMACameraImp;
|
|
6601
6623
|
};
|
|
6602
6624
|
|
|
6603
|
-
export { Action, AddCardData, AddCardParams, AddCardReturns, AddVoucherData, AddVoucherReturns, AndroidBottomNavigationBarType, AppError, AsyncCallback, AsyncCallbackFailObject, AsyncProgressCallback, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, CardType, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, CheckoutKit, CheckoutPopupOpenParams, CheckoutPopupResponseData, CheckoutSDK, ChooseImageReturns, Common, ContextInfo, CreateOrderIAPReturns, CreateOrderReturns, Events as EventName, Events, FacingMode, FileInfo, FunctionProps, GetAppInfoReturns, GetAuthCodeReturns, GetBeaconDiscoveryReturns, GetDeviceInfoReturn, GetFileInfoReturns, GetLocationReturns, GetNetworkTypeReturns, GetPhoneNumberReturns, GetSettingReturn, GetStorageReturns, GetUserInfoReturns, GetZPITokenReturns, IAPMethodType, IAPPayType, IAPPayTypeType, IOSSafeAreaBottomType, IsSupportReturns, JumpStatus, KeepScreenReturns, LFSStorage, ListFile, 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, VoucherAction, VoucherActionType, VoucherCardData, VoucherCardMeta, VoucherDisplayType, ZMACamera, ZMACameraImp, addCard, addRating, addVoucher, 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 };
|
|
6625
|
+
export { Action, AddCardData, AddCardParams, AddCardReturns, AddVoucherData, AddVoucherReturns, AndroidBottomNavigationBarType, AppError, AsyncCallback, AsyncCallbackFailObject, AsyncProgressCallback, AsyncVoidCallback, AuthorizeType, CameraEvents, CameraParams, CardType, ChatType, CheckStateBioAuthenticationReturns, CheckTransactionReturns, CheckZaloCameraPermissionReturns, CheckoutKit, CheckoutPopupOpenParams, CheckoutPopupResponseData, CheckoutSDK, ChooseImageReturns, Common, ContextInfo, CreateOrderIAPReturns, CreateOrderReturns, Events as EventName, Events, FacingMode, FileInfo, FunctionProps, GetAppInfoReturns, GetAuthCodeReturns, GetBeaconDiscoveryReturns, GetDeviceInfoReturn, GetFileInfoReturns, GetLocationReturns, GetNetworkTypeReturns, GetPhoneNumberReturns, GetSettingReturn, GetStorageReturns, GetUserInfoReturns, GetZPITokenReturns, IAPMethodType, IAPPayType, IAPPayTypeType, IOSSafeAreaBottomType, IsSupportReturns, JumpStatus, KeepScreenReturns, LFSStorage, ListFile, 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, SendMessageParams, SendMessageReturns, SetStorageReturns, ShareSheetType, StatusBarType, StorageInfo, StreamType, SystemInfo, TempFile, TextAlignType, UserInfo, VibrateType, VoucherAction, VoucherActionType, VoucherCardData, VoucherCardMeta, VoucherDisplayType, ZMACamera, ZMACameraImp, addCard, addRating, addVoucher, 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, sendMessage, setAccessToken, setAndroidBottomNavigationBar, setIOSBottomSafeArea, setNavigationBarColor, setNavigationBarLeftButton, setNavigationBarTitle, setStatusBar, setStorage, setupAd, showCustomOAWidget, showFunctionButtonWidget, showOAWidget, showToast, startBeaconDiscovery, stopBeaconDiscovery, trackingManager, unfollowOA, vibrate, viewOAQr };
|