export type DeleteApiPlatformApiV1AccountsAccountIdAccountUsersOptions = {baseUrl?: string | undefined, platformAppBearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an Account User * * DELETE /platform/api/v1/accounts/{account_id}/account_users * * Also accepts auth: platformAppApiKey */ export const deleteApiPlatformApiV1AccountsAccountIdAccountUsers = async (options?: DeleteApiPlatformApiV1AccountsAccountIdAccountUsersOptions) => { const {baseUrl = "https://app.chatwoot.com", fetch: fetchFn = fetch, platformAppBearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (platformAppBearerAuth !== undefined) headers.set('authorization', `Bearer ${platformAppBearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/platform/api/v1/accounts/${encodeURIComponent(String(args.account_id))}/account_users${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 };