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

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 tasks elicitation operations.
 */
export type TasksElicitationCapability = {
  create?: { [k: string]: any } | null | undefined;
  [additionalProperties: string]: unknown;
};

/** @internal */
export const TasksElicitationCapability$inboundSchema: z.ZodType<
  TasksElicitationCapability,
  unknown
> = z.object({
  create: z.nullable(z.record(z.string(), z.any())).optional(),
}).catchall(z.any());

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