@3sixty/api-models 0.0.0-stage → 0.20.0-next.0

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 (314) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/errors/forbiddenError.js +23 -0
  4. package/dist/es/errors/forbiddenError.js.map +1 -0
  5. package/dist/es/errors/tooManyRequestsError.js +25 -0
  6. package/dist/es/errors/tooManyRequestsError.js.map +1 -0
  7. package/dist/es/factories/mimeTypeProcessorFactory.js +9 -0
  8. package/dist/es/factories/mimeTypeProcessorFactory.js.map +1 -0
  9. package/dist/es/factories/restClientProcessorFactory.js +9 -0
  10. package/dist/es/factories/restClientProcessorFactory.js.map +1 -0
  11. package/dist/es/factories/restRouteProcessorFactory.js +9 -0
  12. package/dist/es/factories/restRouteProcessorFactory.js.map +1 -0
  13. package/dist/es/factories/socketRouteProcessorFactory.js +9 -0
  14. package/dist/es/factories/socketRouteProcessorFactory.js.map +1 -0
  15. package/dist/es/helpers/httpErrorHelper.js +75 -0
  16. package/dist/es/helpers/httpErrorHelper.js.map +1 -0
  17. package/dist/es/helpers/httpHeaderHelper.js +120 -0
  18. package/dist/es/helpers/httpHeaderHelper.js.map +1 -0
  19. package/dist/es/helpers/httpParameterHelper.js +41 -0
  20. package/dist/es/helpers/httpParameterHelper.js.map +1 -0
  21. package/dist/es/helpers/httpUrlHelper.js +156 -0
  22. package/dist/es/helpers/httpUrlHelper.js.map +1 -0
  23. package/dist/es/helpers/scopeHelper.js +46 -0
  24. package/dist/es/helpers/scopeHelper.js.map +1 -0
  25. package/dist/es/index.js +78 -0
  26. package/dist/es/index.js.map +1 -0
  27. package/dist/es/models/IHealth.js +2 -0
  28. package/dist/es/models/IHealth.js.map +1 -0
  29. package/dist/es/models/api/IServerFavIconResponse.js +2 -0
  30. package/dist/es/models/api/IServerFavIconResponse.js.map +1 -0
  31. package/dist/es/models/api/IServerHealthResponse.js +2 -0
  32. package/dist/es/models/api/IServerHealthResponse.js.map +1 -0
  33. package/dist/es/models/api/IServerInfoResponse.js +2 -0
  34. package/dist/es/models/api/IServerInfoResponse.js.map +1 -0
  35. package/dist/es/models/api/IServerLivezResponse.js +2 -0
  36. package/dist/es/models/api/IServerLivezResponse.js.map +1 -0
  37. package/dist/es/models/api/IServerReadyzResponse.js +2 -0
  38. package/dist/es/models/api/IServerReadyzResponse.js.map +1 -0
  39. package/dist/es/models/api/IServerRootResponse.js +2 -0
  40. package/dist/es/models/api/IServerRootResponse.js.map +1 -0
  41. package/dist/es/models/api/IServerSpecResponse.js +2 -0
  42. package/dist/es/models/api/IServerSpecResponse.js.map +1 -0
  43. package/dist/es/models/client/IRestClientProcessor.js +2 -0
  44. package/dist/es/models/client/IRestClientProcessor.js.map +1 -0
  45. package/dist/es/models/client/IRestClientProcessorContext.js +2 -0
  46. package/dist/es/models/client/IRestClientProcessorContext.js.map +1 -0
  47. package/dist/es/models/config/IBaseRestClientConfig.js +2 -0
  48. package/dist/es/models/config/IBaseRestClientConfig.js.map +1 -0
  49. package/dist/es/models/config/IBaseSocketClientConfig.js +2 -0
  50. package/dist/es/models/config/IBaseSocketClientConfig.js.map +1 -0
  51. package/dist/es/models/healthCategory.js +17 -0
  52. package/dist/es/models/healthCategory.js.map +1 -0
  53. package/dist/es/models/healthStatus.js +21 -0
  54. package/dist/es/models/healthStatus.js.map +1 -0
  55. package/dist/es/models/httpContextIdKeys.js +42 -0
  56. package/dist/es/models/httpContextIdKeys.js.map +1 -0
  57. package/dist/es/models/protocol/IHttpRequest.js +2 -0
  58. package/dist/es/models/protocol/IHttpRequest.js.map +1 -0
  59. package/dist/es/models/protocol/IHttpRequestContext.js +2 -0
  60. package/dist/es/models/protocol/IHttpRequestContext.js.map +1 -0
  61. package/dist/es/models/protocol/IHttpRequestPathParams.js +4 -0
  62. package/dist/es/models/protocol/IHttpRequestPathParams.js.map +1 -0
  63. package/dist/es/models/protocol/IHttpRequestQuery.js +4 -0
  64. package/dist/es/models/protocol/IHttpRequestQuery.js.map +1 -0
  65. package/dist/es/models/protocol/IHttpResponse.js +2 -0
  66. package/dist/es/models/protocol/IHttpResponse.js.map +1 -0
  67. package/dist/es/models/protocol/IHttpServerRequest.js +2 -0
  68. package/dist/es/models/protocol/IHttpServerRequest.js.map +1 -0
  69. package/dist/es/models/protocol/ISocketRequestContext.js +2 -0
  70. package/dist/es/models/protocol/ISocketRequestContext.js.map +1 -0
  71. package/dist/es/models/protocol/ISocketServerRequest.js +2 -0
  72. package/dist/es/models/protocol/ISocketServerRequest.js.map +1 -0
  73. package/dist/es/models/requests/INoContentRequest.js +2 -0
  74. package/dist/es/models/requests/INoContentRequest.js.map +1 -0
  75. package/dist/es/models/responses/errors/IBadRequestResponse.js +2 -0
  76. package/dist/es/models/responses/errors/IBadRequestResponse.js.map +1 -0
  77. package/dist/es/models/responses/errors/IConflictResponse.js +2 -0
  78. package/dist/es/models/responses/errors/IConflictResponse.js.map +1 -0
  79. package/dist/es/models/responses/errors/IForbiddenResponse.js +2 -0
  80. package/dist/es/models/responses/errors/IForbiddenResponse.js.map +1 -0
  81. package/dist/es/models/responses/errors/IInternalServerErrorResponse.js +2 -0
  82. package/dist/es/models/responses/errors/IInternalServerErrorResponse.js.map +1 -0
  83. package/dist/es/models/responses/errors/INotFoundResponse.js +2 -0
  84. package/dist/es/models/responses/errors/INotFoundResponse.js.map +1 -0
  85. package/dist/es/models/responses/errors/INotImplementedResponse.js +2 -0
  86. package/dist/es/models/responses/errors/INotImplementedResponse.js.map +1 -0
  87. package/dist/es/models/responses/errors/ITooManyRequestsResponse.js +2 -0
  88. package/dist/es/models/responses/errors/ITooManyRequestsResponse.js.map +1 -0
  89. package/dist/es/models/responses/errors/IUnauthorizedResponse.js +2 -0
  90. package/dist/es/models/responses/errors/IUnauthorizedResponse.js.map +1 -0
  91. package/dist/es/models/responses/errors/IUnprocessableEntityResponse.js +2 -0
  92. package/dist/es/models/responses/errors/IUnprocessableEntityResponse.js.map +1 -0
  93. package/dist/es/models/responses/success/IAcceptedResponse.js +2 -0
  94. package/dist/es/models/responses/success/IAcceptedResponse.js.map +1 -0
  95. package/dist/es/models/responses/success/ICreatedResponse.js +2 -0
  96. package/dist/es/models/responses/success/ICreatedResponse.js.map +1 -0
  97. package/dist/es/models/responses/success/INoContentResponse.js +2 -0
  98. package/dist/es/models/responses/success/INoContentResponse.js.map +1 -0
  99. package/dist/es/models/responses/success/IOkResponse.js +2 -0
  100. package/dist/es/models/responses/success/IOkResponse.js.map +1 -0
  101. package/dist/es/models/routes/IBaseRoute.js +4 -0
  102. package/dist/es/models/routes/IBaseRoute.js.map +1 -0
  103. package/dist/es/models/routes/IBaseRouteEntryPoint.js +2 -0
  104. package/dist/es/models/routes/IBaseRouteEntryPoint.js.map +1 -0
  105. package/dist/es/models/routes/IRestRoute.js +2 -0
  106. package/dist/es/models/routes/IRestRoute.js.map +1 -0
  107. package/dist/es/models/routes/IRestRouteEntryPoint.js +2 -0
  108. package/dist/es/models/routes/IRestRouteEntryPoint.js.map +1 -0
  109. package/dist/es/models/routes/IRestRouteExample.js +4 -0
  110. package/dist/es/models/routes/IRestRouteExample.js.map +1 -0
  111. package/dist/es/models/routes/IRestRouteRequestExample.js +2 -0
  112. package/dist/es/models/routes/IRestRouteRequestExample.js.map +1 -0
  113. package/dist/es/models/routes/IRestRouteResponseAttachmentOptions.js +4 -0
  114. package/dist/es/models/routes/IRestRouteResponseAttachmentOptions.js.map +1 -0
  115. package/dist/es/models/routes/IRestRouteResponseExample.js +2 -0
  116. package/dist/es/models/routes/IRestRouteResponseExample.js.map +1 -0
  117. package/dist/es/models/routes/IRestRouteResponseOptions.js +2 -0
  118. package/dist/es/models/routes/IRestRouteResponseOptions.js.map +1 -0
  119. package/dist/es/models/routes/ISocketRoute.js +2 -0
  120. package/dist/es/models/routes/ISocketRoute.js.map +1 -0
  121. package/dist/es/models/routes/ISocketRouteEntryPoint.js +2 -0
  122. package/dist/es/models/routes/ISocketRouteEntryPoint.js.map +1 -0
  123. package/dist/es/models/routes/ITag.js +4 -0
  124. package/dist/es/models/routes/ITag.js.map +1 -0
  125. package/dist/es/models/routes/httpBodyLimit.js +17 -0
  126. package/dist/es/models/routes/httpBodyLimit.js.map +1 -0
  127. package/dist/es/models/server/IBaseRouteProcessor.js +2 -0
  128. package/dist/es/models/server/IBaseRouteProcessor.js.map +1 -0
  129. package/dist/es/models/server/IMimeTypeProcessor.js +2 -0
  130. package/dist/es/models/server/IMimeTypeProcessor.js.map +1 -0
  131. package/dist/es/models/server/IRestRouteProcessor.js +2 -0
  132. package/dist/es/models/server/IRestRouteProcessor.js.map +1 -0
  133. package/dist/es/models/server/ISocketRouteProcessor.js +2 -0
  134. package/dist/es/models/server/ISocketRouteProcessor.js.map +1 -0
  135. package/dist/es/models/server/IWebServer.js +2 -0
  136. package/dist/es/models/server/IWebServer.js.map +1 -0
  137. package/dist/es/models/server/IWebServerOptions.js +2 -0
  138. package/dist/es/models/server/IWebServerOptions.js.map +1 -0
  139. package/dist/es/models/services/IHealthApplicationCallback.js +2 -0
  140. package/dist/es/models/services/IHealthApplicationCallback.js.map +1 -0
  141. package/dist/es/models/services/IHealthComponent.js +2 -0
  142. package/dist/es/models/services/IHealthComponent.js.map +1 -0
  143. package/dist/es/models/services/IHealthProviderComponent.js +2 -0
  144. package/dist/es/models/services/IHealthProviderComponent.js.map +1 -0
  145. package/dist/es/models/services/IInformationComponent.js +2 -0
  146. package/dist/es/models/services/IInformationComponent.js.map +1 -0
  147. package/dist/es/models/services/IPlatformComponent.js +2 -0
  148. package/dist/es/models/services/IPlatformComponent.js.map +1 -0
  149. package/dist/es/models/services/IServerInfo.js +4 -0
  150. package/dist/es/models/services/IServerInfo.js.map +1 -0
  151. package/dist/es/models/services/ITenant.js +4 -0
  152. package/dist/es/models/services/ITenant.js.map +1 -0
  153. package/dist/es/models/services/ITenantAdminComponent.js +2 -0
  154. package/dist/es/models/services/ITenantAdminComponent.js.map +1 -0
  155. package/dist/types/errors/forbiddenError.d.ts +20 -0
  156. package/dist/types/errors/tooManyRequestsError.d.ts +22 -0
  157. package/dist/types/factories/mimeTypeProcessorFactory.d.ts +6 -0
  158. package/dist/types/factories/restClientProcessorFactory.d.ts +6 -0
  159. package/dist/types/factories/restRouteProcessorFactory.d.ts +6 -0
  160. package/dist/types/factories/socketRouteProcessorFactory.d.ts +6 -0
  161. package/dist/types/helpers/httpErrorHelper.d.ts +32 -0
  162. package/dist/types/helpers/httpHeaderHelper.d.ts +62 -0
  163. package/dist/types/helpers/httpParameterHelper.d.ts +29 -0
  164. package/dist/types/helpers/httpUrlHelper.d.ts +73 -0
  165. package/dist/types/helpers/scopeHelper.d.ts +27 -0
  166. package/dist/types/index.d.ts +75 -0
  167. package/dist/types/models/IHealth.d.ts +42 -0
  168. package/dist/types/models/api/IServerFavIconResponse.d.ts +23 -0
  169. package/dist/types/models/api/IServerHealthResponse.d.ts +14 -0
  170. package/dist/types/models/api/IServerInfoResponse.d.ts +10 -0
  171. package/dist/types/models/api/IServerLivezResponse.d.ts +16 -0
  172. package/dist/types/models/api/IServerReadyzResponse.d.ts +16 -0
  173. package/dist/types/models/api/IServerRootResponse.d.ts +16 -0
  174. package/dist/types/models/api/IServerSpecResponse.d.ts +14 -0
  175. package/dist/types/models/client/IRestClientProcessor.d.ts +22 -0
  176. package/dist/types/models/client/IRestClientProcessorContext.d.ts +42 -0
  177. package/dist/types/models/config/IBaseRestClientConfig.d.ts +46 -0
  178. package/dist/types/models/config/IBaseSocketClientConfig.d.ts +22 -0
  179. package/dist/types/models/healthCategory.d.ts +17 -0
  180. package/dist/types/models/healthStatus.d.ts +21 -0
  181. package/dist/types/models/httpContextIdKeys.d.ts +42 -0
  182. package/dist/types/models/protocol/IHttpRequest.d.ts +24 -0
  183. package/dist/types/models/protocol/IHttpRequestContext.d.ts +20 -0
  184. package/dist/types/models/protocol/IHttpRequestPathParams.d.ts +6 -0
  185. package/dist/types/models/protocol/IHttpRequestQuery.d.ts +6 -0
  186. package/dist/types/models/protocol/IHttpResponse.d.ts +18 -0
  187. package/dist/types/models/protocol/IHttpServerRequest.d.ts +15 -0
  188. package/dist/types/models/protocol/ISocketRequestContext.d.ts +10 -0
  189. package/dist/types/models/protocol/ISocketServerRequest.d.ts +10 -0
  190. package/dist/types/models/requests/INoContentRequest.d.ts +22 -0
  191. package/dist/types/models/responses/errors/IBadRequestResponse.d.ts +15 -0
  192. package/dist/types/models/responses/errors/IConflictResponse.d.ts +15 -0
  193. package/dist/types/models/responses/errors/IForbiddenResponse.d.ts +15 -0
  194. package/dist/types/models/responses/errors/IInternalServerErrorResponse.d.ts +15 -0
  195. package/dist/types/models/responses/errors/INotFoundResponse.d.ts +20 -0
  196. package/dist/types/models/responses/errors/INotImplementedResponse.d.ts +15 -0
  197. package/dist/types/models/responses/errors/ITooManyRequestsResponse.d.ts +15 -0
  198. package/dist/types/models/responses/errors/IUnauthorizedResponse.d.ts +15 -0
  199. package/dist/types/models/responses/errors/IUnprocessableEntityResponse.d.ts +15 -0
  200. package/dist/types/models/responses/success/IAcceptedResponse.d.ts +19 -0
  201. package/dist/types/models/responses/success/ICreatedResponse.d.ts +19 -0
  202. package/dist/types/models/responses/success/INoContentResponse.d.ts +10 -0
  203. package/dist/types/models/responses/success/IOkResponse.d.ts +10 -0
  204. package/dist/types/models/routes/IBaseRoute.d.ts +30 -0
  205. package/dist/types/models/routes/IBaseRouteEntryPoint.d.ts +22 -0
  206. package/dist/types/models/routes/IRestRoute.d.ts +80 -0
  207. package/dist/types/models/routes/IRestRouteEntryPoint.d.ts +6 -0
  208. package/dist/types/models/routes/IRestRouteExample.d.ts +13 -0
  209. package/dist/types/models/routes/IRestRouteRequestExample.d.ts +10 -0
  210. package/dist/types/models/routes/IRestRouteResponseAttachmentOptions.d.ts +17 -0
  211. package/dist/types/models/routes/IRestRouteResponseExample.d.ts +10 -0
  212. package/dist/types/models/routes/IRestRouteResponseOptions.d.ts +10 -0
  213. package/dist/types/models/routes/ISocketRoute.d.ts +41 -0
  214. package/dist/types/models/routes/ISocketRouteEntryPoint.d.ts +6 -0
  215. package/dist/types/models/routes/ITag.d.ts +13 -0
  216. package/dist/types/models/routes/httpBodyLimit.d.ts +17 -0
  217. package/dist/types/models/server/IBaseRouteProcessor.d.ts +49 -0
  218. package/dist/types/models/server/IMimeTypeProcessor.d.ts +17 -0
  219. package/dist/types/models/server/IRestRouteProcessor.d.ts +24 -0
  220. package/dist/types/models/server/ISocketRouteProcessor.d.ts +38 -0
  221. package/dist/types/models/server/IWebServer.d.ts +36 -0
  222. package/dist/types/models/server/IWebServerOptions.d.ts +54 -0
  223. package/dist/types/models/services/IHealthApplicationCallback.d.ts +6 -0
  224. package/dist/types/models/services/IHealthComponent.d.ts +16 -0
  225. package/dist/types/models/services/IHealthProviderComponent.d.ts +31 -0
  226. package/dist/types/models/services/IInformationComponent.d.ts +41 -0
  227. package/dist/types/models/services/IPlatformComponent.d.ts +24 -0
  228. package/dist/types/models/services/IServerInfo.d.ts +13 -0
  229. package/dist/types/models/services/ITenant.d.ts +37 -0
  230. package/dist/types/models/services/ITenantAdminComponent.d.ts +70 -0
  231. package/docs/changelog.md +0 -0
  232. package/docs/examples.md +200 -0
  233. package/docs/reference/classes/ForbiddenError.md +55 -0
  234. package/docs/reference/classes/HttpErrorHelper.md +99 -0
  235. package/docs/reference/classes/HttpHeaderHelper.md +182 -0
  236. package/docs/reference/classes/HttpParameterHelper.md +125 -0
  237. package/docs/reference/classes/HttpUrlHelper.md +262 -0
  238. package/docs/reference/classes/ScopeHelper.md +88 -0
  239. package/docs/reference/classes/TooManyRequestsError.md +67 -0
  240. package/docs/reference/index.md +92 -0
  241. package/docs/reference/interfaces/IAcceptedResponse.md +25 -0
  242. package/docs/reference/interfaces/IBadRequestResponse.md +19 -0
  243. package/docs/reference/interfaces/IBaseRestClientConfig.md +99 -0
  244. package/docs/reference/interfaces/IBaseRoute.md +57 -0
  245. package/docs/reference/interfaces/IBaseRouteEntryPoint.md +55 -0
  246. package/docs/reference/interfaces/IBaseRouteProcessor.md +146 -0
  247. package/docs/reference/interfaces/IBaseSocketClientConfig.md +35 -0
  248. package/docs/reference/interfaces/IConflictResponse.md +19 -0
  249. package/docs/reference/interfaces/ICreatedResponse.md +25 -0
  250. package/docs/reference/interfaces/IForbiddenResponse.md +19 -0
  251. package/docs/reference/interfaces/IHealth.md +71 -0
  252. package/docs/reference/interfaces/IHealthComponent.md +21 -0
  253. package/docs/reference/interfaces/IHealthProviderComponent.md +76 -0
  254. package/docs/reference/interfaces/IHttpRequest.md +46 -0
  255. package/docs/reference/interfaces/IHttpRequestContext.md +35 -0
  256. package/docs/reference/interfaces/IHttpRequestPathParams.md +7 -0
  257. package/docs/reference/interfaces/IHttpRequestQuery.md +7 -0
  258. package/docs/reference/interfaces/IHttpResponse.md +33 -0
  259. package/docs/reference/interfaces/IHttpServerRequest.md +81 -0
  260. package/docs/reference/interfaces/IInformationComponent.md +91 -0
  261. package/docs/reference/interfaces/IInternalServerErrorResponse.md +19 -0
  262. package/docs/reference/interfaces/IMimeTypeProcessor.md +43 -0
  263. package/docs/reference/interfaces/INoContentRequest.md +55 -0
  264. package/docs/reference/interfaces/INoContentResponse.md +11 -0
  265. package/docs/reference/interfaces/INotFoundResponse.md +27 -0
  266. package/docs/reference/interfaces/INotImplementedResponse.md +19 -0
  267. package/docs/reference/interfaces/IOkResponse.md +11 -0
  268. package/docs/reference/interfaces/IPlatformComponent.md +65 -0
  269. package/docs/reference/interfaces/IRestClientProcessor.md +69 -0
  270. package/docs/reference/interfaces/IRestClientProcessorContext.md +75 -0
  271. package/docs/reference/interfaces/IRestRoute.md +209 -0
  272. package/docs/reference/interfaces/IRestRouteExample.md +24 -0
  273. package/docs/reference/interfaces/IRestRouteProcessor.md +191 -0
  274. package/docs/reference/interfaces/IRestRouteRequestExample.md +45 -0
  275. package/docs/reference/interfaces/IRestRouteResponseAttachmentOptions.md +27 -0
  276. package/docs/reference/interfaces/IRestRouteResponseExample.md +45 -0
  277. package/docs/reference/interfaces/IRestRouteResponseOptions.md +11 -0
  278. package/docs/reference/interfaces/IServerFavIconResponse.md +33 -0
  279. package/docs/reference/interfaces/IServerHealthResponse.md +19 -0
  280. package/docs/reference/interfaces/IServerInfo.md +19 -0
  281. package/docs/reference/interfaces/IServerInfoResponse.md +11 -0
  282. package/docs/reference/interfaces/IServerLivezResponse.md +23 -0
  283. package/docs/reference/interfaces/IServerReadyzResponse.md +23 -0
  284. package/docs/reference/interfaces/IServerRootResponse.md +23 -0
  285. package/docs/reference/interfaces/IServerSpecResponse.md +19 -0
  286. package/docs/reference/interfaces/ISocketRequestContext.md +55 -0
  287. package/docs/reference/interfaces/ISocketRoute.md +162 -0
  288. package/docs/reference/interfaces/ISocketRouteProcessor.md +261 -0
  289. package/docs/reference/interfaces/ISocketServerRequest.md +93 -0
  290. package/docs/reference/interfaces/ITag.md +19 -0
  291. package/docs/reference/interfaces/ITenant.md +67 -0
  292. package/docs/reference/interfaces/ITenantAdminComponent.md +227 -0
  293. package/docs/reference/interfaces/ITooManyRequestsResponse.md +19 -0
  294. package/docs/reference/interfaces/IUnauthorizedResponse.md +19 -0
  295. package/docs/reference/interfaces/IUnprocessableEntityResponse.md +19 -0
  296. package/docs/reference/interfaces/IWebServer.md +109 -0
  297. package/docs/reference/interfaces/IWebServerOptions.md +113 -0
  298. package/docs/reference/type-aliases/HealthApplicationCallback.md +16 -0
  299. package/docs/reference/type-aliases/HealthCategory.md +5 -0
  300. package/docs/reference/type-aliases/HealthStatus.md +5 -0
  301. package/docs/reference/type-aliases/HttpBodyLimit.md +5 -0
  302. package/docs/reference/type-aliases/HttpContextIdKeys.md +5 -0
  303. package/docs/reference/type-aliases/IRestRouteEntryPoint.md +5 -0
  304. package/docs/reference/type-aliases/ISocketRouteEntryPoint.md +5 -0
  305. package/docs/reference/variables/HealthCategory.md +19 -0
  306. package/docs/reference/variables/HealthStatus.md +25 -0
  307. package/docs/reference/variables/HttpBodyLimit.md +19 -0
  308. package/docs/reference/variables/HttpContextIdKeys.md +56 -0
  309. package/docs/reference/variables/MimeTypeProcessorFactory.md +5 -0
  310. package/docs/reference/variables/RestClientProcessorFactory.md +5 -0
  311. package/docs/reference/variables/RestRouteProcessorFactory.md +5 -0
  312. package/docs/reference/variables/SocketRouteProcessorFactory.md +5 -0
  313. package/locales/en.json +8 -0
  314. package/package.json +53 -5
@@ -0,0 +1,156 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { Is, StringHelper } from "@3sixty/core";
4
+ /**
5
+ * Class to help with handling http URLs.
6
+ */
7
+ export class HttpUrlHelper {
8
+ /**
9
+ * Extract the origin from the url which includes protocol,host,port.
10
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/URL/origin
11
+ * @param url The url to extract the origin from.
12
+ * @returns The extracted origin.
13
+ */
14
+ static extractOrigin(url) {
15
+ try {
16
+ const convertedUrl = new URL(url);
17
+ return convertedUrl.origin;
18
+ }
19
+ catch { }
20
+ }
21
+ /**
22
+ * Extract the path from the url.
23
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/URL/pathname
24
+ * @param url The url to extract the path from.
25
+ * @returns The extracted path.
26
+ */
27
+ static extractPath(url) {
28
+ try {
29
+ const convertedUrl = new URL(url);
30
+ return convertedUrl.pathname;
31
+ }
32
+ catch { }
33
+ }
34
+ /**
35
+ * Extract the search from the url.
36
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/URL/search
37
+ * @param url The url to extract the search from.
38
+ * @returns The extracted search.
39
+ */
40
+ static extractSearch(url) {
41
+ try {
42
+ const convertedUrl = new URL(url);
43
+ return convertedUrl.search;
44
+ }
45
+ catch { }
46
+ }
47
+ /**
48
+ * Extract the path and search from the url.
49
+ * @param url The url to extract the path and search from.
50
+ * @returns The extracted path and search.
51
+ */
52
+ static extractPathAndSearch(url) {
53
+ try {
54
+ const convertedUrl = new URL(url);
55
+ return `${convertedUrl.pathname}${convertedUrl.search}`;
56
+ }
57
+ catch { }
58
+ }
59
+ /**
60
+ * Combine an optional origin and an optional path into a single URL string.
61
+ * Relative paths (no protocol, no leading slash) have a leading slash prepended.
62
+ * Trailing slashes are trimmed from the origin before joining.
63
+ * Returns undefined when both arguments are absent or empty.
64
+ * @param origin The optional origin (e.g. "https://example.com").
65
+ * @param path The optional path or URL template (e.g. "/api/items" or "api/items").
66
+ * @returns The combined string, or undefined when both are absent.
67
+ */
68
+ static combineOriginPath(origin, path) {
69
+ const normalizedPath = Is.stringValue(path) && !path.includes("://")
70
+ ? `/${StringHelper.trimLeadingSlashes(path)}`
71
+ : path;
72
+ if (Is.stringValue(origin) && Is.stringValue(normalizedPath)) {
73
+ return `${StringHelper.trimTrailingSlashes(origin)}${normalizedPath}`;
74
+ }
75
+ else if (Is.stringValue(origin)) {
76
+ return origin;
77
+ }
78
+ else if (Is.stringValue(normalizedPath)) {
79
+ return normalizedPath;
80
+ }
81
+ }
82
+ /**
83
+ * Encode a single URL path segment per RFC 3986 §3.3.
84
+ * Unlike encodeURIComponent, sub-delimiters ($ & + , ; =) and the colon and
85
+ * at-sign characters that are valid unencoded in path segments are preserved.
86
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-3.3
87
+ * @param segment The raw path segment value to encode.
88
+ * @returns The percent-encoded path segment.
89
+ */
90
+ static encodeUriPathSegment(segment) {
91
+ // RFC 3986 §3.3: only encode characters outside the allowed path segment set.
92
+ // Allowed: unreserved (A-Za-z0-9 - . _ ~), sub-delimiters (! $ & ' ( ) * + , ; =), and : @
93
+ return segment.replace(/[^\w!$&'()*+,.:;=@~-]/g, ch => encodeURIComponent(ch));
94
+ }
95
+ /**
96
+ * Replace the origin in the url.
97
+ * @param url The url to replace the origin in.
98
+ * @param newOrigin The new origin to use.
99
+ * @returns The url with the replaced origin.
100
+ */
101
+ static replaceOrigin(url, newOrigin) {
102
+ if (!Is.stringValue(url) || !Is.stringValue(newOrigin) || !newOrigin.startsWith("http")) {
103
+ return url;
104
+ }
105
+ try {
106
+ const parsedUrl = new URL(url.startsWith("/") ? `http://placeholder${url}` : url);
107
+ const newParsedUrl = new URL(newOrigin);
108
+ parsedUrl.protocol = newParsedUrl.protocol;
109
+ parsedUrl.host = newParsedUrl.host;
110
+ parsedUrl.port = newParsedUrl.port;
111
+ return parsedUrl.toString();
112
+ }
113
+ catch { }
114
+ return url;
115
+ }
116
+ /**
117
+ * Add a query string parameter to the url.
118
+ * @param url The url to add the query string parameter to.
119
+ * @param key The key of the query string parameter.
120
+ * @param value The value of the query string parameter.
121
+ * @returns The url with the added query string parameter.
122
+ */
123
+ static addQueryStringParam(url, key, value) {
124
+ if (!Is.stringValue(url) || !Is.stringValue(key) || !Is.stringValue(value)) {
125
+ return url;
126
+ }
127
+ try {
128
+ const isRelative = url.startsWith("/");
129
+ const parsedUrl = new URL(isRelative ? `http://placeholder${url}` : url);
130
+ parsedUrl.searchParams.set(key, value);
131
+ return isRelative
132
+ ? `${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`
133
+ : parsedUrl.toString();
134
+ }
135
+ catch { }
136
+ return url;
137
+ }
138
+ /**
139
+ * Get a query string parameter from the url.
140
+ * @param url The url to get the query string parameter from.
141
+ * @param key The key of the query string parameter.
142
+ * @returns The value of the query string parameter.
143
+ */
144
+ static getQueryStringParam(url, key) {
145
+ if (!Is.stringValue(url) || !Is.stringValue(key)) {
146
+ return undefined;
147
+ }
148
+ try {
149
+ const parsedUrl = new URL(url);
150
+ return parsedUrl.searchParams.get(key) ?? undefined;
151
+ }
152
+ catch { }
153
+ return undefined;
154
+ }
155
+ }
156
+ //# sourceMappingURL=httpUrlHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpUrlHelper.js","sourceRoot":"","sources":["../../../src/helpers/httpUrlHelper.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,aAAa;IACzB;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,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;QACrD,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QAEV,OAAO,SAAS,CAAC;IAClB,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { Is, StringHelper } from \"@3sixty/core\";\n\n/**\n * Class to help with handling http URLs.\n */\nexport class HttpUrlHelper {\n\t/**\n\t * Extract the origin from the url which includes protocol,host,port.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/URL/origin\n\t * @param url The url to extract the origin from.\n\t * @returns The extracted origin.\n\t */\n\tpublic static extractOrigin(url: string): string | undefined {\n\t\ttry {\n\t\t\tconst convertedUrl = new URL(url);\n\t\t\treturn convertedUrl.origin;\n\t\t} catch {}\n\t}\n\n\t/**\n\t * Extract the path from the url.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/URL/pathname\n\t * @param url The url to extract the path from.\n\t * @returns The extracted path.\n\t */\n\tpublic static extractPath(url: string): string | undefined {\n\t\ttry {\n\t\t\tconst convertedUrl = new URL(url);\n\t\t\treturn convertedUrl.pathname;\n\t\t} catch {}\n\t}\n\n\t/**\n\t * Extract the search from the url.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/URL/search\n\t * @param url The url to extract the search from.\n\t * @returns The extracted search.\n\t */\n\tpublic static extractSearch(url: string): string | undefined {\n\t\ttry {\n\t\t\tconst convertedUrl = new URL(url);\n\t\t\treturn convertedUrl.search;\n\t\t} catch {}\n\t}\n\n\t/**\n\t * Extract the path and search from the url.\n\t * @param url The url to extract the path and search from.\n\t * @returns The extracted path and search.\n\t */\n\tpublic static extractPathAndSearch(url: string): string | undefined {\n\t\ttry {\n\t\t\tconst convertedUrl = new URL(url);\n\t\t\treturn `${convertedUrl.pathname}${convertedUrl.search}`;\n\t\t} catch {}\n\t}\n\n\t/**\n\t * Combine an optional origin and an optional path into a single URL string.\n\t * Relative paths (no protocol, no leading slash) have a leading slash prepended.\n\t * Trailing slashes are trimmed from the origin before joining.\n\t * Returns undefined when both arguments are absent or empty.\n\t * @param origin The optional origin (e.g. \"https://example.com\").\n\t * @param path The optional path or URL template (e.g. \"/api/items\" or \"api/items\").\n\t * @returns The combined string, or undefined when both are absent.\n\t */\n\tpublic static combineOriginPath(origin?: string, path?: string): string | undefined {\n\t\tconst normalizedPath =\n\t\t\tIs.stringValue(path) && !path.includes(\"://\")\n\t\t\t\t? `/${StringHelper.trimLeadingSlashes(path)}`\n\t\t\t\t: path;\n\n\t\tif (Is.stringValue(origin) && Is.stringValue(normalizedPath)) {\n\t\t\treturn `${StringHelper.trimTrailingSlashes(origin)}${normalizedPath}`;\n\t\t} else if (Is.stringValue(origin)) {\n\t\t\treturn origin;\n\t\t} else if (Is.stringValue(normalizedPath)) {\n\t\t\treturn normalizedPath;\n\t\t}\n\t}\n\n\t/**\n\t * Encode a single URL path segment per RFC 3986 §3.3.\n\t * Unlike encodeURIComponent, sub-delimiters ($ & + , ; =) and the colon and\n\t * at-sign characters that are valid unencoded in path segments are preserved.\n\t * @see https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\n\t * @param segment The raw path segment value to encode.\n\t * @returns The percent-encoded path segment.\n\t */\n\tpublic static encodeUriPathSegment(segment: string): string {\n\t\t// RFC 3986 §3.3: only encode characters outside the allowed path segment set.\n\t\t// Allowed: unreserved (A-Za-z0-9 - . _ ~), sub-delimiters (! $ & ' ( ) * + , ; =), and : @\n\t\treturn segment.replace(/[^\\w!$&'()*+,.:;=@~-]/g, ch => encodeURIComponent(ch));\n\t}\n\n\t/**\n\t * Replace the origin in the url.\n\t * @param url The url to replace the origin in.\n\t * @param newOrigin The new origin to use.\n\t * @returns The url with the replaced origin.\n\t */\n\tpublic static replaceOrigin(url: string, newOrigin?: string): string {\n\t\tif (!Is.stringValue(url) || !Is.stringValue(newOrigin) || !newOrigin.startsWith(\"http\")) {\n\t\t\treturn url;\n\t\t}\n\n\t\ttry {\n\t\t\tconst parsedUrl = new URL(url.startsWith(\"/\") ? `http://placeholder${url}` : url);\n\t\t\tconst newParsedUrl = new URL(newOrigin);\n\t\t\tparsedUrl.protocol = newParsedUrl.protocol;\n\t\t\tparsedUrl.host = newParsedUrl.host;\n\t\t\tparsedUrl.port = newParsedUrl.port;\n\t\t\treturn parsedUrl.toString();\n\t\t} catch {}\n\n\t\treturn url;\n\t}\n\n\t/**\n\t * Add a query string parameter to the url.\n\t * @param url The url to add the query string parameter to.\n\t * @param key The key of the query string parameter.\n\t * @param value The value of the query string parameter.\n\t * @returns The url with the added query string parameter.\n\t */\n\tpublic static addQueryStringParam(url: string, key: string, value: string): string {\n\t\tif (!Is.stringValue(url) || !Is.stringValue(key) || !Is.stringValue(value)) {\n\t\t\treturn url;\n\t\t}\n\n\t\ttry {\n\t\t\tconst isRelative = url.startsWith(\"/\");\n\t\t\tconst parsedUrl = new URL(isRelative ? `http://placeholder${url}` : url);\n\t\t\tparsedUrl.searchParams.set(key, value);\n\t\t\treturn isRelative\n\t\t\t\t? `${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`\n\t\t\t\t: parsedUrl.toString();\n\t\t} catch {}\n\n\t\treturn url;\n\t}\n\n\t/**\n\t * Get a query string parameter from the url.\n\t * @param url The url to get the query string parameter from.\n\t * @param key The key of the query string parameter.\n\t * @returns The value of the query string parameter.\n\t */\n\tpublic static getQueryStringParam(url: string, key: string): string | undefined {\n\t\tif (!Is.stringValue(url) || !Is.stringValue(key)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\ttry {\n\t\t\tconst parsedUrl = new URL(url);\n\t\t\treturn parsedUrl.searchParams.get(key) ?? undefined;\n\t\t} catch {}\n\n\t\treturn undefined;\n\t}\n}\n"]}
@@ -0,0 +1,46 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { Is } from "@3sixty/core";
4
+ /**
5
+ * Helper methods for working with scope values stored as comma-separated strings.
6
+ */
7
+ export class ScopeHelper {
8
+ /**
9
+ * Converts a scope value to a normalised lowercase array. Accepts either a comma-separated
10
+ * string or an already-split array, so callers do not need to branch on input type.
11
+ * Returns an empty array for an empty or undefined input.
12
+ * @param scope The comma-separated scope string, or an array of scope entries.
13
+ * @returns The scope entries as a trimmed, lowercase array.
14
+ */
15
+ static toArray(scope) {
16
+ if (Array.isArray(scope)) {
17
+ return scope.map(s => s.trim().toLocaleLowerCase()).filter(s => s.length > 0);
18
+ }
19
+ if (!Is.stringValue(scope)) {
20
+ return [];
21
+ }
22
+ return scope
23
+ .split(",")
24
+ .map(s => s.trim().toLocaleLowerCase())
25
+ .filter(s => s.length > 0);
26
+ }
27
+ /**
28
+ * Joins a scope array into a normalised comma-separated string, trimming and lowercasing each entry.
29
+ * @param scopes The scope entries to join.
30
+ * @returns The comma-separated scope string.
31
+ */
32
+ static toString(scopes) {
33
+ return scopes.map(s => s.trim().toLocaleLowerCase()).join(",");
34
+ }
35
+ /**
36
+ * Returns true if the scope includes the specified value. Accepts either a
37
+ * comma-separated string or an array, matching the input forms accepted by toArray.
38
+ * @param scope The comma-separated scope string or array to search.
39
+ * @param value The scope value to look for.
40
+ * @returns True when value is present in the scope.
41
+ */
42
+ static includes(scope, value) {
43
+ return ScopeHelper.toArray(scope).includes(value);
44
+ }
45
+ }
46
+ //# sourceMappingURL=scopeHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopeHelper.js","sourceRoot":"","sources":["../../../src/helpers/scopeHelper.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;GAEG;AACH,MAAM,OAAO,WAAW;IACvB;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,CAAC,KAAoC;QACzD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC/E,CAAC;QACD,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,EAAE,CAAC;QACX,CAAC;QACD,OAAO,KAAK;aACV,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAC;aACtC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,QAAQ,CAAC,MAAgB;QACtC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,QAAQ,CAAC,KAAoC,EAAE,KAAa;QACzE,OAAO,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;CACD","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { Is } from \"@3sixty/core\";\n\n/**\n * Helper methods for working with scope values stored as comma-separated strings.\n */\nexport class ScopeHelper {\n\t/**\n\t * Converts a scope value to a normalised lowercase array. Accepts either a comma-separated\n\t * string or an already-split array, so callers do not need to branch on input type.\n\t * Returns an empty array for an empty or undefined input.\n\t * @param scope The comma-separated scope string, or an array of scope entries.\n\t * @returns The scope entries as a trimmed, lowercase array.\n\t */\n\tpublic static toArray(scope: string | string[] | undefined): string[] {\n\t\tif (Array.isArray(scope)) {\n\t\t\treturn scope.map(s => s.trim().toLocaleLowerCase()).filter(s => s.length > 0);\n\t\t}\n\t\tif (!Is.stringValue(scope)) {\n\t\t\treturn [];\n\t\t}\n\t\treturn scope\n\t\t\t.split(\",\")\n\t\t\t.map(s => s.trim().toLocaleLowerCase())\n\t\t\t.filter(s => s.length > 0);\n\t}\n\n\t/**\n\t * Joins a scope array into a normalised comma-separated string, trimming and lowercasing each entry.\n\t * @param scopes The scope entries to join.\n\t * @returns The comma-separated scope string.\n\t */\n\tpublic static toString(scopes: string[]): string {\n\t\treturn scopes.map(s => s.trim().toLocaleLowerCase()).join(\",\");\n\t}\n\n\t/**\n\t * Returns true if the scope includes the specified value. Accepts either a\n\t * comma-separated string or an array, matching the input forms accepted by toArray.\n\t * @param scope The comma-separated scope string or array to search.\n\t * @param value The scope value to look for.\n\t * @returns True when value is present in the scope.\n\t */\n\tpublic static includes(scope: string | string[] | undefined, value: string): boolean {\n\t\treturn ScopeHelper.toArray(scope).includes(value);\n\t}\n}\n"]}
@@ -0,0 +1,78 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export * from "./errors/forbiddenError.js";
4
+ export * from "./errors/tooManyRequestsError.js";
5
+ export * from "./factories/mimeTypeProcessorFactory.js";
6
+ export * from "./factories/restClientProcessorFactory.js";
7
+ export * from "./factories/restRouteProcessorFactory.js";
8
+ export * from "./factories/socketRouteProcessorFactory.js";
9
+ export * from "./helpers/httpErrorHelper.js";
10
+ export * from "./helpers/httpHeaderHelper.js";
11
+ export * from "./helpers/httpParameterHelper.js";
12
+ export * from "./helpers/httpUrlHelper.js";
13
+ export * from "./helpers/scopeHelper.js";
14
+ export * from "./models/api/IServerFavIconResponse.js";
15
+ export * from "./models/api/IServerHealthResponse.js";
16
+ export * from "./models/api/IServerInfoResponse.js";
17
+ export * from "./models/api/IServerLivezResponse.js";
18
+ export * from "./models/api/IServerReadyzResponse.js";
19
+ export * from "./models/api/IServerRootResponse.js";
20
+ export * from "./models/api/IServerSpecResponse.js";
21
+ export * from "./models/client/IRestClientProcessor.js";
22
+ export * from "./models/client/IRestClientProcessorContext.js";
23
+ export * from "./models/config/IBaseRestClientConfig.js";
24
+ export * from "./models/config/IBaseSocketClientConfig.js";
25
+ export * from "./models/healthCategory.js";
26
+ export * from "./models/healthStatus.js";
27
+ export * from "./models/httpContextIdKeys.js";
28
+ export * from "./models/IHealth.js";
29
+ export * from "./models/protocol/IHttpRequest.js";
30
+ export * from "./models/protocol/IHttpRequestContext.js";
31
+ export * from "./models/protocol/IHttpRequestPathParams.js";
32
+ export * from "./models/protocol/IHttpRequestQuery.js";
33
+ export * from "./models/protocol/IHttpResponse.js";
34
+ export * from "./models/protocol/IHttpServerRequest.js";
35
+ export * from "./models/protocol/ISocketRequestContext.js";
36
+ export * from "./models/protocol/ISocketServerRequest.js";
37
+ export * from "./models/requests/INoContentRequest.js";
38
+ export * from "./models/responses/errors/IBadRequestResponse.js";
39
+ export * from "./models/responses/errors/IConflictResponse.js";
40
+ export * from "./models/responses/errors/IForbiddenResponse.js";
41
+ export * from "./models/responses/errors/IInternalServerErrorResponse.js";
42
+ export * from "./models/responses/errors/INotFoundResponse.js";
43
+ export * from "./models/responses/errors/INotImplementedResponse.js";
44
+ export * from "./models/responses/errors/ITooManyRequestsResponse.js";
45
+ export * from "./models/responses/errors/IUnauthorizedResponse.js";
46
+ export * from "./models/responses/errors/IUnprocessableEntityResponse.js";
47
+ export * from "./models/responses/success/IAcceptedResponse.js";
48
+ export * from "./models/responses/success/ICreatedResponse.js";
49
+ export * from "./models/responses/success/INoContentResponse.js";
50
+ export * from "./models/responses/success/IOkResponse.js";
51
+ export * from "./models/routes/httpBodyLimit.js";
52
+ export * from "./models/routes/IBaseRoute.js";
53
+ export * from "./models/routes/IBaseRouteEntryPoint.js";
54
+ export * from "./models/routes/IRestRoute.js";
55
+ export * from "./models/routes/IRestRouteEntryPoint.js";
56
+ export * from "./models/routes/IRestRouteExample.js";
57
+ export * from "./models/routes/IRestRouteRequestExample.js";
58
+ export * from "./models/routes/IRestRouteResponseAttachmentOptions.js";
59
+ export * from "./models/routes/IRestRouteResponseExample.js";
60
+ export * from "./models/routes/IRestRouteResponseOptions.js";
61
+ export * from "./models/routes/ISocketRoute.js";
62
+ export * from "./models/routes/ISocketRouteEntryPoint.js";
63
+ export * from "./models/routes/ITag.js";
64
+ export * from "./models/server/IBaseRouteProcessor.js";
65
+ export * from "./models/server/IMimeTypeProcessor.js";
66
+ export * from "./models/server/IRestRouteProcessor.js";
67
+ export * from "./models/server/ISocketRouteProcessor.js";
68
+ export * from "./models/server/IWebServer.js";
69
+ export * from "./models/server/IWebServerOptions.js";
70
+ export * from "./models/services/IHealthApplicationCallback.js";
71
+ export * from "./models/services/IHealthComponent.js";
72
+ export * from "./models/services/IHealthProviderComponent.js";
73
+ export * from "./models/services/IInformationComponent.js";
74
+ export * from "./models/services/IPlatformComponent.js";
75
+ export * from "./models/services/IServerInfo.js";
76
+ export * from "./models/services/ITenant.js";
77
+ export * from "./models/services/ITenantAdminComponent.js";
78
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,c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;AACxC,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./errors/forbiddenError.js\";\nexport * from \"./errors/tooManyRequestsError.js\";\nexport * from \"./factories/mimeTypeProcessorFactory.js\";\nexport * from \"./factories/restClientProcessorFactory.js\";\nexport * from \"./factories/restRouteProcessorFactory.js\";\nexport * from \"./factories/socketRouteProcessorFactory.js\";\nexport * from \"./helpers/httpErrorHelper.js\";\nexport * from \"./helpers/httpHeaderHelper.js\";\nexport * from \"./helpers/httpParameterHelper.js\";\nexport * from \"./helpers/httpUrlHelper.js\";\nexport * from \"./helpers/scopeHelper.js\";\nexport * from \"./models/api/IServerFavIconResponse.js\";\nexport * from \"./models/api/IServerHealthResponse.js\";\nexport * from \"./models/api/IServerInfoResponse.js\";\nexport * from \"./models/api/IServerLivezResponse.js\";\nexport * from \"./models/api/IServerReadyzResponse.js\";\nexport * from \"./models/api/IServerRootResponse.js\";\nexport * from \"./models/api/IServerSpecResponse.js\";\nexport * from \"./models/client/IRestClientProcessor.js\";\nexport * from \"./models/client/IRestClientProcessorContext.js\";\nexport * from \"./models/config/IBaseRestClientConfig.js\";\nexport * from \"./models/config/IBaseSocketClientConfig.js\";\nexport * from \"./models/healthCategory.js\";\nexport * from \"./models/healthStatus.js\";\nexport * from \"./models/httpContextIdKeys.js\";\nexport * from \"./models/IHealth.js\";\nexport * from \"./models/protocol/IHttpRequest.js\";\nexport * from \"./models/protocol/IHttpRequestContext.js\";\nexport * from \"./models/protocol/IHttpRequestPathParams.js\";\nexport * from \"./models/protocol/IHttpRequestQuery.js\";\nexport * from \"./models/protocol/IHttpResponse.js\";\nexport * from \"./models/protocol/IHttpServerRequest.js\";\nexport * from \"./models/protocol/ISocketRequestContext.js\";\nexport * from \"./models/protocol/ISocketServerRequest.js\";\nexport * from \"./models/requests/INoContentRequest.js\";\nexport * from \"./models/responses/errors/IBadRequestResponse.js\";\nexport * from \"./models/responses/errors/IConflictResponse.js\";\nexport * from \"./models/responses/errors/IForbiddenResponse.js\";\nexport * from \"./models/responses/errors/IInternalServerErrorResponse.js\";\nexport * from \"./models/responses/errors/INotFoundResponse.js\";\nexport * from \"./models/responses/errors/INotImplementedResponse.js\";\nexport * from \"./models/responses/errors/ITooManyRequestsResponse.js\";\nexport * from \"./models/responses/errors/IUnauthorizedResponse.js\";\nexport * from \"./models/responses/errors/IUnprocessableEntityResponse.js\";\nexport * from \"./models/responses/success/IAcceptedResponse.js\";\nexport * from \"./models/responses/success/ICreatedResponse.js\";\nexport * from \"./models/responses/success/INoContentResponse.js\";\nexport * from \"./models/responses/success/IOkResponse.js\";\nexport * from \"./models/routes/httpBodyLimit.js\";\nexport * from \"./models/routes/IBaseRoute.js\";\nexport * from \"./models/routes/IBaseRouteEntryPoint.js\";\nexport * from \"./models/routes/IRestRoute.js\";\nexport * from \"./models/routes/IRestRouteEntryPoint.js\";\nexport * from \"./models/routes/IRestRouteExample.js\";\nexport * from \"./models/routes/IRestRouteRequestExample.js\";\nexport * from \"./models/routes/IRestRouteResponseAttachmentOptions.js\";\nexport * from \"./models/routes/IRestRouteResponseExample.js\";\nexport * from \"./models/routes/IRestRouteResponseOptions.js\";\nexport * from \"./models/routes/ISocketRoute.js\";\nexport * from \"./models/routes/ISocketRouteEntryPoint.js\";\nexport * from \"./models/routes/ITag.js\";\nexport * from \"./models/server/IBaseRouteProcessor.js\";\nexport * from \"./models/server/IMimeTypeProcessor.js\";\nexport * from \"./models/server/IRestRouteProcessor.js\";\nexport * from \"./models/server/ISocketRouteProcessor.js\";\nexport * from \"./models/server/IWebServer.js\";\nexport * from \"./models/server/IWebServerOptions.js\";\nexport * from \"./models/services/IHealthApplicationCallback.js\";\nexport * from \"./models/services/IHealthComponent.js\";\nexport * from \"./models/services/IHealthProviderComponent.js\";\nexport * from \"./models/services/IInformationComponent.js\";\nexport * from \"./models/services/IPlatformComponent.js\";\nexport * from \"./models/services/IServerInfo.js\";\nexport * from \"./models/services/ITenant.js\";\nexport * from \"./models/services/ITenantAdminComponent.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IHealth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHealth.js","sourceRoot":"","sources":["../../../src/models/IHealth.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IError } from \"@3sixty/core\";\nimport type { HealthCategory } from \"./healthCategory.js\";\nimport type { HealthStatus } from \"./healthStatus.js\";\n\n/**\n * Provides health information for a component.\n */\nexport interface IHealth {\n\t/**\n\t * The source of the health information.\n\t */\n\tsource: string;\n\n\t/**\n\t * The description of the component as an i18n key.\n\t */\n\tdescription?: string;\n\n\t/**\n\t * The category of the health check.\n\t */\n\tcategory?: HealthCategory;\n\n\t/**\n\t * The overall status of the component, the entries can also report their own health.\n\t */\n\tstatus: HealthStatus;\n\n\t/**\n\t * The error details when the status is not Ok.\n\t */\n\terror?: IError;\n\n\t/**\n\t * The message for the status if there are further details to provide as an i18n key.\n\t */\n\tmessage?: string;\n\n\t/**\n\t * Data to substitute in the i18n key for the message.\n\t */\n\tdata?: { [id: string]: unknown };\n\n\t/**\n\t * The grouped child components, if any.\n\t */\n\tgrouped?: IHealth[];\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerFavIconResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerFavIconResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerFavIconResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, HttpStatusCode } from \"@3sixty/web\";\n\n/**\n * The favicon for the server.\n */\nexport interface IServerFavIconResponse {\n\t/**\n\t * Additional response headers.\n\t */\n\theaders?: {\n\t\t/**\n\t\t * The content type for the response.\n\t\t */\n\t\t[HeaderTypes.ContentType]?: string;\n\t};\n\n\t/**\n\t * Response status code.\n\t */\n\tstatusCode?: HttpStatusCode;\n\n\t/**\n\t * The favicon for the server.\n\t */\n\tbody?: Uint8Array;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerHealthResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerHealthResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerHealthResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus } from \"../healthStatus.js\";\nimport type { IHealth } from \"../IHealth.js\";\n\n/**\n * The health of the server.\n */\nexport interface IServerHealthResponse {\n\t/**\n\t * The health for the server.\n\t */\n\tbody: { status: HealthStatus; components: IHealth[] };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerInfoResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerInfoResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerInfoResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IServerInfo } from \"../services/IServerInfo.js\";\n\n/**\n * The information about the server.\n */\nexport interface IServerInfoResponse {\n\t/**\n\t * The information for the server.\n\t */\n\tbody: IServerInfo;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerLivezResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerLivezResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerLivezResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@3sixty/web\";\n\n/**\n * The livez of the server.\n */\nexport interface IServerLivezResponse {\n\t/**\n\t * The headers for the response.\n\t */\n\theaders: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.PlainText;\n\t};\n\n\t/**\n\t * The livez information for the server.\n\t */\n\tbody: \"alive\" | \"dead\";\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerReadyzResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerReadyzResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerReadyzResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@3sixty/web\";\n\n/**\n * The readyz of the server.\n */\nexport interface IServerReadyzResponse {\n\t/**\n\t * The headers for the response.\n\t */\n\theaders: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.PlainText;\n\t};\n\n\t/**\n\t * The readyz information for the server.\n\t */\n\tbody: \"ready\" | \"not ready\";\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerRootResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerRootResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerRootResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@3sixty/web\";\n\n/**\n * The root text for the server.\n */\nexport interface IServerRootResponse {\n\t/**\n\t * The headers for the response.\n\t */\n\theaders: {\n\t\t[HeaderTypes.ContentType]: typeof MimeTypes.PlainText;\n\t};\n\n\t/**\n\t * The root text for the server.\n\t */\n\tbody: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IServerSpecResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IServerSpecResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IServerSpecResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HttpStatusCode } from \"@3sixty/web\";\n\n/**\n * The OpenAPI spec for the endpoints.\n */\nexport interface IServerSpecResponse {\n\t/**\n\t * Response status code.\n\t */\n\tstatusCode?: HttpStatusCode;\n\n\t/**\n\t * The spec for the server.\n\t */\n\tbody?: unknown;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IRestClientProcessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRestClientProcessor.js","sourceRoot":"","sources":["../../../../src/models/client/IRestClientProcessor.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@3sixty/core\";\nimport type { IRestClientProcessorContext } from \"./IRestClientProcessorContext.js\";\n\n/**\n * A processor that participates in an outbound REST request.\n */\nexport interface IRestClientProcessor extends IComponent {\n\t/**\n\t * Run the processor before the fetch takes place.\n\t * @param context The details of the request being made.\n\t * @param next Performs the request, or calls the next processor in the chain.\n\t * @returns The result of next.\n\t */\n\tpre?(context: IRestClientProcessorContext, next: () => Promise<Response>): Promise<Response>;\n\n\t/**\n\t * Run the processor after the fetch completes.\n\t * @param context The details of the request that was made.\n\t * @param response The response from the request.\n\t * @param next Performs the post processing, or calls the next processor in the chain.\n\t * @returns The result of next.\n\t */\n\tpost?(\n\t\tcontext: IRestClientProcessorContext,\n\t\tresponse: Response,\n\t\tnext: () => Promise<Response>\n\t): Promise<Response>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IRestClientProcessorContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRestClientProcessorContext.js","sourceRoot":"","sources":["../../../../src/models/client/IRestClientProcessorContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HttpMethod, IHttpHeaders } from \"@3sixty/web\";\n\n/**\n * The context of a rest client processor.\n */\nexport interface IRestClientProcessorContext {\n\t/**\n\t * The name of the REST client making the request.\n\t */\n\trestClientClassName: string;\n\n\t/**\n\t * The base URL of the request.\n\t */\n\tbaseUrl: string;\n\n\t/**\n\t * The route template before path parameter substitution.\n\t */\n\trouteTemplate: string;\n\n\t/**\n\t * The route being requested.\n\t */\n\troute: string;\n\n\t/**\n\t * The HTTP method of the request.\n\t */\n\tmethod: HttpMethod;\n\n\t/**\n\t * The headers being sent with the request.\n\t */\n\theaders: IHttpHeaders;\n\n\t/**\n\t * The timeout for the request in milliseconds.\n\t */\n\ttimeout?: number;\n\n\t/**\n\t * Whether to include credentials in the request.\n\t */\n\tincludeCredentials?: boolean;\n\n\t/**\n\t * The request being made.\n\t */\n\tbody?: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IBaseRestClientConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IBaseRestClientConfig.js","sourceRoot":"","sources":["../../../../src/models/config/IBaseRestClientConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IError } from \"@3sixty/core\";\nimport type { IHttpHeaders } from \"@3sixty/web\";\n\n/**\n * Definition for the configuration of a rest client.\n */\nexport interface IBaseRestClientConfig {\n\t/**\n\t * The endpoint where the api is hosted.\n\t */\n\tendpoint: string;\n\n\t/**\n\t * The prefix to the routes.\n\t */\n\tpathPrefix?: string;\n\n\t/**\n\t * The headers to include in requests.\n\t */\n\theaders?: IHttpHeaders;\n\n\t/**\n\t * Timeout for requests in ms.\n\t */\n\ttimeout?: number;\n\n\t/**\n\t * Include credentials in the request, defaults to true.\n\t */\n\tincludeCredentials?: boolean;\n\n\t/**\n\t * The types of the processors to run around each request, resolved from the `RestClientProcessorFactory`.\n\t */\n\tprocessorTypes?: string[];\n\n\t/**\n\t * Hook to provide headers asynchronously.\n\t * @returns A promise that resolves to the headers.\n\t */\n\tcustomHeaders?: () => Promise<IHttpHeaders>;\n\n\t/**\n\t * Hook to provide an authorization header value asynchronously.\n\t * @returns A promise that resolves to the authorization header value.\n\t */\n\tcustomAuthHeader?: () => Promise<string>;\n\n\t/**\n\t * Hook to handle authorization failures asynchronously.\n\t * @returns A promise that resolves when the auth failure handling is complete.\n\t */\n\tonAuthFailure?: (err: IError) => Promise<void>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IBaseSocketClientConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IBaseSocketClientConfig.js","sourceRoot":"","sources":["../../../../src/models/config/IBaseSocketClientConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHttpHeaders } from \"@3sixty/web\";\n\n/**\n * Definition for the configuration of a socket service.\n */\nexport interface IBaseSocketClientConfig {\n\t/**\n\t * Base path for the socket service, defaults to /socket.\n\t */\n\tbasePath?: string;\n\n\t/**\n\t * The endpoint where the api is hosted.\n\t */\n\tendpoint: string;\n\n\t/**\n\t * The prefix to the routes.\n\t */\n\tpathPrefix?: string;\n\n\t/**\n\t * The headers to include in requests.\n\t */\n\theaders?: IHttpHeaders;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ /**
4
+ * The category of a health check.
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ export const HealthCategory = {
8
+ /**
9
+ * Connectivity health check for infrastructure connectors.
10
+ */
11
+ Connectivity: "connectivity",
12
+ /**
13
+ * Application health check for domain services.
14
+ */
15
+ Application: "application"
16
+ };
17
+ //# sourceMappingURL=healthCategory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthCategory.js","sourceRoot":"","sources":["../../../src/models/healthCategory.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,WAAW,EAAE,aAAa;CACjB,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The category of a health check.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HealthCategory = {\n\t/**\n\t * Connectivity health check for infrastructure connectors.\n\t */\n\tConnectivity: \"connectivity\",\n\n\t/**\n\t * Application health check for domain services.\n\t */\n\tApplication: \"application\"\n} as const;\n\n/**\n * The category of a health check.\n */\nexport type HealthCategory = (typeof HealthCategory)[keyof typeof HealthCategory];\n"]}
@@ -0,0 +1,21 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ /**
4
+ * The health status of the component.
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ export const HealthStatus = {
8
+ /**
9
+ * OK.
10
+ */
11
+ Ok: "ok",
12
+ /**
13
+ * Warning.
14
+ */
15
+ Warning: "warning",
16
+ /**
17
+ * Error.
18
+ */
19
+ Error: "error"
20
+ };
21
+ //# sourceMappingURL=healthStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthStatus.js","sourceRoot":"","sources":["../../../src/models/healthStatus.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,EAAE,EAAE,IAAI;IAER;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO;CACL,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The health status of the component.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HealthStatus = {\n\t/**\n\t * OK.\n\t */\n\tOk: \"ok\",\n\n\t/**\n\t * Warning.\n\t */\n\tWarning: \"warning\",\n\n\t/**\n\t * Error.\n\t */\n\tError: \"error\"\n} as const;\n\n/**\n * The health status of the component.\n */\nexport type HealthStatus = (typeof HealthStatus)[keyof typeof HealthStatus];\n"]}
@@ -0,0 +1,42 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ /**
4
+ * HTTP definition of some context keys.
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ export const HttpContextIdKeys = {
8
+ /**
9
+ * IP address of the client.
10
+ */
11
+ IpAddress: "ipAddress",
12
+ /**
13
+ * User agent of the client.
14
+ */
15
+ UserAgent: "userAgent",
16
+ /**
17
+ * Correlation ID of the request.
18
+ */
19
+ CorrelationId: "correlationId",
20
+ /**
21
+ * Is this a remote request, will be a random UUID if request arrived through a REST endpoint, otherwise undefined.
22
+ */
23
+ RemoteRequest: "remoteRequest",
24
+ /**
25
+ * Public Origin of the request.
26
+ */
27
+ PublicOrigin: "publicOrigin",
28
+ /**
29
+ * Local Origin of the request.
30
+ */
31
+ LocalOrigin: "localOrigin",
32
+ /**
33
+ * The comma-separated scope claim from the verified JWT for the current request.
34
+ */
35
+ Scope: "scope",
36
+ /**
37
+ * The caller's original tenant ID before an escalated privilege tenant override was applied.
38
+ * Only present when overrideTenant substitution is active for the current request.
39
+ */
40
+ OriginalTenant: "originalTenant"
41
+ };
42
+ //# sourceMappingURL=httpContextIdKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpContextIdKeys.js","sourceRoot":"","sources":["../../../src/models/httpContextIdKeys.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;;OAGG;IACH,cAAc,EAAE,gBAAgB;CACvB,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * HTTP definition of some context keys.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HttpContextIdKeys = {\n\t/**\n\t * IP address of the client.\n\t */\n\tIpAddress: \"ipAddress\",\n\n\t/**\n\t * User agent of the client.\n\t */\n\tUserAgent: \"userAgent\",\n\n\t/**\n\t * Correlation ID of the request.\n\t */\n\tCorrelationId: \"correlationId\",\n\n\t/**\n\t * Is this a remote request, will be a random UUID if request arrived through a REST endpoint, otherwise undefined.\n\t */\n\tRemoteRequest: \"remoteRequest\",\n\n\t/**\n\t * Public Origin of the request.\n\t */\n\tPublicOrigin: \"publicOrigin\",\n\n\t/**\n\t * Local Origin of the request.\n\t */\n\tLocalOrigin: \"localOrigin\",\n\n\t/**\n\t * The comma-separated scope claim from the verified JWT for the current request.\n\t */\n\tScope: \"scope\",\n\n\t/**\n\t * The caller's original tenant ID before an escalated privilege tenant override was applied.\n\t * Only present when overrideTenant substitution is active for the current request.\n\t */\n\tOriginalTenant: \"originalTenant\"\n} as const;\n\n/**\n * HTTP definition of some context keys.\n */\nexport type HttpContextIdKeys = (typeof HttpContextIdKeys)[keyof typeof HttpContextIdKeys];\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IHttpRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHttpRequest.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHttpHeaders } from \"@3sixty/web\";\nimport type { IHttpRequestPathParams } from \"./IHttpRequestPathParams.js\";\nimport type { IHttpRequestQuery } from \"./IHttpRequestQuery.js\";\n\n/**\n * Model for the standard parameters for an http request.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface IHttpRequest<T = any> {\n\t/**\n\t * Incoming Http Headers.\n\t */\n\theaders?: IHttpHeaders;\n\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams?: IHttpRequestPathParams;\n\n\t/**\n\t * The query parameters.\n\t */\n\tquery?: IHttpRequestQuery;\n\n\t/**\n\t * Data to return send as the body.\n\t */\n\tbody?: T;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IHttpRequestContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHttpRequestContext.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpRequestContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHttpServerRequest } from \"./IHttpServerRequest.js\";\n\n/**\n * Context data from the HTTP request.\n */\nexport interface IHttpRequestContext {\n\t/**\n\t * The raw HTTP request.\n\t */\n\tserverRequest: IHttpServerRequest;\n\n\t/**\n\t * The state handed through the processors.\n\t */\n\tprocessorState: { [id: string]: unknown };\n\n\t/**\n\t * Logging component type for the request.\n\t */\n\tloggingComponentType?: string;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IHttpRequestPathParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHttpRequestPathParams.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpRequestPathParams.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Model for the standard parameters for an http request.\n */\nexport interface IHttpRequestPathParams {\n\t[id: string]: string;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IHttpRequestQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHttpRequestQuery.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpRequestQuery.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Model used for Http request query parameters.\n */\nexport interface IHttpRequestQuery {\n\t[id: string]: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IHttpResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHttpResponse.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HttpStatusCode, IHttpHeaders } from \"@3sixty/web\";\n\n/**\n * Model for the standard parameters for an http response.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface IHttpResponse<T = any> {\n\t/**\n\t * Response status code.\n\t */\n\tstatusCode?: HttpStatusCode;\n\n\t/**\n\t * Response headers.\n\t */\n\theaders?: IHttpHeaders;\n\n\t/**\n\t * Data to return as the main payload.\n\t */\n\tbody?: T;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IHttpServerRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IHttpServerRequest.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpServerRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HttpMethod } from \"@3sixty/web\";\nimport type { IHttpRequest } from \"./IHttpRequest.js\";\n\n/**\n * Model for the standard parameters for an http request.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface IHttpServerRequest<T = any> extends IHttpRequest<T> {\n\t/**\n\t * The request url.\n\t */\n\turl: string;\n\n\t/**\n\t * The request method.\n\t */\n\tmethod?: HttpMethod;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ISocketRequestContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISocketRequestContext.js","sourceRoot":"","sources":["../../../../src/models/protocol/ISocketRequestContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHttpRequestContext } from \"./IHttpRequestContext.js\";\n\n/**\n * Context data from the socket request.\n */\nexport interface ISocketRequestContext extends IHttpRequestContext {\n\t/**\n\t * The id of the socket.\n\t */\n\tsocketId: string;\n}\n"]}