/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 6b80d45f0574 */ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { DirectionEnum, DirectionEnum$zodSchema } from "./directionenum.js"; import { FoldersSearchResponse, FoldersSearchResponse$zodSchema, } from "./folderssearchresponse.js"; export type SearchFoldersGlobals = { cloud_name?: string | undefined }; export const SearchFoldersGlobals$zodSchema: z.ZodType = z .object({ cloud_name: z.string().describe( "The cloud name of your product environment.", ).optional(), }); export type SearchFoldersRequest = { expression?: string | undefined; sort_by?: Array<{ [k: string]: DirectionEnum }> | undefined; max_results?: number | undefined; next_cursor?: string | undefined; }; export const SearchFoldersRequest$zodSchema: z.ZodType = z .object({ expression: z.string().describe( "The (Lucene-like) string expression specifying the search query. If not passed, returns all folders (up to max_results).", ).optional(), max_results: z.int().default(50).describe( "Maximum number of folders to return (max 500, default 50).", ), next_cursor: z.string().describe( "The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results.", ).optional(), sort_by: z.array(z.record(z.string(), DirectionEnum$zodSchema)).describe( "Sort order for the results. Each item maps a field name to a direction.", ).optional(), }); export type SearchFoldersResponse = FoldersSearchResponse | ApiError; export const SearchFoldersResponse$zodSchema: z.ZodType = z.union([ FoldersSearchResponse$zodSchema, ApiError$zodSchema, ]);