mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
format: auto-fix via pnpm format:fix
This commit is contained in:
parent
a74aa4da4f
commit
0e49cc33f8
37 changed files with 128 additions and 175 deletions
|
|
@ -3,24 +3,19 @@ import { z } from "zod";
|
|||
import { zql } from "../schema/index";
|
||||
|
||||
export const messageQueries = {
|
||||
byThread: defineQuery(
|
||||
z.object({ threadId: z.number() }),
|
||||
({ args: { threadId } }) =>
|
||||
zql.new_chat_messages.where("threadId", threadId).orderBy("createdAt", "asc"),
|
||||
byThread: defineQuery(z.object({ threadId: z.number() }), ({ args: { threadId } }) =>
|
||||
zql.new_chat_messages.where("threadId", threadId).orderBy("createdAt", "asc")
|
||||
),
|
||||
};
|
||||
|
||||
export const commentQueries = {
|
||||
byThread: defineQuery(
|
||||
z.object({ threadId: z.number() }),
|
||||
({ args: { threadId } }) =>
|
||||
zql.chat_comments.where("threadId", threadId).orderBy("createdAt", "asc"),
|
||||
byThread: defineQuery(z.object({ threadId: z.number() }), ({ args: { threadId } }) =>
|
||||
zql.chat_comments.where("threadId", threadId).orderBy("createdAt", "asc")
|
||||
),
|
||||
};
|
||||
|
||||
export const chatSessionQueries = {
|
||||
byThread: defineQuery(
|
||||
z.object({ threadId: z.number() }),
|
||||
({ args: { threadId } }) => zql.chat_session_state.where("threadId", threadId).one(),
|
||||
byThread: defineQuery(z.object({ threadId: z.number() }), ({ args: { threadId } }) =>
|
||||
zql.chat_session_state.where("threadId", threadId).one()
|
||||
),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,19 +3,13 @@ import { z } from "zod";
|
|||
import { zql } from "../schema/index";
|
||||
|
||||
export const documentQueries = {
|
||||
bySpace: defineQuery(
|
||||
z.object({ searchSpaceId: z.number() }),
|
||||
({ args: { searchSpaceId } }) =>
|
||||
zql.documents.where("searchSpaceId", searchSpaceId).orderBy("createdAt", "desc"),
|
||||
bySpace: defineQuery(z.object({ searchSpaceId: z.number() }), ({ args: { searchSpaceId } }) =>
|
||||
zql.documents.where("searchSpaceId", searchSpaceId).orderBy("createdAt", "desc")
|
||||
),
|
||||
};
|
||||
|
||||
export const connectorQueries = {
|
||||
bySpace: defineQuery(
|
||||
z.object({ searchSpaceId: z.number() }),
|
||||
({ args: { searchSpaceId } }) =>
|
||||
zql.search_source_connectors
|
||||
.where("searchSpaceId", searchSpaceId)
|
||||
.orderBy("createdAt", "desc"),
|
||||
bySpace: defineQuery(z.object({ searchSpaceId: z.number() }), ({ args: { searchSpaceId } }) =>
|
||||
zql.search_source_connectors.where("searchSpaceId", searchSpaceId).orderBy("createdAt", "desc")
|
||||
),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ import { z } from "zod";
|
|||
import { zql } from "../schema/index";
|
||||
|
||||
export const notificationQueries = {
|
||||
byUser: defineQuery(
|
||||
z.object({ userId: z.string() }),
|
||||
({ args: { userId } }) =>
|
||||
zql.notifications.where("userId", userId).orderBy("createdAt", "desc"),
|
||||
byUser: defineQuery(z.object({ userId: z.string() }), ({ args: { userId } }) =>
|
||||
zql.notifications.where("userId", userId).orderBy("createdAt", "desc")
|
||||
),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { table, string, number, json } from "@rocicorp/zero";
|
||||
import { json, number, string, table } from "@rocicorp/zero";
|
||||
|
||||
export const newChatMessageTable = table("new_chat_messages")
|
||||
.columns({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { table, string, number, boolean, json } from "@rocicorp/zero";
|
||||
import { boolean, json, number, string, table } from "@rocicorp/zero";
|
||||
|
||||
export const documentTable = table("documents")
|
||||
.columns({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { table, string, number, boolean, json } from "@rocicorp/zero";
|
||||
import { boolean, json, number, string, table } from "@rocicorp/zero";
|
||||
|
||||
export const notificationTable = table("notifications")
|
||||
.columns({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createSchema, createBuilder, relationships } from "@rocicorp/zero";
|
||||
import { createBuilder, createSchema, relationships } from "@rocicorp/zero";
|
||||
import { chatCommentTable, chatSessionStateTable, newChatMessageTable } from "./chat";
|
||||
import { documentTable, searchSourceConnectorTable } from "./documents";
|
||||
import { notificationTable } from "./inbox";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue