resourceupdaterequest.ts•3.63 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
/**
* The moderation status of the resource.
*/
export const ModerationStatus$zodSchema = z.enum([
"approved",
"rejected",
]).describe("The moderation status of the resource.");
export type ModerationStatus = z.infer<typeof ModerationStatus$zodSchema>;
/**
* The type of OCR to perform on the resource.
*/
export const ResourceUpdateRequestOcr$zodSchema = z.enum([
"adv_ocr",
]).describe("The type of OCR to perform on the resource.");
export type ResourceUpdateRequestOcr = z.infer<
typeof ResourceUpdateRequestOcr$zodSchema
>;
/**
* The conversion to apply for raw files.
*/
export const RawConvert$zodSchema = z.enum([
"aspose",
"google_speech",
"extract_text",
]).describe("The conversion to apply for raw files.");
export type RawConvert = z.infer<typeof RawConvert$zodSchema>;
/**
* The type of categorization to perform on the resource.
*/
export const ResourceUpdateRequestCategorization$zodSchema = z.enum([
"google_tagging",
"google_video_tagging",
"imagga_tagging",
"aws_rek_tagging",
]).describe("The type of categorization to perform on the resource.");
export type ResourceUpdateRequestCategorization = z.infer<
typeof ResourceUpdateRequestCategorization$zodSchema
>;
/**
* The background removal provider to use for the resource.
*/
export const ResourceUpdateRequestBackgroundRemoval$zodSchema = z.enum([
"cloudinary_ai",
"pixelz",
]).describe("The background removal provider to use for the resource.");
export type ResourceUpdateRequestBackgroundRemoval = z.infer<
typeof ResourceUpdateRequestBackgroundRemoval$zodSchema
>;
export type ResourceUpdateRequest = {
display_name?: string | undefined;
unique_display_name?: boolean | undefined;
asset_folder?: string | undefined;
tags?: string | undefined;
context?: string | undefined;
metadata?: string | undefined;
clear_invalid?: boolean | undefined;
face_coordinates?: string | undefined;
custom_coordinates?: string | undefined;
regions?: string | undefined;
quality_override?: string | undefined;
moderation_status?: ModerationStatus | undefined;
auto_tagging?: number | undefined;
detection?: string | undefined;
ocr?: ResourceUpdateRequestOcr | undefined;
raw_convert?: RawConvert | undefined;
categorization?: ResourceUpdateRequestCategorization | undefined;
visual_search?: boolean | undefined;
background_removal?: ResourceUpdateRequestBackgroundRemoval | undefined;
access_control?: string | undefined;
};
export const ResourceUpdateRequest$zodSchema: z.ZodType<
ResourceUpdateRequest,
z.ZodTypeDef,
unknown
> = z.object({
access_control: z.string().optional(),
asset_folder: z.string().optional(),
auto_tagging: z.number().optional(),
background_removal: ResourceUpdateRequestBackgroundRemoval$zodSchema
.optional(),
categorization: ResourceUpdateRequestCategorization$zodSchema.optional(),
clear_invalid: z.boolean().default(false),
context: z.string().optional(),
custom_coordinates: z.string().optional(),
detection: z.string().optional(),
display_name: z.string().optional(),
face_coordinates: z.string().optional(),
metadata: z.string().optional(),
moderation_status: ModerationStatus$zodSchema.optional(),
ocr: ResourceUpdateRequestOcr$zodSchema.optional(),
quality_override: z.string().optional(),
raw_convert: RawConvert$zodSchema.optional(),
regions: z.string().optional(),
tags: z.string().optional(),
unique_display_name: z.boolean().default(false),
visual_search: z.boolean().optional(),
});