Skip to content
On this page

KirbyQueryRequest

Importable from #nuxt-kql.

ts
import type { KirbyQueryRequest } from '#nuxt-kql'

Type Declarations

INFO

Types are re-exported from the kirby-fest package.

ts
 type KirbyQueryModel<CustomModel extends string = never> =
  | 'collection'
  | 'file'
  | 'kirby'
  | 'page'
  | 'site'
  | 'user'
  | CustomModel

 type KirbyQuery<CustomModel extends string = never> =
  | KirbyQueryModel<CustomModel>
  | `${KirbyQueryModel<CustomModel>}.${string}`
  | `${KirbyQueryModel<CustomModel>}(${string})${string}`

interface KirbyQuerySchema {
  query: KirbyQuery
  select?: string[] | Record<string, string | number | boolean | KirbyQuerySchema>
}

interface KirbyQueryRequest extends KirbyQuerySchema {
  pagination?: {
    /** @default 100 */
    limit?: number
    page?: number
  }
}

Released under the MIT License.