(document: Document)
| 26 | }; |
| 27 | |
| 28 | const deleteDocument = async (document: Document) => { |
| 29 | const documentChunkIds = document.docChunks.map((docChunk) => |
| 30 | docChunk.id.toString(), |
| 31 | ); |
| 32 | |
| 33 | const { error } = await supabase |
| 34 | .from("doc_chunks") |
| 35 | .delete() |
| 36 | .in("id", documentChunkIds); |
| 37 | |
| 38 | return error; |
| 39 | }; |
| 40 | |
| 41 | const fetchPage = async (page: number) => { |
| 42 | const { data: documents, error } = await supabase.rpc("get_sections", { |
nothing calls this directly
no outgoing calls
no test coverage detected