/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 31420f097d62
 */
import * as z from "zod";
import { DirectionEnum$zodSchema } from "./directionenum.js";
export const Type = {
    Bytes: "bytes",
    ImagePixels: "image_pixels",
    VideoPixels: "video_pixels",
    Duration: "duration",
};
export const Type$zodSchema = z.enum([
    "bytes",
    "image_pixels",
    "video_pixels",
    "duration",
]);
export const SearchParametersRange$zodSchema = z.object({
    from: z.number().optional().describe("Start of the range (inclusive)"),
    to: z.number().optional().describe("End of the range (exclusive)"),
});
export const Aggregate$zodSchema = z.object({
    ranges: z.array(z.lazy(() => SearchParametersRange$zodSchema)),
    type: Type$zodSchema,
});
export const AggregateEnum = {
    Format: "format",
    ResourceType: "resource_type",
    Type: "type",
};
export const AggregateEnum$zodSchema = z.enum([
    "format",
    "resource_type",
    "type",
]);
export const AggregateUnion$zodSchema = z.union([
    z.array(AggregateEnum$zodSchema),
    z.array(z.lazy(() => Aggregate$zodSchema)),
]).describe("Fields or ranges to aggregate search results by.");
export const WithField = {
    Context: "context",
    Tags: "tags",
    ImageMetadata: "image_metadata",
    ImageAnalysis: "image_analysis",
    Metadata: "metadata",
    QualityAnalysis: "quality_analysis",
    AccessibilityAnalysis: "accessibility_analysis",
};
export const WithField$zodSchema = z.enum([
    "context",
    "tags",
    "image_metadata",
    "image_analysis",
    "metadata",
    "quality_analysis",
    "accessibility_analysis",
]);
export const SearchParameters$zodSchema = z.object({
    aggregate: z.union([
        z.array(AggregateEnum$zodSchema),
        z.array(z.lazy(() => Aggregate$zodSchema)),
    ]).optional().describe("Fields or ranges to aggregate search results by."),
    expression: z.string().optional().describe("The search expression. Supports exact match, wildcard match, presence, greater/less than, and range. For details on building expressions, see the Search API documentation."),
    fields: z.string().optional().describe("A comma-separated list of fields to include in the response.\nNotes:\n- This parameter takes precedence over the with_field parameter, so if you want any additional asset attributes returned, make sure to also include them in this list (e.g., tags or context).\n- The following fields are always included in the response: public_id, asset_id, asset_folder, created_at, status, type, and resource_type.\n"),
    max_results: z.int().optional().describe("The maximum number of results to return. Default - 50. Maximum - 500."),
    next_cursor: z.string().optional().describe("The cursor value to get the next page of results. Available when a previous search returned more results than max_results."),
    sort_by: z.array(z.record(z.string(), DirectionEnum$zodSchema)).optional()
        .describe("An array of single-key objects mapping a field to a sort direction. Each object must contain exactly one field name mapped to 'asc' or 'desc'.\nDefault: [{\"created_at\": \"desc\"}].\n"),
    with_field: z.array(WithField$zodSchema).optional().describe("The additional fields to include in the response. Note that the fields parameter takes precedence over this parameter."),
}).describe("Common parameters for resource search operations.");
//# sourceMappingURL=searchparameters.js.map