✨ feat: refine type definitions and improve request handling in API layer
This commit is contained in:
5
types/global.d.ts
vendored
5
types/global.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user