/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: f551dbbfd537 */ import * as z from "zod"; import { ClosedEnum } from "../types/enums.js"; /** * Text alignment. */ export const TextAlign = { Left: "left", Center: "center", Right: "right", Justify: "justify", } as const; /** * Text alignment. */ export type TextAlign = ClosedEnum; export const TextAlign$zodSchema = z.enum([ "left", "center", "right", "justify", ]).describe("Text alignment."); /** * Whether to use a normal or bold font. */ export const FontWeight = { Normal: "normal", Bold: "bold", } as const; /** * Whether to use a normal or bold font. */ export type FontWeight = ClosedEnum; export const FontWeight$zodSchema = z.enum([ "normal", "bold", ]).describe("Whether to use a normal or bold font."); /** * Whether to use a normal or italic font. */ export const FontStyle = { Normal: "normal", Italic: "italic", } as const; /** * Whether to use a normal or italic font. */ export type FontStyle = ClosedEnum; export const FontStyle$zodSchema = z.enum([ "normal", "italic", ]).describe("Whether to use a normal or italic font."); /** * Text decoration style. */ export const TextDecoration = { None: "none", Underline: "underline", } as const; /** * Text decoration style. */ export type TextDecoration = ClosedEnum; export const TextDecoration$zodSchema = z.enum([ "none", "underline", ]).describe("Text decoration style."); export type TextRequest = { text: string; public_id?: string | undefined; font_family?: string | undefined; font_size?: number | undefined; font_color?: string | undefined; text_align?: TextAlign | undefined; font_weight?: FontWeight | undefined; font_style?: FontStyle | undefined; background?: string | undefined; opacity?: number | undefined; text_decoration?: TextDecoration | undefined; line_spacing?: number | undefined; }; export const TextRequest$zodSchema: z.ZodType = z.object({ background: z.string().default("transparent").describe( "Name or RGB representation of the background color (e.g., red or", ), font_color: z.string().default("black").describe( "Name or RGB representation of the font's color (e.g., red or", ), font_family: z.string().optional().describe("The name of the font family."), font_size: z.int().default(12).describe("Font size in points."), font_style: FontStyle$zodSchema.default("normal").describe( "Whether to use a normal or italic font.", ), font_weight: FontWeight$zodSchema.default("normal").describe( "Whether to use a normal or bold font.", ), line_spacing: z.int().optional().describe( "The spacing between lines of text in pixels.", ), opacity: z.int().default(100).describe( "Text opacity value between 0 (invisible) and 100.", ), public_id: z.string().optional().describe( "The identifier that is used for accessing the generated image. If not specified, a unique identifier is generated.", ), text: z.string().describe("The text string to generate an image for."), text_align: TextAlign$zodSchema.optional().describe("Text alignment."), text_decoration: TextDecoration$zodSchema.default("none").describe( "Text decoration style.", ), });