export type DeleteApiManagementRemoveclientaccessDisplayIdArgs = {displayId: string}; export type DeleteApiManagementRemoveclientaccessDisplayIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Request to delete Client Access * * DELETE /management/removeclientaccess/{displayId} */ export const deleteApiManagementRemoveclientaccessDisplayId = async (args: DeleteApiManagementRemoveclientaccessDisplayIdArgs, options?: DeleteApiManagementRemoveclientaccessDisplayIdOptions) => { const {baseUrl = "https://api.paychex.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/management/removeclientaccess/${encodeURIComponent(String(args.displayId))}${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 res.blob() };