@configurator/ravendb
Version:
RavenDB client for Node.js
46 lines (45 loc) • 2.3 kB
TypeScript
/// <reference path="../../Types/readable-stream.d.ts" />
import { HttpRequestParameters } from "../../Primitives/Http";
import { PatchRequest } from "./PatchRequest";
import { IOperation, OperationResultType } from "./OperationAbstractions";
import { PatchStatus } from "./PatchStatus";
import { RavenCommand } from "../../Http/RavenCommand";
import { IDocumentStore } from "../IDocumentStore";
import { DocumentConventions } from "../Conventions/DocumentConventions";
import { HttpCache } from "../../Http/HttpCache";
import { ServerNode } from "../../Http/ServerNode";
import { PatchResult } from "./PatchResult";
import * as stream from "readable-stream";
export interface Payload {
patch: PatchRequest;
patchIfMissing: PatchRequest;
}
export declare class PatchOperationResult<TEntity> {
status: PatchStatus;
document: TEntity;
}
export declare class PatchOperation implements IOperation<PatchResult> {
private readonly _id;
private readonly _changeVector;
private readonly _patch;
private readonly _patchIfMissing;
private readonly _skipPatchIfChangeVectorMismatch;
get resultType(): OperationResultType;
constructor(id: string, changeVector: string, patch: PatchRequest);
constructor(id: string, changeVector: string, patch: PatchRequest, patchIfMissing: PatchRequest, skipPatchIfChangeVectorMismatch: boolean);
getCommand(store: IDocumentStore, conventions: DocumentConventions, cache: HttpCache, returnDebugInformation?: boolean, test?: boolean): RavenCommand<PatchResult>;
}
export declare class PatchCommand extends RavenCommand<PatchResult> {
private readonly _id;
private readonly _changeVector;
private readonly _patch;
private readonly _skipPatchIfChangeVectorMismatch;
private readonly _returnDebugInformation;
private readonly _test;
private _conventions;
constructor(conventions: DocumentConventions, id: string, changeVector: string, patch: PatchRequest, patchIfMissing: PatchRequest, skipPatchIfChangeVectorMismatch: boolean, returnDebugInformation: boolean, test: boolean);
get isReadRequest(): boolean;
createRequest(node: ServerNode): HttpRequestParameters;
setResponseAsync(bodyStream: stream.Stream, fromCache: boolean): Promise<string>;
private static _mapToLocalObject;
}