import { createSection, addSection, removeSection, duplicateSection, toggleSectionVisibility, moveSection, reorderSections, updateSectionContent, updateSectionSettings, updateSectionMeta, type PageSection, type PostHeaderConfig } from '@actuate-media/cms-core/page-sections';
export type { PageSection, PostHeaderConfig } from '@actuate-media/cms-core/page-sections';
export { createSection, addSection, removeSection, duplicateSection, toggleSectionVisibility, moveSection, reorderSections, updateSectionContent, updateSectionSettings, updateSectionMeta, };
export type PostStatus = 'DRAFT' | 'PUBLISHED' | 'SCHEDULED' | 'ARCHIVED';
export declare const TEMPLATES_COLLECTION = "post-templates";
export interface EditorPost {
    id: string | null;
    /** the post-type collection slug (e.g. "blog") */
    postType: string;
    title: string;
    slug: string;
    excerpt: string;
    featuredImage: string;
    body: string;
    category: string;
    /** Editorial tags as plain strings (stored as `[{ tag }]` rows, see {@link parseTags}). */
    tags: string[];
    status: PostStatus;
    publishDate: string | null;
    sections: PageSection[];
    seoTitle: string;
    seoDescription: string;
    publishedAt: string | null;
    updatedAt: string | null;
}
export interface EditorPostTemplate {
    /** template document id (null when the type has no saved template yet) */
    docId: string | null;
    postType: string;
    header: PostHeaderConfig;
    sections: PageSection[];
}
export interface ValidationResult {
    errors: string[];
    warnings: string[];
}
export declare function missingPostFields(config: unknown, postType: string): string[];
/**
 * Validate a post for save/publish. Section rules are delegated to the
 * shared `validateSectionContent` so the editor and the server/MCP enforce
 * identical content rules; post-level rules (title/slug, SEO) live here.
 */
export declare function validatePost(post: EditorPost, forPublish?: boolean): ValidationResult;
/** Validate a template for save (section content only — no post fields). */
export declare function validateTemplate(template: EditorPostTemplate): ValidationResult;
/**
 * Read stored tags into plain strings. The `tagsField` preset stores
 * `[{ tag: 'AI' }]` rows; older/hand-rolled configs may store `['AI']`
 * directly — accept both so no site loses tags in the editor.
 */
export declare function parseTags(raw: unknown): string[];
/**
 * Load a post type's template via the dedicated, audited `/post-templates/:type`
 * endpoint (scoped + logged), rather than the raw collection API. When the type
 * has no saved template yet the endpoint returns the default starting template;
 * if the request fails outright we still hand back that default so the editor
 * is never blank.
 */
export declare function fetchTemplateForEditor(postType: string): Promise<EditorPostTemplate>;
/** Persist a post type's template via `PUT /post-templates/:type`. */
export declare function saveTemplate(template: EditorPostTemplate): Promise<EditorPostTemplate>;
export declare function fetchPostForEditor(postType: string, id: string): Promise<EditorPost>;
export declare function createPost(post: EditorPost): Promise<EditorPost>;
export declare function savePostDraft(post: EditorPost): Promise<EditorPost>;
export declare function publishPost(post: EditorPost): Promise<EditorPost>;
/** A blank post scaffold seeded with the post type's template sections. */
export declare function emptyPostFromTemplate(postType: string): Promise<EditorPost>;
//# sourceMappingURL=post-editor-service.d.ts.map