export type DeleteApiV1AccountWorkspacesWorkspaceIdMembersProfileIdArgs = {workspaceId: string, profileId: string}; export type DeleteApiV1AccountWorkspacesWorkspaceIdMembersProfileIdOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove a member from a workspace * * DELETE /v1/account/workspaces/{workspaceId}/members/{profileId} */ export const deleteApiV1AccountWorkspacesWorkspaceIdMembersProfileId = async (args: DeleteApiV1AccountWorkspacesWorkspaceIdMembersProfileIdArgs, options?: DeleteApiV1AccountWorkspacesWorkspaceIdMembersProfileIdOptions) => { const {baseUrl = "https://api.cadenya.com", 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(/\/+$/, '')}/v1/account/workspaces/${encodeURIComponent(String(args.workspaceId))}/members/${encodeURIComponent(String(args.profileId))}${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 };