export type DeleteApiOrganizationsOrganizationIdMembersCustomerIdArgs = {organizationId: string, customerId: string}; export type DeleteApiOrganizationsOrganizationIdMembersCustomerIdOptions = {baseUrl?: string | undefined, OpenIdConnect?: string | undefined, fetch?: typeof fetch | undefined}; /** * Removes the given customer's membership from the organization. * * DELETE /organizations/{organizationId}/members/{customerId} * * Also accepts auth: OpenIdConnect */ export const deleteApiOrganizationsOrganizationIdMembersCustomerId = async (args: DeleteApiOrganizationsOrganizationIdMembersCustomerIdArgs, options?: DeleteApiOrganizationsOrganizationIdMembersCustomerIdOptions) => { const {baseUrl = "https://api.rapidata.ai", fetch: fetchFn = fetch, OpenIdConnect} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (OpenIdConnect !== undefined) headers.set('authorization', `Bearer ${OpenIdConnect}`) const url = `${baseUrl.replace(/\/+$/, '')}/organizations/${encodeURIComponent(String(args.organizationId))}/members/${encodeURIComponent(String(args.customerId))}${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 };