import type { RouteHandler, RouteGenericInterface } from "fastify"; import type { MicropubPostConfig, PostRequestBody } from "../schemas/index.js"; interface PostRouteGeneric extends RouteGenericInterface { Body: PostRequestBody; } /** * When a user creates an entry (e.g. a note) that contains one or more files * (e.g. one photo), different Micropub clients might behave differently. * Some Micropub clients might upload the files to the Media endpoint and the * other microformats2 fields to the Micropub endpoint. * Some other Micropub clients might make a single, multi-part request to just * the Micropub endpoint. * * From the [Quill documentation](https://quill.p3k.io/docs/note). * If your Micropub server supports a Media Endpoint, then at the time you * select a photo, Quill uploads the file to your Media Endpoint and shows a * preview in the interface. The image URL will be sent as a string in the * request. * * If your Micropub server does not support a Media Endpoint, then when you * add an image, it is not uploaded until you click "post", and then is sent * to your Micropub endpoint as a file. * * A request containing files and fields coming from an API client like Postman * or Bruno will be a single, multi-part request to the Micropub endpoint. * * From the [Micropub spec](https://micropub.spec.indieweb.org/#posting-files). * When a Micropub request includes a file, the entire request is sent in * `multipart/form-data encoding`, and the file is named according to the * property it corresponds with in the vocabulary, either audio, video or photo. * * @see https://indieweb.org/Micropub#Handling_a_micropub_request */ export declare const defMicropubPost: (config: MicropubPostConfig) => RouteHandler; export {}; //# sourceMappingURL=micropub-post.d.ts.map