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

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

/**
 * Capability for prompts operations.
 */
export type PromptsCapability = {
  listChanged?: boolean | null | undefined;
  [additionalProperties: string]: unknown;
};

/** @internal */
export const PromptsCapability$inboundSchema: z.ZodType<
  PromptsCapability,
  unknown
> = z.object({
  listChanged: z.nullable(z.boolean()).optional(),
}).catchall(z.any());

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