export type DeleteApiV1alpha2ParentsParentResultsResultUidLogsLogUidOptions = {baseUrl?: string | undefined, BasicAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a log given the UID * * DELETE /v1alpha2/parents/{parent}/results/{result_uid}/logs/{log_uid} */ export const deleteApiV1alpha2ParentsParentResultsResultUidLogsLogUid = async (options?: DeleteApiV1alpha2ParentsParentResultsResultUidLogsLogUidOptions) => { const {baseUrl = "https://localhost:8080/apis/results.tekton.dev", fetch: fetchFn = fetch, BasicAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "text/plain") if (BasicAuth !== undefined) headers.set('authorization', `Bearer ${BasicAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1alpha2/parents/${encodeURIComponent(String(args.parent))}/results/${encodeURIComponent(String(args.result_uid))}/logs/${encodeURIComponent(String(args.log_uid))}${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 res.text() };