feat(enterprise-site): add PbootCMS enterprise site publisher
Frontend CI / Frontend (push) Successful in 3m57s
Backend CI / Backend (push) Failing after 6m43s

Introduce a new enterprise-site publishing channel that lets tenants push
articles to self-hosted PbootCMS sites alongside the existing media supply
flow.

Backend (server/internal/tenant):
- enterprise_site_service: CRUD, ping, category sync, and article publish
- enterprise_site_pbootcms: PbootCMS API client integration
- enterprise_site_crypto: encrypt/decrypt stored site credentials
- enterprise_site_handler + routes under /enterprise-sites
- migrations for the enterprise site publisher tables
- config: add SERVER_PUBLIC_BASE_URL (Server.PublicBaseURL) for callbacks
- article/media services adjusted to support the publish flow

Frontend (apps/admin-web):
- PublishArticleModal & ArticlePublishStatus: enterprise-site publish UI
- MediaView: manage enterprise sites and categories
- api + shared-types: enterprise site endpoints and types
- http-client: add PATCH method support

Integrations:
- pbootcms GeoPublisher controller plugin + install guide
- docs/enterprise-site-publisher-v1.md design doc
This commit is contained in:
2026-06-06 13:06:14 +08:00
parent b40434018a
commit 88c37e50b2
20 changed files with 7708 additions and 528 deletions
+106 -1
View File
@@ -1258,8 +1258,10 @@ export interface PublishRecord {
id: number
publish_batch_id: number
article_id: number
platform_account_id: number
platform_account_id?: number | null
desktop_account_id: string | null
target_type?: 'platform_account' | 'enterprise_site' | string
target_connection_id?: number | null
platform_id: string
platform_name: string
platform_nickname: string
@@ -1273,6 +1275,109 @@ export interface PublishRecord {
updated_at: string
}
export type EnterpriseSiteCmsType = 'pbootcms' | 'wordpress' | 'dedecms' | 'phpcms'
export type EnterpriseSiteStatus = 'draft' | 'connected' | 'error' | 'disabled'
export interface EnterpriseSiteLatestPublishRecord {
id: number
article_id: number
article_title?: string | null
status: string
external_article_id?: string | null
external_article_url?: string | null
error_message?: string | null
published_at?: string | null
created_at: string
updated_at: string
}
export interface EnterpriseSiteConnection {
id: number
name: string
site_url: string
cms_type: EnterpriseSiteCmsType | string
auth_type: string
appid: string
default_acode?: string | null
default_mcode?: string | null
default_scode?: string | null
status: EnterpriseSiteStatus | string
plugin_version?: string | null
site_name?: string | null
last_ping_at?: string | null
last_sync_at?: string | null
last_publish_at?: string | null
last_error?: string | null
category_count: number
latest_record?: EnterpriseSiteLatestPublishRecord | null
created_at: string
updated_at: string
}
export interface EnterpriseSiteCategory {
id: number
remote_id: string
parent_remote_id?: string | null
name: string
slug?: string | null
raw?: Record<string, JsonValue>
synced_at: string
}
export interface CreateEnterpriseSiteConnectionRequest {
name?: string
site_url: string
cms_type: EnterpriseSiteCmsType
appid: string
secret: string
default_acode?: string | null
default_mcode?: string | null
default_scode?: string | null
}
export interface UpdateEnterpriseSiteConnectionRequest {
name?: string
site_url?: string
appid?: string
secret?: string
default_acode?: string | null
default_mcode?: string | null
default_scode?: string | null
status?: EnterpriseSiteStatus
}
export interface EnterpriseSiteCapability {
cms_type: string
plugin_version?: string | null
site_url: string
site_name?: string | null
api_auth: boolean
}
export interface PublishEnterpriseSiteArticleRequest {
article_id: number
category_id?: string
publish_type?: 'publish' | 'draft'
author?: string | null
source?: string | null
article_version_id?: number | null
ack_record_id?: number | null
cover_asset_url?: string | null
cover_image_asset_id?: number | null
}
export interface EnterpriseSitePublishResponse {
publish_batch_id: number
publish_record_id: number
connection_id: number
article_id: number
status: string
external_article_id?: string | null
external_article_url?: string | null
error_message?: string | null
published_at?: string | null
}
export interface PublisherLocalPlatformState {
platform_id: string
connected: boolean