import { NeptuneClient, ReaderNeptuneConnection } from './../platform-sdk-neptune'; import { LoggerContext } from './../platform-sdk-logging'; import { EntityAssignable, PersistedObjectAssignable } from './../jupiter-types'; import { EntityFromIntegration, Identifiable, IntegrationRelationship } from '../persister/types'; export declare type GraphClientConfig = { loggerContext: LoggerContext; accountId: string; integrationInstanceId: string; neptuneClient: NeptuneClient; }; /** * Provides strong typing on some system properties. */ interface PropertyFilters { _type?: string; _class?: string | string[]; _key?: string; _integrationInstanceId?: string; [property: string]: any; } /** * Declares properties required for all integration graph access. */ interface RequiredPropertyFilters extends PropertyFilters { _accountId: string; } /** * A small wrapper around the gremlin client that does not * return any extra information about the edge or vertex * that is not needed by integrations. Instead, just * the properties stored on the vertices or edges are returned. */ export default class GraphClient { readonly config: GraphClientConfig; constructor(config: GraphClientConfig); /** * Find entities in the graph that were created by the current integration * instance. * * @param type the entity._type values to find, where a string finds one type * of entity and a string[] finds multiple types of entities * @param propertyFilters optional additional entity properties that must * match */ findEntitiesByType(type: string | string[], propertyFilters?: PropertyFilters, hasNotProperties?: string[]): Promise; /** * Find entities in the graph that were created by this or any integration * instance, or those which were created by the mapper. * * @param type the entity._type values to find, where a string finds one type * of entity and a string[] finds multiple types of entities * @param propertyFilters optional additional entity properties that must * match */ findAllEntitiesByType(type: string | string[], propertyFilters?: PropertyFilters, hasNotProperties?: string[]): Promise; /** * Find relationships in the graph assigned to this integration instance, * whether created by the instance or by the mapper. * * @param type the relationship._type values to find, where a string finds one * type of relationship and a string[] finds multiple types of entities * @param propertyFilters optional additional relationship properties that * must match */ findRelationshipsByType(type: string | string[], propertyFilters?: PropertyFilters, hasNotProperties?: string[]): Promise; findEntities(filters: RequiredPropertyFilters, hasNotProperties?: string[]): Promise; findVerticesWithoutProperties(filters: RequiredPropertyFilters, hasNotProperties: string[]): Promise; findRelationships(filters: RequiredPropertyFilters, hasNotProperties?: string[]): Promise; findEdgesWithoutProperties(filters: RequiredPropertyFilters, hasNotProperties: string[]): Promise; getReaderNeptuneConnection(): Promise; } export {};