From feccb4786afe3256f2bf720f052c3a90c454ee88 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Wed, 12 Aug 2026 14:19:24 +0800 Subject: [PATCH] fix(knowledge-fs): reconcile main merge artifacts --- api/openapi/markdown/console-openapi.md | 249 +++++++++++++++++++++++- api/openapi/markdown/service-openapi.md | 6 +- web/features/system-features/state.ts | 4 - 3 files changed, 252 insertions(+), 7 deletions(-) diff --git a/api/openapi/markdown/console-openapi.md b/api/openapi/markdown/console-openapi.md index 7d110a42c19..8f9d686f030 100644 --- a/api/openapi/markdown/console-openapi.md +++ b/api/openapi/markdown/console-openapi.md @@ -7550,6 +7550,45 @@ Get instruction generation template | ---- | ----------- | ------ | | 200 | Datasource resources available for an initial Source | **application/json**: [KnowledgeFSInitialSourcePreviewResponse](#knowledgefsinitialsourcepreviewresponse)
| +### [POST] /knowledge-fs/source-provider-preview/jobs +#### Request Body + +| Required | Schema | +| -------- | ------ | +| Yes | **application/json**: [KnowledgeFSInitialWebsiteSourcePreviewPayload](#knowledgefsinitialwebsitesourcepreviewpayload)
| + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 202 | Website datasource preview queued | **application/json**: [KnowledgeFSInitialSourcePreviewJobCreateResponse](#knowledgefsinitialsourcepreviewjobcreateresponse)
| + +### [DELETE] /knowledge-fs/source-provider-preview/jobs/{job_id} +#### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| job_id | path | | Yes | string | + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Website datasource preview canceled | **application/json**: [KnowledgeFSInitialSourcePreviewJobResponse](#knowledgefsinitialsourcepreviewjobresponse)
| + +### [GET] /knowledge-fs/source-provider-preview/jobs/{job_id} +#### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| job_id | path | | Yes | string | + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Website datasource preview status | **application/json**: [KnowledgeFSInitialSourcePreviewJobResponse](#knowledgefsinitialsourcepreviewjobresponse)
| + ### [GET] /knowledge-fs/spaces #### Parameters @@ -7558,6 +7597,7 @@ Get instruction generation template | creator_ids | query | Filter by creator account IDs | No | [ string ] | | limit | query | | No | integer,
**Default:** 20 | | page | query | | No | integer,
**Default:** 1 | +| query | query | | No | string | #### Responses @@ -8160,6 +8200,64 @@ Claim a workspace-staged upload. Multipart file bodies remain accepted as a lega | ---- | ----------- | ------ | | 200 | KnowledgeFS logical documents | **application/json**: [KnowledgeFSLogicalDocumentListResponse](#knowledgefslogicaldocumentlistresponse)
| +### [PATCH] /knowledge-fs/spaces/{control_space_id}/logical-documents +#### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| control_space_id | path | | Yes | string | + +#### Request Body + +| Required | Schema | +| -------- | ------ | +| Yes | **application/json**: [KnowledgeFSBulkDocumentAvailabilityPayload](#knowledgefsbulkdocumentavailabilitypayload)
| + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | KnowledgeFS logical document availability updated | **application/json**: [KnowledgeFSBulkDocumentAvailabilityResponse](#knowledgefsbulkdocumentavailabilityresponse)
| + +### [DELETE] /knowledge-fs/spaces/{control_space_id}/logical-documents/bulk +#### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| Idempotency-Key | header | Stable key used to make the mutation safe to retry | Yes | string | +| control_space_id | path | | Yes | string | + +#### Request Body + +| Required | Schema | +| -------- | ------ | +| Yes | **application/json**: [KnowledgeFSBulkLogicalDocumentDeletePayload](#knowledgefsbulklogicaldocumentdeletepayload)
| + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 202 | KnowledgeFS logical document deletions accepted | **application/json**: [KnowledgeFSBulkDeletionAcceptedResponse](#knowledgefsbulkdeletionacceptedresponse)
| + +### [POST] /knowledge-fs/spaces/{control_space_id}/logical-documents/download-zip +#### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| control_space_id | path | | Yes | string | + +#### Request Body + +| Required | Schema | +| -------- | ------ | +| Yes | **application/json**: [KnowledgeFSDocumentBatchDownloadPayload](#knowledgefsdocumentbatchdownloadpayload)
| + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | KnowledgeFS logical documents ZIP | **application/zip**: [BinaryFileResponse](#binaryfileresponse)
| + ### [DELETE] /knowledge-fs/spaces/{control_space_id}/logical-documents/{document_id} #### Parameters @@ -8195,6 +8293,40 @@ Claim a workspace-staged upload. Multipart file bodies remain accepted as a lega | ---- | ----------- | ------ | | 200 | KnowledgeFS logical document | **application/json**: [KnowledgeFSLogicalDocumentResponse](#knowledgefslogicaldocumentresponse)
| +### [PATCH] /knowledge-fs/spaces/{control_space_id}/logical-documents/{document_id} +#### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| control_space_id | path | | Yes | string | +| document_id | path | | Yes | string | + +#### Request Body + +| Required | Schema | +| -------- | ------ | +| Yes | **application/json**: [KnowledgeFSDocumentAvailabilityPayload](#knowledgefsdocumentavailabilitypayload)
| + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | KnowledgeFS logical document availability updated | **application/json**: [KnowledgeFSLogicalDocumentResponse](#knowledgefslogicaldocumentresponse)
| + +### [GET] /knowledge-fs/spaces/{control_space_id}/logical-documents/{document_id}/download +#### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| control_space_id | path | | Yes | string | +| document_id | path | | Yes | string | + +#### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | KnowledgeFS logical document | **application/octet-stream**: [BinaryFileResponse](#binaryfileresponse)
| + ### [PUT] /knowledge-fs/spaces/{control_space_id}/members #### Parameters @@ -20821,6 +20953,16 @@ Input field definition for snippet parameters. | ---- | ---- | ----------- | -------- | | KnowledgeFSAppSpaceJoinType | string | | | +#### KnowledgeFSBackgroundTaskFailureResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| document_id | string | | Yes | +| document_title | string | | No | +| error_code | string | | Yes | +| error_message | string | | Yes | +| job_id | string | | No | + #### KnowledgeFSBackgroundTaskListQuery | Name | Type | Description | Required | @@ -20847,6 +20989,7 @@ Input field definition for snippet parameters. | document_revision | integer | | No | | error_code | string | | No | | error_message | string | | No | +| failures | [ [KnowledgeFSBackgroundTaskFailureResponse](#knowledgefsbackgroundtaskfailureresponse) ] | | No | | id | string | | Yes | | knowledge_space_id | string | | Yes | | operation | string,
**Available values:** "document_delete", "document_processing", "document_reindex", "document_upload", "source_bulk", "source_crawl_import", "source_crawl_preview", "source_online_document_import", "source_online_drive_import", "source_sync" | *Enum:* `"document_delete"`, `"document_processing"`, `"document_reindex"`, `"document_upload"`, `"source_bulk"`, `"source_crawl_import"`, `"source_crawl_preview"`, `"source_online_document_import"`, `"source_online_drive_import"`, `"source_sync"` | Yes | @@ -20909,6 +21052,7 @@ Input field definition for snippet parameters. | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | | document_id | string | | Yes | +| document_title | string | | No | | job | [KnowledgeFSDurableDeletionJobResponse](#knowledgefsdurabledeletionjobresponse) | | Yes | | status_url | string | | Yes | @@ -20919,6 +21063,34 @@ Input field definition for snippet parameters. | items | [ [KnowledgeFSBulkDeletionAcceptedItemResponse](#knowledgefsbulkdeletionaccepteditemresponse) ] | | Yes | | total | integer | | Yes | +#### KnowledgeFSBulkDocumentAvailabilityFailureResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| document_id | string | | Yes | +| status | string,
**Available values:** "conflict", "not_found" | *Enum:* `"conflict"`, `"not_found"` | Yes | + +#### KnowledgeFSBulkDocumentAvailabilityItem + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| documentId | string | | Yes | +| expectedRowVersion | integer | | Yes | + +#### KnowledgeFSBulkDocumentAvailabilityPayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| documents | [ [KnowledgeFSBulkDocumentAvailabilityItem](#knowledgefsbulkdocumentavailabilityitem) ] | | Yes | +| enabled | boolean | | Yes | + +#### KnowledgeFSBulkDocumentAvailabilityResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| items | [ [KnowledgeFSLogicalDocumentResponse](#knowledgefslogicaldocumentresponse)
[KnowledgeFSBulkDocumentAvailabilityFailureResponse](#knowledgefsbulkdocumentavailabilityfailureresponse) ] | | Yes | +| total | integer | | Yes | + #### KnowledgeFSBulkDocumentDeleteItemPayload | Name | Type | Description | Required | @@ -20948,6 +21120,19 @@ Input field definition for snippet parameters. | type | string,
**Available values:** "document_delete", "document_reindex", "document_upload" | *Enum:* `"document_delete"`, `"document_reindex"`, `"document_upload"` | Yes | | updated_at | dateTime | | Yes | +#### KnowledgeFSBulkLogicalDocumentDeleteItemPayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| documentId | string | | Yes | +| expectedRevision | integer | | Yes | + +#### KnowledgeFSBulkLogicalDocumentDeletePayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| documents | [ [KnowledgeFSBulkLogicalDocumentDeleteItemPayload](#knowledgefsbulklogicaldocumentdeleteitempayload) ] | | Yes | + #### KnowledgeFSControlSpacePermissionRole | Name | Type | Description | Required | @@ -21056,6 +21241,19 @@ Input field definition for snippet parameters. | ---- | ---- | ----------- | -------- | | cursor | string | | No | +#### KnowledgeFSDocumentAvailabilityPayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| enabled | boolean | | Yes | +| expectedRowVersion | integer | | Yes | + +#### KnowledgeFSDocumentBatchDownloadPayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| document_ids | [ string ] | | Yes | + #### KnowledgeFSDocumentChunkListQuery | Name | Type | Description | Required | @@ -21172,7 +21370,7 @@ Input field definition for snippet parameters. | asset | [KnowledgeFSDocumentResponse](#knowledgefsdocumentresponse) | | No | | compilation_job | object | | No | | document_id | string | | No | -| status | string,
**Available values:** "not_found", "queued" | *Enum:* `"not_found"`, `"queued"` | Yes | +| status | string,
**Available values:** "disabled", "not_found", "queued" | *Enum:* `"disabled"`, `"not_found"`, `"queued"` | Yes | | status_url | string | | No | #### KnowledgeFSDocumentReindexPayload @@ -21448,8 +21646,10 @@ Input field definition for snippet parameters. | datasource | string | | Yes | | kind | string | | Yes | | name | string | | Yes | +| parameters | object | | No | | pluginId | string | | Yes | | provider | string | | Yes | +| providerDisplayName | string | | No | | selection | [ [KnowledgeFSOnlineDocumentWorkflowImportItemPayload](#knowledgefsonlinedocumentworkflowimportitempayload) ] | | Yes | | sync_policy | string,
**Available values:** "daily", "manual", "provider",
**Default:** provider | *Enum:* `"daily"`, `"manual"`, `"provider"` | No | @@ -21461,8 +21661,10 @@ Input field definition for snippet parameters. | datasource | string | | Yes | | kind | string | | Yes | | name | string | | Yes | +| parameters | object | | No | | pluginId | string | | Yes | | provider | string | | Yes | +| providerDisplayName | string | | No | | selection | [ [KnowledgeFSOnlineDriveWorkflowImportItemPayload](#knowledgefsonlinedriveworkflowimportitempayload) ] | | Yes | | sync_policy | string,
**Available values:** "daily", "manual", "provider",
**Default:** provider | *Enum:* `"daily"`, `"manual"`, `"provider"` | No | @@ -21490,6 +21692,29 @@ Input field definition for snippet parameters. | size | integer | | Yes | | type | string | | Yes | +#### KnowledgeFSInitialSourcePreviewJobCreateResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| job_id | string | | Yes | +| status | string,
**Default:** pending | | No | + +#### KnowledgeFSInitialSourcePreviewJobResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| job_id | string | | Yes | +| result | [KnowledgeFSInitialSourcePreviewResponse](#knowledgefsinitialsourcepreviewresponse) | | No | +| status | string,
**Available values:** "canceled", "completed", "failed", "pending", "running" | *Enum:* `"canceled"`, `"completed"`, `"failed"`, `"pending"`, `"running"` | Yes | + +#### KnowledgeFSInitialSourcePreviewPageResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| source_url | string | | Yes | +| title | string | | No | + #### KnowledgeFSInitialSourcePreviewPayload | Name | Type | Description | Required | @@ -21500,6 +21725,7 @@ Input field definition for snippet parameters. | parameters | object | | No | | pluginId | string | | Yes | | provider | string | | Yes | +| providerDisplayName | string | | No | #### KnowledgeFSInitialSourcePreviewResponse @@ -21507,8 +21733,9 @@ Input field definition for snippet parameters. | ---- | ---- | ----------- | -------- | | documents | [ [KnowledgeFSInitialSourcePreviewDocumentResponse](#knowledgefsinitialsourcepreviewdocumentresponse) ] | | No | | files | [ [KnowledgeFSInitialSourcePreviewFileResponse](#knowledgefsinitialsourcepreviewfileresponse) ] | | No | -| kind | string,
**Available values:** "online_document", "online_drive" | *Enum:* `"online_document"`, `"online_drive"` | Yes | +| kind | string,
**Available values:** "online_document", "online_drive", "website_crawl" | *Enum:* `"online_document"`, `"online_drive"`, `"website_crawl"` | Yes | | next_page_parameters | object | | No | +| pages | [ [KnowledgeFSInitialSourcePreviewPageResponse](#knowledgefsinitialsourcepreviewpageresponse) ] | | No | #### KnowledgeFSInitialWebsiteCrawlOptionsPayload @@ -21533,12 +21760,26 @@ Input field definition for snippet parameters. | datasource | string,
**Default:** crawl | | No | | kind | string | | Yes | | name | string | | Yes | +| parameters | object | | No | | pluginId | string | | No | | provider | string | | Yes | +| providerDisplayName | string | | No | | root_url | string | | Yes | | selection | [ [KnowledgeFSInitialWebsiteSelectionPayload](#knowledgefsinitialwebsiteselectionpayload) ] | | Yes | | sync_policy | string,
**Available values:** "daily", "manual", "provider",
**Default:** provider | *Enum:* `"daily"`, `"manual"`, `"provider"` | No | +#### KnowledgeFSInitialWebsiteSourcePreviewPayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| credentialId | string | | Yes | +| datasource | string | | Yes | +| kind | string | | Yes | +| parameters | object | | No | +| pluginId | string | | Yes | +| provider | string | | Yes | +| providerDisplayName | string | | No | + #### KnowledgeFSJWKResponse | Name | Type | Description | Required | @@ -21576,6 +21817,9 @@ Input field definition for snippet parameters. | active | [KnowledgeFSDocumentRevisionResponse](#knowledgefsdocumentrevisionresponse) | | Yes | | active_revision | integer | | No | | created_at | dateTime | | Yes | +| disabled_at | string | | No | +| disabled_by_subject_id | string | | No | +| enabled | boolean,
**Default:** true | | No | | id | string | | Yes | | knowledge_space_id | string | | Yes | | provider_item_id | string | | No | @@ -22653,6 +22897,7 @@ Input field definition for snippet parameters. | creator_ids | [ string ] | Filter by creator account IDs | No | | limit | integer,
**Default:** 20 | | No | | page | integer,
**Default:** 1 | | No | +| query | string | | No | #### KnowledgeFSSpaceListResponse diff --git a/api/openapi/markdown/service-openapi.md b/api/openapi/markdown/service-openapi.md index bdd2d035cab..39431d5b09c 100644 --- a/api/openapi/markdown/service-openapi.md +++ b/api/openapi/markdown/service-openapi.md @@ -4150,6 +4150,7 @@ Model class for i18n object. | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | | document_id | string | | Yes | +| document_title | string | | No | | job | [KnowledgeFSDurableDeletionJobResponse](#knowledgefsdurabledeletionjobresponse) | | Yes | | status_url | string | | Yes | @@ -4328,7 +4329,7 @@ Model class for i18n object. | asset | [KnowledgeFSDocumentResponse](#knowledgefsdocumentresponse) | | No | | compilation_job | object | | No | | document_id | string | | No | -| status | string,
**Available values:** "not_found", "queued" | *Enum:* `"not_found"`, `"queued"` | Yes | +| status | string,
**Available values:** "disabled", "not_found", "queued" | *Enum:* `"disabled"`, `"not_found"`, `"queued"` | Yes | | status_url | string | | No | #### KnowledgeFSDocumentReindexPayload @@ -4446,6 +4447,9 @@ Model class for i18n object. | active | [KnowledgeFSDocumentRevisionResponse](#knowledgefsdocumentrevisionresponse) | | Yes | | active_revision | integer | | No | | created_at | dateTime | | Yes | +| disabled_at | string | | No | +| disabled_by_subject_id | string | | No | +| enabled | boolean,
**Default:** true | | No | | id | string | | Yes | | knowledge_space_id | string | | Yes | | provider_item_id | string | | No | diff --git a/web/features/system-features/state.ts b/web/features/system-features/state.ts index 74ff11d3766..1fa23374db1 100644 --- a/web/features/system-features/state.ts +++ b/web/features/system-features/state.ts @@ -14,10 +14,6 @@ export const deploymentEditionAtom = atom((get) => { return get(systemFeaturesAtom).deployment_edition }) -export const brandingEnabledAtom = atom((get) => { - return get(systemFeaturesAtom).branding.enabled -}) - export const knowledgeFsUploadEnabledAtom = atom((get) => { return get(systemFeaturesAtom).knowledge_fs_upload_enabled })