/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { patchAliasesIdProtectionBypass } from "../../funcs/patchAliasesIdProtectionBypass.js";
import { PatchAliasesIdProtectionBypassRequest$inboundSchema } from "../../models/patchaliasesidprotectionbypassop.js";
import { formatResult } from "../tools.js";
const args = {
    request: PatchAliasesIdProtectionBypassRequest$inboundSchema,
};
export const tool$patchAliasesIdProtectionBypass = {
    name: "patch-aliases-id-protection-bypass",
    description: `Update the protection bypass for the alias (used for user access & comment access for deployments). Used as shareable links and user scoped access for Vercel Authentication and also to allow external (logged in) people to comment on previews for Preview Comments (next-live-mode).`,
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await patchAliasesIdProtectionBypass(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=patchAliasesIdProtectionBypass.js.map