Form attachments: reference smoke test with a mail sink, Turnstile reset fix, docs

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-13 16:42:39 +01:00
co-authored by Claude Fable 5.2
parent 387debc88c
commit fdb6140c09
13 changed files with 251 additions and 23 deletions
+107
View File
@@ -757,6 +757,38 @@ export interface Form {
blockName?: string | null;
blockType: 'date';
}
| {
/**
* No spaces, e.g. attachment.
*/
name: string;
label?: string | null;
/**
* Shown under the field.
*/
help?: string | null;
width?: number | null;
required?: boolean | null;
/**
* The file is sent by e-mail and is not kept on the site.
*/
allowedTypes: ('doc' | 'docx' | 'jpg' | 'odt' | 'pdf' | 'png' | 'rtf' | 'webp' | 'xls' | 'xlsx')[];
maxSizeMB?: number | null;
maxFiles?: number | null;
showWhen?: {
/**
* Key of the field it depends on.
*/
field?: string | null;
/**
* Separate with commas; leave empty for any value.
*/
values?: string | null;
};
id?: string | null;
blockName?: string | null;
blockType: 'file';
}
| {
name: string;
label?: string | null;
@@ -1298,6 +1330,24 @@ export interface FormSubmission {
id?: string | null;
}[]
| null;
/**
* Sent by e-mail to the form recipients. The files are not kept on the site.
*/
submissionFiles?:
| {
name?: string | null;
type?: string | null;
size?: number | null;
field?: string | null;
id?: string | null;
}[]
| null;
filesDelivery?: ('sent' | 'failed') | null;
/**
* Ask the sender for the file again.
*/
filesDeliveryNote?: string | null;
attemptKey?: string | null;
updatedAt: string;
createdAt: string;
}
@@ -2242,6 +2292,26 @@ export interface FormsSelect<T extends boolean = true> {
id?: T;
blockName?: T;
};
file?:
| T
| {
name?: T;
label?: T;
help?: T;
width?: T;
required?: T;
allowedTypes?: T;
maxSizeMB?: T;
maxFiles?: T;
showWhen?:
| T
| {
field?: T;
values?: T;
};
id?: T;
blockName?: T;
};
radio?:
| T
| {
@@ -2335,6 +2405,18 @@ export interface FormSubmissionsSelect<T extends boolean = true> {
value?: T;
id?: T;
};
submissionFiles?:
| T
| {
name?: T;
type?: T;
size?: T;
field?: T;
id?: T;
};
filesDelivery?: T;
filesDeliveryNote?: T;
attemptKey?: T;
updatedAt?: T;
createdAt?: T;
}
@@ -2850,6 +2932,26 @@ export interface Notification {
turnstile?: string | null;
rateLimited?: string | null;
notFound?: string | null;
/**
* Use {file} for the file name and {max} for the limit in MB.
*/
fileTooLarge?: string | null;
/**
* Use {file} for the file name and {types} for the accepted types.
*/
fileType?: string | null;
/**
* Use {field} for the field label and {max} for the limit.
*/
fileCount?: string | null;
/**
* Shown when the file could not be sent by e-mail.
*/
fileNotSent?: string | null;
/**
* Use {file} for the file name.
*/
fileRemove?: string | null;
next?: string | null;
back?: string | null;
/**
@@ -3194,6 +3296,11 @@ export interface NotificationsSelect<T extends boolean = true> {
turnstile?: T;
rateLimited?: T;
notFound?: T;
fileTooLarge?: T;
fileType?: T;
fileCount?: T;
fileNotSent?: T;
fileRemove?: T;
next?: T;
back?: T;
stepOf?: T;