Interface GhostNodeParameters

Source
interface GhostNodeParameters {
    additionalFields?: {
        authors?: unknown[];
        canonical_url?: string;
        codeinjection_foot?: string;
        codeinjection_head?: string;
        featured?: boolean;
        meta_description?: string;
        meta_title?: string;
        og_description?: string;
        og_image?: string;
        og_title?: string;
        published_at?: string;
        slug?: string;
        status?: "scheduled" | "draft" | "published";
        tags?: unknown[];
        twitter_description?: string;
        twitter_image?: string;
        twitter_title?: string;
    };
    by?: "id"
    | "slug";
    content?: string;
    contentFormat?: "html" | "mobileDoc" | "lexical";
    identifier?: string;
    limit?: number;
    operation?:
        | "create"
        | "get"
        | "getAll"
        | "update"
        | "delete";
    options?: | {
        fields?: string;
        formats?: ("html" | "lexical" | "mobiledoc")[];
    }
    | {
        fields?: string;
        formats?: ("html" | "plaintext")[];
    }
    | {
        fields?: string;
        formats?: ("html" | "lexical" | "plaintext")[];
        include?: ("tags" | "authors")[];
    }
    | {
        fields?: string;
        formats?: ("html" | "lexical" | "mobiledoc")[];
        include?: ("tags" | "authors")[];
    };
    postId?: string;
    resource?: "post";
    returnAll?: boolean;
    source?: "adminApi"
    | "contentApi";
    title?: string;
    updateFields?: {
        authors?: unknown[];
        canonical_url?: string;
        codeinjection_foot?: string;
        codeinjection_head?: string;
        content?: string;
        contentJson?: string;
        featured?: boolean;
        meta_description?: string;
        meta_title?: string;
        og_description?: string;
        og_image?: string;
        og_title?: string;
        published_at?: string;
        slug?: string;
        status?: "scheduled" | "draft" | "published";
        tags?: unknown[];
        title?: string;
        twitter_description?: string;
        twitter_image?: string;
        twitter_title?: string;
    };
}

Properties§

§readonly additionalFields?: { ... }

Default: {}

§readonly by?: "id" | "slug"

Get the post either by slug or ID Default: "id"

§readonly content?: string

The content of the post to create

§readonly contentFormat?: "html" | "mobileDoc" | "lexical"

The format of the post Default: "html"

§readonly identifier?: string

The ID or slug of the post to get

§readonly limit?: number

Max number of results to return Default: 50 Type options: {"minValue":1,"maxValue":100}

§readonly operation?: "create" | "get" | "getAll" | "update" | "delete"

Default: "get"

§readonly options?:
    | {
        fields?: string;
        formats?: ("html" | "lexical" | "mobiledoc")[];
    }
    | {
        fields?: string;
        formats?: ("html" | "plaintext")[];
    }
    | {
        fields?: string;
        formats?: ("html" | "lexical" | "plaintext")[];
        include?: ("tags" | "authors")[];
    }
    | {
        fields?: string;
        formats?: ("html" | "lexical" | "mobiledoc")[];
        include?: ("tags" | "authors")[];
    }

Default: {}

§readonly postId?: string

The ID of the post to delete

§readonly resource?: "post"

Default: "post"

§readonly returnAll?: boolean

Whether to return all results or only up to a given limit

§readonly source?: "adminApi" | "contentApi"

Pick where your data comes from, Content or Admin API Default: "contentApi"

§readonly title?: string

Post's title

§readonly updateFields?: { ... }

Default: {}