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

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

export type AuthData = {
  clientId: string;
  clientSecret?: string | null | undefined;
};

/** @internal */
export type AuthData$Outbound = {
  client_id: string;
  client_secret?: string | null | undefined;
};

/** @internal */
export const AuthData$outboundSchema: z.ZodType<AuthData$Outbound, AuthData> = z
  .object({
    clientId: z.string(),
    clientSecret: z.nullable(z.string()).optional(),
  }).transform((v) => {
    return remap$(v, {
      clientId: "client_id",
      clientSecret: "client_secret",
    });
  });

export function authDataToJSON(authData: AuthData): string {
  return JSON.stringify(AuthData$outboundSchema.parse(authData));
}
