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

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

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

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