mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
feat: enhance Local Folder connector with version history and folder sync capabilities
This commit is contained in:
parent
e2f946b7c0
commit
5eeee99bb1
14 changed files with 742 additions and 1 deletions
|
|
@ -404,6 +404,18 @@ class ConnectorsApiService {
|
|||
listDiscordChannelsResponse
|
||||
);
|
||||
};
|
||||
|
||||
// =============================================================================
|
||||
// Local Folder Connector Methods
|
||||
// =============================================================================
|
||||
|
||||
indexFile = async (connectorId: number, filePath: string) => {
|
||||
return baseApiService.post(
|
||||
`/api/v1/search-source-connectors/${connectorId}/index-file`,
|
||||
undefined,
|
||||
{ body: { file_path: filePath } }
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export type { SlackChannel, DiscordChannel };
|
||||
|
|
|
|||
|
|
@ -379,6 +379,22 @@ class DocumentsApiService {
|
|||
});
|
||||
};
|
||||
|
||||
listDocumentVersions = async (documentId: number) => {
|
||||
return baseApiService.get(`/api/v1/documents/${documentId}/versions`);
|
||||
};
|
||||
|
||||
getDocumentVersion = async (documentId: number, versionNumber: number) => {
|
||||
return baseApiService.get(
|
||||
`/api/v1/documents/${documentId}/versions/${versionNumber}`
|
||||
);
|
||||
};
|
||||
|
||||
restoreDocumentVersion = async (documentId: number, versionNumber: number) => {
|
||||
return baseApiService.post(
|
||||
`/api/v1/documents/${documentId}/versions/${versionNumber}/restore`
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete a document
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export const getConnectorTypeDisplay = (type: string): string => {
|
|||
YOUTUBE_CONNECTOR: "YouTube",
|
||||
CIRCLEBACK_CONNECTOR: "Circleback",
|
||||
OBSIDIAN_CONNECTOR: "Obsidian",
|
||||
LOCAL_FOLDER_CONNECTOR: "Local Folder",
|
||||
DROPBOX_CONNECTOR: "Dropbox",
|
||||
MCP_CONNECTOR: "MCP Server",
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue