export type DeleteApiEnterprisesEnterpriseIdReputationArgs = {enterprise_id: string}; export type DeleteApiEnterprisesEnterpriseIdReputationOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Disable phone-number reputation for an enterprise * * DELETE /enterprises/{enterprise_id}/reputation */ export const deleteApiEnterprisesEnterpriseIdReputation = async (args: DeleteApiEnterprisesEnterpriseIdReputationArgs, options?: DeleteApiEnterprisesEnterpriseIdReputationOptions) => { const {baseUrl = "https://api.telnyx.com/v2", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/enterprises/${encodeURIComponent(String(args.enterprise_id))}/reputation${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 };