/** * ObjectQL * Copyright (c) 2026-present ObjectStack Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { Data } from '@objectstack/spec'; import { z } from 'zod'; export type Filter = z.infer; export type SortNode = z.infer; export type AggregationFunctionType = z.infer; export type AggregationNode = z.infer; /** * Unified Query Interface - Standard Protocol Format * * Uses @objectstack/spec QuerySchema inference directly. * We make 'object' optional because in many contexts (like Repository.find), * the object is implicit. */ type SpecQuery = z.infer; export interface UnifiedQuery extends Omit { object?: string; } /** * Standard QueryAST definition. * Aliased to UnifiedQuery for backward compatibility and consistency. */ export type QueryAST = UnifiedQuery; /** @deprecated Use AggregationFunctionType instead */ export type AggregateFunction = AggregationFunctionType; /** @deprecated Use AggregationNode instead */ export interface AggregateOption { func: AggregateFunction; field: string; alias?: string; } export {};