export type GetApiHubsHubHashIdProjectsProjectIdSharesReportArgs = {Title?: string | undefined, StartDate?: string | undefined, EndDate?: string | undefined, HubHashId: string, ProjectId: number}; export type GetApiHubsHubHashIdProjectsProjectIdSharesReportOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Download register report * * GET /hubs/{HubHashId}/projects/{ProjectId}/shares/report */ export const getApiHubsHubHashIdProjectsProjectIdSharesReport = async (args: GetApiHubsHubHashIdProjectsProjectIdSharesReportArgs, options?: GetApiHubsHubHashIdProjectsProjectIdSharesReportOptions) => { const {baseUrl = "https://docs.bimtrackapp.co", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Title != null) query.append("Title", String(args.Title)) if (args.StartDate != null) query.append("StartDate", String(args.StartDate)) if (args.EndDate != null) query.append("EndDate", String(args.EndDate)) if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/hubs/${encodeURIComponent(String(args.HubHashId))}/projects/${encodeURIComponent(String(args.ProjectId))}/shares/report${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };