@twin.org/entity 0.0.3-next.3 → 0.0.3-next.30
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/README.md +1 -5
- package/dist/es/decorators/entityDecorator.js +2 -1
- package/dist/es/decorators/entityDecorator.js.map +1 -1
- package/dist/es/decorators/propertyDecorator.js +1 -0
- package/dist/es/decorators/propertyDecorator.js.map +1 -1
- package/dist/es/utils/decoratorHelper.js +1 -0
- package/dist/es/utils/decoratorHelper.js.map +1 -1
- package/dist/es/utils/entityConditions.js +8 -0
- package/dist/es/utils/entityConditions.js.map +1 -1
- package/dist/types/decorators/entityDecorator.d.ts +1 -0
- package/dist/types/decorators/propertyDecorator.d.ts +1 -0
- package/dist/types/utils/decoratorHelper.d.ts +1 -0
- package/docs/changelog.md +529 -1
- package/docs/examples.md +70 -1
- package/docs/reference/classes/DecoratorHelper.md +2 -2
- package/docs/reference/classes/EntityConditions.md +2 -2
- package/docs/reference/classes/EntitySchemaHelper.md +6 -6
- package/docs/reference/classes/EntitySorter.md +4 -4
- package/docs/reference/interfaces/IComparator.md +3 -3
- package/docs/reference/interfaces/IComparatorGroup.md +3 -3
- package/docs/reference/interfaces/IEntitySchema.md +5 -5
- package/docs/reference/interfaces/IEntitySchemaOptions.md +2 -2
- package/docs/reference/interfaces/IEntitySchemaProperty.md +20 -20
- package/docs/reference/interfaces/IEntitySort.md +3 -3
- package/docs/reference/variables/ComparisonOperator.md +9 -9
- package/docs/reference/variables/EntitySchemaPropertyFormat.md +17 -17
- package/docs/reference/variables/EntitySchemaPropertyType.md +6 -6
- package/docs/reference/variables/LogicalOperator.md +2 -2
- package/docs/reference/variables/SortDirection.md +2 -2
- package/package.json +5 -4
package/docs/changelog.md
CHANGED
|
@@ -1,4 +1,532 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.0.3-next.30](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.29...entity-v0.0.3-next.30) (2026-04-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **entity:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/nameof bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
16
|
+
* @twin.org/core bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
17
|
+
* devDependencies
|
|
18
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
19
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
20
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
21
|
+
|
|
22
|
+
## [0.0.3-next.29](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.28...entity-v0.0.3-next.29) (2026-04-14)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Chores
|
|
26
|
+
|
|
27
|
+
* **entity:** Synchronize repo versions
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* @twin.org/nameof bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
35
|
+
* @twin.org/core bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
36
|
+
* devDependencies
|
|
37
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
38
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
39
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
40
|
+
|
|
41
|
+
## [0.0.3-next.28](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.27...entity-v0.0.3-next.28) (2026-03-27)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* update copyright year ([#260](https://github.com/twinfoundation/framework/issues/260)) ([c4ad930](https://github.com/twinfoundation/framework/commit/c4ad930fcc84ba6b5447a8074574329870b4c3f5))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Dependencies
|
|
50
|
+
|
|
51
|
+
* The following workspace dependencies were updated
|
|
52
|
+
* dependencies
|
|
53
|
+
* @twin.org/nameof bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
54
|
+
* @twin.org/core bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
55
|
+
* devDependencies
|
|
56
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
57
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
58
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
59
|
+
|
|
60
|
+
## [0.0.3-next.27](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.26...entity-v0.0.3-next.27) (2026-03-27)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Miscellaneous Chores
|
|
64
|
+
|
|
65
|
+
* **entity:** Synchronize repo versions
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Dependencies
|
|
69
|
+
|
|
70
|
+
* The following workspace dependencies were updated
|
|
71
|
+
* dependencies
|
|
72
|
+
* @twin.org/nameof bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
73
|
+
* @twin.org/core bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
74
|
+
* devDependencies
|
|
75
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
76
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
77
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
78
|
+
|
|
79
|
+
## [0.0.3-next.26](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.25...entity-v0.0.3-next.26) (2026-03-24)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### Miscellaneous Chores
|
|
83
|
+
|
|
84
|
+
* **entity:** Synchronize repo versions
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Dependencies
|
|
88
|
+
|
|
89
|
+
* The following workspace dependencies were updated
|
|
90
|
+
* dependencies
|
|
91
|
+
* @twin.org/nameof bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
92
|
+
* @twin.org/core bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
93
|
+
* devDependencies
|
|
94
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
95
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
96
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
97
|
+
|
|
98
|
+
## [0.0.3-next.25](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.24...entity-v0.0.3-next.25) (2026-03-23)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Miscellaneous Chores
|
|
102
|
+
|
|
103
|
+
* **entity:** Synchronize repo versions
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Dependencies
|
|
107
|
+
|
|
108
|
+
* The following workspace dependencies were updated
|
|
109
|
+
* dependencies
|
|
110
|
+
* @twin.org/nameof bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
111
|
+
* @twin.org/core bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
112
|
+
* devDependencies
|
|
113
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
114
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
115
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
116
|
+
|
|
117
|
+
## [0.0.3-next.24](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.23...entity-v0.0.3-next.24) (2026-03-19)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Bug Fixes
|
|
121
|
+
|
|
122
|
+
* ensure __decorate is defined for decorators ([103a563](https://github.com/twinfoundation/framework/commit/103a563ce01ebdef6240d2e590e7b026e8692684))
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### Dependencies
|
|
126
|
+
|
|
127
|
+
* The following workspace dependencies were updated
|
|
128
|
+
* dependencies
|
|
129
|
+
* @twin.org/nameof bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
130
|
+
* @twin.org/core bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
131
|
+
* devDependencies
|
|
132
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
133
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
134
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
135
|
+
|
|
136
|
+
## [0.0.3-next.23](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.22...entity-v0.0.3-next.23) (2026-03-17)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Miscellaneous Chores
|
|
140
|
+
|
|
141
|
+
* **entity:** Synchronize repo versions
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### Dependencies
|
|
145
|
+
|
|
146
|
+
* The following workspace dependencies were updated
|
|
147
|
+
* dependencies
|
|
148
|
+
* @twin.org/nameof bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
149
|
+
* @twin.org/core bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
150
|
+
* devDependencies
|
|
151
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
152
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
153
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
154
|
+
|
|
155
|
+
## [0.0.3-next.22](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.21...entity-v0.0.3-next.22) (2026-02-26)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Miscellaneous Chores
|
|
159
|
+
|
|
160
|
+
* **entity:** Synchronize repo versions
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Dependencies
|
|
164
|
+
|
|
165
|
+
* The following workspace dependencies were updated
|
|
166
|
+
* dependencies
|
|
167
|
+
* @twin.org/nameof bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
168
|
+
* @twin.org/core bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
169
|
+
* devDependencies
|
|
170
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
171
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
172
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
173
|
+
|
|
174
|
+
## [0.0.3-next.21](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.20...entity-v0.0.3-next.21) (2026-02-26)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### Features
|
|
178
|
+
|
|
179
|
+
* add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
180
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
181
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
182
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
183
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
184
|
+
* support for object comparisons in entity conditions ([edae91d](https://github.com/twinfoundation/framework/commit/edae91d3205524080188a35e0ab04da036fa4f39))
|
|
185
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
186
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
187
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Dependencies
|
|
191
|
+
|
|
192
|
+
* The following workspace dependencies were updated
|
|
193
|
+
* dependencies
|
|
194
|
+
* @twin.org/nameof bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
195
|
+
* @twin.org/core bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
196
|
+
* devDependencies
|
|
197
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
198
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
199
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
200
|
+
|
|
201
|
+
## [0.0.3-next.20](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.19...entity-v0.0.3-next.20) (2026-02-26)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### Miscellaneous Chores
|
|
205
|
+
|
|
206
|
+
* **entity:** Synchronize repo versions
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Dependencies
|
|
210
|
+
|
|
211
|
+
* The following workspace dependencies were updated
|
|
212
|
+
* dependencies
|
|
213
|
+
* @twin.org/nameof bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
214
|
+
* @twin.org/core bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
215
|
+
* devDependencies
|
|
216
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
217
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
218
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
219
|
+
|
|
220
|
+
## [0.0.3-next.19](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.18...entity-v0.0.3-next.19) (2026-02-26)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### Miscellaneous Chores
|
|
224
|
+
|
|
225
|
+
* **entity:** Synchronize repo versions
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### Dependencies
|
|
229
|
+
|
|
230
|
+
* The following workspace dependencies were updated
|
|
231
|
+
* dependencies
|
|
232
|
+
* @twin.org/nameof bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
233
|
+
* @twin.org/core bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
234
|
+
* devDependencies
|
|
235
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
236
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
237
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
238
|
+
|
|
239
|
+
## [0.0.3-next.18](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.17...entity-v0.0.3-next.18) (2026-02-23)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
### Miscellaneous Chores
|
|
243
|
+
|
|
244
|
+
* **entity:** Synchronize repo versions
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
### Dependencies
|
|
248
|
+
|
|
249
|
+
* The following workspace dependencies were updated
|
|
250
|
+
* dependencies
|
|
251
|
+
* @twin.org/nameof bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
252
|
+
* @twin.org/core bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
253
|
+
* devDependencies
|
|
254
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
255
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
256
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
257
|
+
|
|
258
|
+
## [0.0.3-next.17](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.16...entity-v0.0.3-next.17) (2026-02-09)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Miscellaneous Chores
|
|
262
|
+
|
|
263
|
+
* **entity:** Synchronize repo versions
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
### Dependencies
|
|
267
|
+
|
|
268
|
+
* The following workspace dependencies were updated
|
|
269
|
+
* dependencies
|
|
270
|
+
* @twin.org/nameof bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
271
|
+
* @twin.org/core bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
272
|
+
* devDependencies
|
|
273
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
274
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
275
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
276
|
+
|
|
277
|
+
## [0.0.3-next.16](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.15...entity-v0.0.3-next.16) (2026-02-06)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
### Miscellaneous Chores
|
|
281
|
+
|
|
282
|
+
* **entity:** Synchronize repo versions
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
### Dependencies
|
|
286
|
+
|
|
287
|
+
* The following workspace dependencies were updated
|
|
288
|
+
* dependencies
|
|
289
|
+
* @twin.org/nameof bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
290
|
+
* @twin.org/core bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
291
|
+
* devDependencies
|
|
292
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
293
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
294
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
295
|
+
|
|
296
|
+
## [0.0.3-next.15](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.14...entity-v0.0.3-next.15) (2026-01-29)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
### Miscellaneous Chores
|
|
300
|
+
|
|
301
|
+
* **entity:** Synchronize repo versions
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
### Dependencies
|
|
305
|
+
|
|
306
|
+
* The following workspace dependencies were updated
|
|
307
|
+
* dependencies
|
|
308
|
+
* @twin.org/nameof bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
309
|
+
* @twin.org/core bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
310
|
+
* devDependencies
|
|
311
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
312
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
313
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
314
|
+
|
|
315
|
+
## [0.0.3-next.14](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.13...entity-v0.0.3-next.14) (2026-01-22)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
### Miscellaneous Chores
|
|
319
|
+
|
|
320
|
+
* **entity:** Synchronize repo versions
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
### Dependencies
|
|
324
|
+
|
|
325
|
+
* The following workspace dependencies were updated
|
|
326
|
+
* dependencies
|
|
327
|
+
* @twin.org/nameof bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
328
|
+
* @twin.org/core bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
329
|
+
* devDependencies
|
|
330
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
331
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
332
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
333
|
+
|
|
334
|
+
## [0.0.3-next.13](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.12...entity-v0.0.3-next.13) (2026-01-08)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
### Miscellaneous Chores
|
|
338
|
+
|
|
339
|
+
* **entity:** Synchronize repo versions
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
### Dependencies
|
|
343
|
+
|
|
344
|
+
* The following workspace dependencies were updated
|
|
345
|
+
* dependencies
|
|
346
|
+
* @twin.org/nameof bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
347
|
+
* @twin.org/core bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
348
|
+
* devDependencies
|
|
349
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
350
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
351
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
352
|
+
|
|
353
|
+
## [0.0.3-next.12](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.11...entity-v0.0.3-next.12) (2026-01-08)
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
### Miscellaneous Chores
|
|
357
|
+
|
|
358
|
+
* **entity:** Synchronize repo versions
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
### Dependencies
|
|
362
|
+
|
|
363
|
+
* The following workspace dependencies were updated
|
|
364
|
+
* dependencies
|
|
365
|
+
* @twin.org/nameof bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
366
|
+
* @twin.org/core bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
367
|
+
* devDependencies
|
|
368
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
369
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
370
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
371
|
+
|
|
372
|
+
## [0.0.3-next.11](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.10...entity-v0.0.3-next.11) (2026-01-07)
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
### Miscellaneous Chores
|
|
376
|
+
|
|
377
|
+
* **entity:** Synchronize repo versions
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
### Dependencies
|
|
381
|
+
|
|
382
|
+
* The following workspace dependencies were updated
|
|
383
|
+
* dependencies
|
|
384
|
+
* @twin.org/nameof bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
385
|
+
* @twin.org/core bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
386
|
+
* devDependencies
|
|
387
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
388
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
389
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
390
|
+
|
|
391
|
+
## [0.0.3-next.10](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.9...entity-v0.0.3-next.10) (2026-01-07)
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
### Miscellaneous Chores
|
|
395
|
+
|
|
396
|
+
* **entity:** Synchronize repo versions
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
### Dependencies
|
|
400
|
+
|
|
401
|
+
* The following workspace dependencies were updated
|
|
402
|
+
* dependencies
|
|
403
|
+
* @twin.org/nameof bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
404
|
+
* @twin.org/core bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
405
|
+
* devDependencies
|
|
406
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
407
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
408
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
409
|
+
|
|
410
|
+
## [0.0.3-next.9](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.8...entity-v0.0.3-next.9) (2026-01-05)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
### Miscellaneous Chores
|
|
414
|
+
|
|
415
|
+
* **entity:** Synchronize repo versions
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
### Dependencies
|
|
419
|
+
|
|
420
|
+
* The following workspace dependencies were updated
|
|
421
|
+
* dependencies
|
|
422
|
+
* @twin.org/nameof bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
423
|
+
* @twin.org/core bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
424
|
+
* devDependencies
|
|
425
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
426
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
427
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
428
|
+
|
|
429
|
+
## [0.0.3-next.8](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.7...entity-v0.0.3-next.8) (2025-11-26)
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
### Features
|
|
433
|
+
|
|
434
|
+
* support for object comparisons in entity conditions ([edae91d](https://github.com/twinfoundation/framework/commit/edae91d3205524080188a35e0ab04da036fa4f39))
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
### Dependencies
|
|
438
|
+
|
|
439
|
+
* The following workspace dependencies were updated
|
|
440
|
+
* dependencies
|
|
441
|
+
* @twin.org/nameof bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
442
|
+
* @twin.org/core bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
443
|
+
* devDependencies
|
|
444
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
445
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
446
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
447
|
+
|
|
448
|
+
## [0.0.3-next.7](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.6...entity-v0.0.3-next.7) (2025-11-25)
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
### Features
|
|
452
|
+
|
|
453
|
+
* add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
454
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
455
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
456
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
457
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
458
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
459
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
460
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
### Dependencies
|
|
464
|
+
|
|
465
|
+
* The following workspace dependencies were updated
|
|
466
|
+
* dependencies
|
|
467
|
+
* @twin.org/nameof bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
468
|
+
* @twin.org/core bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
469
|
+
* devDependencies
|
|
470
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
471
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
472
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
473
|
+
|
|
474
|
+
## [0.0.3-next.6](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.5...entity-v0.0.3-next.6) (2025-11-25)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
### Miscellaneous Chores
|
|
478
|
+
|
|
479
|
+
* **entity:** Synchronize repo versions
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
### Dependencies
|
|
483
|
+
|
|
484
|
+
* The following workspace dependencies were updated
|
|
485
|
+
* dependencies
|
|
486
|
+
* @twin.org/nameof bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
487
|
+
* @twin.org/core bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
488
|
+
* devDependencies
|
|
489
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
490
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
491
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
492
|
+
|
|
493
|
+
## [0.0.3-next.5](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.4...entity-v0.0.3-next.5) (2025-11-20)
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
### Miscellaneous Chores
|
|
497
|
+
|
|
498
|
+
* **entity:** Synchronize repo versions
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
### Dependencies
|
|
502
|
+
|
|
503
|
+
* The following workspace dependencies were updated
|
|
504
|
+
* dependencies
|
|
505
|
+
* @twin.org/nameof bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
506
|
+
* @twin.org/core bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
507
|
+
* devDependencies
|
|
508
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
509
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
510
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
511
|
+
|
|
512
|
+
## [0.0.3-next.4](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.3...entity-v0.0.3-next.4) (2025-11-13)
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
### Miscellaneous Chores
|
|
516
|
+
|
|
517
|
+
* **entity:** Synchronize repo versions
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
### Dependencies
|
|
521
|
+
|
|
522
|
+
* The following workspace dependencies were updated
|
|
523
|
+
* dependencies
|
|
524
|
+
* @twin.org/nameof bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
525
|
+
* @twin.org/core bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
526
|
+
* devDependencies
|
|
527
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
528
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
529
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
2
530
|
|
|
3
531
|
## [0.0.3-next.3](https://github.com/twinfoundation/framework/compare/entity-v0.0.3-next.2...entity-v0.0.3-next.3) (2025-11-12)
|
|
4
532
|
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Entity Examples
|
|
2
|
+
|
|
3
|
+
Use these snippets to build schemas, compose conditions and order data for query-style workflows.
|
|
4
|
+
|
|
5
|
+
## EntitySchemaHelper
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { EntitySchemaHelper } from '@twin.org/entity';
|
|
9
|
+
|
|
10
|
+
class Product {
|
|
11
|
+
public id!: string;
|
|
12
|
+
public sku!: string;
|
|
13
|
+
public price!: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const schema = EntitySchemaHelper.getSchema(Product);
|
|
17
|
+
EntitySchemaHelper.getPrimaryKey(schema); // 'id'
|
|
18
|
+
EntitySchemaHelper.getSortProperties(schema); // ['sku', 'price']
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## EntityConditions
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { EntityConditions } from '@twin.org/entity';
|
|
25
|
+
|
|
26
|
+
const product = {
|
|
27
|
+
sku: 'A-100',
|
|
28
|
+
price: 49.99,
|
|
29
|
+
active: true
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
EntityConditions.compare('eq', product.sku, 'A-100'); // true
|
|
33
|
+
EntityConditions.check(product, [{ property: 'price', comparison: 'gt', value: 10 }]); // true
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## EntitySorter
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { EntitySorter } from '@twin.org/entity';
|
|
40
|
+
|
|
41
|
+
const records = [
|
|
42
|
+
{ sku: 'A-300', price: 15 },
|
|
43
|
+
{ sku: 'A-100', price: 20 },
|
|
44
|
+
{ sku: 'A-200', price: 10 }
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
EntitySorter.sort(records, [{ property: 'sku', sortDirection: 'ascending' }]);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## DecoratorHelper
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
import { DecoratorHelper } from '@twin.org/entity';
|
|
54
|
+
|
|
55
|
+
class Customer {
|
|
56
|
+
public id!: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
DecoratorHelper.setSchema(Customer, {
|
|
60
|
+
primaryKey: 'id',
|
|
61
|
+
type: 'customer',
|
|
62
|
+
properties: {
|
|
63
|
+
id: {
|
|
64
|
+
type: 'string'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
DecoratorHelper.getSchema(Customer)?.primaryKey; // 'id'
|
|
70
|
+
```
|
|
@@ -14,7 +14,7 @@ Class to help with decorators.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### getSchema()
|
|
17
|
+
### getSchema() {#getschema}
|
|
18
18
|
|
|
19
19
|
> `static` **getSchema**\<`T`\>(`target`): [`IEntitySchema`](../interfaces/IEntitySchema.md)\<`T`\>
|
|
20
20
|
|
|
@@ -42,7 +42,7 @@ The schema from the metadata if it can be found.
|
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
45
|
-
### setSchema()
|
|
45
|
+
### setSchema() {#setschema}
|
|
46
46
|
|
|
47
47
|
> `static` **setSchema**\<`T`\>(`target`, `entitySchema`): `void`
|
|
48
48
|
|
|
@@ -14,7 +14,7 @@ Class to perform condition checks.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### check()
|
|
17
|
+
### check() {#check}
|
|
18
18
|
|
|
19
19
|
> `static` **check**\<`T`\>(`entity`, `condition?`): `boolean`
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ True if the entity matches.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### compare()
|
|
51
|
+
### compare() {#compare}
|
|
52
52
|
|
|
53
53
|
> `static` **compare**\<`T`\>(`entity`, `comparator`): `boolean`
|
|
54
54
|
|
|
@@ -14,7 +14,7 @@ Class to help with entity schema operations.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### CLASS\_NAME
|
|
17
|
+
### CLASS\_NAME {#class_name}
|
|
18
18
|
|
|
19
19
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Runtime name for the class.
|
|
|
22
22
|
|
|
23
23
|
## Methods
|
|
24
24
|
|
|
25
|
-
### getSchema()
|
|
25
|
+
### getSchema() {#getschema}
|
|
26
26
|
|
|
27
27
|
> `static` **getSchema**\<`T`\>(`target`): [`IEntitySchema`](../interfaces/IEntitySchema.md)\<`T`\>
|
|
28
28
|
|
|
@@ -50,7 +50,7 @@ The schema for the object if it can be found.
|
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
|
-
### getPrimaryKey()
|
|
53
|
+
### getPrimaryKey() {#getprimarykey}
|
|
54
54
|
|
|
55
55
|
> `static` **getPrimaryKey**\<`T`\>(`entitySchema`): [`IEntitySchemaProperty`](../interfaces/IEntitySchemaProperty.md)\<`T`\>
|
|
56
56
|
|
|
@@ -82,7 +82,7 @@ If no primary key was found, or more than one.
|
|
|
82
82
|
|
|
83
83
|
***
|
|
84
84
|
|
|
85
|
-
### getSortProperties()
|
|
85
|
+
### getSortProperties() {#getsortproperties}
|
|
86
86
|
|
|
87
87
|
> `static` **getSortProperties**\<`T`\>(`entitySchema`): [`IEntitySort`](../interfaces/IEntitySort.md)\<`T`\>[] \| `undefined`
|
|
88
88
|
|
|
@@ -110,7 +110,7 @@ The sort keys from the schema or undefined if there are none.
|
|
|
110
110
|
|
|
111
111
|
***
|
|
112
112
|
|
|
113
|
-
### buildSortProperties()
|
|
113
|
+
### buildSortProperties() {#buildsortproperties}
|
|
114
114
|
|
|
115
115
|
> `static` **buildSortProperties**\<`T`\>(`entitySchema`, `overrideSortKeys?`): [`IEntitySort`](../interfaces/IEntitySort.md)\<`T`\>[] \| `undefined`
|
|
116
116
|
|
|
@@ -144,7 +144,7 @@ The finalised sort keys.
|
|
|
144
144
|
|
|
145
145
|
***
|
|
146
146
|
|
|
147
|
-
### validateEntity()
|
|
147
|
+
### validateEntity() {#validateentity}
|
|
148
148
|
|
|
149
149
|
> `static` **validateEntity**\<`T`\>(`entity`, `entitySchema`): `void`
|
|
150
150
|
|