jsm-utilities
Version:
A utilities library.
39 lines (38 loc) • 1.48 kB
TypeScript
export declare const createStringFilter: <F = string, Q = any, T = any>(q: Q, totalQ: T | null, value: any, fields: F | F[], omit?: boolean, operator?: "and" | "or") => {
q: Q;
totalQ: T | null;
};
/**
* @deprecated now using multi fileds with AND OR operators
*/
export declare const _createStringFilter: <F = string, Q = any, T = any>(q: Q, totalQ: T | null, value: any, field: F, omit?: boolean) => {
q: Q;
totalQ: T | null;
};
export declare const createBooleanFilter: <F = string, Q = any, T = any>(q: Q, totalQ: T | null, value: any, field: F) => {
q: Q;
totalQ: T | null;
};
export declare const createDateRangeFilter: <F = string, Q = any, T = any>(q: Q, totalQ: T | null, value: any, field: F) => {
q: Q;
totalQ: T | null;
};
export declare const createAggregateStringFilter: <F extends string = string>(match: {
[key: string]: any;
}, value: string | string[] | undefined | unknown, field: F) => {
[key: string]: any;
};
export declare const createAggregateDateRangeFilter: <F extends string = string>(match: {
[key: string]: any;
}, value: any, field: F) => {
[key: string]: any;
};
export declare const createNumberFilter: <F = string, Q = any, T = any>(q: Q, totalQ: T | null, value: any, field: F) => {
q: Q;
totalQ: T | null;
};
export declare const createAggregateNumberRangeFilter: <F extends string = string>(match: {
[key: string]: any;
}, value: any, field: F) => {
[key: string]: any;
};