/** * Copyright Linkurious SAS 2012 - 2019 * * - Created on 2019-10-25. */ import { ICaptions, IDataSourceDefaultStyles, IPropertiesOrder } from '../displayTypes'; import { IDataSourceParams } from '../commonTypes'; import { GraphQueryDialect } from '../graphQuery'; export declare const GRAPH_VENDORS: readonly ['neo4j', 'cosmosDb', 'memgraph', 'neptune', 'spanner', 'bigQuery']; export type GraphVendor = (typeof GRAPH_VENDORS)[number]; export declare const INDEX_VENDORS: readonly ['elasticSearch', 'neo4jSearch', 'azureSearch', 'neptuneSearch', 'spannerSearch', 'bigQuerySearch']; export type IndexVendor = (typeof INDEX_VENDORS)[number]; /** * Supported index vendors for each graph vendor. */ export declare const GRAPH_TO_INDEX_COMPATIBILITY: Record; export declare const DEFAULT_INCREMENTAL_TIMESTAMP_PROPERTY_NAME = "linkuriousTimestamp"; export interface IGetDataSourcesStatusParams { withStyles?: boolean; withCaptions?: boolean; } export declare enum DataSourceState { READY = "ready", NEED_INDEX = "needIndex", NEED_CONFIG = "needConfig", INDEXING = "indexing", DISCOVERING_SCHEMA = "discoveringSchema", OFFLINE = "offline", CONNECTING = "connecting", STORE_ID_CHANGED = "storeIdChanged" } export interface IndexState { searchEnabled: boolean; visibilityConsistent: boolean; propertyTypeConsistent: boolean; indexOptimized: boolean; } export type TemporalType = 'date' | 'datetime' | 'localdatetime'; export interface DataSourceFeatures { immutableNodeCategories: boolean; canCountBeforeIndexation: boolean; canIndexEdges: boolean; searchHitsCount: boolean; alternativeIds: boolean; maxNodeCategories?: number; externalIndex: boolean; canCount: boolean; dialects: GraphQueryDialect[]; alerts: boolean; canDryRun: boolean; supportNativeDate: boolean; nativeTemporalTypes: TemporalType[]; canSearchOnNonTextualValues: boolean; supportEntityResolution: boolean; supportQueryBuilder: boolean; supportImport: boolean; staticSchema: boolean; supportWrite: boolean; } export interface DataSourceSettings { readOnly: boolean; } export interface IAlternativeIdSettings { node?: string; edge?: string; } export interface GeoSettings { latitudeProperty?: string; longitudeProperty?: string; } export interface ConnectedDataSourceSettings extends DataSourceSettings, GeoSettings { alternativeIds: IAlternativeIdSettings; propertyKeyAccessRights: boolean; strictSchema: boolean; skipEdgeIndexing: boolean; } export interface DataSourceUserInfo { name: string; graphVendor: GraphVendor; connected: boolean; key?: string; configIndex: number; state: DataSourceState; reason: string; error?: string; features: DataSourceFeatures; defaultStyles?: IDataSourceDefaultStyles; defaultCaptions?: ICaptions; defaultPropertiesOrder: IPropertiesOrder; settings: DataSourceSettings | ConnectedDataSourceSettings; indexState?: IndexState; } export interface ISetDefaultSourceStylesParams extends IDataSourceParams { styles?: IDataSourceDefaultStyles; captions?: ICaptions; propertiesOrder?: IPropertiesOrder; } export interface IResetSourceStylesParams extends IDataSourceParams { design?: boolean; captions?: boolean; } export interface IConnectDataSourceParams { sourceIndex: number; ignoreStoreIdChange?: boolean; waitForCompletion?: boolean; } export interface IDeleteSourceDataParams extends IDataSourceParams { mergeInto?: string; mergeReplace?: boolean; } export interface DeleteSourceDataResponse { migrated: boolean; affected: { visualizations: number; folders: number; groups: number; alerts: number; alertFolders: number; cases: number; graphQueries: number; edgeTypes: number; edgeProperties: number; nodeTypes: number; nodeProperties: number; accessRights: number; customActions: number; }; } export interface IDeleteSourceConfigParams { configIndex: number; } /** * * A DataSourceAdminInfo can represent: * - a disconnected data-source configuration * - a disconnected data-source state not configured anymore * - a connected data-source (data-source configuration + state) */ export interface DataSourceAdminInfo { name?: string; configIndex?: number; key?: string; state: DataSourceState; lastSeen?: string; lastIndexed?: string; lastSampled?: string; llmBusinessContext?: string; host: string; port: string; storeId?: string; visualizationCount: number; }