import { type EdgeData } from "arangojs/documents"; import * as graphs from "arangojs/graphs"; import { DocumentRemovalResult, RemoveDocumentOptions, UpdateDocumentOptions, type ObjectWithDocumentKey, type Patch } from "./arango-collection"; import { ArangoCollection, DocumentData, DocumentOperationFailure, DocumentOperationResult, InsertDocumentOptions, ReplaceDocumentOptions } from "./arango-collection.js"; import { ArangoDatabase } from "./arango-database.js"; export { EdgeData }; export type EdgeDefinition = { collection: string; from: string[]; to: string[]; }; export type Example = string | Record | (string | Record)[]; export declare class AbstractGraph { protected _data: graphs.GraphDescription; protected _vertexCollectionsCache: Map; protected _edgeCollectionsCache: Map; protected _db: ArangoDatabase; protected __edgeCollectionNames: string[]; protected __vertexCollectionNames: string[]; constructor(db: ArangoDatabase, info: graphs.GraphDescription); get _arangojs(): graphs.Graph; _edgeCollections(): Promise; _vertexCollections(excludeOrphans?: boolean): Promise; _edges(vertexExample: Example, options?: { minDepth?: number; maxDepth?: number; direction?: "outbound" | "inbound" | "any"; edgeCollectionRestriction?: string[]; edgeExamples?: Example; includeData?: boolean; }): Promise; _vertices(vertexExample: Example, options?: { vertexCollectionRestriction?: string[]; }): Promise; _fromVertex(edgeId?: string): Promise; _toVertex(edgeId?: string): Promise; _getEdgeCollectionByName(name: string): Promise; _getVertexCollectionByName(name: string): Promise; _neighbors(vertexExample: Example, options?: { vertexCollectionRestriction?: string[]; edgeCollectionRestriction?: string[]; minDepth?: number; maxDepth?: number; direction?: "outbound" | "inbound" | "any"; neighborExamples?: Example; edgeExamples?: Example; includeData?: boolean; }): Promise; _commonNeighbors(vertex1Example: Example, vertex2Example: Example, optionsVertex1?: { direction?: "outbound" | "inbound" | "any"; vertexCollectionRestriction?: string[]; edgeCollectionRestriction?: string[]; minDepth?: number; maxDepth?: number; includeData?: boolean; }, optionsVertex2?: { direction?: "outbound" | "inbound" | "any"; vertexCollectionRestriction?: string[]; edgeCollectionRestriction?: string[]; minDepth?: number; maxDepth?: number; includeData?: boolean; }): Promise<{ left: string; right: string; neighbors: any[]; }[]>; _countCommonNeighbors(vertex1Example: Example, vertex2Example: Example, optionsVertex1?: { direction?: "outbound" | "inbound" | "any"; vertexCollectionRestriction?: string[]; edgeCollectionRestriction?: string[]; minDepth?: number; maxDepth?: number; includeData?: boolean; }, optionsVertex2?: { direction?: "outbound" | "inbound" | "any"; vertexCollectionRestriction?: string[]; edgeCollectionRestriction?: string[]; minDepth?: number; maxDepth?: number; includeData?: boolean; }): Promise[]>[]>; _commonProperties(vertex1Example: Example, vertex2Example: Example, options?: { ignoreProperties?: string[]; edgeCollectionRestriction?: string[]; }): Promise[]>; _countCommonProperties(vertex1Example: Example, vertex2Example: Example, options?: { ignoreProperties?: string[]; edgeCollectionRestriction?: string[]; }): Promise[]>; _paths(options?: { minLength?: number; maxLength?: number; followCycles?: boolean; direction?: "outbound" | "inbound" | "any"; edgeCollectionRestriction?: string[]; }): Promise<{ source: any; destination: any; edges: any[]; vertices: any[]; }[]>; _shortestPath(startVertexExample: Example, endVertexExample: Example, options?: { direction?: "outbound" | "inbound" | "any"; edgeCollectionRestriction?: string[]; weightAttribute?: string; defaultWeight?: number; stopAtFirstMatch?: boolean; }): Promise<{ vertices: string[]; edges: any[]; distance: number; }[]>; _distanceTo(startVertexExample: Example, endVertexExample: Example, options?: { edgeCollectionRestriction?: string[]; direction?: "outbound" | "inbound" | "any"; weightAttribute?: string; defaultWeight?: number; }): Promise; _absoluteEccentricity(vertexExample: Example, options?: { direction?: "outbound" | "inbound" | "any"; weightAttribute?: string; defaultWeight?: number; }): Promise>; _farness(vertexExample: Example, options?: any): Promise>; _absoluteCloseness(vertexExample: Example, options?: { direction?: "outbound" | "inbound" | "any"; weightAttribute?: string; defaultWeight?: number; }): Promise>; _eccentricity(options?: { direction?: "outbound" | "inbound" | "any"; weightAttribute?: string; defaultWeight?: number; }): Promise>; _closeness(options?: any): Promise>; _absoluteBetweenness(example: Example, options?: { weightAttribute?: string; defaultWeight?: number; direction?: "outbound" | "inbound" | "any"; }): Promise>; _betweenness(options?: { weightAttribute?: string; defaultWeight?: number; direction?: "outbound" | "inbound" | "any"; }): Promise; _radius(options?: any): Promise; _diameter(options?: { direction?: "outbound" | "inbound" | "any"; weightAttribute?: string; defaultWeight?: number; }): Promise; _orphanCollections(): Promise; _getConnectingEdges(vertexExample1: Example, vertexExample2: Example, options?: { vertex1CollectionRestriction?: string[]; vertex2CollectionRestriction?: string[]; includeData?: boolean; }): Promise; _flushCache(): void; } export declare function _relation(relationName: string, fromVertexCollections: string | string[], toVertexCollections: string | string[]): EdgeDefinition; export declare function _edgeDefinitions(...relations: EdgeDefinition[]): EdgeDefinition[]; export declare function _extendEdgeDefinitions(edgeDefinitions: EdgeDefinition[], ...relations: EdgeDefinition[]): EdgeDefinition[]; export declare function _exists(graphName: string): Promise; export declare function _listObjects(): Promise; export declare class EdgeCollection = any> extends ArangoCollection { protected _graphData: graphs.GraphDescription; constructor(collection: ArangoCollection, _graphData: graphs.GraphDescription); get _edgeCollection(): graphs.GraphEdgeCollection; save: EdgeCollection["insert"]; insert(fromId: string, toId: string, data: DocumentData, options?: InsertDocumentOptions): Promise>; insert(data: EdgeData, options?: InsertDocumentOptions): Promise>; insert(data: EdgeData[], options?: InsertDocumentOptions): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; remove(document: string | ObjectWithDocumentKey, overwrite?: boolean, waitForSync?: boolean): Promise>; remove(document: string | ObjectWithDocumentKey, options?: RemoveDocumentOptions): Promise>; remove(documents: (string | ObjectWithDocumentKey)[], overwrite?: boolean, waitForSync?: boolean): Promise<(DocumentRemovalResult | DocumentOperationFailure)[]>; remove(documents: (string | ObjectWithDocumentKey)[], options?: RemoveDocumentOptions): Promise<(DocumentRemovalResult | DocumentOperationFailure)[]>; replace(document: string | ObjectWithDocumentKey, data: DocumentData, options?: ReplaceDocumentOptions): Promise>; replace(document: string | ObjectWithDocumentKey, data: DocumentData, overwrite?: boolean, waitForSync?: boolean): Promise>; replace(documents: (string | ObjectWithDocumentKey)[], data: DocumentData[], options?: ReplaceDocumentOptions): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; replace(documents: (string | ObjectWithDocumentKey)[], data: DocumentData[], overwrite?: boolean, waitForSync?: boolean): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; update(document: string | ObjectWithDocumentKey, data: Patch>, options?: UpdateDocumentOptions): Promise>; update(document: string | ObjectWithDocumentKey, data: Patch>, overwrite?: boolean, keepNull?: boolean, waitForSync?: boolean): Promise>; update(documents: (string | ObjectWithDocumentKey)[], data: Patch>[], options?: UpdateDocumentOptions): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; update(documents: (string | ObjectWithDocumentKey)[], data: Patch>[], overwrite?: boolean, keepNull?: boolean, waitForSync?: boolean): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; } export declare class VertexCollection = any> extends ArangoCollection { protected _graphData: graphs.GraphDescription; constructor(collection: ArangoCollection, _graphData: graphs.GraphDescription); get _vertexCollection(): graphs.GraphVertexCollection; save: VertexCollection["insert"]; insert(fromId: string, toId: string, data: DocumentData, options?: InsertDocumentOptions): Promise>; insert(data: DocumentData, options?: InsertDocumentOptions): Promise>; insert(data: DocumentData[], options?: InsertDocumentOptions): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; remove(document: string | ObjectWithDocumentKey, overwrite?: boolean, waitForSync?: boolean): Promise>; remove(document: string | ObjectWithDocumentKey, options?: RemoveDocumentOptions): Promise>; remove(documents: (string | ObjectWithDocumentKey)[], overwrite?: boolean, waitForSync?: boolean): Promise<(DocumentRemovalResult | DocumentOperationFailure)[]>; remove(documents: (string | ObjectWithDocumentKey)[], options?: RemoveDocumentOptions): Promise<(DocumentRemovalResult | DocumentOperationFailure)[]>; replace(document: string | ObjectWithDocumentKey, data: DocumentData, options?: ReplaceDocumentOptions): Promise>; replace(document: string | ObjectWithDocumentKey, data: DocumentData, overwrite?: boolean, waitForSync?: boolean): Promise>; replace(documents: (string | ObjectWithDocumentKey)[], data: DocumentData[], options?: ReplaceDocumentOptions): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; replace(documents: (string | ObjectWithDocumentKey)[], data: DocumentData[], overwrite?: boolean, waitForSync?: boolean): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; update(document: string | ObjectWithDocumentKey, data: Patch>, options?: UpdateDocumentOptions): Promise>; update(document: string | ObjectWithDocumentKey, data: Patch>, overwrite?: boolean, keepNull?: boolean, waitForSync?: boolean): Promise>; update(documents: (string | ObjectWithDocumentKey)[], data: Patch>[], options?: UpdateDocumentOptions): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; update(documents: (string | ObjectWithDocumentKey)[], data: Patch>[], overwrite?: boolean, keepNull?: boolean, waitForSync?: boolean): Promise<(DocumentOperationResult | DocumentOperationFailure)[]>; } //# sourceMappingURL=general-graph-common.d.ts.map