export type BaseMemberDelete = Array<{user_id: string}>; export type DeleteApiApiV3MetaBasesBaseIdMembersArgs = {baseId: string, body: BaseMemberDelete}; export type DeleteApiApiV3MetaBasesBaseIdMembersOptions = {baseUrl?: string | undefined, xcToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete base members * * DELETE /api/v3/meta/bases/{baseId}/members * * Also accepts auth: bearerAuth */ export const deleteApiApiV3MetaBasesBaseIdMembers = async (args: DeleteApiApiV3MetaBasesBaseIdMembersArgs, options?: DeleteApiApiV3MetaBasesBaseIdMembersOptions) => { const {baseUrl = "https://app.nocodb.com", fetch: fetchFn = fetch, xcToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (xcToken !== undefined) headers.set("xc-token", xcToken) const url = `${baseUrl.replace(/\/+$/, '')}/api/v3/meta/bases/${encodeURIComponent(String(args.baseId))}/members${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };