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

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 +217 -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,326 @@
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.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)
4
+
5
+
6
+ ### Features
7
+
8
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
9
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
10
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
11
+ * 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))
12
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
13
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
14
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
15
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
16
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
17
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
18
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
24
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
25
+
26
+ ## [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)
27
+
28
+
29
+ ### Features
30
+
31
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
32
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
33
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
34
+ * 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))
35
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
36
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
37
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
38
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
39
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
40
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
41
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
47
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
48
+
49
+ ## [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)
50
+
51
+
52
+ ### Features
53
+
54
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
55
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
56
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
57
+ * 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))
58
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
59
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
60
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
61
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
62
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
63
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
64
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
65
+
66
+
67
+ ### Bug Fixes
68
+
69
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
70
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
71
+
72
+ ## [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)
73
+
74
+
75
+ ### Bug Fixes
76
+
77
+ * null secondary indexes ([#103](https://github.com/iotaledger/twin-entity-storage/issues/103)) ([5e44f11](https://github.com/iotaledger/twin-entity-storage/commit/5e44f11bb5af5bf2c27d6f1d56aba5851116ff89))
78
+
79
+ ## [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)
80
+
81
+
82
+ ### Miscellaneous Chores
83
+
84
+ * **entity-storage-models:** Synchronize repo versions
85
+
86
+ ## [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)
87
+
88
+
89
+ ### Miscellaneous Chores
90
+
91
+ * **entity-storage-models:** Synchronize repo versions
92
+
93
+ ## [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)
94
+
95
+
96
+ ### Features
97
+
98
+ * 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))
99
+
100
+ ## [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)
101
+
102
+
103
+ ### Miscellaneous Chores
104
+
105
+ * **entity-storage-models:** Synchronize repo versions
106
+
107
+ ## [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)
108
+
109
+
110
+ ### Features
111
+
112
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
113
+
114
+ ## [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)
115
+
116
+
117
+ ### Miscellaneous Chores
118
+
119
+ * **entity-storage-models:** Synchronize repo versions
120
+
121
+ ## [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)
122
+
123
+
124
+ ### Features
125
+
126
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
127
+
128
+ ## [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)
129
+
130
+
131
+ ### Miscellaneous Chores
132
+
133
+ * **entity-storage-models:** Synchronize repo versions
134
+
135
+ ## [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)
136
+
137
+
138
+ ### Miscellaneous Chores
139
+
140
+ * **entity-storage-models:** Synchronize repo versions
141
+
142
+ ## [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)
143
+
144
+
145
+ ### Miscellaneous Chores
146
+
147
+ * **entity-storage-models:** Synchronize repo versions
148
+
149
+ ## [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)
150
+
151
+
152
+ ### Miscellaneous Chores
153
+
154
+ * **entity-storage-models:** Synchronize repo versions
155
+
156
+ ## [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)
157
+
158
+
159
+ ### Miscellaneous Chores
160
+
161
+ * **entity-storage-models:** Synchronize repo versions
162
+
163
+ ## [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)
164
+
165
+
166
+ ### Miscellaneous Chores
167
+
168
+ * **entity-storage-models:** Synchronize repo versions
169
+
170
+ ## [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)
171
+
172
+
173
+ ### Miscellaneous Chores
174
+
175
+ * **entity-storage-models:** Synchronize repo versions
176
+
177
+ ## [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)
4
178
 
5
179
 
6
180
  ### Miscellaneous Chores
7
181
 
8
182
  * **entity-storage-models:** Synchronize repo versions
9
183
 
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)
184
+ ## [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)
11
185
 
12
186
 
13
187
  ### Features
14
188
 
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))
189
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
190
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
191
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
192
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
193
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
194
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
195
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
196
+ * 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
197
 
24
198
 
25
199
  ### Bug Fixes
26
200
 
27
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
201
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
28
202
 
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)
203
+ ## [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)
30
204
 
31
205
 
32
206
  ### Features
33
207
 
34
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
208
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
35
209
 
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)
210
+ ## [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
211
 
38
212
 
39
213
  ### Miscellaneous Chores
40
214
 
41
215
  * **entity-storage-models:** Synchronize repo versions
42
216
 
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)
217
+ ## [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
218
 
45
219
 
46
220
  ### Features
47
221
 
48
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
222
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
49
223
 
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)
224
+ ## [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
225
 
52
226
 
53
227
  ### Miscellaneous Chores
54
228
 
55
229
  * **entity-storage-models:** Synchronize repo versions
56
230
 
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)
231
+ ## [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
232
 
59
233
 
60
234
  ### Features
61
235
 
62
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
236
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
63
237
 
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)
238
+ ## [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
239
 
66
240
 
67
241
  ### Miscellaneous Chores
68
242
 
69
243
  * **entity-storage-models:** Synchronize repo versions
70
244
 
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)
245
+ ## [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
246
 
73
247
 
74
248
  ### Miscellaneous Chores
75
249
 
76
250
  * **entity-storage-models:** Synchronize repo versions
77
251
 
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)
252
+ ## [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
253
 
80
254
 
81
255
  ### Miscellaneous Chores
82
256
 
83
257
  * **entity-storage-models:** Synchronize repo versions
84
258
 
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)
259
+ ## [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
260
 
87
261
 
88
262
  ### Features
89
263
 
90
- * remove includeNodeIdentity flag ([d88d1d0](https://github.com/twinfoundation/entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
264
+ * remove includeNodeIdentity flag ([d88d1d0](https://github.com/iotaledger/twin-entity-storage/commit/d88d1d0694419b795dc860e0b712a0051c9a1c9e))
91
265
 
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)
266
+ ## [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
267
 
94
268
 
95
269
  ### Features
96
270
 
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))
271
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
272
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
273
+ * 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
274
 
101
275
 
102
276
  ### Bug Fixes
103
277
 
104
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
278
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
105
279
 
106
280
  ## 0.0.1 (2025-07-04)
107
281
 
108
282
 
109
283
  ### Features
110
284
 
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))
285
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
286
+ * release to production ([a309051](https://github.com/iotaledger/twin-entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
287
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
288
+ * 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
289
 
116
290
 
117
291
  ### Bug Fixes
118
292
 
119
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
293
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
120
294
 
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)
295
+ ## [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
296
 
123
297
 
124
298
  ### Bug Fixes
125
299
 
126
- * 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))
127
301
 
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)
302
+ ## [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
303
 
130
304
 
131
305
  ### Features
132
306
 
133
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
307
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
134
308
 
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)
309
+ ## [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
310
 
137
311
 
138
312
  ### Features
139
313
 
140
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
314
+ * 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
315
 
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)
316
+ ## [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
317
 
144
318
 
145
319
  ### Miscellaneous Chores
146
320
 
147
321
  * **entity-storage-models:** Synchronize repo versions
148
322
 
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)
323
+ ## [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
324
 
151
325
 
152
326
  ### 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.