import { decimal } from '../shared'; import { Timestamp } from '../use-timestamp'; type Types = string | number | bigint | decimal; export declare const eq: (value: T) => { type: "eq"; value: T; }; export declare const gt: (value: T) => { type: "gt"; value: T; }; export declare const lt: (value: T) => { type: "lt"; value: T; }; export declare const between: (min: T, max: T) => { type: "between"; min: T; max: T; }; export type QueryObject = Record & { timestamp: Timestamp<'ns'>; }; export type QueryObjectType = { discriminator: string; type: { [key in keyof T]: QueryMappingType; }; }; export type QueryWhere = ReturnType | ReturnType | ReturnType | ReturnType; export type Query = { where?: Partial<{ [key in keyof T]: QueryWhere; }>; orderBy?: 'ASC' | 'DESC'; limit?: number; offset?: number; }; export type QueryMappingType = 'number' | 'bigint' | 'string' | 'decimal'; export type InferQueryObject = T extends QueryObjectType ? { [key in keyof T['type']]: T['type'][key] extends 'number' ? number : T['type'][key] extends 'bigint' ? bigint : T['type'][key] extends 'string' ? string : T['type'][key] extends 'decimal' ? decimal : never; } & { timestamp: Timestamp<'ns'>; } : never; export declare abstract class Storage { static createObject(discriminator: string, type: T): { discriminator: string; type: T; }; abstract index(): Promise>; abstract save, K extends QueryObject>(type: T, objects: InferQueryObject[]): Promise; abstract query, K extends QueryObject>(type: T, query: Query>): Promise[]>; } export {}; //# sourceMappingURL=storage.d.ts.map