@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 GQLDB Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # Ultipa Node.js Driver
2
+
3
+ Official Node.js/TypeScript driver for Ultipa graph database (GQL).
4
+
5
+ ## Requirements
6
+
7
+ - Node.js 18+
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @ultipa-graph/ultipa-driver
13
+ ```
14
+
15
+ > **Note:** This is the v6.x driver for Ultipa Graph. If you are using Ultipa v5.x, please install [@ultipa-graph/ultipa-driver@5.1.5-s5.2](https://www.npmjs.com/package/@ultipa-graph/ultipa-driver/v/5.1.5-s5.2). If you are using Ultipa v4.x, please install [@ultipa-graph/ultipa-node-sdk@4.5.0-s4.4](https://www.npmjs.com/package/@ultipa-graph/ultipa-node-sdk/v/4.5.0-s4.4).
16
+
17
+ ## Quick Start
18
+
19
+ ```typescript
20
+ import { GqldbClient, ConfigBuilder } from '@ultipa-graph/ultipa-driver';
21
+
22
+ async function main() {
23
+ const client = new GqldbClient(
24
+ new ConfigBuilder()
25
+ .hosts('localhost:60061')
26
+ .username('admin')
27
+ .password('password')
28
+ .defaultGraph('myGraph')
29
+ .build()
30
+ );
31
+
32
+ try {
33
+ await client.login('admin', 'password');
34
+
35
+ const response = await client.gql('MATCH (n) RETURN n LIMIT 10');
36
+
37
+ console.log('Rows:', response.rowCount);
38
+ console.log('Columns:', response.columns);
39
+ console.log('Data:', response.toObjects());
40
+ } finally {
41
+ await client.close();
42
+ }
43
+ }
44
+
45
+ main().catch(console.error);
46
+ ```
47
+
48
+ ## Features
49
+
50
+ - GQL query execution with parameters
51
+ - Streaming results for large datasets
52
+ - Transaction support (begin, commit, rollback)
53
+ - Graph management (create, drop, list)
54
+ - Bulk import for high-throughput loading
55
+ - Algorithm support (CALL algo.pagerank, algo.degree, etc.)
56
+ - TypeScript support
57
+ - Health checks
58
+
59
+ ## Documentation
60
+
61
+ See [GUIDE.md](GUIDE.md) for detailed usage.
62
+
63
+ ## License
64
+
65
+ [MIT License](LICENSE)
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Main client for GQLDB Node.js driver.
3
+ */
4
+ import { EventEmitter } from 'events';
5
+ import { GqldbConfig } from './config';
6
+ import { Response, InsertNodesResult, InsertEdgesResult, DeleteResult, ExportNodesResult, ExportEdgesResult, ExportConfig, ExportChunk } from './response';
7
+ import { Session } from './session';
8
+ import { Transaction } from './transaction';
9
+ import { GraphInfo, GraphType, HealthStatus, CacheStats, CacheType, Statistics, CompactResult, ComputeTopologyResult, NodeData, EdgeData, BulkCreateNodesOptions, BulkCreateEdgesOptions, BulkImportOptions, BulkImportSession, CheckpointResult, EndBulkImportResult, AbortBulkImportResult, BulkImportStatus, TransactionInfo } from './types';
10
+ /** Configuration for a query */
11
+ export interface QueryConfig {
12
+ graphName?: string;
13
+ parameters?: Record<string, any>;
14
+ transactionId?: number;
15
+ timeout?: number;
16
+ readOnly?: boolean;
17
+ /** Max paths to return from path queries (0 = unlimited) */
18
+ maxPathResults?: number;
19
+ }
20
+ /** Configuration for insert nodes */
21
+ export interface InsertNodesConfig {
22
+ options?: BulkCreateNodesOptions;
23
+ bulkImportSessionId?: string;
24
+ }
25
+ /** Configuration for insert edges */
26
+ export interface InsertEdgesConfig {
27
+ options?: BulkCreateEdgesOptions;
28
+ bulkImportSessionId?: string;
29
+ }
30
+ /**
31
+ * Health watcher interface for streaming health updates.
32
+ * Emits 'status' events with HealthStatus and 'error' events on failure.
33
+ */
34
+ export interface HealthWatcher extends EventEmitter {
35
+ /** Stop watching health updates */
36
+ stop(): void;
37
+ }
38
+ /** Main client for interacting with GQLDB */
39
+ export declare class GqldbClient {
40
+ private config;
41
+ private clients;
42
+ private sessions;
43
+ private txManager;
44
+ private closed;
45
+ private sessionService;
46
+ private queryService;
47
+ private graphService;
48
+ private transactionService;
49
+ private dataService;
50
+ private healthService;
51
+ private adminService;
52
+ private bulkImportService;
53
+ /** Get session metadata for authenticated requests */
54
+ private getSessionMetadata;
55
+ constructor(config: GqldbConfig);
56
+ /** Close the client and all connections */
57
+ close(): Promise<void>;
58
+ /** Authenticate the user and create a session */
59
+ login(username: string, password: string): Promise<Session>;
60
+ /** Terminate the current session */
61
+ logout(): Promise<void>;
62
+ /** Check the connection and return the latency in nanoseconds */
63
+ ping(): Promise<number>;
64
+ /** Execute a GQL query and return the result */
65
+ gql(query: string, config?: QueryConfig): Promise<Response>;
66
+ /** Execute a GQL query and stream the results */
67
+ gqlStream(query: string, config?: QueryConfig, callback?: (response: Response) => void): Promise<void>;
68
+ /** Return the execution plan for a query */
69
+ explain(query: string, config?: QueryConfig): Promise<string>;
70
+ /** Execute a query with profiling and return statistics */
71
+ profile(query: string, config?: QueryConfig): Promise<string>;
72
+ /** Create a new graph */
73
+ createGraph(name: string, graphType?: GraphType, description?: string): Promise<void>;
74
+ /** Delete a graph */
75
+ dropGraph(name: string, ifExists?: boolean): Promise<void>;
76
+ /** Set the current graph for the session */
77
+ useGraph(name: string): Promise<void>;
78
+ /** Return all available graphs */
79
+ listGraphs(): Promise<GraphInfo[]>;
80
+ /** Return information about a specific graph */
81
+ getGraphInfo(name: string): Promise<GraphInfo>;
82
+ /** Start a new transaction */
83
+ beginTransaction(graphName: string, readOnly?: boolean, timeout?: number): Promise<Transaction>;
84
+ /** Commit a transaction */
85
+ commit(transactionId: number): Promise<boolean>;
86
+ /** Rollback a transaction */
87
+ rollback(transactionId: number): Promise<boolean>;
88
+ /** Return active transactions */
89
+ listTransactions(): Promise<TransactionInfo[]>;
90
+ /** Execute a function within a transaction */
91
+ withTransaction<T>(graphName: string, fn: (txId: number) => Promise<T>, readOnly?: boolean): Promise<T>;
92
+ /** Insert multiple nodes into a graph */
93
+ insertNodes(graphName: string, nodes: NodeData[], config?: InsertNodesConfig): Promise<InsertNodesResult>;
94
+ /** Insert multiple edges into a graph */
95
+ insertEdges(graphName: string, edges: EdgeData[], config?: InsertEdgesConfig): Promise<InsertEdgesResult>;
96
+ /** Delete nodes from a graph */
97
+ deleteNodes(graphName: string, nodeIds?: string[], labels?: string[], where?: string): Promise<DeleteResult>;
98
+ /** Delete edges from a graph */
99
+ deleteEdges(graphName: string, edgeIds?: string[], label?: string, where?: string): Promise<DeleteResult>;
100
+ /**
101
+ * Export graph data in JSON Lines format (streaming).
102
+ * @param config Export configuration
103
+ * @param callback Callback for each exported chunk
104
+ */
105
+ export(config: ExportConfig, callback?: (chunk: ExportChunk) => void): Promise<void>;
106
+ /**
107
+ * Stream nodes from a graph
108
+ * @deprecated Use export() with ExportConfig instead
109
+ */
110
+ exportNodes(graphName: string, labels?: string[], limit?: number, callback?: (result: ExportNodesResult) => void): Promise<void>;
111
+ /**
112
+ * Stream edges from a graph
113
+ * @deprecated Use export() with ExportConfig instead
114
+ */
115
+ exportEdges(graphName: string, labels?: string[], limit?: number, callback?: (result: ExportEdgesResult) => void): Promise<void>;
116
+ /** Check the health of a service */
117
+ healthCheck(service?: string): Promise<HealthStatus>;
118
+ /**
119
+ * Watch health status changes via server-side streaming.
120
+ * Returns a HealthWatcher that emits 'status' events with HealthStatus values.
121
+ * Call stop() to cancel the stream.
122
+ *
123
+ * @param service - Optional service name to watch
124
+ * @returns HealthWatcher - EventEmitter with stop() method
125
+ *
126
+ * @example
127
+ * ```typescript
128
+ * const watcher = client.watch();
129
+ * watcher.on('status', (status: HealthStatus) => {
130
+ * console.log('Health status:', status);
131
+ * });
132
+ * watcher.on('error', (err) => {
133
+ * console.error('Watch error:', err);
134
+ * });
135
+ * watcher.on('end', () => {
136
+ * console.log('Watch stream ended');
137
+ * });
138
+ * // Later, to stop watching:
139
+ * watcher.stop();
140
+ * ```
141
+ */
142
+ watch(service?: string): HealthWatcher;
143
+ /** Pre-allocate parser instances */
144
+ warmupParser(count: number): Promise<void>;
145
+ /** Return cache statistics */
146
+ getCacheStats(cacheType?: CacheType): Promise<CacheStats>;
147
+ /** Clear the specified cache */
148
+ clearCache(cacheType?: CacheType): Promise<void>;
149
+ /** Return database statistics */
150
+ getStatistics(graphName?: string): Promise<Statistics>;
151
+ /** Invalidate the RBAC permission cache */
152
+ invalidatePermissionCache(username?: string): Promise<void>;
153
+ /** Trigger manual compaction of the database storage */
154
+ compact(): Promise<CompactResult>;
155
+ /** Wait for the computing engine topology to be ready */
156
+ waitForComputeTopology(graphName: string, timeoutMs?: number): Promise<ComputeTopologyResult>;
157
+ /**
158
+ * Start a bulk import session for optimized high-throughput inserts.
159
+ * @param graphName Target graph name
160
+ * @param options Optional bulk import configuration
161
+ */
162
+ startBulkImport(graphName: string, options?: BulkImportOptions): Promise<BulkImportSession>;
163
+ /**
164
+ * @deprecated Checkpoint is no longer needed. Use endBulkImport() which performs a final flush.
165
+ */
166
+ checkpoint(sessionId: string): Promise<CheckpointResult>;
167
+ /**
168
+ * End the bulk import session with a final checkpoint.
169
+ * @param sessionId Bulk import session ID
170
+ */
171
+ endBulkImport(sessionId: string): Promise<EndBulkImportResult>;
172
+ /**
173
+ * Cancel the bulk import session without final sync.
174
+ * @param sessionId Bulk import session ID
175
+ */
176
+ abortBulkImport(sessionId: string): Promise<AbortBulkImportResult>;
177
+ /**
178
+ * Return the current status of a bulk import session.
179
+ * @param sessionId Bulk import session ID
180
+ */
181
+ getBulkImportStatus(sessionId: string): Promise<BulkImportStatus>;
182
+ /** Get the current session */
183
+ getSession(): Session | null;
184
+ /** Check if there is an active session */
185
+ isLoggedIn(): boolean;
186
+ /** Get the client configuration */
187
+ getConfig(): GqldbConfig;
188
+ /** Whether this client is connected to a cluster deployment */
189
+ get isCluster(): boolean;
190
+ /** Get the cluster ID (empty string if not a cluster) */
191
+ get clusterId(): string;
192
+ /** Get the partition count (0 if not a cluster) */
193
+ get partitionCount(): number;
194
+ }