import { RevisionsCollectionObject } from "../../Types/index.js"; import { DocumentType } from "../DocumentAbstractions.js"; import { ForceRevisionStrategy } from "./ForceRevisionStrategy.js"; import { ILazyRevisionsOperations } from "./ILazyRevisionsOperations.js"; import { IMetadataDictionary } from "./IMetadataDictionary.js"; /** * Revisions advanced session operations */ export interface IRevisionsSessionOperations { /** * Returns all previous document revisions for specified document * ordered by most recent revisions first. */ getFor(id: string): Promise; /** * Returns previous document revisions for specified document (with optional paging) * ordered by most recent revisions first. */ getFor(id: string, options: SessionRevisionsOptions): Promise; /** * Returns metadata of all previous document revisions for specified document * ordered by most recent revisions first. */ getMetadataFor(id: string): Promise; /** * Returns metadata of previous document revisions for specified document (with optional paging) * ordered by most recent revisions first. */ getMetadataFor(id: string, options: SessionRevisionsMetadataOptions): Promise; /** * Returns a document revision by date. */ get(id: string, date: Date): Promise; /** * Returns a document revision by date. */ get(id: string, date: Date, documentType: DocumentType): Promise; /** * Returns a document revision by change vector. */ get(changeVector: string): Promise; /** * Returns a document revision by change vector. */ get(changeVector: string, documentType: DocumentType): Promise; /** * Returns a document revision by change vectors. */ get(changeVectors: string[]): Promise>; /** * Returns a document revision by change vectors. */ get(changeVectors: string[], documentType: DocumentType): Promise>; /** * Make the session create a revision for the specified entity. * Can be used with tracked entities only. * Revision will be created Even If: * * 1. Revisions configuration is Not set for the collection * 2. Document was Not modified */ forceRevisionCreationFor(entity: T): void; /** * Make the session create a revision for the specified entity. * Can be used with tracked entities only. * Revision will be created Even If: * * 1. Revisions configuration is Not set for the collection * 2. Document was Not modified */ forceRevisionCreationFor(entity: T, strategy: ForceRevisionStrategy): void; /** * Make the session create a revision for the specified document id. * Revision will be created Even If: * * 1. Revisions configuration is Not set for the collection * 2. Document was Not modified * @param id Document id to use */ forceRevisionCreationFor(id: string): any; /** * Make the session create a revision for the specified document id. * Revision will be created Even If: * * 1. Revisions configuration is Not set for the collection * 2. Document was Not modified * @param id Document id to use * @param strategy Strategy to use */ forceRevisionCreationFor(id: string, strategy: ForceRevisionStrategy): void; /** * Returns the number of revisions for specified document. * @param id Document id to use */ getCountFor(id: string): Promise; /** * Access the lazy revisions operations */ lazily: ILazyRevisionsOperations; } export interface SessionRevisionsOptions { start?: number; pageSize?: number; documentType?: DocumentType; } export interface SessionRevisionsMetadataOptions { start?: number; pageSize?: number; } //# sourceMappingURL=IRevisionsSessionOperations.d.ts.map