/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 0c28b0f5b136
 */
import * as z from "zod";
import * as b64$ from "../lib/base64.js";
import { ApiError$zodSchema } from "./apierror.js";
import { ArchiveResourceType$zodSchema, } from "./archiveresourcetype.js";
import { DeliveryTypeAll$zodSchema, } from "./deliverytypeall.js";
import { GenerateArchiveResponse$zodSchema, } from "./generatearchiveresponse.js";
export const GenerateArchiveGlobals$zodSchema = z.object({
    cloud_name: z.string().describe("The cloud name of your product environment.")
        .optional(),
});
/**
 * The method for generating and delivering the archive. Options:
 *
 * @remarks
 * download - Generates and delivers the archive file without storing it
 * create - Creates and stores the archive as a raw asset, returning URLs in the response
 * create_and_download - Creates, stores, and delivers the archive file
 */
export const Mode = {
    Download: "download",
    Create: "create",
    CreateAndDownload: "create_and_download",
};
export const Mode$zodSchema = z.enum([
    "download",
    "create",
    "create_and_download",
]).describe("The method for generating and delivering the archive. Options:\ndownload - Generates and delivers the archive file without storing it\ncreate - Creates and stores the archive as a raw asset, returning URLs in the response\ncreate_and_download - Creates, stores, and delivers the archive file\n");
/**
 * The format of the generated archive.
 */
export const TargetFormat = {
    Zip: "zip",
    Tgz: "tgz",
};
export const TargetFormat$zodSchema = z.enum([
    "zip",
    "tgz",
]).describe("The format of the generated archive.");
export const AssetFolders$zodSchema = z.union([
    z.array(z.string()),
    z.string(),
]).describe("A list of asset folder paths to include in the archive, or a single folder path string. Only available when asset folders are enabled for your account.");
export const GenerateArchiveRequestBody$zodSchema = z.object({
    allow_missing: z.boolean().default(false).describe("Whether to allow missing assets in the archive. If false, the operation will fail if any asset is not found."),
    asset_folders: z.union([
        z.array(z.string()),
        z.string(),
    ]).optional().describe("A list of asset folder paths to include in the archive, or a single folder path string. Only available when asset folders are enabled for your account."),
    async: z.boolean().default(false).describe("(\"create\" mode only), specifies whether to generate the archive asynchronously."),
    expires_at: z.int().optional().describe("(\"download\" mode only) Unix timestamp indicating when the generated archive URL should expire."),
    flatten_folders: z.boolean().default(false).describe("Whether to flatten all files to be in the root of the archive file."),
    flatten_transformations: z.boolean().default(false).describe("Whether to flatten the folder structure of the derived assets."),
    fully_qualified_public_ids: z.array(z.string()).optional().describe("A list of fully qualified public IDs (resource_type/type/public_id) to include in the archive."),
    keep_derived: z.boolean().default(false).describe("Whether to keep the derived assets used for generating the archive."),
    mode: Mode$zodSchema.default("create").describe("The method for generating and delivering the archive. Options:\ndownload - Generates and delivers the archive file without storing it\ncreate - Creates and stores the archive as a raw asset, returning URLs in the response\ncreate_and_download - Creates, stores, and delivers the archive file\n"),
    notification_url: z.string().optional().describe("(\"create\" mode only), specifies the URL to notify when the archive generation is complete."),
    prefixes: z.array(z.string()).optional().describe("Select all assets where the public ID starts with this prefix."),
    public_ids: z.array(z.string()).optional().describe("The list of public IDs to include in the archive."),
    search_expression: z.string().optional().describe("A search expression to select assets to include in the archive."),
    skip_transformation_name: z.boolean().default(false).describe("Whether to skip adding the transformation details to the file names in the archive."),
    tags: z.array(z.string()).optional().describe("Tags to filter which assets to include in the archive. Assets matching any of the specified tags are included."),
    target_asset_folder: z.string().optional().describe("The folder in your product environment where the generated archive should be stored."),
    target_filename: z.string().optional().describe("The filename for the downloaded archive file. Extension must match target_format (zip or tgz)."),
    target_format: TargetFormat$zodSchema.default("zip").describe("The format of the generated archive."),
    target_public_id: z.string().optional().describe("The public ID to assign to the generated archive, or the filename of the downloaded archive file."),
    target_tags: z.array(z.string()).optional().describe("A list of tag names to assign to the generated archive."),
    transformations: z.string().optional().describe("The transformations to apply to the assets before including them in the archive (separated by \"|\")."),
    type: DeliveryTypeAll$zodSchema.optional().describe("All supported delivery types."),
    use_original_filename: z.boolean().default(false).describe("Whether to use the original filenames of the assets in the archive instead of public IDs (when available)."),
}).describe("The archive generation parameters.");
export const GenerateArchiveRequest$zodSchema = z.object({
    RequestBody: z.lazy(() => GenerateArchiveRequestBody$zodSchema).describe("The archive generation parameters."),
    resource_type: ArchiveResourceType$zodSchema.describe("The type of resource for archive generation (image, video, or raw)."),
});
export const GenerateArchiveResponseResponse$zodSchema = z.union([
    ApiError$zodSchema,
    z.string().describe("Base64-encoded binary content").transform(b64$.bytesFromBase64),
    GenerateArchiveResponse$zodSchema,
]);
//# sourceMappingURL=generatearchiveop.js.map