@burotan/strapi-client
Version:
Ultimate type supported api client for Strapi!
34 lines (28 loc) • 512 B
text/typescript
import { StrapiQuery } from "./StrapiQuery";
export type StrapiClientOptions = {
url: string;
token?: string;
};
export type StrapiURI = {
id?: any;
query?: StrapiQuery;
};
export type StrapiMeta = {
pagination?: {
page: number;
pageSize: number;
pageCount: number;
total: number;
};
};
export type StrapiError = {
status: number;
name: string;
message: string;
details?: any;
};
export type StrapiResult<T> = {
data?: T;
meta?: StrapiMeta;
error?: StrapiError;
};