"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.baseTableCalcSchema = exports.partitionBySchemaDescription = exports.partitionBySchema = exports.orderBySchemaDescription = exports.orderBySchema = void 0;
const zod_1 = require("zod");
const fieldId_1 = require("../fieldId");
exports.orderBySchema = zod_1.z.object({
    fieldId: (0, fieldId_1.getFieldIdSchema)({ additionalDescription: 'Field to order by' }),
    order: zod_1.z.enum(['asc', 'desc']).nullable(),
});
exports.orderBySchemaDescription = [
    'Specifies the order in which rows are processed by the table calculation.',
    'For time-series: typically order by date/time ascending.',
    'For rankings: order by the metric you want to rank, descending for highest-first.',
].join('\n');
exports.partitionBySchema = (0, fieldId_1.getFieldIdSchema)({
    additionalDescription: null,
});
exports.partitionBySchemaDescription = [
    'Fields to PARTITION BY - divides result set into independent groups.',
    'Each partition calculates independently (rankings restart, percentages sum to 100% per partition).',
    'Empty array or null: single partition (calculations across all rows).',
].join('\n');
exports.baseTableCalcSchema = zod_1.z.object({
    name: zod_1.z
        .string()
        .describe('Unique name for the table calculation, e.g. "percent_change_from_previous"'),
    displayName: zod_1.z
        .string()
        .describe('Display name for the table calculation, e.g. "MoM revenue change"'),
});
//# sourceMappingURL=tableCalcBaseSchemas.js.map