kuzzle-sdk
Version:
Official Javascript SDK for Kuzzle
28 lines (27 loc) • 728 B
TypeScript
import { KDocumentContentGeneric } from "../types";
/**
* Represents a realtime document that will mutate it's content in realtime
* according to database changes.
*
* Use the `Observer` class to manipulate such documents.
*/
export declare class RealtimeDocument<TKDocumentContent extends KDocumentContentGeneric> {
/**
* Document ID
*/
_id: string;
/**
* Document content
*
* This will be updated when the content changes in the database
*/
_source: TKDocumentContent;
/**
* Indicate if the document has been deleted in the database
*/
deleted: boolean;
constructor({ _id, _source }: {
_id: string;
_source: TKDocumentContent;
});
}