@twin.org/entity-storage-models 0.0.3-next.2 → 0.0.3-next.21

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.
Files changed (63) hide show
  1. package/README.md +2 -2
  2. package/dist/es/helpers/entityStorageHelper.js +85 -0
  3. package/dist/es/helpers/entityStorageHelper.js.map +1 -0
  4. package/dist/es/helpers/migrationHelper.js +220 -0
  5. package/dist/es/helpers/migrationHelper.js.map +1 -0
  6. package/dist/es/index.js +9 -0
  7. package/dist/es/index.js.map +1 -1
  8. package/dist/es/models/IEntityStorageComponent.js.map +1 -1
  9. package/dist/es/models/IEntityStorageConnector.js.map +1 -1
  10. package/dist/es/models/IEntityStorageMigrationConnector.js +2 -0
  11. package/dist/es/models/IEntityStorageMigrationConnector.js.map +1 -0
  12. package/dist/es/models/IMigrationOptions.js +4 -0
  13. package/dist/es/models/IMigrationOptions.js.map +1 -0
  14. package/dist/es/models/api/IEntityStorageCountRequest.js +4 -0
  15. package/dist/es/models/api/IEntityStorageCountRequest.js.map +1 -0
  16. package/dist/es/models/api/IEntityStorageCountResponse.js +4 -0
  17. package/dist/es/models/api/IEntityStorageCountResponse.js.map +1 -0
  18. package/dist/es/models/api/IEntityStorageEmptyRequest.js +4 -0
  19. package/dist/es/models/api/IEntityStorageEmptyRequest.js.map +1 -0
  20. package/dist/es/models/api/IEntityStorageGetRequest.js.map +1 -1
  21. package/dist/es/models/api/IEntityStorageRemoveBatchRequest.js +4 -0
  22. package/dist/es/models/api/IEntityStorageRemoveBatchRequest.js.map +1 -0
  23. package/dist/es/models/api/IEntityStorageRemoveRequest.js.map +1 -1
  24. package/dist/es/models/api/IEntityStorageSetBatchRequest.js +4 -0
  25. package/dist/es/models/api/IEntityStorageSetBatchRequest.js.map +1 -0
  26. package/dist/es/models/api/IEntityStorageSetRequest.js.map +1 -1
  27. package/dist/types/helpers/entityStorageHelper.d.ts +40 -0
  28. package/dist/types/helpers/migrationHelper.d.ts +61 -0
  29. package/dist/types/index.d.ts +9 -0
  30. package/dist/types/models/IEntityStorageComponent.d.ts +38 -3
  31. package/dist/types/models/IEntityStorageConnector.d.ts +23 -0
  32. package/dist/types/models/IEntityStorageMigrationConnector.d.ts +35 -0
  33. package/dist/types/models/IMigrationOptions.d.ts +32 -0
  34. package/dist/types/models/api/IEntityStorageCountRequest.d.ts +14 -0
  35. package/dist/types/models/api/IEntityStorageCountResponse.d.ts +14 -0
  36. package/dist/types/models/api/IEntityStorageEmptyRequest.d.ts +5 -0
  37. package/dist/types/models/api/IEntityStorageGetRequest.d.ts +4 -0
  38. package/dist/types/models/api/IEntityStorageRemoveBatchRequest.d.ts +9 -0
  39. package/dist/types/models/api/IEntityStorageRemoveRequest.d.ts +9 -0
  40. package/dist/types/models/api/IEntityStorageSetBatchRequest.d.ts +9 -0
  41. package/dist/types/models/api/IEntityStorageSetRequest.d.ts +9 -0
  42. package/docs/changelog.md +224 -43
  43. package/docs/examples.md +87 -1
  44. package/docs/reference/classes/EntityStorageHelper.md +135 -0
  45. package/docs/reference/classes/MigrationHelper.md +247 -0
  46. package/docs/reference/index.md +12 -0
  47. package/docs/reference/interfaces/IEntityStorageComponent.md +105 -7
  48. package/docs/reference/interfaces/IEntityStorageConnector.md +89 -5
  49. package/docs/reference/interfaces/IEntityStorageCountRequest.md +17 -0
  50. package/docs/reference/interfaces/IEntityStorageCountResponse.md +17 -0
  51. package/docs/reference/interfaces/IEntityStorageEmptyRequest.md +3 -0
  52. package/docs/reference/interfaces/IEntityStorageGetRequest.md +10 -4
  53. package/docs/reference/interfaces/IEntityStorageGetResponse.md +1 -1
  54. package/docs/reference/interfaces/IEntityStorageListRequest.md +8 -8
  55. package/docs/reference/interfaces/IEntityStorageListResponse.md +2 -2
  56. package/docs/reference/interfaces/IEntityStorageMigrationConnector.md +402 -0
  57. package/docs/reference/interfaces/IEntityStorageRemoveBatchRequest.md +11 -0
  58. package/docs/reference/interfaces/IEntityStorageRemoveRequest.md +15 -1
  59. package/docs/reference/interfaces/IEntityStorageSetBatchRequest.md +11 -0
  60. package/docs/reference/interfaces/IEntityStorageSetRequest.md +15 -1
  61. package/docs/reference/interfaces/IMigrationOptions.md +119 -0
  62. package/locales/en.json +7 -1
  63. package/package.json +5 -4
package/docs/changelog.md CHANGED
@@ -1,152 +1,333 @@
1
- # @twin.org/entity-storage-models - Changelog
1
+ # Changelog
2
2
 
3
- ## [0.0.3-next.2](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.3-next.1...entity-storage-models-v0.0.3-next.2) (2025-11-13)
3
+ ## [0.0.3-next.21](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.20...entity-storage-models-v0.0.3-next.21) (2026-06-01)
4
4
 
5
5
 
6
6
  ### Miscellaneous Chores
7
7
 
8
8
  * **entity-storage-models:** Synchronize repo versions
9
9
 
10
- ## [0.0.3-next.1](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.3-next.0...entity-storage-models-v0.0.3-next.1) (2025-11-10)
10
+ ## [0.0.3-next.20](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.19...entity-storage-models-v0.0.3-next.20) (2026-06-01)
11
11
 
12
12
 
13
13
  ### Features
14
14
 
15
- * add context id features ([#55](https://github.com/twinfoundation/entity-storage/issues/55)) ([99c15a2](https://github.com/twinfoundation/entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
16
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
17
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
18
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
19
- * remove includeNodeIdentity flag ([d88d1d0](https://github.com/twinfoundation/entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
20
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
21
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
22
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
15
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
16
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
17
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
18
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
19
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
20
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
21
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
22
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
23
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
24
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
25
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
23
26
 
24
27
 
25
28
  ### Bug Fixes
26
29
 
27
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
30
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
31
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
28
32
 
29
- ## [0.0.2-next.10](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.9...entity-storage-models-v0.0.2-next.10) (2025-10-09)
33
+ ## [0.0.3-next.19](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.18...entity-storage-models-v0.0.3-next.19) (2026-06-01)
30
34
 
31
35
 
32
36
  ### Features
33
37
 
34
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
38
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
39
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
40
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
41
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
42
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
43
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
44
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
45
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
46
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
47
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
48
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
35
49
 
36
- ## [0.0.2-next.9](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.8...entity-storage-models-v0.0.2-next.9) (2025-10-02)
50
+
51
+ ### Bug Fixes
52
+
53
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
54
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
55
+
56
+ ## [0.0.3-next.18](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.17...entity-storage-models-v0.0.3-next.18) (2026-06-01)
57
+
58
+
59
+ ### Features
60
+
61
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
62
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
63
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
64
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
65
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
66
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
67
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
68
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
69
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
70
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
71
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
77
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
78
+
79
+ ## [0.0.3-next.17](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.16...entity-storage-models-v0.0.3-next.17) (2026-06-01)
80
+
81
+
82
+ ### Bug Fixes
83
+
84
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
85
+
86
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.15...entity-storage-models-v0.0.3-next.16) (2026-05-20)
87
+
88
+
89
+ ### Miscellaneous Chores
90
+
91
+ * **entity-storage-models:** Synchronize repo versions
92
+
93
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.14...entity-storage-models-v0.0.3-next.15) (2026-05-19)
94
+
95
+
96
+ ### Miscellaneous Chores
97
+
98
+ * **entity-storage-models:** Synchronize repo versions
99
+
100
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.13...entity-storage-models-v0.0.3-next.14) (2026-05-19)
101
+
102
+
103
+ ### Features
104
+
105
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
106
+
107
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.12...entity-storage-models-v0.0.3-next.13) (2026-05-13)
108
+
109
+
110
+ ### Miscellaneous Chores
111
+
112
+ * **entity-storage-models:** Synchronize repo versions
113
+
114
+ ## [0.0.3-next.12](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.11...entity-storage-models-v0.0.3-next.12) (2026-05-11)
115
+
116
+
117
+ ### Features
118
+
119
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
120
+
121
+ ## [0.0.3-next.11](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.10...entity-storage-models-v0.0.3-next.11) (2026-05-07)
122
+
123
+
124
+ ### Miscellaneous Chores
125
+
126
+ * **entity-storage-models:** Synchronize repo versions
127
+
128
+ ## [0.0.3-next.10](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.9...entity-storage-models-v0.0.3-next.10) (2026-05-07)
129
+
130
+
131
+ ### Features
132
+
133
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
134
+
135
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.8...entity-storage-models-v0.0.3-next.9) (2026-04-22)
136
+
137
+
138
+ ### Miscellaneous Chores
139
+
140
+ * **entity-storage-models:** Synchronize repo versions
141
+
142
+ ## [0.0.3-next.8](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.7...entity-storage-models-v0.0.3-next.8) (2026-03-20)
143
+
144
+
145
+ ### Miscellaneous Chores
146
+
147
+ * **entity-storage-models:** Synchronize repo versions
148
+
149
+ ## [0.0.3-next.7](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.6...entity-storage-models-v0.0.3-next.7) (2026-03-13)
150
+
151
+
152
+ ### Miscellaneous Chores
153
+
154
+ * **entity-storage-models:** Synchronize repo versions
155
+
156
+ ## [0.0.3-next.6](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.5...entity-storage-models-v0.0.3-next.6) (2026-01-21)
157
+
158
+
159
+ ### Miscellaneous Chores
160
+
161
+ * **entity-storage-models:** Synchronize repo versions
162
+
163
+ ## [0.0.3-next.5](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.4...entity-storage-models-v0.0.3-next.5) (2026-01-06)
164
+
165
+
166
+ ### Miscellaneous Chores
167
+
168
+ * **entity-storage-models:** Synchronize repo versions
169
+
170
+ ## [0.0.3-next.4](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.3...entity-storage-models-v0.0.3-next.4) (2025-12-03)
171
+
172
+
173
+ ### Miscellaneous Chores
174
+
175
+ * **entity-storage-models:** Synchronize repo versions
176
+
177
+ ## [0.0.3-next.3](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.2...entity-storage-models-v0.0.3-next.3) (2025-11-26)
178
+
179
+
180
+ ### Miscellaneous Chores
181
+
182
+ * **entity-storage-models:** Synchronize repo versions
183
+
184
+ ## [0.0.3-next.2](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.1...entity-storage-models-v0.0.3-next.2) (2025-11-13)
185
+
186
+
187
+ ### Miscellaneous Chores
188
+
189
+ * **entity-storage-models:** Synchronize repo versions
190
+
191
+ ## [0.0.3-next.1](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.3-next.0...entity-storage-models-v0.0.3-next.1) (2025-11-10)
192
+
193
+
194
+ ### Features
195
+
196
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
197
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
198
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
199
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
200
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
201
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
202
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
203
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
204
+
205
+
206
+ ### Bug Fixes
207
+
208
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
209
+
210
+ ## [0.0.2-next.10](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.9...entity-storage-models-v0.0.2-next.10) (2025-10-09)
211
+
212
+
213
+ ### Features
214
+
215
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
216
+
217
+ ## [0.0.2-next.9](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.8...entity-storage-models-v0.0.2-next.9) (2025-10-02)
37
218
 
38
219
 
39
220
  ### Miscellaneous Chores
40
221
 
41
222
  * **entity-storage-models:** Synchronize repo versions
42
223
 
43
- ## [0.0.2-next.8](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.7...entity-storage-models-v0.0.2-next.8) (2025-08-29)
224
+ ## [0.0.2-next.8](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.7...entity-storage-models-v0.0.2-next.8) (2025-08-29)
44
225
 
45
226
 
46
227
  ### Features
47
228
 
48
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
229
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
49
230
 
50
- ## [0.0.2-next.7](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.6...entity-storage-models-v0.0.2-next.7) (2025-08-20)
231
+ ## [0.0.2-next.7](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.6...entity-storage-models-v0.0.2-next.7) (2025-08-20)
51
232
 
52
233
 
53
234
  ### Miscellaneous Chores
54
235
 
55
236
  * **entity-storage-models:** Synchronize repo versions
56
237
 
57
- ## [0.0.2-next.6](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.5...entity-storage-models-v0.0.2-next.6) (2025-08-19)
238
+ ## [0.0.2-next.6](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.5...entity-storage-models-v0.0.2-next.6) (2025-08-19)
58
239
 
59
240
 
60
241
  ### Features
61
242
 
62
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
243
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
63
244
 
64
- ## [0.0.2-next.5](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.4...entity-storage-models-v0.0.2-next.5) (2025-08-11)
245
+ ## [0.0.2-next.5](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.4...entity-storage-models-v0.0.2-next.5) (2025-08-11)
65
246
 
66
247
 
67
248
  ### Miscellaneous Chores
68
249
 
69
250
  * **entity-storage-models:** Synchronize repo versions
70
251
 
71
- ## [0.0.2-next.4](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.3...entity-storage-models-v0.0.2-next.4) (2025-08-08)
252
+ ## [0.0.2-next.4](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.3...entity-storage-models-v0.0.2-next.4) (2025-08-08)
72
253
 
73
254
 
74
255
  ### Miscellaneous Chores
75
256
 
76
257
  * **entity-storage-models:** Synchronize repo versions
77
258
 
78
- ## [0.0.2-next.3](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.2...entity-storage-models-v0.0.2-next.3) (2025-07-25)
259
+ ## [0.0.2-next.3](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.2...entity-storage-models-v0.0.2-next.3) (2025-07-25)
79
260
 
80
261
 
81
262
  ### Miscellaneous Chores
82
263
 
83
264
  * **entity-storage-models:** Synchronize repo versions
84
265
 
85
- ## [0.0.2-next.2](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.1...entity-storage-models-v0.0.2-next.2) (2025-07-24)
266
+ ## [0.0.2-next.2](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.1...entity-storage-models-v0.0.2-next.2) (2025-07-24)
86
267
 
87
268
 
88
269
  ### Features
89
270
 
90
- * remove includeNodeIdentity flag ([d88d1d0](https://github.com/twinfoundation/entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
271
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
91
272
 
92
- ## [0.0.2-next.1](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.2-next.0...entity-storage-models-v0.0.2-next.1) (2025-07-17)
273
+ ## [0.0.2-next.1](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.2-next.0...entity-storage-models-v0.0.2-next.1) (2025-07-17)
93
274
 
94
275
 
95
276
  ### Features
96
277
 
97
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
98
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
99
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
278
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
279
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
280
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
100
281
 
101
282
 
102
283
  ### Bug Fixes
103
284
 
104
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
285
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
105
286
 
106
287
  ## 0.0.1 (2025-07-04)
107
288
 
108
289
 
109
290
  ### Features
110
291
 
111
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
112
- * release to production ([a309051](https://github.com/twinfoundation/entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
113
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
114
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
292
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
293
+ * release to production ([a309051](https://github.com/iotaledger/twin-entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
294
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
295
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
115
296
 
116
297
 
117
298
  ### Bug Fixes
118
299
 
119
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
300
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
120
301
 
121
- ## [0.0.1-next.31](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.1-next.30...entity-storage-models-v0.0.1-next.31) (2025-06-20)
302
+ ## [0.0.1-next.31](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.1-next.30...entity-storage-models-v0.0.1-next.31) (2025-06-20)
122
303
 
123
304
 
124
305
  ### Bug Fixes
125
306
 
126
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
307
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
127
308
 
128
- ## [0.0.1-next.30](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.1-next.29...entity-storage-models-v0.0.1-next.30) (2025-06-12)
309
+ ## [0.0.1-next.30](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.1-next.29...entity-storage-models-v0.0.1-next.30) (2025-06-12)
129
310
 
130
311
 
131
312
  ### Features
132
313
 
133
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
314
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
134
315
 
135
- ## [0.0.1-next.29](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.1-next.28...entity-storage-models-v0.0.1-next.29) (2025-04-17)
316
+ ## [0.0.1-next.29](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.1-next.28...entity-storage-models-v0.0.1-next.29) (2025-04-17)
136
317
 
137
318
 
138
319
  ### Features
139
320
 
140
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
321
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
141
322
 
142
- ## [0.0.1-next.28](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.1-next.27...entity-storage-models-v0.0.1-next.28) (2025-04-09)
323
+ ## [0.0.1-next.28](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.1-next.27...entity-storage-models-v0.0.1-next.28) (2025-04-09)
143
324
 
144
325
 
145
326
  ### Miscellaneous Chores
146
327
 
147
328
  * **entity-storage-models:** Synchronize repo versions
148
329
 
149
- ## [0.0.1-next.27](https://github.com/twinfoundation/entity-storage/compare/entity-storage-models-v0.0.1-next.26...entity-storage-models-v0.0.1-next.27) (2025-03-28)
330
+ ## [0.0.1-next.27](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-models-v0.0.1-next.26...entity-storage-models-v0.0.1-next.27) (2025-03-28)
150
331
 
151
332
 
152
333
  ### Miscellaneous Chores
package/docs/examples.md CHANGED
@@ -1 +1,87 @@
1
- # @twin.org/entity-storage-models - Examples
1
+ # Entity Storage Models Examples
2
+
3
+ These examples focus on wiring connectors through the shared factory and shaping typed API request and response contracts.
4
+
5
+ ## EntityStorageConnectorFactory
6
+
7
+ ```typescript
8
+ import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
9
+ import { MemoryEntityStorageConnector } from '@twin.org/entity-storage-connector-memory';
10
+
11
+ interface Profile {
12
+ id: string;
13
+ email: string;
14
+ status: 'active' | 'inactive';
15
+ createdAt: string;
16
+ }
17
+
18
+ EntityStorageConnectorFactory.register(
19
+ 'profile-storage',
20
+ () =>
21
+ new MemoryEntityStorageConnector<Profile>({
22
+ entitySchema: 'Profile'
23
+ })
24
+ );
25
+
26
+ const connector =
27
+ EntityStorageConnectorFactory.get<MemoryEntityStorageConnector<Profile>>('profile-storage');
28
+
29
+ await connector.set({
30
+ id: 'profile-1',
31
+ email: 'ada@example.com',
32
+ status: 'active',
33
+ createdAt: '2026-03-09T10:30:00.000Z'
34
+ });
35
+ ```
36
+
37
+ ```typescript
38
+ import type {
39
+ IEntityStorageGetRequest,
40
+ IEntityStorageGetResponse,
41
+ IEntityStorageListRequest,
42
+ IEntityStorageListResponse,
43
+ IEntityStorageRemoveRequest,
44
+ IEntityStorageSetRequest
45
+ } from '@twin.org/entity-storage-models';
46
+
47
+ interface Profile {
48
+ id: string;
49
+ email: string;
50
+ status: 'active' | 'inactive';
51
+ createdAt: string;
52
+ }
53
+
54
+ const setRequest: IEntityStorageSetRequest = {
55
+ body: {
56
+ id: 'profile-1',
57
+ email: 'ada@example.com',
58
+ status: 'active',
59
+ createdAt: '2026-03-09T10:30:00.000Z'
60
+ }
61
+ };
62
+
63
+ const getRequest: IEntityStorageGetRequest = {
64
+ pathParams: { id: 'profile-1' }
65
+ };
66
+
67
+ const listRequest: IEntityStorageListRequest = {
68
+ query: {
69
+ limit: '25'
70
+ }
71
+ };
72
+
73
+ const getResponse: IEntityStorageGetResponse = {
74
+ body: setRequest.body
75
+ };
76
+
77
+ const listResponse: IEntityStorageListResponse = {
78
+ body: {
79
+ entities: [setRequest.body],
80
+ cursor: 'next-page-token'
81
+ }
82
+ };
83
+
84
+ const removeRequest: IEntityStorageRemoveRequest = {
85
+ pathParams: { id: 'profile-1' }
86
+ };
87
+ ```
@@ -0,0 +1,135 @@
1
+ # Class: EntityStorageHelper
2
+
3
+ Helper class for performing schema migrations between two connectors.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new EntityStorageHelper**(): `EntityStorageHelper`
10
+
11
+ #### Returns
12
+
13
+ `EntityStorageHelper`
14
+
15
+ ## Properties
16
+
17
+ ### CLASS\_NAME {#class_name}
18
+
19
+ > `readonly` `static` **CLASS\_NAME**: `string`
20
+
21
+ Runtime name for the class.
22
+
23
+ ## Methods
24
+
25
+ ### prepareEntity() {#prepareentity}
26
+
27
+ > `static` **prepareEntity**\<`T`\>(`entity`, `schema`, `additionalProperties?`, `options?`): `T`
28
+
29
+ Prepare the entity by handling undefined and null values and validating it against the schema.
30
+
31
+ #### Type Parameters
32
+
33
+ ##### T
34
+
35
+ `T`
36
+
37
+ #### Parameters
38
+
39
+ ##### entity
40
+
41
+ `T`
42
+
43
+ The entity to handle undefined and null values for.
44
+
45
+ ##### schema
46
+
47
+ `IEntitySchema`\<`T`\>
48
+
49
+ The schema to validate the entity against.
50
+
51
+ ##### additionalProperties?
52
+
53
+ `object`[]
54
+
55
+ Optional list of additional properties to set on the entity.
56
+
57
+ ##### options?
58
+
59
+ Options controlling how null/undefined optional properties are stored.
60
+
61
+ ###### nullBehavior?
62
+
63
+ `"omit"` \| `"nullify"`
64
+
65
+ "omit" strips null/undefined optional properties before writing
66
+ (NoSQL — avoids index-key type errors). "nullify" converts undefined to null (SQL — the default).
67
+
68
+ #### Returns
69
+
70
+ `T`
71
+
72
+ The entity with undefined and null values handled.
73
+
74
+ ***
75
+
76
+ ### unPrepareEntity() {#unprepareentity}
77
+
78
+ > `static` **unPrepareEntity**\<`T`\>(`entity`, `removeProperties?`): `T`
79
+
80
+ Un-prepare the entity by removing null values.
81
+
82
+ #### Type Parameters
83
+
84
+ ##### T
85
+
86
+ `T`
87
+
88
+ #### Parameters
89
+
90
+ ##### entity
91
+
92
+ `Partial`\<`T`\> \| `undefined`
93
+
94
+ The entity to handle undefined and null values for.
95
+
96
+ ##### removeProperties?
97
+
98
+ `string`[]
99
+
100
+ Optional list of properties to remove from the entity.
101
+
102
+ #### Returns
103
+
104
+ `T`
105
+
106
+ The entity with undefined and null values handled.
107
+
108
+ ***
109
+
110
+ ### normalizeConditionValues() {#normalizeconditionvalues}
111
+
112
+ > `static` **normalizeConditionValues**\<`T`\>(`condition`): `EntityCondition`\<`T`\>
113
+
114
+ Deep-clone condition tree and normalise null/undefined to undefined on Equals/NotEquals leaves
115
+ so in-memory evaluation matches stored-absent semantics (optional absent props are omitted/undefined).
116
+
117
+ #### Type Parameters
118
+
119
+ ##### T
120
+
121
+ `T`
122
+
123
+ #### Parameters
124
+
125
+ ##### condition
126
+
127
+ `EntityCondition`\<`T`\>
128
+
129
+ The user-supplied condition (not mutated).
130
+
131
+ #### Returns
132
+
133
+ `EntityCondition`\<`T`\>
134
+
135
+ A clone safe to pass to check.