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§

Source§

readonly 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;
}

Default: {}

Source§

readonly by?: "id" | "slug"

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

Source§

readonly content?: string

The content of the post to create

Source§

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

The format of the post Default: "html"

Source§

readonly identifier?: string

The ID or slug of the post to get

Source§

readonly limit?: number

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

Source§

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

Default: "get"

Source§

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: {}

Source§

readonly postId?: string

The ID of the post to delete

Source§

readonly resource?: "post"

Default: "post"

Source§

readonly returnAll?: boolean

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

Source§

readonly source?: "adminApi" | "contentApi"

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

Source§

readonly title?: string

Post's title

Source§

readonly 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;
}

Default: {}