Function isMpUrlencodedRequestBody

  • Validates whether input is a request body (parsed) from an application/x-www-form-urlencoded Micropub request.

    Parameters

    • input: unknown
    • Optionalcontent_type: string

    Returns input is {
        access_token?: string;
        action?: "create" | "update" | "delete" | "undelete";
        audio?: string | string[];
        author?:
            | string
            | {
                "additional-name"?: string;
                adr?: | string
                | {
                    altitude?: number;
                    "country-name"?: string;
                    "extended-address"?: string;
                    geo?: | string
                    | { altitude?: number; latitude?: number; longitude?: number };
                    label?: string;
                    latitude?: number;
                    locality?: string;
                    longitude?: number;
                    "post-office-box"?: string;
                    "postal-code"?: string;
                    region?: string;
                    "street-address"?: string;
                };
                altitude?: number;
                anniversary?: string;
                bday?: string;
                category?: string
                | string[];
                content?: string;
                "country-name"?: string;
                email?: string;
                "extended-address"?: string;
                "family-name"?: string;
                "gender-identity"?: string;
                geo?: { altitude?: number; latitude?: number; longitude?: number };
                "given-name"?: string;
                "honorific-prefix"?: string;
                "honorific-suffix"?: string;
                impp?: string;
                "job-title"?: string;
                key?: string;
                label?: string;
                latitude?: number;
                locality?: string;
                logo?: string;
                longitude?: number;
                name?: string;
                nickname?: string;
                note?: string;
                org?: string;
                photo?: string;
                "post-office-box"?: string;
                "postal-code"?: string;
                region?: string;
                role?: string;
                sex?: string;
                "sort-string"?: string;
                "street-address"?: string;
                tel?: string;
                type: "card";
                uid?: string;
                url?: string;
            };
        "bookmark-of"?: string;
        category?: string
        | string[]
        | (string | string[])[];
        checkin?: string;
        content?: string | { html: string; text?: string };
        date?: string;
        end?: string;
        h?:
            | "card"
            | "cite"
            | "entry"
            | "event"
            | "acquisition"
            | "article"
            | "audio"
            | "bookmark"
            | "bucketlist"
            | "checkin"
            | "chicken"
            | "collection"
            | "comics"
            | "donation"
            | "edit"
            | "exercise"
            | "food"
            | "issue"
            | "jam"
            | "like"
            | "note"
            | "performance"
            | "photo"
            | "presentation"
            | "quotation"
            | "read"
            | "recipe"
            | "reply"
            | "repost"
            | "rsvp"
            | "scrobble"
            | "session"
            | "sleep"
            | "snark"
            | "study"
            | "task"
            | "venue"
            | "video"
            | "want"
            | "wish";
        "in-reply-to"?: string;
        "like-of"?: string;
        location?: | string
        | {
            altitude?: number;
            "country-name"?: string;
            "extended-address"?: string;
            geo?: | string
            | { altitude?: number; latitude?: number; longitude?: number };
            label?: string;
            latitude?: number;
            locality?: string;
            longitude?: number;
            "post-office-box"?: string;
            "postal-code"?: string;
            region?: string;
            "street-address"?: string;
        };
        "mp-channel"?: string;
        "mp-destination"?: string;
        "mp-limit"?: number;
        "mp-photo-alt"?: string
        | string[];
        "mp-post-status"?: string;
        "mp-slug"?: string;
        "mp-syndicate-to"?: string | string[];
        name?: string;
        photo?: any;
        "post-status"?: string;
        published?: string;
        "read-of"?:
            | string
            | {
                accessed?: string;
                author?: string;
                content?: string;
                name?: string;
                publication?: string;
                published?: string;
                type: "cite";
                uid?: string;
                url?: string;
            };
        "read-status"?: "to-read"
        | "reading"
        | "finished";
        "repost-of"?: string;
        rsvp?: "yes" | "no" | "maybe" | "interested";
        start?: string;
        summary?: string;
        syndication?: string | string[];
        updated?: string;
        url?: string | string[];
        video?: string | string[];
        visibility?: "public" | "private" | "unlisted";
    }