feat(enterprise-site): add WordPress support and scheduled auto-publish to sites
Frontend CI / Frontend (push) Successful in 4m17s
Backend CI / Backend (push) Failing after 6m42s

Add WordPress as an enterprise-site CMS type alongside pbootcms, and let
schedule tasks auto-publish generated articles to enterprise sites.

- WordPress connection/publisher service and tests; register wordpress
  media platform and relax cms_type CHECK constraint
- New publish_enterprise_site_targets JSONB column on schedule_tasks with
  array type constraint; thread targets through scheduler dispatch,
  prompt/KOL generation, and worker
- Admin UI: enterprise-site targets in generate/schedule/publish flows,
  KOL package form, MediaView, and i18n strings

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 19:44:24 +08:00
parent 41f5623791
commit c7bad83496
30 changed files with 2946 additions and 696 deletions
+9 -1
View File
@@ -1296,7 +1296,7 @@ export interface PublishRecordListResponse {
history_total: number
}
export type EnterpriseSiteCmsType = 'pbootcms' | 'wordpress' | 'dedecms' | 'phpcms'
export type EnterpriseSiteCmsType = 'pbootcms' | 'wordpress'
export type EnterpriseSiteStatus = 'draft' | 'connected' | 'error' | 'disabled'
export interface EnterpriseSiteLatestPublishRecord {
@@ -1399,6 +1399,12 @@ export interface EnterpriseSitePublishResponse {
published_at?: string | null
}
export interface ScheduleEnterpriseSiteTarget {
site_id: number
category_id: string
publish_type?: 'publish' | 'draft' | string
}
export interface PublisherLocalPlatformState {
platform_id: string
connected: boolean
@@ -2149,6 +2155,7 @@ export interface ScheduleTask {
generation_input: Record<string, JsonValue>
auto_publish: boolean
publish_account_ids: string[]
publish_enterprise_site_targets: ScheduleEnterpriseSiteTarget[]
auto_publish_platforms: string[]
cover_asset_url: string | null
cover_image_asset_id: number | null
@@ -2184,6 +2191,7 @@ export interface ScheduleTaskRequest {
generation_input?: Record<string, JsonValue>
auto_publish?: boolean
publish_account_ids?: string[]
publish_enterprise_site_targets?: ScheduleEnterpriseSiteTarget[]
cover_asset_url?: string | null
cover_image_asset_id?: number | null
enable_web_search?: boolean