@o3r/rules-engine
Version:
This module provides a rule engine that can be executed on your Otter application to customize your application (translations, placeholders and configs) based on a json file generated by your CMS.
40 lines • 1.82 kB
TypeScript
import { DateInput, Operator } from '../operator.interface';
/**
* Check if a date variable is in a specified date range
* @title is between
*/
export declare const inRangeDate: Operator<Date, [DateInput, DateInput], DateInput>;
/**
* Check if the value of the variable is in the next x minutes
* @title is in next minutes
* @returns false for dates before `now` and for dates after `now` + `nextMinutes`, true for dates between `now` and `now` + `nextMinutes`
*/
export declare const dateInNextMinutes: Operator<Date, number, DateInput, string | number>;
/**
* Check if the value of the variable is not in the next x minutes
* @title is not in next minutes
* @returns false for dates before `now` and for dates between `now` and `now` + `nextMinutes`, true for dates after `now` + `nextMinutes`
*/
export declare const dateNotInNextMinutes: Operator<Date, number, DateInput, string | number>;
/**
* Check if a date variable is prior than a specified date
* @title is before
*/
export declare const dateBefore: Operator<Date, DateInput, DateInput>;
/**
* Check if a date variable is posterior than a specified date
* @title is after
*/
export declare const dateAfter: Operator<Date, DateInput, DateInput>;
/**
* Check if a date variable is the same as a specified date
* @title is equal to
*/
export declare const dateEquals: Operator<Date, DateInput, DateInput>;
/**
* Check if a date variable is different from a specified date
* @title is not equal
*/
export declare const dateNotEquals: Operator<Date, DateInput, DateInput>;
export declare const dateBasedOperators: (Operator<Date, [DateInput, DateInput], DateInput, [DateInput, DateInput]> | Operator<Date, number, DateInput, string | number> | Operator<Date, DateInput, DateInput, DateInput>)[];
//# sourceMappingURL=date-based.operators.d.ts.map