/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 870113738309 */ import * as z from "zod"; import { ClosedEnum } from "../types/enums.js"; import { AccessControlItem, AccessControlItem$zodSchema, } from "./accesscontrolitem.js"; import { StructuredMetadataParam, StructuredMetadataParam$zodSchema, } from "./structuredmetadataparam.js"; import { TagsParam, TagsParam$zodSchema } from "./tagsparam.js"; /** * The moderation status of the resource. */ export const ResourceUpdateRequestModerationStatus = { Approved: "approved", Rejected: "rejected", } as const; /** * The moderation status of the resource. */ export type ResourceUpdateRequestModerationStatus = ClosedEnum< typeof ResourceUpdateRequestModerationStatus >; export const ResourceUpdateRequestModerationStatus$zodSchema = z.enum([ "approved", "rejected", ]).describe("The moderation status of the resource."); /** * The resource properties to update. */ export type ResourceUpdateRequest = { display_name?: string | undefined; unique_display_name?: boolean | undefined; asset_folder?: string | undefined; tags?: TagsParam | undefined; context?: string | undefined; metadata?: StructuredMetadataParam | undefined; clear_invalid?: boolean | undefined; face_coordinates?: string | undefined; custom_coordinates?: string | undefined; regions?: string | undefined; quality_override?: string | undefined; moderation_status?: ResourceUpdateRequestModerationStatus | undefined; auto_tagging?: number | undefined; detection?: string | undefined; ocr?: string | undefined; raw_convert?: string | undefined; categorization?: string | undefined; visual_search?: boolean | undefined; background_removal?: string | undefined; access_control?: Array | undefined; }; export const ResourceUpdateRequest$zodSchema: z.ZodType = z.object({ access_control: z.array(AccessControlItem$zodSchema).optional().describe( "Restricts access to the asset by specifying one or more access types.\nThe asset is restricted unless at least one listed access type is valid.\n", ), asset_folder: z.string().optional().describe( "The folder where the asset should be placed.", ), auto_tagging: z.number().optional().describe( "Confidence threshold for auto-tagging.", ), background_removal: z.string().optional().describe( "The background removal provider to use for the resource. Optionally append a template suffix (e.g., cloudinary_ai:fine_edges).", ), categorization: z.string().optional().describe( "The type of categorization to perform on the resource. Optionally append a language code suffix (e.g., google_tagging:fr).", ), clear_invalid: z.boolean().default(false).describe( "Whether to clear invalid metadata fields. If false, invalid fields will be preserved. Default: false", ), context: z.string().optional().describe( "A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., \"alt=My image|caption=Nice photo\"). The =, \", and | characters can be escaped with a prepending backslash (\\).", ), custom_coordinates: z.string().optional().describe( "Custom coordinates as comma-separated values, with multiple coordinates separated by pipes.", ), detection: z.string().optional().describe( "The type of detection to perform on the resource.", ), display_name: z.string().optional().describe( "The display name of the resource.", ), face_coordinates: z.string().optional().describe( "Face coordinates as comma-separated values, with multiple faces separated by pipes.", ), metadata: StructuredMetadataParam$zodSchema.optional().describe( "A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = \" and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.\n", ), moderation_status: ResourceUpdateRequestModerationStatus$zodSchema .optional().describe("The moderation status of the resource."), ocr: z.string().optional().describe( "The type of OCR to perform on the resource. Set to adv_ocr, optionally with options (e.g., adv_ocr:document).", ), quality_override: z.string().optional().describe( "Quality override value that will override any automatic quality transformations.", ), raw_convert: z.string().optional().describe( "The conversion to apply for raw files (e.g., aspose, google_speech, extract_text).", ), regions: z.string().optional().describe( "A JSON-encoded object of named groups of coordinate pairs representing regions. Each region name may contain only letters, numbers, or hyphens, and must have at least two coordinate pairs.", ), tags: TagsParam$zodSchema.optional().describe( "A comma-separated list of tag names, or an array of tag names.", ), unique_display_name: z.boolean().default(false).describe( "Whether to ensure the display name is unique across all resources. If false, the operation will fail if a resource with the same display name exists. Default: false", ), visual_search: z.boolean().optional().describe( "Whether to index the resource with visual search. If true, the resource will be indexed for visual search capabilities. Default: false", ), }).describe("The resource properties to update.");