export type OrgEventsAppDomainApiProductEventSessionDtosSessionRemoveFileRequest = {id?: string | undefined}; export type DeleteApiV1EventsEventIdSessionsSessionIdFilesArgs = {eventId: string, sessionId: string, body: Array}; export type DeleteApiV1EventsEventIdSessionsSessionIdFilesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Remove files from a session * * DELETE /v1/events/{eventId}/sessions/{sessionId}/files */ export const deleteApiV1EventsEventIdSessionsSessionIdFiles = async (args: DeleteApiV1EventsEventIdSessionsSessionIdFilesArgs, options: DeleteApiV1EventsEventIdSessionsSessionIdFilesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v1/events/${encodeURIComponent(String(args.eventId))}/sessions/${encodeURIComponent(String(args.sessionId))}/files${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 };