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

import * as z from "zod/v3";
import { remap as remap$ } from "../../lib/primitives.js";
import {
  FilterPayload,
  FilterPayload$Outbound,
  FilterPayload$outboundSchema,
} from "./filterpayload.js";

export type GetChatCompletionEventIdsInSchema = {
  searchParams: FilterPayload;
  extraFields?: Array<string> | null | undefined;
};

/** @internal */
export type GetChatCompletionEventIdsInSchema$Outbound = {
  search_params: FilterPayload$Outbound;
  extra_fields?: Array<string> | null | undefined;
};

/** @internal */
export const GetChatCompletionEventIdsInSchema$outboundSchema: z.ZodType<
  GetChatCompletionEventIdsInSchema$Outbound,
  z.ZodTypeDef,
  GetChatCompletionEventIdsInSchema
> = z.object({
  searchParams: FilterPayload$outboundSchema,
  extraFields: z.nullable(z.array(z.string())).optional(),
}).transform((v) => {
  return remap$(v, {
    searchParams: "search_params",
    extraFields: "extra_fields",
  });
});

export function getChatCompletionEventIdsInSchemaToJSON(
  getChatCompletionEventIdsInSchema: GetChatCompletionEventIdsInSchema,
): string {
  return JSON.stringify(
    GetChatCompletionEventIdsInSchema$outboundSchema.parse(
      getChatCompletionEventIdsInSchema,
    ),
  );
}
