/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; /** * Resource type */ export const PathParamResourceType = { Workflow: "workflow", Layout: "layout", } as const; /** * Resource type */ export type PathParamResourceType = ClosedEnum; export type TranslationControllerGetSingleTranslationRequest = { /** * Resource type */ resourceType: PathParamResourceType; /** * Resource ID */ resourceId: string; /** * Locale code */ locale: string; /** * A header for idempotency purposes */ idempotencyKey?: string | undefined; }; /** @internal */ export const PathParamResourceType$outboundSchema: z.ZodNativeEnum< typeof PathParamResourceType > = z.nativeEnum(PathParamResourceType); /** @internal */ export type TranslationControllerGetSingleTranslationRequest$Outbound = { resourceType: string; resourceId: string; locale: string; "idempotency-key"?: string | undefined; }; /** @internal */ export const TranslationControllerGetSingleTranslationRequest$outboundSchema: z.ZodType< TranslationControllerGetSingleTranslationRequest$Outbound, z.ZodTypeDef, TranslationControllerGetSingleTranslationRequest > = z.object({ resourceType: PathParamResourceType$outboundSchema, resourceId: z.string(), locale: z.string(), idempotencyKey: z.string().optional(), }).transform((v) => { return remap$(v, { idempotencyKey: "idempotency-key", }); }); export function translationControllerGetSingleTranslationRequestToJSON( translationControllerGetSingleTranslationRequest: TranslationControllerGetSingleTranslationRequest, ): string { return JSON.stringify( TranslationControllerGetSingleTranslationRequest$outboundSchema.parse( translationControllerGetSingleTranslationRequest, ), ); }