From ae3ab5751eb3356483259a9b6702ef4c5e2f4213 Mon Sep 17 00:00:00 2001 From: zuojiangjiang Date: Sat, 26 Mar 2022 18:23:48 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20b9e81af=20from=20https://gitee.com/zuo-?= =?UTF-8?q?jiangjiang/interface=5Fsdk-js/pulls/1441=20permission=E6=8E=92?= =?UTF-8?q?=E6=9F=A5=E4=BF=AE=E6=94=B9=20Signed-off-by:=20zuojiangjiang=20?= =?UTF-8?q??= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.data.distributedData.d.ts | 74 ++--------------------------- 1 file changed, 4 insertions(+), 70 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 63e30013e2..d34bb2d687 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -19,7 +19,6 @@ import { AsyncCallback, Callback } from './basic'; * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ declare namespace distributedData { @@ -29,7 +28,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ interface KVManagerConfig { /** @@ -37,7 +35,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ userInfo: UserInfo; @@ -46,7 +43,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ bundleName: string; } @@ -60,7 +56,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ interface UserInfo { /** @@ -68,7 +63,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ userId?: string; @@ -77,7 +71,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ userType?: UserType; } @@ -88,7 +81,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ enum UserType { /** @@ -96,7 +88,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ SAME_USER_ID = 0 } @@ -106,7 +97,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ namespace Constants { /** @@ -114,7 +104,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ const MAX_KEY_LENGTH = 1024; @@ -123,7 +112,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ const MAX_VALUE_LENGTH = 4194303; @@ -132,7 +120,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ const MAX_KEY_LENGTH_DEVICE = 896; @@ -141,7 +128,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ const MAX_STORE_ID_LENGTH = 128; @@ -150,7 +136,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ const MAX_QUERY_LENGTH = 512000; @@ -159,7 +144,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ const MAX_BATCH_SIZE = 128; } @@ -172,7 +156,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ enum ValueType { /** @@ -180,7 +163,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ STRING = 0, @@ -189,7 +171,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ INTEGER = 1, @@ -198,7 +179,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ FLOAT = 2, @@ -207,7 +187,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A * */ BYTE_ARRAY = 3, @@ -216,7 +195,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A * */ BOOLEAN = 4, @@ -225,7 +203,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ DOUBLE = 5 } @@ -236,7 +213,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ interface Value { /** @@ -244,7 +220,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A * @see ValueType * @type {number} * @memberof Value @@ -255,7 +230,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ value: Uint8Array | string | number | boolean; } @@ -266,7 +240,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ interface Entry { /** @@ -274,7 +247,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ key: string; /** @@ -282,7 +254,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ value: Value; } @@ -296,7 +267,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ interface ChangeNotification { /** @@ -304,7 +274,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ insertEntries: Entry[]; /** @@ -312,7 +281,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ updateEntries: Entry[]; /** @@ -320,7 +288,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ deleteEntries: Entry[]; /** @@ -328,7 +295,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ deviceId: string; } @@ -339,7 +305,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ enum SyncMode { /** @@ -347,7 +312,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ PULL_ONLY = 0, /** @@ -355,7 +319,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ PUSH_ONLY = 1, /** @@ -363,7 +326,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ PUSH_PULL = 2 } @@ -374,7 +336,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ enum SubscribeType { /** @@ -382,7 +343,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ SUBSCRIBE_TYPE_LOCAL = 0, @@ -391,7 +351,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ SUBSCRIBE_TYPE_REMOTE = 1, @@ -400,7 +359,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ SUBSCRIBE_TYPE_ALL = 2, } @@ -411,7 +369,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ enum KVStoreType { /** @@ -419,7 +376,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ DEVICE_COLLABORATION = 0, @@ -428,7 +384,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ SINGLE_VERSION = 1, @@ -437,7 +392,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ MULTI_VERSION = 2, } @@ -448,7 +402,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ enum SecurityLevel { /** @@ -457,7 +410,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ NO_LEVEL = 0, @@ -468,7 +420,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ S0 = 1, @@ -479,7 +430,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ S1 = 2, @@ -490,7 +440,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ S2 = 3, @@ -501,7 +450,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ S3 = 5, @@ -512,7 +460,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ S4 = 6, } @@ -526,7 +473,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ interface Options { /** @@ -534,7 +480,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ createIfMissing?: boolean; /** @@ -542,7 +487,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ encrypt?: boolean; /** @@ -550,15 +494,14 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ backup?: boolean; /** * Indicates setting whether database files are automatically synchronized * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @import N/A - * @permission N/A */ autoSync?: boolean; /** @@ -566,7 +509,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ kvStoreType?: KVStoreType; /** @@ -574,7 +516,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ securityLevel?: SecurityLevel; /** @@ -582,7 +523,6 @@ declare namespace distributedData { * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ schema?: Schema; } @@ -595,7 +535,6 @@ declare namespace distributedData { * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ class Schema { /** @@ -652,7 +591,6 @@ declare namespace distributedData { * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ class FieldNode { /** @@ -711,7 +649,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ interface KvStoreResultSet { /** @@ -851,7 +788,6 @@ declare namespace distributedData { * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A */ class Query { /** @@ -1175,7 +1111,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A * @version 1 */ interface KVStore { @@ -1354,7 +1289,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A * @version 1 */ interface SingleKVStore extends KVStore { @@ -1475,7 +1409,8 @@ declare namespace distributedData { * @param deviceIdList Indicates the list of devices to which to synchronize the database. * @param mode Indicates the synchronization mode. The value can be {@code PUSH}, {@code PULL}, or {@code PUSH_PULL}. * @param allowedDelayMs Indicates the delay allowed for the synchronization, in milliseconds. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors + * @permission ohos.permission.DISTRIBUTED_DATASYNC * occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. */ @@ -1541,7 +1476,6 @@ declare namespace distributedData { * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @import N/A - * @permission N/A */ interface DeviceKVStore extends KVStore { /** @@ -1714,6 +1648,7 @@ declare namespace distributedData { * {@code DeviceKVStore} databases are to be synchronized. * @param mode Indicates the synchronization mode, {@code PUSH}, {@code PULL}, or * {@code PUSH_PULL}. + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @throws Throws this exception if no DeviceKVStore database is available. */ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void; @@ -1763,7 +1698,6 @@ declare namespace distributedData { * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @import N/A - * @permission N/A * @version 1 */ interface KVManager { -- Gitee