feat(ingest): 源与目录文件名过滤及钉钉文档导出

- filename_filter_rules table (000035) with source-root and per-directory rows
- additive inheritance: source default + every ancestor directory contributes
- filename_is_filtered() SQL predicate applied to catalog browsing, subtree
  counts, change-set diffing, routing fan-out and artifact fetch manifests
- fetch_state 'filtered' (CHECK extended); reconcile cancels/restores fetch
  jobs, retires planned publications and blocks items when rules change
- GET/PUT/DELETE /api/v1/filename-filters (Idempotency-Key, normalized
  extensions) + Settings and Catalog filter editors
- failJobSQL no longer swallows the claimed row when the failure projection
  upserts (fixes spurious 'lease lost' retries)
- DingTalk live fetch: adoc/axls now use the export-job pipeline (HTTP 403
  from file/download fixed), header-signature downloads supported
This commit is contained in:
姚章浩
2026-09-15 09:46:31 +08:00
parent 2005e4e7da
commit b3c9331966
25 changed files with 1080 additions and 30 deletions
+23
View File
@@ -425,6 +425,29 @@
}
}
},
"/api/v1/filename-filters": {
"get": {
"tags": ["Source connections"],
"operationId": "listFilenameFilters",
"summary": "列出来源和目录的文件扩展名筛选规则",
"parameters": [{"name":"connection_id","in":"query","required":true,"schema":{"type":"string"}}],
"responses": {"200":{"description":"筛选规则"},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalError"}}
},
"put": {
"tags": ["Source connections"],
"operationId": "setFilenameFilter",
"summary": "设置来源或目录文件扩展名筛选",
"parameters": [{"$ref":"#/components/parameters/IdempotencyKey"}],
"responses": {"200":{"description":"筛选规则已生效"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"500":{"$ref":"#/components/responses/InternalError"}}
},
"delete": {
"tags": ["Source connections"],
"operationId": "clearFilenameFilter",
"summary": "移除本级筛选并恢复继承",
"parameters": [{"$ref":"#/components/parameters/IdempotencyKey"}],
"responses": {"200":{"description":"本级筛选已移除"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"500":{"$ref":"#/components/responses/InternalError"}}
}
},
"/api/v1/scope-rules": {
"get": {
"tags": [