@ultipa-graph/ultipa-driver 5.0.0-s5.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 (202) hide show
  1. package/dist/.DS_Store +0 -0
  2. package/dist/connection/connection.final.d.ts +45 -0
  3. package/dist/connection/connection.final.js +600 -0
  4. package/dist/connection/connection.final.js.map +1 -0
  5. package/dist/connection/connection.pool.d.ts +26 -0
  6. package/dist/connection/connection.pool.js +121 -0
  7. package/dist/connection/connection.pool.js.map +1 -0
  8. package/dist/connection/extra/algos/algo.extra.d.ts +34 -0
  9. package/dist/connection/extra/algos/algo.extra.js +81 -0
  10. package/dist/connection/extra/algos/algo.extra.js.map +1 -0
  11. package/dist/connection/extra/algos/algo.utils.d.ts +3 -0
  12. package/dist/connection/extra/algos/algo.utils.js +71 -0
  13. package/dist/connection/extra/algos/algo.utils.js.map +1 -0
  14. package/dist/connection/extra/algos/community.d.ts +27 -0
  15. package/dist/connection/extra/algos/community.js +129 -0
  16. package/dist/connection/extra/algos/community.js.map +1 -0
  17. package/dist/connection/extra/algos/degrees.d.ts +10 -0
  18. package/dist/connection/extra/algos/degrees.js +43 -0
  19. package/dist/connection/extra/algos/degrees.js.map +1 -0
  20. package/dist/connection/extra/algos/embedding.d.ts +13 -0
  21. package/dist/connection/extra/algos/embedding.js +58 -0
  22. package/dist/connection/extra/algos/embedding.js.map +1 -0
  23. package/dist/connection/extra/algos/index.d.ts +5 -0
  24. package/dist/connection/extra/algos/index.js +14 -0
  25. package/dist/connection/extra/algos/index.js.map +1 -0
  26. package/dist/connection/extra/base.extra.d.ts +71 -0
  27. package/dist/connection/extra/base.extra.js +183 -0
  28. package/dist/connection/extra/base.extra.js.map +1 -0
  29. package/dist/connection/extra/connection.base.d.ts +82 -0
  30. package/dist/connection/extra/connection.base.js +623 -0
  31. package/dist/connection/extra/connection.base.js.map +1 -0
  32. package/dist/connection/extra/connection.d.ts +16 -0
  33. package/dist/connection/extra/connection.js +46 -0
  34. package/dist/connection/extra/connection.js.map +1 -0
  35. package/dist/connection/extra/graph.extra.d.ts +85 -0
  36. package/dist/connection/extra/graph.extra.js +241 -0
  37. package/dist/connection/extra/graph.extra.js.map +1 -0
  38. package/dist/connection/extra/index.extra.d.ts +70 -0
  39. package/dist/connection/extra/index.extra.js +201 -0
  40. package/dist/connection/extra/index.extra.js.map +1 -0
  41. package/dist/connection/extra/job.extra.d.ts +32 -0
  42. package/dist/connection/extra/job.extra.js +145 -0
  43. package/dist/connection/extra/job.extra.js.map +1 -0
  44. package/dist/connection/extra/meta.extra.d.ts +91 -0
  45. package/dist/connection/extra/meta.extra.js +441 -0
  46. package/dist/connection/extra/meta.extra.js.map +1 -0
  47. package/dist/connection/extra/property.extra.d.ts +81 -0
  48. package/dist/connection/extra/property.extra.js +268 -0
  49. package/dist/connection/extra/property.extra.js.map +1 -0
  50. package/dist/connection/extra/schema.extra.d.ts +50 -0
  51. package/dist/connection/extra/schema.extra.js +248 -0
  52. package/dist/connection/extra/schema.extra.js.map +1 -0
  53. package/dist/connection/extra/search.extra.d.ts +12 -0
  54. package/dist/connection/extra/search.extra.js +126 -0
  55. package/dist/connection/extra/search.extra.js.map +1 -0
  56. package/dist/connection/extra/task.extra.d.ts +24 -0
  57. package/dist/connection/extra/task.extra.js +126 -0
  58. package/dist/connection/extra/task.extra.js.map +1 -0
  59. package/dist/connection/extra/user.privilege.extra.d.ts +64 -0
  60. package/dist/connection/extra/user.privilege.extra.js +348 -0
  61. package/dist/connection/extra/user.privilege.extra.js.map +1 -0
  62. package/dist/connection/index.d.ts +4 -0
  63. package/dist/connection/index.js +10 -0
  64. package/dist/connection/index.js.map +1 -0
  65. package/dist/connection/network.manager.d.ts +27 -0
  66. package/dist/connection/network.manager.js +178 -0
  67. package/dist/connection/network.manager.js.map +1 -0
  68. package/dist/index.d.ts +4 -0
  69. package/dist/index.js +14 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/printers/alias.d.ts +2 -0
  72. package/dist/printers/alias.js +15 -0
  73. package/dist/printers/alias.js.map +1 -0
  74. package/dist/printers/any.d.ts +2 -0
  75. package/dist/printers/any.js +40 -0
  76. package/dist/printers/any.js.map +1 -0
  77. package/dist/printers/array.aio.d.ts +44 -0
  78. package/dist/printers/array.aio.js +240 -0
  79. package/dist/printers/array.aio.js.map +1 -0
  80. package/dist/printers/common.d.ts +0 -0
  81. package/dist/printers/common.js +1 -0
  82. package/dist/printers/common.js.map +1 -0
  83. package/dist/printers/edge.d.ts +5 -0
  84. package/dist/printers/edge.js +49 -0
  85. package/dist/printers/edge.js.map +1 -0
  86. package/dist/printers/explain.plan.d.ts +2 -0
  87. package/dist/printers/explain.plan.js +24 -0
  88. package/dist/printers/explain.plan.js.map +1 -0
  89. package/dist/printers/graph.d.ts +2 -0
  90. package/dist/printers/graph.js +34 -0
  91. package/dist/printers/graph.js.map +1 -0
  92. package/dist/printers/index.d.ts +25 -0
  93. package/dist/printers/index.js +44 -0
  94. package/dist/printers/index.js.map +1 -0
  95. package/dist/printers/node.d.ts +5 -0
  96. package/dist/printers/node.js +49 -0
  97. package/dist/printers/node.js.map +1 -0
  98. package/dist/printers/path.d.ts +3 -0
  99. package/dist/printers/path.js +42 -0
  100. package/dist/printers/path.js.map +1 -0
  101. package/dist/printers/status.d.ts +3 -0
  102. package/dist/printers/status.js +45 -0
  103. package/dist/printers/status.js.map +1 -0
  104. package/dist/printers/table.d.ts +2 -0
  105. package/dist/printers/table.js +31 -0
  106. package/dist/printers/table.js.map +1 -0
  107. package/dist/proto/tmp.js +366 -0
  108. package/dist/proto/ultipa_grpc_pb.d.ts +257 -0
  109. package/dist/proto/ultipa_grpc_pb.js +366 -0
  110. package/dist/proto/ultipa_grpc_pb.js.map +1 -0
  111. package/dist/proto/ultipa_pb.d.ts +1 -0
  112. package/dist/proto/ultipa_pb.js +11002 -0
  113. package/dist/proto/ultipa_pb.js.map +1 -0
  114. package/dist/transaction/UltipaSession.d.ts +28 -0
  115. package/dist/transaction/UltipaSession.js +148 -0
  116. package/dist/transaction/UltipaSession.js.map +1 -0
  117. package/dist/transaction/UltipaTransaction.Recorder.d.ts +20 -0
  118. package/dist/transaction/UltipaTransaction.Recorder.js +23 -0
  119. package/dist/transaction/UltipaTransaction.Recorder.js.map +1 -0
  120. package/dist/transaction/UltipaTransaction.d.ts +35 -0
  121. package/dist/transaction/UltipaTransaction.js +203 -0
  122. package/dist/transaction/UltipaTransaction.js.map +1 -0
  123. package/dist/transaction/UltipaTransactionSession.d.ts +15 -0
  124. package/dist/transaction/UltipaTransactionSession.js +46 -0
  125. package/dist/transaction/UltipaTransactionSession.js.map +1 -0
  126. package/dist/transaction/operations/Transaction.Deletes.d.ts +4 -0
  127. package/dist/transaction/operations/Transaction.Deletes.js +52 -0
  128. package/dist/transaction/operations/Transaction.Deletes.js.map +1 -0
  129. package/dist/transaction/operations/Transaction.Inserts.d.ts +4 -0
  130. package/dist/transaction/operations/Transaction.Inserts.js +78 -0
  131. package/dist/transaction/operations/Transaction.Inserts.js.map +1 -0
  132. package/dist/transaction/operations/Transaction.Update.d.ts +4 -0
  133. package/dist/transaction/operations/Transaction.Update.js +43 -0
  134. package/dist/transaction/operations/Transaction.Update.js.map +1 -0
  135. package/dist/types/index.d.ts +4 -0
  136. package/dist/types/index.js +13 -0
  137. package/dist/types/index.js.map +1 -0
  138. package/dist/types/types.algos.params.d.ts +545 -0
  139. package/dist/types/types.algos.params.js +16 -0
  140. package/dist/types/types.algos.params.js.map +1 -0
  141. package/dist/types/types.d.ts +496 -0
  142. package/dist/types/types.extra.d.ts +788 -0
  143. package/dist/types/types.extra.js +49 -0
  144. package/dist/types/types.extra.js.map +1 -0
  145. package/dist/types/types.js +706 -0
  146. package/dist/types/types.js.map +1 -0
  147. package/dist/types/util.d.ts +15 -0
  148. package/dist/types/util.js +163 -0
  149. package/dist/types/util.js.map +1 -0
  150. package/dist/utils/common.d.ts +3 -0
  151. package/dist/utils/common.js +31 -0
  152. package/dist/utils/common.js.map +1 -0
  153. package/dist/utils/config.d.ts +3 -0
  154. package/dist/utils/config.js +7 -0
  155. package/dist/utils/config.js.map +1 -0
  156. package/dist/utils/format.d.ts +49 -0
  157. package/dist/utils/format.js +990 -0
  158. package/dist/utils/format.js.map +1 -0
  159. package/dist/utils/index.d.ts +12 -0
  160. package/dist/utils/index.js +34 -0
  161. package/dist/utils/index.js.map +1 -0
  162. package/dist/utils/params.validate.d.ts +4 -0
  163. package/dist/utils/params.validate.js +14 -0
  164. package/dist/utils/params.validate.js.map +1 -0
  165. package/dist/utils/property.d.ts +15 -0
  166. package/dist/utils/property.js +117 -0
  167. package/dist/utils/property.js.map +1 -0
  168. package/dist/utils/raft.retry.d.ts +0 -0
  169. package/dist/utils/raft.retry.js +1 -0
  170. package/dist/utils/raft.retry.js.map +1 -0
  171. package/dist/utils/serialize/commont.d.ts +12 -0
  172. package/dist/utils/serialize/commont.js +46 -0
  173. package/dist/utils/serialize/commont.js.map +1 -0
  174. package/dist/utils/serialize/deserialize.d.ts +9 -0
  175. package/dist/utils/serialize/deserialize.js +164 -0
  176. package/dist/utils/serialize/deserialize.js.map +1 -0
  177. package/dist/utils/serialize/null.d.ts +24 -0
  178. package/dist/utils/serialize/null.js +133 -0
  179. package/dist/utils/serialize/null.js.map +1 -0
  180. package/dist/utils/serialize/serialize.d.ts +10 -0
  181. package/dist/utils/serialize/serialize.js +135 -0
  182. package/dist/utils/serialize/serialize.js.map +1 -0
  183. package/dist/utils/stream.helper.d.ts +9 -0
  184. package/dist/utils/stream.helper.js +97 -0
  185. package/dist/utils/stream.helper.js.map +1 -0
  186. package/dist/utils/time.record.d.ts +15 -0
  187. package/dist/utils/time.record.js +50 -0
  188. package/dist/utils/time.record.js.map +1 -0
  189. package/dist/utils/timezone.d.ts +7 -0
  190. package/dist/utils/timezone.js +21 -0
  191. package/dist/utils/timezone.js.map +1 -0
  192. package/dist/utils/ultipa.datetime.d.ts +8 -0
  193. package/dist/utils/ultipa.datetime.js +120 -0
  194. package/dist/utils/ultipa.datetime.js.map +1 -0
  195. package/dist/utils/uql-maker.d.ts +164 -0
  196. package/dist/utils/uql-maker.js +400 -0
  197. package/dist/utils/uql-maker.js.map +1 -0
  198. package/dist/utils/uql.parse.d.ts +27 -0
  199. package/dist/utils/uql.parse.js +206 -0
  200. package/dist/utils/uql.parse.js.map +1 -0
  201. package/package.json +62 -0
  202. package/readme.md +63 -0
@@ -0,0 +1,788 @@
1
+ /// <reference types="node" />
2
+ import { ULTIPA } from '.';
3
+ /**
4
+ * 请求参数类型指定
5
+ */
6
+ export declare namespace RequestParamType {
7
+ /** 选择 */
8
+ type SELECT_TYPE = string[] | string;
9
+ /** 返回 */
10
+ type RETURN_TYPE = string[] | string | string[][];
11
+ /** 深度 */
12
+ type DEPTH_TYPE = number | (number | string)[];
13
+ /** 过滤 */
14
+ type FILTER_TYPE = string;
15
+ /** 方向 */
16
+ type DIRECTION_TYPE = "left" | "right";
17
+ /** 任务 */
18
+ type TASK_STATUS = "*" | "pending" | "computing" | "writing" | "failed" | "done" | "stopped";
19
+ /** 任务 */
20
+ type JOB_STATUS = "PENDING" | "RUNNING" | "FINISHED" | "FAILED" | "STOPPING" | "STOPPED" | "ERROR";
21
+ /** */
22
+ type UPDATE = "sync" | "async" | "static";
23
+ }
24
+ /**
25
+ * 请求参数命名空间
26
+ */
27
+ export declare namespace RequestType {
28
+ interface Node {
29
+ [key: string]: any;
30
+ }
31
+ interface Edge {
32
+ [key: string]: any;
33
+ }
34
+ interface Graph {
35
+ /** 图集名称 */
36
+ name: string;
37
+ }
38
+ interface GraphCreate {
39
+ /** 图集名称 */
40
+ name: string;
41
+ /** 图集介绍 */
42
+ desc?: string;
43
+ shards: number[];
44
+ partitionByHash?: CityHash64;
45
+ }
46
+ interface Property {
47
+ /** 属性名 */
48
+ name: string;
49
+ /** schema名 */
50
+ schema: string;
51
+ /** 类型 */
52
+ type?: ULTIPA.PropertyType;
53
+ subTypes?: ULTIPA.PropertyType[];
54
+ /** 介绍 */
55
+ description?: string;
56
+ extra?: PropertyExtraInfo;
57
+ }
58
+ interface PropertyExtraInfo {
59
+ precision?: number;
60
+ scale?: number;
61
+ }
62
+ interface CityHash64 {
63
+ name?: string;
64
+ by?: string;
65
+ }
66
+ interface GetSchema {
67
+ /** schema名称 */
68
+ name: string;
69
+ }
70
+ interface DeleteSchema {
71
+ /** schema名称 */
72
+ name: string;
73
+ }
74
+ interface CreateSchema {
75
+ /** schema名称 */
76
+ name: string;
77
+ /** schema介绍 */
78
+ desc?: string;
79
+ /** schema类型 */
80
+ dbType: ULTIPA.DBType;
81
+ }
82
+ interface UpdateSchema {
83
+ /** schema原名称 */
84
+ name: string;
85
+ /** schema新名称 */
86
+ newName?: string;
87
+ /** schema新介绍 */
88
+ newDesc?: string;
89
+ }
90
+ interface Truncate {
91
+ /** 图集名 */
92
+ graphName: string;
93
+ /** schema名 */
94
+ schema?: string;
95
+ /** 点或边 */
96
+ dbType?: ULTIPA.DBType;
97
+ }
98
+ interface CopyGraph {
99
+ /** 图集来源 */
100
+ fromGraphSetName: string;
101
+ /** 新图集名称 */
102
+ newGraphSetName: string;
103
+ }
104
+ interface UpdateGraph {
105
+ /** 原图集 */
106
+ oldGraphSetName: string;
107
+ /** 新图集名 */
108
+ newGraphSetName?: string;
109
+ /** 新图集介绍 */
110
+ newDesc?: string;
111
+ }
112
+ interface Auth {
113
+ authType: ULTIPA.AuthenticateType;
114
+ query_text?: string;
115
+ }
116
+ /**
117
+ * 通用请求参数
118
+ */
119
+ interface RequestConfig {
120
+ /** 指定图集名称,创建connection pool一开始指定的图集,如果都没有,那么默认是 default图集 */
121
+ graphSetName?: string;
122
+ /** 指定集群ID */
123
+ clusterId?: string;
124
+ /** 时区 */
125
+ timeZone?: string;
126
+ /** utc offset */
127
+ timeZoneOffset?: number;
128
+ timestampToString?: boolean;
129
+ /** 超时设置 */
130
+ timeout?: number;
131
+ threadNum?: number;
132
+ /** stream方式处理结果 */
133
+ stream?: Stream;
134
+ /** 指定重试方式 */
135
+ retry?: {
136
+ /** 当前次数 */
137
+ current?: number;
138
+ /** 最大次数 */
139
+ max?: number;
140
+ };
141
+ /** 使用指定host */
142
+ useHost?: string;
143
+ /** 每次返回包条目限制 */
144
+ package_limit?: number;
145
+ /** 是不是要刷新集群信息 */
146
+ forceRefresh?: boolean;
147
+ logUql?: boolean;
148
+ /** 语言类型 */
149
+ ql?: ULTIPA.QueryType;
150
+ }
151
+ interface CommonStreamRequire extends RequestConfig {
152
+ /** stream方式处理结果 */
153
+ stream: Stream;
154
+ }
155
+ interface GraphPrivilege {
156
+ [x: string]: string[];
157
+ }
158
+ interface PropertyPrivilege {
159
+ node?: {
160
+ read?: string[][];
161
+ write?: string[][];
162
+ deny?: string[][];
163
+ };
164
+ edge?: {
165
+ read?: string[][];
166
+ write?: string[][];
167
+ deny?: string[][];
168
+ };
169
+ }
170
+ interface CreateUser {
171
+ /** 用户名 */
172
+ username: string;
173
+ /** 密码 */
174
+ password: string;
175
+ /** 图集权限 */
176
+ graph_privileges?: GraphPrivilege;
177
+ /** 系统权限 */
178
+ system_privileges?: string[];
179
+ /** 策略 */
180
+ policies?: string[];
181
+ /**属性权限 */
182
+ property_privileges?: PropertyPrivilege;
183
+ }
184
+ interface GetUser {
185
+ /** 用户名 */
186
+ username: string;
187
+ }
188
+ interface AlterUser {
189
+ /** 用户名 */
190
+ username: string;
191
+ /** 密码 */
192
+ password?: string;
193
+ /** 图集权限 */
194
+ graph_privileges?: GraphPrivilege;
195
+ /** 系统权限 */
196
+ system_privileges?: string[];
197
+ /** 策略 */
198
+ policies?: string[];
199
+ /**属性权限 */
200
+ property_privileges?: PropertyPrivilege;
201
+ }
202
+ interface DeleteUser {
203
+ /** 用户名 */
204
+ username: string;
205
+ }
206
+ interface Policy {
207
+ /** 策略名 */
208
+ name: string;
209
+ /** 图集权限 */
210
+ graph_privileges?: GraphPrivilege;
211
+ /** 系统权限 */
212
+ system_privileges?: string[];
213
+ /** 策略 */
214
+ policies?: string[];
215
+ /**属性权限 */
216
+ property_privileges?: PropertyPrivilege;
217
+ }
218
+ interface CreatePolicy extends Policy {
219
+ }
220
+ interface GetPolicy {
221
+ /** 策略名 */
222
+ name: string;
223
+ }
224
+ interface Kill {
225
+ /** 进程ID */
226
+ id?: string;
227
+ /** 所有进程 */
228
+ all?: boolean;
229
+ }
230
+ interface UpdatePolicy {
231
+ /** 策略名 */
232
+ name: string;
233
+ /** 图集权限 */
234
+ graph_privileges?: GraphPrivilege;
235
+ /** 系统权限 */
236
+ system_privileges?: string[];
237
+ /** 策略 */
238
+ policies?: string[];
239
+ }
240
+ interface DeletePolicy {
241
+ /** 策略名 */
242
+ name: string;
243
+ }
244
+ interface GrantPolicy {
245
+ /** 用户名 */
246
+ username: string;
247
+ /** 图集权限 */
248
+ graph_privileges?: GraphPrivilege;
249
+ /** 系统权限 */
250
+ system_privileges?: string[];
251
+ property_privileges?: PropertyPrivilege;
252
+ /** 策略 */
253
+ policies?: string[];
254
+ }
255
+ interface RevokePolicy {
256
+ /** 用户名 */
257
+ username: string;
258
+ /** 图集权限 */
259
+ graph_privileges?: GraphPrivilege;
260
+ /** 系统权限 */
261
+ system_privileges?: string[];
262
+ property_privileges?: PropertyPrivilege;
263
+ /** 策略 */
264
+ policies?: string[];
265
+ }
266
+ interface ListAllProperty {
267
+ }
268
+ interface ListProperty {
269
+ /** schema名 */
270
+ schema?: string;
271
+ }
272
+ interface CreateProperty {
273
+ /** 属性名 */
274
+ name: string;
275
+ /** schema名 */
276
+ schema?: string;
277
+ /** 类型 */
278
+ type?: ULTIPA.PropertyType;
279
+ subTypes?: ULTIPA.PropertyType[];
280
+ /** 介绍 */
281
+ description?: string;
282
+ }
283
+ interface DeleteProperty {
284
+ /** schema名称 */
285
+ schema?: string;
286
+ /** 属性名 */
287
+ name: string;
288
+ }
289
+ interface UpdateProperty {
290
+ /** schema名 */
291
+ schema?: string;
292
+ /** 属性名 */
293
+ name: string;
294
+ /** 新属性名 */
295
+ newName?: string;
296
+ /** 新属性介绍 */
297
+ newDesc?: string;
298
+ }
299
+ interface GetUserSetting {
300
+ /** 用户名 */
301
+ username: string;
302
+ /** 指定类型 */
303
+ type?: string;
304
+ }
305
+ interface SetUserSetting extends GetUserSetting {
306
+ /** 数据 */
307
+ data?: string;
308
+ }
309
+ interface Backup {
310
+ backupPath: string;
311
+ }
312
+ /**
313
+ * 用户uql返回的数据流方式
314
+ */
315
+ interface Stream {
316
+ /** 开始回调 */
317
+ onStart?: () => void;
318
+ /** 关闭回调 */
319
+ onClose?: () => void;
320
+ /** 获取数据 */
321
+ onData: (data: any) => void | Promise<any>;
322
+ /** 结束回调 */
323
+ onEnd: () => void;
324
+ /** 错误回调 */
325
+ onError?: (err: Error) => void;
326
+ /** 暂停回调 */
327
+ onPause?: () => void;
328
+ /** Readable回调 */
329
+ onReadable?: () => void;
330
+ /** 恢复回调 */
331
+ onResume?: () => void;
332
+ /** 包大小限制 */
333
+ package_limit?: number;
334
+ }
335
+ /** 导出 */
336
+ interface Export {
337
+ /** 导出类型 */
338
+ dbType: ULTIPA.DBType;
339
+ /** schema名 */
340
+ schema: string;
341
+ /** 条目限制 */
342
+ limit: number;
343
+ /** 属性列表 */
344
+ properties: string[];
345
+ }
346
+ /** 下载 */
347
+ interface Download {
348
+ /** 下载文件名 */
349
+ fileName: string;
350
+ }
351
+ /** 插入点 */
352
+ interface InsertNodes {
353
+ /** schema名 */
354
+ schema: string;
355
+ /** 数据 */
356
+ rows: object[];
357
+ /** 覆盖插入 */
358
+ overwrite?: boolean;
359
+ /** 更新插入 */
360
+ upsert?: boolean;
361
+ silent?: boolean;
362
+ }
363
+ /** 插入边 */
364
+ interface InsertEdges extends InsertNodes {
365
+ }
366
+ /** 安装算法 */
367
+ interface _InstallAlgo {
368
+ datas: {
369
+ /** 文件字节 */
370
+ chunk: Buffer;
371
+ /** 文件名 */
372
+ fileName: string;
373
+ /** 文件md5值 */
374
+ md5: string;
375
+ }[];
376
+ hdc?: string;
377
+ isHdc?: boolean;
378
+ }
379
+ interface InstallHDCAlgo {
380
+ soFile: string;
381
+ ymlFile: string;
382
+ hdcName: string;
383
+ }
384
+ interface UninstallHDCAlgo {
385
+ algoName: string;
386
+ hdcName: string;
387
+ }
388
+ interface InstallAlgo {
389
+ /** 按文件路径 */
390
+ paths?: {
391
+ /** 算法.so文件的目录 */
392
+ algoFilePath: string;
393
+ /** 算法.yml描述文件的目录 */
394
+ infoFilePath: string;
395
+ };
396
+ /** 按详细数据 */
397
+ datas?: _InstallAlgo;
398
+ hdc?: string;
399
+ }
400
+ interface InsertExta extends InstallAlgo {
401
+ }
402
+ /** 安装算法 */
403
+ interface InstallAlgoAio extends InstallAlgo {
404
+ isHdc?: boolean;
405
+ }
406
+ /** 卸载算法 */
407
+ interface UninstallAlgo {
408
+ algoName: string;
409
+ }
410
+ interface RollbackAlgo extends UninstallHDCAlgo {
411
+ }
412
+ /** 批量插入点 */
413
+ interface InsertHugeNodes {
414
+ /** schema名 */
415
+ schemaName: string;
416
+ /** 表头 */
417
+ headers: string[];
418
+ /** 数据 */
419
+ rows: any[][];
420
+ }
421
+ interface InsertRequestConfig extends RequestConfig {
422
+ insertType?: ULTIPA.InsertType;
423
+ createNodeIfNotExist?: boolean;
424
+ silent: boolean;
425
+ }
426
+ /**
427
+ * 获取插入类型
428
+ */
429
+ function GetInsertType(insertTypeNormal?: boolean, insertTypeOverwrite?: boolean, insertTypeUpsert?: boolean): 0 | 2 | 1;
430
+ /** 批量插入边 */
431
+ interface InsertHugeEdges extends InsertHugeNodes {
432
+ }
433
+ /** 查找点 */
434
+ interface SearchNodes extends SearchBase {
435
+ /** 过滤 */
436
+ filter?: string;
437
+ }
438
+ /** 查找边 */
439
+ interface SearchEdges extends SearchNodes {
440
+ }
441
+ /** 删除边 */
442
+ interface DeleteEdges {
443
+ /** 过滤 */
444
+ filter?: string;
445
+ silent?: boolean;
446
+ }
447
+ /** 删除点 */
448
+ interface DeleteNodes extends DeleteEdges {
449
+ }
450
+ /** 更新点 */
451
+ interface UpdateNodes {
452
+ /** 过滤 */
453
+ filter: string;
454
+ /** 数据值 */
455
+ values: object;
456
+ }
457
+ /** 更新边 */
458
+ interface UpdateEdges extends UpdateNodes {
459
+ }
460
+ /** 清除任务 */
461
+ interface ClearTask {
462
+ /** 所有任务 */
463
+ all?: boolean;
464
+ /** 指定ID */
465
+ id?: string;
466
+ /** 指定名称 */
467
+ name?: string;
468
+ /** 任务状态 */
469
+ status?: RequestParamType.TASK_STATUS;
470
+ }
471
+ /** 显示任务 */
472
+ interface ShowTask extends ClearTask {
473
+ /** 条目限制 */
474
+ limit?: number;
475
+ }
476
+ /** 暂停任务 */
477
+ interface PauseTask {
478
+ /** 所有任务 */
479
+ all: boolean;
480
+ /** 指定ID */
481
+ id: number;
482
+ }
483
+ /** 恢复任务 */
484
+ interface ResumeTask extends PauseTask {
485
+ }
486
+ /** 暂停任务 */
487
+ interface StopTask extends PauseTask {
488
+ }
489
+ /** 创建索引 */
490
+ interface CreateIndex {
491
+ /** schema名称 */
492
+ schema?: string;
493
+ /** 属性名 */
494
+ propertyName: string;
495
+ }
496
+ interface DropIndex extends CreateIndex {
497
+ }
498
+ /** 创建全文索引 */
499
+ interface CreateFullText {
500
+ /** schema名称 */
501
+ schema?: string;
502
+ /** 属性名 */
503
+ propertyName: string;
504
+ /** 全文名称 */
505
+ name: string;
506
+ }
507
+ /** 删除全文索引 */
508
+ interface DropFullText {
509
+ /** 全文名称 */
510
+ name: string;
511
+ }
512
+ /** 属性加载到引擎 */
513
+ interface LoadToEngin {
514
+ /** schema名称 */
515
+ schema?: string;
516
+ /** 属性名 */
517
+ name: string;
518
+ }
519
+ /** 属性从引擎卸载 */
520
+ interface UnloadFromEngin extends LoadToEngin {
521
+ }
522
+ /** 查找基类 */
523
+ interface SearchBase {
524
+ /** 别名 */
525
+ as?: string;
526
+ /** 返回 */
527
+ return?: RequestParamType.RETURN_TYPE;
528
+ /** 条目限制 */
529
+ limit?: number;
530
+ }
531
+ /** AB查找 */
532
+ interface SearchAb extends SearchBase {
533
+ /** 路径起点的过滤条件 */
534
+ src: RequestParamType.FILTER_TYPE;
535
+ /** 路径终点的过滤条件 */
536
+ dest: RequestParamType.FILTER_TYPE;
537
+ /** 设置路径的深度 */
538
+ depth: RequestParamType.DEPTH_TYPE;
539
+ /**
540
+ * 不指定边属性时,查询最短路径;
541
+ * 指定边属性时,查询以该属性为权值的最小权重和路径(无该属性的边不构成路径)
542
+ */
543
+ shortest?: string;
544
+ /** 中介点的过滤条件 */
545
+ nodeFilter?: RequestParamType.FILTER_TYPE;
546
+ /** 所有边的过滤条件 */
547
+ edgeFilter?: RequestParamType.FILTER_TYPE;
548
+ /** 升序 */
549
+ pathAsc?: string;
550
+ /** 降序 */
551
+ pathDesc?: string;
552
+ /** 边方向 */
553
+ direction?: RequestParamType.DIRECTION_TYPE;
554
+ /** 无环设置 */
555
+ noCircle?: boolean;
556
+ }
557
+ /** 自动组网 */
558
+ interface SearchAutoNet extends SearchBase {
559
+ /** 起点 */
560
+ src: RequestParamType.FILTER_TYPE;
561
+ /** 终点 */
562
+ dest?: RequestParamType.FILTER_TYPE;
563
+ /** 深度 */
564
+ depth: RequestParamType.DEPTH_TYPE;
565
+ /** 最短路径查询 */
566
+ shortest?: string;
567
+ /** 中介点的过滤条件 */
568
+ nodeFilter?: RequestParamType.FILTER_TYPE;
569
+ /** 所有边的过滤条件 */
570
+ edgeFilter?: RequestParamType.FILTER_TYPE;
571
+ /** 无环设置 */
572
+ noCircle?: boolean;
573
+ }
574
+ /** khop查找 */
575
+ interface SearchKhop extends SearchBase {
576
+ /** 起点 */
577
+ src: RequestParamType.FILTER_TYPE;
578
+ /** 终点 */
579
+ depth: RequestParamType.DEPTH_TYPE;
580
+ /** 中介点的过滤条件 */
581
+ nodeFilter?: RequestParamType.FILTER_TYPE;
582
+ /** 所有边的过滤条件 */
583
+ edgeFilter?: RequestParamType.FILTER_TYPE;
584
+ /** 边方向 */
585
+ direction?: RequestParamType.DIRECTION_TYPE;
586
+ }
587
+ /**
588
+ * 自动展开
589
+ */
590
+ interface Spread extends SearchBase {
591
+ /** 起点 */
592
+ src: RequestParamType.FILTER_TYPE;
593
+ /** 深度 */
594
+ depth: number;
595
+ /** 中介点的过滤条件 */
596
+ nodeFilter?: RequestParamType.FILTER_TYPE;
597
+ /** 所有边的过滤条件 */
598
+ edgeFilter?: RequestParamType.FILTER_TYPE;
599
+ /** 边方向 */
600
+ direction?: RequestParamType.DIRECTION_TYPE;
601
+ }
602
+ interface QueryResponseStream {
603
+ /** 开始回调 */
604
+ onStart?: () => void;
605
+ /** 关闭回调 */
606
+ onClose?: () => void;
607
+ /** 获取数据 */
608
+ onData: (data: ULTIPA.QueryResponse) => Promise<void>;
609
+ /** 结束回调 */
610
+ onEnd: () => void;
611
+ /** 错误回调 */
612
+ onError?: (err: Error) => void;
613
+ /** 暂停回调 */
614
+ onPause?: () => void;
615
+ /** Readable回调 */
616
+ onReadable?: () => void;
617
+ /** 恢复回调 */
618
+ onResume?: () => void;
619
+ /** 包大小限制 */
620
+ package_limit?: number;
621
+ }
622
+ interface createHDCGraph {
623
+ nodes?: {
624
+ [x: string]: string[];
625
+ };
626
+ edges?: {
627
+ [x: string]: string[];
628
+ };
629
+ query: "query";
630
+ type: "Graph";
631
+ update: RequestParamType.UPDATE;
632
+ default: boolean;
633
+ }
634
+ }
635
+ export declare namespace ResponseType {
636
+ interface GraphPrivilege {
637
+ [name: string]: string[];
638
+ }
639
+ export interface Algo {
640
+ clusterId: string;
641
+ name: string;
642
+ param: {
643
+ name: string;
644
+ description: string;
645
+ parameters: object;
646
+ result_opt: string;
647
+ version: string;
648
+ };
649
+ detail: string;
650
+ result_opt: {
651
+ can_realtime: boolean;
652
+ can_write_back: boolean;
653
+ can_visualization: boolean;
654
+ };
655
+ }
656
+ export interface Exta {
657
+ author: string;
658
+ detail: string;
659
+ name: string;
660
+ version: string;
661
+ }
662
+ export interface User {
663
+ username: string;
664
+ create: string;
665
+ lastLogin: string;
666
+ graph_privileges: GraphPrivilege;
667
+ system_privileges: string[];
668
+ policies: string[];
669
+ }
670
+ export interface Index {
671
+ name: string;
672
+ properties: string;
673
+ status: string;
674
+ }
675
+ export interface IndexMap {
676
+ nodeIndex: Index[];
677
+ edgeIndex: Index[];
678
+ }
679
+ export interface Stat {
680
+ cpuUsage: string;
681
+ memUsage: string;
682
+ expiredDate: string;
683
+ }
684
+ export interface Property {
685
+ schema: string;
686
+ name: string;
687
+ type: string;
688
+ description?: string;
689
+ lte?: "false" | "creating" | "true";
690
+ }
691
+ export interface AllProperty {
692
+ node: Property[];
693
+ edge: Property[];
694
+ }
695
+ export interface GraphSet {
696
+ id: string;
697
+ name: string;
698
+ description: string | "";
699
+ shards?: string[] | [];
700
+ partitionBy?: string | "";
701
+ status: string;
702
+ totalNodes: number;
703
+ totalEdges: number;
704
+ }
705
+ export interface Schema {
706
+ dbType: ULTIPA.DBType;
707
+ name: string;
708
+ description: string;
709
+ properties: Property[];
710
+ total: number;
711
+ }
712
+ export interface GraphCount {
713
+ type: string;
714
+ schema: string;
715
+ from_schema: string;
716
+ to_schema: string;
717
+ count: number;
718
+ }
719
+ export interface ShowSchema {
720
+ nodeSchema: Schema[];
721
+ edgeSchema: Schema[];
722
+ graphCount: GraphCount[];
723
+ }
724
+ export interface Privilege {
725
+ graph_privileges: string[];
726
+ system_privileges: string[];
727
+ }
728
+ export interface Policy {
729
+ name: string;
730
+ policies: string[];
731
+ graph_privileges: GraphPrivilege;
732
+ system_privileges: string[];
733
+ }
734
+ export interface Top {
735
+ process_id: string;
736
+ process_uql: string;
737
+ duration: string;
738
+ }
739
+ export interface Process extends Top {
740
+ }
741
+ export interface InsertBase {
742
+ uuids: string[];
743
+ ignore_indexes: number[];
744
+ ignore_error_codes: number[];
745
+ }
746
+ export interface InsertEdges extends InsertBase {
747
+ edges: ULTIPA.EdgeTable;
748
+ }
749
+ export interface InsertNodes extends InsertBase {
750
+ ids: string[];
751
+ }
752
+ export interface Task {
753
+ param: object;
754
+ task_info: {
755
+ task_id: string;
756
+ algo_name: string;
757
+ start_time: number;
758
+ writing_start_time: number;
759
+ end_time: number;
760
+ time_cost: number;
761
+ TASK_STATUS: number;
762
+ status_code: string;
763
+ engine_cost: number;
764
+ };
765
+ error_msg: string;
766
+ result: any;
767
+ return_type: {
768
+ is_realtime: boolean;
769
+ is_visualization: boolean;
770
+ is_write_back: boolean;
771
+ };
772
+ }
773
+ export interface Job {
774
+ job_id: string;
775
+ graph_name: string;
776
+ type: string;
777
+ uql: string;
778
+ status: RequestParamType.JOB_STATUS;
779
+ err_msg: string;
780
+ result: string;
781
+ start_time: any;
782
+ end_time: any;
783
+ progress: string;
784
+ }
785
+ export interface HDCGraph extends ULTIPA.Projection {
786
+ }
787
+ export {};
788
+ }