zmp-sdk 2.50.0-beta.4 → 2.51.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/downloadFile.js +1 -1
- package/apis/apis/lfs/getFileInfo.js +1 -0
- package/apis/apis/lfs/getSavedFileList.js +1 -0
- package/apis/apis/lfs/index.js +1 -0
- package/apis/apis/lfs/removeSavedFile.js +1 -0
- package/apis/apis/lfs/saveFile.js +1 -0
- package/apis/apis/openDocument.js +1 -1
- package/apis/apis/openMediaPicker.js +1 -1
- package/apis/apis/payment/index.js +1 -1
- package/apis/apis/saveImageToGallery.js +1 -1
- package/apis/apis/saveVideoToGallery.js +1 -1
- package/apis/common/apis/general/getAppInfo.js +1 -1
- package/apis/common/apis/general/lfs/getFileInfo.js +1 -0
- package/apis/common/apis/general/lfs/getSavedFileList.js +1 -0
- package/apis/common/apis/general/lfs/lfsSaveFile.js +1 -0
- package/apis/common/apis/general/lfs/removeSavedFile.js +1 -0
- package/apis/common/apis/general/openMediaPicker.js +1 -1
- package/apis/common/apis/general/saveFile.js +1 -1
- package/apis/common/apis/general/saveVideoToGallery.js +1 -1
- package/apis/constants.js +1 -1
- package/apis/index.d.ts +207 -87
- 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 +212 -84
- package/index.es.js +2 -2
- package/index.js +2 -2
- package/index.umd.js +3 -3
- package/package.json +1 -1
- package/apis/apis/openSettings.js +0 -1
- package/apis/apis/payment/openCheckoutPopup.js +0 -1
- package/apis/apis/payment/openPaymentLink.js +0 -1
- package/apis/common/apis/general/openSettings.js +0 -1
- package/apis/common/apis/general/payment/openCheckoutPopup.js +0 -1
package/apis/index.d.ts
CHANGED
|
@@ -616,6 +616,12 @@ declare const ACTION: {
|
|
|
616
616
|
message: string;
|
|
617
617
|
};
|
|
618
618
|
};
|
|
619
|
+
"-101": {
|
|
620
|
+
mapTo: {
|
|
621
|
+
code: number;
|
|
622
|
+
message: string;
|
|
623
|
+
};
|
|
624
|
+
};
|
|
619
625
|
};
|
|
620
626
|
};
|
|
621
627
|
};
|
|
@@ -853,6 +859,18 @@ declare const ACTION: {
|
|
|
853
859
|
};
|
|
854
860
|
};
|
|
855
861
|
};
|
|
862
|
+
LFS_FILE_INFO: {
|
|
863
|
+
skipJump: boolean;
|
|
864
|
+
};
|
|
865
|
+
LFS_LIST: {
|
|
866
|
+
skipJump: boolean;
|
|
867
|
+
};
|
|
868
|
+
LFS_FILE_SAVE: {
|
|
869
|
+
skipJump: boolean;
|
|
870
|
+
};
|
|
871
|
+
LFS_FILE_REMOVE: {
|
|
872
|
+
skipJump: boolean;
|
|
873
|
+
};
|
|
856
874
|
MP_APP_LIFECYCLE_TRACKING: {
|
|
857
875
|
skipJump: boolean;
|
|
858
876
|
};
|
|
@@ -927,10 +945,10 @@ type AsyncVoidCallback = {
|
|
|
927
945
|
success?: () => void;
|
|
928
946
|
fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
|
|
929
947
|
};
|
|
930
|
-
type AsyncProgressCallback = {
|
|
948
|
+
type AsyncProgressCallback<T = any> = {
|
|
931
949
|
action?: keyof typeof ACTION;
|
|
932
950
|
onProgress?: (progress: number) => void;
|
|
933
|
-
success?: () => void;
|
|
951
|
+
success?: ((res: T) => void) | undefined;
|
|
934
952
|
fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
|
|
935
953
|
};
|
|
936
954
|
type GetDeviceInfoReturn = {
|
|
@@ -1233,9 +1251,9 @@ type OpenProfilePickerReturns = {
|
|
|
1233
1251
|
};
|
|
1234
1252
|
type OpenMediaPickerReturns = {
|
|
1235
1253
|
/**
|
|
1236
|
-
*
|
|
1254
|
+
* Mảng đường dẫn file tạm trên thiết bị hoặc toàn bộ nội dung trả về của server upload media.
|
|
1237
1255
|
*/
|
|
1238
|
-
data: string;
|
|
1256
|
+
data: string[] | string;
|
|
1239
1257
|
};
|
|
1240
1258
|
type ContextInfo = {
|
|
1241
1259
|
/**
|
|
@@ -1324,15 +1342,22 @@ type GetSettingReturn = {
|
|
|
1324
1342
|
*/
|
|
1325
1343
|
authSetting: AuthorizeType<(typeof GET_SETTINGS_SCOPE_VALUES)[number]>;
|
|
1326
1344
|
};
|
|
1327
|
-
type
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1345
|
+
type GetFileInfoReturns = {
|
|
1346
|
+
size: number;
|
|
1347
|
+
digest: string;
|
|
1348
|
+
type: string;
|
|
1349
|
+
};
|
|
1350
|
+
type ListFile = {
|
|
1351
|
+
list: FileInfo[];
|
|
1352
|
+
};
|
|
1353
|
+
type FileInfo = {
|
|
1354
|
+
filePath: string;
|
|
1355
|
+
size: number;
|
|
1356
|
+
createTime: number;
|
|
1357
|
+
type: string;
|
|
1333
1358
|
};
|
|
1334
|
-
type
|
|
1335
|
-
|
|
1359
|
+
type SaveFileReturns = {
|
|
1360
|
+
savedPath: string;
|
|
1336
1361
|
};
|
|
1337
1362
|
|
|
1338
1363
|
declare enum CameraEvents {
|
|
@@ -3571,7 +3596,7 @@ declare const saveImageToGalleryArgs: ZodOptional<ZodObject<{
|
|
|
3571
3596
|
imageBase64Data?: string | undefined;
|
|
3572
3597
|
}>>[];
|
|
3573
3598
|
/**
|
|
3574
|
-
* Lưu ảnh vào thư viện media của thiết bị.
|
|
3599
|
+
* Lưu ảnh vào thư viện media của thiết bị. Hỗ trợ lưu ảnh từ URL hoặc từ giá trị base64.
|
|
3575
3600
|
*
|
|
3576
3601
|
* @minimumVersion 2.16.0
|
|
3577
3602
|
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
@@ -3588,6 +3613,14 @@ declare const saveImageToGalleryArgs: ZodOptional<ZodObject<{
|
|
|
3588
3613
|
* console.log("Lưu ảnh thành công!");
|
|
3589
3614
|
* ```
|
|
3590
3615
|
*
|
|
3616
|
+
* @example Lưu ảnh từ base64 vào thư viện media của thiết bị:
|
|
3617
|
+
* ```ts
|
|
3618
|
+
* await saveImageToGallery({
|
|
3619
|
+
* imageBase64Data: "data:image/jpeg;base64,//...your base64 data...",
|
|
3620
|
+
* });
|
|
3621
|
+
* console.log("Lưu ảnh thành công!");
|
|
3622
|
+
* ```
|
|
3623
|
+
*
|
|
3591
3624
|
* @example Xử lý lỗi khi lưu ảnh:
|
|
3592
3625
|
* ```ts
|
|
3593
3626
|
* try {
|
|
@@ -3613,11 +3646,14 @@ declare const saveImageToGalleryArgs: ZodOptional<ZodObject<{
|
|
|
3613
3646
|
declare function saveImageToGallery(args: AsyncProgressCallback & TypeOf<(typeof saveImageToGalleryArgs)[0]>): Promise<void>;
|
|
3614
3647
|
|
|
3615
3648
|
declare const saveVideoToGalleryArgs: ZodOptional<ZodObject<{
|
|
3616
|
-
videoUrl: ZodString
|
|
3649
|
+
videoUrl: ZodOptional<ZodString>;
|
|
3650
|
+
videoBase64Data: ZodOptional<ZodString>;
|
|
3617
3651
|
}, "strip", ZodTypeAny, {
|
|
3618
|
-
videoUrl
|
|
3652
|
+
videoUrl?: string | undefined;
|
|
3653
|
+
videoBase64Data?: string | undefined;
|
|
3619
3654
|
}, {
|
|
3620
|
-
videoUrl
|
|
3655
|
+
videoUrl?: string | undefined;
|
|
3656
|
+
videoBase64Data?: string | undefined;
|
|
3621
3657
|
}>>[];
|
|
3622
3658
|
/**
|
|
3623
3659
|
* Lưu video vào thư viện media của thiết bị.
|
|
@@ -3992,7 +4028,7 @@ declare function connectWifi(args: AsyncVoidCallback & TypeOf<(typeof connectWif
|
|
|
3992
4028
|
|
|
3993
4029
|
declare const openMediaPickerArgs: ZodObject<{
|
|
3994
4030
|
type: ZodEnum<["video", "photo", "file", "zcamera", "zcamera_photo", "zcamera_video", "zcamera_scan"]>;
|
|
3995
|
-
serverUploadUrl: ZodString
|
|
4031
|
+
serverUploadUrl: ZodOptional<ZodString>;
|
|
3996
4032
|
maxItemSize: ZodOptional<ZodNumber>;
|
|
3997
4033
|
editView: ZodOptional<ZodObject<{
|
|
3998
4034
|
enable: ZodOptional<ZodBoolean>;
|
|
@@ -4006,7 +4042,9 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4006
4042
|
}>>;
|
|
4007
4043
|
silentRequest: ZodOptional<ZodBoolean>;
|
|
4008
4044
|
maxSelectItem: ZodOptional<ZodNumber>;
|
|
4045
|
+
compressLevel: ZodDefault<ZodOptional<ZodNumber>>;
|
|
4009
4046
|
}, "strip", ZodTypeAny, {
|
|
4047
|
+
serverUploadUrl?: string | undefined;
|
|
4010
4048
|
maxItemSize?: number | undefined;
|
|
4011
4049
|
editView?: {
|
|
4012
4050
|
enable?: boolean | undefined;
|
|
@@ -4015,8 +4053,9 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4015
4053
|
silentRequest?: boolean | undefined;
|
|
4016
4054
|
maxSelectItem?: number | undefined;
|
|
4017
4055
|
type: "video" | "zcamera" | "zcamera_photo" | "zcamera_video" | "zcamera_scan" | "photo" | "file";
|
|
4018
|
-
|
|
4056
|
+
compressLevel: number;
|
|
4019
4057
|
}, {
|
|
4058
|
+
serverUploadUrl?: string | undefined;
|
|
4020
4059
|
maxItemSize?: number | undefined;
|
|
4021
4060
|
editView?: {
|
|
4022
4061
|
enable?: boolean | undefined;
|
|
@@ -4024,20 +4063,20 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4024
4063
|
} | undefined;
|
|
4025
4064
|
silentRequest?: boolean | undefined;
|
|
4026
4065
|
maxSelectItem?: number | undefined;
|
|
4066
|
+
compressLevel?: number | undefined;
|
|
4027
4067
|
type: "video" | "zcamera" | "zcamera_photo" | "zcamera_video" | "zcamera_scan" | "photo" | "file";
|
|
4028
|
-
serverUploadUrl: string;
|
|
4029
4068
|
}>[];
|
|
4030
4069
|
/**
|
|
4031
|
-
* Mở cửa sổ chọn media (camera, ảnh, file, video) từ thiết bị.
|
|
4032
|
-
*
|
|
4033
|
-
*
|
|
4070
|
+
* Mở cửa sổ chọn media (camera, ảnh, file, video) từ thiết bị. Từ phiên bản 2.51.0 SDK hỗ trợ 2 tính năng mới:
|
|
4071
|
+
* Nén ảnh với các chất lượng đầu ra khác nhau bằng tham số compressLevel. Nếu không truyền, SDK sẽ mặc định trả về ảnh nén ở mức trung bình (compressLevel=2).
|
|
4072
|
+
* Tham số serverUploadUrl không còn bắt buộc. Mặc định nếu không truyền, SDK sẽ trả về đường dẫn tạm thời (local cache path) của media mà không tự động upload lên server.
|
|
4034
4073
|
*
|
|
4035
4074
|
* @minimumVersion 2.18.11
|
|
4036
4075
|
* @minimumVersion 2.23.2: hỗ trợ các type `zcamera`, `zcamera_photo`, `zcamera_video`, `zcamera_scan`.
|
|
4037
4076
|
* @requirePermission Cần xin Cấp quyền sử dụng các API này cho Mini App ID tại trang Quản lý ứng dụng. Nếu không, sẽ bị [lỗi với người dùng bình thường, mặc dù Developer/Admin thì không bị](https://mini.zalo.me/community/8746968970844796879/loi-chi-xay-ra-voi-nguoi-dung-binh-thuong-con-developer-admin-thi-khong-bi).
|
|
4038
4077
|
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
4039
4078
|
*
|
|
4040
|
-
* @param {string} serverUploadUrl Đường dẫn upload media. Server phải hỗ trợ upload media qua POST và trả về kết quả dạng JSON. Xem ví dụ về server tại [đây](https://mini.zalo.me/documents/api/openMediaPicker/#server).
|
|
4079
|
+
* @param {string} [serverUploadUrl] Đường dẫn upload media. Server phải hỗ trợ upload media qua POST và trả về kết quả dạng JSON. Xem ví dụ về server tại [đây](https://mini.zalo.me/documents/api/openMediaPicker/#server).
|
|
4041
4080
|
* @param {"photo" | "file" | "video" | "zcamera" | "zcamera_photo" | "zcamera_video" | "zcamera_scan"} type Loại media cần chọn. Các giá trị:
|
|
4042
4081
|
* - 'photo': Mở cửa sổ chọn ảnh.
|
|
4043
4082
|
* - 'file': Mở cửa sổ chọn file.
|
|
@@ -4055,13 +4094,26 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4055
4094
|
* @param {Object} [editView] Hiển thị view chỉnh sửa ảnh.
|
|
4056
4095
|
* @param {boolean} [editView.enable=true] Hiển thị view chỉnh sửa ảnh.
|
|
4057
4096
|
* @param {string} [editView.aspectRatio="1:1"] Cắt ảnh theo tỉ lệ đã chỉ định. Tỉ lệ truyền vào theo format `width:height` (phân số tối giản quy định tỉ lệ width/height).
|
|
4058
|
-
*
|
|
4097
|
+
* @param {number} [compressLevel=2] Mức nén ảnh khi chọn type là `photo`. Các mức nén:
|
|
4098
|
+
* - 0: Không nén (ảnh gốc).
|
|
4099
|
+
* - 1: Nén nhẹ.
|
|
4100
|
+
* - 2: Nén trung bình.
|
|
4101
|
+
* - 3: Nén cao.
|
|
4059
4102
|
* @returns {OpenMediaPickerReturns} kết quả trả về.
|
|
4060
4103
|
*
|
|
4104
|
+
* @example Mở cửa sổ chọn ảnh, nén ảnh với mức nén cao, file trả về là đường dẫn tạm thời (local cache path):
|
|
4105
|
+
* ```ts
|
|
4106
|
+
* const { data } = await openMediaPicker({
|
|
4107
|
+
* type: "photo",
|
|
4108
|
+
* compressLevel: 3,
|
|
4109
|
+
* });
|
|
4110
|
+
*
|
|
4111
|
+
* console.log(data);
|
|
4112
|
+
* ```
|
|
4113
|
+
*
|
|
4061
4114
|
* @example Mở cửa sổ chọn ảnh nhận kết quả trả về dạng JSON:
|
|
4062
4115
|
* ```ts
|
|
4063
4116
|
* const { data } = await openMediaPicker({
|
|
4064
|
-
* serverUploadUrl: "https://<your-domain-api>/upload/media",
|
|
4065
4117
|
* type: "photo",
|
|
4066
4118
|
* });
|
|
4067
4119
|
* const result = JSON.parse(data);
|
|
@@ -4071,7 +4123,6 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4071
4123
|
* @example Chọn nhiều ảnh:
|
|
4072
4124
|
* ```ts
|
|
4073
4125
|
* const { data } = await openMediaPicker({
|
|
4074
|
-
* serverUploadUrl: "https://<your-domain-api>/upload/media",
|
|
4075
4126
|
* type: "photo",
|
|
4076
4127
|
* maxSelectItem: 5,
|
|
4077
4128
|
* });
|
|
@@ -4080,7 +4131,6 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4080
4131
|
* @example Chọn video:
|
|
4081
4132
|
* ```ts
|
|
4082
4133
|
* const { data } = await openMediaPicker({
|
|
4083
|
-
* serverUploadUrl: "https://<your-domain-api>/upload/media",
|
|
4084
4134
|
* type: "video",
|
|
4085
4135
|
* });
|
|
4086
4136
|
* ```
|
|
@@ -4088,10 +4138,19 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4088
4138
|
* @example Chọn ảnh từ camera Zalo:
|
|
4089
4139
|
* ```ts
|
|
4090
4140
|
* const { data } = await openMediaPicker({
|
|
4091
|
-
* serverUploadUrl: "https://<your-domain-api>/upload/media",
|
|
4092
4141
|
* type: "zcamera_photo",
|
|
4093
4142
|
* });
|
|
4094
4143
|
* ```
|
|
4144
|
+
*
|
|
4145
|
+
* @example Mở cửa sổ chọn ảnh và upload lên server:
|
|
4146
|
+
* ```ts
|
|
4147
|
+
* const { data } = await openMediaPicker({
|
|
4148
|
+
* type: "photo",
|
|
4149
|
+
* serverUploadUrl: "https://your-server.com/upload",
|
|
4150
|
+
* });
|
|
4151
|
+
* const result = JSON.parse(data);
|
|
4152
|
+
* console.log(result);
|
|
4153
|
+
* ```
|
|
4095
4154
|
*/
|
|
4096
4155
|
declare function openMediaPicker(args: AsyncCallback<OpenMediaPickerReturns> & TypeOf<(typeof openMediaPickerArgs)[0]>): Promise<OpenMediaPickerReturns>;
|
|
4097
4156
|
|
|
@@ -5404,60 +5463,12 @@ declare const nativeStorage: {
|
|
|
5404
5463
|
getStorageInfo: typeof getStorageInfoSync;
|
|
5405
5464
|
};
|
|
5406
5465
|
|
|
5407
|
-
declare const openPaymentLinkArgs: ZodObject<{
|
|
5408
|
-
url: ZodString;
|
|
5409
|
-
config: ZodOptional<ZodObject<{
|
|
5410
|
-
style: ZodOptional<ZodDefault<ZodEnum<["bottomSheet", "normal"]>>>;
|
|
5411
|
-
leftButton: ZodOptional<ZodDefault<ZodEnum<["back", "none"]>>>;
|
|
5412
|
-
}, "strip", ZodTypeAny, {
|
|
5413
|
-
style?: "normal" | "bottomSheet" | undefined;
|
|
5414
|
-
leftButton?: "none" | "back" | undefined;
|
|
5415
|
-
}, {
|
|
5416
|
-
style?: "normal" | "bottomSheet" | undefined;
|
|
5417
|
-
leftButton?: "none" | "back" | undefined;
|
|
5418
|
-
}>>;
|
|
5419
|
-
}, "strip", ZodTypeAny, {
|
|
5420
|
-
config?: {
|
|
5421
|
-
style?: "normal" | "bottomSheet" | undefined;
|
|
5422
|
-
leftButton?: "none" | "back" | undefined;
|
|
5423
|
-
} | undefined;
|
|
5424
|
-
url: string;
|
|
5425
|
-
}, {
|
|
5426
|
-
config?: {
|
|
5427
|
-
style?: "normal" | "bottomSheet" | undefined;
|
|
5428
|
-
leftButton?: "none" | "back" | undefined;
|
|
5429
|
-
} | undefined;
|
|
5430
|
-
url: string;
|
|
5431
|
-
}>[];
|
|
5432
|
-
declare function openPaymentLink(args: AsyncCallback<OpenWebviewReturns> & TypeOf<(typeof openPaymentLinkArgs)[0]>): Promise<void>;
|
|
5433
|
-
|
|
5434
|
-
declare const checkoutPopupArgs: ZodObject<{
|
|
5435
|
-
amount: ZodUnion<[ZodString, ZodNumber]>;
|
|
5436
|
-
orderDescription: ZodString;
|
|
5437
|
-
qrContent: ZodString;
|
|
5438
|
-
}, "strip", ZodTypeAny, {
|
|
5439
|
-
amount: string | number;
|
|
5440
|
-
orderDescription: string;
|
|
5441
|
-
qrContent: string;
|
|
5442
|
-
}, {
|
|
5443
|
-
amount: string | number;
|
|
5444
|
-
orderDescription: string;
|
|
5445
|
-
qrContent: string;
|
|
5446
|
-
}>[];
|
|
5447
|
-
/**
|
|
5448
|
-
* Gửi thông tin thanh toán đến Checkout để mở popup
|
|
5449
|
-
* @param args
|
|
5450
|
-
*/
|
|
5451
|
-
declare function openCheckoutPopup(args: AsyncCallback<CheckoutPopupOpenParams> & TypeOf<(typeof checkoutPopupArgs)[0]>): Promise<CheckoutPopupResponseData>;
|
|
5452
|
-
|
|
5453
5466
|
declare const Payment: {
|
|
5454
5467
|
purchase: typeof purchase$1;
|
|
5455
5468
|
createOrder: typeof createOrder;
|
|
5456
5469
|
checkTransaction: typeof checkTransaction;
|
|
5457
5470
|
createOrderIAP: typeof createOrderIAP;
|
|
5458
5471
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5459
|
-
openPaymentLink: typeof openPaymentLink;
|
|
5460
|
-
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5461
5472
|
};
|
|
5462
5473
|
declare const CheckoutSDK: {
|
|
5463
5474
|
purchase: typeof purchase$1;
|
|
@@ -5465,16 +5476,17 @@ declare const CheckoutSDK: {
|
|
|
5465
5476
|
checkTransaction: typeof checkTransaction;
|
|
5466
5477
|
createOrderIAP: typeof createOrderIAP;
|
|
5467
5478
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5468
|
-
openPaymentLink: typeof openPaymentLink;
|
|
5469
|
-
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5470
5479
|
};
|
|
5471
5480
|
|
|
5472
5481
|
declare const downloadFileArgs: ZodOptional<ZodObject<{
|
|
5473
|
-
url: ZodString
|
|
5482
|
+
url: ZodOptional<ZodString>;
|
|
5483
|
+
fileBase64Data: ZodOptional<ZodString>;
|
|
5474
5484
|
}, "strip", ZodTypeAny, {
|
|
5475
|
-
url
|
|
5485
|
+
url?: string | undefined;
|
|
5486
|
+
fileBase64Data?: string | undefined;
|
|
5476
5487
|
}, {
|
|
5477
|
-
url
|
|
5488
|
+
url?: string | undefined;
|
|
5489
|
+
fileBase64Data?: string | undefined;
|
|
5478
5490
|
}>>[];
|
|
5479
5491
|
/**
|
|
5480
5492
|
* API hỗ trợ tải file về thiết bị. Hỗ trợ giao thức tải file `https://` với các định dạng được liệt kê bên dưới.
|
|
@@ -5627,15 +5639,18 @@ declare const CheckoutKit: {
|
|
|
5627
5639
|
declare const openDocumentArgs: ZodObject<{
|
|
5628
5640
|
url: ZodString;
|
|
5629
5641
|
title: ZodOptional<ZodString>;
|
|
5630
|
-
|
|
5631
|
-
|
|
5642
|
+
share: ZodDefault<ZodOptional<ZodBoolean>>;
|
|
5643
|
+
download: ZodDefault<ZodOptional<ZodBoolean>>;
|
|
5644
|
+
edit: ZodDefault<ZodOptional<ZodBoolean>>;
|
|
5632
5645
|
}, "strip", ZodTypeAny, {
|
|
5633
5646
|
title?: string | undefined;
|
|
5634
|
-
download?: boolean | undefined;
|
|
5635
|
-
edit?: boolean | undefined;
|
|
5636
5647
|
url: string;
|
|
5648
|
+
share: boolean;
|
|
5649
|
+
download: boolean;
|
|
5650
|
+
edit: boolean;
|
|
5637
5651
|
}, {
|
|
5638
5652
|
title?: string | undefined;
|
|
5653
|
+
share?: boolean | undefined;
|
|
5639
5654
|
download?: boolean | undefined;
|
|
5640
5655
|
edit?: boolean | undefined;
|
|
5641
5656
|
url: string;
|
|
@@ -5648,6 +5663,7 @@ declare const openDocumentArgs: ZodObject<{
|
|
|
5648
5663
|
* @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.
|
|
5649
5664
|
* @param {string} [title] Tiêu đề của tài liệu trên header bar. Mặc định lấy tên từ URL.
|
|
5650
5665
|
* @param {boolean} [download=false] Bật tính năng tải tài liệu. Mặc định là false.
|
|
5666
|
+
* @param {boolean} [share=false] Bật tính năng chia sẻ tài liệu (chỉ hỗ trợ trên Android từ phiên bản sdk 2.50.0 và Zalo 25.11.01 trở đi). Mặc định là false.
|
|
5651
5667
|
* @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.
|
|
5652
5668
|
*
|
|
5653
5669
|
* @example Mở tài liệu PDF từ URL:
|
|
@@ -5720,7 +5736,111 @@ declare function getEntrySource(args?: AsyncCallback<{
|
|
|
5720
5736
|
|
|
5721
5737
|
declare function getDeviceInfo(args?: AsyncCallback<GetDeviceInfoReturn>): Promise<GetDeviceInfoReturn>;
|
|
5722
5738
|
|
|
5723
|
-
declare
|
|
5739
|
+
declare const getFileInfoArgs: ZodOptional<ZodObject<{
|
|
5740
|
+
filePath: ZodString;
|
|
5741
|
+
digestAlgorithm: ZodDefault<ZodOptional<ZodEnum<["sha1", "md5"]>>>;
|
|
5742
|
+
}, "strip", ZodTypeAny, {
|
|
5743
|
+
filePath: string;
|
|
5744
|
+
digestAlgorithm: "sha1" | "md5";
|
|
5745
|
+
}, {
|
|
5746
|
+
digestAlgorithm?: "sha1" | "md5" | undefined;
|
|
5747
|
+
filePath: string;
|
|
5748
|
+
}>>[];
|
|
5749
|
+
/**
|
|
5750
|
+
* Lấy thông tin của local file (local cache hoặc local data).
|
|
5751
|
+
*
|
|
5752
|
+
* @minimumVersion 2.51.0
|
|
5753
|
+
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
5754
|
+
*
|
|
5755
|
+
* @param {string} filePath Đường dẫn tới file trong folder tạm hoặc đã lưu cục bộ
|
|
5756
|
+
* @param {"sha1" | "md5"} [digestAlgorithm="md5"] Thuật toán băm để tính toán giá trị băm của file. Hiện hỗ trợ `md5` và `sha1`.
|
|
5757
|
+
* @returns {GetFileInfoReturns} Thông tin file bao gồm kích thước (size), giá trị băm (digest) và loại file (type).
|
|
5758
|
+
* @example Lấy thông tin file đã lưu cục bộ:
|
|
5759
|
+
* ```ts
|
|
5760
|
+
* const { fileInfo } = await getFileInfo({
|
|
5761
|
+
* filePath: "lfs file path",
|
|
5762
|
+
* digestAlgorithm: "sha1",
|
|
5763
|
+
* });
|
|
5764
|
+
* console.log(fileInfo.size);
|
|
5765
|
+
* console.log(fileInfo.digest);
|
|
5766
|
+
* console.log(fileInfo.type);
|
|
5767
|
+
* ```
|
|
5768
|
+
*/
|
|
5769
|
+
declare function getFileInfo(args: AsyncCallback<GetFileInfoReturns> & TypeOf<(typeof getFileInfoArgs)[0]>): Promise<GetFileInfoReturns>;
|
|
5770
|
+
|
|
5771
|
+
/**
|
|
5772
|
+
* Lấy thông tin tất cả các file đã được lưu cục bộ (local data) của mini app.
|
|
5773
|
+
*
|
|
5774
|
+
* @minimumVersion 2.51.0
|
|
5775
|
+
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
5776
|
+
*
|
|
5777
|
+
* @returns {ListFile} Danh sách các file đã lưu cục bộ (local data).
|
|
5778
|
+
* @example Lấy danh sách các file đã lưu cục bộ:
|
|
5779
|
+
* ```ts
|
|
5780
|
+
* const { files } = await getSavedFileList();
|
|
5781
|
+
* files.forEach(file => {
|
|
5782
|
+
* console.log(file.filePath);
|
|
5783
|
+
* console.log(file.size);
|
|
5784
|
+
* console.log(file.type);
|
|
5785
|
+
* console.log(file.createTime);
|
|
5786
|
+
* });
|
|
5787
|
+
* ```
|
|
5788
|
+
*/
|
|
5789
|
+
declare function getSavedFileList(args: AsyncCallback<ListFile>): Promise<ListFile>;
|
|
5790
|
+
|
|
5791
|
+
declare const removeSavedFileArgs: ZodOptional<ZodObject<{
|
|
5792
|
+
filePath: ZodString;
|
|
5793
|
+
}, "strip", ZodTypeAny, {
|
|
5794
|
+
filePath: string;
|
|
5795
|
+
}, {
|
|
5796
|
+
filePath: string;
|
|
5797
|
+
}>>[];
|
|
5798
|
+
/**
|
|
5799
|
+
* Xoá file cục bộ (cache hoặc data) đã lưu trước đó.
|
|
5800
|
+
*
|
|
5801
|
+
* @minimumVersion 2.51.0
|
|
5802
|
+
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
5803
|
+
*
|
|
5804
|
+
* @param {string} filePath Đường dẫn tới file trong folder (cache hoặc data) đã lưu trước đó.
|
|
5805
|
+
* @returns {void}
|
|
5806
|
+
* @example Xoá file đã lưu cục bộ:
|
|
5807
|
+
* ```ts
|
|
5808
|
+
* await removeSavedFile({ filePath: "LFS file path" });
|
|
5809
|
+
* ```
|
|
5810
|
+
*/
|
|
5811
|
+
declare function removeSavedFile(args: AsyncVoidCallback & TypeOf<(typeof removeSavedFileArgs)[0]>): Promise<void>;
|
|
5812
|
+
|
|
5813
|
+
declare const saveFileArgs: ZodOptional<ZodObject<{
|
|
5814
|
+
filePath: ZodString;
|
|
5815
|
+
}, "strip", ZodTypeAny, {
|
|
5816
|
+
filePath: string;
|
|
5817
|
+
}, {
|
|
5818
|
+
filePath: string;
|
|
5819
|
+
}>>[];
|
|
5820
|
+
/**
|
|
5821
|
+
* Lưu file từ internet hoặc file tạm về vùng nhớ cục bộ (local data)
|
|
5822
|
+
*
|
|
5823
|
+
* @minimumVersion 2.51.0
|
|
5824
|
+
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
5825
|
+
|
|
5826
|
+
* @param {string} filePath Đường dẫn tới file từ internet hoặc file tạm của mini app (trả về sau khi gọi API openMediaPicker)
|
|
5827
|
+
* @returns {SaveFileReturns} Đường dẫn tới file đã được lưu cục bộ.
|
|
5828
|
+
* @example Lưu file từ internet về vùng nhớ cục bộ:
|
|
5829
|
+
* ```ts
|
|
5830
|
+
* const { savedPath } = await saveFile({
|
|
5831
|
+
* filePath: "https://example.com/path/to/your/file.jpg",
|
|
5832
|
+
* });
|
|
5833
|
+
* console.log(`File saved at: ${savedPath}`);
|
|
5834
|
+
* ```
|
|
5835
|
+
*/
|
|
5836
|
+
declare function saveFile(args: AsyncProgressCallback<SaveFileReturns> & TypeOf<(typeof saveFileArgs)[0]>): Promise<SaveFileReturns>;
|
|
5837
|
+
|
|
5838
|
+
declare const LFSStorage: {
|
|
5839
|
+
getFileInfo: typeof getFileInfo;
|
|
5840
|
+
getSavedFileList: typeof getSavedFileList;
|
|
5841
|
+
removeSavedFile: typeof removeSavedFile;
|
|
5842
|
+
saveFile: typeof saveFile;
|
|
5843
|
+
};
|
|
5724
5844
|
|
|
5725
5845
|
declare class AppError {
|
|
5726
5846
|
code: number;
|
|
@@ -5732,4 +5852,4 @@ declare class AppError {
|
|
|
5732
5852
|
toJSON(): object;
|
|
5733
5853
|
}
|
|
5734
5854
|
|
|
5735
|
-
export { AppError, CameraEvents, CheckoutKit, CheckoutSDK, Events as EventName, Events, FacingMode, MediaConstraints, MediaDevice, Payment, PhotoConstraint, PhotoFormat, PhotoFrame, PhotoQuality, StreamType, ZMACamera, ZMACameraImp, addRating, authorize, checkNFC, checkStateBioAuthentication, checkTransaction, checkZaloCameraPermission, chooseImage, clearStorage, closeApp, closeLoading, configAppView, connectWifi, createCameraContext, createOrder, createOrderIAP, createShortcut, 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, 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,
|
|
5855
|
+
export { AppError, CameraEvents, CheckoutKit, CheckoutSDK, Events as EventName, Events, FacingMode, LFSStorage, MediaConstraints, MediaDevice, Payment, PhotoConstraint, PhotoFormat, PhotoFrame, PhotoQuality, StreamType, ZMACamera, ZMACameraImp, addRating, authorize, checkNFC, checkStateBioAuthentication, checkTransaction, checkZaloCameraPermission, chooseImage, clearStorage, closeApp, closeLoading, configAppView, connectWifi, createCameraContext, createOrder, createOrderIAP, createShortcut, 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, 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$1 as 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 };
|
package/apis/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./external/@swc/helpers/src/_object_without_properties.mjs.js';import*as o from"./index.js";import t from"./appEnv/getEnv.js";export{AndroidBottomNavigationBarType,ChatType,Events as EventName,Events,IAPPayType,IOSSafeAreaBottomType,JumpStatus,MediaPickerType,NetworkType,OpenProfilePickerType,OrientationType,PlatformType,PostFeedType,ProfileType,ProrationMode,ScanNFCType,ShareSheetType,StatusBarType,TextAlignType,VibrateType}from"./types/enum.js";export{CameraEvents,FacingMode,PhotoFormat,PhotoQuality,StreamType}from"./types/media.js";export{AppError}from"./utils/errorHandler.js";export{login}from"./apis/login.js";export{getAccessToken}from"./apis/getAccessToken.js";export{getVersion}from"./apis/getVersion.js";export{getSystemInfo}from"./apis/getSystemInfo.js";export{setNavigationBarTitle}from"./apis/setNavigationBarTitle.js";export{setNavigationBarColor}from"./apis/setNavigationBarColor.js";export{setNavigationBarLeftButton}from"./apis/setNavigationBarLeftButton.js";export{setStorage}from"./apis/setStorage.js";export{getStorage}from"./apis/getStorage.js";export{getStorageInfo}from"./apis/getStorageInfo.js";export{removeStorage}from"./apis/removeStorage.js";export{clearStorage}from"./apis/clearStorage.js";export{getUserInfo}from"./apis/getUserInfo.js";export{getNetworkType}from"./apis/getNetworkType.js";export{onNetworkStatusChange}from"./apis/onNetworkStatusChange.js";export{startBeaconDiscovery}from"./apis/startBeaconDiscovery.js";export{stopBeaconDiscovery}from"./apis/stopBeaconDiscovery.js";export{getBeacons}from"./apis/getBeacons.js";export{closeApp}from"./apis/closeApp.js";export{scanQRCode}from"./apis/scanQRCode.js";export{openProfile}from"./apis/openProfile.js";export{openChat}from"./apis/openChat.js";export{openPostFeed}from"./apis/openPostFeed.js";export{followOA}from"./apis/followOA.js";export{unfollowOA}from"./apis/unfollowOA.js";export{openShareSheet}from"./apis/openShareSheet.js";export{requestCameraPermission}from"./apis/requestCameraPermission.js";export{createShortcut}from"./apis/createShortcut.js";export{openBioAuthentication}from"./apis/openBioAuthentication.js";export{checkStateBioAuthentication}from"./apis/checkStateBioAuthentication.js";export{showToast}from"./apis/showToast.js";export{hideKeyboard}from"./apis/hideKeyboard.js";export{openPhone}from"./apis/openPhone.js";export{openSMS}from"./apis/openSMS.js";export{viewOAQr}from"./apis/viewOAQr.js";export{keepScreen}from"./apis/keepScreen.js";export{onKeepScreen}from"./apis/onKeepScreen.js";export{offKeepScreen}from"./apis/offKeepScreen.js";export{saveImageToGallery}from"./apis/saveImageToGallery.js";export{saveVideoToGallery}from"./apis/saveVideoToGallery.js";export{openMiniApp}from"./apis/openMiniApp.js";export{vibrate}from"./apis/vibrate.js";export{openWebview}from"./apis/openWebview.js";export{getRouteParams}from"./apis/getRouteParams.js";export{getAppInfo}from"./apis/getAppInfo.js";export{sendDataToPreviousMiniApp}from"./apis/sendDataToPreviousMiniApp.js";export{getPhoneNumber}from"./apis/getPhoneNumber.js";export{openProfilePicker}from"./apis/openProfilePicker.js";export{connectWifi}from"./apis/connectWifi.js";export{openMediaPicker}from"./apis/openMediaPicker.js";export{getShareableLink}from"./apis/getShareableLink.js";export{closeLoading}from"./apis/closeLoading.js";export{requestUpdateZalo}from"./apis/requestUpdateZalo.js";export{onConfirmToExit}from"./apis/onConfirmToExit.js";export{offConfirmToExit}from"./apis/offConfirmToExit.js";export{getDeviceId}from"./apis/getDeviceId.js";export{getDeviceIdAsync}from"./apis/getDeviceIdAsync.js";export{getContext}from"./apis/getContext.js";export{getContextAsync}from"./apis/getContextAsync.js";export{getAuthCode}from"./apis/getAuthCode.js";export{getZPIToken}from"./apis/getZPIToken.js";export{setAccessToken}from"./apis/setAccessToken.js";export{openOutApp}from"./apis/openOutApp.js";export{chooseImage}from"./apis/chooseImage.js";export{getLocation}from"./apis/getLocation.js";export{onCallbackData}from"./apis/onCallbackData.js";export{createOrder}from"./apis/payment/createOrder.js";export{purchase}from"./apis/payment/purchase.js";export{selectPaymentMethod}from"./apis/payment/selectPaymentMethod.js";export{checkTransaction}from"./apis/payment/checkTransaction.js";export{createOrderIAP}from"./apis/payment/createOrderIAP.js";export{events}from"./apis/events.js";export{setAndroidBottomNavigationBar}from"./apis/setAndroidBottomNavigationBar.js";export{setIOSBottomSafeArea}from"./apis/setIOSBottomSafeArea.js";export{setStatusBar}from"./apis/setStatusBar.js";export{configAppView}from"./apis/configAppView.js";export{minimizeApp}from"./apis/minimizeApp.js";export{openPermissionSetting}from"./apis/openPermissionSetting.js";export{favoriteApp}from"./apis/favoriteApp.js";export{openGroupList}from"./apis/openGroupList.js";export{requestSendNotification}from"./apis/requestSendNotification.js";export{addRating}from"./apis/addRating.js";export{interactOA,interactOA as interactOa}from"./apis/interactOA.js";export{checkIsAllowedInteractWithOA as isAllowedInteractWithOA}from"./apis/checkIsAllowedInteractWithOA.js";export{getSetting}from"./apis/getSetting.js";export{authorize}from"./apis/authorize.js";export{checkZaloCameraPermission}from"./apis/checkZaloCameraPermission.js";export{getUserID}from"./apis/getUserID.js";export{getIDToken}from"./apis/getIDToken.js";export{createCameraContext}from"./apis/createCameraContext.js";export{setupAd}from"./apis/adtimaAd/setup.js";export{loadAd}from"./apis/adtimaAd/load.js";export{displayAd}from"./apis/adtimaAd/display.js";export{refreshAd}from"./apis/adtimaAd/refresh.js";export{showOAWidget}from"./apis/showOAWidget.js";export{showFunctionButtonWidget}from"./apis/showFunctionButtonWidget.js";export{scanNFC}from"./apis/scanNFC.js";export{checkNFC}from"./apis/checkNFC.js";export{nativeStorage}from"./apis/native-storage/index.js";export{CheckoutSDK,Payment}from"./apis/payment/index.js";export{downloadFile}from"./apis/downloadFile.js";export{trackingManager}from"./apis/trackingManager/index.js";export{showCustomOAWidget}from"./apis/showCustomOAWidget.js";export{CheckoutKit}from"./apis/checkoutKit/index.js";export{openDocument}from"./apis/openDocument.js";export{getEntrySource}from"./apis/getEntrySource.js";export{getDeviceInfo}from"./apis/getDeviceInfo.js";export{
|
|
1
|
+
import e from'./external/@swc/helpers/src/_object_without_properties.mjs.js';import*as o from"./index.js";import t from"./appEnv/getEnv.js";export{AndroidBottomNavigationBarType,ChatType,Events as EventName,Events,IAPPayType,IOSSafeAreaBottomType,JumpStatus,MediaPickerType,NetworkType,OpenProfilePickerType,OrientationType,PlatformType,PostFeedType,ProfileType,ProrationMode,ScanNFCType,ShareSheetType,StatusBarType,TextAlignType,VibrateType}from"./types/enum.js";export{CameraEvents,FacingMode,PhotoFormat,PhotoQuality,StreamType}from"./types/media.js";export{AppError}from"./utils/errorHandler.js";export{login}from"./apis/login.js";export{getAccessToken}from"./apis/getAccessToken.js";export{getVersion}from"./apis/getVersion.js";export{getSystemInfo}from"./apis/getSystemInfo.js";export{setNavigationBarTitle}from"./apis/setNavigationBarTitle.js";export{setNavigationBarColor}from"./apis/setNavigationBarColor.js";export{setNavigationBarLeftButton}from"./apis/setNavigationBarLeftButton.js";export{setStorage}from"./apis/setStorage.js";export{getStorage}from"./apis/getStorage.js";export{getStorageInfo}from"./apis/getStorageInfo.js";export{removeStorage}from"./apis/removeStorage.js";export{clearStorage}from"./apis/clearStorage.js";export{getUserInfo}from"./apis/getUserInfo.js";export{getNetworkType}from"./apis/getNetworkType.js";export{onNetworkStatusChange}from"./apis/onNetworkStatusChange.js";export{startBeaconDiscovery}from"./apis/startBeaconDiscovery.js";export{stopBeaconDiscovery}from"./apis/stopBeaconDiscovery.js";export{getBeacons}from"./apis/getBeacons.js";export{closeApp}from"./apis/closeApp.js";export{scanQRCode}from"./apis/scanQRCode.js";export{openProfile}from"./apis/openProfile.js";export{openChat}from"./apis/openChat.js";export{openPostFeed}from"./apis/openPostFeed.js";export{followOA}from"./apis/followOA.js";export{unfollowOA}from"./apis/unfollowOA.js";export{openShareSheet}from"./apis/openShareSheet.js";export{requestCameraPermission}from"./apis/requestCameraPermission.js";export{createShortcut}from"./apis/createShortcut.js";export{openBioAuthentication}from"./apis/openBioAuthentication.js";export{checkStateBioAuthentication}from"./apis/checkStateBioAuthentication.js";export{showToast}from"./apis/showToast.js";export{hideKeyboard}from"./apis/hideKeyboard.js";export{openPhone}from"./apis/openPhone.js";export{openSMS}from"./apis/openSMS.js";export{viewOAQr}from"./apis/viewOAQr.js";export{keepScreen}from"./apis/keepScreen.js";export{onKeepScreen}from"./apis/onKeepScreen.js";export{offKeepScreen}from"./apis/offKeepScreen.js";export{saveImageToGallery}from"./apis/saveImageToGallery.js";export{saveVideoToGallery}from"./apis/saveVideoToGallery.js";export{openMiniApp}from"./apis/openMiniApp.js";export{vibrate}from"./apis/vibrate.js";export{openWebview}from"./apis/openWebview.js";export{getRouteParams}from"./apis/getRouteParams.js";export{getAppInfo}from"./apis/getAppInfo.js";export{sendDataToPreviousMiniApp}from"./apis/sendDataToPreviousMiniApp.js";export{getPhoneNumber}from"./apis/getPhoneNumber.js";export{openProfilePicker}from"./apis/openProfilePicker.js";export{connectWifi}from"./apis/connectWifi.js";export{openMediaPicker}from"./apis/openMediaPicker.js";export{getShareableLink}from"./apis/getShareableLink.js";export{closeLoading}from"./apis/closeLoading.js";export{requestUpdateZalo}from"./apis/requestUpdateZalo.js";export{onConfirmToExit}from"./apis/onConfirmToExit.js";export{offConfirmToExit}from"./apis/offConfirmToExit.js";export{getDeviceId}from"./apis/getDeviceId.js";export{getDeviceIdAsync}from"./apis/getDeviceIdAsync.js";export{getContext}from"./apis/getContext.js";export{getContextAsync}from"./apis/getContextAsync.js";export{getAuthCode}from"./apis/getAuthCode.js";export{getZPIToken}from"./apis/getZPIToken.js";export{setAccessToken}from"./apis/setAccessToken.js";export{openOutApp}from"./apis/openOutApp.js";export{chooseImage}from"./apis/chooseImage.js";export{getLocation}from"./apis/getLocation.js";export{onCallbackData}from"./apis/onCallbackData.js";export{createOrder}from"./apis/payment/createOrder.js";export{purchase}from"./apis/payment/purchase.js";export{selectPaymentMethod}from"./apis/payment/selectPaymentMethod.js";export{checkTransaction}from"./apis/payment/checkTransaction.js";export{createOrderIAP}from"./apis/payment/createOrderIAP.js";export{events}from"./apis/events.js";export{setAndroidBottomNavigationBar}from"./apis/setAndroidBottomNavigationBar.js";export{setIOSBottomSafeArea}from"./apis/setIOSBottomSafeArea.js";export{setStatusBar}from"./apis/setStatusBar.js";export{configAppView}from"./apis/configAppView.js";export{minimizeApp}from"./apis/minimizeApp.js";export{openPermissionSetting}from"./apis/openPermissionSetting.js";export{favoriteApp}from"./apis/favoriteApp.js";export{openGroupList}from"./apis/openGroupList.js";export{requestSendNotification}from"./apis/requestSendNotification.js";export{addRating}from"./apis/addRating.js";export{interactOA,interactOA as interactOa}from"./apis/interactOA.js";export{checkIsAllowedInteractWithOA as isAllowedInteractWithOA}from"./apis/checkIsAllowedInteractWithOA.js";export{getSetting}from"./apis/getSetting.js";export{authorize}from"./apis/authorize.js";export{checkZaloCameraPermission}from"./apis/checkZaloCameraPermission.js";export{getUserID}from"./apis/getUserID.js";export{getIDToken}from"./apis/getIDToken.js";export{createCameraContext}from"./apis/createCameraContext.js";export{setupAd}from"./apis/adtimaAd/setup.js";export{loadAd}from"./apis/adtimaAd/load.js";export{displayAd}from"./apis/adtimaAd/display.js";export{refreshAd}from"./apis/adtimaAd/refresh.js";export{showOAWidget}from"./apis/showOAWidget.js";export{showFunctionButtonWidget}from"./apis/showFunctionButtonWidget.js";export{scanNFC}from"./apis/scanNFC.js";export{checkNFC}from"./apis/checkNFC.js";export{nativeStorage}from"./apis/native-storage/index.js";export{CheckoutSDK,Payment}from"./apis/payment/index.js";export{downloadFile}from"./apis/downloadFile.js";export{trackingManager}from"./apis/trackingManager/index.js";export{showCustomOAWidget}from"./apis/showCustomOAWidget.js";export{CheckoutKit}from"./apis/checkoutKit/index.js";export{openDocument}from"./apis/openDocument.js";export{getEntrySource}from"./apis/getEntrySource.js";export{getDeviceInfo}from"./apis/getDeviceInfo.js";export{LFSStorage}from"./apis/lfs/index.js";export{ZMACameraImp}from"./media/zmaCamera.js";var r,s,a=e(o,["createOrder","checkTransaction","createOrderIAP","selectPaymentMethod","purchase"]);(null==(s=null===(r=t())||void 0===r?void 0:r.appEnv)?void 0:s.isMp)&&(window.ZaloMiniAppSDK={},Object.assign(window.ZaloMiniAppSDK,o));export{a as default};
|
package/apis/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CameraEvents,FacingMode,PhotoFormat,PhotoQuality,StreamType}from"./types/media.js";export{AppError}from"./utils/errorHandler.js";import{getVersion as e}from"./apis/getVersion.js";export{getVersion}from"./apis/getVersion.js";import{login as o}from"./apis/login.js";export{login}from"./apis/login.js";export{Events as EventName,Events}from"./types/enum.js";export{getAccessToken}from"./apis/getAccessToken.js";export{getSystemInfo}from"./apis/getSystemInfo.js";export{setNavigationBarTitle}from"./apis/setNavigationBarTitle.js";export{setNavigationBarColor}from"./apis/setNavigationBarColor.js";export{setNavigationBarLeftButton}from"./apis/setNavigationBarLeftButton.js";export{setStorage}from"./apis/setStorage.js";export{getStorage}from"./apis/getStorage.js";export{getStorageInfo}from"./apis/getStorageInfo.js";export{removeStorage}from"./apis/removeStorage.js";export{clearStorage}from"./apis/clearStorage.js";export{getUserInfo}from"./apis/getUserInfo.js";export{getNetworkType}from"./apis/getNetworkType.js";export{onNetworkStatusChange}from"./apis/onNetworkStatusChange.js";export{startBeaconDiscovery}from"./apis/startBeaconDiscovery.js";export{stopBeaconDiscovery}from"./apis/stopBeaconDiscovery.js";export{getBeacons}from"./apis/getBeacons.js";export{closeApp}from"./apis/closeApp.js";export{scanQRCode}from"./apis/scanQRCode.js";export{openProfile}from"./apis/openProfile.js";export{openChat}from"./apis/openChat.js";export{openPostFeed}from"./apis/openPostFeed.js";export{followOA}from"./apis/followOA.js";export{unfollowOA}from"./apis/unfollowOA.js";export{openShareSheet}from"./apis/openShareSheet.js";export{requestCameraPermission}from"./apis/requestCameraPermission.js";export{createShortcut}from"./apis/createShortcut.js";export{openBioAuthentication}from"./apis/openBioAuthentication.js";export{checkStateBioAuthentication}from"./apis/checkStateBioAuthentication.js";export{showToast}from"./apis/showToast.js";export{hideKeyboard}from"./apis/hideKeyboard.js";export{openPhone}from"./apis/openPhone.js";export{openSMS}from"./apis/openSMS.js";export{viewOAQr}from"./apis/viewOAQr.js";export{keepScreen}from"./apis/keepScreen.js";export{onKeepScreen}from"./apis/onKeepScreen.js";export{offKeepScreen}from"./apis/offKeepScreen.js";export{saveImageToGallery}from"./apis/saveImageToGallery.js";export{saveVideoToGallery}from"./apis/saveVideoToGallery.js";export{openMiniApp}from"./apis/openMiniApp.js";export{vibrate}from"./apis/vibrate.js";export{openWebview}from"./apis/openWebview.js";export{getRouteParams}from"./apis/getRouteParams.js";export{getAppInfo}from"./apis/getAppInfo.js";export{sendDataToPreviousMiniApp}from"./apis/sendDataToPreviousMiniApp.js";export{getPhoneNumber}from"./apis/getPhoneNumber.js";export{openProfilePicker}from"./apis/openProfilePicker.js";export{connectWifi}from"./apis/connectWifi.js";export{openMediaPicker}from"./apis/openMediaPicker.js";export{getShareableLink}from"./apis/getShareableLink.js";export{closeLoading}from"./apis/closeLoading.js";export{requestUpdateZalo}from"./apis/requestUpdateZalo.js";export{onConfirmToExit}from"./apis/onConfirmToExit.js";export{offConfirmToExit}from"./apis/offConfirmToExit.js";export{getDeviceId}from"./apis/getDeviceId.js";export{getDeviceIdAsync}from"./apis/getDeviceIdAsync.js";export{getContext}from"./apis/getContext.js";export{getContextAsync}from"./apis/getContextAsync.js";export{getAuthCode}from"./apis/getAuthCode.js";export{getZPIToken}from"./apis/getZPIToken.js";export{setAccessToken}from"./apis/setAccessToken.js";export{openOutApp}from"./apis/openOutApp.js";export{chooseImage}from"./apis/chooseImage.js";export{getLocation}from"./apis/getLocation.js";export{onCallbackData}from"./apis/onCallbackData.js";export{createOrder}from"./apis/payment/createOrder.js";export{purchase}from"./apis/payment/purchase.js";export{selectPaymentMethod}from"./apis/payment/selectPaymentMethod.js";export{checkTransaction}from"./apis/payment/checkTransaction.js";export{createOrderIAP}from"./apis/payment/createOrderIAP.js";export{events}from"./apis/events.js";export{setAndroidBottomNavigationBar}from"./apis/setAndroidBottomNavigationBar.js";export{setIOSBottomSafeArea}from"./apis/setIOSBottomSafeArea.js";export{setStatusBar}from"./apis/setStatusBar.js";export{configAppView}from"./apis/configAppView.js";export{minimizeApp}from"./apis/minimizeApp.js";export{openPermissionSetting}from"./apis/openPermissionSetting.js";export{favoriteApp}from"./apis/favoriteApp.js";export{openGroupList}from"./apis/openGroupList.js";export{requestSendNotification}from"./apis/requestSendNotification.js";export{addRating}from"./apis/addRating.js";export{interactOA,interactOA as interactOa}from"./apis/interactOA.js";export{checkIsAllowedInteractWithOA as isAllowedInteractWithOA}from"./apis/checkIsAllowedInteractWithOA.js";export{getSetting}from"./apis/getSetting.js";export{authorize}from"./apis/authorize.js";export{checkZaloCameraPermission}from"./apis/checkZaloCameraPermission.js";export{getUserID}from"./apis/getUserID.js";export{getIDToken}from"./apis/getIDToken.js";export{createCameraContext}from"./apis/createCameraContext.js";export{setupAd}from"./apis/adtimaAd/setup.js";export{loadAd}from"./apis/adtimaAd/load.js";export{displayAd}from"./apis/adtimaAd/display.js";export{refreshAd}from"./apis/adtimaAd/refresh.js";export{showOAWidget}from"./apis/showOAWidget.js";export{showFunctionButtonWidget}from"./apis/showFunctionButtonWidget.js";export{scanNFC}from"./apis/scanNFC.js";export{checkNFC}from"./apis/checkNFC.js";export{nativeStorage}from"./apis/native-storage/index.js";export{CheckoutSDK,Payment}from"./apis/payment/index.js";export{downloadFile}from"./apis/downloadFile.js";export{trackingManager}from"./apis/trackingManager/index.js";export{showCustomOAWidget}from"./apis/showCustomOAWidget.js";export{CheckoutKit}from"./apis/checkoutKit/index.js";export{openDocument}from"./apis/openDocument.js";export{getEntrySource}from"./apis/getEntrySource.js";export{getDeviceInfo}from"./apis/getDeviceInfo.js";export{
|
|
1
|
+
export{CameraEvents,FacingMode,PhotoFormat,PhotoQuality,StreamType}from"./types/media.js";export{AppError}from"./utils/errorHandler.js";import{getVersion as e}from"./apis/getVersion.js";export{getVersion}from"./apis/getVersion.js";import{login as o}from"./apis/login.js";export{login}from"./apis/login.js";export{Events as EventName,Events}from"./types/enum.js";export{getAccessToken}from"./apis/getAccessToken.js";export{getSystemInfo}from"./apis/getSystemInfo.js";export{setNavigationBarTitle}from"./apis/setNavigationBarTitle.js";export{setNavigationBarColor}from"./apis/setNavigationBarColor.js";export{setNavigationBarLeftButton}from"./apis/setNavigationBarLeftButton.js";export{setStorage}from"./apis/setStorage.js";export{getStorage}from"./apis/getStorage.js";export{getStorageInfo}from"./apis/getStorageInfo.js";export{removeStorage}from"./apis/removeStorage.js";export{clearStorage}from"./apis/clearStorage.js";export{getUserInfo}from"./apis/getUserInfo.js";export{getNetworkType}from"./apis/getNetworkType.js";export{onNetworkStatusChange}from"./apis/onNetworkStatusChange.js";export{startBeaconDiscovery}from"./apis/startBeaconDiscovery.js";export{stopBeaconDiscovery}from"./apis/stopBeaconDiscovery.js";export{getBeacons}from"./apis/getBeacons.js";export{closeApp}from"./apis/closeApp.js";export{scanQRCode}from"./apis/scanQRCode.js";export{openProfile}from"./apis/openProfile.js";export{openChat}from"./apis/openChat.js";export{openPostFeed}from"./apis/openPostFeed.js";export{followOA}from"./apis/followOA.js";export{unfollowOA}from"./apis/unfollowOA.js";export{openShareSheet}from"./apis/openShareSheet.js";export{requestCameraPermission}from"./apis/requestCameraPermission.js";export{createShortcut}from"./apis/createShortcut.js";export{openBioAuthentication}from"./apis/openBioAuthentication.js";export{checkStateBioAuthentication}from"./apis/checkStateBioAuthentication.js";export{showToast}from"./apis/showToast.js";export{hideKeyboard}from"./apis/hideKeyboard.js";export{openPhone}from"./apis/openPhone.js";export{openSMS}from"./apis/openSMS.js";export{viewOAQr}from"./apis/viewOAQr.js";export{keepScreen}from"./apis/keepScreen.js";export{onKeepScreen}from"./apis/onKeepScreen.js";export{offKeepScreen}from"./apis/offKeepScreen.js";export{saveImageToGallery}from"./apis/saveImageToGallery.js";export{saveVideoToGallery}from"./apis/saveVideoToGallery.js";export{openMiniApp}from"./apis/openMiniApp.js";export{vibrate}from"./apis/vibrate.js";export{openWebview}from"./apis/openWebview.js";export{getRouteParams}from"./apis/getRouteParams.js";export{getAppInfo}from"./apis/getAppInfo.js";export{sendDataToPreviousMiniApp}from"./apis/sendDataToPreviousMiniApp.js";export{getPhoneNumber}from"./apis/getPhoneNumber.js";export{openProfilePicker}from"./apis/openProfilePicker.js";export{connectWifi}from"./apis/connectWifi.js";export{openMediaPicker}from"./apis/openMediaPicker.js";export{getShareableLink}from"./apis/getShareableLink.js";export{closeLoading}from"./apis/closeLoading.js";export{requestUpdateZalo}from"./apis/requestUpdateZalo.js";export{onConfirmToExit}from"./apis/onConfirmToExit.js";export{offConfirmToExit}from"./apis/offConfirmToExit.js";export{getDeviceId}from"./apis/getDeviceId.js";export{getDeviceIdAsync}from"./apis/getDeviceIdAsync.js";export{getContext}from"./apis/getContext.js";export{getContextAsync}from"./apis/getContextAsync.js";export{getAuthCode}from"./apis/getAuthCode.js";export{getZPIToken}from"./apis/getZPIToken.js";export{setAccessToken}from"./apis/setAccessToken.js";export{openOutApp}from"./apis/openOutApp.js";export{chooseImage}from"./apis/chooseImage.js";export{getLocation}from"./apis/getLocation.js";export{onCallbackData}from"./apis/onCallbackData.js";export{createOrder}from"./apis/payment/createOrder.js";export{purchase}from"./apis/payment/purchase.js";export{selectPaymentMethod}from"./apis/payment/selectPaymentMethod.js";export{checkTransaction}from"./apis/payment/checkTransaction.js";export{createOrderIAP}from"./apis/payment/createOrderIAP.js";export{events}from"./apis/events.js";export{setAndroidBottomNavigationBar}from"./apis/setAndroidBottomNavigationBar.js";export{setIOSBottomSafeArea}from"./apis/setIOSBottomSafeArea.js";export{setStatusBar}from"./apis/setStatusBar.js";export{configAppView}from"./apis/configAppView.js";export{minimizeApp}from"./apis/minimizeApp.js";export{openPermissionSetting}from"./apis/openPermissionSetting.js";export{favoriteApp}from"./apis/favoriteApp.js";export{openGroupList}from"./apis/openGroupList.js";export{requestSendNotification}from"./apis/requestSendNotification.js";export{addRating}from"./apis/addRating.js";export{interactOA,interactOA as interactOa}from"./apis/interactOA.js";export{checkIsAllowedInteractWithOA as isAllowedInteractWithOA}from"./apis/checkIsAllowedInteractWithOA.js";export{getSetting}from"./apis/getSetting.js";export{authorize}from"./apis/authorize.js";export{checkZaloCameraPermission}from"./apis/checkZaloCameraPermission.js";export{getUserID}from"./apis/getUserID.js";export{getIDToken}from"./apis/getIDToken.js";export{createCameraContext}from"./apis/createCameraContext.js";export{setupAd}from"./apis/adtimaAd/setup.js";export{loadAd}from"./apis/adtimaAd/load.js";export{displayAd}from"./apis/adtimaAd/display.js";export{refreshAd}from"./apis/adtimaAd/refresh.js";export{showOAWidget}from"./apis/showOAWidget.js";export{showFunctionButtonWidget}from"./apis/showFunctionButtonWidget.js";export{scanNFC}from"./apis/scanNFC.js";export{checkNFC}from"./apis/checkNFC.js";export{nativeStorage}from"./apis/native-storage/index.js";export{CheckoutSDK,Payment}from"./apis/payment/index.js";export{downloadFile}from"./apis/downloadFile.js";export{trackingManager}from"./apis/trackingManager/index.js";export{showCustomOAWidget}from"./apis/showCustomOAWidget.js";export{CheckoutKit}from"./apis/checkoutKit/index.js";export{openDocument}from"./apis/openDocument.js";export{getEntrySource}from"./apis/getEntrySource.js";export{getDeviceInfo}from"./apis/getDeviceInfo.js";export{LFSStorage}from"./apis/lfs/index.js";export{ZMACameraImp}from"./media/zmaCamera.js";window.ZaloMiniAppSDK={getVersion:e},o();
|
package/apis/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var a="2.
|
|
1
|
+
var a="2.51.0-beta.1";export{a as version};
|