/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 4e34c78fa055 */ import * as z from "zod"; import { streamingProfilesUpdateStreamingProfile } from "../../funcs/streamingProfilesUpdateStreamingProfile.js"; import { StreamingProfileUpdate$zodSchema } from "../../models/streamingprofileupdate.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { name: z.string().describe("The name of the streaming profile."), streaming_profile_update: StreamingProfileUpdate$zodSchema.describe( `The updated streaming profile configuration.`, ), }; export const tool$streamingProfilesUpdateStreamingProfile: ToolDefinition< typeof args > = { name: "update-streaming-profile", description: `Modifies an existing adaptive streaming profile's configuration`, scopes: ["builder"], annotations: { "title": "Update Streaming Profile", "destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": false, }, args, tool: async (client, args, ctx) => { const [result] = await streamingProfilesUpdateStreamingProfile( client, args.name, args.streaming_profile_update, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };