feat: refine type definitions and improve request handling in API layer

This commit is contained in:
2026-02-25 17:44:49 +00:00
parent 3b84e49383
commit 74bb860d4f
6 changed files with 36 additions and 34 deletions

5
types/global.d.ts vendored
View File

@@ -5,9 +5,12 @@ interface Ssr {
// validUntil: any // go Time
}
/** MongoDB-style filter, e.g. { _id: "abc" } or { $or: [...] } */
type MongoFilter = Record<string, unknown>
interface ApiOptions {
method?: "GET" | "POST" | "PUT" | "DELETE"
filter?: any
filter?: MongoFilter
sort?: string
lookup?: string
limit?: number