@ultipa-graph/ultipa-driver 5.1.5-s5.2 → 6.0.0

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.
Files changed (260) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/dist/client.d.ts +194 -0
  4. package/dist/client.js +390 -0
  5. package/dist/config.d.ts +65 -0
  6. package/dist/config.js +135 -0
  7. package/dist/connection.d.ts +30 -0
  8. package/dist/connection.js +190 -0
  9. package/dist/errors.d.ts +99 -0
  10. package/dist/errors.js +237 -0
  11. package/dist/index.d.ts +14 -5
  12. package/dist/index.js +88 -39
  13. package/dist/printers.d.ts +33 -0
  14. package/dist/printers.js +312 -0
  15. package/dist/proto/gqldb.proto +632 -0
  16. package/dist/response.d.ts +256 -0
  17. package/dist/response.js +723 -0
  18. package/dist/services/admin-service.d.ts +40 -0
  19. package/dist/services/admin-service.js +115 -0
  20. package/dist/services/bulk-import-service.d.ts +35 -0
  21. package/dist/services/bulk-import-service.js +108 -0
  22. package/dist/services/converters.d.ts +57 -0
  23. package/dist/services/converters.js +254 -0
  24. package/dist/services/data-service.d.ts +44 -0
  25. package/dist/services/data-service.js +206 -0
  26. package/dist/services/graph-service.d.ts +32 -0
  27. package/dist/services/graph-service.js +127 -0
  28. package/dist/services/health-service.d.ts +50 -0
  29. package/dist/services/health-service.js +78 -0
  30. package/dist/services/index.d.ts +13 -0
  31. package/dist/services/index.js +30 -0
  32. package/dist/services/query-service.d.ts +39 -0
  33. package/dist/services/query-service.js +112 -0
  34. package/dist/services/service-context.d.ts +39 -0
  35. package/dist/services/service-context.js +73 -0
  36. package/dist/services/session-service.d.ts +24 -0
  37. package/dist/services/session-service.js +66 -0
  38. package/dist/services/transaction-service.d.ts +33 -0
  39. package/dist/services/transaction-service.js +100 -0
  40. package/dist/services.d.ts +28 -0
  41. package/dist/services.js +122 -0
  42. package/dist/session.d.ts +45 -0
  43. package/dist/session.js +75 -0
  44. package/dist/transaction.d.ts +42 -0
  45. package/dist/transaction.js +89 -0
  46. package/dist/types/bulk_import.d.ts +53 -0
  47. package/dist/types/bulk_import.js +6 -0
  48. package/dist/types/data_types.d.ts +116 -0
  49. package/dist/types/data_types.js +122 -0
  50. package/dist/types/enums.d.ts +59 -0
  51. package/dist/types/enums.js +67 -0
  52. package/dist/types/graph_models.d.ts +54 -0
  53. package/dist/types/graph_models.js +6 -0
  54. package/dist/types/index.d.ts +11 -5
  55. package/dist/types/index.js +36 -37
  56. package/dist/types/metadata.d.ts +60 -0
  57. package/dist/types/metadata.js +6 -0
  58. package/dist/types/schema.d.ts +31 -0
  59. package/dist/types/schema.js +6 -0
  60. package/dist/types/typed_value.d.ts +25 -0
  61. package/dist/types/typed_value.js +1176 -0
  62. package/dist/types/wrappers.d.ts +23 -0
  63. package/dist/types/wrappers.js +39 -0
  64. package/dist/types.d.ts +7 -0
  65. package/dist/types.js +24 -0
  66. package/package.json +49 -62
  67. package/dist/connection/connection.final.d.ts +0 -14
  68. package/dist/connection/connection.final.js +0 -94
  69. package/dist/connection/connection.final.js.map +0 -1
  70. package/dist/connection/connection.pool.d.ts +0 -21
  71. package/dist/connection/connection.pool.js +0 -103
  72. package/dist/connection/connection.pool.js.map +0 -1
  73. package/dist/connection/extra/algos/algo.extra.d.ts +0 -34
  74. package/dist/connection/extra/algos/algo.extra.js +0 -69
  75. package/dist/connection/extra/algos/algo.extra.js.map +0 -1
  76. package/dist/connection/extra/algos/algo.utils.d.ts +0 -3
  77. package/dist/connection/extra/algos/algo.utils.js +0 -54
  78. package/dist/connection/extra/algos/algo.utils.js.map +0 -1
  79. package/dist/connection/extra/algos/community.d.ts +0 -27
  80. package/dist/connection/extra/algos/community.js +0 -76
  81. package/dist/connection/extra/algos/community.js.map +0 -1
  82. package/dist/connection/extra/algos/degrees.d.ts +0 -10
  83. package/dist/connection/extra/algos/degrees.js +0 -24
  84. package/dist/connection/extra/algos/degrees.js.map +0 -1
  85. package/dist/connection/extra/algos/embedding.d.ts +0 -13
  86. package/dist/connection/extra/algos/embedding.js +0 -33
  87. package/dist/connection/extra/algos/embedding.js.map +0 -1
  88. package/dist/connection/extra/algos/index.d.ts +0 -5
  89. package/dist/connection/extra/algos/index.js +0 -14
  90. package/dist/connection/extra/algos/index.js.map +0 -1
  91. package/dist/connection/extra/base.extra.d.ts +0 -18
  92. package/dist/connection/extra/base.extra.js +0 -111
  93. package/dist/connection/extra/base.extra.js.map +0 -1
  94. package/dist/connection/extra/batch.insert.extra.d.ts +0 -58
  95. package/dist/connection/extra/batch.insert.extra.js +0 -354
  96. package/dist/connection/extra/batch.insert.extra.js.map +0 -1
  97. package/dist/connection/extra/connection.base.d.ts +0 -112
  98. package/dist/connection/extra/connection.base.js +0 -530
  99. package/dist/connection/extra/connection.base.js.map +0 -1
  100. package/dist/connection/extra/connection.d.ts +0 -17
  101. package/dist/connection/extra/connection.js +0 -44
  102. package/dist/connection/extra/connection.js.map +0 -1
  103. package/dist/connection/extra/graph.extra.d.ts +0 -54
  104. package/dist/connection/extra/graph.extra.js +0 -151
  105. package/dist/connection/extra/graph.extra.js.map +0 -1
  106. package/dist/connection/extra/hdc.extra.d.ts +0 -89
  107. package/dist/connection/extra/hdc.extra.js +0 -322
  108. package/dist/connection/extra/hdc.extra.js.map +0 -1
  109. package/dist/connection/extra/index.extra.d.ts +0 -102
  110. package/dist/connection/extra/index.extra.js +0 -210
  111. package/dist/connection/extra/index.extra.js.map +0 -1
  112. package/dist/connection/extra/job.extra.d.ts +0 -32
  113. package/dist/connection/extra/job.extra.js +0 -122
  114. package/dist/connection/extra/job.extra.js.map +0 -1
  115. package/dist/connection/extra/meta.extra.d.ts +0 -36
  116. package/dist/connection/extra/meta.extra.js +0 -123
  117. package/dist/connection/extra/meta.extra.js.map +0 -1
  118. package/dist/connection/extra/policy.extra.d.ts +0 -32
  119. package/dist/connection/extra/policy.extra.js +0 -114
  120. package/dist/connection/extra/policy.extra.js.map +0 -1
  121. package/dist/connection/extra/privilege.extra.d.ts +0 -8
  122. package/dist/connection/extra/privilege.extra.js +0 -20
  123. package/dist/connection/extra/privilege.extra.js.map +0 -1
  124. package/dist/connection/extra/property.extra.d.ts +0 -66
  125. package/dist/connection/extra/property.extra.js +0 -190
  126. package/dist/connection/extra/property.extra.js.map +0 -1
  127. package/dist/connection/extra/schema.extra.d.ts +0 -108
  128. package/dist/connection/extra/schema.extra.js +0 -253
  129. package/dist/connection/extra/schema.extra.js.map +0 -1
  130. package/dist/connection/extra/search.extra.d.ts +0 -12
  131. package/dist/connection/extra/search.extra.js +0 -117
  132. package/dist/connection/extra/search.extra.js.map +0 -1
  133. package/dist/connection/extra/task.extra.d.ts +0 -24
  134. package/dist/connection/extra/task.extra.js +0 -107
  135. package/dist/connection/extra/task.extra.js.map +0 -1
  136. package/dist/connection/extra/user.extra.d.ts +0 -28
  137. package/dist/connection/extra/user.extra.js +0 -91
  138. package/dist/connection/extra/user.extra.js.map +0 -1
  139. package/dist/connection/extra/user.privilege.extra.d.ts +0 -64
  140. package/dist/connection/extra/user.privilege.extra.js +0 -273
  141. package/dist/connection/extra/user.privilege.extra.js.map +0 -1
  142. package/dist/connection/index.d.ts +0 -5
  143. package/dist/connection/index.js +0 -13
  144. package/dist/connection/index.js.map +0 -1
  145. package/dist/connection/network.manager.d.ts +0 -28
  146. package/dist/connection/network.manager.js +0 -179
  147. package/dist/connection/network.manager.js.map +0 -1
  148. package/dist/index.js.map +0 -1
  149. package/dist/printers/alias.d.ts +0 -2
  150. package/dist/printers/alias.js +0 -39
  151. package/dist/printers/alias.js.map +0 -1
  152. package/dist/printers/any.d.ts +0 -2
  153. package/dist/printers/any.js +0 -63
  154. package/dist/printers/any.js.map +0 -1
  155. package/dist/printers/array.aio.d.ts +0 -3
  156. package/dist/printers/array.aio.js +0 -259
  157. package/dist/printers/array.aio.js.map +0 -1
  158. package/dist/printers/common.d.ts +0 -0
  159. package/dist/printers/common.js +0 -1
  160. package/dist/printers/common.js.map +0 -1
  161. package/dist/printers/edge.d.ts +0 -5
  162. package/dist/printers/edge.js +0 -78
  163. package/dist/printers/edge.js.map +0 -1
  164. package/dist/printers/explain.plan.d.ts +0 -2
  165. package/dist/printers/explain.plan.js +0 -46
  166. package/dist/printers/explain.plan.js.map +0 -1
  167. package/dist/printers/index.d.ts +0 -24
  168. package/dist/printers/index.js +0 -43
  169. package/dist/printers/index.js.map +0 -1
  170. package/dist/printers/node.d.ts +0 -5
  171. package/dist/printers/node.js +0 -77
  172. package/dist/printers/node.js.map +0 -1
  173. package/dist/printers/path.d.ts +0 -3
  174. package/dist/printers/path.js +0 -62
  175. package/dist/printers/path.js.map +0 -1
  176. package/dist/printers/status.d.ts +0 -3
  177. package/dist/printers/status.js +0 -68
  178. package/dist/printers/status.js.map +0 -1
  179. package/dist/printers/table.d.ts +0 -2
  180. package/dist/printers/table.js +0 -56
  181. package/dist/printers/table.js.map +0 -1
  182. package/dist/proto/tmp.js +0 -366
  183. package/dist/proto/ultipa_grpc_pb.d.ts +0 -258
  184. package/dist/proto/ultipa_grpc_pb.js +0 -366
  185. package/dist/proto/ultipa_grpc_pb.js.map +0 -1
  186. package/dist/proto/ultipa_pb.d.ts +0 -1
  187. package/dist/proto/ultipa_pb.js +0 -12119
  188. package/dist/proto/ultipa_pb.js.map +0 -1
  189. package/dist/types/index.js.map +0 -1
  190. package/dist/types/types.algos.params.d.ts +0 -545
  191. package/dist/types/types.algos.params.js +0 -16
  192. package/dist/types/types.algos.params.js.map +0 -1
  193. package/dist/types/types.d.ts +0 -1214
  194. package/dist/types/types.extra.d.ts +0 -146
  195. package/dist/types/types.extra.js +0 -27
  196. package/dist/types/types.extra.js.map +0 -1
  197. package/dist/types/types.js +0 -1606
  198. package/dist/types/types.js.map +0 -1
  199. package/dist/types/util.d.ts +0 -15
  200. package/dist/types/util.js +0 -136
  201. package/dist/types/util.js.map +0 -1
  202. package/dist/utils/common.d.ts +0 -3
  203. package/dist/utils/common.js +0 -22
  204. package/dist/utils/common.js.map +0 -1
  205. package/dist/utils/config.d.ts +0 -3
  206. package/dist/utils/config.js +0 -7
  207. package/dist/utils/config.js.map +0 -1
  208. package/dist/utils/format.d.ts +0 -45
  209. package/dist/utils/format.js +0 -879
  210. package/dist/utils/format.js.map +0 -1
  211. package/dist/utils/index.d.ts +0 -10
  212. package/dist/utils/index.js +0 -30
  213. package/dist/utils/index.js.map +0 -1
  214. package/dist/utils/params.validate.d.ts +0 -4
  215. package/dist/utils/params.validate.js +0 -14
  216. package/dist/utils/params.validate.js.map +0 -1
  217. package/dist/utils/property.d.ts +0 -24
  218. package/dist/utils/property.js +0 -203
  219. package/dist/utils/property.js.map +0 -1
  220. package/dist/utils/raft.retry.d.ts +0 -0
  221. package/dist/utils/raft.retry.js +0 -1
  222. package/dist/utils/raft.retry.js.map +0 -1
  223. package/dist/utils/serialize/commont.d.ts +0 -12
  224. package/dist/utils/serialize/commont.js +0 -46
  225. package/dist/utils/serialize/commont.js.map +0 -1
  226. package/dist/utils/serialize/deserialize.d.ts +0 -10
  227. package/dist/utils/serialize/deserialize.js +0 -288
  228. package/dist/utils/serialize/deserialize.js.map +0 -1
  229. package/dist/utils/serialize/null.d.ts +0 -32
  230. package/dist/utils/serialize/null.js +0 -178
  231. package/dist/utils/serialize/null.js.map +0 -1
  232. package/dist/utils/serialize/serialize.d.ts +0 -10
  233. package/dist/utils/serialize/serialize.js +0 -146
  234. package/dist/utils/serialize/serialize.js.map +0 -1
  235. package/dist/utils/stream.helper.d.ts +0 -10
  236. package/dist/utils/stream.helper.js +0 -71
  237. package/dist/utils/stream.helper.js.map +0 -1
  238. package/dist/utils/time.record.d.ts +0 -15
  239. package/dist/utils/time.record.js +0 -52
  240. package/dist/utils/time.record.js.map +0 -1
  241. package/dist/utils/timezone.d.ts +0 -7
  242. package/dist/utils/timezone.js +0 -21
  243. package/dist/utils/timezone.js.map +0 -1
  244. package/dist/utils/ultipa.datetime.d.ts +0 -14
  245. package/dist/utils/ultipa.datetime.js +0 -160
  246. package/dist/utils/ultipa.datetime.js.map +0 -1
  247. package/dist/utils/uql-maker.d.ts +0 -165
  248. package/dist/utils/uql-maker.js +0 -402
  249. package/dist/utils/uql-maker.js.map +0 -1
  250. package/dist/utils/uql.parse.d.ts +0 -27
  251. package/dist/utils/uql.parse.js +0 -205
  252. package/dist/utils/uql.parse.js.map +0 -1
  253. package/readme.md +0 -65
  254. package/src/proto/build.sh +0 -41
  255. package/src/proto/build_windows.sh +0 -40
  256. package/src/proto/ultipa.proto +0 -531
  257. package/src/proto/ultipa_grpc_pb.d.ts +0 -92
  258. package/src/proto/ultipa_grpc_pb.js +0 -414
  259. package/src/proto/ultipa_pb.d.ts +0 -1983
  260. package/src/proto/ultipa_pb.js +0 -14852
@@ -1,1214 +0,0 @@
1
- /**
2
- * Ultipa Configuration is the basic configuration that used for establishing the connections.
3
- */
4
- export declare class UltipaConfig {
5
- /**
6
- * List of host addresses (IPs or URLs)
7
- * - Supports IPv4 and IPv6 addresses
8
- * - Supports URLs (if prefixed with https://, uses secure connection)
9
- * - Required
10
- */
11
- hosts: string[];
12
- /** Username for authentication (Required) */
13
- username: string;
14
- /** Password for authentication (Required) */
15
- password: string;
16
- /** Default graph to interact with (Optional) */
17
- defaultGraph?: string;
18
- /** Path string to CRT file, used for SSL connections. */
19
- crt?: string;
20
- /**
21
- * Password encryption method
22
- * @default "MD5"
23
- */
24
- passwordEncrypt?: "MD5" | "LDAP" | "NOTHING";
25
- /**
26
- * Request timeout in seconds
27
- * @default 2147483647
28
- */
29
- timeout?: number;
30
- /**
31
- * Heartbeat interval in milliseconds
32
- * Set to 0 to disable heartbeat
33
- * Used for keeping connection alive
34
- * @default 0
35
- */
36
- heartbeat?: number;
37
- /**
38
- * Maximum receive size in megabytes
39
- * @default 32
40
- */
41
- maxRecvSize?: number;
42
- }
43
- /**
44
- * Configuration for each request, can be null
45
- */
46
- export declare class RequestConfig {
47
- /**
48
- * specify graphName, if null will use defaultGraph of UltipaConfiguration
49
- */
50
- graph?: string;
51
- /**
52
- * Operation timeout in seconds
53
- */
54
- timeout?: number;
55
- /**
56
- * Specify the host to execute the request
57
- * */
58
- host?: string;
59
- /**
60
- * request,thread num
61
- */
62
- thread?: number;
63
- /**
64
- * name of time zone,
65
- * default: current time zone.
66
- * e.g. Aisa/Shanghai
67
- */
68
- timezone?: string;
69
- /**
70
- * hour elapse from UTC
71
- * When both `timezone` and `timezoneOffset` are provided, `timezoneOffset` takes precedence.
72
- * Unit: hour. Example:” +08:30”,”-05:00”,“+2”,“-0300”
73
- */
74
- timezoneOffset?: string;
75
- /**
76
- * If true the queryText will be logged.
77
- */
78
- logQueryText?: boolean;
79
- /**
80
- * If true the request info will be logged.
81
- */
82
- withRequestInfo?: boolean;
83
- }
84
- /**
85
- * configuration for insert request. extends RequestConfig,have all RequestConfig property
86
- */
87
- export declare class InsertRequestConfig extends RequestConfig {
88
- /**
89
- * NORMAL,
90
- * OVERWRITE,
91
- * UPSERT
92
- */
93
- insertType: InsertType;
94
- /**
95
- * Return data or not when insert/delete batch. true - not return data, false - return data.
96
- */
97
- silent: boolean;
98
- }
99
- /**
100
- * The insert error code from server.
101
- */
102
- export declare enum InsertErrorCode {
103
- ID_NOT_MATCH_UUID = 10001,
104
- ID_UUID_NOT_MATCH_SCHEMA = 10002,
105
- FROM_ID_NOT_EXISTED = 10003,
106
- TO_ID_NOT_EXISTED = 10004,
107
- ID_LEN = 10005,
108
- NOT_NULL = 10006,
109
- UNIQUCHECK = 10007,
110
- ID_EMPTY = 10008,
111
- FROM_ID_EMPTY = 10009,
112
- TO_ID_EMPTY = 10010,
113
- DUPLICATE_ID = 10011,
114
- KEY_CONSTRAINT_VIOLATED = 10012,
115
- INVALID_FORMAT = 10013,
116
- OK_BUT_ID_EXISTED = 11001,
117
- OTHERS = 19999
118
- }
119
- export declare const InsertErrorMessages: {
120
- 10001: string;
121
- 10002: string;
122
- 10003: string;
123
- 10004: string;
124
- 10005: string;
125
- 10006: string;
126
- 10007: string;
127
- 10008: string;
128
- 10009: string;
129
- 10010: string;
130
- 10011: string;
131
- 10012: string;
132
- 10013: string;
133
- 11001: string;
134
- 19999: string;
135
- };
136
- export declare function getInsertErrorMessage(errorCode: InsertErrorCode | number): string;
137
- /**
138
- * TODO: delete Timezone
139
- */
140
- export interface Timezone {
141
- timezone?: string;
142
- timezoneOffset?: string;
143
- timestampToString?: boolean;
144
- }
145
- /**
146
- * The schema property type.When create property.Need set property type.
147
- */
148
- export declare enum UltipaPropertyType {
149
- /**
150
- * Ultipa schema id type
151
- */
152
- ID = -1,
153
- /**
154
- * Ultipa schema uuid type
155
- */
156
- UUID = -2,
157
- /**
158
- * Ultipa edge schema from_id type
159
- */
160
- FROM = -3,
161
- /**
162
- * Ultipa edge schema to_id type
163
- */
164
- TO = -4,
165
- /**
166
- * Ultipa edge schema from_uuid type
167
- */
168
- FROM_UUID = -5,
169
- /**
170
- * Ultipa edge schema to_uuid type
171
- */
172
- TO_UUID = -6,
173
- /**
174
- * Ignore
175
- */
176
- IGNORE = -7,
177
- /**
178
- * No type set
179
- */
180
- UNSET = 0,
181
- /**
182
- * Signed 32 integer
183
- */
184
- INT32 = 1,
185
- /**
186
- * Unsigned 32 integer
187
- */
188
- UINT32 = 2,
189
- /**
190
- * Signed 64 integer
191
- */
192
- INT64 = 3,
193
- /**
194
- * Unsigned 64 integer
195
- */
196
- UINT64 = 4,
197
- /**
198
- * Single floating-point number
199
- */
200
- FLOAT = 5,
201
- /**
202
- * Double-precision floating-point numbers
203
- */
204
- DOUBLE = 6,
205
- /**
206
- * A data type that represents a sequence of characters
207
- */
208
- STRING = 7,
209
- /**
210
- * Represents a combination of a date and a time
211
- */
212
- DATETIME = 8,
213
- /**
214
- * A data type that typically represents a specific point in time, often with a high level of precision
215
- */
216
- TIMESTAMP = 9,
217
- /**
218
- * Used to store large amounts of text data
219
- */
220
- TEXT = 10,
221
- /**
222
- * Stands for Binary Large Object
223
- */
224
- BLOB = 11,
225
- /**
226
- * In the context of databases dealing with spatial data (e.g., in GIS systems)
227
- */
228
- POINT = 12,
229
- /**
230
- * Represents a fixed-point number with a specified precision and scale
231
- */
232
- DECIMAL = 13,
233
- /**
234
- * A data structure that can hold a collection of elements
235
- */
236
- LIST = 14,
237
- /**
238
- * A data structure that stores a collection of unique elements
239
- */
240
- SET = 15,
241
- /**
242
- * A data structure that stores key-value pairs
243
- */
244
- MAP = 16,
245
- /**
246
- * Null type
247
- */
248
- NULL = 17,
249
- /**
250
- * Stands for Boolean
251
- */
252
- BOOL = 18,
253
- LOCAL_DATETIME = 19,
254
- ZONED_DATETIME = 20,
255
- DATE = 21,
256
- ZONED_TIME = 22,
257
- LOCAL_TIME = 23,
258
- YEAR_TO_MONTH = 24,
259
- DAY_TO_SECOND = 25,
260
- JSON = 26
261
- }
262
- /**
263
- * The insertion mode.
264
- */
265
- export declare enum InsertType {
266
- /**
267
- * Insert new data
268
- */
269
- NORMAL = 0,
270
- /**
271
- * The insert overwrite operation first clears the existing data in the target location and then inserts new data
272
- */
273
- OVERWRITE = 1,
274
- /**
275
- * If the data record to be inserted already exists in the target location the record will be updated; if it does not exist, a new record will be inserted
276
- */
277
- UPSERT = 2
278
- }
279
- /**
280
- * Algorithm Detail Response Data
281
- */
282
- export declare class Algo {
283
- /**
284
- * name
285
- */
286
- name?: string;
287
- /**
288
- * type
289
- */
290
- type?: string;
291
- /**
292
- * write support type
293
- */
294
- writeSupportType?: string;
295
- /**
296
- * Whether the algorithm can be rolled back to previous version.
297
- */
298
- canRollback?: string;
299
- /**
300
- * config context
301
- */
302
- configContext?: string;
303
- /**
304
- * version
305
- */
306
- version?: string;
307
- /**
308
- * algo params
309
- */
310
- params?: AlgoParam[];
311
- /**
312
- * algo description
313
- */
314
- description?: string;
315
- }
316
- export interface AlgoParam {
317
- name: string;
318
- desc?: string;
319
- }
320
- /**
321
- * TODO delete Code
322
- */
323
- export declare enum ErrorCode {
324
- SUCCESS,
325
- FAILED,
326
- PARAM_ERROR,
327
- BASE_DB_ERROR,
328
- ENGINE_ERROR,
329
- SYSTEM_ERROR,
330
- SYNTAX_ERROR,
331
- PERMISSION_DENIED,
332
- DUPLICATE_ID,
333
- RAFT_REDIRECT,
334
- RAFT_LEADER_NOT_YET_ELECTED,
335
- RAFT_LOG_ERROR,
336
- NOT_RAFT_MODE,
337
- RAFT_NO_AVAILABLE_FOLLOWERS,
338
- RAFT_NO_AVAILABLE_ALGO_SERVERS,
339
- UNKNOWN_ERROR = 1000
340
- }
341
- export declare enum ResultType {
342
- RESULT_TYPE_UNSET,
343
- RESULT_TYPE_PATH,
344
- RESULT_TYPE_NODE,
345
- RESULT_TYPE_EDGE,
346
- RESULT_TYPE_ATTR,
347
- RESULT_TYPE_TABLE
348
- }
349
- export declare enum AuthenticateType {
350
- PERMISSION_TYPE_UNSET,
351
- PERMISSION_TYPE_UQL,
352
- PERMISSION_TYPE_GQL,
353
- PERMISSION_TYPE_INSERTNODES,
354
- PERMISSION_TYPE_INSERTEDGES,
355
- PERMISSION_TYPE_EXPORT,
356
- PERMISSION_TYPE_DOWNLOADFILE,
357
- PERMISSION_TYPE_INSTALLALGO,
358
- PERMISSION_TYPE_UNINSTALLALGO,
359
- PERMISSION_TYPE_ROLLBACKALGO
360
- }
361
- /**
362
- * privilege level type
363
- */
364
- export declare enum PrivilegeLevel {
365
- /**
366
- * Graph privilege type
367
- */
368
- GraphLevel = 0,
369
- /**
370
- * System privilege type
371
- */
372
- SystemLevel = 1
373
- }
374
- /**
375
- * HDC synchronization type.
376
- */
377
- export declare enum HDCSyncType {
378
- /**
379
- * Static synchronization
380
- */
381
- STATIC = "static",
382
- /**
383
- * Asynchronous synchronization
384
- */
385
- ASYNC = "async",
386
- /**
387
- * Synchronous synchronization
388
- */
389
- SYNC = "sync"
390
- }
391
- /** Query type contains UQL,GQL */
392
- export declare enum QueryType {
393
- QL_UNSET = 0,
394
- UQL = 1,
395
- GQL = 2
396
- }
397
- /**
398
- * The schema type in database.
399
- */
400
- export declare enum DBType {
401
- /**
402
- * Node
403
- */
404
- DBNODE,
405
- /**
406
- * Edge
407
- */
408
- DBEDGE
409
- }
410
- /**
411
- * Job status
412
- */
413
- export declare enum JOB_STATUS {
414
- JOB_PENDING,
415
- JOB_COMPUTING,
416
- JOB_WRITING,
417
- JOB_DONE,
418
- JOB_FAILED,
419
- JOB_STOPPED
420
- }
421
- /**
422
- * Property index
423
- */
424
- export declare class Index {
425
- id?: string;
426
- /**
427
- * Index name
428
- */
429
- name: string;
430
- /**
431
- * Index on which properties
432
- */
433
- properties: string;
434
- /**
435
- * Index on which scehma
436
- */
437
- schema: string;
438
- /**
439
- * Index status
440
- */
441
- status: string;
442
- /**
443
- * Index size
444
- */
445
- size?: string;
446
- /**
447
- * Node index or edge index
448
- */
449
- dbType?: DBType;
450
- }
451
- /**
452
- * User
453
- */
454
- export declare class User {
455
- /**
456
- * username
457
- */
458
- username?: string;
459
- /**
460
- * pasword
461
- */
462
- password?: string;
463
- /**
464
- * create time
465
- */
466
- createdTime?: Date;
467
- /**
468
- * System privileges list
469
- */
470
- systemPrivileges?: string[];
471
- /**
472
- * Graph privileges key value map
473
- */
474
- graphPrivileges?: Map<string, string[]>;
475
- /**
476
- * Property privileges
477
- */
478
- propertyPrivileges?: PropertyPrivilege;
479
- /**
480
- * Policy list
481
- */
482
- policies?: string[];
483
- }
484
- export interface PropertyPrivilege {
485
- node?: PropertyPrivilegeElement;
486
- edge?: PropertyPrivilegeElement;
487
- }
488
- export interface PropertyPrivilegeElement {
489
- read?: string[][];
490
- write?: string[][];
491
- deny?: string[][];
492
- }
493
- /**
494
- * A policy is a set of privileges designed for a specific user role, often encompassing multiple privileges and other policies. Effective policy design and usage enable role-based access control.
495
- */
496
- export declare class Policy {
497
- /** Policy name */
498
- name?: string;
499
- /** Atlas permissions included in the policy */
500
- systemPrivileges?: string[];
501
- /** System permissions included in the policy */
502
- graphPrivileges?: Map<string, string[]>;
503
- /** Permissions for properties included in the policy */
504
- propertyPrivileges?: PropertyPrivilege;
505
- /** Other strategies included in the policy */
506
- policies?: string[];
507
- }
508
- /**
509
- * Control user permissions to operate on the graph database
510
- */
511
- export declare class Privilege {
512
- /**
513
- * privilege name
514
- */
515
- name?: string;
516
- /**
517
- * privilege type
518
- */
519
- level?: PrivilegeLevel;
520
- }
521
- /**
522
- * 连接返回的统一状态
523
- */
524
- export type Status = {
525
- code: ErrorCode;
526
- message: string;
527
- };
528
- /**
529
- * The background job INFO from database.
530
- */
531
- export declare class Job {
532
- /**
533
- * job id
534
- */
535
- id?: string;
536
- /**
537
- * job run in graph name
538
- */
539
- graphName?: string;
540
- /**
541
- * job query
542
- */
543
- query?: string;
544
- /**
545
- * Job types, such as CREATE_INDEX, CACHE, COMPACT
546
- */
547
- type?: string;
548
- /**
549
- * Error messages encountered during job execution (if any)
550
- */
551
- errMsg?: string;
552
- /**
553
- * The results generated by assignments, such as output files or statistical overviews of algorithms.
554
- */
555
- result?: Map<any, any>;
556
- /**
557
- * job start time
558
- */
559
- startTime?: string;
560
- /**
561
- * job end time
562
- */
563
- endTime?: string;
564
- /**
565
- * Current state of the job, which can be FINISHED, RUNNING, STOPPING, STOPPED or FAILED.
566
- */
567
- status?: "FINISHED" | "RUNNING" | "STOPPING" | "STOPPED" | "FAILED";
568
- /**
569
- * Progress updates for the job, such as indications that the write operation has been started.
570
- */
571
- progress?: string;
572
- }
573
- /**
574
- * The response items of top()
575
- */
576
- export declare class Process {
577
- /**
578
- * process id
579
- */
580
- processId?: string;
581
- /**
582
- * process query
583
- */
584
- processQuery?: string;
585
- /**
586
- * duration
587
- */
588
- duration?: string;
589
- /**
590
- * status
591
- */
592
- status?: string;
593
- }
594
- /**
595
- * hdc.graph.show()
596
- */
597
- export declare class HDCGraph {
598
- /**
599
- * name
600
- */
601
- name?: string;
602
- /**
603
- * graph name
604
- */
605
- graphName?: string;
606
- /**
607
- * status
608
- */
609
- status?: string;
610
- /**
611
- * stats
612
- */
613
- stats?: string;
614
- /**
615
- * is default
616
- */
617
- isDefault?: string;
618
- /**
619
- * hdc server name
620
- */
621
- hdcServerName?: string;
622
- /**
623
- * hdc server status
624
- */
625
- hdcServerStatus?: string;
626
- /**
627
- * hdc config name
628
- */
629
- config?: string;
630
- }
631
- /**
632
- * projection
633
- */
634
- export declare class Projection {
635
- /**
636
- * name
637
- */
638
- name?: string;
639
- /**
640
- * graph name
641
- */
642
- graphName?: string;
643
- /**
644
- * status
645
- */
646
- status?: string;
647
- /**
648
- * stats
649
- */
650
- stats?: string;
651
- /**
652
- * config
653
- */
654
- config?: string;
655
- }
656
- /**
657
- * Statistics information about license and usage limits
658
- */
659
- export interface Stats {
660
- /**
661
- * License uuid
662
- */
663
- licenseUuid?: string;
664
- /**
665
- * Company name
666
- */
667
- company?: string;
668
- /**
669
- * Department name
670
- */
671
- department?: string;
672
- /**
673
- * Maximum number of users allowed
674
- */
675
- limitedUser?: string;
676
- /**
677
- * Maximum number of graphs allowed
678
- */
679
- limitedGraph?: string;
680
- /**
681
- * Maximum number of nodes allowed
682
- */
683
- limitedNode?: string;
684
- /**
685
- * Maximum number of edges allowed
686
- */
687
- limitedEdge?: string;
688
- /**
689
- * Maximum number of shards allowed
690
- */
691
- limitedShard?: string;
692
- /**
693
- * Maximum number of HDC connections allowed
694
- */
695
- limitedHdc?: string;
696
- /**
697
- * License expiration date
698
- */
699
- expiredDate?: string;
700
- }
701
- /**
702
- * The graph data about nodes.
703
- */
704
- export declare class Node {
705
- /**
706
- * _uuid
707
- */
708
- uuid?: string;
709
- /**
710
- * _id
711
- */
712
- id?: string;
713
- /**
714
- * schema
715
- */
716
- schema?: string;
717
- /**
718
- * key: value
719
- */
720
- values?: {
721
- [key: string]: any;
722
- };
723
- /**
724
- * returns property value
725
- * @param propName property name
726
- * @returns property value
727
- */
728
- get?(propName: string): any;
729
- /**
730
- * sets property value
731
- * @param propName
732
- * @param value
733
- */
734
- set?(propName: string, value: any): void;
735
- }
736
- /**
737
- * Stores edge data.
738
- */
739
- export declare class Edge {
740
- /**
741
- * _uuid
742
- */
743
- uuid?: string;
744
- /**
745
- * _from_uuid
746
- */
747
- fromUuid?: string;
748
- /**
749
- * _to_uuid
750
- */
751
- toUuid?: string;
752
- /**
753
- * _from: from id
754
- */
755
- from?: string;
756
- /**
757
- * _to: to id
758
- */
759
- to?: string;
760
- /**
761
- * schema
762
- */
763
- schema?: string;
764
- /**
765
- * key: value
766
- */
767
- values?: {
768
- [key: string]: any;
769
- };
770
- /**
771
- * returns property value
772
- * @param propName property name
773
- * @returns property value
774
- */
775
- get?(propName: string): any;
776
- /**
777
- * set property value
778
- * @param propName
779
- * @param value
780
- */
781
- set?(propName: string, value: any): void;
782
- }
783
- /**
784
- * 一组边
785
- */
786
- export type EdgeAlias = {
787
- edges: Edge[];
788
- alias: string;
789
- };
790
- /**
791
- * Path entity
792
- */
793
- export declare class Path {
794
- /**
795
- * Node uuid list
796
- */
797
- nodeUuids?: string[];
798
- /**
799
- * Edge uuid list
800
- */
801
- edgeUuids?: string[];
802
- /**
803
- * nodes details
804
- */
805
- nodes?: Map<string, Node>;
806
- /**
807
- * edges details
808
- */
809
- edges?: Map<string, Edge>;
810
- /**
811
- * return node by index
812
- * @param index node index
813
- * @returns node
814
- /**
815
- * return edge length
816
- * @returns edge length
817
- */
818
- length?(): number;
819
- }
820
- /**
821
- * Graph that contains nodes, edges maps and paths.
822
- */
823
- export declare class Graph {
824
- /**
825
- * Graph path list
826
- */
827
- paths?: Path[];
828
- /**
829
- * Graph all nodes
830
- */
831
- nodes?: Map<string, Node>;
832
- /**
833
- * Graph all edges
834
- */
835
- edges?: Map<string, Edge>;
836
- /**
837
- * Convert path list to
838
- * @returns Path[]
839
- */
840
- getPaths(): Path[];
841
- /**
842
- * Add node to nodes
843
- * @param node new Node
844
- */
845
- addNode(node: Node): void;
846
- /**
847
- * Add edge to graph
848
- * @param edge new Edge
849
- */
850
- addEdge(edge: Edge): void;
851
- }
852
- /**
853
- * GraphSet that contains the graph name and total nodes and edges.
854
- */
855
- export declare class GraphSet {
856
- /**
857
- * graph id
858
- */
859
- id?: string;
860
- /**
861
- * graph name
862
- */
863
- name: string;
864
- /**
865
- * number of nodes
866
- */
867
- totalNodes?: string;
868
- /**
869
- * number of edges
870
- */
871
- totalEdges?: string;
872
- /**
873
- * graph shards list
874
- */
875
- shards?: string[];
876
- /**
877
- * the partition type of graph
878
- */
879
- partitionBy?: string;
880
- /**
881
- * status
882
- */
883
- status?: string;
884
- /**
885
- * graph description
886
- */
887
- description?: string | null;
888
- /**
889
- * the number of slots
890
- */
891
- slotNum?: number | 0;
892
- }
893
- /**
894
- * Node or edge schemas
895
- */
896
- export declare class Schema {
897
- /**
898
- * schema name
899
- */
900
- name: string;
901
- /**
902
- * schema description
903
- */
904
- description?: string;
905
- /**
906
- * properties of schema
907
- */
908
- properties?: Property[];
909
- /**
910
- * schema type
911
- */
912
- dbType: DBType;
913
- /**
914
- * node or edge count
915
- */
916
- total?: string;
917
- /**
918
- * schema id
919
- */
920
- id?: string;
921
- /**
922
- * store the count for each pair of start and end node schemas of current edge schema.
923
- */
924
- stats?: SchemaStat[];
925
- /**
926
- * Convert list of schemas to a map of schema Schema name -> Schema
927
- * @param schemas
928
- * @returns
929
- */
930
- static toDict?(schemas: Schema[]): Map<string, Schema>;
931
- }
932
- /**
933
- * Statistics for node schema pairs in edge schema
934
- */
935
- export declare class SchemaStat {
936
- /**
937
- * Schema type
938
- */
939
- dbType?: DBType;
940
- /**
941
- * Schema name
942
- */
943
- schema?: string;
944
- /**
945
- * From Schema name
946
- */
947
- fromSchema: string;
948
- /**
949
- * To Schema name
950
- */
951
- toSchema: string;
952
- /**
953
- * Number of edges between these node schemas
954
- */
955
- count: string;
956
- }
957
- export declare class SchemaStats {
958
- stats: SchemaStat[];
959
- }
960
- /**
961
- * The properties of schema
962
- */
963
- export declare class Property {
964
- /**
965
- * Property name
966
- */
967
- name: string;
968
- /**
969
- * PropertyType Enum
970
- */
971
- type: UltipaPropertyType;
972
- /**
973
- * Sub PropertyType Enum
974
- */
975
- subType?: UltipaPropertyType[];
976
- /**
977
- * This property is lte
978
- */
979
- lte?: boolean;
980
- /**
981
- * Whether it has read permission or not true-yes,false-no
982
- */
983
- read?: boolean;
984
- /**
985
- * Whether it has write permission or not true-yes,false-no
986
- */
987
- write?: boolean;
988
- /**
989
- * Property`s schema name
990
- */
991
- schema: string;
992
- /**
993
- * Property`s description
994
- */
995
- description?: string;
996
- /**
997
- * encrypt method for this property, if null, value is not encrypted
998
- */
999
- encrypt?: string;
1000
- /**
1001
- * additional info for this property. For decimal property, it represents the length and precision in parentheses, default is "(20,8)"
1002
- */
1003
- decimalExtra?: DecimalExtra;
1004
- }
1005
- /**
1006
- * Decimal additional info
1007
- */
1008
- export interface DecimalExtra {
1009
- precision: number;
1010
- scale: number;
1011
- }
1012
- export interface AllProperties {
1013
- nodeProperties: Property[];
1014
- edgeProperties: Property[];
1015
- }
1016
- export declare class Header {
1017
- propertyName: string;
1018
- propertyType: UltipaPropertyType;
1019
- }
1020
- /**
1021
- * Table
1022
- */
1023
- export declare class Table {
1024
- /**
1025
- * Table name
1026
- */
1027
- name?: string;
1028
- /**
1029
- * Table headers
1030
- */
1031
- headers?: Header[];
1032
- /**
1033
- * Table rows
1034
- */
1035
- rows?: any[][];
1036
- /**
1037
- * Convert table to list of KV
1038
- * @returns
1039
- */
1040
- toKV(): any[];
1041
- getHeaders(): Header[];
1042
- getRows(): any[][];
1043
- }
1044
- export type Replica = {
1045
- addr: string;
1046
- status: string;
1047
- streamAddr: string;
1048
- lastHearBeat: string;
1049
- };
1050
- export type Statistics = {
1051
- nodeAffected?: number;
1052
- edgeAffected?: number;
1053
- totalCost: number;
1054
- engineCost: number;
1055
- };
1056
- /**
1057
- * Attribute Response Data
1058
- */
1059
- export declare class Attr {
1060
- /**
1061
- * Ultipa property type
1062
- */
1063
- propertyType?: UltipaPropertyType;
1064
- /**
1065
- * Ultipa result type
1066
- */
1067
- resultType?: ResultType;
1068
- /**
1069
- * Attr values
1070
- */
1071
- values?: object[];
1072
- /**
1073
- * Attr name
1074
- */
1075
- name?: string;
1076
- }
1077
- export type AttrListData = {
1078
- type: ResultType;
1079
- type_desc: string;
1080
- nodes?: Node[];
1081
- edges?: Edge[];
1082
- paths?: Path[];
1083
- attrs?: Attr[];
1084
- };
1085
- export declare class ExplainPlan {
1086
- planNodes: PlanNode[];
1087
- }
1088
- export declare class PlanNode {
1089
- alias: string;
1090
- childrenNum: number;
1091
- uql: string;
1092
- infos: string;
1093
- }
1094
- export declare function getExplainPlansTreeTopNode(plans: ExplainPlan): PlanNode;
1095
- /**
1096
- * The get () method or alias () method of the Response class returns a DataItem embedded in the query result. You need to use the as < Type > () method of the DataItem to convert the result to the appropriate driver type.
1097
- */
1098
- export declare class DataItem {
1099
- /**
1100
- * Alias name
1101
- */
1102
- alias?: string;
1103
- /**
1104
- * Ultipa result type
1105
- */
1106
- type?: ResultType;
1107
- /**
1108
- * result entity
1109
- */
1110
- entities?: any;
1111
- constructor(alias: string, type: ResultType, entities: any);
1112
- private _asTypeError;
1113
- asNodes(): Node[];
1114
- asFirstNode(): Node;
1115
- asEdges(): Edge[];
1116
- asFirstEdge(): Edge;
1117
- asPaths(): Path[];
1118
- asGraph(): Graph;
1119
- asTable(): Table;
1120
- asAttr(): Attr;
1121
- asGraphSets(): GraphSet[];
1122
- asProperties(): Property[];
1123
- asSchemas(): Schema[];
1124
- asIndexes(): Index[];
1125
- asPolicies(): Policy[];
1126
- asUsers(): User[];
1127
- asPrivileges(): Privilege[];
1128
- asProcesses(): Process[];
1129
- asHDCGraphs(): HDCGraph[];
1130
- asProjections(): Projection[];
1131
- asAlgos(): Algo[];
1132
- asJobs(): Job[];
1133
- asAny(): any;
1134
- asTableWithT<T>(): T[];
1135
- toJSONString(): string;
1136
- }
1137
- /**
1138
- * Unified response structure for all requests
1139
- */
1140
- export declare class Response {
1141
- /**
1142
- * Holds statistics field of rpc response
1143
- */
1144
- statistics?: Statistics;
1145
- /**
1146
- * Holds status field of rpc response
1147
- */
1148
- status?: Status;
1149
- /**
1150
- * Holds all alias result of grpc api
1151
- */
1152
- aliases?: Alias[];
1153
- /**
1154
- * Holds all result of grpc api, from aliases
1155
- */
1156
- items: {
1157
- [key: string]: DataItem;
1158
- };
1159
- requestInfo?: any;
1160
- /**
1161
- * Holds result of explain uql.
1162
- */
1163
- explainPlan?: ExplainPlan;
1164
- constructor(status?: Status);
1165
- get(index: number): DataItem;
1166
- alias(alias: string): DataItem;
1167
- }
1168
- export declare class InsertResponse {
1169
- ids?: string[];
1170
- uuids?: string[];
1171
- errorItems?: Map<number, InsertErrorCode>;
1172
- /**
1173
- * Holds statistics field of rpc response
1174
- */
1175
- statistics?: Statistics;
1176
- /**
1177
- * Holds status field of rpc response
1178
- */
1179
- status?: Status;
1180
- }
1181
- /**
1182
- * Remarks: A language that cannot return two results, use this to return results
1183
- */
1184
- export declare class ResponseWithExistCheck {
1185
- /**
1186
- * When insert,return insert item exist
1187
- */
1188
- exist?: boolean;
1189
- /**
1190
- * The insert response
1191
- */
1192
- response: Response;
1193
- }
1194
- export declare class JobResponse {
1195
- jobId?: string;
1196
- /**
1197
- * Holds statistics field of response
1198
- */
1199
- statistics?: Statistics;
1200
- /**
1201
- * Holds status field of response
1202
- */
1203
- status?: Status;
1204
- }
1205
- export interface Alias {
1206
- name?: string;
1207
- type?: ResultType;
1208
- }
1209
- export type AttrAlias = {
1210
- values: any[];
1211
- type: ResultType;
1212
- type_desc: string;
1213
- alias: string;
1214
- };