/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 5b10585d5fca */ import { triggersListTrigger } from "../../funcs/triggersListTrigger.js"; import { EventType$zodSchema } from "../../models/eventtype.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { event_type: EventType$zodSchema.optional().describe( `The type of event that will trigger the notification response.`, ), }; export const tool$triggersListTrigger: ToolDefinition = { name: "list-triggers", description: `Lists all webhook notification triggers configured for your product environment Retrieves a list of all event triggers and notifications within your product environment. `, scopes: ["admin"], annotations: { "title": "List Triggers", "destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true, }, args, tool: async (client, args, ctx) => { const [result] = await triggersListTrigger( client, args.event_type, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };