@fabrika/auth-core 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/contract.ts +20 -0
package/package.json
CHANGED
package/src/contract.ts
CHANGED
|
@@ -340,11 +340,31 @@ export interface FormMountArtifact {
|
|
|
340
340
|
readonly challenge?: FormChallenge
|
|
341
341
|
/** The cron job each accepted submission kicks: one run in the background, coalesced on the job's lease. */
|
|
342
342
|
readonly then?: string
|
|
343
|
+
/**
|
|
344
|
+
* The files a submission carries beside its input, by field: each lands in its collection owned by nobody, and its
|
|
345
|
+
* id in the inbox column of the field's name, until the job that drains the inbox attaches it to its owner. Present
|
|
346
|
+
* only when declared, so every other form keeps its digest; such a form is `multipart/form-data` and challenged.
|
|
347
|
+
*/
|
|
348
|
+
readonly files?: Readonly<Record<string, FormFileArtifact>>
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* The media type of a form that takes files. A browser sends it from any page without a CORS preflight, so the proxy
|
|
353
|
+
* refuses such a form's request from an origin its row does not admit (ADR-0061).
|
|
354
|
+
*/
|
|
355
|
+
export const FORM_MULTIPART_TYPE = 'multipart/form-data'
|
|
356
|
+
|
|
357
|
+
/** One file field of a form: the collection the file lands in, and whether a submission must carry it. */
|
|
358
|
+
export interface FormFileArtifact {
|
|
359
|
+
readonly collection: string
|
|
360
|
+
readonly required: boolean
|
|
343
361
|
}
|
|
344
362
|
|
|
345
363
|
export interface FormRate {
|
|
346
364
|
readonly perClient?: number
|
|
347
365
|
readonly perForm?: number
|
|
366
|
+
/** The bytes a form that takes files may write per hour, all its submissions together. */
|
|
367
|
+
readonly bytesPerHour?: number
|
|
348
368
|
}
|
|
349
369
|
|
|
350
370
|
/** The closed list of challenge providers; each one's verification endpoint and browser origins are fixed. */
|