Skip to content

KirbyQueryResponse

Importable from #nuxt-kql.

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

Type Declarations

INFO

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

ts
interface KirbyApiResponse<T = any> {
  code: number;
  status: string;
  result?: T;
}

type KirbyQueryResponse<
  T = any,
  Pagination extends boolean = false
> = KirbyApiResponse<
  Pagination extends true
    ? {
        data: T;
        pagination: {
          page: number;
          pages: number;
          offset: number;
          limit: number;
          total: number;
        };
      }
    : T
>;

Released under the MIT License.