/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 095262107c1b
 */

import * as z from "zod/v4";

export type FunctionT = {
  name: string;
  description?: string | undefined;
  strict?: boolean | undefined;
  parameters: { [k: string]: any };
};

/** @internal */
export type FunctionT$Outbound = {
  name: string;
  description?: string | undefined;
  strict?: boolean | undefined;
  parameters: { [k: string]: any };
};

/** @internal */
export const FunctionT$outboundSchema: z.ZodType<
  FunctionT$Outbound,
  FunctionT
> = z.object({
  name: z.string(),
  description: z.string().optional(),
  strict: z.boolean().optional(),
  parameters: z.record(z.string(), z.any()),
});

export function functionToJSON(functionT: FunctionT): string {
  return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
}
