feat: implement the search filter

This commit is contained in:
2025-05-01 10:14:28 +07:00
parent ebfa4d3175
commit 84e2925d81
11 changed files with 303 additions and 14 deletions
+17 -1
View File
@@ -74,7 +74,11 @@ export interface Config {
'payload-preferences': PayloadPreference;
'payload-migrations': PayloadMigration;
};
collectionsJoins: {};
collectionsJoins: {
categories: {
subcategories: 'categories';
};
};
collectionsSelect: {
users: UsersSelect<false> | UsersSelect<true>;
media: MediaSelect<false> | MediaSelect<true>;
@@ -158,6 +162,14 @@ export interface Media {
export interface Category {
id: string;
name: string;
slug: string;
color?: string | null;
parent?: (string | null) | Category;
subcategories?: {
docs?: (string | Category)[];
hasNextPage?: boolean;
totalDocs?: number;
};
updatedAt: string;
createdAt: string;
}
@@ -261,6 +273,10 @@ export interface MediaSelect<T extends boolean = true> {
*/
export interface CategoriesSelect<T extends boolean = true> {
name?: T;
slug?: T;
color?: T;
parent?: T;
subcategories?: T;
updatedAt?: T;
createdAt?: T;
}