///
import { DurabilityLevel } from './generaltypes';
/**
* CAS represents an opaque value which can be used to compare documents to
* determine if a change has occurred.
*
* @category Key-Value
*/
export interface Cas {
/**
* Generates a string representation of this CAS.
*/
toString(): string;
/**
* Generates a JSON representation of this CAS.
*/
toJSON(): any;
}
/**
* CasIn represents the supported types that can be provided to an operation
* that receive a CAS.
*
* @category Key-Value
*/
export type CasInput = Cas | string | Buffer;
/**
* Reprents a node-style callback which receives an optional error or result.
*
* @category Utilities
*/
export interface NodeCallback {
(err: Error | null, result: T | null): void;
}
/**
* @internal
*/
export declare class PromiseHelper {
/**
* @internal
*/
static wrapAsync>(fn: () => U, callback?: (err: Error | null, result: T | null) => void): U;
/**
* @internal
*/
static wrap(fn: (callback: NodeCallback) => void, callback?: NodeCallback | null): Promise;
}
/**
* @internal
*/
export declare class CompoundTimeout {
private _start;
private _timeout;
/**
* @internal
*/
constructor(timeout: number | undefined);
/**
* @internal
*/
left(): number | undefined;
/**
* @internal
*/
expired(): boolean;
}
/**
* @internal
*/
export declare function duraLevelToNsServerStr(level: DurabilityLevel | string | undefined): string | undefined;
/**
* @internal
*/
export declare function nsServerStrToDuraLevel(level: string | undefined): DurabilityLevel;
/**
* @internal
*/
export declare function cbQsStringify(values: {
[key: string]: any;
}, options?: {
boolAsString?: boolean;
}): string;
/**
* @internal
*/
export declare function expiryToTimestamp(expiry: number): number;