@heybox/hb-sdk-protocol 0.9.2-alpha.8 → 0.9.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/dist/index.cjs.js +13 -0
- package/dist/index.esm.js +13 -0
- package/package.json +1 -1
- package/types/index.d.ts +13 -0
package/dist/index.cjs.js
CHANGED
|
@@ -507,6 +507,7 @@ const MINI_PROGRAM_PROTOCOL_CAPABILITIES = [
|
|
|
507
507
|
* @see [MINI_PROGRAM_BRIDGE_NONCE_PARAM](/reference/symbols/protocol/constants/MINI_PROGRAM_BRIDGE_NONCE_PARAM) iframe URL 中的 nonce 参数名。
|
|
508
508
|
* @see [MINI_PROGRAM_PROTOCOL_CAPABILITIES](/reference/symbols/protocol/constants/MINI_PROGRAM_PROTOCOL_CAPABILITIES) 公开 method 与权限 requirement 目录。
|
|
509
509
|
* @see [parseMiniProgramRuntimePermissions](/reference/symbols/protocol/functions/parseMiniProgramRuntimePermissions) Runtime 权限快照解析器。
|
|
510
|
+
* @since 0.3.1
|
|
510
511
|
*/
|
|
511
512
|
function isMiniProgramBridgeMessage(value) {
|
|
512
513
|
if (!isRecord$3(value))
|
|
@@ -591,6 +592,7 @@ function isMiniProgramBridgeMessage(value) {
|
|
|
591
592
|
* @see [PathRoot](/reference/symbols/root/interfaces/PathRoot) 提供 `file()` / `directory()` 的 SDK 路径入口。
|
|
592
593
|
* @see [FileSystem](/reference/symbols/root/interfaces/FileSystem) `files.sandbox` 逻辑路径能力。
|
|
593
594
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 已授权目录下的相对路径能力。
|
|
595
|
+
* @since 0.8.0
|
|
594
596
|
*/
|
|
595
597
|
function isMiniProgramRelativePath(value) {
|
|
596
598
|
if (typeof value !== 'string' || !value || value.startsWith('/') || value.endsWith('/')) {
|
|
@@ -657,6 +659,7 @@ function isMiniProgramRelativePath(value) {
|
|
|
657
659
|
* @see [PathRoot](/reference/symbols/root/interfaces/PathRoot) SDK 公开的逻辑路径 root 能力。
|
|
658
660
|
* @see [FilesModule](/reference/symbols/root/interfaces/FilesModule) 提供 `files.sandbox` 与目录 picker 的入口。
|
|
659
661
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 可作为 derived path root 的目录代理。
|
|
662
|
+
* @since 0.8.0
|
|
660
663
|
*/
|
|
661
664
|
function isMiniProgramPathRootRef(value) {
|
|
662
665
|
if (!isRecord$3(value))
|
|
@@ -723,6 +726,7 @@ function isMiniProgramPathRootRef(value) {
|
|
|
723
726
|
* @see [isMiniProgramFileDescriptor](/reference/symbols/protocol/functions/isMiniProgramFileDescriptor) 包含名称和 mode 的文件 descriptor guard。
|
|
724
727
|
* @see [isMiniProgramDirectoryRef](/reference/symbols/protocol/functions/isMiniProgramDirectoryRef) 可用 `'.'` 指向 root 自身的目录引用 guard。
|
|
725
728
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 使用文件引用的公开 I/O 代理。
|
|
729
|
+
* @since 0.8.0
|
|
726
730
|
*/
|
|
727
731
|
function isMiniProgramFileRef(value) {
|
|
728
732
|
if (!isRecord$3(value) || value.kind !== 'file')
|
|
@@ -790,6 +794,7 @@ function isMiniProgramFileRef(value) {
|
|
|
790
794
|
* @see [isMiniProgramDirectoryDescriptor](/reference/symbols/protocol/functions/isMiniProgramDirectoryDescriptor) 包含名称和 mode 的目录 descriptor guard。
|
|
791
795
|
* @see [isMiniProgramFileRef](/reference/symbols/protocol/functions/isMiniProgramFileRef) 不接受 root 自身 `'.'` 的文件引用 guard。
|
|
792
796
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 使用目录引用的公开路径操作代理。
|
|
797
|
+
* @since 0.8.0
|
|
793
798
|
*/
|
|
794
799
|
function isMiniProgramDirectoryRef(value) {
|
|
795
800
|
if (!isRecord$3(value) || value.kind !== 'directory')
|
|
@@ -864,6 +869,7 @@ function isMiniProgramDirectoryRef(value) {
|
|
|
864
869
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 校验后由 SDK 建立的文件代理。
|
|
865
870
|
* @see [PickFilesResult](/reference/symbols/protocol/types/PickFilesResult) picker 的 direct-ref 文件结果。
|
|
866
871
|
* @see [SaveFileResult](/reference/symbols/protocol/types/SaveFileResult) save picker 的 direct-ref 文件结果。
|
|
872
|
+
* @since 0.8.0
|
|
867
873
|
*/
|
|
868
874
|
function isMiniProgramFileDescriptor(value) {
|
|
869
875
|
return (isRecord$3(value) &&
|
|
@@ -934,6 +940,7 @@ function isMiniProgramFileDescriptor(value) {
|
|
|
934
940
|
* @see [FilesModule](/reference/symbols/root/interfaces/FilesModule) `files` 公开能力入口。
|
|
935
941
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 校验后由 SDK 建立的目录代理。
|
|
936
942
|
* @see [PickDirectoryResult](/reference/symbols/protocol/types/PickDirectoryResult) picker 的 direct-ref 返回契约。
|
|
943
|
+
* @since 0.8.0
|
|
937
944
|
*/
|
|
938
945
|
function isMiniProgramDirectoryDescriptor(value) {
|
|
939
946
|
return (isRecord$3(value) &&
|
|
@@ -999,6 +1006,7 @@ function isMiniProgramDirectoryDescriptor(value) {
|
|
|
999
1006
|
* @see [FileSystemEntity](/reference/symbols/root/types/FileSystemEntity) SDK 公开的 FileHandle/DirectoryHandle 联合。
|
|
1000
1007
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 文件 descriptor 对应的能力代理。
|
|
1001
1008
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 目录 descriptor 对应的能力代理及 `list()` 入口。
|
|
1009
|
+
* @since 0.8.0
|
|
1002
1010
|
*/
|
|
1003
1011
|
function isMiniProgramFileSystemEntityDescriptor(value) {
|
|
1004
1012
|
return isMiniProgramFileDescriptor(value) || isMiniProgramDirectoryDescriptor(value);
|
|
@@ -1054,6 +1062,7 @@ function isMiniProgramFileSystemEntityDescriptor(value) {
|
|
|
1054
1062
|
* @see [CompanionStdio](/reference/symbols/root/interfaces/CompanionStdio) Companion 原始字节 stdin/stdout/stderr。
|
|
1055
1063
|
* @see [isMiniProgramFileDescriptor](/reference/symbols/protocol/functions/isMiniProgramFileDescriptor) 文件 descriptor guard。
|
|
1056
1064
|
* @see [isMiniProgramDirectoryDescriptor](/reference/symbols/protocol/functions/isMiniProgramDirectoryDescriptor) 目录 descriptor guard。
|
|
1065
|
+
* @since 0.8.0
|
|
1057
1066
|
*/
|
|
1058
1067
|
function isMiniProgramByteArray(value) {
|
|
1059
1068
|
return value instanceof Uint8Array && value.buffer instanceof ArrayBuffer;
|
|
@@ -1113,6 +1122,7 @@ function isMiniProgramByteArray(value) {
|
|
|
1113
1122
|
* @see [FileStatResult](/reference/symbols/protocol/types/FileStatResult) `file.stat` 的 wire 返回类型。
|
|
1114
1123
|
* @see [FileStat](/reference/symbols/root/interfaces/FileStat) SDK 向业务返回的元数据快照。
|
|
1115
1124
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 提供 `stat()` 的当前 session 文件代理。
|
|
1125
|
+
* @since 0.8.0
|
|
1116
1126
|
*/
|
|
1117
1127
|
function isMiniProgramFileStat(value) {
|
|
1118
1128
|
return (isRecord$3(value) &&
|
|
@@ -1173,6 +1183,7 @@ function isMiniProgramFileStat(value) {
|
|
|
1173
1183
|
* @see [DownloadProgress](/reference/symbols/root/interfaces/DownloadProgress) `onProgress` 接收的公开 SDK 进度类型。
|
|
1174
1184
|
* @see [network.download](/reference/sdk/network/download) 产生并消费该进度的下载能力。
|
|
1175
1185
|
* @see [isMiniProgramBridgeMessage](/reference/symbols/protocol/functions/isMiniProgramBridgeMessage) operation progress envelope 的最低校验。
|
|
1186
|
+
* @since 0.8.0
|
|
1176
1187
|
*/
|
|
1177
1188
|
function isMiniProgramDownloadProgressPayload(value) {
|
|
1178
1189
|
if (!isRecord$3(value) ||
|
|
@@ -1479,6 +1490,7 @@ const MANAGED_RUNTIME_PERMISSION_KEYS = new Set(MINI_PROGRAM_PERMISSION_KEYS);
|
|
|
1479
1490
|
* @see [parseMiniProgramRuntimePermissions](/reference/symbols/protocol/functions/parseMiniProgramRuntimePermissions) 完整 snapshot 的 trim、legacy 归一化与 config 校验。
|
|
1480
1491
|
* @see [MINI_PROGRAM_PROTOCOL_CAPABILITIES](/reference/symbols/protocol/constants/MINI_PROGRAM_PROTOCOL_CAPABILITIES) method 到 permission requirement 的权威映射。
|
|
1481
1492
|
* @see [权限声明](/guide/permissions) Manifest 声明、平台批准与 Runtime 状态的完整流程。
|
|
1493
|
+
* @since 0.6.4
|
|
1482
1494
|
*/
|
|
1483
1495
|
function isManagedMiniProgramRuntimePermissionKey(key) {
|
|
1484
1496
|
return MANAGED_RUNTIME_PERMISSION_KEYS.has(key);
|
|
@@ -1554,6 +1566,7 @@ function isManagedMiniProgramRuntimePermissionKey(key) {
|
|
|
1554
1566
|
* @see {@link isManagedMiniProgramRuntimePermissionKey}
|
|
1555
1567
|
* @see {@link MINI_PROGRAM_PROTOCOL_CAPABILITIES}
|
|
1556
1568
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
1569
|
+
* @since 0.6.4
|
|
1557
1570
|
*/
|
|
1558
1571
|
function parseMiniProgramRuntimePermissions(snapshot) {
|
|
1559
1572
|
if (!isRecord$2(snapshot) || snapshot.schema_version !== 1 || !Array.isArray(snapshot.entries)) {
|
package/dist/index.esm.js
CHANGED
|
@@ -505,6 +505,7 @@ const MINI_PROGRAM_PROTOCOL_CAPABILITIES = [
|
|
|
505
505
|
* @see [MINI_PROGRAM_BRIDGE_NONCE_PARAM](/reference/symbols/protocol/constants/MINI_PROGRAM_BRIDGE_NONCE_PARAM) iframe URL 中的 nonce 参数名。
|
|
506
506
|
* @see [MINI_PROGRAM_PROTOCOL_CAPABILITIES](/reference/symbols/protocol/constants/MINI_PROGRAM_PROTOCOL_CAPABILITIES) 公开 method 与权限 requirement 目录。
|
|
507
507
|
* @see [parseMiniProgramRuntimePermissions](/reference/symbols/protocol/functions/parseMiniProgramRuntimePermissions) Runtime 权限快照解析器。
|
|
508
|
+
* @since 0.3.1
|
|
508
509
|
*/
|
|
509
510
|
function isMiniProgramBridgeMessage(value) {
|
|
510
511
|
if (!isRecord$3(value))
|
|
@@ -589,6 +590,7 @@ function isMiniProgramBridgeMessage(value) {
|
|
|
589
590
|
* @see [PathRoot](/reference/symbols/root/interfaces/PathRoot) 提供 `file()` / `directory()` 的 SDK 路径入口。
|
|
590
591
|
* @see [FileSystem](/reference/symbols/root/interfaces/FileSystem) `files.sandbox` 逻辑路径能力。
|
|
591
592
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 已授权目录下的相对路径能力。
|
|
593
|
+
* @since 0.8.0
|
|
592
594
|
*/
|
|
593
595
|
function isMiniProgramRelativePath(value) {
|
|
594
596
|
if (typeof value !== 'string' || !value || value.startsWith('/') || value.endsWith('/')) {
|
|
@@ -655,6 +657,7 @@ function isMiniProgramRelativePath(value) {
|
|
|
655
657
|
* @see [PathRoot](/reference/symbols/root/interfaces/PathRoot) SDK 公开的逻辑路径 root 能力。
|
|
656
658
|
* @see [FilesModule](/reference/symbols/root/interfaces/FilesModule) 提供 `files.sandbox` 与目录 picker 的入口。
|
|
657
659
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 可作为 derived path root 的目录代理。
|
|
660
|
+
* @since 0.8.0
|
|
658
661
|
*/
|
|
659
662
|
function isMiniProgramPathRootRef(value) {
|
|
660
663
|
if (!isRecord$3(value))
|
|
@@ -721,6 +724,7 @@ function isMiniProgramPathRootRef(value) {
|
|
|
721
724
|
* @see [isMiniProgramFileDescriptor](/reference/symbols/protocol/functions/isMiniProgramFileDescriptor) 包含名称和 mode 的文件 descriptor guard。
|
|
722
725
|
* @see [isMiniProgramDirectoryRef](/reference/symbols/protocol/functions/isMiniProgramDirectoryRef) 可用 `'.'` 指向 root 自身的目录引用 guard。
|
|
723
726
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 使用文件引用的公开 I/O 代理。
|
|
727
|
+
* @since 0.8.0
|
|
724
728
|
*/
|
|
725
729
|
function isMiniProgramFileRef(value) {
|
|
726
730
|
if (!isRecord$3(value) || value.kind !== 'file')
|
|
@@ -788,6 +792,7 @@ function isMiniProgramFileRef(value) {
|
|
|
788
792
|
* @see [isMiniProgramDirectoryDescriptor](/reference/symbols/protocol/functions/isMiniProgramDirectoryDescriptor) 包含名称和 mode 的目录 descriptor guard。
|
|
789
793
|
* @see [isMiniProgramFileRef](/reference/symbols/protocol/functions/isMiniProgramFileRef) 不接受 root 自身 `'.'` 的文件引用 guard。
|
|
790
794
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 使用目录引用的公开路径操作代理。
|
|
795
|
+
* @since 0.8.0
|
|
791
796
|
*/
|
|
792
797
|
function isMiniProgramDirectoryRef(value) {
|
|
793
798
|
if (!isRecord$3(value) || value.kind !== 'directory')
|
|
@@ -862,6 +867,7 @@ function isMiniProgramDirectoryRef(value) {
|
|
|
862
867
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 校验后由 SDK 建立的文件代理。
|
|
863
868
|
* @see [PickFilesResult](/reference/symbols/protocol/types/PickFilesResult) picker 的 direct-ref 文件结果。
|
|
864
869
|
* @see [SaveFileResult](/reference/symbols/protocol/types/SaveFileResult) save picker 的 direct-ref 文件结果。
|
|
870
|
+
* @since 0.8.0
|
|
865
871
|
*/
|
|
866
872
|
function isMiniProgramFileDescriptor(value) {
|
|
867
873
|
return (isRecord$3(value) &&
|
|
@@ -932,6 +938,7 @@ function isMiniProgramFileDescriptor(value) {
|
|
|
932
938
|
* @see [FilesModule](/reference/symbols/root/interfaces/FilesModule) `files` 公开能力入口。
|
|
933
939
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 校验后由 SDK 建立的目录代理。
|
|
934
940
|
* @see [PickDirectoryResult](/reference/symbols/protocol/types/PickDirectoryResult) picker 的 direct-ref 返回契约。
|
|
941
|
+
* @since 0.8.0
|
|
935
942
|
*/
|
|
936
943
|
function isMiniProgramDirectoryDescriptor(value) {
|
|
937
944
|
return (isRecord$3(value) &&
|
|
@@ -997,6 +1004,7 @@ function isMiniProgramDirectoryDescriptor(value) {
|
|
|
997
1004
|
* @see [FileSystemEntity](/reference/symbols/root/types/FileSystemEntity) SDK 公开的 FileHandle/DirectoryHandle 联合。
|
|
998
1005
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 文件 descriptor 对应的能力代理。
|
|
999
1006
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 目录 descriptor 对应的能力代理及 `list()` 入口。
|
|
1007
|
+
* @since 0.8.0
|
|
1000
1008
|
*/
|
|
1001
1009
|
function isMiniProgramFileSystemEntityDescriptor(value) {
|
|
1002
1010
|
return isMiniProgramFileDescriptor(value) || isMiniProgramDirectoryDescriptor(value);
|
|
@@ -1052,6 +1060,7 @@ function isMiniProgramFileSystemEntityDescriptor(value) {
|
|
|
1052
1060
|
* @see [CompanionStdio](/reference/symbols/root/interfaces/CompanionStdio) Companion 原始字节 stdin/stdout/stderr。
|
|
1053
1061
|
* @see [isMiniProgramFileDescriptor](/reference/symbols/protocol/functions/isMiniProgramFileDescriptor) 文件 descriptor guard。
|
|
1054
1062
|
* @see [isMiniProgramDirectoryDescriptor](/reference/symbols/protocol/functions/isMiniProgramDirectoryDescriptor) 目录 descriptor guard。
|
|
1063
|
+
* @since 0.8.0
|
|
1055
1064
|
*/
|
|
1056
1065
|
function isMiniProgramByteArray(value) {
|
|
1057
1066
|
return value instanceof Uint8Array && value.buffer instanceof ArrayBuffer;
|
|
@@ -1111,6 +1120,7 @@ function isMiniProgramByteArray(value) {
|
|
|
1111
1120
|
* @see [FileStatResult](/reference/symbols/protocol/types/FileStatResult) `file.stat` 的 wire 返回类型。
|
|
1112
1121
|
* @see [FileStat](/reference/symbols/root/interfaces/FileStat) SDK 向业务返回的元数据快照。
|
|
1113
1122
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 提供 `stat()` 的当前 session 文件代理。
|
|
1123
|
+
* @since 0.8.0
|
|
1114
1124
|
*/
|
|
1115
1125
|
function isMiniProgramFileStat(value) {
|
|
1116
1126
|
return (isRecord$3(value) &&
|
|
@@ -1171,6 +1181,7 @@ function isMiniProgramFileStat(value) {
|
|
|
1171
1181
|
* @see [DownloadProgress](/reference/symbols/root/interfaces/DownloadProgress) `onProgress` 接收的公开 SDK 进度类型。
|
|
1172
1182
|
* @see [network.download](/reference/sdk/network/download) 产生并消费该进度的下载能力。
|
|
1173
1183
|
* @see [isMiniProgramBridgeMessage](/reference/symbols/protocol/functions/isMiniProgramBridgeMessage) operation progress envelope 的最低校验。
|
|
1184
|
+
* @since 0.8.0
|
|
1174
1185
|
*/
|
|
1175
1186
|
function isMiniProgramDownloadProgressPayload(value) {
|
|
1176
1187
|
if (!isRecord$3(value) ||
|
|
@@ -1477,6 +1488,7 @@ const MANAGED_RUNTIME_PERMISSION_KEYS = new Set(MINI_PROGRAM_PERMISSION_KEYS);
|
|
|
1477
1488
|
* @see [parseMiniProgramRuntimePermissions](/reference/symbols/protocol/functions/parseMiniProgramRuntimePermissions) 完整 snapshot 的 trim、legacy 归一化与 config 校验。
|
|
1478
1489
|
* @see [MINI_PROGRAM_PROTOCOL_CAPABILITIES](/reference/symbols/protocol/constants/MINI_PROGRAM_PROTOCOL_CAPABILITIES) method 到 permission requirement 的权威映射。
|
|
1479
1490
|
* @see [权限声明](/guide/permissions) Manifest 声明、平台批准与 Runtime 状态的完整流程。
|
|
1491
|
+
* @since 0.6.4
|
|
1480
1492
|
*/
|
|
1481
1493
|
function isManagedMiniProgramRuntimePermissionKey(key) {
|
|
1482
1494
|
return MANAGED_RUNTIME_PERMISSION_KEYS.has(key);
|
|
@@ -1552,6 +1564,7 @@ function isManagedMiniProgramRuntimePermissionKey(key) {
|
|
|
1552
1564
|
* @see {@link isManagedMiniProgramRuntimePermissionKey}
|
|
1553
1565
|
* @see {@link MINI_PROGRAM_PROTOCOL_CAPABILITIES}
|
|
1554
1566
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
1567
|
+
* @since 0.6.4
|
|
1555
1568
|
*/
|
|
1556
1569
|
function parseMiniProgramRuntimePermissions(snapshot) {
|
|
1557
1570
|
if (!isRecord$2(snapshot) || snapshot.schema_version !== 1 || !Array.isArray(snapshot.entries)) {
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -5448,6 +5448,7 @@ interface MiniProgramEventPayloadMap {
|
|
|
5448
5448
|
* @see [MINI_PROGRAM_BRIDGE_NONCE_PARAM](/reference/symbols/protocol/constants/MINI_PROGRAM_BRIDGE_NONCE_PARAM) iframe URL 中的 nonce 参数名。
|
|
5449
5449
|
* @see [MINI_PROGRAM_PROTOCOL_CAPABILITIES](/reference/symbols/protocol/constants/MINI_PROGRAM_PROTOCOL_CAPABILITIES) 公开 method 与权限 requirement 目录。
|
|
5450
5450
|
* @see [parseMiniProgramRuntimePermissions](/reference/symbols/protocol/functions/parseMiniProgramRuntimePermissions) Runtime 权限快照解析器。
|
|
5451
|
+
* @since 0.3.1
|
|
5451
5452
|
*/
|
|
5452
5453
|
declare function isMiniProgramBridgeMessage(value: unknown): value is MiniProgramBridgeMessage;
|
|
5453
5454
|
/**
|
|
@@ -5503,6 +5504,7 @@ declare function isMiniProgramBridgeMessage(value: unknown): value is MiniProgra
|
|
|
5503
5504
|
* @see [PathRoot](/reference/symbols/root/interfaces/PathRoot) 提供 `file()` / `directory()` 的 SDK 路径入口。
|
|
5504
5505
|
* @see [FileSystem](/reference/symbols/root/interfaces/FileSystem) `files.sandbox` 逻辑路径能力。
|
|
5505
5506
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 已授权目录下的相对路径能力。
|
|
5507
|
+
* @since 0.8.0
|
|
5506
5508
|
*/
|
|
5507
5509
|
declare function isMiniProgramRelativePath(value: unknown): value is string;
|
|
5508
5510
|
/**
|
|
@@ -5562,6 +5564,7 @@ declare function isMiniProgramRelativePath(value: unknown): value is string;
|
|
|
5562
5564
|
* @see [PathRoot](/reference/symbols/root/interfaces/PathRoot) SDK 公开的逻辑路径 root 能力。
|
|
5563
5565
|
* @see [FilesModule](/reference/symbols/root/interfaces/FilesModule) 提供 `files.sandbox` 与目录 picker 的入口。
|
|
5564
5566
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 可作为 derived path root 的目录代理。
|
|
5567
|
+
* @since 0.8.0
|
|
5565
5568
|
*/
|
|
5566
5569
|
declare function isMiniProgramPathRootRef(value: unknown): value is MiniProgramPathRootRef;
|
|
5567
5570
|
/**
|
|
@@ -5622,6 +5625,7 @@ declare function isMiniProgramPathRootRef(value: unknown): value is MiniProgramP
|
|
|
5622
5625
|
* @see [isMiniProgramFileDescriptor](/reference/symbols/protocol/functions/isMiniProgramFileDescriptor) 包含名称和 mode 的文件 descriptor guard。
|
|
5623
5626
|
* @see [isMiniProgramDirectoryRef](/reference/symbols/protocol/functions/isMiniProgramDirectoryRef) 可用 `'.'` 指向 root 自身的目录引用 guard。
|
|
5624
5627
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 使用文件引用的公开 I/O 代理。
|
|
5628
|
+
* @since 0.8.0
|
|
5625
5629
|
*/
|
|
5626
5630
|
declare function isMiniProgramFileRef(value: unknown): value is MiniProgramFileRef;
|
|
5627
5631
|
/**
|
|
@@ -5682,6 +5686,7 @@ declare function isMiniProgramFileRef(value: unknown): value is MiniProgramFileR
|
|
|
5682
5686
|
* @see [isMiniProgramDirectoryDescriptor](/reference/symbols/protocol/functions/isMiniProgramDirectoryDescriptor) 包含名称和 mode 的目录 descriptor guard。
|
|
5683
5687
|
* @see [isMiniProgramFileRef](/reference/symbols/protocol/functions/isMiniProgramFileRef) 不接受 root 自身 `'.'` 的文件引用 guard。
|
|
5684
5688
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 使用目录引用的公开路径操作代理。
|
|
5689
|
+
* @since 0.8.0
|
|
5685
5690
|
*/
|
|
5686
5691
|
declare function isMiniProgramDirectoryRef(value: unknown): value is MiniProgramDirectoryRef;
|
|
5687
5692
|
/**
|
|
@@ -5749,6 +5754,7 @@ declare function isMiniProgramDirectoryRef(value: unknown): value is MiniProgram
|
|
|
5749
5754
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 校验后由 SDK 建立的文件代理。
|
|
5750
5755
|
* @see [PickFilesResult](/reference/symbols/protocol/types/PickFilesResult) picker 的 direct-ref 文件结果。
|
|
5751
5756
|
* @see [SaveFileResult](/reference/symbols/protocol/types/SaveFileResult) save picker 的 direct-ref 文件结果。
|
|
5757
|
+
* @since 0.8.0
|
|
5752
5758
|
*/
|
|
5753
5759
|
declare function isMiniProgramFileDescriptor(value: unknown): value is MiniProgramFileDescriptor;
|
|
5754
5760
|
/**
|
|
@@ -5812,6 +5818,7 @@ declare function isMiniProgramFileDescriptor(value: unknown): value is MiniProgr
|
|
|
5812
5818
|
* @see [FilesModule](/reference/symbols/root/interfaces/FilesModule) `files` 公开能力入口。
|
|
5813
5819
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 校验后由 SDK 建立的目录代理。
|
|
5814
5820
|
* @see [PickDirectoryResult](/reference/symbols/protocol/types/PickDirectoryResult) picker 的 direct-ref 返回契约。
|
|
5821
|
+
* @since 0.8.0
|
|
5815
5822
|
*/
|
|
5816
5823
|
declare function isMiniProgramDirectoryDescriptor(value: unknown): value is MiniProgramDirectoryDescriptor;
|
|
5817
5824
|
/**
|
|
@@ -5870,6 +5877,7 @@ declare function isMiniProgramDirectoryDescriptor(value: unknown): value is Mini
|
|
|
5870
5877
|
* @see [FileSystemEntity](/reference/symbols/root/types/FileSystemEntity) SDK 公开的 FileHandle/DirectoryHandle 联合。
|
|
5871
5878
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 文件 descriptor 对应的能力代理。
|
|
5872
5879
|
* @see [DirectoryHandle](/reference/symbols/root/interfaces/DirectoryHandle) 目录 descriptor 对应的能力代理及 `list()` 入口。
|
|
5880
|
+
* @since 0.8.0
|
|
5873
5881
|
*/
|
|
5874
5882
|
declare function isMiniProgramFileSystemEntityDescriptor(value: unknown): value is MiniProgramFileSystemEntityDescriptor;
|
|
5875
5883
|
/**
|
|
@@ -5923,6 +5931,7 @@ declare function isMiniProgramFileSystemEntityDescriptor(value: unknown): value
|
|
|
5923
5931
|
* @see [CompanionStdio](/reference/symbols/root/interfaces/CompanionStdio) Companion 原始字节 stdin/stdout/stderr。
|
|
5924
5932
|
* @see [isMiniProgramFileDescriptor](/reference/symbols/protocol/functions/isMiniProgramFileDescriptor) 文件 descriptor guard。
|
|
5925
5933
|
* @see [isMiniProgramDirectoryDescriptor](/reference/symbols/protocol/functions/isMiniProgramDirectoryDescriptor) 目录 descriptor guard。
|
|
5934
|
+
* @since 0.8.0
|
|
5926
5935
|
*/
|
|
5927
5936
|
declare function isMiniProgramByteArray(value: unknown): value is Uint8Array;
|
|
5928
5937
|
/**
|
|
@@ -5980,6 +5989,7 @@ declare function isMiniProgramByteArray(value: unknown): value is Uint8Array;
|
|
|
5980
5989
|
* @see [FileStatResult](/reference/symbols/protocol/types/FileStatResult) `file.stat` 的 wire 返回类型。
|
|
5981
5990
|
* @see [FileStat](/reference/symbols/root/interfaces/FileStat) SDK 向业务返回的元数据快照。
|
|
5982
5991
|
* @see [FileHandle](/reference/symbols/root/interfaces/FileHandle) 提供 `stat()` 的当前 session 文件代理。
|
|
5992
|
+
* @since 0.8.0
|
|
5983
5993
|
*/
|
|
5984
5994
|
declare function isMiniProgramFileStat(value: unknown): value is MiniProgramFileStat;
|
|
5985
5995
|
/**
|
|
@@ -6033,6 +6043,7 @@ declare function isMiniProgramFileStat(value: unknown): value is MiniProgramFile
|
|
|
6033
6043
|
* @see [DownloadProgress](/reference/symbols/root/interfaces/DownloadProgress) `onProgress` 接收的公开 SDK 进度类型。
|
|
6034
6044
|
* @see [network.download](/reference/sdk/network/download) 产生并消费该进度的下载能力。
|
|
6035
6045
|
* @see [isMiniProgramBridgeMessage](/reference/symbols/protocol/functions/isMiniProgramBridgeMessage) operation progress envelope 的最低校验。
|
|
6046
|
+
* @since 0.8.0
|
|
6036
6047
|
*/
|
|
6037
6048
|
declare function isMiniProgramDownloadProgressPayload(value: unknown): value is DownloadProgressPayload;
|
|
6038
6049
|
declare function isMiniProgramCompanionPrepareProgress(value: unknown): value is CompanionPrepareProgress;
|
|
@@ -6091,6 +6102,7 @@ declare function isMiniProgramOperationProgressPayload(value: unknown): value is
|
|
|
6091
6102
|
* @see [parseMiniProgramRuntimePermissions](/reference/symbols/protocol/functions/parseMiniProgramRuntimePermissions) 完整 snapshot 的 trim、legacy 归一化与 config 校验。
|
|
6092
6103
|
* @see [MINI_PROGRAM_PROTOCOL_CAPABILITIES](/reference/symbols/protocol/constants/MINI_PROGRAM_PROTOCOL_CAPABILITIES) method 到 permission requirement 的权威映射。
|
|
6093
6104
|
* @see [权限声明](/guide/permissions) Manifest 声明、平台批准与 Runtime 状态的完整流程。
|
|
6105
|
+
* @since 0.6.4
|
|
6094
6106
|
*/
|
|
6095
6107
|
declare function isManagedMiniProgramRuntimePermissionKey(key: string): key is MiniProgramPermissionKey;
|
|
6096
6108
|
type MiniProgramRuntimePermissionStatus = 'enabled' | 'disabled';
|
|
@@ -6195,6 +6207,7 @@ interface ParsedMiniProgramRuntimePermissions {
|
|
|
6195
6207
|
* @see {@link isManagedMiniProgramRuntimePermissionKey}
|
|
6196
6208
|
* @see {@link MINI_PROGRAM_PROTOCOL_CAPABILITIES}
|
|
6197
6209
|
* @see {@link https://docs.xiaoheihe.cn/hb_sdk/guide/permissions | 权限声明}
|
|
6210
|
+
* @since 0.6.4
|
|
6198
6211
|
*/
|
|
6199
6212
|
declare function parseMiniProgramRuntimePermissions(snapshot: unknown): ParsedMiniProgramRuntimePermissions;
|
|
6200
6213
|
|