WIP: form attachments — unit tests, test e-mail with attachment, lint
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
02b1e96d3d
commit
701bb420c1
@@ -82,6 +82,16 @@ export type SubmitFormArgs = {
|
||||
* - `error` — persistence failed unexpectedly
|
||||
*/
|
||||
export type SubmitFailure =
|
||||
| {
|
||||
/**
|
||||
* The file could not be handed to the mail server (or the form has no
|
||||
* e-mail that may carry it). The file is gone — the visitor must send it
|
||||
* again. `submissionId`: the stored attempt, marked "Not sent".
|
||||
*/
|
||||
reason: 'delivery'
|
||||
submissionId?: number | string
|
||||
success: false
|
||||
}
|
||||
| {
|
||||
/** The offending field's name, when one field is at fault. */
|
||||
field?: string
|
||||
@@ -98,16 +108,6 @@ export type SubmitFailure =
|
||||
/** Accepted types, "PDF, DOCX" (file_type). */
|
||||
types?: string
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* The file could not be handed to the mail server (or the form has no
|
||||
* e-mail that may carry it). The file is gone — the visitor must send it
|
||||
* again. `submissionId`: the stored attempt, marked "Not sent".
|
||||
*/
|
||||
reason: 'delivery'
|
||||
submissionId?: number | string
|
||||
success: false
|
||||
}
|
||||
| {
|
||||
field?: string
|
||||
/** A GDPR consent field existed on the form but wasn't checked. */
|
||||
|
||||
Reference in New Issue
Block a user