///
import { ParsedUrlQueryInput } from 'querystring';
import type { Cas, DurabilityLevelName, NonVoid } from '@cbjsdev/shared';
import { CouchbaseCas } from '@cbjsdev/shared';
import type { AnyCollection } from './clusterTypes/index.js';
import { DurabilityLevel } from './generaltypes.js';
export { type Cas, CouchbaseCas };
/**
* A node-style callback which receives an optional error or result.
*
* @category Utilities
*/
export type NodeCallback = (...args: [null, T] | [Error, null]) => void;
export type VoidNodeCallback = (err: Error | null) => void;
/**
* @internal
*/
export declare class PromiseHelper {
/**
* @internal
*/
static wrapAsync>(logicFn: () => U, callback?: NodeCallback): U;
static wrapAsync>(logicFn: () => U, callback?: VoidNodeCallback): U;
/**
* @internal
*/
static wrap(logicFn: (callback: VoidNodeCallback) => void, callback?: VoidNodeCallback | null): Promise;
static wrap(logicFn: (callback: NodeCallback>) => void, callback?: NodeCallback>> | null): Promise;
}
/**
* @internal
*/
export declare class CompoundTimeout {
protected readonly start: [number, number];
protected readonly timeout: number;
/**
* @internal
*/
constructor(timeout: number);
/**
* @internal
*/
left(): number;
/**
* @internal
*/
expired(): boolean;
}
/**
* @internal
*/
export declare function duraLevelToNsServerStr(level: DurabilityLevel | DurabilityLevelName | undefined): DurabilityLevelName | undefined;
/**
* @internal
*/
/**
* @internal
*/
export declare function nsServerStrToDuraLevel(level: DurabilityLevelName | number | undefined): DurabilityLevel;
/**
* @internal
*/
export declare function cbQsStringify(values: ParsedUrlQueryInput, options?: {
boolAsString?: boolean;
}): string;
export declare function getDocId(collection: AnyCollection, key: string): {
bucket: any;
scope: any;
collection: any;
key: string;
};
/**
* @internal
*/
export declare function parseExpiry(expiry?: number | Date): number;
/**
* Extracts a human-readable message from an unknown thrown value.
*
* @internal
*/
export declare function getErrorMessage(error: any): string;