export type DeleteApiApiV1CalendarEventsOutlookEventIdAttachmentLinkArgs = {outlookEventId: string}; export type DeleteApiApiV1CalendarEventsOutlookEventIdAttachmentLinkOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * DELETE /api/v1/Calendar/Events/{outlookEventId}/AttachmentLink * Unlink this appointment from shared notes/photos/documents. * * DELETE /api/v1/Calendar/Events/{outlookEventId}/AttachmentLink */ export const deleteApiApiV1CalendarEventsOutlookEventIdAttachmentLink = async (args: DeleteApiApiV1CalendarEventsOutlookEventIdAttachmentLinkArgs, options: DeleteApiApiV1CalendarEventsOutlookEventIdAttachmentLinkOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/Calendar/Events/${encodeURIComponent(String(args.outlookEventId))}/AttachmentLink${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 };