shopoflex-types 1.0.34 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -549,3 +549,52 @@ export interface IBranch {
549
549
  updatedAt?: Date;
550
550
  files?: FileType[];
551
551
  }
552
+ export interface PaginationQuery {
553
+ page?: string;
554
+ limit?: string;
555
+ sortBy?: string;
556
+ sortOrder?: 'asc' | 'desc';
557
+ search?: string;
558
+ [key: string]: any;
559
+ }
560
+ export interface PaginationOptions {
561
+ page: number;
562
+ limit: number;
563
+ skip: number;
564
+ sortBy: string;
565
+ sortOrder: 'asc' | 'desc';
566
+ filters: Record<string, any>;
567
+ search?: string;
568
+ }
569
+ export interface PaginatedResponse<T> {
570
+ data: T[];
571
+ pagination: {
572
+ currentPage: number;
573
+ totalPages: number;
574
+ totalItems: number;
575
+ hasNextPage: boolean;
576
+ hasPrevPage: boolean;
577
+ limit: number;
578
+ };
579
+ filters?: Record<string, any>;
580
+ sort?: {
581
+ sortBy: string;
582
+ sortOrder: 'asc' | 'desc';
583
+ };
584
+ }
585
+ export interface FilterConfig {
586
+ [key: string]: {
587
+ type: 'string' | 'number' | 'boolean' | 'date' | 'array' | 'objectId';
588
+ operator?: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'regex' | 'exists';
589
+ transform?: (value: any) => any;
590
+ };
591
+ }
592
+ export interface SortConfig {
593
+ allowedFields: string[];
594
+ defaultField: string;
595
+ defaultOrder: 'asc' | 'desc';
596
+ }
597
+ export interface SearchConfig {
598
+ fields: string[];
599
+ caseSensitive?: boolean;
600
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopoflex-types",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Shared TypeScript types for Shopoflex applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",