export type DeleteApiOrganizationOrganizationIdMemberUserIdArgs = {organizationId: string, userId: string}; export type DeleteApiOrganizationOrganizationIdMemberUserIdOptions = {baseUrl?: string | undefined, OrganizationAPIKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove Member from Organization * * DELETE /organization/{organizationId}/member/{userId} */ export const deleteApiOrganizationOrganizationIdMemberUserId = async (args: DeleteApiOrganizationOrganizationIdMemberUserIdArgs, options?: DeleteApiOrganizationOrganizationIdMemberUserIdOptions) => { const {baseUrl = "https://api.univid.io/api", fetch: fetchFn = fetch, OrganizationAPIKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (OrganizationAPIKey !== undefined) headers.set("x-api-key", OrganizationAPIKey) const url = `${baseUrl.replace(/\/+$/, '')}/organization/${encodeURIComponent(String(args.organizationId))}/member/${encodeURIComponent(String(args.userId))}${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 };