1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15const distributedDataSo = requireInternal('data.distributedData');
16
17export default {
18  createKVManager: distributedDataSo.createKVManager,
19  Query: distributedDataSo.Query,
20  FieldNode: distributedDataSo.FieldNode,
21  Schema: distributedDataSo.Schema,
22  UserType: {
23    SAME_USER_ID: 0,
24  },
25  Constants: {
26    MAX_KEY_LENGTH: 1024,
27    MAX_VALUE_LENGTH: 4194303,
28    MAX_KEY_LENGTH_DEVICE: 896,
29    MAX_STORE_ID_LENGTH: 128,
30    MAX_QUERY_LENGTH: 512000,
31    MAX_BATCH_SIZE: 128,
32  },
33  ValueType: {
34    STRING: 0,
35    INTEGER: 1,
36    FLOAT: 2,
37    BYTE_ARRAY: 3,
38    BOOLEAN: 4,
39    DOUBLE: 5,
40  },
41  SyncMode: {
42    PULL_ONLY: 0,
43    PUSH_ONLY: 1,
44    PUSH_PULL: 2,
45  },
46  SubscribeType: {
47    SUBSCRIBE_TYPE_LOCAL: 0,
48    SUBSCRIBE_TYPE_REMOTE: 1,
49    SUBSCRIBE_TYPE_ALL: 2,
50  },
51  KVStoreType: {
52    DEVICE_COLLABORATION: 0,
53    SINGLE_VERSION: 1,
54    MULTI_VERSION: 2,
55  },
56  SecurityLevel: {
57    NO_LEVEL: 0,
58    S0: 1,
59    S1: 2,
60    S2: 3,
61    S3: 5,
62    S4: 6,
63  },
64};