@langchain/community
Version:
Third-party integrations for LangChain.js
1 lines • 4.77 kB
Source Map (JSON)
{"version":3,"file":"neo4j_graph.d.ts","names":["RoutingControl","GraphDocument","Any","Neo4jGraphConfig","StructuredSchema","NodeType","RelType","PathType","Record","AddGraphDocumentsConfig","BASE_ENTITY_LABEL","Neo4jGraph","RecordShape","url","username","password","database","timeoutMs","enhancedSchema","Promise"],"sources":["../../src/graphs/neo4j_graph.d.ts"],"sourcesContent":["import { RoutingControl } from \"neo4j-driver\";\nimport { GraphDocument } from \"./document.js\";\ntype Any = any;\ninterface Neo4jGraphConfig {\n url: string;\n username: string;\n password: string;\n database?: string;\n timeoutMs?: number;\n enhancedSchema?: boolean;\n}\ninterface StructuredSchema {\n nodeProps: {\n [key: NodeType[\"labels\"]]: NodeType[\"properties\"];\n };\n relProps: {\n [key: RelType[\"type\"]]: RelType[\"properties\"];\n };\n relationships: PathType[];\n metadata?: {\n constraint: Record<string, Any>;\n index: Record<string, Any>;\n };\n}\nexport interface AddGraphDocumentsConfig {\n baseEntityLabel?: boolean;\n includeSource?: boolean;\n}\nexport type NodeType = {\n labels: string;\n properties: {\n property: string;\n type: string;\n }[];\n};\nexport type RelType = {\n type: string;\n properties: {\n property: string;\n type: string;\n }[];\n};\nexport type PathType = {\n start: string;\n type: string;\n end: string;\n};\nexport declare const BASE_ENTITY_LABEL = \"__Entity__\";\n/**\n * @security *Security note*: Make sure that the database connection uses credentials\n * that are narrowly-scoped to only include necessary permissions.\n * Failure to do so may result in data corruption or loss, since the calling\n * code may attempt commands that would result in deletion, mutation\n * of data if appropriately prompted or reading sensitive data if such\n * data is present in the database.\n * The best way to guard against such negative outcomes is to (as appropriate)\n * limit the permissions granted to the credentials used with this tool.\n * For example, creating read only users for the database is a good way to\n * ensure that the calling code cannot mutate or delete data.\n *\n * @link See https://js.langchain.com/docs/security for more information.\n */\nexport declare class Neo4jGraph {\n private driver;\n private database;\n private timeoutMs;\n private enhancedSchema;\n protected schema: string;\n protected structuredSchema: StructuredSchema;\n constructor({ url, username, password, database, timeoutMs, enhancedSchema }: Neo4jGraphConfig);\n static initialize(config: Neo4jGraphConfig): Promise<Neo4jGraph>;\n getSchema(): string;\n getStructuredSchema(): StructuredSchema;\n query<RecordShape extends Record<string, Any> = Record<string, Any>>(query: string, params?: Record<string, Any>, routing?: RoutingControl): Promise<RecordShape[]>;\n verifyConnectivity(): Promise<void>;\n refreshSchema(): Promise<void>;\n enhancedSchemaCypher(labelOrType: string, properties: {\n property: string;\n type: string;\n }[], exhaustive: boolean, isRelationship?: boolean): Promise<string>;\n addGraphDocuments(graphDocuments: GraphDocument[], config?: AddGraphDocumentsConfig): Promise<void>;\n close(): Promise<void>;\n}\nexport {};\n//# sourceMappingURL=neo4j_graph.d.ts.map"],"mappings":";;;;KAEKE,GAAAA;UACKC,gBAAAA;EADLD,GAAAA,EAAAA,MAAG;EACEC,QAAAA,EAAAA,MAAAA;EAQAC,QAAAA,EAAAA,MAAAA;EAEIC,QAAAA,CAAAA,EAAAA,MAAAA;EAAqBA,SAAAA,CAAAA,EAAAA,MAAAA;EAGrBC,cAAAA,CAAAA,EAAAA,OAAAA;;UALJF,gBAAAA,CAOSG;EAEgBL,SAAAA,EAAAA;IAAfM,CAAAA,GAAAA,EAPNH,QAOMG,CAAAA,QAAAA,CAAAA,CAAAA,EAPeH,QAOfG,CAAAA,YAAAA,CAAAA;EACUN,CAAAA;EAAfM,QAAAA,EAAAA;IAAM,CAAA,GAAA,EALPF,OAKO,CAAA,MAAA,CAAA,CAAA,EALWA,OAKX,CAAA,YAAA,CAAA;EAGJG,CAAAA;EAILJ,aAAQ,EAVDE,QAUC,EAAA;EAORD,QAAAA,CAAAA,EAAO;IAOPC,UAAQ,EAtBAC,MAsBA,CAAA,MAAA,EAtBeN,GAsBf,CAAA;IAKCQ,KAAAA,EA1BNF,MA0BME,CAAAA,MAAiB,EA1BRR,GA0BQ,CAAA;EAejBS,CAAAA;;AAOHE,UA7CDJ,uBAAAA,CA6CCI;EAAKC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