n8n: add backend endpoints for the RAGcore Procedure Sync workflow
GET /api/v1/integrations/n8n/procedures lists every procedure Markdown file Fleet Ops ships (all languages) with a stable per-document id and content hash, ready for workflow 3 to push into RAGcore. POST .../procedures-sync-result records the sync outcome as an idempotent audit event, matching the existing return-callback/workflow-error pattern. Extracted frontmatter parsing out of the demo knowledge provider into a shared module so both read the same source of truth.
This commit is contained in:
@@ -164,6 +164,32 @@ class WorkflowErrorReportResult(BaseModel):
|
||||
occurred_at: datetime
|
||||
|
||||
|
||||
class ProcedureDocumentOut(BaseModel):
|
||||
id: str
|
||||
language: str
|
||||
document_id: str
|
||||
title: str
|
||||
version: str
|
||||
content: str
|
||||
content_hash: str
|
||||
|
||||
|
||||
class ProcedureListOut(BaseModel):
|
||||
documents: list[ProcedureDocumentOut]
|
||||
|
||||
|
||||
class ProcedureSyncResultIn(BaseModel):
|
||||
execution_id: str = Field(max_length=120)
|
||||
synced: int = Field(ge=0)
|
||||
failed: int = Field(default=0, ge=0)
|
||||
|
||||
|
||||
class ProcedureSyncResultResult(BaseModel):
|
||||
status: Literal["registered", "already_registered"]
|
||||
execution_id: str
|
||||
occurred_at: datetime
|
||||
|
||||
|
||||
class ProvideFieldsRequest(BaseModel):
|
||||
fields: dict[str, str]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user