(feat:connector) provider metadata, separate fe nested display

This commit is contained in:
ManishMadan2882
2025-08-29 18:05:58 +05:30
parent e55d1a5865
commit 2868e47cf8
3 changed files with 535 additions and 4 deletions

View File

@@ -1022,7 +1022,8 @@ class PaginatedSources(Resource):
"tokens": doc.get("tokens", ""),
"retriever": doc.get("retriever", "classic"),
"syncFrequency": doc.get("sync_frequency", ""),
"isNested": bool(doc.get("directory_structure"))
"isNested": bool(doc.get("directory_structure")),
"type": doc.get("type", "file")
}
paginated_docs.append(doc_data)
response = {
@@ -1070,7 +1071,8 @@ class CombinedJson(Resource):
"tokens": index.get("tokens", ""),
"retriever": index.get("retriever", "classic"),
"syncFrequency": index.get("sync_frequency", ""),
"is_nested": bool(index.get("directory_structure"))
"is_nested": bool(index.get("directory_structure")),
"type": index.get("type", "file") # Add type field with default "file"
}
)
except Exception as err:

View File

@@ -981,8 +981,11 @@ def ingest_connector(
"tokens": tokens,
"retriever": retriever,
"id": str(id),
"type": source_type,
"remote_data": json.dumps(api_source_config),
"type": "connector",
"remote_data": json.dumps({
"provider": source_type,
**api_source_config
}),
"directory_structure": json.dumps(directory_structure)
}