UNPKG

kuzzle-sdk

Version:
56 lines (55 loc) 1.23 kB
import { JSONObject } from "./JSONObject"; import { KDocumentKuzzleInfo } from "./KDocument"; /** * Kuzzle metadata * * @deprecated Use "KDocumentKuzzleInfo" */ export interface DocumentMetadata { _kuzzle_info?: Partial<KDocumentKuzzleInfo>; } /** * Represents the `_source` property of the document * * @deprecated Create an interface extending "KDocumentContent" */ export interface DocumentContent extends DocumentMetadata { [key: string]: JSONObject | any; } /** * Kuzzle document * * @deprecated Use "KDocument" interface */ export declare class Document { /** * Document unique ID */ _id: string; /** * Document Version (generated by Elasticsearch) */ _version?: number; /** * If true, a new document was created, * otherwise the document existed and was updated * @see https://docs.kuzzle.io/sdk/js/7/controllers/document/upsert/ */ created?: boolean; /** * Document Content */ _source: DocumentContent; [key: string]: JSONObject | any; } /** * Document retrieved from a search * * @deprecated Use "KHit" */ export interface DocumentHit extends Document { /** * Relevance score */ _score: number; }