forest-express-sequelize 9.0.1 → 9.0.3
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.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/types/index.d.ts +38 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [9.0.3](https://github.com/ForestAdmin/forest-express-sequelize/compare/v9.0.2...v9.0.3) (2022-11-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **type:** add FilterOperator enum ([#1040](https://github.com/ForestAdmin/forest-express-sequelize/issues/1040)) ([17b47d9](https://github.com/ForestAdmin/forest-express-sequelize/commit/17b47d9611fa16b0dc421f8cce37f64e894b954b))
|
|
7
|
+
|
|
8
|
+
## [9.0.2](https://github.com/ForestAdmin/forest-express-sequelize/compare/v9.0.1...v9.0.2) (2022-11-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **type:** add promise return for `SmartFieldFilterer` ([#1043](https://github.com/ForestAdmin/forest-express-sequelize/issues/1043)) ([6d0b7d1](https://github.com/ForestAdmin/forest-express-sequelize/commit/6d0b7d10c4f453822d2f5d3db2104e25ac11544a))
|
|
14
|
+
|
|
1
15
|
## [9.0.1](https://github.com/ForestAdmin/forest-express-sequelize/compare/v9.0.0...v9.0.1) (2022-11-23)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -207,9 +207,45 @@ export interface Page {
|
|
|
207
207
|
size: number;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
export enum FilterOperator {
|
|
211
|
+
//Classic
|
|
212
|
+
NOT = "not",
|
|
213
|
+
GREATER_THAN = "greater_than",
|
|
214
|
+
LESS_THAN = "less_than",
|
|
215
|
+
AFTER = "after",
|
|
216
|
+
BEFORE = "before",
|
|
217
|
+
CONTAINS = "contains",
|
|
218
|
+
STARTS_WITH = "starts_with",
|
|
219
|
+
ENDS_WITH = "ends_with",
|
|
220
|
+
NOT_CONTAINS = "not_contains",
|
|
221
|
+
PRESENT = "present",
|
|
222
|
+
BLANK = "blank",
|
|
223
|
+
NOT_EQUAL = "not_equal",
|
|
224
|
+
EQUAL = "equal",
|
|
225
|
+
INCLUDES_ALL = "includes_all",
|
|
226
|
+
IN = "in",
|
|
227
|
+
//Date
|
|
228
|
+
TODAY = "today",
|
|
229
|
+
YESTERDAY = "yesterday",
|
|
230
|
+
PREVIOUS_WEEK = "previous_week",
|
|
231
|
+
PREVIOUS_MONTH = "previous_month",
|
|
232
|
+
PREVIOUS_QUATER = "previous_quater",
|
|
233
|
+
PREVIOUS_YEAR = "previous_year",
|
|
234
|
+
PREVIOUS_WEEK_TO_DATE = "previous_week_to_date",
|
|
235
|
+
PREVIOUS_MONTH_TO_DATE = "previous_month_to_date",
|
|
236
|
+
PREVIOUS_QUARTER_TO_DATE = "previous_quarter_to_date",
|
|
237
|
+
PREVIOUS_YEAR_TO_DATE = "previous_year_to_date",
|
|
238
|
+
PREVIOUS_X_DAYS = "previous_x_days",
|
|
239
|
+
PREVIOUS_X_DAYS_TO_DATE = "previous_x_days_to_date",
|
|
240
|
+
PAST = "past",
|
|
241
|
+
FUTURE = "future",
|
|
242
|
+
BEFORE_X_HOURS_AGO = "before_x_hours_ago",
|
|
243
|
+
AFTER_X_HOURS_AGO = "after_x_hours_ago",
|
|
244
|
+
}
|
|
245
|
+
|
|
210
246
|
export interface Filter {
|
|
211
247
|
field: string;
|
|
212
|
-
operator:
|
|
248
|
+
operator: FilterOperator;
|
|
213
249
|
value: string;
|
|
214
250
|
}
|
|
215
251
|
|
|
@@ -248,7 +284,7 @@ export interface SmartFieldFiltererFilter {
|
|
|
248
284
|
}
|
|
249
285
|
|
|
250
286
|
export interface SmartFieldFilterer {
|
|
251
|
-
(filter: SmartFieldFiltererFilter): Sequelize.WhereOptions
|
|
287
|
+
(filter: SmartFieldFiltererFilter): Sequelize.WhereOptions | Promise<Sequelize.WhereOptions>;
|
|
252
288
|
}
|
|
253
289
|
|
|
254
290
|
export interface SegmentAggregationCreator<M extends Sequelize.Model = any> {
|