File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ export {
1111 DateTimeString ,
1212 PaginatedResponseSchema ,
1313 MetaSchema ,
14- type Meta ,
15- type PaginatedResponse ,
1614} from './schemas' ;
1715export { AccessToken } from './token' ;
1816export { queryClient } from './query-client' ;
Original file line number Diff line number Diff line change 11export { GlobalSuccess } from './global-success' ;
22export { GlobalError } from './global-error' ;
33export { DateTimeString } from './date-time-string' ;
4- export {
5- PaginatedResponseSchema ,
6- MetaSchema ,
7- type PaginatedResponse ,
8- type Meta ,
9- } from './pagination' ;
4+ export { PaginatedResponseSchema , MetaSchema } from './pagination' ;
Original file line number Diff line number Diff line change @@ -9,15 +9,8 @@ export const MetaSchema = z.object({
99 limit : z . number ( ) ,
1010} ) ;
1111
12- export type Meta = z . infer < typeof MetaSchema > ;
13-
1412export const PaginatedResponseSchema = < T extends z . ZodType > ( schema : T ) =>
1513 z . object ( {
1614 items : z . array ( schema ) ,
1715 meta : MetaSchema ,
1816 } ) ;
19-
20- export type PaginatedResponse < T > = {
21- items : T [ ] ;
22- meta : Meta ;
23- } ;
Original file line number Diff line number Diff line change @@ -3,3 +3,9 @@ import * as SApi from './schemas';
33
44export type GlobalSuccess = z . infer < typeof SApi . GlobalSuccess > ;
55export type GlobalError = z . infer < typeof SApi . GlobalError > ;
6+ export type PaginationMeta = z . infer < typeof SApi . MetaSchema > ;
7+
8+ export type PaginatedResponse < T > = {
9+ items : T [ ] ;
10+ meta : PaginationMeta ;
11+ } ;
You can’t perform that action at this time.
0 commit comments