getresourcebyassetidop.ts•3.46 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { ApiError, ApiError$zodSchema } from "./apierror.js";
import { Info, Info$zodSchema } from "./info.js";
export type GetResourceByAssetIdGlobals = { cloud_name?: string | undefined };
export const GetResourceByAssetIdGlobals$zodSchema: z.ZodType<
GetResourceByAssetIdGlobals,
z.ZodTypeDef,
unknown
> = z.object({
cloud_name: z.string().describe("The cloud name of your product environment.")
.optional(),
});
export type GetResourceByAssetIdRequest = {
asset_id: string;
colors?: boolean | undefined;
media_metadata?: boolean | undefined;
faces?: boolean | undefined;
quality_analysis?: boolean | undefined;
accessibility_analysis?: boolean | undefined;
pages?: boolean | undefined;
phash?: boolean | undefined;
coordinates?: boolean | undefined;
versions?: boolean | undefined;
max_results?: number | undefined;
derived_next_cursor?: string | undefined;
};
export const GetResourceByAssetIdRequest$zodSchema: z.ZodType<
GetResourceByAssetIdRequest,
z.ZodTypeDef,
unknown
> = z.object({
accessibility_analysis: z.boolean().default(false).describe(
"Whether to return accessibility analysis scores for the image. Default: false.",
),
asset_id: z.string().describe(
"The asset ID of the resource. Must be a 32-character hexadecimal string.",
),
colors: z.boolean().default(false).describe(
"Whether to include color information (predominant colors and histogram of 32 leading colors). Default: false.",
),
coordinates: z.boolean().default(false).describe(
"Whether to include previously specified custom cropping coordinates and faces coordinates. Default: false.",
),
derived_next_cursor: z.string().describe(
"The cursor for the next page of derived assets when there are more derived images than max_results.",
).optional(),
faces: z.boolean().default(false).describe(
"Whether to include a list of coordinates of detected faces. Default: false.",
),
max_results: z.number().int().default(10).describe(
"Maximum number of derived assets to return. Default: 10.",
),
media_metadata: z.boolean().default(false).describe(
"Whether to include IPTC, XMP, and detailed Exif metadata in the response. Default: false.",
),
pages: z.boolean().default(false).describe(
"Whether to report the number of pages in multi-page documents (e.g., PDF). Default: false.",
),
phash: z.boolean().default(false).describe(
"Whether to include the perceptual hash (pHash) of the uploaded photo for image similarity detection. Default: false.",
),
quality_analysis: z.boolean().default(false).describe(
"Whether to return quality analysis scores for the image. Default: false.",
),
versions: z.boolean().default(false).describe(
"Whether to include details of all the backed up versions of the asset. Default: false.",
),
});
export type GetResourceByAssetIdResponse = {
ContentType: string;
StatusCode: number;
RawResponse: Response;
info?: Info | undefined;
api_error?: ApiError | undefined;
};
export const GetResourceByAssetIdResponse$zodSchema: z.ZodType<
GetResourceByAssetIdResponse,
z.ZodTypeDef,
unknown
> = z.object({
ContentType: z.string(),
RawResponse: z.instanceof(Response),
StatusCode: z.number().int(),
api_error: ApiError$zodSchema.optional(),
info: Info$zodSchema.optional(),
});