export type GetApiHubsHubHashIdProjectsProjectIdDownloadMetadataTemplateArgs = {HubHashId: string, ProjectId: number}; export type GetApiHubsHubHashIdProjectsProjectIdDownloadMetadataTemplateOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Download metadata template * * GET /hubs/{HubHashId}/projects/{ProjectId}/download_metadata_template */ export const getApiHubsHubHashIdProjectsProjectIdDownloadMetadataTemplate = async (args: GetApiHubsHubHashIdProjectsProjectIdDownloadMetadataTemplateArgs, options?: GetApiHubsHubHashIdProjectsProjectIdDownloadMetadataTemplateOptions) => { 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))}/download_metadata_template${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 };