export type DeleteApiAgentmailV0InboxesInboxIdArgs = {inbox_id: string}; export type DeleteApiAgentmailV0InboxesInboxIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Permanently delete an inbox and all its contents. Important: pass method: "DELETE" in your run request to distinguish from Get Inbox. * * DELETE /agentmail/v0/inboxes/{inbox_id} */ export const deleteApiAgentmailV0InboxesInboxId = async (args: DeleteApiAgentmailV0InboxesInboxIdArgs, options?: DeleteApiAgentmailV0InboxesInboxIdOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/agentmail/v0/inboxes/${encodeURIComponent(String(args.inbox_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };