export type DeleteApiHubsHubHashIdProjectsProjectIdUploadUploadSessionIdArgs = {UploadSessionId: number, HubHashId: string, ProjectId: number}; export type DeleteApiHubsHubHashIdProjectsProjectIdUploadUploadSessionIdOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete upload session * * DELETE /hubs/{HubHashId}/projects/{ProjectId}/upload/{UploadSessionId} */ export const deleteApiHubsHubHashIdProjectsProjectIdUploadUploadSessionId = async (args: DeleteApiHubsHubHashIdProjectsProjectIdUploadUploadSessionIdArgs, options?: DeleteApiHubsHubHashIdProjectsProjectIdUploadUploadSessionIdOptions) => { const {baseUrl = "https://docs.bimtrackapp.co", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/hubs/${encodeURIComponent(String(args.HubHashId))}/projects/${encodeURIComponent(String(args.ProjectId))}/upload/${encodeURIComponent(String(args.UploadSessionId))}${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 };