export type DeleteApiV01AppsOwnerNameAppNameUsersUserEmailArgs = {owner_name: string, app_name: string, user_email: string}; export type DeleteApiV01AppsOwnerNameAppNameUsersUserEmailOptions = {baseUrl?: string | undefined, APIToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Removes the user from the app * * DELETE /v0.1/apps/{owner_name}/{app_name}/users/{user_email} */ export const deleteApiV01AppsOwnerNameAppNameUsersUserEmail = async (args: DeleteApiV01AppsOwnerNameAppNameUsersUserEmailArgs, options?: DeleteApiV01AppsOwnerNameAppNameUsersUserEmailOptions) => { const {baseUrl = "https://api.appcenter.ms", fetch: fetchFn = fetch, APIToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIToken !== undefined) headers.set("X-API-Token", APIToken) const url = `${baseUrl.replace(/\/+$/, '')}/v0.1/apps/${encodeURIComponent(String(args.owner_name))}/${encodeURIComponent(String(args.app_name))}/users/${encodeURIComponent(String(args.user_email))}${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 };