@halix/action-sdk 1.0.27 → 1.0.29
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/lib/cjs/data-aggregate.js +174 -4
- package/lib/cjs/data-crud.js +1 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/types/data-aggregate.d.ts +139 -11
- package/lib/cjs/types/data-aggregate.d.ts.map +1 -1
- package/lib/cjs/types/data-crud.d.ts +3 -4
- package/lib/cjs/types/data-crud.d.ts.map +1 -1
- package/lib/cjs/types/index.d.ts +1 -2
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/lists.d.ts +2 -3
- package/lib/cjs/types/lists.d.ts.map +1 -1
- package/lib/esm/data-aggregate.js +173 -4
- package/lib/esm/data-aggregate.js.map +1 -1
- package/lib/esm/data-crud.js +1 -1
- package/lib/esm/data-crud.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +2 -0
- package/lib/esm/lists.js.map +1 -1
- package/lib/esm/types/data-aggregate.d.ts +139 -11
- package/lib/esm/types/data-crud.d.ts +3 -4
- package/lib/esm/types/index.d.ts +1 -2
- package/lib/esm/types/lists.d.ts +2 -3
- package/package.json +1 -1
- package/lib/cjs/filter-expressions.js +0 -10
- package/lib/cjs/types/filter-expressions.d.ts +0 -82
- package/lib/cjs/types/filter-expressions.d.ts.map +0 -1
- package/lib/esm/filter-expressions.js +0 -10
- package/lib/esm/filter-expressions.js.map +0 -1
- package/lib/esm/types/filter-expressions.d.ts +0 -81
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-expressions.d.ts","sourceRoot":"","sources":["../../../src/filter-expressions.ts"],"names":[],"mappings":"AASA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Halix SDK License v1.0
|
|
2
|
-
// Copyright (c) 2025 halix.io LLC.
|
|
3
|
-
//
|
|
4
|
-
// This source code is licensed for use **only** within applications
|
|
5
|
-
// running on the Halix platform, in accordance with Halix SDK guidelines.
|
|
6
|
-
//
|
|
7
|
-
// Unauthorized use outside the Halix platform is prohibited.
|
|
8
|
-
// Full license terms available in the LICENSE file.
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=filter-expressions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-expressions.js","sourceRoot":"","sources":["../../src/filter-expressions.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,mCAAmC;AACnC,EAAE;AACF,oEAAoE;AACpE,0EAA0E;AAC1E,EAAE;AACF,6DAA6D;AAC7D,oDAAoD"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module @halix/action-sdk/filter-expressions
|
|
3
|
-
* @description Filter expression language (dataexpr format) used throughout the SDK for filtering
|
|
4
|
-
* data in queries.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* FilterExpression represents a filter expression string in the Halix dataexpr format.
|
|
8
|
-
* Used to filter data based on logical comparisons and boolean conditions.
|
|
9
|
-
*
|
|
10
|
-
* ## Basic Forms
|
|
11
|
-
* ```
|
|
12
|
-
* <left> <operator> <right>
|
|
13
|
-
* (<expression1>) AND (<expression2>)
|
|
14
|
-
* (<expression1>) OR (<expression2>)
|
|
15
|
-
* ```
|
|
16
|
-
* Combine comparisons with AND/OR. Each operand must be in parentheses.
|
|
17
|
-
*
|
|
18
|
-
* ## Supported Operators
|
|
19
|
-
*
|
|
20
|
-
* | Operator | Description | Example |
|
|
21
|
-
* |----------|-------------|---------|
|
|
22
|
-
* | `=` | Equals | `status = 'active'` |
|
|
23
|
-
* | `!=` | Not equals | `status != 'closed'` |
|
|
24
|
-
* | `~` | Equals (case-insensitive) | `name ~ 'ADMIN'` |
|
|
25
|
-
* | `!~` | Not equals (case-insensitive) | `role !~ 'ADMIN'` |
|
|
26
|
-
* | `<` | Less than | `score < '80'` |
|
|
27
|
-
* | `>` | Greater than | `score > '90'` |
|
|
28
|
-
* | `<=` | Less than or equal to | `score <= '90'` |
|
|
29
|
-
* | `>=` | Greater than or equal to | `score >= '70'` |
|
|
30
|
-
* | `!>` | Begins with | `name !> 'Jo'` |
|
|
31
|
-
* | `<!` | Ends with | `email <! '@example.com'` |
|
|
32
|
-
* | `<>` | Contains (string or array) | `tags <> 'urgent'` |
|
|
33
|
-
* | `!<>` | Does not contain | `tags !<> 'archived'` |
|
|
34
|
-
* | `<empty> $void` | Value is empty | `notes <empty> $void` |
|
|
35
|
-
* | `!<empty> $void` | Value is not empty | `notes !<empty> $void` |
|
|
36
|
-
*
|
|
37
|
-
* ## Value Types
|
|
38
|
-
* - **String literals**: `'value'` (single quotes required)
|
|
39
|
-
* - **Attribute references**: `status`, `score` (no quotes)
|
|
40
|
-
* - **Arrays**: `['A', 'B', 'C']`
|
|
41
|
-
* - **Variables**: `$today`, `$daysAgo:5`
|
|
42
|
-
* - **Page/group variables**: `'@{page.fieldName}'` (quoted)
|
|
43
|
-
*
|
|
44
|
-
* ## Time Variables
|
|
45
|
-
* - `$today`, `$todayTimestamp`, `$todayUnixTimestamp`
|
|
46
|
-
* - `$startOfMonth`, `$endOfMonth`
|
|
47
|
-
* - `$yearsAgo:N`, `$monthsAgo:N`, `$weeksAgo:N`, `$daysAgo:N`, `$hoursAgo:N`, `$minutesAgo:N`, `$secondsAgo:N`
|
|
48
|
-
* - `$yearsAhead:N`, `$monthsAhead:N`, `$weeksAhead:N`, `$daysAhead:N`, `$hoursAhead:N`, `$minutesAhead:N`, `$secondsAhead:N`
|
|
49
|
-
*
|
|
50
|
-
* ## Examples
|
|
51
|
-
* ```typescript
|
|
52
|
-
* // Simple comparison
|
|
53
|
-
* "status = 'active'"
|
|
54
|
-
*
|
|
55
|
-
* // Case-insensitive
|
|
56
|
-
* "role ~ 'ADMIN'"
|
|
57
|
-
*
|
|
58
|
-
* // Contains
|
|
59
|
-
* "notes <> 'important'"
|
|
60
|
-
*
|
|
61
|
-
* // Array contains
|
|
62
|
-
* "['pending', 'active'] <> status"
|
|
63
|
-
*
|
|
64
|
-
* // Not empty
|
|
65
|
-
* "notes !<empty> $void"
|
|
66
|
-
*
|
|
67
|
-
* // Compound with AND/OR
|
|
68
|
-
* "(status = 'active') AND (priority = 'high')"
|
|
69
|
-
* "(status = 'active') AND ((score > '90') OR (grade = 'A'))"
|
|
70
|
-
*
|
|
71
|
-
* // Time-based
|
|
72
|
-
* "createdAt > $daysAgo:30"
|
|
73
|
-
*
|
|
74
|
-
* // Boolean
|
|
75
|
-
* "enabled = boolean:true"
|
|
76
|
-
*
|
|
77
|
-
* // Page variables
|
|
78
|
-
* "category = '@{page.selectedCategory.value}'"
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
export type FilterExpression = string;
|