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

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";

export type ToolConfiguration = {
  exclude?: Array<string> | null | undefined;
  include?: Array<string> | null | undefined;
  requiresConfirmation?: Array<string> | null | undefined;
};

/** @internal */
export type ToolConfiguration$Outbound = {
  exclude?: Array<string> | null | undefined;
  include?: Array<string> | null | undefined;
  requires_confirmation?: Array<string> | null | undefined;
};

/** @internal */
export const ToolConfiguration$outboundSchema: z.ZodType<
  ToolConfiguration$Outbound,
  ToolConfiguration
> = z.object({
  exclude: z.nullable(z.array(z.string())).optional(),
  include: z.nullable(z.array(z.string())).optional(),
  requiresConfirmation: z.nullable(z.array(z.string())).optional(),
}).transform((v) => {
  return remap$(v, {
    requiresConfirmation: "requires_confirmation",
  });
});

export function toolConfigurationToJSON(
  toolConfiguration: ToolConfiguration,
): string {
  return JSON.stringify(
    ToolConfiguration$outboundSchema.parse(toolConfiguration),
  );
}
