/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** * The resource type to associate translation with */ export const ResourceType = { Workflow: "workflow", Layout: "layout", } as const; /** * The resource type to associate translation with */ export type ResourceType = ClosedEnum; export type CreateTranslationRequestDto = { /** * The resource ID to associate translation with. Accepts identifier or slug format */ resourceId: string; /** * The resource type to associate translation with */ resourceType: ResourceType; /** * Locale code (e.g., en_US, es_ES) */ locale: string; /** * Translation content as JSON object */ content: { [k: string]: any }; }; /** @internal */ export const ResourceType$outboundSchema: z.ZodNativeEnum = z.nativeEnum(ResourceType); /** @internal */ export type CreateTranslationRequestDto$Outbound = { resourceId: string; resourceType: string; locale: string; content: { [k: string]: any }; }; /** @internal */ export const CreateTranslationRequestDto$outboundSchema: z.ZodType< CreateTranslationRequestDto$Outbound, z.ZodTypeDef, CreateTranslationRequestDto > = z.object({ resourceId: z.string(), resourceType: ResourceType$outboundSchema, locale: z.string(), content: z.record(z.any()), }); export function createTranslationRequestDtoToJSON( createTranslationRequestDto: CreateTranslationRequestDto, ): string { return JSON.stringify( CreateTranslationRequestDto$outboundSchema.parse( createTranslationRequestDto, ), ); }