UNPKG

arangojs

Version:

The official ArangoDB JavaScript driver.

82 lines 2.69 kB
import { Connection } from "./connection"; export declare enum ViewType { ARANGOSEARCH_VIEW = "arangosearch" } export interface ArangoView { isArangoView: true; name: string; } export interface ArangoViewResponse { name: string; id: string; type: ViewType; } interface ArangoSearchConsolidate { threshold: number; segmentThreshold: number; } interface ArangoSearchCollectionLink { analyzers?: string[]; fields?: { [key: string]: ArangoSearchCollectionLink | undefined; }; includeAllFields?: boolean; trackListPositions?: boolean; storeValues?: "none" | "id"; } export interface ArangoSearchProperties { locale: string; commit: { consolidate: { count?: ArangoSearchConsolidate; bytes?: ArangoSearchConsolidate; bytes_accum?: ArangoSearchConsolidate; fill?: ArangoSearchConsolidate; }; commitIntervalMsec?: number; cleanupIntervalStep?: number; }; links: { [key: string]: ArangoSearchCollectionLink | undefined; }; } export interface ArangoSearchPropertiesResponse extends ArangoSearchProperties, ArangoViewResponse { type: ViewType.ARANGOSEARCH_VIEW; } export interface ArangoSearchPropertiesOptions { locale?: string; commit?: { consolidate?: "none" | { count?: Partial<ArangoSearchConsolidate>; bytes?: Partial<ArangoSearchConsolidate>; bytes_accum?: Partial<ArangoSearchConsolidate>; fill?: Partial<ArangoSearchConsolidate>; }; commitIntervalMsec?: number; cleanupIntervalStep?: number; }; links?: { [key: string]: ArangoSearchCollectionLink | undefined; }; } export declare abstract class BaseView implements ArangoView { isArangoView: true; name: string; abstract type: ViewType; protected _connection: Connection; constructor(connection: Connection, name: string); get(): Promise<ArangoViewResponse>; exists(): Promise<boolean>; rename(name: string): Promise<any>; drop(): Promise<any>; } export declare class ArangoSearchView extends BaseView { type: ViewType; create(properties?: ArangoSearchPropertiesOptions): Promise<ArangoSearchPropertiesResponse>; properties(): Promise<ArangoSearchPropertiesResponse>; setProperties(properties?: ArangoSearchPropertiesOptions): Promise<ArangoSearchPropertiesResponse>; replaceProperties(properties?: ArangoSearchPropertiesOptions): Promise<ArangoSearchPropertiesResponse>; } export declare function constructView(connection: Connection, data: any): ArangoView; export {}; //# sourceMappingURL=view.d.ts.map