mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-08 09:02:36 +01:00
✨ feat: Add cursor pagination utilities and refine user/group/role types in @librechat/data-schemas (#9218)
* feat: Add pagination interfaces and update user and group types for better data handling * fix: Update data-schemas version to 0.0.19
This commit is contained in:
parent
0e00f357a6
commit
ac608ded46
9 changed files with 108 additions and 20 deletions
|
|
@ -1 +1,2 @@
|
|||
export * from './enum';
|
||||
export * from './pagination';
|
||||
|
|
|
|||
17
packages/data-schemas/src/common/pagination.ts
Normal file
17
packages/data-schemas/src/common/pagination.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
export interface CursorPaginationParams {
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
sortBy?: string;
|
||||
sortOrder?: 'asc' | 'desc';
|
||||
}
|
||||
|
||||
export interface CursorPaginationResponse<T> {
|
||||
data: T[];
|
||||
pagination: {
|
||||
hasNextPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
nextCursor?: string;
|
||||
previousCursor?: string;
|
||||
totalCount?: number;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue