@twin.org/api-tenant-processor 0.0.3-next.4 → 0.0.3-next.40

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 (106) hide show
  1. package/README.md +1 -1
  2. package/dist/es/entities/tenant.js +17 -1
  3. package/dist/es/entities/tenant.js.map +1 -1
  4. package/dist/es/index.js +13 -2
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/es/models/ITenantProcessorConfig.js.map +1 -1
  7. package/dist/es/models/ITenantProcessorConstructorOptions.js.map +1 -1
  8. package/dist/es/models/ITenantServiceConfig.js +4 -0
  9. package/dist/es/models/ITenantServiceConfig.js.map +1 -0
  10. package/dist/es/models/ITenantServiceConstructorOptions.js +2 -0
  11. package/dist/es/models/ITenantServiceConstructorOptions.js.map +1 -0
  12. package/dist/es/models/api/ITenantCreateRequest.js +2 -0
  13. package/dist/es/models/api/ITenantCreateRequest.js.map +1 -0
  14. package/dist/es/models/api/ITenantGetByApiKeyRequest.js +4 -0
  15. package/dist/es/models/api/ITenantGetByApiKeyRequest.js.map +1 -0
  16. package/dist/es/models/api/ITenantGetByIdRequest.js +4 -0
  17. package/dist/es/models/api/ITenantGetByIdRequest.js.map +1 -0
  18. package/dist/es/models/api/ITenantGetByPublicOriginRequest.js +4 -0
  19. package/dist/es/models/api/ITenantGetByPublicOriginRequest.js.map +1 -0
  20. package/dist/es/models/api/ITenantGetResponse.js +2 -0
  21. package/dist/es/models/api/ITenantGetResponse.js.map +1 -0
  22. package/dist/es/models/api/ITenantListRequest.js +4 -0
  23. package/dist/es/models/api/ITenantListRequest.js.map +1 -0
  24. package/dist/es/models/api/ITenantListResponse.js +2 -0
  25. package/dist/es/models/api/ITenantListResponse.js.map +1 -0
  26. package/dist/es/models/api/ITenantRemoveRequest.js +4 -0
  27. package/dist/es/models/api/ITenantRemoveRequest.js.map +1 -0
  28. package/dist/es/models/api/ITenantUpdateRequest.js +2 -0
  29. package/dist/es/models/api/ITenantUpdateRequest.js.map +1 -0
  30. package/dist/es/restEntryPoints.js +10 -0
  31. package/dist/es/restEntryPoints.js.map +1 -0
  32. package/dist/es/tenantAdminService.js +101 -16
  33. package/dist/es/tenantAdminService.js.map +1 -1
  34. package/dist/es/tenantIdContextIdHandler.js +7 -0
  35. package/dist/es/tenantIdContextIdHandler.js.map +1 -1
  36. package/dist/es/tenantProcessor.js +75 -17
  37. package/dist/es/tenantProcessor.js.map +1 -1
  38. package/dist/es/tenantRoutes.js +394 -0
  39. package/dist/es/tenantRoutes.js.map +1 -0
  40. package/dist/es/tenantService.js +51 -0
  41. package/dist/es/tenantService.js.map +1 -0
  42. package/dist/es/utils/tenantIdHelper.js +3 -3
  43. package/dist/es/utils/tenantIdHelper.js.map +1 -1
  44. package/dist/types/entities/tenant.d.ts +8 -0
  45. package/dist/types/index.d.ts +13 -2
  46. package/dist/types/models/ITenantProcessorConfig.d.ts +4 -0
  47. package/dist/types/models/ITenantProcessorConstructorOptions.d.ts +5 -0
  48. package/dist/types/models/ITenantServiceConfig.d.ts +5 -0
  49. package/dist/types/models/ITenantServiceConstructorOptions.d.ts +15 -0
  50. package/dist/types/models/api/ITenantCreateRequest.d.ts +12 -0
  51. package/dist/types/models/api/ITenantGetByApiKeyRequest.d.ts +14 -0
  52. package/dist/types/models/api/ITenantGetByIdRequest.d.ts +14 -0
  53. package/dist/types/models/api/ITenantGetByPublicOriginRequest.d.ts +14 -0
  54. package/dist/types/models/api/ITenantGetResponse.d.ts +10 -0
  55. package/dist/types/models/api/ITenantListRequest.d.ts +23 -0
  56. package/dist/types/models/api/ITenantListResponse.d.ts +17 -0
  57. package/dist/types/models/api/ITenantRemoveRequest.d.ts +14 -0
  58. package/dist/types/models/api/ITenantUpdateRequest.d.ts +19 -0
  59. package/dist/types/restEntryPoints.d.ts +2 -0
  60. package/dist/types/tenantAdminService.d.ts +28 -11
  61. package/dist/types/tenantIdContextIdHandler.d.ts +5 -0
  62. package/dist/types/tenantProcessor.d.ts +1 -1
  63. package/dist/types/tenantRoutes.d.ts +77 -0
  64. package/dist/types/tenantService.d.ts +27 -0
  65. package/docs/changelog.md +532 -15
  66. package/docs/examples.md +81 -1
  67. package/docs/reference/classes/Tenant.md +20 -4
  68. package/docs/reference/classes/TenantAdminService.md +96 -26
  69. package/docs/reference/classes/TenantIdContextIdHandler.md +21 -3
  70. package/docs/reference/classes/TenantIdHelper.md +2 -2
  71. package/docs/reference/classes/TenantProcessor.md +6 -6
  72. package/docs/reference/classes/TenantService.md +79 -0
  73. package/docs/reference/functions/generateRestRoutesTenants.md +25 -0
  74. package/docs/reference/functions/tenantByApiKey.md +31 -0
  75. package/docs/reference/functions/tenantById.md +31 -0
  76. package/docs/reference/functions/tenantByPublicOrigin.md +31 -0
  77. package/docs/reference/functions/tenantCreate.md +31 -0
  78. package/docs/reference/functions/tenantList.md +31 -0
  79. package/docs/reference/functions/tenantRemove.md +31 -0
  80. package/docs/reference/functions/tenantUpdate.md +31 -0
  81. package/docs/reference/index.md +24 -2
  82. package/docs/reference/interfaces/ITenantAdminServiceConstructorOptions.md +4 -4
  83. package/docs/reference/interfaces/ITenantCreateRequest.md +17 -0
  84. package/docs/reference/interfaces/ITenantGetByApiKeyRequest.md +17 -0
  85. package/docs/reference/interfaces/ITenantGetByIdRequest.md +17 -0
  86. package/docs/reference/interfaces/ITenantGetByPublicOriginRequest.md +17 -0
  87. package/docs/reference/interfaces/ITenantGetResponse.md +11 -0
  88. package/docs/reference/interfaces/ITenantListRequest.md +30 -0
  89. package/docs/reference/interfaces/ITenantListResponse.md +23 -0
  90. package/docs/reference/interfaces/ITenantProcessorConfig.md +10 -2
  91. package/docs/reference/interfaces/ITenantProcessorConstructorOptions.md +18 -4
  92. package/docs/reference/interfaces/ITenantRemoveRequest.md +17 -0
  93. package/docs/reference/interfaces/ITenantServiceConfig.md +3 -0
  94. package/docs/reference/interfaces/ITenantServiceConstructorOptions.md +25 -0
  95. package/docs/reference/interfaces/ITenantUpdateRequest.md +25 -0
  96. package/docs/reference/variables/tagsTenants.md +5 -0
  97. package/locales/en.json +8 -2
  98. package/package.json +6 -5
  99. package/dist/es/models/ITenant.js +0 -4
  100. package/dist/es/models/ITenant.js.map +0 -1
  101. package/dist/es/models/ITenantAdminComponent.js +0 -2
  102. package/dist/es/models/ITenantAdminComponent.js.map +0 -1
  103. package/dist/types/models/ITenant.d.ts +0 -21
  104. package/dist/types/models/ITenantAdminComponent.d.ts +0 -41
  105. package/docs/reference/interfaces/ITenant.md +0 -35
  106. package/docs/reference/interfaces/ITenantAdminComponent.md +0 -123
package/docs/changelog.md CHANGED
@@ -1,19 +1,536 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.3-next.4](https://github.com/twinfoundation/api/compare/api-tenant-processor-v0.0.3-next.3...api-tenant-processor-v0.0.3-next.4) (2025-11-14)
3
+ ## [0.0.3-next.40](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.39...api-tenant-processor-v0.0.3-next.40) (2026-06-04)
4
4
 
5
5
 
6
6
  ### Features
7
7
 
8
- * add context id features ([#42](https://github.com/twinfoundation/api/issues/42)) ([0186055](https://github.com/twinfoundation/api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
9
- * add tests for tenant id handler ([c868e7e](https://github.com/twinfoundation/api/commit/c868e7e5831e13df39b8994c40834e51f69fa0b9))
10
- * reduce short form tenant id length ([bcda377](https://github.com/twinfoundation/api/commit/bcda377daed03b21fd1c6ffe47bad4a45d96602b))
8
+ * add tenant component ([#145](https://github.com/iotaledger/twin-api/issues/145)) ([a440c53](https://github.com/iotaledger/twin-api/commit/a440c53f36618946daee7372fe664f8ace341a08))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/api-models bumped from 0.0.3-next.39 to 0.0.3-next.40
16
+
17
+ ## [0.0.3-next.39](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.38...api-tenant-processor-v0.0.3-next.39) (2026-06-02)
18
+
19
+
20
+ ### Features
21
+
22
+ * tenant id in jwt ([#140](https://github.com/iotaledger/twin-api/issues/140)) ([8d37a7b](https://github.com/iotaledger/twin-api/commit/8d37a7b98b45fde53df1e909cffc0869aa758655))
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/api-models bumped from 0.0.3-next.38 to 0.0.3-next.39
30
+
31
+ ## [0.0.3-next.38](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.37...api-tenant-processor-v0.0.3-next.38) (2026-05-28)
32
+
33
+
34
+ ### Miscellaneous Chores
35
+
36
+ * **api-tenant-processor:** Synchronize repo versions
37
+
38
+
39
+ ### Dependencies
40
+
41
+ * The following workspace dependencies were updated
42
+ * dependencies
43
+ * @twin.org/api-models bumped from 0.0.3-next.37 to 0.0.3-next.38
44
+
45
+ ## [0.0.3-next.37](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.36...api-tenant-processor-v0.0.3-next.37) (2026-05-22)
46
+
47
+
48
+ ### Miscellaneous Chores
49
+
50
+ * **api-tenant-processor:** Synchronize repo versions
51
+
52
+
53
+ ### Dependencies
54
+
55
+ * The following workspace dependencies were updated
56
+ * dependencies
57
+ * @twin.org/api-models bumped from 0.0.3-next.36 to 0.0.3-next.37
58
+
59
+ ## [0.0.3-next.36](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.35...api-tenant-processor-v0.0.3-next.36) (2026-05-22)
60
+
61
+
62
+ ### Miscellaneous Chores
63
+
64
+ * **api-tenant-processor:** Synchronize repo versions
65
+
66
+
67
+ ### Dependencies
68
+
69
+ * The following workspace dependencies were updated
70
+ * dependencies
71
+ * @twin.org/api-models bumped from 0.0.3-next.35 to 0.0.3-next.36
72
+
73
+ ## [0.0.3-next.35](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.34...api-tenant-processor-v0.0.3-next.35) (2026-05-21)
74
+
75
+
76
+ ### Miscellaneous Chores
77
+
78
+ * **api-tenant-processor:** Synchronize repo versions
79
+
80
+
81
+ ### Dependencies
82
+
83
+ * The following workspace dependencies were updated
84
+ * dependencies
85
+ * @twin.org/api-models bumped from 0.0.3-next.34 to 0.0.3-next.35
86
+
87
+ ## [0.0.3-next.34](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.33...api-tenant-processor-v0.0.3-next.34) (2026-05-19)
88
+
89
+
90
+ ### Features
91
+
92
+ * update dependencies ([32b8cd2](https://github.com/iotaledger/twin-api/commit/32b8cd20353119dd1998e293d54063cf4d9ecc29))
93
+
94
+
95
+ ### Dependencies
96
+
97
+ * The following workspace dependencies were updated
98
+ * dependencies
99
+ * @twin.org/api-models bumped from 0.0.3-next.33 to 0.0.3-next.34
100
+
101
+ ## [0.0.3-next.33](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.32...api-tenant-processor-v0.0.3-next.33) (2026-05-11)
102
+
103
+
104
+ ### Features
105
+
106
+ * typescript 6 update ([78d2aa0](https://github.com/iotaledger/twin-api/commit/78d2aa00902f79b61973079b798b87ec05f18a8b))
107
+
108
+
109
+ ### Dependencies
110
+
111
+ * The following workspace dependencies were updated
112
+ * dependencies
113
+ * @twin.org/api-models bumped from 0.0.3-next.32 to 0.0.3-next.33
114
+
115
+ ## [0.0.3-next.32](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.31...api-tenant-processor-v0.0.3-next.32) (2026-05-07)
116
+
117
+
118
+ ### Miscellaneous Chores
119
+
120
+ * **api-tenant-processor:** Synchronize repo versions
121
+
122
+
123
+ ### Dependencies
124
+
125
+ * The following workspace dependencies were updated
126
+ * dependencies
127
+ * @twin.org/api-models bumped from 0.0.3-next.31 to 0.0.3-next.32
128
+
129
+ ## [0.0.3-next.31](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.30...api-tenant-processor-v0.0.3-next.31) (2026-05-06)
130
+
131
+
132
+ ### Features
133
+
134
+ * update health format ([cfbfbbb](https://github.com/iotaledger/twin-api/commit/cfbfbbb2e9afbd2574ffd2446ad51e4217437951))
135
+
136
+
137
+ ### Dependencies
138
+
139
+ * The following workspace dependencies were updated
140
+ * dependencies
141
+ * @twin.org/api-models bumped from 0.0.3-next.30 to 0.0.3-next.31
142
+
143
+ ## [0.0.3-next.30](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.29...api-tenant-processor-v0.0.3-next.30) (2026-05-05)
144
+
145
+
146
+ ### Features
147
+
148
+ * separate service responsibilities ([#116](https://github.com/iotaledger/twin-api/issues/116)) ([2234648](https://github.com/iotaledger/twin-api/commit/2234648de4a2de5b7356aadde328f40470bc12e3))
149
+
150
+
151
+ ### Dependencies
152
+
153
+ * The following workspace dependencies were updated
154
+ * dependencies
155
+ * @twin.org/api-models bumped from 0.0.3-next.29 to 0.0.3-next.30
156
+
157
+ ## [0.0.3-next.29](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.28...api-tenant-processor-v0.0.3-next.29) (2026-05-01)
158
+
159
+
160
+ ### Features
161
+
162
+ * hosting service ([#109](https://github.com/iotaledger/twin-api/issues/109)) ([985bf1f](https://github.com/iotaledger/twin-api/commit/985bf1f5c07b09ecb800df7120bc2422ac7a6d25))
163
+
164
+
165
+ ### Dependencies
166
+
167
+ * The following workspace dependencies were updated
168
+ * dependencies
169
+ * @twin.org/api-models bumped from 0.0.3-next.28 to 0.0.3-next.29
170
+
171
+ ## [0.0.3-next.28](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.27...api-tenant-processor-v0.0.3-next.28) (2026-04-30)
172
+
173
+
174
+ ### Features
175
+
176
+ * tenantToken decoder on skipTenant routes + BaseRestClient query-string preservation ([#108](https://github.com/iotaledger/twin-api/issues/108)) ([1435357](https://github.com/iotaledger/twin-api/commit/1435357034b41130fc97238c728265e48f746f1e))
177
+
178
+
179
+ ### Dependencies
180
+
181
+ * The following workspace dependencies were updated
182
+ * dependencies
183
+ * @twin.org/api-models bumped from 0.0.3-next.27 to 0.0.3-next.28
184
+
185
+ ## [0.0.3-next.27](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.26...api-tenant-processor-v0.0.3-next.27) (2026-04-23)
186
+
187
+
188
+ ### Miscellaneous Chores
189
+
190
+ * **api-tenant-processor:** Synchronize repo versions
191
+
192
+
193
+ ### Dependencies
194
+
195
+ * The following workspace dependencies were updated
196
+ * dependencies
197
+ * @twin.org/api-models bumped from 0.0.3-next.26 to 0.0.3-next.27
198
+
199
+ ## [0.0.3-next.26](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.25...api-tenant-processor-v0.0.3-next.26) (2026-04-22)
200
+
201
+
202
+ ### Miscellaneous Chores
203
+
204
+ * **api-tenant-processor:** Synchronize repo versions
205
+
206
+
207
+ ### Dependencies
208
+
209
+ * The following workspace dependencies were updated
210
+ * dependencies
211
+ * @twin.org/api-models bumped from 0.0.3-next.25 to 0.0.3-next.26
212
+
213
+ ## [0.0.3-next.25](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.24...api-tenant-processor-v0.0.3-next.25) (2026-04-14)
214
+
215
+
216
+ ### Miscellaneous Chores
217
+
218
+ * **api-tenant-processor:** Synchronize repo versions
219
+
220
+
221
+ ### Dependencies
222
+
223
+ * The following workspace dependencies were updated
224
+ * dependencies
225
+ * @twin.org/api-models bumped from 0.0.3-next.24 to 0.0.3-next.25
226
+
227
+ ## [0.0.3-next.24](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.23...api-tenant-processor-v0.0.3-next.24) (2026-04-14)
228
+
229
+
230
+ ### Miscellaneous Chores
231
+
232
+ * **api-tenant-processor:** Synchronize repo versions
233
+
234
+
235
+ ### Dependencies
236
+
237
+ * The following workspace dependencies were updated
238
+ * dependencies
239
+ * @twin.org/api-models bumped from 0.0.3-next.23 to 0.0.3-next.24
240
+
241
+ ## [0.0.3-next.23](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.22...api-tenant-processor-v0.0.3-next.23) (2026-04-14)
242
+
243
+
244
+ ### Miscellaneous Chores
245
+
246
+ * **api-tenant-processor:** Synchronize repo versions
247
+
248
+
249
+ ### Dependencies
250
+
251
+ * The following workspace dependencies were updated
252
+ * dependencies
253
+ * @twin.org/api-models bumped from 0.0.3-next.22 to 0.0.3-next.23
254
+
255
+ ## [0.0.3-next.22](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.21...api-tenant-processor-v0.0.3-next.22) (2026-03-27)
256
+
257
+
258
+ ### Miscellaneous Chores
259
+
260
+ * **api-tenant-processor:** Synchronize repo versions
261
+
262
+
263
+ ### Dependencies
264
+
265
+ * The following workspace dependencies were updated
266
+ * dependencies
267
+ * @twin.org/api-models bumped from 0.0.3-next.21 to 0.0.3-next.22
268
+
269
+ ## [0.0.3-next.21](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.20...api-tenant-processor-v0.0.3-next.21) (2026-03-11)
270
+
271
+
272
+ ### Miscellaneous Chores
273
+
274
+ * **api-tenant-processor:** Synchronize repo versions
275
+
276
+
277
+ ### Dependencies
278
+
279
+ * The following workspace dependencies were updated
280
+ * dependencies
281
+ * @twin.org/api-models bumped from 0.0.3-next.20 to 0.0.3-next.21
282
+
283
+ ## [0.0.3-next.20](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.19...api-tenant-processor-v0.0.3-next.20) (2026-02-09)
284
+
285
+
286
+ ### Features
287
+
288
+ * location encoding ([#79](https://github.com/iotaledger/twin-api/issues/79)) ([c684465](https://github.com/iotaledger/twin-api/commit/c684465f2a871376152472bdecb6aa230b1101a1))
289
+
290
+
291
+ ### Dependencies
292
+
293
+ * The following workspace dependencies were updated
294
+ * dependencies
295
+ * @twin.org/api-models bumped from 0.0.3-next.19 to 0.0.3-next.20
296
+
297
+ ## [0.0.3-next.19](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.18...api-tenant-processor-v0.0.3-next.19) (2026-02-06)
298
+
299
+
300
+ ### Miscellaneous Chores
301
+
302
+ * **api-tenant-processor:** Synchronize repo versions
303
+
304
+
305
+ ### Dependencies
306
+
307
+ * The following workspace dependencies were updated
308
+ * dependencies
309
+ * @twin.org/api-models bumped from 0.0.3-next.18 to 0.0.3-next.19
310
+
311
+ ## [0.0.3-next.18](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.17...api-tenant-processor-v0.0.3-next.18) (2026-02-04)
312
+
313
+
314
+ ### Features
315
+
316
+ * tenant api and scopes ([#75](https://github.com/iotaledger/twin-api/issues/75)) ([c663141](https://github.com/iotaledger/twin-api/commit/c663141091e8974d769f8f9904ecdab009ebd083))
317
+
318
+
319
+ ### Dependencies
320
+
321
+ * The following workspace dependencies were updated
322
+ * dependencies
323
+ * @twin.org/api-models bumped from 0.0.3-next.17 to 0.0.3-next.18
324
+
325
+ ## [0.0.3-next.17](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.16...api-tenant-processor-v0.0.3-next.17) (2026-01-26)
326
+
327
+
328
+ ### Miscellaneous Chores
329
+
330
+ * **api-tenant-processor:** Synchronize repo versions
331
+
332
+
333
+ ### Dependencies
334
+
335
+ * The following workspace dependencies were updated
336
+ * dependencies
337
+ * @twin.org/api-models bumped from 0.0.3-next.16 to 0.0.3-next.17
338
+
339
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.15...api-tenant-processor-v0.0.3-next.16) (2026-01-26)
340
+
341
+
342
+ ### Features
343
+
344
+ * public base url ([#70](https://github.com/iotaledger/twin-api/issues/70)) ([5b958cd](https://github.com/iotaledger/twin-api/commit/5b958cd91e8a38cdae2835ff5f2356c7e48d37c3))
345
+
346
+
347
+ ### Dependencies
348
+
349
+ * The following workspace dependencies were updated
350
+ * dependencies
351
+ * @twin.org/api-models bumped from 0.0.3-next.15 to 0.0.3-next.16
352
+
353
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.14...api-tenant-processor-v0.0.3-next.15) (2026-01-22)
354
+
355
+
356
+ ### Miscellaneous Chores
357
+
358
+ * **api-tenant-processor:** Synchronize repo versions
359
+
360
+
361
+ ### Dependencies
362
+
363
+ * The following workspace dependencies were updated
364
+ * dependencies
365
+ * @twin.org/api-models bumped from 0.0.3-next.14 to 0.0.3-next.15
366
+
367
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.13...api-tenant-processor-v0.0.3-next.14) (2026-01-20)
368
+
369
+
370
+ ### Miscellaneous Chores
371
+
372
+ * **api-tenant-processor:** Synchronize repo versions
373
+
374
+
375
+ ### Dependencies
376
+
377
+ * The following workspace dependencies were updated
378
+ * dependencies
379
+ * @twin.org/api-models bumped from 0.0.3-next.13 to 0.0.3-next.14
380
+
381
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.12...api-tenant-processor-v0.0.3-next.13) (2026-01-19)
382
+
383
+
384
+ ### Miscellaneous Chores
385
+
386
+ * **api-tenant-processor:** Synchronize repo versions
387
+
388
+
389
+ ### Dependencies
390
+
391
+ * The following workspace dependencies were updated
392
+ * dependencies
393
+ * @twin.org/api-models bumped from 0.0.3-next.12 to 0.0.3-next.13
394
+
395
+ ## [0.0.3-next.12](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.11...api-tenant-processor-v0.0.3-next.12) (2026-01-12)
396
+
397
+
398
+ ### Miscellaneous Chores
399
+
400
+ * **api-tenant-processor:** Synchronize repo versions
401
+
402
+
403
+ ### Dependencies
404
+
405
+ * The following workspace dependencies were updated
406
+ * dependencies
407
+ * @twin.org/api-models bumped from 0.0.3-next.11 to 0.0.3-next.12
408
+
409
+ ## [0.0.3-next.11](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.10...api-tenant-processor-v0.0.3-next.11) (2026-01-08)
410
+
411
+
412
+ ### Bug Fixes
413
+
414
+ * duplicate api keys ([#61](https://github.com/iotaledger/twin-api/issues/61)) ([5519c2d](https://github.com/iotaledger/twin-api/commit/5519c2d077d9b3d4b5fc7d5f073ef67cd000a367))
415
+
416
+
417
+ ### Dependencies
418
+
419
+ * The following workspace dependencies were updated
420
+ * dependencies
421
+ * @twin.org/api-models bumped from 0.0.3-next.10 to 0.0.3-next.11
422
+
423
+ ## [0.0.3-next.10](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.9...api-tenant-processor-v0.0.3-next.10) (2026-01-05)
424
+
425
+
426
+ ### Miscellaneous Chores
427
+
428
+ * **api-tenant-processor:** Synchronize repo versions
429
+
430
+
431
+ ### Dependencies
432
+
433
+ * The following workspace dependencies were updated
434
+ * dependencies
435
+ * @twin.org/api-models bumped from 0.0.3-next.9 to 0.0.3-next.10
436
+
437
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.8...api-tenant-processor-v0.0.3-next.9) (2026-01-05)
438
+
439
+
440
+ ### Features
441
+
442
+ * add context id features ([#42](https://github.com/iotaledger/twin-api/issues/42)) ([0186055](https://github.com/iotaledger/twin-api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
443
+ * add livez endpoint ([#57](https://github.com/iotaledger/twin-api/issues/57)) ([ef007db](https://github.com/iotaledger/twin-api/commit/ef007db8201736dd3053211f849ffd03baaa485e))
444
+ * add tests for tenant id handler ([c868e7e](https://github.com/iotaledger/twin-api/commit/c868e7e5831e13df39b8994c40834e51f69fa0b9))
445
+ * check tenant id in auth if set ([937ba0c](https://github.com/iotaledger/twin-api/commit/937ba0cd790038556a7b2af251e52b43cb059df4))
446
+ * check tenant id in auth if set ([66f7337](https://github.com/iotaledger/twin-api/commit/66f73374d3cf4c1c85ea96ec74bb30712fb84dd7))
447
+ * reduce short form tenant id length ([bcda377](https://github.com/iotaledger/twin-api/commit/bcda377daed03b21fd1c6ffe47bad4a45d96602b))
448
+
449
+
450
+ ### Bug Fixes
451
+
452
+ * do not check x-api-key for health resourcr ([#54](https://github.com/iotaledger/twin-api/issues/54)) ([897a747](https://github.com/iotaledger/twin-api/commit/897a747a57ed76ee37035f7ea3d40953df3f5fb0))
453
+ * remove extraneous type ([f85c52c](https://github.com/iotaledger/twin-api/commit/f85c52c55caa3a7a64f6f675842f0ea59289a5d9))
454
+ * use base64Url for tenant id short form so it doesn't include slash ([7210771](https://github.com/iotaledger/twin-api/commit/72107718650acd05440ce9d9bf10905e6052281c))
455
+
456
+
457
+ ### Dependencies
458
+
459
+ * The following workspace dependencies were updated
460
+ * dependencies
461
+ * @twin.org/api-models bumped from 0.0.3-next.8 to 0.0.3-next.9
462
+
463
+ ## [0.0.3-next.8](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.7...api-tenant-processor-v0.0.3-next.8) (2025-12-17)
464
+
465
+
466
+ ### Bug Fixes
467
+
468
+ * do not check x-api-key for health resourcr ([#54](https://github.com/iotaledger/twin-api/issues/54)) ([897a747](https://github.com/iotaledger/twin-api/commit/897a747a57ed76ee37035f7ea3d40953df3f5fb0))
469
+
470
+
471
+ ### Dependencies
472
+
473
+ * The following workspace dependencies were updated
474
+ * dependencies
475
+ * @twin.org/api-models bumped from 0.0.3-next.7 to 0.0.3-next.8
476
+
477
+ ## [0.0.3-next.7](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.6...api-tenant-processor-v0.0.3-next.7) (2025-11-26)
478
+
479
+
480
+ ### Miscellaneous Chores
481
+
482
+ * **api-tenant-processor:** Synchronize repo versions
483
+
484
+
485
+ ### Dependencies
486
+
487
+ * The following workspace dependencies were updated
488
+ * dependencies
489
+ * @twin.org/api-models bumped from 0.0.3-next.6 to 0.0.3-next.7
490
+
491
+ ## [0.0.3-next.6](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.5...api-tenant-processor-v0.0.3-next.6) (2025-11-20)
492
+
493
+
494
+ ### Features
495
+
496
+ * check tenant id in auth if set ([937ba0c](https://github.com/iotaledger/twin-api/commit/937ba0cd790038556a7b2af251e52b43cb059df4))
497
+ * check tenant id in auth if set ([66f7337](https://github.com/iotaledger/twin-api/commit/66f73374d3cf4c1c85ea96ec74bb30712fb84dd7))
498
+
499
+
500
+ ### Dependencies
501
+
502
+ * The following workspace dependencies were updated
503
+ * dependencies
504
+ * @twin.org/api-models bumped from 0.0.3-next.5 to 0.0.3-next.6
505
+
506
+ ## [0.0.3-next.5](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.4...api-tenant-processor-v0.0.3-next.5) (2025-11-14)
507
+
508
+
509
+ ### Miscellaneous Chores
510
+
511
+ * **api-tenant-processor:** Synchronize repo versions
512
+
513
+
514
+ ### Dependencies
515
+
516
+ * The following workspace dependencies were updated
517
+ * dependencies
518
+ * @twin.org/api-models bumped from 0.0.3-next.4 to 0.0.3-next.5
519
+
520
+ ## [0.0.3-next.4](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.3...api-tenant-processor-v0.0.3-next.4) (2025-11-14)
521
+
522
+
523
+ ### Features
524
+
525
+ * add context id features ([#42](https://github.com/iotaledger/twin-api/issues/42)) ([0186055](https://github.com/iotaledger/twin-api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
526
+ * add tests for tenant id handler ([c868e7e](https://github.com/iotaledger/twin-api/commit/c868e7e5831e13df39b8994c40834e51f69fa0b9))
527
+ * reduce short form tenant id length ([bcda377](https://github.com/iotaledger/twin-api/commit/bcda377daed03b21fd1c6ffe47bad4a45d96602b))
11
528
 
12
529
 
13
530
  ### Bug Fixes
14
531
 
15
- * remove extraneous type ([f85c52c](https://github.com/twinfoundation/api/commit/f85c52c55caa3a7a64f6f675842f0ea59289a5d9))
16
- * use base64Url for tenant id short form so it doesn't include slash ([7210771](https://github.com/twinfoundation/api/commit/72107718650acd05440ce9d9bf10905e6052281c))
532
+ * remove extraneous type ([f85c52c](https://github.com/iotaledger/twin-api/commit/f85c52c55caa3a7a64f6f675842f0ea59289a5d9))
533
+ * use base64Url for tenant id short form so it doesn't include slash ([7210771](https://github.com/iotaledger/twin-api/commit/72107718650acd05440ce9d9bf10905e6052281c))
17
534
 
18
535
 
19
536
  ### Dependencies
@@ -22,17 +539,17 @@
22
539
  * dependencies
23
540
  * @twin.org/api-models bumped from 0.0.3-next.3 to 0.0.3-next.4
24
541
 
25
- ## [0.0.3-next.3](https://github.com/twinfoundation/api/compare/api-tenant-processor-v0.0.3-next.2...api-tenant-processor-v0.0.3-next.3) (2025-11-14)
542
+ ## [0.0.3-next.3](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.2...api-tenant-processor-v0.0.3-next.3) (2025-11-14)
26
543
 
27
544
 
28
545
  ### Features
29
546
 
30
- * add tests for tenant id handler ([c868e7e](https://github.com/twinfoundation/api/commit/c868e7e5831e13df39b8994c40834e51f69fa0b9))
547
+ * add tests for tenant id handler ([c868e7e](https://github.com/iotaledger/twin-api/commit/c868e7e5831e13df39b8994c40834e51f69fa0b9))
31
548
 
32
549
 
33
550
  ### Bug Fixes
34
551
 
35
- * use base64Url for tenant id short form so it doesn't include slash ([7210771](https://github.com/twinfoundation/api/commit/72107718650acd05440ce9d9bf10905e6052281c))
552
+ * use base64Url for tenant id short form so it doesn't include slash ([7210771](https://github.com/iotaledger/twin-api/commit/72107718650acd05440ce9d9bf10905e6052281c))
36
553
 
37
554
 
38
555
  ### Dependencies
@@ -41,17 +558,17 @@
41
558
  * dependencies
42
559
  * @twin.org/api-models bumped from 0.0.3-next.2 to 0.0.3-next.3
43
560
 
44
- ## [0.0.3-next.2](https://github.com/twinfoundation/api/compare/api-tenant-processor-v0.0.3-next.1...api-tenant-processor-v0.0.3-next.2) (2025-11-12)
561
+ ## [0.0.3-next.2](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.1...api-tenant-processor-v0.0.3-next.2) (2025-11-12)
45
562
 
46
563
 
47
564
  ### Features
48
565
 
49
- * reduce short form tenant id length ([bcda377](https://github.com/twinfoundation/api/commit/bcda377daed03b21fd1c6ffe47bad4a45d96602b))
566
+ * reduce short form tenant id length ([bcda377](https://github.com/iotaledger/twin-api/commit/bcda377daed03b21fd1c6ffe47bad4a45d96602b))
50
567
 
51
568
 
52
569
  ### Bug Fixes
53
570
 
54
- * remove extraneous type ([f85c52c](https://github.com/twinfoundation/api/commit/f85c52c55caa3a7a64f6f675842f0ea59289a5d9))
571
+ * remove extraneous type ([f85c52c](https://github.com/iotaledger/twin-api/commit/f85c52c55caa3a7a64f6f675842f0ea59289a5d9))
55
572
 
56
573
 
57
574
  ### Dependencies
@@ -60,12 +577,12 @@
60
577
  * dependencies
61
578
  * @twin.org/api-models bumped from 0.0.3-next.1 to 0.0.3-next.2
62
579
 
63
- ## [0.0.3-next.1](https://github.com/twinfoundation/api/compare/api-tenant-processor-v0.0.3-next.0...api-tenant-processor-v0.0.3-next.1) (2025-11-10)
580
+ ## [0.0.3-next.1](https://github.com/iotaledger/twin-api/compare/api-tenant-processor-v0.0.3-next.0...api-tenant-processor-v0.0.3-next.1) (2025-11-10)
64
581
 
65
582
 
66
583
  ### Features
67
584
 
68
- * add context id features ([#42](https://github.com/twinfoundation/api/issues/42)) ([0186055](https://github.com/twinfoundation/api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
585
+ * add context id features ([#42](https://github.com/iotaledger/twin-api/issues/42)) ([0186055](https://github.com/iotaledger/twin-api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
69
586
 
70
587
 
71
588
  ### Dependencies
@@ -74,4 +591,4 @@
74
591
  * dependencies
75
592
  * @twin.org/api-models bumped from 0.0.3-next.0 to 0.0.3-next.1
76
593
 
77
- ## @twin.org/api-tenant-processor - Changelog
594
+ ## Changelog
package/docs/examples.md CHANGED
@@ -1 +1,81 @@
1
- # @twin.org/api-tenant-processor - Examples
1
+ # Tenant Processor Examples
2
+
3
+ These snippets show tenant lifecycle management and request context routing for multi-tenant deployments.
4
+
5
+ ## TenantAdminService
6
+
7
+ ```typescript
8
+ import { TenantAdminService } from '@twin.org/api-tenant-processor';
9
+
10
+ const tenantAdmin = new TenantAdminService();
11
+
12
+ console.log(tenantAdmin.className()); // TenantAdminService
13
+
14
+ const createdTenantId = await tenantAdmin.create({
15
+ label: 'North Region',
16
+ apiKey: '0123456789abcdef0123456789abcdef',
17
+ publicOrigin: 'https://north.example.org'
18
+ });
19
+
20
+ await tenantAdmin.update({
21
+ id: createdTenantId,
22
+ label: 'North Region EU'
23
+ });
24
+
25
+ const byKey = await tenantAdmin.getByApiKey('0123456789abcdef0123456789abcdef');
26
+ console.log(byKey.id.length); // 32
27
+ ```
28
+
29
+ ```typescript
30
+ import { TenantAdminService } from '@twin.org/api-tenant-processor';
31
+
32
+ const tenantAdmin = new TenantAdminService();
33
+
34
+ const byId = await tenantAdmin.get('0123456789abcdef0123456789abcdef');
35
+ const byOrigin = await tenantAdmin.getByPublicOrigin('https://north.example.org');
36
+ const page = await tenantAdmin.query({ isNodeTenant: false }, '', 10);
37
+
38
+ await tenantAdmin.remove(byId.id);
39
+
40
+ console.log(byOrigin.label); // North Region EU
41
+ console.log(page.tenants.length); // 1
42
+ ```
43
+
44
+ ## TenantIdContextIdHandler
45
+
46
+ ```typescript
47
+ import { TenantIdContextIdHandler } from '@twin.org/api-tenant-processor';
48
+
49
+ const handler = new TenantIdContextIdHandler();
50
+
51
+ console.log(handler.className()); // TenantIdContextIdHandler
52
+ console.log(handler.short('0123456789abcdef0123456789abcdef')); // ASNFZ4mrze8BI0VniavN7w
53
+
54
+ handler.guard('0123456789abcdef0123456789abcdef');
55
+ ```
56
+
57
+ ## TenantProcessor
58
+
59
+ ```typescript
60
+ import { TenantProcessor } from '@twin.org/api-tenant-processor';
61
+
62
+ const tenantProcessor = new TenantProcessor();
63
+
64
+ console.log(tenantProcessor.className()); // TenantProcessor
65
+
66
+ const request = {
67
+ method: 'get',
68
+ url: '/info',
69
+ headers: {
70
+ 'x-api-key': '0123456789abcdef0123456789abcdef'
71
+ },
72
+ query: {}
73
+ };
74
+
75
+ const response = {};
76
+ const contextIds = {};
77
+ const processorState: { [id: string]: unknown } = {};
78
+
79
+ await tenantProcessor.pre(request, response, { skipTenant: false }, contextIds, processorState);
80
+ console.log(typeof contextIds.tenant); // string
81
+ ```