zmp-sdk 2.51.0-beta.5 → 2.51.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/apis/apis/openMediaPicker.js +1 -1
- package/apis/apis/payment/index.js +1 -1
- package/apis/apis/payment/openCheckoutPopup.js +1 -0
- package/apis/apis/vibrate.js +1 -1
- package/apis/common/apis/general/getAppInfo.js +1 -1
- package/apis/common/apis/general/openMediaPicker.js +1 -1
- package/apis/common/apis/general/payment/openCheckoutPopup.js +1 -0
- package/apis/constants.js +1 -1
- package/apis/index.d.ts +35 -4
- package/apis/package.json.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +27 -4
- 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
|
@@ -2663,6 +2663,25 @@ declare const eventTypeType: ZodEnum<["APP_INITIALIZING", "APP_READY"]>;
|
|
|
2663
2663
|
declare const payloadType: ZodAny;
|
|
2664
2664
|
declare function logEvent(eventType: TypeOf<typeof eventTypeType>, payload: TypeOf<typeof payloadType>): void;
|
|
2665
2665
|
|
|
2666
|
+
declare const checkoutPopupArgs: ZodObject<{
|
|
2667
|
+
amount: ZodUnion<[ZodString, ZodNumber]>;
|
|
2668
|
+
orderDescription: ZodString;
|
|
2669
|
+
qrContent: ZodString;
|
|
2670
|
+
}, "strip", ZodTypeAny, {
|
|
2671
|
+
amount: string | number;
|
|
2672
|
+
orderDescription: string;
|
|
2673
|
+
qrContent: string;
|
|
2674
|
+
}, {
|
|
2675
|
+
amount: string | number;
|
|
2676
|
+
orderDescription: string;
|
|
2677
|
+
qrContent: string;
|
|
2678
|
+
}>[];
|
|
2679
|
+
/**
|
|
2680
|
+
* Gửi thông tin thanh toán đến Checkout để mở popup
|
|
2681
|
+
* @param args
|
|
2682
|
+
*/
|
|
2683
|
+
declare function openCheckoutPopup(args: AsyncCallback<CheckoutPopupOpenParams> & TypeOf<(typeof checkoutPopupArgs)[0]>): Promise<CheckoutPopupResponseData>;
|
|
2684
|
+
|
|
2666
2685
|
/**
|
|
2667
2686
|
* Lấy thông tin của cache theo cơ chế đồng bộ.
|
|
2668
2687
|
*
|
|
@@ -4280,7 +4299,7 @@ declare const openMiniAppArgs: ZodObject<{
|
|
|
4280
4299
|
*/
|
|
4281
4300
|
declare function openMiniApp(args: AsyncVoidCallback & TypeOf<(typeof openMiniAppArgs)[0]>): Promise<void>;
|
|
4282
4301
|
|
|
4283
|
-
declare const vibrateArgs: ZodObject<{
|
|
4302
|
+
declare const vibrateArgs: ZodOptional<ZodObject<{
|
|
4284
4303
|
type: ZodOptional<ZodDefault<ZodEnum<["oneShot"]>>>;
|
|
4285
4304
|
milliseconds: ZodOptional<ZodNumber>;
|
|
4286
4305
|
}, "strip", ZodTypeAny, {
|
|
@@ -4289,7 +4308,7 @@ declare const vibrateArgs: ZodObject<{
|
|
|
4289
4308
|
}, {
|
|
4290
4309
|
type?: "oneShot" | undefined;
|
|
4291
4310
|
milliseconds?: number | undefined;
|
|
4292
|
-
}
|
|
4311
|
+
}>>[];
|
|
4293
4312
|
/**
|
|
4294
4313
|
* API rung thiết bị.
|
|
4295
4314
|
*
|
|
@@ -4626,7 +4645,7 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4626
4645
|
* @param {Object} [editView] Hiển thị view chỉnh sửa ảnh.
|
|
4627
4646
|
* @param {boolean} [editView.enable=true] Hiển thị view chỉnh sửa ảnh.
|
|
4628
4647
|
* @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).
|
|
4629
|
-
* @param {number} [compressLevel=
|
|
4648
|
+
* @param {number} [compressLevel=0] Mức nén ảnh khi chọn type là `photo`. Các mức nén:
|
|
4630
4649
|
* - 0: Không nén (ảnh gốc).
|
|
4631
4650
|
* - 1: Nén nhẹ.
|
|
4632
4651
|
* - 2: Nén trung bình.
|
|
@@ -4637,7 +4656,7 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
4637
4656
|
* ```ts
|
|
4638
4657
|
* const { data } = await openMediaPicker({
|
|
4639
4658
|
* type: "photo",
|
|
4640
|
-
* compressLevel:
|
|
4659
|
+
* compressLevel: 2,
|
|
4641
4660
|
* });
|
|
4642
4661
|
*
|
|
4643
4662
|
* console.log(data);
|
|
@@ -5783,6 +5802,7 @@ declare const Payment: {
|
|
|
5783
5802
|
checkTransaction: typeof checkTransaction;
|
|
5784
5803
|
createOrderIAP: typeof createOrderIAP;
|
|
5785
5804
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5805
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5786
5806
|
};
|
|
5787
5807
|
declare const CheckoutSDK: {
|
|
5788
5808
|
purchase: typeof purchase;
|
|
@@ -5790,6 +5810,7 @@ declare const CheckoutSDK: {
|
|
|
5790
5810
|
checkTransaction: typeof checkTransaction;
|
|
5791
5811
|
createOrderIAP: typeof createOrderIAP;
|
|
5792
5812
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5813
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
5793
5814
|
};
|
|
5794
5815
|
|
|
5795
5816
|
declare const downloadFileArgs: ZodOptional<ZodObject<{
|
|
@@ -6137,6 +6158,7 @@ declare const otherApis: {
|
|
|
6137
6158
|
checkTransaction: typeof checkTransaction;
|
|
6138
6159
|
createOrderIAP: typeof createOrderIAP;
|
|
6139
6160
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
6161
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
6140
6162
|
};
|
|
6141
6163
|
CheckoutSDK: {
|
|
6142
6164
|
purchase: typeof purchase;
|
|
@@ -6144,6 +6166,7 @@ declare const otherApis: {
|
|
|
6144
6166
|
checkTransaction: typeof checkTransaction;
|
|
6145
6167
|
createOrderIAP: typeof createOrderIAP;
|
|
6146
6168
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
6169
|
+
openCheckoutPopup: typeof openCheckoutPopup;
|
|
6147
6170
|
};
|
|
6148
6171
|
downloadFile: typeof downloadFile;
|
|
6149
6172
|
trackingManager: {
|