export type CreateApiAccountsAccountIdDisableMonitoringArgs = {account_id: string, 'Pinwheel-Version': '2025-07-08' | '2023-11-22' | '2023-07-18' | '2023-04-18' | '2022-09-09' | '2022-06-22' | '2022-03-02'}; export type CreateApiAccountsAccountIdDisableMonitoringOptions = {baseUrl?: string | undefined, apiSecret?: string | undefined, fetch?: typeof fetch | undefined}; /** * Disable monitoring for account * * POST /accounts/{account_id}/disable_monitoring */ export const createApiAccountsAccountIdDisableMonitoring = async (args: CreateApiAccountsAccountIdDisableMonitoringArgs, options?: CreateApiAccountsAccountIdDisableMonitoringOptions) => { const {baseUrl = "https://api.getpinwheel.com/v1", fetch: fetchFn = fetch, apiSecret} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['Pinwheel-Version'] != null) headers.set("Pinwheel-Version", String(args['Pinwheel-Version'])) if (apiSecret !== undefined) headers.set("X-API-SECRET", apiSecret) const url = `${baseUrl.replace(/\/+$/, '')}/accounts/${encodeURIComponent(String(args.account_id))}/disable_monitoring${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };