/** * Generated by orval v8.5.3 🍺 * Do not edit manually. * Space Invoices API * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking. * OpenAPI spec version: 1.0.0 */ import * as zod from "zod"; /** * Execute one or more aggregation queries on entity data in a single request. Send an array of 1-25 queries. Each query runs independently and results are returned in the same order. **Available tables**: invoices, estimates, credit_notes, advance_invoices, payments, customers, items **Metric types**: count, sum, avg, min, max **Virtual fields for group_by**: - `month` - Extract month from date (YYYY-MM) - `year` - Extract year from date (YYYY) - `overdue_bucket` - Invoice aging bucket (current, 1-30, 31-60, 61-90, 90+) **Example — single query (monthly revenue)**: ```json [{ "metrics": [{ "type": "sum", "field": "total_with_tax", "alias": "revenue" }], "table": "invoices", "date_from": "2024-01-01", "filters": { "is_draft": false, "voided_at": null }, "group_by": ["month"] }] ``` **Example — multi query (dashboard counts)**: ```json [ { "metrics": [{ "type": "count", "alias": "total" }], "table": "invoices" }, { "metrics": [{ "type": "count", "alias": "total" }], "table": "customers" } ] ``` * @summary Query entity stats (batch) */ export declare const QueryEntityStatsHeader: zod.ZodObject<{ "x-entity-id": zod.ZodOptional; }, zod.z.core.$strip>; export declare const queryEntityStatsBodyMetricsMax = 10; export declare const queryEntityStatsBodyGroupByMax = 5; export declare const queryEntityStatsBodyOrderByItemDirectionDefault = "asc"; export declare const queryEntityStatsBodyOrderByMax = 3; export declare const queryEntityStatsBodyLimitMax = 1000; export declare const QueryEntityStatsBodyItem: zod.ZodObject<{ metrics: zod.ZodArray; field: zod.ZodOptional; alias: zod.ZodOptional; }, zod.z.core.$strip>>; table: zod.ZodEnum<{ invoices: "invoices"; estimates: "estimates"; credit_notes: "credit_notes"; advance_invoices: "advance_invoices"; payments: "payments"; customers: "customers"; items: "items"; invoice_taxes: "invoice_taxes"; }>; date_from: zod.ZodOptional; date_to: zod.ZodOptional; filters: zod.ZodOptional>; group_by: zod.ZodOptional>; order_by: zod.ZodOptional>; }, zod.z.core.$strip>>>; limit: zod.ZodOptional; }, zod.z.core.$strip>; export declare const QueryEntityStatsBody: zod.ZodArray; field: zod.ZodOptional; alias: zod.ZodOptional; }, zod.z.core.$strip>>; table: zod.ZodEnum<{ invoices: "invoices"; estimates: "estimates"; credit_notes: "credit_notes"; advance_invoices: "advance_invoices"; payments: "payments"; customers: "customers"; items: "items"; invoice_taxes: "invoice_taxes"; }>; date_from: zod.ZodOptional; date_to: zod.ZodOptional; filters: zod.ZodOptional>; group_by: zod.ZodOptional>; order_by: zod.ZodOptional>; }, zod.z.core.$strip>>>; limit: zod.ZodOptional; }, zod.z.core.$strip>>; export declare const QueryEntityStatsResponseItem: zod.ZodObject<{ query: zod.ZodObject<{ table: zod.ZodString; date_from: zod.ZodNullable; date_to: zod.ZodNullable; group_by: zod.ZodNullable>; }, zod.z.core.$strip>; data: zod.ZodArray>; row_count: zod.ZodNumber; }, zod.z.core.$strip>; export declare const QueryEntityStatsResponse: zod.ZodArray; date_to: zod.ZodNullable; group_by: zod.ZodNullable>; }, zod.z.core.$strip>; data: zod.ZodArray>; row_count: zod.ZodNumber; }, zod.z.core.$strip>>; //# sourceMappingURL=entity-stats.d.ts.map