zmp-sdk 2.30.0 → 2.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apis/apis/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/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/constants.js +1 -1
- package/apis/index.d.ts +53 -53
- package/apis/package.json.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 +59 -59
- 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.8.tgz +0 -0
- package/zmp-sdk-v2.29.0.tgz +0 -0
package/apis/index.d.ts
CHANGED
|
@@ -1162,7 +1162,7 @@ declare const setNavigationBarTitleArgs: ZodOptional<ZodObject<{
|
|
|
1162
1162
|
}, {
|
|
1163
1163
|
title: string;
|
|
1164
1164
|
}>>[];
|
|
1165
|
-
declare function setNavigationBarTitle(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarTitleArgs[0]>): Promise<void>;
|
|
1165
|
+
declare function setNavigationBarTitle(args: AsyncVoidCallback & TypeOf<(typeof setNavigationBarTitleArgs)[0]>): Promise<void>;
|
|
1166
1166
|
|
|
1167
1167
|
declare const setNavigationBarColorArgs: ZodOptional<ZodObject<{
|
|
1168
1168
|
color: ZodString;
|
|
@@ -1177,7 +1177,7 @@ declare const setNavigationBarColorArgs: ZodOptional<ZodObject<{
|
|
|
1177
1177
|
statusBarColor?: string | undefined;
|
|
1178
1178
|
color: string;
|
|
1179
1179
|
}>>[];
|
|
1180
|
-
declare function setNavigationBarColor(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarColorArgs[0]>): Promise<void>;
|
|
1180
|
+
declare function setNavigationBarColor(args: AsyncVoidCallback & TypeOf<(typeof setNavigationBarColorArgs)[0]>): Promise<void>;
|
|
1181
1181
|
|
|
1182
1182
|
declare const setNavigationBarLeftButtonArgs: ZodOptional<ZodObject<{
|
|
1183
1183
|
type: ZodEnum<["none", "back", "home", "both"]>;
|
|
@@ -1186,7 +1186,7 @@ declare const setNavigationBarLeftButtonArgs: ZodOptional<ZodObject<{
|
|
|
1186
1186
|
}, {
|
|
1187
1187
|
type: "none" | "home" | "both" | "back";
|
|
1188
1188
|
}>>[];
|
|
1189
|
-
declare function setNavigationBarLeftButton(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarLeftButtonArgs[0]>): Promise<void>;
|
|
1189
|
+
declare function setNavigationBarLeftButton(args: AsyncVoidCallback & TypeOf<(typeof setNavigationBarLeftButtonArgs)[0]>): Promise<void>;
|
|
1190
1190
|
|
|
1191
1191
|
declare const setStorageArgs: ZodOptional<ZodObject<{
|
|
1192
1192
|
data: ZodRecord<ZodString, ZodAny>;
|
|
@@ -1195,7 +1195,7 @@ declare const setStorageArgs: ZodOptional<ZodObject<{
|
|
|
1195
1195
|
}, {
|
|
1196
1196
|
data: Record<string, any>;
|
|
1197
1197
|
}>>[];
|
|
1198
|
-
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>;
|
|
1199
1199
|
|
|
1200
1200
|
declare const getStorageArgs: ZodOptional<ZodObject<{
|
|
1201
1201
|
keys: ZodArray<ZodString, "many">;
|
|
@@ -1204,7 +1204,7 @@ declare const getStorageArgs: ZodOptional<ZodObject<{
|
|
|
1204
1204
|
}, {
|
|
1205
1205
|
keys: string[];
|
|
1206
1206
|
}>>[];
|
|
1207
|
-
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>;
|
|
1208
1208
|
|
|
1209
1209
|
declare function getStorageInfo(args?: AsyncCallback<StorageInfo>): Promise<StorageInfo>;
|
|
1210
1210
|
|
|
@@ -1215,7 +1215,7 @@ declare const removeStorageArgs: ZodOptional<ZodObject<{
|
|
|
1215
1215
|
}, {
|
|
1216
1216
|
keys: string[];
|
|
1217
1217
|
}>>[];
|
|
1218
|
-
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>;
|
|
1219
1219
|
|
|
1220
1220
|
declare const clearStorageArgs: ZodOptional<ZodObject<{
|
|
1221
1221
|
prefix: ZodOptional<ZodString>;
|
|
@@ -1224,7 +1224,7 @@ declare const clearStorageArgs: ZodOptional<ZodObject<{
|
|
|
1224
1224
|
}, {
|
|
1225
1225
|
prefix?: string | undefined;
|
|
1226
1226
|
}>>[];
|
|
1227
|
-
declare function clearStorage(args: AsyncVoidCallback & TypeOf<typeof clearStorageArgs[0]>): Promise<void>;
|
|
1227
|
+
declare function clearStorage(args: AsyncVoidCallback & TypeOf<(typeof clearStorageArgs)[0]>): Promise<void>;
|
|
1228
1228
|
|
|
1229
1229
|
declare const getUserInfoArgs: ZodOptional<ZodObject<{
|
|
1230
1230
|
avatarType: ZodOptional<ZodEnum<["small", "normal", "large"]>>;
|
|
@@ -1233,7 +1233,7 @@ declare const getUserInfoArgs: ZodOptional<ZodObject<{
|
|
|
1233
1233
|
}, {
|
|
1234
1234
|
avatarType?: "normal" | "small" | "large" | undefined;
|
|
1235
1235
|
}>>[];
|
|
1236
|
-
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>;
|
|
1237
1237
|
|
|
1238
1238
|
declare function getNetworkType(args?: AsyncCallback<GetNetworkTypeReturns>): Promise<GetNetworkTypeReturns>;
|
|
1239
1239
|
|
|
@@ -1247,7 +1247,7 @@ declare const onNetworkStatusChangeArgs: ZodFunction<ZodTuple<[ZodObject<{
|
|
|
1247
1247
|
isConnected: boolean;
|
|
1248
1248
|
networkType: "none" | "unknown" | "wifi" | "cellular";
|
|
1249
1249
|
}>], ZodUnknown>, ZodVoid>[];
|
|
1250
|
-
declare function onNetworkStatusChange(args: TypeOf<typeof onNetworkStatusChangeArgs[0]>): void;
|
|
1250
|
+
declare function onNetworkStatusChange(args: TypeOf<(typeof onNetworkStatusChangeArgs)[0]>): void;
|
|
1251
1251
|
|
|
1252
1252
|
declare const startBeaconDiscoveryArgs: ZodOptional<ZodObject<{
|
|
1253
1253
|
scanningType: ZodOptional<ZodDefault<ZodEffects<ZodNumber, number, number>>>;
|
|
@@ -1345,7 +1345,7 @@ declare const startBeaconDiscoveryArgs: ZodOptional<ZodObject<{
|
|
|
1345
1345
|
}[] | undefined;
|
|
1346
1346
|
scanFromSource?: string | undefined;
|
|
1347
1347
|
}>>[];
|
|
1348
|
-
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>;
|
|
1349
1349
|
|
|
1350
1350
|
declare function stopBeaconDiscovery(args: AsyncCallback<boolean>): Promise<boolean>;
|
|
1351
1351
|
|
|
@@ -1371,7 +1371,7 @@ declare const openProfileArgs: ZodOptional<ZodObject<{
|
|
|
1371
1371
|
type: "user" | "oa" | "aliasOA";
|
|
1372
1372
|
id: string;
|
|
1373
1373
|
}>>[];
|
|
1374
|
-
declare function openProfile(args: AsyncVoidCallback & TypeOf<typeof openProfileArgs[0]>): Promise<void>;
|
|
1374
|
+
declare function openProfile(args: AsyncVoidCallback & TypeOf<(typeof openProfileArgs)[0]>): Promise<void>;
|
|
1375
1375
|
|
|
1376
1376
|
declare const openChatArgs: ZodOptional<ZodObject<{
|
|
1377
1377
|
id: ZodString;
|
|
@@ -1392,7 +1392,7 @@ declare const openChatArgs: ZodOptional<ZodObject<{
|
|
|
1392
1392
|
type: "user" | "oa";
|
|
1393
1393
|
id: string;
|
|
1394
1394
|
}>>[];
|
|
1395
|
-
declare function openChat(args: AsyncVoidCallback & TypeOf<typeof openChatArgs[0]>): Promise<void>;
|
|
1395
|
+
declare function openChat(args: AsyncVoidCallback & TypeOf<(typeof openChatArgs)[0]>): Promise<void>;
|
|
1396
1396
|
|
|
1397
1397
|
declare const openPostFeedArgs: ZodUnion<[ZodObject<{
|
|
1398
1398
|
type: ZodEnum<["image"]>;
|
|
@@ -1421,29 +1421,29 @@ declare const openPostFeedArgs: ZodUnion<[ZodObject<{
|
|
|
1421
1421
|
thumb: ZodOptional<ZodString>;
|
|
1422
1422
|
description: ZodOptional<ZodDefault<ZodString>>;
|
|
1423
1423
|
}, "strip", ZodTypeAny, {
|
|
1424
|
+
description?: string | undefined;
|
|
1424
1425
|
title?: string | undefined;
|
|
1425
1426
|
thumb?: string | undefined;
|
|
1426
|
-
description?: string | undefined;
|
|
1427
1427
|
link: string;
|
|
1428
1428
|
}, {
|
|
1429
|
+
description?: string | undefined;
|
|
1429
1430
|
title?: string | undefined;
|
|
1430
1431
|
thumb?: string | undefined;
|
|
1431
|
-
description?: string | undefined;
|
|
1432
1432
|
link: string;
|
|
1433
1433
|
}>;
|
|
1434
1434
|
}, "strip", ZodTypeAny, {
|
|
1435
1435
|
data: {
|
|
1436
|
+
description?: string | undefined;
|
|
1436
1437
|
title?: string | undefined;
|
|
1437
1438
|
thumb?: string | undefined;
|
|
1438
|
-
description?: string | undefined;
|
|
1439
1439
|
link: string;
|
|
1440
1440
|
};
|
|
1441
1441
|
type: "link";
|
|
1442
1442
|
}, {
|
|
1443
1443
|
data: {
|
|
1444
|
+
description?: string | undefined;
|
|
1444
1445
|
title?: string | undefined;
|
|
1445
1446
|
thumb?: string | undefined;
|
|
1446
|
-
description?: string | undefined;
|
|
1447
1447
|
link: string;
|
|
1448
1448
|
};
|
|
1449
1449
|
type: "link";
|
|
@@ -1467,7 +1467,7 @@ declare const openPostFeedArgs: ZodUnion<[ZodObject<{
|
|
|
1467
1467
|
};
|
|
1468
1468
|
type: "profile";
|
|
1469
1469
|
}>]>[];
|
|
1470
|
-
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>;
|
|
1471
1471
|
|
|
1472
1472
|
declare const followOAArgs: ZodOptional<ZodObject<{
|
|
1473
1473
|
id: ZodString;
|
|
@@ -1479,7 +1479,7 @@ declare const followOAArgs: ZodOptional<ZodObject<{
|
|
|
1479
1479
|
showDialogConfirm?: boolean | undefined;
|
|
1480
1480
|
id: string;
|
|
1481
1481
|
}>>[];
|
|
1482
|
-
declare function followOA(args: AsyncVoidCallback & TypeOf<typeof followOAArgs[0]>): Promise<void>;
|
|
1482
|
+
declare function followOA(args: AsyncVoidCallback & TypeOf<(typeof followOAArgs)[0]>): Promise<void>;
|
|
1483
1483
|
|
|
1484
1484
|
declare const unfollowOAArgs: ZodOptional<ZodObject<{
|
|
1485
1485
|
id: ZodString;
|
|
@@ -1488,7 +1488,7 @@ declare const unfollowOAArgs: ZodOptional<ZodObject<{
|
|
|
1488
1488
|
}, {
|
|
1489
1489
|
id: string;
|
|
1490
1490
|
}>>[];
|
|
1491
|
-
declare function unfollowOA(args: AsyncVoidCallback & TypeOf<typeof unfollowOAArgs[0]>): Promise<void>;
|
|
1491
|
+
declare function unfollowOA(args: AsyncVoidCallback & TypeOf<(typeof unfollowOAArgs)[0]>): Promise<void>;
|
|
1492
1492
|
|
|
1493
1493
|
declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
1494
1494
|
type: ZodEnum<["image"]>;
|
|
@@ -1633,34 +1633,34 @@ declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
|
1633
1633
|
path: ZodOptional<ZodString>;
|
|
1634
1634
|
description: ZodOptional<ZodDefault<ZodString>>;
|
|
1635
1635
|
}, "strip", ZodTypeAny, {
|
|
1636
|
-
path?: string | undefined;
|
|
1637
1636
|
description?: string | undefined;
|
|
1637
|
+
path?: string | undefined;
|
|
1638
1638
|
title: string;
|
|
1639
1639
|
thumbnail: string;
|
|
1640
1640
|
}, {
|
|
1641
|
-
path?: string | undefined;
|
|
1642
1641
|
description?: string | undefined;
|
|
1642
|
+
path?: string | undefined;
|
|
1643
1643
|
title: string;
|
|
1644
1644
|
thumbnail: string;
|
|
1645
1645
|
}>;
|
|
1646
1646
|
}, "strip", ZodTypeAny, {
|
|
1647
1647
|
data: {
|
|
1648
|
-
path?: string | undefined;
|
|
1649
1648
|
description?: string | undefined;
|
|
1649
|
+
path?: string | undefined;
|
|
1650
1650
|
title: string;
|
|
1651
1651
|
thumbnail: string;
|
|
1652
1652
|
};
|
|
1653
1653
|
type: "zmp" | "zmp_deep_link";
|
|
1654
1654
|
}, {
|
|
1655
1655
|
data: {
|
|
1656
|
-
path?: string | undefined;
|
|
1657
1656
|
description?: string | undefined;
|
|
1657
|
+
path?: string | undefined;
|
|
1658
1658
|
title: string;
|
|
1659
1659
|
thumbnail: string;
|
|
1660
1660
|
};
|
|
1661
1661
|
type: "zmp" | "zmp_deep_link";
|
|
1662
1662
|
}>]>[];
|
|
1663
|
-
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>;
|
|
1664
1664
|
|
|
1665
1665
|
declare function requestCameraPermission(args?: AsyncCallback<RequestCameraPermissionReturns>): Promise<RequestCameraPermissionReturns>;
|
|
1666
1666
|
|
|
@@ -1671,7 +1671,7 @@ declare const createShortcutArgs: ZodOptional<ZodObject<{
|
|
|
1671
1671
|
}, {
|
|
1672
1672
|
params?: Record<string, string> | undefined;
|
|
1673
1673
|
}>>[];
|
|
1674
|
-
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>;
|
|
1675
1675
|
|
|
1676
1676
|
declare const openBioAuthenticationArgs: ZodOptional<ZodObject<{
|
|
1677
1677
|
secretData: ZodString;
|
|
@@ -1706,7 +1706,7 @@ declare const openBioAuthenticationArgs: ZodOptional<ZodObject<{
|
|
|
1706
1706
|
requireFingerprint?: boolean | undefined;
|
|
1707
1707
|
secretData: string;
|
|
1708
1708
|
}>>[];
|
|
1709
|
-
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>;
|
|
1710
1710
|
|
|
1711
1711
|
declare function checkStateBioAuthentication(args?: AsyncCallback<CheckStateBioAuthenticationReturns>): Promise<CheckStateBioAuthenticationReturns>;
|
|
1712
1712
|
|
|
@@ -1717,7 +1717,7 @@ declare const showToastArgs: ZodOptional<ZodObject<{
|
|
|
1717
1717
|
}, {
|
|
1718
1718
|
message: string;
|
|
1719
1719
|
}>>[];
|
|
1720
|
-
declare function showToast(args: AsyncVoidCallback & TypeOf<typeof showToastArgs[0]>): Promise<void>;
|
|
1720
|
+
declare function showToast(args: AsyncVoidCallback & TypeOf<(typeof showToastArgs)[0]>): Promise<void>;
|
|
1721
1721
|
|
|
1722
1722
|
declare function hideKeyboard(args?: AsyncVoidCallback): Promise<void>;
|
|
1723
1723
|
|
|
@@ -1728,7 +1728,7 @@ declare const openPhoneArgs: ZodObject<{
|
|
|
1728
1728
|
}, {
|
|
1729
1729
|
phoneNumber: string;
|
|
1730
1730
|
}>[];
|
|
1731
|
-
declare function openPhone(args: AsyncVoidCallback & TypeOf<typeof openPhoneArgs[0]>): Promise<void>;
|
|
1731
|
+
declare function openPhone(args: AsyncVoidCallback & TypeOf<(typeof openPhoneArgs)[0]>): Promise<void>;
|
|
1732
1732
|
|
|
1733
1733
|
declare const openSMSArgs: ZodObject<{
|
|
1734
1734
|
content: ZodString;
|
|
@@ -1740,7 +1740,7 @@ declare const openSMSArgs: ZodObject<{
|
|
|
1740
1740
|
content: string;
|
|
1741
1741
|
phoneNumber: string;
|
|
1742
1742
|
}>[];
|
|
1743
|
-
declare function openSMS(args: AsyncVoidCallback & TypeOf<typeof openSMSArgs[0]>): Promise<void>;
|
|
1743
|
+
declare function openSMS(args: AsyncVoidCallback & TypeOf<(typeof openSMSArgs)[0]>): Promise<void>;
|
|
1744
1744
|
|
|
1745
1745
|
declare const viewOAQrArgs: ZodObject<{
|
|
1746
1746
|
id: ZodString;
|
|
@@ -1752,7 +1752,7 @@ declare const viewOAQrArgs: ZodObject<{
|
|
|
1752
1752
|
displayName?: string | undefined;
|
|
1753
1753
|
id: string;
|
|
1754
1754
|
}>[];
|
|
1755
|
-
declare function viewOAQr(args: AsyncVoidCallback & TypeOf<typeof viewOAQrArgs[0]>): Promise<void>;
|
|
1755
|
+
declare function viewOAQr(args: AsyncVoidCallback & TypeOf<(typeof viewOAQrArgs)[0]>): Promise<void>;
|
|
1756
1756
|
|
|
1757
1757
|
declare const keepScreenArgs: ZodObject<{
|
|
1758
1758
|
keepScreenOn: ZodBoolean;
|
|
@@ -1761,7 +1761,7 @@ declare const keepScreenArgs: ZodObject<{
|
|
|
1761
1761
|
}, {
|
|
1762
1762
|
keepScreenOn: boolean;
|
|
1763
1763
|
}>[];
|
|
1764
|
-
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>;
|
|
1765
1765
|
|
|
1766
1766
|
declare function onKeepScreen(args?: AsyncVoidCallback): Promise<void>;
|
|
1767
1767
|
|
|
@@ -1777,7 +1777,7 @@ declare const saveImageToGalleryArgs: ZodOptional<ZodObject<{
|
|
|
1777
1777
|
imageUrl?: string | undefined;
|
|
1778
1778
|
imageBase64Data?: string | undefined;
|
|
1779
1779
|
}>>[];
|
|
1780
|
-
declare function saveImageToGallery(args: AsyncVoidCallback & TypeOf<typeof saveImageToGalleryArgs[0]>): Promise<void>;
|
|
1780
|
+
declare function saveImageToGallery(args: AsyncVoidCallback & TypeOf<(typeof saveImageToGalleryArgs)[0]>): Promise<void>;
|
|
1781
1781
|
|
|
1782
1782
|
declare const openMiniAppArgs: ZodObject<{
|
|
1783
1783
|
appId: ZodString;
|
|
@@ -1792,7 +1792,7 @@ declare const openMiniAppArgs: ZodObject<{
|
|
|
1792
1792
|
params?: Record<string, string> | undefined;
|
|
1793
1793
|
appId: string;
|
|
1794
1794
|
}>[];
|
|
1795
|
-
declare function openMiniApp(args: AsyncVoidCallback & TypeOf<typeof openMiniAppArgs[0]>): Promise<void>;
|
|
1795
|
+
declare function openMiniApp(args: AsyncVoidCallback & TypeOf<(typeof openMiniAppArgs)[0]>): Promise<void>;
|
|
1796
1796
|
|
|
1797
1797
|
declare const vibrateArgs: ZodObject<{
|
|
1798
1798
|
type: ZodDefault<ZodEnum<["oneShot"]>>;
|
|
@@ -1804,7 +1804,7 @@ declare const vibrateArgs: ZodObject<{
|
|
|
1804
1804
|
type?: "oneShot" | undefined;
|
|
1805
1805
|
milliseconds?: number | undefined;
|
|
1806
1806
|
}>[];
|
|
1807
|
-
declare function vibrate(args?: AsyncVoidCallback & TypeOf<typeof vibrateArgs[0]>): Promise<void>;
|
|
1807
|
+
declare function vibrate(args?: AsyncVoidCallback & TypeOf<(typeof vibrateArgs)[0]>): Promise<void>;
|
|
1808
1808
|
|
|
1809
1809
|
declare const openWebviewArgs: ZodObject<{
|
|
1810
1810
|
url: ZodString;
|
|
@@ -1831,7 +1831,7 @@ declare const openWebviewArgs: ZodObject<{
|
|
|
1831
1831
|
} | undefined;
|
|
1832
1832
|
url: string;
|
|
1833
1833
|
}>[];
|
|
1834
|
-
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>;
|
|
1835
1835
|
|
|
1836
1836
|
declare function getRouteParams(): Record<string, string>;
|
|
1837
1837
|
|
|
@@ -1844,7 +1844,7 @@ declare const sendDataToPreviousMiniAppArgs: ZodObject<{
|
|
|
1844
1844
|
}, {
|
|
1845
1845
|
data?: any;
|
|
1846
1846
|
}>[];
|
|
1847
|
-
declare function sendDataToPreviousMiniApp(args: AsyncVoidCallback & TypeOf<typeof sendDataToPreviousMiniAppArgs[0]>): Promise<void>;
|
|
1847
|
+
declare function sendDataToPreviousMiniApp(args: AsyncVoidCallback & TypeOf<(typeof sendDataToPreviousMiniAppArgs)[0]>): Promise<void>;
|
|
1848
1848
|
|
|
1849
1849
|
declare function getPhoneNumber(args?: AsyncCallback<GetPhoneNumberReturns>): Promise<GetPhoneNumberReturns>;
|
|
1850
1850
|
|
|
@@ -1855,7 +1855,7 @@ declare const openProfilePickerArgs: ZodObject<{
|
|
|
1855
1855
|
}, {
|
|
1856
1856
|
maxProfile?: number | undefined;
|
|
1857
1857
|
}>[];
|
|
1858
|
-
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>;
|
|
1859
1859
|
|
|
1860
1860
|
declare const connectWifiArgs: ZodObject<{
|
|
1861
1861
|
SSID: ZodString;
|
|
@@ -1870,7 +1870,7 @@ declare const connectWifiArgs: ZodObject<{
|
|
|
1870
1870
|
hiddenSSID?: boolean | undefined;
|
|
1871
1871
|
SSID: string;
|
|
1872
1872
|
}>[];
|
|
1873
|
-
declare function connectWifi(args: AsyncVoidCallback & TypeOf<typeof connectWifiArgs[0]>): Promise<void>;
|
|
1873
|
+
declare function connectWifi(args: AsyncVoidCallback & TypeOf<(typeof connectWifiArgs)[0]>): Promise<void>;
|
|
1874
1874
|
|
|
1875
1875
|
declare const openMediaPickerArgs: ZodObject<{
|
|
1876
1876
|
type: ZodEnum<["video", "photo", "file", "zcamera", "zcamera_photo", "zcamera_video", "zcamera_scan"]>;
|
|
@@ -1909,7 +1909,7 @@ declare const openMediaPickerArgs: ZodObject<{
|
|
|
1909
1909
|
type: "video" | "zcamera" | "zcamera_photo" | "zcamera_video" | "zcamera_scan" | "photo" | "file";
|
|
1910
1910
|
serverUploadUrl: string;
|
|
1911
1911
|
}>[];
|
|
1912
|
-
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>;
|
|
1913
1913
|
|
|
1914
1914
|
declare const getShareableLinkArgs: ZodObject<{
|
|
1915
1915
|
title: ZodString;
|
|
@@ -1919,22 +1919,22 @@ declare const getShareableLinkArgs: ZodObject<{
|
|
|
1919
1919
|
}, "strip", ZodTypeAny, {
|
|
1920
1920
|
path?: string | undefined;
|
|
1921
1921
|
thumbnail?: string | undefined;
|
|
1922
|
-
title: string;
|
|
1923
1922
|
description: string;
|
|
1923
|
+
title: string;
|
|
1924
1924
|
}, {
|
|
1925
|
-
path?: string | undefined;
|
|
1926
1925
|
description?: string | undefined;
|
|
1926
|
+
path?: string | undefined;
|
|
1927
1927
|
thumbnail?: string | undefined;
|
|
1928
1928
|
title: string;
|
|
1929
1929
|
}>[];
|
|
1930
|
-
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>;
|
|
1931
1931
|
|
|
1932
1932
|
declare function closeLoading(args?: AsyncVoidCallback): Promise<void>;
|
|
1933
1933
|
|
|
1934
1934
|
declare function requestUpdateZalo(args?: AsyncVoidCallback): Promise<void>;
|
|
1935
1935
|
|
|
1936
1936
|
declare const onConfirmToExitArgs: ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>[];
|
|
1937
|
-
declare function onConfirmToExit(args: TypeOf<typeof onConfirmToExitArgs[0]>): void;
|
|
1937
|
+
declare function onConfirmToExit(args: TypeOf<(typeof onConfirmToExitArgs)[0]>): void;
|
|
1938
1938
|
|
|
1939
1939
|
declare function offConfirmToExit(): void;
|
|
1940
1940
|
|
|
@@ -1951,7 +1951,7 @@ declare function getAuthCode(args?: AsyncCallback<GetAuthCodeReturns>): Promise<
|
|
|
1951
1951
|
declare function getZPIToken(args?: AsyncCallback<GetZPITokenReturns>): Promise<GetZPITokenReturns>;
|
|
1952
1952
|
|
|
1953
1953
|
declare const setAccessTokenArgs: ZodString[];
|
|
1954
|
-
declare function setAccessToken(args: TypeOf<typeof setAccessTokenArgs[0]>): void;
|
|
1954
|
+
declare function setAccessToken(args: TypeOf<(typeof setAccessTokenArgs)[0]>): void;
|
|
1955
1955
|
|
|
1956
1956
|
declare const openOutAppArgs: ZodObject<{
|
|
1957
1957
|
url: ZodString;
|
|
@@ -1960,7 +1960,7 @@ declare const openOutAppArgs: ZodObject<{
|
|
|
1960
1960
|
}, {
|
|
1961
1961
|
url: string;
|
|
1962
1962
|
}>[];
|
|
1963
|
-
declare function openOutApp(args: TypeOf<typeof openOutAppArgs[0]>): Promise<void>;
|
|
1963
|
+
declare function openOutApp(args: TypeOf<(typeof openOutAppArgs)[0]>): Promise<void>;
|
|
1964
1964
|
|
|
1965
1965
|
declare const chooseImageArgs: ZodObject<{
|
|
1966
1966
|
count: ZodDefault<ZodOptional<ZodNumber>>;
|
|
@@ -1975,7 +1975,7 @@ declare const chooseImageArgs: ZodObject<{
|
|
|
1975
1975
|
sourceType?: ("album" | "camera")[] | undefined;
|
|
1976
1976
|
cameraType?: "back" | "front" | undefined;
|
|
1977
1977
|
}>[];
|
|
1978
|
-
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>;
|
|
1979
1979
|
|
|
1980
1980
|
declare function getLocation(args?: AsyncCallback<GetLocationReturns>): Promise<GetLocationReturns>;
|
|
1981
1981
|
|
|
@@ -1986,7 +1986,7 @@ declare const onCallbackDataArgs: ZodFunction<ZodTuple<[ZodObject<{
|
|
|
1986
1986
|
}, {
|
|
1987
1987
|
data?: any;
|
|
1988
1988
|
}>], ZodUnknown>, ZodVoid>[];
|
|
1989
|
-
declare function onCallbackData(args: TypeOf<typeof onCallbackDataArgs[0]>): void;
|
|
1989
|
+
declare function onCallbackData(args: TypeOf<(typeof onCallbackDataArgs)[0]>): void;
|
|
1990
1990
|
|
|
1991
1991
|
declare const createOrderArgs: ZodObject<{
|
|
1992
1992
|
amount: ZodUnion<[ZodString, ZodNumber]>;
|
|
@@ -2016,7 +2016,7 @@ declare const checkTransactionArgs: ZodObject<{
|
|
|
2016
2016
|
}, {
|
|
2017
2017
|
data: string | Record<string, string>;
|
|
2018
2018
|
}>[];
|
|
2019
|
-
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>;
|
|
2020
2020
|
|
|
2021
2021
|
/**
|
|
2022
2022
|
* Minimal `EventEmitter` interface that is molded against the Node.js
|
|
@@ -2160,7 +2160,7 @@ declare const setAndroidBottomNavigationBarArgs: ZodOptional<ZodObject<{
|
|
|
2160
2160
|
}, {
|
|
2161
2161
|
hide?: boolean | undefined;
|
|
2162
2162
|
}>>[];
|
|
2163
|
-
declare function setAndroidBottomNavigationBar(args: AsyncVoidCallback & TypeOf<typeof setAndroidBottomNavigationBarArgs[0]>): Promise<void>;
|
|
2163
|
+
declare function setAndroidBottomNavigationBar(args: AsyncVoidCallback & TypeOf<(typeof setAndroidBottomNavigationBarArgs)[0]>): Promise<void>;
|
|
2164
2164
|
|
|
2165
2165
|
declare const setIOSBottomSafeAreaArgs: ZodOptional<ZodObject<{
|
|
2166
2166
|
hide: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
@@ -2169,7 +2169,7 @@ declare const setIOSBottomSafeAreaArgs: ZodOptional<ZodObject<{
|
|
|
2169
2169
|
}, {
|
|
2170
2170
|
hide?: boolean | undefined;
|
|
2171
2171
|
}>>[];
|
|
2172
|
-
declare function setIOSBottomSafeArea(args: AsyncVoidCallback & TypeOf<typeof setIOSBottomSafeAreaArgs[0]>): Promise<void>;
|
|
2172
|
+
declare function setIOSBottomSafeArea(args: AsyncVoidCallback & TypeOf<(typeof setIOSBottomSafeAreaArgs)[0]>): Promise<void>;
|
|
2173
2173
|
|
|
2174
2174
|
declare const setStatusBarArgs: ZodOptional<ZodObject<{
|
|
2175
2175
|
type: ZodOptional<ZodDefault<ZodEnum<["normal", "hidden", "transparent"]>>>;
|
|
@@ -2181,7 +2181,7 @@ declare const setStatusBarArgs: ZodOptional<ZodObject<{
|
|
|
2181
2181
|
type?: "hidden" | "transparent" | "normal" | undefined;
|
|
2182
2182
|
color?: string | undefined;
|
|
2183
2183
|
}>>[];
|
|
2184
|
-
declare function setStatusBar(args: AsyncVoidCallback & TypeOf<typeof setStatusBarArgs[0]>): Promise<void>;
|
|
2184
|
+
declare function setStatusBar(args: AsyncVoidCallback & TypeOf<(typeof setStatusBarArgs)[0]>): Promise<void>;
|
|
2185
2185
|
|
|
2186
2186
|
declare const configAppViewArgs: ZodObject<{
|
|
2187
2187
|
headerTextColor: ZodOptional<ZodEnum<["black", "white"]>>;
|
|
@@ -2230,7 +2230,7 @@ declare const configAppViewArgs: ZodObject<{
|
|
|
2230
2230
|
hideAndroidBottomNavigationBar?: boolean | undefined;
|
|
2231
2231
|
hideIOSSafeAreaBottom?: boolean | undefined;
|
|
2232
2232
|
}>[];
|
|
2233
|
-
declare function configAppView(args: AsyncVoidCallback & TypeOf<typeof configAppViewArgs[0]>): Promise<void>;
|
|
2233
|
+
declare function configAppView(args: AsyncVoidCallback & TypeOf<(typeof configAppViewArgs)[0]>): Promise<void>;
|
|
2234
2234
|
|
|
2235
2235
|
declare const createOrderIAPArgs: ZodObject<{
|
|
2236
2236
|
productId: ZodString;
|
|
@@ -2248,7 +2248,7 @@ declare const createOrderIAPArgs: ZodObject<{
|
|
|
2248
2248
|
prorationMode?: "DEFERRED" | "IMMEDIATE_AND_CHARGE_FULL_PRICE" | undefined;
|
|
2249
2249
|
productId: string;
|
|
2250
2250
|
}>[];
|
|
2251
|
-
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>;
|
|
2252
2252
|
|
|
2253
2253
|
declare function minimizeApp(args?: AsyncVoidCallback): Promise<void>;
|
|
2254
2254
|
|
package/apis/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var r="2.30.
|
|
1
|
+
var r="2.30.2";export{r as version};
|
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};
|