mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
Merge remote-tracking branch 'upstream/dev' into feat/replace-logs
This commit is contained in:
commit
99bd2df463
59 changed files with 2788 additions and 1579 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { IconLinkPlus, IconUsersGroup } from "@tabler/icons-react";
|
||||
import {
|
||||
BookOpen,
|
||||
File,
|
||||
FileText,
|
||||
Globe,
|
||||
|
|
@ -86,6 +87,8 @@ export const getConnectorIcon = (connectorType: EnumConnectorName | string, clas
|
|||
return <FileText {...iconProps} />;
|
||||
case "EXTENSION":
|
||||
return <Webhook {...iconProps} />;
|
||||
case "SURFSENSE_DOCS":
|
||||
return <BookOpen {...iconProps} />;
|
||||
case "DEEP":
|
||||
return <Sparkles {...iconProps} />;
|
||||
case "DEEPER":
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export const documentTypeEnum = z.enum([
|
|||
"ELASTICSEARCH_CONNECTOR",
|
||||
"BOOKSTACK_CONNECTOR",
|
||||
"CIRCLEBACK",
|
||||
"SURFSENSE_DOCS",
|
||||
"NOTE",
|
||||
]);
|
||||
|
||||
|
|
@ -185,6 +186,23 @@ export const getSurfsenseDocsByChunkRequest = z.object({
|
|||
|
||||
export const getSurfsenseDocsByChunkResponse = surfsenseDocsDocumentWithChunks;
|
||||
|
||||
/**
|
||||
* List Surfsense docs
|
||||
*/
|
||||
export const getSurfsenseDocsRequest = z.object({
|
||||
queryParams: paginationQueryParams.extend({
|
||||
title: z.string().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const getSurfsenseDocsResponse = z.object({
|
||||
items: z.array(surfsenseDocsDocument),
|
||||
total: z.number(),
|
||||
page: z.number(),
|
||||
page_size: z.number(),
|
||||
has_more: z.boolean(),
|
||||
});
|
||||
|
||||
/**
|
||||
* Update document
|
||||
*/
|
||||
|
|
@ -229,3 +247,5 @@ export type SurfsenseDocsDocument = z.infer<typeof surfsenseDocsDocument>;
|
|||
export type SurfsenseDocsDocumentWithChunks = z.infer<typeof surfsenseDocsDocumentWithChunks>;
|
||||
export type GetSurfsenseDocsByChunkRequest = z.infer<typeof getSurfsenseDocsByChunkRequest>;
|
||||
export type GetSurfsenseDocsByChunkResponse = z.infer<typeof getSurfsenseDocsByChunkResponse>;
|
||||
export type GetSurfsenseDocsRequest = z.infer<typeof getSurfsenseDocsRequest>;
|
||||
export type GetSurfsenseDocsResponse = z.infer<typeof getSurfsenseDocsResponse>;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,13 @@ export const deleteSearchSpaceResponse = z.object({
|
|||
message: z.literal("Search space deleted successfully"),
|
||||
});
|
||||
|
||||
/**
|
||||
* Leave search space (for non-owners)
|
||||
*/
|
||||
export const leaveSearchSpaceResponse = z.object({
|
||||
message: z.literal("Successfully left the search space"),
|
||||
});
|
||||
|
||||
// Inferred types
|
||||
export type SearchSpace = z.infer<typeof searchSpace>;
|
||||
export type GetSearchSpacesRequest = z.infer<typeof getSearchSpacesRequest>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue