"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListAgentTasksStreamOptions$outboundSchema = exports.ListAgentTasksStreamOptions$inboundSchema = exports.ListAgentTasksStop$outboundSchema = exports.ListAgentTasksStop$inboundSchema = exports.ListAgentTasksResponseFormat$outboundSchema = exports.ListAgentTasksResponseFormat$inboundSchema = exports.ListAgentTasksResponseFormat1$outboundSchema = exports.ListAgentTasksResponseFormat1$inboundSchema = exports.ListAgentTasksResponseFormatType$outboundSchema = exports.ListAgentTasksResponseFormatType$inboundSchema = exports.ListAgentTasksResponseFormat2$outboundSchema = exports.ListAgentTasksResponseFormat2$inboundSchema = exports.ListAgentTasksResponseFormatAgentsType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsType$inboundSchema = exports.ListAgentTasksResponseFormat3$outboundSchema = exports.ListAgentTasksResponseFormat3$inboundSchema = exports.ListAgentTasksResponseFormatJsonSchema$outboundSchema = exports.ListAgentTasksResponseFormatJsonSchema$inboundSchema = exports.ListAgentTasksResponseFormatAgentsResponseType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponseType$inboundSchema = exports.ListAgentTasksAudio$outboundSchema = exports.ListAgentTasksAudio$inboundSchema = exports.ListAgentTasksFormat$outboundSchema = exports.ListAgentTasksFormat$inboundSchema = exports.ListAgentTasksVoice$outboundSchema = exports.ListAgentTasksVoice$inboundSchema = exports.ListAgentTasksRequest$outboundSchema = exports.ListAgentTasksRequest$inboundSchema = exports.Status$outboundSchema = exports.Status$inboundSchema = exports.ListAgentTasksToolApprovalRequired = exports.ListAgentTasksFallbackModelsModalities = exports.ListAgentTasksToolChoiceAgents1 = exports.ListAgentTasksToolChoiceAgentsType = exports.ListAgentTasksFallbackModelsType = exports.ListAgentTasksResponseFormatAgentsResponse200Type = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType = exports.ListAgentTasksFallbackModelsFormat = exports.ListAgentTasksFallbackModelsVoice = exports.ListAgentTasksModalities = exports.ListAgentTasksToolChoice1 = exports.ListAgentTasksToolChoiceType = exports.ListAgentTasksType = exports.ListAgentTasksResponseFormatType = exports.ListAgentTasksResponseFormatAgentsType = exports.ListAgentTasksResponseFormatAgentsResponseType = exports.ListAgentTasksFormat = exports.ListAgentTasksVoice = exports.Status = void 0;
exports.ListAgentTasksFallbackModelsThinking$outboundSchema = exports.ListAgentTasksFallbackModelsThinking$inboundSchema = exports.ListAgentTasksFallbackModelsType$outboundSchema = exports.ListAgentTasksFallbackModelsType$inboundSchema = exports.ListAgentTasksFallbackModelsStreamOptions$outboundSchema = exports.ListAgentTasksFallbackModelsStreamOptions$inboundSchema = exports.ListAgentTasksFallbackModelsStop$outboundSchema = exports.ListAgentTasksFallbackModelsStop$inboundSchema = exports.ListAgentTasksFallbackModelsResponseFormat$outboundSchema = exports.ListAgentTasksFallbackModelsResponseFormat$inboundSchema = exports.ListAgentTasksResponseFormatAgents1$outboundSchema = exports.ListAgentTasksResponseFormatAgents1$inboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200Type$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200Type$inboundSchema = exports.ListAgentTasksResponseFormatAgents2$outboundSchema = exports.ListAgentTasksResponseFormatAgents2$inboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema = exports.ListAgentTasksResponseFormatAgents3$outboundSchema = exports.ListAgentTasksResponseFormatAgents3$inboundSchema = exports.ListAgentTasksResponseFormatAgentsJsonSchema$outboundSchema = exports.ListAgentTasksResponseFormatAgentsJsonSchema$inboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema = exports.ListAgentTasksFallbackModelsAudio$outboundSchema = exports.ListAgentTasksFallbackModelsAudio$inboundSchema = exports.ListAgentTasksFallbackModelsFormat$outboundSchema = exports.ListAgentTasksFallbackModelsFormat$inboundSchema = exports.ListAgentTasksFallbackModelsVoice$outboundSchema = exports.ListAgentTasksFallbackModelsVoice$inboundSchema = exports.ListAgentTasksParameters$outboundSchema = exports.ListAgentTasksParameters$inboundSchema = exports.ListAgentTasksWebSearchOptions$outboundSchema = exports.ListAgentTasksWebSearchOptions$inboundSchema = exports.ListAgentTasksModalities$outboundSchema = exports.ListAgentTasksModalities$inboundSchema = exports.ListAgentTasksToolChoice$outboundSchema = exports.ListAgentTasksToolChoice$inboundSchema = exports.ListAgentTasksToolChoice1$outboundSchema = exports.ListAgentTasksToolChoice1$inboundSchema = exports.ListAgentTasksToolChoice2$outboundSchema = exports.ListAgentTasksToolChoice2$inboundSchema = exports.ListAgentTasksToolChoiceFunction$outboundSchema = exports.ListAgentTasksToolChoiceFunction$inboundSchema = exports.ListAgentTasksToolChoiceType$outboundSchema = exports.ListAgentTasksToolChoiceType$inboundSchema = exports.ListAgentTasksThinking$outboundSchema = exports.ListAgentTasksThinking$inboundSchema = exports.ListAgentTasksType$outboundSchema = exports.ListAgentTasksType$inboundSchema = void 0;
exports.ListAgentTasksResponseBody$outboundSchema = exports.ListAgentTasksResponseBody$inboundSchema = exports.Tasks$outboundSchema = exports.Tasks$inboundSchema = exports.ListAgentTasksMetrics$outboundSchema = exports.ListAgentTasksMetrics$inboundSchema = exports.ListAgentTasksState$outboundSchema = exports.ListAgentTasksState$inboundSchema = exports.ListAgentTasksMemory$outboundSchema = exports.ListAgentTasksMemory$inboundSchema = exports.AgentManifestSnapshot$outboundSchema = exports.AgentManifestSnapshot$inboundSchema = exports.ListAgentTasksSettings$outboundSchema = exports.ListAgentTasksSettings$inboundSchema = exports.ListAgentTasksTools$outboundSchema = exports.ListAgentTasksTools$inboundSchema = exports.ListAgentTasksConditions$outboundSchema = exports.ListAgentTasksConditions$inboundSchema = exports.ListAgentTasksToolApprovalRequired$outboundSchema = exports.ListAgentTasksToolApprovalRequired$inboundSchema = exports.ListAgentTasksModel$outboundSchema = exports.ListAgentTasksModel$inboundSchema = exports.ListAgentTasksFallbackModels$outboundSchema = exports.ListAgentTasksFallbackModels$inboundSchema = exports.ListAgentTasksFallbackModels2$outboundSchema = exports.ListAgentTasksFallbackModels2$inboundSchema = exports.ListAgentTasksFallbackModelsParameters$outboundSchema = exports.ListAgentTasksFallbackModelsParameters$inboundSchema = exports.ListAgentTasksFallbackModelsWebSearchOptions$outboundSchema = exports.ListAgentTasksFallbackModelsWebSearchOptions$inboundSchema = exports.ListAgentTasksFallbackModelsModalities$outboundSchema = exports.ListAgentTasksFallbackModelsModalities$inboundSchema = exports.ListAgentTasksFallbackModelsToolChoice$outboundSchema = exports.ListAgentTasksFallbackModelsToolChoice$inboundSchema = exports.ListAgentTasksToolChoiceAgents1$outboundSchema = exports.ListAgentTasksToolChoiceAgents1$inboundSchema = exports.ListAgentTasksToolChoiceAgents2$outboundSchema = exports.ListAgentTasksToolChoiceAgents2$inboundSchema = exports.ListAgentTasksToolChoiceAgentsFunction$outboundSchema = exports.ListAgentTasksToolChoiceAgentsFunction$inboundSchema = exports.ListAgentTasksToolChoiceAgentsType$outboundSchema = exports.ListAgentTasksToolChoiceAgentsType$inboundSchema = void 0;
exports.listAgentTasksRequestToJSON = listAgentTasksRequestToJSON;
exports.listAgentTasksRequestFromJSON = listAgentTasksRequestFromJSON;
exports.listAgentTasksAudioToJSON = listAgentTasksAudioToJSON;
exports.listAgentTasksAudioFromJSON = listAgentTasksAudioFromJSON;
exports.listAgentTasksResponseFormatJsonSchemaToJSON = listAgentTasksResponseFormatJsonSchemaToJSON;
exports.listAgentTasksResponseFormatJsonSchemaFromJSON = listAgentTasksResponseFormatJsonSchemaFromJSON;
exports.listAgentTasksResponseFormat3ToJSON = listAgentTasksResponseFormat3ToJSON;
exports.listAgentTasksResponseFormat3FromJSON = listAgentTasksResponseFormat3FromJSON;
exports.listAgentTasksResponseFormat2ToJSON = listAgentTasksResponseFormat2ToJSON;
exports.listAgentTasksResponseFormat2FromJSON = listAgentTasksResponseFormat2FromJSON;
exports.listAgentTasksResponseFormat1ToJSON = listAgentTasksResponseFormat1ToJSON;
exports.listAgentTasksResponseFormat1FromJSON = listAgentTasksResponseFormat1FromJSON;
exports.listAgentTasksResponseFormatToJSON = listAgentTasksResponseFormatToJSON;
exports.listAgentTasksResponseFormatFromJSON = listAgentTasksResponseFormatFromJSON;
exports.listAgentTasksStopToJSON = listAgentTasksStopToJSON;
exports.listAgentTasksStopFromJSON = listAgentTasksStopFromJSON;
exports.listAgentTasksStreamOptionsToJSON = listAgentTasksStreamOptionsToJSON;
exports.listAgentTasksStreamOptionsFromJSON = listAgentTasksStreamOptionsFromJSON;
exports.listAgentTasksThinkingToJSON = listAgentTasksThinkingToJSON;
exports.listAgentTasksThinkingFromJSON = listAgentTasksThinkingFromJSON;
exports.listAgentTasksToolChoiceFunctionToJSON = listAgentTasksToolChoiceFunctionToJSON;
exports.listAgentTasksToolChoiceFunctionFromJSON = listAgentTasksToolChoiceFunctionFromJSON;
exports.listAgentTasksToolChoice2ToJSON = listAgentTasksToolChoice2ToJSON;
exports.listAgentTasksToolChoice2FromJSON = listAgentTasksToolChoice2FromJSON;
exports.listAgentTasksToolChoiceToJSON = listAgentTasksToolChoiceToJSON;
exports.listAgentTasksToolChoiceFromJSON = listAgentTasksToolChoiceFromJSON;
exports.listAgentTasksWebSearchOptionsToJSON = listAgentTasksWebSearchOptionsToJSON;
exports.listAgentTasksWebSearchOptionsFromJSON = listAgentTasksWebSearchOptionsFromJSON;
exports.listAgentTasksParametersToJSON = listAgentTasksParametersToJSON;
exports.listAgentTasksParametersFromJSON = listAgentTasksParametersFromJSON;
exports.listAgentTasksFallbackModelsAudioToJSON = listAgentTasksFallbackModelsAudioToJSON;
exports.listAgentTasksFallbackModelsAudioFromJSON = listAgentTasksFallbackModelsAudioFromJSON;
exports.listAgentTasksResponseFormatAgentsJsonSchemaToJSON = listAgentTasksResponseFormatAgentsJsonSchemaToJSON;
exports.listAgentTasksResponseFormatAgentsJsonSchemaFromJSON = listAgentTasksResponseFormatAgentsJsonSchemaFromJSON;
exports.listAgentTasksResponseFormatAgents3ToJSON = listAgentTasksResponseFormatAgents3ToJSON;
exports.listAgentTasksResponseFormatAgents3FromJSON = listAgentTasksResponseFormatAgents3FromJSON;
exports.listAgentTasksResponseFormatAgents2ToJSON = listAgentTasksResponseFormatAgents2ToJSON;
exports.listAgentTasksResponseFormatAgents2FromJSON = listAgentTasksResponseFormatAgents2FromJSON;
exports.listAgentTasksResponseFormatAgents1ToJSON = listAgentTasksResponseFormatAgents1ToJSON;
exports.listAgentTasksResponseFormatAgents1FromJSON = listAgentTasksResponseFormatAgents1FromJSON;
exports.listAgentTasksFallbackModelsResponseFormatToJSON = listAgentTasksFallbackModelsResponseFormatToJSON;
exports.listAgentTasksFallbackModelsResponseFormatFromJSON = listAgentTasksFallbackModelsResponseFormatFromJSON;
exports.listAgentTasksFallbackModelsStopToJSON = listAgentTasksFallbackModelsStopToJSON;
exports.listAgentTasksFallbackModelsStopFromJSON = listAgentTasksFallbackModelsStopFromJSON;
exports.listAgentTasksFallbackModelsStreamOptionsToJSON = listAgentTasksFallbackModelsStreamOptionsToJSON;
exports.listAgentTasksFallbackModelsStreamOptionsFromJSON = listAgentTasksFallbackModelsStreamOptionsFromJSON;
exports.listAgentTasksFallbackModelsThinkingToJSON = listAgentTasksFallbackModelsThinkingToJSON;
exports.listAgentTasksFallbackModelsThinkingFromJSON = listAgentTasksFallbackModelsThinkingFromJSON;
exports.listAgentTasksToolChoiceAgentsFunctionToJSON = listAgentTasksToolChoiceAgentsFunctionToJSON;
exports.listAgentTasksToolChoiceAgentsFunctionFromJSON = listAgentTasksToolChoiceAgentsFunctionFromJSON;
exports.listAgentTasksToolChoiceAgents2ToJSON = listAgentTasksToolChoiceAgents2ToJSON;
exports.listAgentTasksToolChoiceAgents2FromJSON = listAgentTasksToolChoiceAgents2FromJSON;
exports.listAgentTasksFallbackModelsToolChoiceToJSON = listAgentTasksFallbackModelsToolChoiceToJSON;
exports.listAgentTasksFallbackModelsToolChoiceFromJSON = listAgentTasksFallbackModelsToolChoiceFromJSON;
exports.listAgentTasksFallbackModelsWebSearchOptionsToJSON = listAgentTasksFallbackModelsWebSearchOptionsToJSON;
exports.listAgentTasksFallbackModelsWebSearchOptionsFromJSON = listAgentTasksFallbackModelsWebSearchOptionsFromJSON;
exports.listAgentTasksFallbackModelsParametersToJSON = listAgentTasksFallbackModelsParametersToJSON;
exports.listAgentTasksFallbackModelsParametersFromJSON = listAgentTasksFallbackModelsParametersFromJSON;
exports.listAgentTasksFallbackModels2ToJSON = listAgentTasksFallbackModels2ToJSON;
exports.listAgentTasksFallbackModels2FromJSON = listAgentTasksFallbackModels2FromJSON;
exports.listAgentTasksFallbackModelsToJSON = listAgentTasksFallbackModelsToJSON;
exports.listAgentTasksFallbackModelsFromJSON = listAgentTasksFallbackModelsFromJSON;
exports.listAgentTasksModelToJSON = listAgentTasksModelToJSON;
exports.listAgentTasksModelFromJSON = listAgentTasksModelFromJSON;
exports.listAgentTasksConditionsToJSON = listAgentTasksConditionsToJSON;
exports.listAgentTasksConditionsFromJSON = listAgentTasksConditionsFromJSON;
exports.listAgentTasksToolsToJSON = listAgentTasksToolsToJSON;
exports.listAgentTasksToolsFromJSON = listAgentTasksToolsFromJSON;
exports.listAgentTasksSettingsToJSON = listAgentTasksSettingsToJSON;
exports.listAgentTasksSettingsFromJSON = listAgentTasksSettingsFromJSON;
exports.agentManifestSnapshotToJSON = agentManifestSnapshotToJSON;
exports.agentManifestSnapshotFromJSON = agentManifestSnapshotFromJSON;
exports.listAgentTasksMemoryToJSON = listAgentTasksMemoryToJSON;
exports.listAgentTasksMemoryFromJSON = listAgentTasksMemoryFromJSON;
exports.listAgentTasksStateToJSON = listAgentTasksStateToJSON;
exports.listAgentTasksStateFromJSON = listAgentTasksStateFromJSON;
exports.listAgentTasksMetricsToJSON = listAgentTasksMetricsToJSON;
exports.listAgentTasksMetricsFromJSON = listAgentTasksMetricsFromJSON;
exports.tasksToJSON = tasksToJSON;
exports.tasksFromJSON = tasksFromJSON;
exports.listAgentTasksResponseBodyToJSON = listAgentTasksResponseBodyToJSON;
exports.listAgentTasksResponseBodyFromJSON = listAgentTasksResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * Comma-separated list of task statuses to filter by. Available values: inactive, approval_required, in_progress, errored
 */
exports.Status = {
    Inactive: "inactive",
    ApprovalRequired: "approval_required",
    InProgress: "in_progress",
    Errored: "errored",
};
/**
 * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
 */
exports.ListAgentTasksVoice = {
    Alloy: "alloy",
    Echo: "echo",
    Fable: "fable",
    Onyx: "onyx",
    Nova: "nova",
    Shimmer: "shimmer",
};
/**
 * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
 */
exports.ListAgentTasksFormat = {
    Wav: "wav",
    Mp3: "mp3",
    Flac: "flac",
    Opus: "opus",
    Pcm16: "pcm16",
};
exports.ListAgentTasksResponseFormatAgentsResponseType = {
    JsonSchema: "json_schema",
};
exports.ListAgentTasksResponseFormatAgentsType = {
    JsonObject: "json_object",
};
exports.ListAgentTasksResponseFormatType = {
    Text: "text",
};
/**
 * Enables or disables the thinking mode capability
 */
exports.ListAgentTasksType = {
    Enabled: "enabled",
    Disabled: "disabled",
};
/**
 * The type of the tool. Currently, only function is supported.
 */
exports.ListAgentTasksToolChoiceType = {
    Function: "function",
};
exports.ListAgentTasksToolChoice1 = {
    None: "none",
    Auto: "auto",
    Required: "required",
};
exports.ListAgentTasksModalities = {
    Text: "text",
    Audio: "audio",
};
/**
 * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
 */
exports.ListAgentTasksFallbackModelsVoice = {
    Alloy: "alloy",
    Echo: "echo",
    Fable: "fable",
    Onyx: "onyx",
    Nova: "nova",
    Shimmer: "shimmer",
};
/**
 * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
 */
exports.ListAgentTasksFallbackModelsFormat = {
    Wav: "wav",
    Mp3: "mp3",
    Flac: "flac",
    Opus: "opus",
    Pcm16: "pcm16",
};
exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType = {
    JsonSchema: "json_schema",
};
exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType = {
    JsonObject: "json_object",
};
exports.ListAgentTasksResponseFormatAgentsResponse200Type = {
    Text: "text",
};
/**
 * Enables or disables the thinking mode capability
 */
exports.ListAgentTasksFallbackModelsType = {
    Enabled: "enabled",
    Disabled: "disabled",
};
/**
 * The type of the tool. Currently, only function is supported.
 */
exports.ListAgentTasksToolChoiceAgentsType = {
    Function: "function",
};
exports.ListAgentTasksToolChoiceAgents1 = {
    None: "none",
    Auto: "auto",
    Required: "required",
};
exports.ListAgentTasksFallbackModelsModalities = {
    Text: "text",
    Audio: "audio",
};
/**
 * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
 */
exports.ListAgentTasksToolApprovalRequired = {
    All: "all",
    RespectTool: "respect_tool",
    None: "none",
};
/** @internal */
exports.Status$inboundSchema = z
    .nativeEnum(exports.Status);
/** @internal */
exports.Status$outboundSchema = exports.Status$inboundSchema;
/** @internal */
exports.ListAgentTasksRequest$inboundSchema = z.object({
    agent_key: z.string(),
    limit: z.number().default(10),
    starting_after: z.string().optional(),
    ending_before: z.string().optional(),
    status: exports.Status$inboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "agent_key": "agentKey",
        "starting_after": "startingAfter",
        "ending_before": "endingBefore",
    });
});
/** @internal */
exports.ListAgentTasksRequest$outboundSchema = z.object({
    agentKey: z.string(),
    limit: z.number().default(10),
    startingAfter: z.string().optional(),
    endingBefore: z.string().optional(),
    status: exports.Status$outboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        agentKey: "agent_key",
        startingAfter: "starting_after",
        endingBefore: "ending_before",
    });
});
function listAgentTasksRequestToJSON(listAgentTasksRequest) {
    return JSON.stringify(exports.ListAgentTasksRequest$outboundSchema.parse(listAgentTasksRequest));
}
function listAgentTasksRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksRequest' from JSON`);
}
/** @internal */
exports.ListAgentTasksVoice$inboundSchema = z.nativeEnum(exports.ListAgentTasksVoice);
/** @internal */
exports.ListAgentTasksVoice$outboundSchema = exports.ListAgentTasksVoice$inboundSchema;
/** @internal */
exports.ListAgentTasksFormat$inboundSchema = z.nativeEnum(exports.ListAgentTasksFormat);
/** @internal */
exports.ListAgentTasksFormat$outboundSchema = exports.ListAgentTasksFormat$inboundSchema;
/** @internal */
exports.ListAgentTasksAudio$inboundSchema = z.object({
    voice: exports.ListAgentTasksVoice$inboundSchema,
    format: exports.ListAgentTasksFormat$inboundSchema,
});
/** @internal */
exports.ListAgentTasksAudio$outboundSchema = z.object({
    voice: exports.ListAgentTasksVoice$outboundSchema,
    format: exports.ListAgentTasksFormat$outboundSchema,
});
function listAgentTasksAudioToJSON(listAgentTasksAudio) {
    return JSON.stringify(exports.ListAgentTasksAudio$outboundSchema.parse(listAgentTasksAudio));
}
function listAgentTasksAudioFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksAudio' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponseType$inboundSchema = z
    .nativeEnum(exports.ListAgentTasksResponseFormatAgentsResponseType);
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponseType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponseType$inboundSchema;
/** @internal */
exports.ListAgentTasksResponseFormatJsonSchema$inboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().optional(),
});
/** @internal */
exports.ListAgentTasksResponseFormatJsonSchema$outboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().optional(),
});
function listAgentTasksResponseFormatJsonSchemaToJSON(listAgentTasksResponseFormatJsonSchema) {
    return JSON.stringify(exports.ListAgentTasksResponseFormatJsonSchema$outboundSchema.parse(listAgentTasksResponseFormatJsonSchema));
}
function listAgentTasksResponseFormatJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormatJsonSchema' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormat3$inboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponseType$inboundSchema,
    json_schema: z.lazy(() => exports.ListAgentTasksResponseFormatJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "json_schema": "jsonSchema",
    });
});
/** @internal */
exports.ListAgentTasksResponseFormat3$outboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponseType$outboundSchema,
    jsonSchema: z.lazy(() => exports.ListAgentTasksResponseFormatJsonSchema$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        jsonSchema: "json_schema",
    });
});
function listAgentTasksResponseFormat3ToJSON(listAgentTasksResponseFormat3) {
    return JSON.stringify(exports.ListAgentTasksResponseFormat3$outboundSchema.parse(listAgentTasksResponseFormat3));
}
function listAgentTasksResponseFormat3FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormat3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormat3' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormatAgentsType$inboundSchema = z.nativeEnum(exports.ListAgentTasksResponseFormatAgentsType);
/** @internal */
exports.ListAgentTasksResponseFormatAgentsType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsType$inboundSchema;
/** @internal */
exports.ListAgentTasksResponseFormat2$inboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsType$inboundSchema,
});
/** @internal */
exports.ListAgentTasksResponseFormat2$outboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsType$outboundSchema,
});
function listAgentTasksResponseFormat2ToJSON(listAgentTasksResponseFormat2) {
    return JSON.stringify(exports.ListAgentTasksResponseFormat2$outboundSchema.parse(listAgentTasksResponseFormat2));
}
function listAgentTasksResponseFormat2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormat2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormat2' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormatType$inboundSchema = z.nativeEnum(exports.ListAgentTasksResponseFormatType);
/** @internal */
exports.ListAgentTasksResponseFormatType$outboundSchema = exports.ListAgentTasksResponseFormatType$inboundSchema;
/** @internal */
exports.ListAgentTasksResponseFormat1$inboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatType$inboundSchema,
});
/** @internal */
exports.ListAgentTasksResponseFormat1$outboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatType$outboundSchema,
});
function listAgentTasksResponseFormat1ToJSON(listAgentTasksResponseFormat1) {
    return JSON.stringify(exports.ListAgentTasksResponseFormat1$outboundSchema.parse(listAgentTasksResponseFormat1));
}
function listAgentTasksResponseFormat1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormat1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormat1' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormat$inboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksResponseFormat3$inboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormat1$inboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormat2$inboundSchema),
]);
/** @internal */
exports.ListAgentTasksResponseFormat$outboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksResponseFormat3$outboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormat1$outboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormat2$outboundSchema),
]);
function listAgentTasksResponseFormatToJSON(listAgentTasksResponseFormat) {
    return JSON.stringify(exports.ListAgentTasksResponseFormat$outboundSchema.parse(listAgentTasksResponseFormat));
}
function listAgentTasksResponseFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormat' from JSON`);
}
/** @internal */
exports.ListAgentTasksStop$inboundSchema = z.union([z.string(), z.array(z.string())]);
/** @internal */
exports.ListAgentTasksStop$outboundSchema = z.union([z.string(), z.array(z.string())]);
function listAgentTasksStopToJSON(listAgentTasksStop) {
    return JSON.stringify(exports.ListAgentTasksStop$outboundSchema.parse(listAgentTasksStop));
}
function listAgentTasksStopFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksStop' from JSON`);
}
/** @internal */
exports.ListAgentTasksStreamOptions$inboundSchema = z.object({
    include_usage: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "include_usage": "includeUsage",
    });
});
/** @internal */
exports.ListAgentTasksStreamOptions$outboundSchema = z.object({
    includeUsage: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        includeUsage: "include_usage",
    });
});
function listAgentTasksStreamOptionsToJSON(listAgentTasksStreamOptions) {
    return JSON.stringify(exports.ListAgentTasksStreamOptions$outboundSchema.parse(listAgentTasksStreamOptions));
}
function listAgentTasksStreamOptionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksStreamOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksStreamOptions' from JSON`);
}
/** @internal */
exports.ListAgentTasksType$inboundSchema = z.nativeEnum(exports.ListAgentTasksType);
/** @internal */
exports.ListAgentTasksType$outboundSchema = exports.ListAgentTasksType$inboundSchema;
/** @internal */
exports.ListAgentTasksThinking$inboundSchema = z.object({
    type: exports.ListAgentTasksType$inboundSchema,
    budget_tokens: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "budget_tokens": "budgetTokens",
    });
});
/** @internal */
exports.ListAgentTasksThinking$outboundSchema = z.object({
    type: exports.ListAgentTasksType$outboundSchema,
    budgetTokens: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        budgetTokens: "budget_tokens",
    });
});
function listAgentTasksThinkingToJSON(listAgentTasksThinking) {
    return JSON.stringify(exports.ListAgentTasksThinking$outboundSchema.parse(listAgentTasksThinking));
}
function listAgentTasksThinkingFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksThinking$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksThinking' from JSON`);
}
/** @internal */
exports.ListAgentTasksToolChoiceType$inboundSchema = z.nativeEnum(exports.ListAgentTasksToolChoiceType);
/** @internal */
exports.ListAgentTasksToolChoiceType$outboundSchema = exports.ListAgentTasksToolChoiceType$inboundSchema;
/** @internal */
exports.ListAgentTasksToolChoiceFunction$inboundSchema = z.object({
    name: z.string().optional(),
});
/** @internal */
exports.ListAgentTasksToolChoiceFunction$outboundSchema = z.object({
    name: z.string().optional(),
});
function listAgentTasksToolChoiceFunctionToJSON(listAgentTasksToolChoiceFunction) {
    return JSON.stringify(exports.ListAgentTasksToolChoiceFunction$outboundSchema.parse(listAgentTasksToolChoiceFunction));
}
function listAgentTasksToolChoiceFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksToolChoiceFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksToolChoiceFunction' from JSON`);
}
/** @internal */
exports.ListAgentTasksToolChoice2$inboundSchema = z.object({
    type: exports.ListAgentTasksToolChoiceType$inboundSchema.optional(),
    function: z.lazy(() => exports.ListAgentTasksToolChoiceFunction$inboundSchema),
});
/** @internal */
exports.ListAgentTasksToolChoice2$outboundSchema = z.object({
    type: exports.ListAgentTasksToolChoiceType$outboundSchema.optional(),
    function: z.lazy(() => exports.ListAgentTasksToolChoiceFunction$outboundSchema),
});
function listAgentTasksToolChoice2ToJSON(listAgentTasksToolChoice2) {
    return JSON.stringify(exports.ListAgentTasksToolChoice2$outboundSchema.parse(listAgentTasksToolChoice2));
}
function listAgentTasksToolChoice2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksToolChoice2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksToolChoice2' from JSON`);
}
/** @internal */
exports.ListAgentTasksToolChoice1$inboundSchema = z.nativeEnum(exports.ListAgentTasksToolChoice1);
/** @internal */
exports.ListAgentTasksToolChoice1$outboundSchema = exports.ListAgentTasksToolChoice1$inboundSchema;
/** @internal */
exports.ListAgentTasksToolChoice$inboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksToolChoice2$inboundSchema),
    exports.ListAgentTasksToolChoice1$inboundSchema,
]);
/** @internal */
exports.ListAgentTasksToolChoice$outboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksToolChoice2$outboundSchema),
    exports.ListAgentTasksToolChoice1$outboundSchema,
]);
function listAgentTasksToolChoiceToJSON(listAgentTasksToolChoice) {
    return JSON.stringify(exports.ListAgentTasksToolChoice$outboundSchema.parse(listAgentTasksToolChoice));
}
function listAgentTasksToolChoiceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksToolChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksToolChoice' from JSON`);
}
/** @internal */
exports.ListAgentTasksModalities$inboundSchema = z.nativeEnum(exports.ListAgentTasksModalities);
/** @internal */
exports.ListAgentTasksModalities$outboundSchema = exports.ListAgentTasksModalities$inboundSchema;
/** @internal */
exports.ListAgentTasksWebSearchOptions$inboundSchema = z.object({
    enabled: z.boolean().optional(),
});
/** @internal */
exports.ListAgentTasksWebSearchOptions$outboundSchema = z.object({
    enabled: z.boolean().optional(),
});
function listAgentTasksWebSearchOptionsToJSON(listAgentTasksWebSearchOptions) {
    return JSON.stringify(exports.ListAgentTasksWebSearchOptions$outboundSchema.parse(listAgentTasksWebSearchOptions));
}
function listAgentTasksWebSearchOptionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksWebSearchOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksWebSearchOptions' from JSON`);
}
/** @internal */
exports.ListAgentTasksParameters$inboundSchema = z.object({
    audio: z.nullable(z.lazy(() => exports.ListAgentTasksAudio$inboundSchema)).optional(),
    frequency_penalty: z.nullable(z.number()).optional(),
    max_tokens: z.nullable(z.number().int()).optional(),
    max_completion_tokens: z.nullable(z.number().int()).optional(),
    logprobs: z.nullable(z.boolean()).optional(),
    top_logprobs: z.nullable(z.number().int()).optional(),
    n: z.nullable(z.number().int()).optional(),
    presence_penalty: z.nullable(z.number()).optional(),
    response_format: z.union([
        z.lazy(() => exports.ListAgentTasksResponseFormat3$inboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormat1$inboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormat2$inboundSchema),
    ]).optional(),
    reasoning_effort: z.string().optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    stream_options: z.nullable(z.lazy(() => exports.ListAgentTasksStreamOptions$inboundSchema)).optional(),
    thinking: z.lazy(() => exports.ListAgentTasksThinking$inboundSchema).optional(),
    temperature: z.nullable(z.number()).optional(),
    top_p: z.nullable(z.number()).optional(),
    top_k: z.nullable(z.number()).optional(),
    tool_choice: z.union([
        z.lazy(() => exports.ListAgentTasksToolChoice2$inboundSchema),
        exports.ListAgentTasksToolChoice1$inboundSchema,
    ]).optional(),
    parallel_tool_calls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.ListAgentTasksModalities$inboundSchema))
        .optional(),
    web_search_options: z.lazy(() => exports.ListAgentTasksWebSearchOptions$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "frequency_penalty": "frequencyPenalty",
        "max_tokens": "maxTokens",
        "max_completion_tokens": "maxCompletionTokens",
        "top_logprobs": "topLogprobs",
        "presence_penalty": "presencePenalty",
        "response_format": "responseFormat",
        "reasoning_effort": "reasoningEffort",
        "stream_options": "streamOptions",
        "top_p": "topP",
        "top_k": "topK",
        "tool_choice": "toolChoice",
        "parallel_tool_calls": "parallelToolCalls",
        "web_search_options": "webSearchOptions",
    });
});
/** @internal */
exports.ListAgentTasksParameters$outboundSchema = z.object({
    audio: z.nullable(z.lazy(() => exports.ListAgentTasksAudio$outboundSchema))
        .optional(),
    frequencyPenalty: z.nullable(z.number()).optional(),
    maxTokens: z.nullable(z.number().int()).optional(),
    maxCompletionTokens: z.nullable(z.number().int()).optional(),
    logprobs: z.nullable(z.boolean()).optional(),
    topLogprobs: z.nullable(z.number().int()).optional(),
    n: z.nullable(z.number().int()).optional(),
    presencePenalty: z.nullable(z.number()).optional(),
    responseFormat: z.union([
        z.lazy(() => exports.ListAgentTasksResponseFormat3$outboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormat1$outboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormat2$outboundSchema),
    ]).optional(),
    reasoningEffort: z.string().optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    streamOptions: z.nullable(z.lazy(() => exports.ListAgentTasksStreamOptions$outboundSchema)).optional(),
    thinking: z.lazy(() => exports.ListAgentTasksThinking$outboundSchema).optional(),
    temperature: z.nullable(z.number()).optional(),
    topP: z.nullable(z.number()).optional(),
    topK: z.nullable(z.number()).optional(),
    toolChoice: z.union([
        z.lazy(() => exports.ListAgentTasksToolChoice2$outboundSchema),
        exports.ListAgentTasksToolChoice1$outboundSchema,
    ]).optional(),
    parallelToolCalls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.ListAgentTasksModalities$outboundSchema))
        .optional(),
    webSearchOptions: z.lazy(() => exports.ListAgentTasksWebSearchOptions$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        frequencyPenalty: "frequency_penalty",
        maxTokens: "max_tokens",
        maxCompletionTokens: "max_completion_tokens",
        topLogprobs: "top_logprobs",
        presencePenalty: "presence_penalty",
        responseFormat: "response_format",
        reasoningEffort: "reasoning_effort",
        streamOptions: "stream_options",
        topP: "top_p",
        topK: "top_k",
        toolChoice: "tool_choice",
        parallelToolCalls: "parallel_tool_calls",
        webSearchOptions: "web_search_options",
    });
});
function listAgentTasksParametersToJSON(listAgentTasksParameters) {
    return JSON.stringify(exports.ListAgentTasksParameters$outboundSchema.parse(listAgentTasksParameters));
}
function listAgentTasksParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksParameters' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModelsVoice$inboundSchema = z.nativeEnum(exports.ListAgentTasksFallbackModelsVoice);
/** @internal */
exports.ListAgentTasksFallbackModelsVoice$outboundSchema = exports.ListAgentTasksFallbackModelsVoice$inboundSchema;
/** @internal */
exports.ListAgentTasksFallbackModelsFormat$inboundSchema = z.nativeEnum(exports.ListAgentTasksFallbackModelsFormat);
/** @internal */
exports.ListAgentTasksFallbackModelsFormat$outboundSchema = exports.ListAgentTasksFallbackModelsFormat$inboundSchema;
/** @internal */
exports.ListAgentTasksFallbackModelsAudio$inboundSchema = z.object({
    voice: exports.ListAgentTasksFallbackModelsVoice$inboundSchema,
    format: exports.ListAgentTasksFallbackModelsFormat$inboundSchema,
});
/** @internal */
exports.ListAgentTasksFallbackModelsAudio$outboundSchema = z.object({
    voice: exports.ListAgentTasksFallbackModelsVoice$outboundSchema,
    format: exports.ListAgentTasksFallbackModelsFormat$outboundSchema,
});
function listAgentTasksFallbackModelsAudioToJSON(listAgentTasksFallbackModelsAudio) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsAudio$outboundSchema.parse(listAgentTasksFallbackModelsAudio));
}
function listAgentTasksFallbackModelsAudioFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsAudio' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema = z.nativeEnum(exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType);
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema;
/** @internal */
exports.ListAgentTasksResponseFormatAgentsJsonSchema$inboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().optional(),
});
/** @internal */
exports.ListAgentTasksResponseFormatAgentsJsonSchema$outboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().optional(),
});
function listAgentTasksResponseFormatAgentsJsonSchemaToJSON(listAgentTasksResponseFormatAgentsJsonSchema) {
    return JSON.stringify(exports.ListAgentTasksResponseFormatAgentsJsonSchema$outboundSchema.parse(listAgentTasksResponseFormatAgentsJsonSchema));
}
function listAgentTasksResponseFormatAgentsJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormatAgentsJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormatAgentsJsonSchema' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormatAgents3$inboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema,
    json_schema: z.lazy(() => exports.ListAgentTasksResponseFormatAgentsJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "json_schema": "jsonSchema",
    });
});
/** @internal */
exports.ListAgentTasksResponseFormatAgents3$outboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema,
    jsonSchema: z.lazy(() => exports.ListAgentTasksResponseFormatAgentsJsonSchema$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        jsonSchema: "json_schema",
    });
});
function listAgentTasksResponseFormatAgents3ToJSON(listAgentTasksResponseFormatAgents3) {
    return JSON.stringify(exports.ListAgentTasksResponseFormatAgents3$outboundSchema.parse(listAgentTasksResponseFormatAgents3));
}
function listAgentTasksResponseFormatAgents3FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormatAgents3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormatAgents3' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema = z.nativeEnum(exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType);
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema;
/** @internal */
exports.ListAgentTasksResponseFormatAgents2$inboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema,
});
/** @internal */
exports.ListAgentTasksResponseFormatAgents2$outboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema,
});
function listAgentTasksResponseFormatAgents2ToJSON(listAgentTasksResponseFormatAgents2) {
    return JSON.stringify(exports.ListAgentTasksResponseFormatAgents2$outboundSchema.parse(listAgentTasksResponseFormatAgents2));
}
function listAgentTasksResponseFormatAgents2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormatAgents2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormatAgents2' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponse200Type$inboundSchema = z
    .nativeEnum(exports.ListAgentTasksResponseFormatAgentsResponse200Type);
/** @internal */
exports.ListAgentTasksResponseFormatAgentsResponse200Type$outboundSchema = exports.ListAgentTasksResponseFormatAgentsResponse200Type$inboundSchema;
/** @internal */
exports.ListAgentTasksResponseFormatAgents1$inboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponse200Type$inboundSchema,
});
/** @internal */
exports.ListAgentTasksResponseFormatAgents1$outboundSchema = z.object({
    type: exports.ListAgentTasksResponseFormatAgentsResponse200Type$outboundSchema,
});
function listAgentTasksResponseFormatAgents1ToJSON(listAgentTasksResponseFormatAgents1) {
    return JSON.stringify(exports.ListAgentTasksResponseFormatAgents1$outboundSchema.parse(listAgentTasksResponseFormatAgents1));
}
function listAgentTasksResponseFormatAgents1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseFormatAgents1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseFormatAgents1' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModelsResponseFormat$inboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksResponseFormatAgents3$inboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormatAgents1$inboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormatAgents2$inboundSchema),
]);
/** @internal */
exports.ListAgentTasksFallbackModelsResponseFormat$outboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksResponseFormatAgents3$outboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormatAgents1$outboundSchema),
    z.lazy(() => exports.ListAgentTasksResponseFormatAgents2$outboundSchema),
]);
function listAgentTasksFallbackModelsResponseFormatToJSON(listAgentTasksFallbackModelsResponseFormat) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsResponseFormat$outboundSchema.parse(listAgentTasksFallbackModelsResponseFormat));
}
function listAgentTasksFallbackModelsResponseFormatFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsResponseFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsResponseFormat' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModelsStop$inboundSchema = z.union([z.string(), z.array(z.string())]);
/** @internal */
exports.ListAgentTasksFallbackModelsStop$outboundSchema = z.union([z.string(), z.array(z.string())]);
function listAgentTasksFallbackModelsStopToJSON(listAgentTasksFallbackModelsStop) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsStop$outboundSchema.parse(listAgentTasksFallbackModelsStop));
}
function listAgentTasksFallbackModelsStopFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsStop' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModelsStreamOptions$inboundSchema = z.object({
    include_usage: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "include_usage": "includeUsage",
    });
});
/** @internal */
exports.ListAgentTasksFallbackModelsStreamOptions$outboundSchema = z.object({
    includeUsage: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        includeUsage: "include_usage",
    });
});
function listAgentTasksFallbackModelsStreamOptionsToJSON(listAgentTasksFallbackModelsStreamOptions) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsStreamOptions$outboundSchema.parse(listAgentTasksFallbackModelsStreamOptions));
}
function listAgentTasksFallbackModelsStreamOptionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsStreamOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsStreamOptions' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModelsType$inboundSchema = z.nativeEnum(exports.ListAgentTasksFallbackModelsType);
/** @internal */
exports.ListAgentTasksFallbackModelsType$outboundSchema = exports.ListAgentTasksFallbackModelsType$inboundSchema;
/** @internal */
exports.ListAgentTasksFallbackModelsThinking$inboundSchema = z.object({
    type: exports.ListAgentTasksFallbackModelsType$inboundSchema,
    budget_tokens: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "budget_tokens": "budgetTokens",
    });
});
/** @internal */
exports.ListAgentTasksFallbackModelsThinking$outboundSchema = z.object({
    type: exports.ListAgentTasksFallbackModelsType$outboundSchema,
    budgetTokens: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        budgetTokens: "budget_tokens",
    });
});
function listAgentTasksFallbackModelsThinkingToJSON(listAgentTasksFallbackModelsThinking) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsThinking$outboundSchema.parse(listAgentTasksFallbackModelsThinking));
}
function listAgentTasksFallbackModelsThinkingFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsThinking$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsThinking' from JSON`);
}
/** @internal */
exports.ListAgentTasksToolChoiceAgentsType$inboundSchema = z.nativeEnum(exports.ListAgentTasksToolChoiceAgentsType);
/** @internal */
exports.ListAgentTasksToolChoiceAgentsType$outboundSchema = exports.ListAgentTasksToolChoiceAgentsType$inboundSchema;
/** @internal */
exports.ListAgentTasksToolChoiceAgentsFunction$inboundSchema = z.object({
    name: z.string().optional(),
});
/** @internal */
exports.ListAgentTasksToolChoiceAgentsFunction$outboundSchema = z.object({
    name: z.string().optional(),
});
function listAgentTasksToolChoiceAgentsFunctionToJSON(listAgentTasksToolChoiceAgentsFunction) {
    return JSON.stringify(exports.ListAgentTasksToolChoiceAgentsFunction$outboundSchema.parse(listAgentTasksToolChoiceAgentsFunction));
}
function listAgentTasksToolChoiceAgentsFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksToolChoiceAgentsFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksToolChoiceAgentsFunction' from JSON`);
}
/** @internal */
exports.ListAgentTasksToolChoiceAgents2$inboundSchema = z.object({
    type: exports.ListAgentTasksToolChoiceAgentsType$inboundSchema.optional(),
    function: z.lazy(() => exports.ListAgentTasksToolChoiceAgentsFunction$inboundSchema),
});
/** @internal */
exports.ListAgentTasksToolChoiceAgents2$outboundSchema = z.object({
    type: exports.ListAgentTasksToolChoiceAgentsType$outboundSchema.optional(),
    function: z.lazy(() => exports.ListAgentTasksToolChoiceAgentsFunction$outboundSchema),
});
function listAgentTasksToolChoiceAgents2ToJSON(listAgentTasksToolChoiceAgents2) {
    return JSON.stringify(exports.ListAgentTasksToolChoiceAgents2$outboundSchema.parse(listAgentTasksToolChoiceAgents2));
}
function listAgentTasksToolChoiceAgents2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksToolChoiceAgents2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksToolChoiceAgents2' from JSON`);
}
/** @internal */
exports.ListAgentTasksToolChoiceAgents1$inboundSchema = z.nativeEnum(exports.ListAgentTasksToolChoiceAgents1);
/** @internal */
exports.ListAgentTasksToolChoiceAgents1$outboundSchema = exports.ListAgentTasksToolChoiceAgents1$inboundSchema;
/** @internal */
exports.ListAgentTasksFallbackModelsToolChoice$inboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksToolChoiceAgents2$inboundSchema),
    exports.ListAgentTasksToolChoiceAgents1$inboundSchema,
]);
/** @internal */
exports.ListAgentTasksFallbackModelsToolChoice$outboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksToolChoiceAgents2$outboundSchema),
    exports.ListAgentTasksToolChoiceAgents1$outboundSchema,
]);
function listAgentTasksFallbackModelsToolChoiceToJSON(listAgentTasksFallbackModelsToolChoice) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsToolChoice$outboundSchema.parse(listAgentTasksFallbackModelsToolChoice));
}
function listAgentTasksFallbackModelsToolChoiceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsToolChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsToolChoice' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModelsModalities$inboundSchema = z.nativeEnum(exports.ListAgentTasksFallbackModelsModalities);
/** @internal */
exports.ListAgentTasksFallbackModelsModalities$outboundSchema = exports.ListAgentTasksFallbackModelsModalities$inboundSchema;
/** @internal */
exports.ListAgentTasksFallbackModelsWebSearchOptions$inboundSchema = z.object({
    enabled: z.boolean().optional(),
});
/** @internal */
exports.ListAgentTasksFallbackModelsWebSearchOptions$outboundSchema = z.object({
    enabled: z.boolean().optional(),
});
function listAgentTasksFallbackModelsWebSearchOptionsToJSON(listAgentTasksFallbackModelsWebSearchOptions) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsWebSearchOptions$outboundSchema.parse(listAgentTasksFallbackModelsWebSearchOptions));
}
function listAgentTasksFallbackModelsWebSearchOptionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsWebSearchOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsWebSearchOptions' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModelsParameters$inboundSchema = z.object({
    audio: z.nullable(z.lazy(() => exports.ListAgentTasksFallbackModelsAudio$inboundSchema)).optional(),
    frequency_penalty: z.nullable(z.number()).optional(),
    max_tokens: z.nullable(z.number().int()).optional(),
    max_completion_tokens: z.nullable(z.number().int()).optional(),
    logprobs: z.nullable(z.boolean()).optional(),
    top_logprobs: z.nullable(z.number().int()).optional(),
    n: z.nullable(z.number().int()).optional(),
    presence_penalty: z.nullable(z.number()).optional(),
    response_format: z.union([
        z.lazy(() => exports.ListAgentTasksResponseFormatAgents3$inboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormatAgents1$inboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormatAgents2$inboundSchema),
    ]).optional(),
    reasoning_effort: z.string().optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    stream_options: z.nullable(z.lazy(() => exports.ListAgentTasksFallbackModelsStreamOptions$inboundSchema)).optional(),
    thinking: z.lazy(() => exports.ListAgentTasksFallbackModelsThinking$inboundSchema)
        .optional(),
    temperature: z.nullable(z.number()).optional(),
    top_p: z.nullable(z.number()).optional(),
    top_k: z.nullable(z.number()).optional(),
    tool_choice: z.union([
        z.lazy(() => exports.ListAgentTasksToolChoiceAgents2$inboundSchema),
        exports.ListAgentTasksToolChoiceAgents1$inboundSchema,
    ]).optional(),
    parallel_tool_calls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.ListAgentTasksFallbackModelsModalities$inboundSchema)).optional(),
    web_search_options: z.lazy(() => exports.ListAgentTasksFallbackModelsWebSearchOptions$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "frequency_penalty": "frequencyPenalty",
        "max_tokens": "maxTokens",
        "max_completion_tokens": "maxCompletionTokens",
        "top_logprobs": "topLogprobs",
        "presence_penalty": "presencePenalty",
        "response_format": "responseFormat",
        "reasoning_effort": "reasoningEffort",
        "stream_options": "streamOptions",
        "top_p": "topP",
        "top_k": "topK",
        "tool_choice": "toolChoice",
        "parallel_tool_calls": "parallelToolCalls",
        "web_search_options": "webSearchOptions",
    });
});
/** @internal */
exports.ListAgentTasksFallbackModelsParameters$outboundSchema = z.object({
    audio: z.nullable(z.lazy(() => exports.ListAgentTasksFallbackModelsAudio$outboundSchema)).optional(),
    frequencyPenalty: z.nullable(z.number()).optional(),
    maxTokens: z.nullable(z.number().int()).optional(),
    maxCompletionTokens: z.nullable(z.number().int()).optional(),
    logprobs: z.nullable(z.boolean()).optional(),
    topLogprobs: z.nullable(z.number().int()).optional(),
    n: z.nullable(z.number().int()).optional(),
    presencePenalty: z.nullable(z.number()).optional(),
    responseFormat: z.union([
        z.lazy(() => exports.ListAgentTasksResponseFormatAgents3$outboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormatAgents1$outboundSchema),
        z.lazy(() => exports.ListAgentTasksResponseFormatAgents2$outboundSchema),
    ]).optional(),
    reasoningEffort: z.string().optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    streamOptions: z.nullable(z.lazy(() => exports.ListAgentTasksFallbackModelsStreamOptions$outboundSchema)).optional(),
    thinking: z.lazy(() => exports.ListAgentTasksFallbackModelsThinking$outboundSchema)
        .optional(),
    temperature: z.nullable(z.number()).optional(),
    topP: z.nullable(z.number()).optional(),
    topK: z.nullable(z.number()).optional(),
    toolChoice: z.union([
        z.lazy(() => exports.ListAgentTasksToolChoiceAgents2$outboundSchema),
        exports.ListAgentTasksToolChoiceAgents1$outboundSchema,
    ]).optional(),
    parallelToolCalls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.ListAgentTasksFallbackModelsModalities$outboundSchema)).optional(),
    webSearchOptions: z.lazy(() => exports.ListAgentTasksFallbackModelsWebSearchOptions$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        frequencyPenalty: "frequency_penalty",
        maxTokens: "max_tokens",
        maxCompletionTokens: "max_completion_tokens",
        topLogprobs: "top_logprobs",
        presencePenalty: "presence_penalty",
        responseFormat: "response_format",
        reasoningEffort: "reasoning_effort",
        streamOptions: "stream_options",
        topP: "top_p",
        topK: "top_k",
        toolChoice: "tool_choice",
        parallelToolCalls: "parallel_tool_calls",
        webSearchOptions: "web_search_options",
    });
});
function listAgentTasksFallbackModelsParametersToJSON(listAgentTasksFallbackModelsParameters) {
    return JSON.stringify(exports.ListAgentTasksFallbackModelsParameters$outboundSchema.parse(listAgentTasksFallbackModelsParameters));
}
function listAgentTasksFallbackModelsParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModelsParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModelsParameters' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModels2$inboundSchema = z.object({
    id: z.string(),
    integration_id: z.nullable(z.string()).optional(),
    parameters: z.lazy(() => exports.ListAgentTasksFallbackModelsParameters$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "integration_id": "integrationId",
    });
});
/** @internal */
exports.ListAgentTasksFallbackModels2$outboundSchema = z.object({
    id: z.string(),
    integrationId: z.nullable(z.string()).optional(),
    parameters: z.lazy(() => exports.ListAgentTasksFallbackModelsParameters$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        integrationId: "integration_id",
    });
});
function listAgentTasksFallbackModels2ToJSON(listAgentTasksFallbackModels2) {
    return JSON.stringify(exports.ListAgentTasksFallbackModels2$outboundSchema.parse(listAgentTasksFallbackModels2));
}
function listAgentTasksFallbackModels2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModels2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModels2' from JSON`);
}
/** @internal */
exports.ListAgentTasksFallbackModels$inboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksFallbackModels2$inboundSchema),
    z.string(),
]);
/** @internal */
exports.ListAgentTasksFallbackModels$outboundSchema = z.union([
    z.lazy(() => exports.ListAgentTasksFallbackModels2$outboundSchema),
    z.string(),
]);
function listAgentTasksFallbackModelsToJSON(listAgentTasksFallbackModels) {
    return JSON.stringify(exports.ListAgentTasksFallbackModels$outboundSchema.parse(listAgentTasksFallbackModels));
}
function listAgentTasksFallbackModelsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksFallbackModels$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksFallbackModels' from JSON`);
}
/** @internal */
exports.ListAgentTasksModel$inboundSchema = z.object({
    id: z.string(),
    integration_id: z.nullable(z.string()).optional(),
    parameters: z.lazy(() => exports.ListAgentTasksParameters$inboundSchema).optional(),
    fallback_models: z.nullable(z.array(z.union([
        z.lazy(() => exports.ListAgentTasksFallbackModels2$inboundSchema),
        z.string(),
    ]))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "integration_id": "integrationId",
        "fallback_models": "fallbackModels",
    });
});
/** @internal */
exports.ListAgentTasksModel$outboundSchema = z.object({
    id: z.string(),
    integrationId: z.nullable(z.string()).optional(),
    parameters: z.lazy(() => exports.ListAgentTasksParameters$outboundSchema).optional(),
    fallbackModels: z.nullable(z.array(z.union([
        z.lazy(() => exports.ListAgentTasksFallbackModels2$outboundSchema),
        z.string(),
    ]))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        integrationId: "integration_id",
        fallbackModels: "fallback_models",
    });
});
function listAgentTasksModelToJSON(listAgentTasksModel) {
    return JSON.stringify(exports.ListAgentTasksModel$outboundSchema.parse(listAgentTasksModel));
}
function listAgentTasksModelFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksModel' from JSON`);
}
/** @internal */
exports.ListAgentTasksToolApprovalRequired$inboundSchema = z.nativeEnum(exports.ListAgentTasksToolApprovalRequired);
/** @internal */
exports.ListAgentTasksToolApprovalRequired$outboundSchema = exports.ListAgentTasksToolApprovalRequired$inboundSchema;
/** @internal */
exports.ListAgentTasksConditions$inboundSchema = z.object({
    condition: z.string(),
    operator: z.string(),
    value: z.string(),
});
/** @internal */
exports.ListAgentTasksConditions$outboundSchema = z.object({
    condition: z.string(),
    operator: z.string(),
    value: z.string(),
});
function listAgentTasksConditionsToJSON(listAgentTasksConditions) {
    return JSON.stringify(exports.ListAgentTasksConditions$outboundSchema.parse(listAgentTasksConditions));
}
function listAgentTasksConditionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksConditions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksConditions' from JSON`);
}
/** @internal */
exports.ListAgentTasksTools$inboundSchema = z.object({
    id: z.string(),
    key: z.string().optional(),
    action_type: z.string(),
    display_name: z.string().optional(),
    requires_approval: z.boolean().default(false),
    conditions: z.array(z.lazy(() => exports.ListAgentTasksConditions$inboundSchema))
        .optional(),
    mcpServer: z.string().optional(),
    timeout: z.number().default(120),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "action_type": "actionType",
        "display_name": "displayName",
        "requires_approval": "requiresApproval",
    });
});
/** @internal */
exports.ListAgentTasksTools$outboundSchema = z.object({
    id: z.string(),
    key: z.string().optional(),
    actionType: z.string(),
    displayName: z.string().optional(),
    requiresApproval: z.boolean().default(false),
    conditions: z.array(z.lazy(() => exports.ListAgentTasksConditions$outboundSchema))
        .optional(),
    mcpServer: z.string().optional(),
    timeout: z.number().default(120),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        actionType: "action_type",
        displayName: "display_name",
        requiresApproval: "requires_approval",
    });
});
function listAgentTasksToolsToJSON(listAgentTasksTools) {
    return JSON.stringify(exports.ListAgentTasksTools$outboundSchema.parse(listAgentTasksTools));
}
function listAgentTasksToolsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksTools' from JSON`);
}
/** @internal */
exports.ListAgentTasksSettings$inboundSchema = z.object({
    max_iterations: z.number().int().default(15),
    max_execution_time: z.number().int().default(300),
    tool_approval_required: exports.ListAgentTasksToolApprovalRequired$inboundSchema
        .default("respect_tool"),
    tools: z.array(z.lazy(() => exports.ListAgentTasksTools$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "max_iterations": "maxIterations",
        "max_execution_time": "maxExecutionTime",
        "tool_approval_required": "toolApprovalRequired",
    });
});
/** @internal */
exports.ListAgentTasksSettings$outboundSchema = z.object({
    maxIterations: z.number().int().default(15),
    maxExecutionTime: z.number().int().default(300),
    toolApprovalRequired: exports.ListAgentTasksToolApprovalRequired$outboundSchema
        .default("respect_tool"),
    tools: z.array(z.lazy(() => exports.ListAgentTasksTools$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        maxIterations: "max_iterations",
        maxExecutionTime: "max_execution_time",
        toolApprovalRequired: "tool_approval_required",
    });
});
function listAgentTasksSettingsToJSON(listAgentTasksSettings) {
    return JSON.stringify(exports.ListAgentTasksSettings$outboundSchema.parse(listAgentTasksSettings));
}
function listAgentTasksSettingsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksSettings' from JSON`);
}
/** @internal */
exports.AgentManifestSnapshot$inboundSchema = z.object({
    _id: z.string(),
    key: z.string(),
    role: z.string(),
    description: z.string(),
    instructions: z.string(),
    system_prompt: z.string().optional(),
    model: z.lazy(() => exports.ListAgentTasksModel$inboundSchema),
    settings: z.lazy(() => exports.ListAgentTasksSettings$inboundSchema).optional(),
    project_id: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "system_prompt": "systemPrompt",
        "project_id": "projectId",
    });
});
/** @internal */
exports.AgentManifestSnapshot$outboundSchema = z.object({
    id: z.string(),
    key: z.string(),
    role: z.string(),
    description: z.string(),
    instructions: z.string(),
    systemPrompt: z.string().optional(),
    model: z.lazy(() => exports.ListAgentTasksModel$outboundSchema),
    settings: z.lazy(() => exports.ListAgentTasksSettings$outboundSchema).optional(),
    projectId: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        systemPrompt: "system_prompt",
        projectId: "project_id",
    });
});
function agentManifestSnapshotToJSON(agentManifestSnapshot) {
    return JSON.stringify(exports.AgentManifestSnapshot$outboundSchema.parse(agentManifestSnapshot));
}
function agentManifestSnapshotFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AgentManifestSnapshot$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentManifestSnapshot' from JSON`);
}
/** @internal */
exports.ListAgentTasksMemory$inboundSchema = z.object({
    entity_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "entity_id": "entityId",
    });
});
/** @internal */
exports.ListAgentTasksMemory$outboundSchema = z.object({
    entityId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        entityId: "entity_id",
    });
});
function listAgentTasksMemoryToJSON(listAgentTasksMemory) {
    return JSON.stringify(exports.ListAgentTasksMemory$outboundSchema.parse(listAgentTasksMemory));
}
function listAgentTasksMemoryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksMemory$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksMemory' from JSON`);
}
/** @internal */
exports.ListAgentTasksState$inboundSchema = z.object({
    waiting_for_approval: z.boolean().default(false),
    inactive: z.boolean().default(true),
    error: z.string().optional(),
    iteration: z.number().int().default(1),
    accumulated_execution_time: z.number().default(0),
    variables: z.record(z.any()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "waiting_for_approval": "waitingForApproval",
        "accumulated_execution_time": "accumulatedExecutionTime",
    });
});
/** @internal */
exports.ListAgentTasksState$outboundSchema = z.object({
    waitingForApproval: z.boolean().default(false),
    inactive: z.boolean().default(true),
    error: z.string().optional(),
    iteration: z.number().int().default(1),
    accumulatedExecutionTime: z.number().default(0),
    variables: z.record(z.any()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        waitingForApproval: "waiting_for_approval",
        accumulatedExecutionTime: "accumulated_execution_time",
    });
});
function listAgentTasksStateToJSON(listAgentTasksState) {
    return JSON.stringify(exports.ListAgentTasksState$outboundSchema.parse(listAgentTasksState));
}
function listAgentTasksStateFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksState' from JSON`);
}
/** @internal */
exports.ListAgentTasksMetrics$inboundSchema = z.object({
    input_cost: z.number().default(0),
    output_cost: z.number().default(0),
    total_cost: z.number().default(0),
    prompt_tokens: z.number().int().default(0),
    completion_tokens: z.number().int().default(0),
    total_tokens: z.number().int().default(0),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "input_cost": "inputCost",
        "output_cost": "outputCost",
        "total_cost": "totalCost",
        "prompt_tokens": "promptTokens",
        "completion_tokens": "completionTokens",
        "total_tokens": "totalTokens",
    });
});
/** @internal */
exports.ListAgentTasksMetrics$outboundSchema = z.object({
    inputCost: z.number().default(0),
    outputCost: z.number().default(0),
    totalCost: z.number().default(0),
    promptTokens: z.number().int().default(0),
    completionTokens: z.number().int().default(0),
    totalTokens: z.number().int().default(0),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        inputCost: "input_cost",
        outputCost: "output_cost",
        totalCost: "total_cost",
        promptTokens: "prompt_tokens",
        completionTokens: "completion_tokens",
        totalTokens: "total_tokens",
    });
});
function listAgentTasksMetricsToJSON(listAgentTasksMetrics) {
    return JSON.stringify(exports.ListAgentTasksMetrics$outboundSchema.parse(listAgentTasksMetrics));
}
function listAgentTasksMetricsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksMetrics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksMetrics' from JSON`);
}
/** @internal */
exports.Tasks$inboundSchema = z
    .object({
    _id: z.string(),
    agent_manifest_snapshot: z.lazy(() => exports.AgentManifestSnapshot$inboundSchema),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    created: z.string().optional(),
    updated: z.string().optional(),
    name: z.string().optional(),
    workspace_id: z.string(),
    memory: z.lazy(() => exports.ListAgentTasksMemory$inboundSchema).optional(),
    metadata: z.record(z.any()).optional(),
    state: z.lazy(() => exports.ListAgentTasksState$inboundSchema),
    metrics: z.lazy(() => exports.ListAgentTasksMetrics$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "agent_manifest_snapshot": "agentManifestSnapshot",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "workspace_id": "workspaceId",
    });
});
/** @internal */
exports.Tasks$outboundSchema = z.object({
    id: z.string(),
    agentManifestSnapshot: z.lazy(() => exports.AgentManifestSnapshot$outboundSchema),
    createdById: z.string().optional(),
    updatedById: z.string().optional(),
    created: z.string().optional(),
    updated: z.string().optional(),
    name: z.string().optional(),
    workspaceId: z.string(),
    memory: z.lazy(() => exports.ListAgentTasksMemory$outboundSchema).optional(),
    metadata: z.record(z.any()).optional(),
    state: z.lazy(() => exports.ListAgentTasksState$outboundSchema),
    metrics: z.lazy(() => exports.ListAgentTasksMetrics$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        agentManifestSnapshot: "agent_manifest_snapshot",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        workspaceId: "workspace_id",
    });
});
function tasksToJSON(tasks) {
    return JSON.stringify(exports.Tasks$outboundSchema.parse(tasks));
}
function tasksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Tasks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Tasks' from JSON`);
}
/** @internal */
exports.ListAgentTasksResponseBody$inboundSchema = z.object({
    tasks: z.array(z.lazy(() => exports.Tasks$inboundSchema)),
    overall_total: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "overall_total": "overallTotal",
    });
});
/** @internal */
exports.ListAgentTasksResponseBody$outboundSchema = z.object({
    tasks: z.array(z.lazy(() => exports.Tasks$outboundSchema)),
    overallTotal: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        overallTotal: "overall_total",
    });
});
function listAgentTasksResponseBodyToJSON(listAgentTasksResponseBody) {
    return JSON.stringify(exports.ListAgentTasksResponseBody$outboundSchema.parse(listAgentTasksResponseBody));
}
function listAgentTasksResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListAgentTasksResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAgentTasksResponseBody' from JSON`);
}
//# sourceMappingURL=listagenttasks.js.map