@gpa-gemstone/common-pages
Version:
Common UI pages for GPA products
30 lines (29 loc) • 1.17 kB
TypeScript
import { Search } from "@gpa-gemstone/react-interactive";
export declare namespace Gemstone {
namespace Types {
interface ISearchFilter<T> {
FieldName: keyof T;
SearchParameter: string | boolean | number | string[] | number[] | boolean[];
Operator: Search.OperatorType;
}
interface IPageInfo {
PageSize: number;
PageCount: number;
TotalCount: number;
}
}
namespace HelperFunctions {
/**
* Builds an array of Types.ISearchFilter<T> from an array of Search.IFilter<T>
* @param searchFilter Array of Search.IFilter<T>
* @returns Array of Gemstone.Types.ISearchFilter<T>
*/
const getSearchFilter: <T>(searchFilter: Search.IFilter<T>[]) => Types.ISearchFilter<T>[];
/**
* Builds an array of Search.IFilter<T> from an array of Gemstone.Types.ISearchFilter<T>
* @param filters Array of Gemstone.Types.ISearchFilter<T>
* @returns Array of Search.IFilter<T>
*/
const buildSearchFilter: <T>(filters: Types.ISearchFilter<T>[]) => Search.IFilter<T>[];
}
}