export type GetApiApiPdfCovidSignaturesProjectIdCovidDateArgs = {'X-Company'?: string | undefined, covid_date: string, project_id: string}; export type GetApiApiPdfCovidSignaturesProjectIdCovidDateOptions = {baseUrl?: string | undefined, tokenAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /api/pdf/covid-signatures/{project_id}/{covid_date}/ */ export const getApiApiPdfCovidSignaturesProjectIdCovidDate = async (args: GetApiApiPdfCovidSignaturesProjectIdCovidDateArgs, options?: GetApiApiPdfCovidSignaturesProjectIdCovidDateOptions) => { const {baseUrl = "https://api.dash.crewtraka.com", fetch: fetchFn = fetch, tokenAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-Company'] != null) headers.set("X-Company", String(args['X-Company'])) if (tokenAuth !== undefined) headers.set("Authorization", tokenAuth) const url = `${baseUrl.replace(/\/+$/, '')}/api/pdf/covid-signatures/${encodeURIComponent(String(args.project_id))}/${encodeURIComponent(String(args.covid_date))}/${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 };