export type DeleteApiV1WorkspacesWorkspaceUuidMembersUserEmailArgs = {workspace_uuid: string, user_email: string}; export type DeleteApiV1WorkspacesWorkspaceUuidMembersUserEmailOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove Workspace Member * * DELETE /v1/workspaces/{workspace_uuid}/members/{user_email} * * Also accepts auth: AuthBearer */ export const deleteApiV1WorkspacesWorkspaceUuidMembersUserEmail = async (args: DeleteApiV1WorkspacesWorkspaceUuidMembersUserEmailArgs, options?: DeleteApiV1WorkspacesWorkspaceUuidMembersUserEmailOptions) => { const {baseUrl = "https://api.aymara.ai", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKey !== undefined) headers.set("x-api-key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/workspaces/${encodeURIComponent(String(args.workspace_uuid))}/members/${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 };