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

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export type SearchChatCompletionEventIdsResponse = {
  completionEventIds: Array<string>;
};

/** @internal */
export const SearchChatCompletionEventIdsResponse$inboundSchema: z.ZodType<
  SearchChatCompletionEventIdsResponse,
  unknown
> = z.object({
  completion_event_ids: z.array(z.string()),
}).transform((v) => {
  return remap$(v, {
    "completion_event_ids": "completionEventIds",
  });
});

export function searchChatCompletionEventIdsResponseFromJSON(
  jsonString: string,
): SafeParseResult<SearchChatCompletionEventIdsResponse, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      SearchChatCompletionEventIdsResponse$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'SearchChatCompletionEventIdsResponse' from JSON`,
  );
}
