import type { ScanInput, ScanOutput } from "@webiny/aws-sdk/client-dynamodb/index.js"; import type { Entity, ScanOptions, TableDef } from "../toolbox.js"; import type { ExecuteWithRetryOptions } from "@webiny/utils"; export type { ScanOptions, ScanInput, ScanOutput }; export interface BaseScanParams { options?: ScanOptions; params?: Partial; } export interface ScanWithTable extends BaseScanParams { table: TableDef; entity?: never; } export interface ScanWithEntity extends BaseScanParams { entity: Entity; table?: never; } export type ScanParams = ScanWithTable | ScanWithEntity; export interface ScanResponse { items: T[]; count?: number; scannedCount?: number; lastEvaluatedKey?: ScanOutput["LastEvaluatedKey"]; next?: () => Promise>; requestId: string; error: any; } export type ScanDbItem = T & { PK: string; SK: string; GSI1_PK: string; GSI1_SK: string; TYPE: string; }; export declare const scan: (params: ScanParams) => Promise>; interface ScanWithCallbackOptions { retry?: true | ExecuteWithRetryOptions; } export declare const scanWithCallback: (params: ScanParams, callback: (result: ScanResponse>) => Promise, options?: ScanWithCallbackOptions) => Promise;