zmp-sdk 2.29.0 → 2.30.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/clearStorage.js +1 -1
- package/apis/apis/configAppView.js +1 -1
- package/apis/apis/onCallbackData.js +1 -1
- package/apis/apis/onNetworkStatusChange.js +1 -1
- package/apis/apis/openWebview.js +1 -1
- package/apis/apis/startBeaconDiscovery.js +1 -1
- package/apis/common/apis/general/hideKeyboard.js +1 -1
- package/apis/common/apis/general/keepScreen.js +1 -1
- package/apis/common/apis/general/openChat.js +1 -1
- package/apis/common/apis/general/openMiniApp.js +1 -1
- package/apis/common/apis/general/openOutApp.js +1 -1
- package/apis/common/apis/general/openPhone.js +1 -1
- package/apis/common/apis/general/openProfile.js +1 -1
- package/apis/common/apis/general/openSMS.js +1 -1
- package/apis/common/apis/general/openWebview.js +1 -1
- package/apis/common/apis/general/payment/checkTransaction.js +1 -1
- package/apis/common/apis/general/payment/createOrder.js +1 -1
- package/apis/common/apis/general/payment/createOrderIAP.js +1 -1
- package/apis/common/apis/general/requestCameraPermission.js +1 -1
- package/apis/common/apis/general/saveImageToGallery.js +1 -1
- package/apis/common/apis/general/sendDataToPreviousMiniApp.js +1 -1
- package/apis/common/apis/general/showToast.js +1 -1
- package/apis/common/apis/general/startBeaconDiscovery.js +1 -1
- package/apis/common/apis/general/stopBeaconDiscovery.js +1 -1
- package/apis/common/apis/general/storage/nativeStorage.js +1 -1
- package/apis/common/apis/general/unfollowOA.js +1 -1
- package/apis/common/apis/general/vibrate.js +1 -1
- package/apis/common/apis/general/view.js +1 -1
- package/apis/common/apis/general/viewOAQr.js +1 -1
- package/apis/common/call/zaloNative.js +1 -1
- package/apis/common/eventEmitter.js +1 -1
- package/apis/common/token.js +1 -1
- package/apis/common/utils.js +1 -1
- package/apis/index.d.ts +76 -57
- package/apis/package.json.js +1 -1
- package/apis/types/enum.js +1 -1
- package/apis/utils/common.js +1 -1
- package/apis/utils/decorator.js +1 -1
- package/apis/utils/query-string.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +82 -63
- package/index.es.js +2 -2
- package/index.js +2 -2
- package/index.umd.js +3 -3
- package/package.json +1 -1
- package/zmp-sdk-v2.30.0.tgz +0 -0
- package/zmp-sdk-v2.28.6.tgz +0 -0
package/apis/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare enum Events {
|
|
|
16
16
|
AppResumed = "h5.event.resumed",
|
|
17
17
|
NetworkChanged = "h5.event.connection.changed",
|
|
18
18
|
OnDataCallback = "h5.event.webview.result",
|
|
19
|
+
WebviewClosed = "h5.event.webview.close",
|
|
19
20
|
OpenApp = "h5.event.open.mp",
|
|
20
21
|
AppClose = "h5.event.action.close",
|
|
21
22
|
PaymentCallback = "payment.callback",
|
|
@@ -1161,7 +1162,7 @@ declare const setNavigationBarTitleArgs: ZodOptional<ZodObject<{
|
|
|
1161
1162
|
}, {
|
|
1162
1163
|
title: string;
|
|
1163
1164
|
}>>[];
|
|
1164
|
-
declare function setNavigationBarTitle(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarTitleArgs[0]>): Promise<void>;
|
|
1165
|
+
declare function setNavigationBarTitle(args: AsyncVoidCallback & TypeOf<(typeof setNavigationBarTitleArgs)[0]>): Promise<void>;
|
|
1165
1166
|
|
|
1166
1167
|
declare const setNavigationBarColorArgs: ZodOptional<ZodObject<{
|
|
1167
1168
|
color: ZodString;
|
|
@@ -1176,7 +1177,7 @@ declare const setNavigationBarColorArgs: ZodOptional<ZodObject<{
|
|
|
1176
1177
|
statusBarColor?: string | undefined;
|
|
1177
1178
|
color: string;
|
|
1178
1179
|
}>>[];
|
|
1179
|
-
declare function setNavigationBarColor(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarColorArgs[0]>): Promise<void>;
|
|
1180
|
+
declare function setNavigationBarColor(args: AsyncVoidCallback & TypeOf<(typeof setNavigationBarColorArgs)[0]>): Promise<void>;
|
|
1180
1181
|
|
|
1181
1182
|
declare const setNavigationBarLeftButtonArgs: ZodOptional<ZodObject<{
|
|
1182
1183
|
type: ZodEnum<["none", "back", "home", "both"]>;
|
|
@@ -1185,7 +1186,7 @@ declare const setNavigationBarLeftButtonArgs: ZodOptional<ZodObject<{
|
|
|
1185
1186
|
}, {
|
|
1186
1187
|
type: "none" | "home" | "both" | "back";
|
|
1187
1188
|
}>>[];
|
|
1188
|
-
declare function setNavigationBarLeftButton(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarLeftButtonArgs[0]>): Promise<void>;
|
|
1189
|
+
declare function setNavigationBarLeftButton(args: AsyncVoidCallback & TypeOf<(typeof setNavigationBarLeftButtonArgs)[0]>): Promise<void>;
|
|
1189
1190
|
|
|
1190
1191
|
declare const setStorageArgs: ZodOptional<ZodObject<{
|
|
1191
1192
|
data: ZodRecord<ZodString, ZodAny>;
|
|
@@ -1194,7 +1195,7 @@ declare const setStorageArgs: ZodOptional<ZodObject<{
|
|
|
1194
1195
|
}, {
|
|
1195
1196
|
data: Record<string, any>;
|
|
1196
1197
|
}>>[];
|
|
1197
|
-
declare function setStorage(args: AsyncCallback<SetStorageReturns> & TypeOf<typeof setStorageArgs[0]>): Promise<SetStorageReturns>;
|
|
1198
|
+
declare function setStorage(args: AsyncCallback<SetStorageReturns> & TypeOf<(typeof setStorageArgs)[0]>): Promise<SetStorageReturns>;
|
|
1198
1199
|
|
|
1199
1200
|
declare const getStorageArgs: ZodOptional<ZodObject<{
|
|
1200
1201
|
keys: ZodArray<ZodString, "many">;
|
|
@@ -1203,7 +1204,7 @@ declare const getStorageArgs: ZodOptional<ZodObject<{
|
|
|
1203
1204
|
}, {
|
|
1204
1205
|
keys: string[];
|
|
1205
1206
|
}>>[];
|
|
1206
|
-
declare function getStorage(args: AsyncCallback<GetStorageReturns> & TypeOf<typeof getStorageArgs[0]>): Promise<GetStorageReturns>;
|
|
1207
|
+
declare function getStorage(args: AsyncCallback<GetStorageReturns> & TypeOf<(typeof getStorageArgs)[0]>): Promise<GetStorageReturns>;
|
|
1207
1208
|
|
|
1208
1209
|
declare function getStorageInfo(args?: AsyncCallback<StorageInfo>): Promise<StorageInfo>;
|
|
1209
1210
|
|
|
@@ -1214,7 +1215,7 @@ declare const removeStorageArgs: ZodOptional<ZodObject<{
|
|
|
1214
1215
|
}, {
|
|
1215
1216
|
keys: string[];
|
|
1216
1217
|
}>>[];
|
|
1217
|
-
declare function removeStorage(args: AsyncCallback<RemoveStorageReturns> & TypeOf<typeof removeStorageArgs[0]>): Promise<RemoveStorageReturns>;
|
|
1218
|
+
declare function removeStorage(args: AsyncCallback<RemoveStorageReturns> & TypeOf<(typeof removeStorageArgs)[0]>): Promise<RemoveStorageReturns>;
|
|
1218
1219
|
|
|
1219
1220
|
declare const clearStorageArgs: ZodOptional<ZodObject<{
|
|
1220
1221
|
prefix: ZodOptional<ZodString>;
|
|
@@ -1223,7 +1224,7 @@ declare const clearStorageArgs: ZodOptional<ZodObject<{
|
|
|
1223
1224
|
}, {
|
|
1224
1225
|
prefix?: string | undefined;
|
|
1225
1226
|
}>>[];
|
|
1226
|
-
declare function clearStorage(args: AsyncVoidCallback & TypeOf<typeof clearStorageArgs[0]>): Promise<void>;
|
|
1227
|
+
declare function clearStorage(args: AsyncVoidCallback & TypeOf<(typeof clearStorageArgs)[0]>): Promise<void>;
|
|
1227
1228
|
|
|
1228
1229
|
declare const getUserInfoArgs: ZodOptional<ZodObject<{
|
|
1229
1230
|
avatarType: ZodOptional<ZodEnum<["small", "normal", "large"]>>;
|
|
@@ -1232,7 +1233,7 @@ declare const getUserInfoArgs: ZodOptional<ZodObject<{
|
|
|
1232
1233
|
}, {
|
|
1233
1234
|
avatarType?: "normal" | "small" | "large" | undefined;
|
|
1234
1235
|
}>>[];
|
|
1235
|
-
declare function getUserInfo(args?: AsyncCallback<GetUserInfoReturns> & TypeOf<typeof getUserInfoArgs[0]>): Promise<GetUserInfoReturns>;
|
|
1236
|
+
declare function getUserInfo(args?: AsyncCallback<GetUserInfoReturns> & TypeOf<(typeof getUserInfoArgs)[0]>): Promise<GetUserInfoReturns>;
|
|
1236
1237
|
|
|
1237
1238
|
declare function getNetworkType(args?: AsyncCallback<GetNetworkTypeReturns>): Promise<GetNetworkTypeReturns>;
|
|
1238
1239
|
|
|
@@ -1246,7 +1247,7 @@ declare const onNetworkStatusChangeArgs: ZodFunction<ZodTuple<[ZodObject<{
|
|
|
1246
1247
|
isConnected: boolean;
|
|
1247
1248
|
networkType: "none" | "unknown" | "wifi" | "cellular";
|
|
1248
1249
|
}>], ZodUnknown>, ZodVoid>[];
|
|
1249
|
-
declare function onNetworkStatusChange(args: TypeOf<typeof onNetworkStatusChangeArgs[0]>): void;
|
|
1250
|
+
declare function onNetworkStatusChange(args: TypeOf<(typeof onNetworkStatusChangeArgs)[0]>): void;
|
|
1250
1251
|
|
|
1251
1252
|
declare const startBeaconDiscoveryArgs: ZodOptional<ZodObject<{
|
|
1252
1253
|
scanningType: ZodOptional<ZodDefault<ZodEffects<ZodNumber, number, number>>>;
|
|
@@ -1344,7 +1345,7 @@ declare const startBeaconDiscoveryArgs: ZodOptional<ZodObject<{
|
|
|
1344
1345
|
}[] | undefined;
|
|
1345
1346
|
scanFromSource?: string | undefined;
|
|
1346
1347
|
}>>[];
|
|
1347
|
-
declare function startBeaconDiscovery(args: AsyncCallback<boolean> & TypeOf<typeof startBeaconDiscoveryArgs[0]>): Promise<boolean>;
|
|
1348
|
+
declare function startBeaconDiscovery(args: AsyncCallback<boolean> & TypeOf<(typeof startBeaconDiscoveryArgs)[0]>): Promise<boolean>;
|
|
1348
1349
|
|
|
1349
1350
|
declare function stopBeaconDiscovery(args: AsyncCallback<boolean>): Promise<boolean>;
|
|
1350
1351
|
|
|
@@ -1370,7 +1371,7 @@ declare const openProfileArgs: ZodOptional<ZodObject<{
|
|
|
1370
1371
|
type: "user" | "oa" | "aliasOA";
|
|
1371
1372
|
id: string;
|
|
1372
1373
|
}>>[];
|
|
1373
|
-
declare function openProfile(args: AsyncVoidCallback & TypeOf<typeof openProfileArgs[0]>): Promise<void>;
|
|
1374
|
+
declare function openProfile(args: AsyncVoidCallback & TypeOf<(typeof openProfileArgs)[0]>): Promise<void>;
|
|
1374
1375
|
|
|
1375
1376
|
declare const openChatArgs: ZodOptional<ZodObject<{
|
|
1376
1377
|
id: ZodString;
|
|
@@ -1391,7 +1392,7 @@ declare const openChatArgs: ZodOptional<ZodObject<{
|
|
|
1391
1392
|
type: "user" | "oa";
|
|
1392
1393
|
id: string;
|
|
1393
1394
|
}>>[];
|
|
1394
|
-
declare function openChat(args: AsyncVoidCallback & TypeOf<typeof openChatArgs[0]>): Promise<void>;
|
|
1395
|
+
declare function openChat(args: AsyncVoidCallback & TypeOf<(typeof openChatArgs)[0]>): Promise<void>;
|
|
1395
1396
|
|
|
1396
1397
|
declare const openPostFeedArgs: ZodUnion<[ZodObject<{
|
|
1397
1398
|
type: ZodEnum<["image"]>;
|
|
@@ -1420,29 +1421,29 @@ declare const openPostFeedArgs: ZodUnion<[ZodObject<{
|
|
|
1420
1421
|
thumb: ZodOptional<ZodString>;
|
|
1421
1422
|
description: ZodOptional<ZodDefault<ZodString>>;
|
|
1422
1423
|
}, "strip", ZodTypeAny, {
|
|
1424
|
+
description?: string | undefined;
|
|
1423
1425
|
title?: string | undefined;
|
|
1424
1426
|
thumb?: string | undefined;
|
|
1425
|
-
description?: string | undefined;
|
|
1426
1427
|
link: string;
|
|
1427
1428
|
}, {
|
|
1429
|
+
description?: string | undefined;
|
|
1428
1430
|
title?: string | undefined;
|
|
1429
1431
|
thumb?: string | undefined;
|
|
1430
|
-
description?: string | undefined;
|
|
1431
1432
|
link: string;
|
|
1432
1433
|
}>;
|
|
1433
1434
|
}, "strip", ZodTypeAny, {
|
|
1434
1435
|
data: {
|
|
1436
|
+
description?: string | undefined;
|
|
1435
1437
|
title?: string | undefined;
|
|
1436
1438
|
thumb?: string | undefined;
|
|
1437
|
-
description?: string | undefined;
|
|
1438
1439
|
link: string;
|
|
1439
1440
|
};
|
|
1440
1441
|
type: "link";
|
|
1441
1442
|
}, {
|
|
1442
1443
|
data: {
|
|
1444
|
+
description?: string | undefined;
|
|
1443
1445
|
title?: string | undefined;
|
|
1444
1446
|
thumb?: string | undefined;
|
|
1445
|
-
description?: string | undefined;
|
|
1446
1447
|
link: string;
|
|
1447
1448
|
};
|
|
1448
1449
|
type: "link";
|
|
@@ -1466,7 +1467,7 @@ declare const openPostFeedArgs: ZodUnion<[ZodObject<{
|
|
|
1466
1467
|
};
|
|
1467
1468
|
type: "profile";
|
|
1468
1469
|
}>]>[];
|
|
1469
|
-
declare function openPostFeed(args: AsyncCallback<OpenPostFeedReturns> & TypeOf<typeof openPostFeedArgs[0]>): Promise<OpenPostFeedReturns>;
|
|
1470
|
+
declare function openPostFeed(args: AsyncCallback<OpenPostFeedReturns> & TypeOf<(typeof openPostFeedArgs)[0]>): Promise<OpenPostFeedReturns>;
|
|
1470
1471
|
|
|
1471
1472
|
declare const followOAArgs: ZodOptional<ZodObject<{
|
|
1472
1473
|
id: ZodString;
|
|
@@ -1478,7 +1479,7 @@ declare const followOAArgs: ZodOptional<ZodObject<{
|
|
|
1478
1479
|
showDialogConfirm?: boolean | undefined;
|
|
1479
1480
|
id: string;
|
|
1480
1481
|
}>>[];
|
|
1481
|
-
declare function followOA(args: AsyncVoidCallback & TypeOf<typeof followOAArgs[0]>): Promise<void>;
|
|
1482
|
+
declare function followOA(args: AsyncVoidCallback & TypeOf<(typeof followOAArgs)[0]>): Promise<void>;
|
|
1482
1483
|
|
|
1483
1484
|
declare const unfollowOAArgs: ZodOptional<ZodObject<{
|
|
1484
1485
|
id: ZodString;
|
|
@@ -1487,7 +1488,7 @@ declare const unfollowOAArgs: ZodOptional<ZodObject<{
|
|
|
1487
1488
|
}, {
|
|
1488
1489
|
id: string;
|
|
1489
1490
|
}>>[];
|
|
1490
|
-
declare function unfollowOA(args: AsyncVoidCallback & TypeOf<typeof unfollowOAArgs[0]>): Promise<void>;
|
|
1491
|
+
declare function unfollowOA(args: AsyncVoidCallback & TypeOf<(typeof unfollowOAArgs)[0]>): Promise<void>;
|
|
1491
1492
|
|
|
1492
1493
|
declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
1493
1494
|
type: ZodEnum<["image"]>;
|
|
@@ -1632,34 +1633,34 @@ declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
|
1632
1633
|
path: ZodOptional<ZodString>;
|
|
1633
1634
|
description: ZodOptional<ZodDefault<ZodString>>;
|
|
1634
1635
|
}, "strip", ZodTypeAny, {
|
|
1635
|
-
path?: string | undefined;
|
|
1636
1636
|
description?: string | undefined;
|
|
1637
|
+
path?: string | undefined;
|
|
1637
1638
|
title: string;
|
|
1638
1639
|
thumbnail: string;
|
|
1639
1640
|
}, {
|
|
1640
|
-
path?: string | undefined;
|
|
1641
1641
|
description?: string | undefined;
|
|
1642
|
+
path?: string | undefined;
|
|
1642
1643
|
title: string;
|
|
1643
1644
|
thumbnail: string;
|
|
1644
1645
|
}>;
|
|
1645
1646
|
}, "strip", ZodTypeAny, {
|
|
1646
1647
|
data: {
|
|
1647
|
-
path?: string | undefined;
|
|
1648
1648
|
description?: string | undefined;
|
|
1649
|
+
path?: string | undefined;
|
|
1649
1650
|
title: string;
|
|
1650
1651
|
thumbnail: string;
|
|
1651
1652
|
};
|
|
1652
1653
|
type: "zmp" | "zmp_deep_link";
|
|
1653
1654
|
}, {
|
|
1654
1655
|
data: {
|
|
1655
|
-
path?: string | undefined;
|
|
1656
1656
|
description?: string | undefined;
|
|
1657
|
+
path?: string | undefined;
|
|
1657
1658
|
title: string;
|
|
1658
1659
|
thumbnail: string;
|
|
1659
1660
|
};
|
|
1660
1661
|
type: "zmp" | "zmp_deep_link";
|
|
1661
1662
|
}>]>[];
|
|
1662
|
-
declare function openShareSheet(args: AsyncCallback<OpenShareSheetReturns> & TypeOf<typeof openShareSheetArgs[0]>): Promise<OpenShareSheetReturns>;
|
|
1663
|
+
declare function openShareSheet(args: AsyncCallback<OpenShareSheetReturns> & TypeOf<(typeof openShareSheetArgs)[0]>): Promise<OpenShareSheetReturns>;
|
|
1663
1664
|
|
|
1664
1665
|
declare function requestCameraPermission(args?: AsyncCallback<RequestCameraPermissionReturns>): Promise<RequestCameraPermissionReturns>;
|
|
1665
1666
|
|
|
@@ -1670,7 +1671,7 @@ declare const createShortcutArgs: ZodOptional<ZodObject<{
|
|
|
1670
1671
|
}, {
|
|
1671
1672
|
params?: Record<string, string> | undefined;
|
|
1672
1673
|
}>>[];
|
|
1673
|
-
declare function createShortcut(args?: AsyncCallback<any> & TypeOf<typeof createShortcutArgs[0]>): Promise<any>;
|
|
1674
|
+
declare function createShortcut(args?: AsyncCallback<any> & TypeOf<(typeof createShortcutArgs)[0]>): Promise<any>;
|
|
1674
1675
|
|
|
1675
1676
|
declare const openBioAuthenticationArgs: ZodOptional<ZodObject<{
|
|
1676
1677
|
secretData: ZodString;
|
|
@@ -1705,7 +1706,7 @@ declare const openBioAuthenticationArgs: ZodOptional<ZodObject<{
|
|
|
1705
1706
|
requireFingerprint?: boolean | undefined;
|
|
1706
1707
|
secretData: string;
|
|
1707
1708
|
}>>[];
|
|
1708
|
-
declare function openBioAuthentication(args: AsyncCallback<OpenBioAuthenticationReturns> & TypeOf<typeof openBioAuthenticationArgs[0]>): Promise<OpenBioAuthenticationReturns>;
|
|
1709
|
+
declare function openBioAuthentication(args: AsyncCallback<OpenBioAuthenticationReturns> & TypeOf<(typeof openBioAuthenticationArgs)[0]>): Promise<OpenBioAuthenticationReturns>;
|
|
1709
1710
|
|
|
1710
1711
|
declare function checkStateBioAuthentication(args?: AsyncCallback<CheckStateBioAuthenticationReturns>): Promise<CheckStateBioAuthenticationReturns>;
|
|
1711
1712
|
|
|
@@ -1716,7 +1717,7 @@ declare const showToastArgs: ZodOptional<ZodObject<{
|
|
|
1716
1717
|
}, {
|
|
1717
1718
|
message: string;
|
|
1718
1719
|
}>>[];
|
|
1719
|
-
declare function showToast(args: AsyncVoidCallback & TypeOf<typeof showToastArgs[0]>): Promise<void>;
|
|
1720
|
+
declare function showToast(args: AsyncVoidCallback & TypeOf<(typeof showToastArgs)[0]>): Promise<void>;
|
|
1720
1721
|
|
|
1721
1722
|
declare function hideKeyboard(args?: AsyncVoidCallback): Promise<void>;
|
|
1722
1723
|
|
|
@@ -1727,7 +1728,7 @@ declare const openPhoneArgs: ZodObject<{
|
|
|
1727
1728
|
}, {
|
|
1728
1729
|
phoneNumber: string;
|
|
1729
1730
|
}>[];
|
|
1730
|
-
declare function openPhone(args: AsyncVoidCallback & TypeOf<typeof openPhoneArgs[0]>): Promise<void>;
|
|
1731
|
+
declare function openPhone(args: AsyncVoidCallback & TypeOf<(typeof openPhoneArgs)[0]>): Promise<void>;
|
|
1731
1732
|
|
|
1732
1733
|
declare const openSMSArgs: ZodObject<{
|
|
1733
1734
|
content: ZodString;
|
|
@@ -1739,7 +1740,7 @@ declare const openSMSArgs: ZodObject<{
|
|
|
1739
1740
|
content: string;
|
|
1740
1741
|
phoneNumber: string;
|
|
1741
1742
|
}>[];
|
|
1742
|
-
declare function openSMS(args: AsyncVoidCallback & TypeOf<typeof openSMSArgs[0]>): Promise<void>;
|
|
1743
|
+
declare function openSMS(args: AsyncVoidCallback & TypeOf<(typeof openSMSArgs)[0]>): Promise<void>;
|
|
1743
1744
|
|
|
1744
1745
|
declare const viewOAQrArgs: ZodObject<{
|
|
1745
1746
|
id: ZodString;
|
|
@@ -1751,7 +1752,7 @@ declare const viewOAQrArgs: ZodObject<{
|
|
|
1751
1752
|
displayName?: string | undefined;
|
|
1752
1753
|
id: string;
|
|
1753
1754
|
}>[];
|
|
1754
|
-
declare function viewOAQr(args: AsyncVoidCallback & TypeOf<typeof viewOAQrArgs[0]>): Promise<void>;
|
|
1755
|
+
declare function viewOAQr(args: AsyncVoidCallback & TypeOf<(typeof viewOAQrArgs)[0]>): Promise<void>;
|
|
1755
1756
|
|
|
1756
1757
|
declare const keepScreenArgs: ZodObject<{
|
|
1757
1758
|
keepScreenOn: ZodBoolean;
|
|
@@ -1760,7 +1761,7 @@ declare const keepScreenArgs: ZodObject<{
|
|
|
1760
1761
|
}, {
|
|
1761
1762
|
keepScreenOn: boolean;
|
|
1762
1763
|
}>[];
|
|
1763
|
-
declare function keepScreen(args: AsyncCallback<KeepScreenReturns> & TypeOf<typeof keepScreenArgs[0]>): Promise<void>;
|
|
1764
|
+
declare function keepScreen(args: AsyncCallback<KeepScreenReturns> & TypeOf<(typeof keepScreenArgs)[0]>): Promise<void>;
|
|
1764
1765
|
|
|
1765
1766
|
declare function onKeepScreen(args?: AsyncVoidCallback): Promise<void>;
|
|
1766
1767
|
|
|
@@ -1776,7 +1777,7 @@ declare const saveImageToGalleryArgs: ZodOptional<ZodObject<{
|
|
|
1776
1777
|
imageUrl?: string | undefined;
|
|
1777
1778
|
imageBase64Data?: string | undefined;
|
|
1778
1779
|
}>>[];
|
|
1779
|
-
declare function saveImageToGallery(args: AsyncVoidCallback & TypeOf<typeof saveImageToGalleryArgs[0]>): Promise<void>;
|
|
1780
|
+
declare function saveImageToGallery(args: AsyncVoidCallback & TypeOf<(typeof saveImageToGalleryArgs)[0]>): Promise<void>;
|
|
1780
1781
|
|
|
1781
1782
|
declare const openMiniAppArgs: ZodObject<{
|
|
1782
1783
|
appId: ZodString;
|
|
@@ -1791,7 +1792,7 @@ declare const openMiniAppArgs: ZodObject<{
|
|
|
1791
1792
|
params?: Record<string, string> | undefined;
|
|
1792
1793
|
appId: string;
|
|
1793
1794
|
}>[];
|
|
1794
|
-
declare function openMiniApp(args: AsyncVoidCallback & TypeOf<typeof openMiniAppArgs[0]>): Promise<void>;
|
|
1795
|
+
declare function openMiniApp(args: AsyncVoidCallback & TypeOf<(typeof openMiniAppArgs)[0]>): Promise<void>;
|
|
1795
1796
|
|
|
1796
1797
|
declare const vibrateArgs: ZodObject<{
|
|
1797
1798
|
type: ZodDefault<ZodEnum<["oneShot"]>>;
|
|
@@ -1803,16 +1804,34 @@ declare const vibrateArgs: ZodObject<{
|
|
|
1803
1804
|
type?: "oneShot" | undefined;
|
|
1804
1805
|
milliseconds?: number | undefined;
|
|
1805
1806
|
}>[];
|
|
1806
|
-
declare function vibrate(args?: AsyncVoidCallback & TypeOf<typeof vibrateArgs[0]>): Promise<void>;
|
|
1807
|
+
declare function vibrate(args?: AsyncVoidCallback & TypeOf<(typeof vibrateArgs)[0]>): Promise<void>;
|
|
1807
1808
|
|
|
1808
1809
|
declare const openWebviewArgs: ZodObject<{
|
|
1809
1810
|
url: ZodString;
|
|
1811
|
+
config: ZodOptional<ZodObject<{
|
|
1812
|
+
style: ZodOptional<ZodDefault<ZodEnum<["bottomSheet", "normal"]>>>;
|
|
1813
|
+
leftButton: ZodOptional<ZodDefault<ZodEnum<["back", "none"]>>>;
|
|
1814
|
+
}, "strip", ZodTypeAny, {
|
|
1815
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
1816
|
+
leftButton?: "none" | "back" | undefined;
|
|
1817
|
+
}, {
|
|
1818
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
1819
|
+
leftButton?: "none" | "back" | undefined;
|
|
1820
|
+
}>>;
|
|
1810
1821
|
}, "strip", ZodTypeAny, {
|
|
1822
|
+
config?: {
|
|
1823
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
1824
|
+
leftButton?: "none" | "back" | undefined;
|
|
1825
|
+
} | undefined;
|
|
1811
1826
|
url: string;
|
|
1812
1827
|
}, {
|
|
1828
|
+
config?: {
|
|
1829
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
1830
|
+
leftButton?: "none" | "back" | undefined;
|
|
1831
|
+
} | undefined;
|
|
1813
1832
|
url: string;
|
|
1814
1833
|
}>[];
|
|
1815
|
-
declare function openWebview(args: AsyncCallback<OpenWebviewReturns> & TypeOf<typeof openWebviewArgs[0]>): Promise<void>;
|
|
1834
|
+
declare function openWebview(args: AsyncCallback<OpenWebviewReturns> & TypeOf<(typeof openWebviewArgs)[0]>): Promise<void>;
|
|
1816
1835
|
|
|
1817
1836
|
declare function getRouteParams(): Record<string, string>;
|
|
1818
1837
|
|
|
@@ -1825,7 +1844,7 @@ declare const sendDataToPreviousMiniAppArgs: ZodObject<{
|
|
|
1825
1844
|
}, {
|
|
1826
1845
|
data?: any;
|
|
1827
1846
|
}>[];
|
|
1828
|
-
declare function sendDataToPreviousMiniApp(args: AsyncVoidCallback & TypeOf<typeof sendDataToPreviousMiniAppArgs[0]>): Promise<void>;
|
|
1847
|
+
declare function sendDataToPreviousMiniApp(args: AsyncVoidCallback & TypeOf<(typeof sendDataToPreviousMiniAppArgs)[0]>): Promise<void>;
|
|
1829
1848
|
|
|
1830
1849
|
declare function getPhoneNumber(args?: AsyncCallback<GetPhoneNumberReturns>): Promise<GetPhoneNumberReturns>;
|
|
1831
1850
|
|
|
@@ -1836,7 +1855,7 @@ declare const openProfilePickerArgs: ZodObject<{
|
|
|
1836
1855
|
}, {
|
|
1837
1856
|
maxProfile?: number | undefined;
|
|
1838
1857
|
}>[];
|
|
1839
|
-
declare function openProfilePicker(args?: AsyncCallback<OpenProfilePickerReturns> & TypeOf<typeof openProfilePickerArgs[0]>): Promise<OpenProfilePickerReturns>;
|
|
1858
|
+
declare function openProfilePicker(args?: AsyncCallback<OpenProfilePickerReturns> & TypeOf<(typeof openProfilePickerArgs)[0]>): Promise<OpenProfilePickerReturns>;
|
|
1840
1859
|
|
|
1841
1860
|
declare const connectWifiArgs: ZodObject<{
|
|
1842
1861
|
SSID: ZodString;
|
|
@@ -1851,7 +1870,7 @@ declare const connectWifiArgs: ZodObject<{
|
|
|
1851
1870
|
hiddenSSID?: boolean | undefined;
|
|
1852
1871
|
SSID: string;
|
|
1853
1872
|
}>[];
|
|
1854
|
-
declare function connectWifi(args: AsyncVoidCallback & TypeOf<typeof connectWifiArgs[0]>): Promise<void>;
|
|
1873
|
+
declare function connectWifi(args: AsyncVoidCallback & TypeOf<(typeof connectWifiArgs)[0]>): Promise<void>;
|
|
1855
1874
|
|
|
1856
1875
|
declare const openMediaPickerArgs: ZodObject<{
|
|
1857
1876
|
type: ZodEnum<["video", "photo", "file", "zcamera", "zcamera_photo", "zcamera_video", "zcamera_scan"]>;
|
|
@@ -1890,7 +1909,7 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
1890
1909
|
type: "video" | "zcamera" | "zcamera_photo" | "zcamera_video" | "zcamera_scan" | "photo" | "file";
|
|
1891
1910
|
serverUploadUrl: string;
|
|
1892
1911
|
}>[];
|
|
1893
|
-
declare function openMediaPicker(args: AsyncCallback<OpenMediaPickerReturns> & TypeOf<typeof openMediaPickerArgs[0]>): Promise<OpenMediaPickerReturns>;
|
|
1912
|
+
declare function openMediaPicker(args: AsyncCallback<OpenMediaPickerReturns> & TypeOf<(typeof openMediaPickerArgs)[0]>): Promise<OpenMediaPickerReturns>;
|
|
1894
1913
|
|
|
1895
1914
|
declare const getShareableLinkArgs: ZodObject<{
|
|
1896
1915
|
title: ZodString;
|
|
@@ -1900,22 +1919,22 @@ declare const getShareableLinkArgs: ZodObject<{
|
|
|
1900
1919
|
}, "strip", ZodTypeAny, {
|
|
1901
1920
|
path?: string | undefined;
|
|
1902
1921
|
thumbnail?: string | undefined;
|
|
1903
|
-
title: string;
|
|
1904
1922
|
description: string;
|
|
1923
|
+
title: string;
|
|
1905
1924
|
}, {
|
|
1906
|
-
path?: string | undefined;
|
|
1907
1925
|
description?: string | undefined;
|
|
1926
|
+
path?: string | undefined;
|
|
1908
1927
|
thumbnail?: string | undefined;
|
|
1909
1928
|
title: string;
|
|
1910
1929
|
}>[];
|
|
1911
|
-
declare function getShareableLink(args: AsyncCallback<string> & TypeOf<typeof getShareableLinkArgs[0]>): Promise<string>;
|
|
1930
|
+
declare function getShareableLink(args: AsyncCallback<string> & TypeOf<(typeof getShareableLinkArgs)[0]>): Promise<string>;
|
|
1912
1931
|
|
|
1913
1932
|
declare function closeLoading(args?: AsyncVoidCallback): Promise<void>;
|
|
1914
1933
|
|
|
1915
1934
|
declare function requestUpdateZalo(args?: AsyncVoidCallback): Promise<void>;
|
|
1916
1935
|
|
|
1917
1936
|
declare const onConfirmToExitArgs: ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>[];
|
|
1918
|
-
declare function onConfirmToExit(args: TypeOf<typeof onConfirmToExitArgs[0]>): void;
|
|
1937
|
+
declare function onConfirmToExit(args: TypeOf<(typeof onConfirmToExitArgs)[0]>): void;
|
|
1919
1938
|
|
|
1920
1939
|
declare function offConfirmToExit(): void;
|
|
1921
1940
|
|
|
@@ -1932,7 +1951,7 @@ declare function getAuthCode(args?: AsyncCallback<GetAuthCodeReturns>): Promise<
|
|
|
1932
1951
|
declare function getZPIToken(args?: AsyncCallback<GetZPITokenReturns>): Promise<GetZPITokenReturns>;
|
|
1933
1952
|
|
|
1934
1953
|
declare const setAccessTokenArgs: ZodString[];
|
|
1935
|
-
declare function setAccessToken(args: TypeOf<typeof setAccessTokenArgs[0]>): void;
|
|
1954
|
+
declare function setAccessToken(args: TypeOf<(typeof setAccessTokenArgs)[0]>): void;
|
|
1936
1955
|
|
|
1937
1956
|
declare const openOutAppArgs: ZodObject<{
|
|
1938
1957
|
url: ZodString;
|
|
@@ -1941,7 +1960,7 @@ declare const openOutAppArgs: ZodObject<{
|
|
|
1941
1960
|
}, {
|
|
1942
1961
|
url: string;
|
|
1943
1962
|
}>[];
|
|
1944
|
-
declare function openOutApp(args: TypeOf<typeof openOutAppArgs[0]>): Promise<void>;
|
|
1963
|
+
declare function openOutApp(args: TypeOf<(typeof openOutAppArgs)[0]>): Promise<void>;
|
|
1945
1964
|
|
|
1946
1965
|
declare const chooseImageArgs: ZodObject<{
|
|
1947
1966
|
count: ZodDefault<ZodOptional<ZodNumber>>;
|
|
@@ -1956,7 +1975,7 @@ declare const chooseImageArgs: ZodObject<{
|
|
|
1956
1975
|
sourceType?: ("album" | "camera")[] | undefined;
|
|
1957
1976
|
cameraType?: "back" | "front" | undefined;
|
|
1958
1977
|
}>[];
|
|
1959
|
-
declare function chooseImage(args: AsyncCallback<ChooseImageReturns> & TypeOf<typeof chooseImageArgs[0]>): Promise<ChooseImageReturns>;
|
|
1978
|
+
declare function chooseImage(args: AsyncCallback<ChooseImageReturns> & TypeOf<(typeof chooseImageArgs)[0]>): Promise<ChooseImageReturns>;
|
|
1960
1979
|
|
|
1961
1980
|
declare function getLocation(args?: AsyncCallback<GetLocationReturns>): Promise<GetLocationReturns>;
|
|
1962
1981
|
|
|
@@ -1967,7 +1986,7 @@ declare const onCallbackDataArgs: ZodFunction<ZodTuple<[ZodObject<{
|
|
|
1967
1986
|
}, {
|
|
1968
1987
|
data?: any;
|
|
1969
1988
|
}>], ZodUnknown>, ZodVoid>[];
|
|
1970
|
-
declare function onCallbackData(args: TypeOf<typeof onCallbackDataArgs[0]>): void;
|
|
1989
|
+
declare function onCallbackData(args: TypeOf<(typeof onCallbackDataArgs)[0]>): void;
|
|
1971
1990
|
|
|
1972
1991
|
declare const createOrderArgs: ZodObject<{
|
|
1973
1992
|
amount: ZodUnion<[ZodString, ZodNumber]>;
|
|
@@ -1997,7 +2016,7 @@ declare const checkTransactionArgs: ZodObject<{
|
|
|
1997
2016
|
}, {
|
|
1998
2017
|
data: string | Record<string, string>;
|
|
1999
2018
|
}>[];
|
|
2000
|
-
declare function checkTransaction(args: AsyncCallback<CheckTransactionReturns> & TypeOf<typeof checkTransactionArgs[0]>): Promise<CheckTransactionReturns>;
|
|
2019
|
+
declare function checkTransaction(args: AsyncCallback<CheckTransactionReturns> & TypeOf<(typeof checkTransactionArgs)[0]>): Promise<CheckTransactionReturns>;
|
|
2001
2020
|
|
|
2002
2021
|
/**
|
|
2003
2022
|
* Minimal `EventEmitter` interface that is molded against the Node.js
|
|
@@ -2141,7 +2160,7 @@ declare const setAndroidBottomNavigationBarArgs: ZodOptional<ZodObject<{
|
|
|
2141
2160
|
}, {
|
|
2142
2161
|
hide?: boolean | undefined;
|
|
2143
2162
|
}>>[];
|
|
2144
|
-
declare function setAndroidBottomNavigationBar(args: AsyncVoidCallback & TypeOf<typeof setAndroidBottomNavigationBarArgs[0]>): Promise<void>;
|
|
2163
|
+
declare function setAndroidBottomNavigationBar(args: AsyncVoidCallback & TypeOf<(typeof setAndroidBottomNavigationBarArgs)[0]>): Promise<void>;
|
|
2145
2164
|
|
|
2146
2165
|
declare const setIOSBottomSafeAreaArgs: ZodOptional<ZodObject<{
|
|
2147
2166
|
hide: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
@@ -2150,7 +2169,7 @@ declare const setIOSBottomSafeAreaArgs: ZodOptional<ZodObject<{
|
|
|
2150
2169
|
}, {
|
|
2151
2170
|
hide?: boolean | undefined;
|
|
2152
2171
|
}>>[];
|
|
2153
|
-
declare function setIOSBottomSafeArea(args: AsyncVoidCallback & TypeOf<typeof setIOSBottomSafeAreaArgs[0]>): Promise<void>;
|
|
2172
|
+
declare function setIOSBottomSafeArea(args: AsyncVoidCallback & TypeOf<(typeof setIOSBottomSafeAreaArgs)[0]>): Promise<void>;
|
|
2154
2173
|
|
|
2155
2174
|
declare const setStatusBarArgs: ZodOptional<ZodObject<{
|
|
2156
2175
|
type: ZodOptional<ZodDefault<ZodEnum<["normal", "hidden", "transparent"]>>>;
|
|
@@ -2162,7 +2181,7 @@ declare const setStatusBarArgs: ZodOptional<ZodObject<{
|
|
|
2162
2181
|
type?: "hidden" | "transparent" | "normal" | undefined;
|
|
2163
2182
|
color?: string | undefined;
|
|
2164
2183
|
}>>[];
|
|
2165
|
-
declare function setStatusBar(args: AsyncVoidCallback & TypeOf<typeof setStatusBarArgs[0]>): Promise<void>;
|
|
2184
|
+
declare function setStatusBar(args: AsyncVoidCallback & TypeOf<(typeof setStatusBarArgs)[0]>): Promise<void>;
|
|
2166
2185
|
|
|
2167
2186
|
declare const configAppViewArgs: ZodObject<{
|
|
2168
2187
|
headerTextColor: ZodOptional<ZodEnum<["black", "white"]>>;
|
|
@@ -2174,13 +2193,13 @@ declare const configAppViewArgs: ZodObject<{
|
|
|
2174
2193
|
textAlign: ZodOptional<ZodDefault<ZodEnum<["left", "center"]>>>;
|
|
2175
2194
|
}, "strip", ZodTypeAny, {
|
|
2176
2195
|
title?: string | undefined;
|
|
2177
|
-
hide?: boolean | undefined;
|
|
2178
2196
|
leftButton?: "none" | "back" | undefined;
|
|
2197
|
+
hide?: boolean | undefined;
|
|
2179
2198
|
textAlign?: "left" | "center" | undefined;
|
|
2180
2199
|
}, {
|
|
2181
2200
|
title?: string | undefined;
|
|
2182
|
-
hide?: boolean | undefined;
|
|
2183
2201
|
leftButton?: "none" | "back" | undefined;
|
|
2202
|
+
hide?: boolean | undefined;
|
|
2184
2203
|
textAlign?: "left" | "center" | undefined;
|
|
2185
2204
|
}>>;
|
|
2186
2205
|
statusBarType: ZodOptional<ZodEnum<["normal", "hidden", "transparent"]>>;
|
|
@@ -2191,8 +2210,8 @@ declare const configAppViewArgs: ZodObject<{
|
|
|
2191
2210
|
headerColor?: string | undefined;
|
|
2192
2211
|
actionBar?: {
|
|
2193
2212
|
title?: string | undefined;
|
|
2194
|
-
hide?: boolean | undefined;
|
|
2195
2213
|
leftButton?: "none" | "back" | undefined;
|
|
2214
|
+
hide?: boolean | undefined;
|
|
2196
2215
|
textAlign?: "left" | "center" | undefined;
|
|
2197
2216
|
} | undefined;
|
|
2198
2217
|
statusBarType?: "hidden" | "transparent" | "normal" | undefined;
|
|
@@ -2203,15 +2222,15 @@ declare const configAppViewArgs: ZodObject<{
|
|
|
2203
2222
|
headerColor?: string | undefined;
|
|
2204
2223
|
actionBar?: {
|
|
2205
2224
|
title?: string | undefined;
|
|
2206
|
-
hide?: boolean | undefined;
|
|
2207
2225
|
leftButton?: "none" | "back" | undefined;
|
|
2226
|
+
hide?: boolean | undefined;
|
|
2208
2227
|
textAlign?: "left" | "center" | undefined;
|
|
2209
2228
|
} | undefined;
|
|
2210
2229
|
statusBarType?: "hidden" | "transparent" | "normal" | undefined;
|
|
2211
2230
|
hideAndroidBottomNavigationBar?: boolean | undefined;
|
|
2212
2231
|
hideIOSSafeAreaBottom?: boolean | undefined;
|
|
2213
2232
|
}>[];
|
|
2214
|
-
declare function configAppView(args: AsyncVoidCallback & TypeOf<typeof configAppViewArgs[0]>): Promise<void>;
|
|
2233
|
+
declare function configAppView(args: AsyncVoidCallback & TypeOf<(typeof configAppViewArgs)[0]>): Promise<void>;
|
|
2215
2234
|
|
|
2216
2235
|
declare const createOrderIAPArgs: ZodObject<{
|
|
2217
2236
|
productId: ZodString;
|
|
@@ -2229,7 +2248,7 @@ declare const createOrderIAPArgs: ZodObject<{
|
|
|
2229
2248
|
prorationMode?: "DEFERRED" | "IMMEDIATE_AND_CHARGE_FULL_PRICE" | undefined;
|
|
2230
2249
|
productId: string;
|
|
2231
2250
|
}>[];
|
|
2232
|
-
declare function createOrderIAP(args: AsyncCallback<CreateOrderIAPReturns> & TypeOf<typeof createOrderIAPArgs[0]>): Promise<CreateOrderIAPReturns>;
|
|
2251
|
+
declare function createOrderIAP(args: AsyncCallback<CreateOrderIAPReturns> & TypeOf<(typeof createOrderIAPArgs)[0]>): Promise<CreateOrderIAPReturns>;
|
|
2233
2252
|
|
|
2234
2253
|
declare function minimizeApp(args?: AsyncVoidCallback): Promise<void>;
|
|
2235
2254
|
|
package/apis/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var r="2.
|
|
1
|
+
var r="2.30.1";export{r as version};
|
package/apis/types/enum.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var n,
|
|
1
|
+
var e,n,o,a,i,t,c,l,u,r,p,d,m,f,s,h,_;!function(e){e.none="none",e.wifi="wifi",e.cellular="cellular",e.unknown="unknown"}(e||(e={})),function(e){e.wp="wp",e.android="android",e.iOS="iOS",e.unknown="unknown"}(n||(n={})),function(e){e.AppPaused="h5.event.paused",e.AppResumed="h5.event.resumed",e.NetworkChanged="h5.event.connection.changed",e.OnDataCallback="h5.event.webview.result",e.WebviewClosed="h5.event.webview.close",e.OpenApp="h5.event.open.mp",e.AppClose="h5.event.action.close",e.PaymentCallback="payment.callback",e.PaymentResult="action.payment.result"}(o||(o={})),function(e){e.DOING="doing",e.DONE="done"}(a||(a={})),function(e){e[e.user=1]="user",e[e.oa=0]="oa",e[e.aliasOA=2]="aliasOA"}(i||(i={})),function(e){e[e.user=1]="user",e[e.oa=0]="oa"}(t||(t={})),function(e){e[e.image=1]="image",e[e.link=4]="link",e[e.profile=5]="profile"}(c||(c={})),function(e){e[e.image=1]="image",e[e.gif=11]="gif",e[e.video=12]="video",e[e.link=4]="link",e[e.oa=5]="oa",e[e.zmp=20]="zmp",e[e.multi_image=21]="multi_image",e[e.zmp_deep_link=4]="zmp_deep_link"}(l||(l={})),function(e){e[e.auto=1]="auto",e[e.portrait=2]="portrait",e[e.landscape=3]="landscape"}(u||(u={})),function(e){e[e.oneShot=0]="oneShot"}(r||(r={})),function(e){e[e.zcamera=3]="zcamera",e[e.zcamera_photo=1]="zcamera_photo",e[e.zcamera_video=2]="zcamera_video",e[e.zcamera_scan=7]="zcamera_scan",e[e.photo=4]="photo",e[e.video=5]="video",e[e.file=6]="file"}(p||(p={})),function(e){e.SUBSCRIPTION="SUBSCRIPTION",e.ONETIME="ONETIME"}(d||(d={})),function(e){e[e.UNKNOW=0]="UNKNOW",e[e.DEFERRED=1]="DEFERRED",e[e.IMMEDIATE_AND_CHARGE_FULL_PRICE=2]="IMMEDIATE_AND_CHARGE_FULL_PRICE"}(m||(m={})),function(e){e[e.normal=1]="normal",e[e.hidden=0]="hidden",e[e.transparent=2]="transparent"}(f||(f={})),function(e){e[e.show=1]="show",e[e.hide=0]="hide"}(s||(s={})),function(e){e[e.show=1]="show",e[e.hide=0]="hide"}(h||(h={})),function(e){e[e.left=0]="left",e[e.center=1]="center"}(_||(_={}));export{s as AndroidBottomNavigationBarType,t as ChatType,o as Events,d as IAPPayType,h as IOSSafeAreaBottomType,a as JumpStatus,p as MediaPickerType,e as NetworkType,u as OrientationType,n as PlatformType,c as PostFeedType,i as ProfileType,m as ProrationMode,l as ShareSheetType,f as StatusBarType,_ as TextAlignType,r as VibrateType};
|
package/apis/utils/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from'./../external/@swc/helpers/src/_type_of.mjs.js';import{ACTION as n}from"../constants.js";import t from"./debug.js";import e from"./lodash.js";import{StatusBarType as o}from"../types/enum.js";import i from"../common/token.js";import a from"../appEnv/getEnv.js";var u=t("zmp:utils:common"),c=function(r){if(e.isObject(JSON)&&JSON.stringify)return JSON.stringify(r);if(void 0===r)return"undefined";if(null===r)return"null";try{if("string"==typeof r||null!==r.constructor.toString().match(/string/i))return'"'+r.replace(/"/g,'\\"')+'"'}catch(r){console.log(r)}var n;if(null!==Object.prototype.toString.call(r).match(/array/i)){n=
|
|
1
|
+
import r from'./../external/@swc/helpers/src/_type_of.mjs.js';import{ACTION as n}from"../constants.js";import t from"./debug.js";import e from"./lodash.js";import{StatusBarType as o}from"../types/enum.js";import i from"../common/token.js";import a from"../appEnv/getEnv.js";var u=t("zmp:utils:common"),c=function(r){if(e.isObject(JSON)&&JSON.stringify)return JSON.stringify(r);if(void 0===r)return"undefined";if(null===r)return"null";try{if("string"==typeof r||null!==r.constructor.toString().match(/string/i))return'"'+r.replace(/"/g,'\\"')+'"'}catch(r){console.log(r)}var n;if(null!==Object.prototype.toString.call(r).match(/array/i)){n=[];for(var t=r.length,o=0;o<t;o++)n.push(c(r[o]));return"["+n.join(",")+"]"}if("object"==typeof r){for(var i in n=[],r)n.push('"'+i+'":'+c(r[i]));return"{"+n.join(",")+"}"}return r.toString()},p=function(r){var t,e,o=n[r],i=(null===(t=a())||void 0===t?void 0:t.zaloVersion)||0,u="versionLive"in o&&(null==o||null===(e=o.versionLive)||void 0===e?void 0:e.iOS)||0;return!!(Array.isArray(window.ignoreCheckSupport)&&window.ignoreCheckSupport.length>0&&window.ignoreCheckSupport.includes(r))||Number(i)>=u},s=function(n){try{if(n){u(n);var t=n.replace(/\\/g,"").replace(/'/g,"'");try{t=decodeURIComponent(atob(n))}catch(r){}return u("formattedValue",t,JSON.parse(t),r(JSON.parse(t))),JSON.parse(t)}return null}catch(r){return u("parse json error:",r),n}},l=function(r){if(e.isObject(JSON)&&JSON.parse&&e.isString(r)){var n=r.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\x00/g,"");return JSON.parse(n,(function(r,n){return n}))}return e.isObject(r)?r:new Function("return "+r)()},f=function(r){for(var n=document.getElementsByTagName("meta"),t=0;t<n.length;t++)if(n[t].getAttribute("name")===r||n[t].getAttribute("property")===r)return n[t].getAttribute("content");return""},m=function(r){return btoa(encodeURIComponent(JSON.stringify(r)))},g=function(r,n){var t,e=0;for(t in r){var o=t.split("_")[0];r.hasOwnProperty(t)&&(n&&o!==n||(e+=2*(r[t].length+t.length)))}return e};function d(r){return r.map((function(r,n){var t=r.path.length>0?r.path.map((function(r,n){return n>0?"[".concat(r,"]"):r})).join(""):"arg";return"Error ".concat(n+1,": Code: ").concat(r.code," ~ Path: ").concat(t," ~ Message: ").concat(r.message)})).join(" | ")}var h=function(r){return r===o.hidden?"hidden":r===o.transparent?"transparent":"normal"},v=function(r){return"hidden"===r?o.hidden:"transparent"===r?o.transparent:o.normal},j=function(r){if(void 0!==r){var n=i.getMiniProgramConfig();return((null==n?void 0:n.dynamicApis)||[]).find((function(n){return n.action===r&&!1===n.clientHandle}))}};export{g as calcLocalStorageSize,p as checkIOSSupportAction,v as convertStatusBarTypeToNumber,d as generateErrorMessage,j as getDynamicAPIByAction,f as getMetaValue,h as getStatusbarType,l as parseJSON,c as serialize,s as stringToData,m as stringifyData};
|
package/apis/utils/decorator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from'./../external/@swc/helpers/src/_to_consumable_array.mjs.js';import{generateErrorMessage as o}from"./common.js";import{errorHandler as i}from"./errorHandler.js";import s from"./lodash.js";import{apiResponse as n}from"./response.js";function e(e,t,a,
|
|
1
|
+
import r from'./../external/@swc/helpers/src/_to_consumable_array.mjs.js';import{generateErrorMessage as o}from"./common.js";import{errorHandler as i}from"./errorHandler.js";import s from"./lodash.js";import{apiResponse as n}from"./response.js";function e(e,t,a,u){var l,c,f=Array.isArray(a)&&a.length>0&&(null===(l=a[0])||void 0===l?void 0:l.success),m=Array.isArray(a)&&a.length>0&&(null===(c=a[0])||void 0===c?void 0:c.fail);try{var d=a;t.length>0&&t.forEach((function(r,s){var t=r.safeParse(a[s]);if(!t.success){var u,l=null===(u=t.error)||void 0===u?void 0:u.issues,c=o(l),f=n.error.badRequest(c);throw f.detail=l,i(f,e)}d.push(t.data)}));var v=u.apply(void 0,r(d));return s.isPromise(v)?new Promise((function(r,o){v.then((function(o){if(!s.isNull(f)&&s.isFunction(f))return f(o);r(v)})).catch((function(r){var n=i(r,e);if(!s.isNull(m)&&s.isFunction(m))return m(n);o(n)}))})):v}catch(r){if(!s.isNull(m)&&s.isFunction(m))return m(r);throw i(r,e)}}export{e as functionHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../external/@swc/helpers/src/_type_of.mjs.js';
|
|
1
|
+
import e from'./../external/@swc/helpers/src/_type_of.mjs.js';function n(e){var n=[];for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];if(void 0===r)return;if(null===r)return void n.push(o);n.push(encodeURIComponent(o)+"="+encodeURIComponent(r))}return n.join("&")}var o={encode:n,decode:function(e,n){var o={};if(""===e)return o;for(var r=e.split("&"),t=0;t<r.length;t++){var i=r[t].split("=",2),p=decodeURIComponent(i[0]);if(n&&Object.prototype.hasOwnProperty.call(o,p))throw new URIError("Duplicate key: "+p);o[p]=2===i.length?decodeURIComponent(i[1]):null}return o},appendToUrl:function(e,o){return e+(-1!==e.indexOf("?")?"&":"?")+("string"==typeof o?o:n(o))},getParameterByName:function(e,n){n||(n=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var o=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(n);return o?o[2]?decodeURIComponent(o[2].replace(/\+/g," ")):"":null},getParamsAsObject:function(e){var n={};return e?(e.split("&").map((function(e){var o=e.split("=");o&&2==o.length&&(n[o[0]]=decodeURIComponent(o[1].replace(/\+/g," ")))})),n):n},toQueryString:function(n){if(!n)return"";if("object"!=(void 0===n||void 0===n?"undefined":e(n)))return n;var o=Object.keys(n),r=[];return o.map((function(o){var t=n[o],i=[o,t="object"==(void 0===t||void 0===t?"undefined":e(t))?JSON.stringify(t):encodeURIComponent(t)].join("=");r.push(i)})),r.join("&")}};export{o as default};
|