export type PublicMembersRelationshipsUpdateRequest = {members: Array, teams?: Array | undefined, locations?: Array | undefined, skills?: Array | undefined}; export type PatchApiV1PublicMembersRelationshipsRemoveArgs = {body: PublicMembersRelationshipsUpdateRequest}; export type PatchApiV1PublicMembersRelationshipsRemoveOptions = {baseUrl?: string | undefined, basic?: {username: string, password: string} | undefined, fetch?: typeof fetch | undefined}; /** * Remove structural relationships to members * * PATCH /v1/public/members/relationships/remove */ export const patchApiV1PublicMembersRelationshipsRemove = async (args: PatchApiV1PublicMembersRelationshipsRemoveArgs, options?: PatchApiV1PublicMembersRelationshipsRemoveOptions) => { const {baseUrl = "https://api.evolia.com", fetch: fetchFn = fetch, basic} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (basic !== undefined) headers.set('authorization', `Basic ${btoa(`${basic.username}:${basic.password}`)}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/public/members/relationships/remove${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 };