export type DeleteApiLienSubmissionsFilingIdAttachmentsAttachmentIdArgs = {filing_id: string, attachment_id: string}; export type DeleteApiLienSubmissionsFilingIdAttachmentsAttachmentIdOptions = {baseUrl?: string | undefined, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Lien Submission Attachment * * DELETE /lien_submissions/{filing_id}/attachments/{attachment_id} */ export const deleteApiLienSubmissionsFilingIdAttachmentsAttachmentId = async (args: DeleteApiLienSubmissionsFilingIdAttachmentsAttachmentIdArgs, options?: DeleteApiLienSubmissionsFilingIdAttachmentsAttachmentIdOptions) => { const {baseUrl = "https://api.baselayer.com", fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("X-API-Key", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/lien_submissions/${encodeURIComponent(String(args.filing_id))}/attachments/${encodeURIComponent(String(args.attachment_id))}${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 };