/** * Create a new post * * @param data The post data to create * @returns The created post record */ export declare function store(data: NewPost & { body?: string, category?: string }): Promise; /** * Attach related records to a post through a pivot table * * @param postId The ID of the post to attach records to * @param tableName The name of the pivot table (e.g., 'categorizable_models', 'taggable') * @param ids Array of IDs to attach * @returns Promise */ export declare function attach(postId: number, tableName: 'categorizable_models' | 'taggable_models', ids: number[]): Promise; /** * Detach related records from a post through a pivot table * * @param postId The ID of the post to detach records from * @param tableName The name of the pivot table (e.g., 'categorizable_models', 'taggable') * @param ids Optional array of IDs to detach. If not provided, all related records will be detached * @returns Promise */ export declare function detach(postId: number, tableName: 'categorizable_models' | 'taggable_models', ids?: number[]): Promise; /** * Synchronize related records for a post through a pivot table * This will detach relationships not in the new set and attach only new relationships * * @param postId The ID of the post to sync records for * @param tableName The name of the pivot table (e.g., 'categorizable_models', 'taggable') * @param ids Array of IDs to sync * @returns Promise */ export declare function sync(postId: number, tableName: 'categorizable_models' | 'taggable_models', ids: number[]): Promise; // Must match the CHECK constraint on posts.status. export declare const POST_STATUS_DRAFT: 'draft'; export declare const POST_STATUS_PUBLISHED: 'published'; export declare const POST_STATUS_ARCHIVED: 'archived'; declare type PostJsonResponse = ModelRow; declare type NewPost = NewModelData;