import { BaseFilter, type FilterRequestContext } from '@adonis-agora/filter';
import type { CollectionFilter, CursorParams, UploadFilter } from './types.js';
/**
 * The console's list routes in the `@adonis-agora/filter` wire format: filters as `filter[field]=v`,
 * `sort=` checked against each route's allow-list, cursor paging with `after` / `first`. Each reader
 * turns a request into the arguments of the matching `DashboardService` method, or throws a `400`
 * {@link DashboardError}: an unknown filter field, an unsupported operator, a sort outside the
 * allow-list, a missing required filter or a backward page.
 */
/** Default and largest `first` for `GET /objects` (S3 lists at most 1,000 keys per request). */
export declare const OBJECTS_PAGE_SIZE: {
    readonly defaultSize: 1000;
    readonly maxSize: 1000;
};
/** Default and largest `first` for `GET /collections`. */
export declare const COLLECTIONS_PAGE_SIZE: {
    readonly defaultSize: 50;
    readonly maxSize: 200;
};
/** The filters a draft collects: field name to its single value. */
type Draft = Record<string, string>;
/** Shared body of every console list filter: each method narrows the draft by one field. */
declare abstract class DraftFilter extends BaseFilter<Draft> {
    $query: Draft;
    protected narrow(name: string, value: unknown, operator: string, field: string): void;
}
/** `GET /objects` filters: `filter[disk]` (required) and `filter[prefix]` (a key prefix). */
export declare class ObjectListFilter extends DraftFilter {
    disk(value: unknown, operator: string, field: string): void;
    prefix(value: unknown, operator: string, field: string): void;
}
/** `GET /collections` filters: `filter[collection]`, `filter[ownerType]`, `filter[ownerId]`, `filter[prefix]`. */
export declare class CollectionListFilter extends DraftFilter {
    collection(value: unknown, operator: string, field: string): void;
    ownerType(value: unknown, operator: string, field: string): void;
    ownerId(value: unknown, operator: string, field: string): void;
    prefix(value: unknown, operator: string, field: string): void;
}
/** `GET /uploads` filters: `filter[disk]` and `filter[prefix]` (a key prefix). */
export declare class UploadListFilter extends DraftFilter {
    disk(value: unknown, operator: string, field: string): void;
    prefix(value: unknown, operator: string, field: string): void;
}
/** `GET /objects` → `DashboardService.objects(disk, params)`. Sort: `key` only (the store's order). */
export declare function readObjectsQuery(ctx: FilterRequestContext): Promise<{
    disk: string;
    params: CursorParams & {
        prefix?: string;
    };
}>;
/** `GET /collections` → `DashboardService.collections(params)`. Sort: `-createdAt` only (newest first). */
export declare function readCollectionsQuery(ctx: FilterRequestContext): Promise<CollectionFilter & CursorParams>;
/** `GET /uploads` → `DashboardService.uploads(filter)`. Sort: `createdAt` either way, `-createdAt` by default. */
export declare function readUploadsQuery(ctx: FilterRequestContext): Promise<UploadFilter & {
    order: 'asc' | 'desc';
}>;
export {};
//# sourceMappingURL=list_api.d.ts.map