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

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

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

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

/** @internal */
export const SearchChatCompletionEventIdsRequest$outboundSchema: z.ZodType<
  SearchChatCompletionEventIdsRequest$Outbound,
  SearchChatCompletionEventIdsRequest
> = 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 searchChatCompletionEventIdsRequestToJSON(
  searchChatCompletionEventIdsRequest: SearchChatCompletionEventIdsRequest,
): string {
  return JSON.stringify(
    SearchChatCompletionEventIdsRequest$outboundSchema.parse(
      searchChatCompletionEventIdsRequest,
    ),
  );
}
