mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 09:46:25 +02:00
Add SurfSense docs to documents table
This commit is contained in:
parent
4ace7d09a0
commit
738e23b51a
9 changed files with 338 additions and 59 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":
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const documentTypeEnum = z.enum([
|
|||
"LINEAR_CONNECTOR",
|
||||
"NOTE",
|
||||
"CIRCLEBACK",
|
||||
"SURFSENSE_DOCS",
|
||||
]);
|
||||
|
||||
export const document = z.object({
|
||||
|
|
@ -183,6 +184,26 @@ export const getSurfsenseDocsByChunkRequest = z.object({
|
|||
|
||||
export const getSurfsenseDocsByChunkResponse = surfsenseDocsDocumentWithChunks;
|
||||
|
||||
/**
|
||||
* List Surfsense docs
|
||||
*/
|
||||
export const getSurfsenseDocsRequest = z.object({
|
||||
page: z.number().optional(),
|
||||
page_size: z.number().optional(),
|
||||
title: z.string().optional(),
|
||||
});
|
||||
|
||||
export const getSurfsenseDocsResponse = z.object({
|
||||
items: z.array(surfsenseDocsDocument.extend({
|
||||
created_at: z.string().nullable().optional(),
|
||||
updated_at: z.string().nullable().optional(),
|
||||
})),
|
||||
total: z.number(),
|
||||
page: z.number(),
|
||||
page_size: z.number(),
|
||||
has_more: z.boolean(),
|
||||
});
|
||||
|
||||
/**
|
||||
* Update document
|
||||
*/
|
||||
|
|
@ -227,3 +248,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>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue