import type { SetValue } from '.' import type { LimitQuery } from './limit' import type { OrderQuery } from './order' import type { WhereQuery } from './where' export interface ServerDate extends Date { __dontUseWillBeUndefined__: true } export declare type ServerTimestampsStrategy = 'estimate' | 'previous' | 'none' export declare type RuntimeEnvironment = 'node' | 'web' export declare type OnMissing = ((id: string) => Model) | 'ignore' /** * Type of the data passed to the set function. It extends the model * allowing to set server date field value. */ export declare type WriteModel< Model, Environment extends RuntimeEnvironment | undefined > = { [Key in keyof Model]: | (Exclude extends ServerDate ? Environment extends 'node' ? Date | ServerDate : ServerDate : Model[Key] extends object ? WriteModel : Model[Key]) | SetValue } export interface OperationOptions< Environment extends RuntimeEnvironment | undefined > { assertEnvironment?: Environment } export interface DocOptions { serverTimestamps?: ServerTimestamps } export interface OnMissingOptions { onMissing?: OnMissing } export interface RealtimeOptions { includeMetadataChanges?: boolean } /** * The query type. */ export declare type Query = | OrderQuery | WhereQuery | LimitQuery