@neo4j-cypher/query-tools 2.0.0-next.38 → 2.0.0-next.39
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.
- package/CHANGELOG.md +9 -0
- package/api-extractor/api-report.api.md +340 -0
- package/api-extractor.json +10 -0
- package/checkApiReport.ts +4 -0
- package/dist/cjs/index.cjs +4 -3
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/esm/package.json +4 -3
- package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +2 -3
- package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.js +2 -3
- package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.js.map +1 -1
- package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.test.js.map +1 -1
- package/dist/esm/src/cypher-execution/query-result.js.map +1 -1
- package/dist/esm/src/data-transforms/cypher-type-names.d.ts +1 -2
- package/dist/esm/src/index.d.ts +5 -4
- package/dist/esm/src/index.js +1 -1
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/neo4jConnection.d.ts +2 -3
- package/dist/esm/src/neo4jConnection.js +1 -0
- package/dist/esm/src/neo4jConnection.js.map +1 -1
- package/dist/esm/src/queries/databases.d.ts +1 -2
- package/dist/esm/src/result-transformers/graph-result-transformer.d.ts +3 -4
- package/dist/esm/src/result-transformers/graph-result-transformer.js.map +1 -1
- package/dist/esm/src/{integration-tests → tests/integration}/pollingIntegrationTests.test.js +1 -1
- package/dist/esm/src/tests/integration/pollingIntegrationTests.test.js.map +1 -0
- package/dist/esm/src/tests/integration/setupTestContainer.js.map +1 -0
- package/dist/esm/src/types/cypher-data-types.d.ts +1 -2
- package/dist/esm/src/types/sdkTypes.d.ts +2 -3
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/vitest.config.d.mts +1 -1
- package/dist/esm/vitest.config.mjs +20 -4
- package/dist/esm/vitest.config.mjs.map +1 -1
- package/dist/types/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +2 -3
- package/dist/types/src/data-transforms/cypher-type-names.d.ts +1 -2
- package/dist/types/src/index.d.ts +5 -4
- package/dist/types/src/neo4jConnection.d.ts +2 -3
- package/dist/types/src/queries/databases.d.ts +1 -2
- package/dist/types/src/result-transformers/graph-result-transformer.d.ts +3 -4
- package/dist/types/src/types/cypher-data-types.d.ts +1 -2
- package/dist/types/src/types/sdkTypes.d.ts +2 -3
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/vitest.config.d.mts +1 -1
- package/package.json +5 -4
- package/src/cypher-execution/extract-unique-nodes-and-relationships.test.ts +5 -5
- package/src/cypher-execution/extract-unique-nodes-and-relationships.ts +2 -3
- package/src/cypher-execution/query-result.ts +1 -0
- package/src/data-transforms/cypher-type-names.ts +1 -1
- package/src/index.ts +17 -3
- package/src/neo4jConnection.ts +3 -2
- package/src/queries/databases.ts +1 -1
- package/src/result-transformers/graph-result-transformer.ts +7 -3
- package/src/{integration-tests → tests/integration}/pollingIntegrationTests.test.ts +2 -2
- package/src/types/cypher-data-types.ts +1 -1
- package/src/types/sdkTypes.ts +2 -2
- package/vitest.config.mts +20 -4
- package/dist/esm/src/integration-tests/pollingIntegrationTests.test.js.map +0 -1
- package/dist/esm/src/integration-tests/setupTestContainer.js.map +0 -1
- /package/dist/esm/src/{integration-tests → tests/integration}/pollingIntegrationTests.test.d.ts +0 -0
- /package/dist/esm/src/{integration-tests → tests/integration}/setupTestContainer.d.ts +0 -0
- /package/dist/esm/src/{integration-tests → tests/integration}/setupTestContainer.js +0 -0
- /package/dist/types/src/{integration-tests → tests/integration}/pollingIntegrationTests.test.d.ts +0 -0
- /package/dist/types/src/{integration-tests → tests/integration}/setupTestContainer.d.ts +0 -0
- /package/src/{integration-tests → tests/integration}/setupTestContainer.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("vitest/config").UserWorkspaceConfig;
|
|
2
2
|
export default _default;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default
|
|
1
|
+
import { defineProject } from 'vitest/config';
|
|
2
|
+
export default defineProject({
|
|
3
3
|
test: {
|
|
4
4
|
globals: true,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
projects: [
|
|
6
|
+
{
|
|
7
|
+
extends: true,
|
|
8
|
+
test: {
|
|
9
|
+
name: 'unit',
|
|
10
|
+
include: ['src/**/*.test.ts'],
|
|
11
|
+
exclude: ['src/tests/integration/**'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
extends: true,
|
|
16
|
+
test: {
|
|
17
|
+
name: 'integration',
|
|
18
|
+
include: ['src/tests/integration/**/*.test.ts'],
|
|
19
|
+
hookTimeout: 90000,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
],
|
|
7
23
|
},
|
|
8
24
|
});
|
|
9
25
|
//# sourceMappingURL=vitest.config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.mjs","sourceRoot":"","sources":["../../vitest.config.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"vitest.config.mjs","sourceRoot":"","sources":["../../vitest.config.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE;YACR;gBACE,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE;oBACJ,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC;aACF;YACD;gBACE,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE;oBACJ,IAAI,EAAE,aAAa;oBACnB,OAAO,EAAE,CAAC,oCAAoC,CAAC;oBAC/C,WAAW,EAAE,KAAK;iBACnB;aACF;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -21,9 +21,8 @@ export type DeduplicatedNodesAndRels = {
|
|
|
21
21
|
* nested objects.
|
|
22
22
|
*
|
|
23
23
|
* @param records - Array of Neo4j records to process
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
26
|
-
* @param options.keepDanglingRels - Whether to keep relationships whose start/end nodes are missing (default: false)
|
|
24
|
+
* @param nodeLimit - Configuration option: Maximum number of unique nodes to extract (optional)
|
|
25
|
+
* @param keepDanglingRels - Configuration option: Whether to keep relationships whose start/end nodes are missing (default: false)
|
|
27
26
|
*
|
|
28
27
|
* @returns The {@link DeduplicatedNodesAndRels} containing unique nodes and relationships
|
|
29
28
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CypherDataType, CypherProperty } from '../types/cypher-data-types.js';
|
|
2
|
-
type CypherPropertyName = 'Float' | 'null' | 'String' | 'Bigint' | 'Boolean' | `List${string}` | 'LocalTime' | 'Time' | 'Date' | 'LocalDateTime' | 'DateTime' | 'Integer' | 'Duration' | 'Point' | 'ByteArray' | 'Vector' | 'Unknown';
|
|
2
|
+
export type CypherPropertyName = 'Float' | 'null' | 'String' | 'Bigint' | 'Boolean' | `List${string}` | 'LocalTime' | 'Time' | 'Date' | 'LocalDateTime' | 'DateTime' | 'Integer' | 'Duration' | 'Point' | 'ByteArray' | 'Vector' | 'Unknown';
|
|
3
3
|
export declare const getPropertyTypeDisplayName: (val?: CypherProperty) => CypherPropertyName;
|
|
4
4
|
export type CypherDataTypeName = CypherPropertyName | 'Node' | 'Relationship' | 'Path' | 'Map' | 'Vector';
|
|
5
5
|
export declare function getCypherTypeName(val?: CypherDataType): CypherDataTypeName;
|
|
6
|
-
export {};
|
|
@@ -4,14 +4,15 @@ export * from './cypher-execution/extract-unique-nodes-and-relationships.js';
|
|
|
4
4
|
export * from './cypher-execution/query-result.js';
|
|
5
5
|
export type { Neo4jType } from './cypher-execution/query-result.js';
|
|
6
6
|
export { getCypherTypeName, getPropertyTypeDisplayName, } from './data-transforms/cypher-type-names.js';
|
|
7
|
-
export type { CypherDataTypeName } from './data-transforms/cypher-type-names.js';
|
|
7
|
+
export type { CypherDataTypeName, CypherPropertyName, } from './data-transforms/cypher-type-names.js';
|
|
8
8
|
export * from './data-transforms/record-to-string.js';
|
|
9
9
|
export * from './types/cypher-data-types.js';
|
|
10
10
|
export type { ConnectedMetadataPoller as CypherMetadataPoller, DisconnectedMetadataPoller as EmptyMetadataPoller, MetadataPoller, } from './metadataPoller.js';
|
|
11
|
-
export type { Neo4jConnection, QueryResultWithLimit, } from './neo4jConnection.js';
|
|
12
|
-
export type { Database } from './queries/databases.js';
|
|
13
|
-
export { graphResultTransformer } from './result-transformers/graph-result-transformer.js';
|
|
11
|
+
export type { Neo4jConnection, QueryResultWithLimit, RunCypherQueryArgs, SdkQueryArgs, } from './neo4jConnection.js';
|
|
12
|
+
export type { Database, DatabaseStatus } from './queries/databases.js';
|
|
13
|
+
export { graphResultTransformer, GraphResult, } from './result-transformers/graph-result-transformer.js';
|
|
14
14
|
export { Neo4jSchemaPoller } from './schemaPoller.js';
|
|
15
15
|
export type { ConnnectionResult } from './schemaPoller.js';
|
|
16
16
|
export type { CypherDataType } from './types/cypher-data-types.js';
|
|
17
17
|
export { getVersion } from './queries/version.js';
|
|
18
|
+
export { ExecuteQueryArgs, QueryType, ExtendedQueryConfig, Result, } from './types/sdkTypes.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Driver, ManagedTransaction, QueryResult, Session } from 'neo4j-driver';
|
|
2
2
|
import type { Database } from './queries/databases.js';
|
|
3
3
|
import type { ExecuteQueryArgs, QueryType } from './types/sdkTypes.js';
|
|
4
|
-
type SdkQueryArgs = {
|
|
4
|
+
export type SdkQueryArgs = {
|
|
5
5
|
queryType: QueryType;
|
|
6
6
|
abortSignal?: AbortSignal;
|
|
7
7
|
};
|
|
8
|
-
type RunCypherQueryArgs = {
|
|
8
|
+
export type RunCypherQueryArgs = {
|
|
9
9
|
query: string;
|
|
10
10
|
parameters: Record<string, unknown>;
|
|
11
11
|
database?: string;
|
|
@@ -33,4 +33,3 @@ export declare class Neo4jConnection {
|
|
|
33
33
|
healthcheck(): Promise<boolean>;
|
|
34
34
|
dispose(): void;
|
|
35
35
|
}
|
|
36
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CypherVersion } from '@neo4j-cypher/language-support';
|
|
2
2
|
import type { ExecuteQueryArgs } from '../types/sdkTypes.js';
|
|
3
|
-
type DatabaseStatus = 'online' | 'offline' | 'starting' | 'stopping' | 'store copying' | 'initial' | 'dirty' | 'quarantined' | 'unknown' | 'dropped' | 'deallocating';
|
|
3
|
+
export type DatabaseStatus = 'online' | 'offline' | 'starting' | 'stopping' | 'store copying' | 'initial' | 'dirty' | 'quarantined' | 'unknown' | 'dropped' | 'deallocating';
|
|
4
4
|
export type Database = {
|
|
5
5
|
name: string;
|
|
6
6
|
address: string;
|
|
@@ -25,4 +25,3 @@ export type Database = {
|
|
|
25
25
|
export declare function listDatabases(): ExecuteQueryArgs<{
|
|
26
26
|
databases: Database[];
|
|
27
27
|
}>;
|
|
28
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Integer, Record, ResultSummary } from 'neo4j-driver';
|
|
1
|
+
import type { Integer, Record as Neo4jRecord, ResultSummary } from 'neo4j-driver';
|
|
2
2
|
import type { DeduplicatedNodesAndRels } from '../cypher-execution/extract-unique-nodes-and-relationships.js';
|
|
3
3
|
/**
|
|
4
4
|
* Result type for graph queries that includes deduplicated nodes and relationships
|
|
@@ -6,9 +6,9 @@ import type { DeduplicatedNodesAndRels } from '../cypher-execution/extract-uniqu
|
|
|
6
6
|
*
|
|
7
7
|
* See {@link DeduplicatedNodesAndRels} for the type of the nodes and relationships.
|
|
8
8
|
*/
|
|
9
|
-
type GraphResult = DeduplicatedNodesAndRels & {
|
|
9
|
+
export type GraphResult = DeduplicatedNodesAndRels & {
|
|
10
10
|
/** Original Neo4j records returned by the query */
|
|
11
|
-
records:
|
|
11
|
+
records: Neo4jRecord[];
|
|
12
12
|
summary: ResultSummary<Integer>;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
@@ -34,4 +34,3 @@ type GraphResult = DeduplicatedNodesAndRels & {
|
|
|
34
34
|
* @returns ResultTransformer producing {@link GraphResult}
|
|
35
35
|
*/
|
|
36
36
|
export declare const graphResultTransformer: import("neo4j-driver").ResultTransformer<GraphResult>;
|
|
37
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Date, DateTime, Duration, Integer, LocalDateTime, LocalTime, Node, Path, Point, Relationship, Time, Vector } from 'neo4j-driver';
|
|
2
|
-
type NumberOrInteger = number | Integer | bigint;
|
|
2
|
+
export type NumberOrInteger = number | Integer | bigint;
|
|
3
3
|
/**
|
|
4
4
|
The neo4j driver type mapping - https://neo4j.com/docs/javascript-manual/current/cypher-workflow/#js-driver-type-mapping
|
|
5
5
|
|
|
@@ -38,4 +38,3 @@ export declare const isCypherTemporalType: (anything: unknown) => anything is Cy
|
|
|
38
38
|
export declare const isCypherBasicPropertyType: (value: unknown) => value is CypherBasicPropertyType;
|
|
39
39
|
export declare const isCypherPropertyType: (value: unknown) => value is CypherProperty;
|
|
40
40
|
export declare function isInt8Array(val: unknown): val is Int8Array;
|
|
41
|
-
export {};
|
|
@@ -7,12 +7,11 @@ export declare const DbType: {
|
|
|
7
7
|
PROPERTY_SHARD: string;
|
|
8
8
|
};
|
|
9
9
|
export type QueryType = 'system' | 'user-direct' | 'user-action' | 'user-transpiled';
|
|
10
|
-
type ExtendedQueryConfig<T> = QueryConfig<T> & Required<Pick<QueryConfig<T>, 'routing' | 'resultTransformer'>>;
|
|
11
|
-
type Result<T> = T & {
|
|
10
|
+
export type ExtendedQueryConfig<T> = QueryConfig<T> & Required<Pick<QueryConfig<T>, 'routing' | 'resultTransformer'>>;
|
|
11
|
+
export type Result<T> = T & {
|
|
12
12
|
summary: ResultSummary;
|
|
13
13
|
};
|
|
14
14
|
export type ExecuteQueryArgs<T> = {
|
|
15
15
|
query: string;
|
|
16
16
|
queryConfig: ExtendedQueryConfig<Result<T>>;
|
|
17
17
|
};
|
|
18
|
-
export {};
|