import { Condition, ConditionInitalizer, ConditionFunction } from "./Condition"; import { Model } from "./Model"; import { Document } from "./Document"; import { CallbackType, ObjectType, SortOrder } from "./General"; import { AWSError } from "aws-sdk"; declare enum DocumentRetrieverTypes { scan = "scan", query = "query" } interface DocumentRetrieverTypeInformation { type: DocumentRetrieverTypes; pastTense: string; } declare abstract class DocumentRetriever { internalSettings?: { model: Model; typeInformation: DocumentRetrieverTypeInformation; }; settings: { condition: Condition; limit?: number; all?: { delay: number; max: number; }; startAt?: any; attributes?: string[]; index?: string; consistent?: boolean; count?: boolean; parallel?: number; sort?: SortOrder; }; getRequest: (this: DocumentRetriever) => Promise; all: (this: DocumentRetriever, delay?: number, max?: number) => DocumentRetriever; limit: (this: DocumentRetriever, value: number) => DocumentRetriever; startAt: (this: DocumentRetriever, value: ObjectType) => DocumentRetriever; attributes: (this: DocumentRetriever, value: string[]) => DocumentRetriever; count: (this: DocumentRetriever) => DocumentRetriever; consistent: (this: DocumentRetriever) => DocumentRetriever; using: (this: DocumentRetriever, value: string) => DocumentRetriever; exec(this: DocumentRetriever, callback?: any): any; and: () => Condition; or: () => Condition; not: () => Condition; parenthesis: (value: Condition | ConditionFunction) => Condition; group: (value: Condition | ConditionFunction) => Condition; where: (key: string) => Condition; filter: (key: string) => Condition; attribute: (key: string) => Condition; eq: (value: any) => Condition; lt: (value: number) => Condition; le: (value: number) => Condition; gt: (value: number) => Condition; ge: (value: number) => Condition; beginsWith: (value: any) => Condition; contains: (value: any) => Condition; exists: (value: any) => Condition; in: (value: any) => Condition; between: (...values: any[]) => Condition; constructor(model: Model, typeInformation: DocumentRetrieverTypeInformation, object?: ConditionInitalizer); } interface DocumentRetrieverResponse extends Array { lastKey?: ObjectType; count: number; } interface ScanResponse extends DocumentRetrieverResponse { scannedCount: number; timesScanned: number; } interface QueryResponse extends DocumentRetrieverResponse { queriedCount: number; timesQueried: number; } export declare class Scan extends DocumentRetriever { exec(): Promise>; exec(callback: CallbackType, AWSError>): void; parallel(value: number): Scan; constructor(model: Model, object?: ConditionInitalizer); } export declare class Query extends DocumentRetriever { exec(): Promise>; exec(callback: CallbackType, AWSError>): void; sort(order: SortOrder): Query; constructor(model: Model, object?: ConditionInitalizer); } export {};