@herrromich/az-functions 1.0.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 (439) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +830 -0
  3. package/coverage/cobertura-coverage.xml +3482 -0
  4. package/coverage/lcov-report/base.css +224 -0
  5. package/coverage/lcov-report/block-navigation.js +87 -0
  6. package/coverage/lcov-report/context/forked-invocation-context.ts.html +127 -0
  7. package/coverage/lcov-report/context/index.html +191 -0
  8. package/coverage/lcov-report/context/index.ts.html +97 -0
  9. package/coverage/lcov-report/context/platform-context.manager.ts.html +193 -0
  10. package/coverage/lcov-report/context/platform-context.model.ts.html +262 -0
  11. package/coverage/lcov-report/context/platform-context.provider.ts.html +196 -0
  12. package/coverage/lcov-report/context/platform.execution.context.ts.html +217 -0
  13. package/coverage/lcov-report/context/wrapped-invocation-context.ts.html +163 -0
  14. package/coverage/lcov-report/event-hub-handler/azure-event-hub-trigger.model.ts.html +187 -0
  15. package/coverage/lcov-report/event-hub-handler/azure-event-hub-trigger.service.ts.html +760 -0
  16. package/coverage/lcov-report/event-hub-handler/decorators/decorators.model.ts.html +292 -0
  17. package/coverage/lcov-report/event-hub-handler/decorators/decorators.ts.html +778 -0
  18. package/coverage/lcov-report/event-hub-handler/decorators/index.html +146 -0
  19. package/coverage/lcov-report/event-hub-handler/decorators/index.ts.html +91 -0
  20. package/coverage/lcov-report/event-hub-handler/event-hub-handle-method-args-metadata.service.ts.html +130 -0
  21. package/coverage/lcov-report/event-hub-handler/event-hub-handler-metadata.reader.ts.html +199 -0
  22. package/coverage/lcov-report/event-hub-handler/event-hub-handler-registration.service.ts.html +220 -0
  23. package/coverage/lcov-report/event-hub-handler/event-hub-handler.factory.ts.html +283 -0
  24. package/coverage/lcov-report/event-hub-handler/event-hub-handler.model.ts.html +421 -0
  25. package/coverage/lcov-report/event-hub-handler/event-hub-handler.provider.ts.html +187 -0
  26. package/coverage/lcov-report/event-hub-handler/event-hub-trigger-support.factory.ts.html +787 -0
  27. package/coverage/lcov-report/event-hub-handler/event-hub-trigger-support.service.ts.html +829 -0
  28. package/coverage/lcov-report/event-hub-handler/event-hub-trigger.model.ts.html +193 -0
  29. package/coverage/lcov-report/event-hub-handler/event-hub-trigger.service.ts.html +859 -0
  30. package/coverage/lcov-report/event-hub-handler/event-hub-triggers-registration.service.ts.html +307 -0
  31. package/coverage/lcov-report/event-hub-handler/index.html +221 -0
  32. package/coverage/lcov-report/event-hub-handler/index.ts.html +142 -0
  33. package/coverage/lcov-report/eventhub-handler/decorators/decorators.model.ts.html +277 -0
  34. package/coverage/lcov-report/eventhub-handler/decorators/decorators.ts.html +679 -0
  35. package/coverage/lcov-report/eventhub-handler/decorators/index.html +131 -0
  36. package/coverage/lcov-report/eventhub-handler/eventhub-handler-metadata.reader.ts.html +196 -0
  37. package/coverage/lcov-report/eventhub-handler/eventhub-handler-registration.service.ts.html +220 -0
  38. package/coverage/lcov-report/eventhub-handler/eventhub-handler.factory.ts.html +193 -0
  39. package/coverage/lcov-report/eventhub-handler/eventhub-handler.model.ts.html +406 -0
  40. package/coverage/lcov-report/eventhub-handler/eventhub-trigger.model.ts.html +187 -0
  41. package/coverage/lcov-report/eventhub-handler/eventhub-trigger.service.ts.html +760 -0
  42. package/coverage/lcov-report/eventhub-handler/eventhub-triggers-registration.service.ts.html +304 -0
  43. package/coverage/lcov-report/eventhub-handler/index.html +206 -0
  44. package/coverage/lcov-report/favicon.png +0 -0
  45. package/coverage/lcov-report/forked-invocation-context.ts.html +127 -0
  46. package/coverage/lcov-report/function-handler-metadata.reader.ts.html +172 -0
  47. package/coverage/lcov-report/http-controller/authentication.provider.ts.html +481 -0
  48. package/coverage/lcov-report/http-controller/authenticator.provider.ts.html +460 -0
  49. package/coverage/lcov-report/http-controller/azure-http-trigger.service.ts.html +1045 -0
  50. package/coverage/lcov-report/http-controller/decorators/decorators.model.ts.html +388 -0
  51. package/coverage/lcov-report/http-controller/decorators/decorators.ts.html +1627 -0
  52. package/coverage/lcov-report/http-controller/decorators/index.html +146 -0
  53. package/coverage/lcov-report/http-controller/decorators/index.ts.html +94 -0
  54. package/coverage/lcov-report/http-controller/http-controller-metadata.reader.ts.html +271 -0
  55. package/coverage/lcov-report/http-controller/http-controller-metadata.service.ts.html +130 -0
  56. package/coverage/lcov-report/http-controller/http-controller-platform.model.ts.html +187 -0
  57. package/coverage/lcov-report/http-controller/http-controller-registration.service.ts.html +241 -0
  58. package/coverage/lcov-report/http-controller/http-controller.model.ts.html +745 -0
  59. package/coverage/lcov-report/http-controller/http-handler-support.factory.ts.html +499 -0
  60. package/coverage/lcov-report/http-controller/http-handler.factory.ts.html +415 -0
  61. package/coverage/lcov-report/http-controller/http-operation-registration.service.ts.html +328 -0
  62. package/coverage/lcov-report/http-controller/http-operations-registration.service.ts.html +328 -0
  63. package/coverage/lcov-report/http-controller/http-request-arg-provider.factory.ts.html +580 -0
  64. package/coverage/lcov-report/http-controller/http-request-handler.provider.ts.html +388 -0
  65. package/coverage/lcov-report/http-controller/http-response-processor.factory.ts.html +316 -0
  66. package/coverage/lcov-report/http-controller/index.html +311 -0
  67. package/coverage/lcov-report/http-controller/index.ts.html +226 -0
  68. package/coverage/lcov-report/http-controller/open-api-definition.service.ts.html +568 -0
  69. package/coverage/lcov-report/http-controller/open-api-metadata.service.ts.html +373 -0
  70. package/coverage/lcov-report/http-controller/open-api-print.service.ts.html +232 -0
  71. package/coverage/lcov-report/http-controller/open-api-registration.service.ts.html +220 -0
  72. package/coverage/lcov-report/http-controller/rest-open-api.regstry.ts.html +262 -0
  73. package/coverage/lcov-report/http-controller/security/authentication-service.factory.ts.html +280 -0
  74. package/coverage/lcov-report/http-controller/security/authentication-service.ts.html +115 -0
  75. package/coverage/lcov-report/http-controller/security/authenticator.provider.ts.html +799 -0
  76. package/coverage/lcov-report/http-controller/security/bearer-security-authentication.service.ts.html +133 -0
  77. package/coverage/lcov-report/http-controller/security/index.html +206 -0
  78. package/coverage/lcov-report/http-controller/security/index.ts.html +94 -0
  79. package/coverage/lcov-report/http-controller/security/model.ts.html +133 -0
  80. package/coverage/lcov-report/http-controller/security/operation-authentication.resolver.ts.html +418 -0
  81. package/coverage/lcov-report/http-controller/security/principal-merge.service.ts.html +163 -0
  82. package/coverage/lcov-report/http-controller/security/strict-principal-merge.servce.ts.html +154 -0
  83. package/coverage/lcov-report/http-controller/swagger-handling.service.ts.html +463 -0
  84. package/coverage/lcov-report/index.html +281 -0
  85. package/coverage/lcov-report/init.ts.html +97 -0
  86. package/coverage/lcov-report/ioc-container.utils.ts.html +100 -0
  87. package/coverage/lcov-report/logger/azure-log-transport.service.ts.html +433 -0
  88. package/coverage/lcov-report/logger/bindings.ts.html +253 -0
  89. package/coverage/lcov-report/logger/index.html +221 -0
  90. package/coverage/lcov-report/logger/index.ts.html +163 -0
  91. package/coverage/lcov-report/logger/log-level.service.ts.html +127 -0
  92. package/coverage/lcov-report/logger/log-transport.service.ts.html +571 -0
  93. package/coverage/lcov-report/logger/logger-factory.provider.ts.html +142 -0
  94. package/coverage/lcov-report/logger/logger.factory.ts.html +172 -0
  95. package/coverage/lcov-report/logger/logger.model.ts.html +868 -0
  96. package/coverage/lcov-report/logger/logger.utils.ts.html +877 -0
  97. package/coverage/lcov-report/logger/model.ts.html +172 -0
  98. package/coverage/lcov-report/logger/otel.logger.ts.html +358 -0
  99. package/coverage/lcov-report/logger/platform.logger.ts.html +229 -0
  100. package/coverage/lcov-report/logger/trie-search.service.ts.html +616 -0
  101. package/coverage/lcov-report/platform/azure-platform.ts.html +256 -0
  102. package/coverage/lcov-report/platform/index.html +176 -0
  103. package/coverage/lcov-report/platform/index.ts.html +139 -0
  104. package/coverage/lcov-report/platform/platform-component-metadata.service.ts.html +115 -0
  105. package/coverage/lcov-report/platform/register-function.factory.ts.html +145 -0
  106. package/coverage/lcov-report/platform/register-trigger-handler.factory.ts.html +214 -0
  107. package/coverage/lcov-report/platform/security-context.ts.html +127 -0
  108. package/coverage/lcov-report/platform/startup.service.ts.html +106 -0
  109. package/coverage/lcov-report/platform/system-logger-name.provider.ts.html +145 -0
  110. package/coverage/lcov-report/platform/system.container.ts.html +169 -0
  111. package/coverage/lcov-report/platform-context.model.ts.html +124 -0
  112. package/coverage/lcov-report/platform.logger.ts.html +316 -0
  113. package/coverage/lcov-report/platform.model.ts.html +292 -0
  114. package/coverage/lcov-report/prettify.css +1 -0
  115. package/coverage/lcov-report/prettify.js +2 -0
  116. package/coverage/lcov-report/security/index.html +146 -0
  117. package/coverage/lcov-report/security/index.ts.html +91 -0
  118. package/coverage/lcov-report/security/security-context.ts.html +130 -0
  119. package/coverage/lcov-report/security/security.model.ts.html +169 -0
  120. package/coverage/lcov-report/shared/all-settled.util.ts.html +118 -0
  121. package/coverage/lcov-report/shared/decorators/decorators.model.ts.html +136 -0
  122. package/coverage/lcov-report/shared/decorators/decorators.ts.html +346 -0
  123. package/coverage/lcov-report/shared/decorators/index.html +146 -0
  124. package/coverage/lcov-report/shared/decorators/index.ts.html +91 -0
  125. package/coverage/lcov-report/shared/function-handler-metadata.reader.ts.html +172 -0
  126. package/coverage/lcov-report/shared/index.html +176 -0
  127. package/coverage/lcov-report/shared/index.ts.html +133 -0
  128. package/coverage/lcov-report/shared/ioc-container.utils.ts.html +115 -0
  129. package/coverage/lcov-report/shared/platform-context-local-storage.ts.html +133 -0
  130. package/coverage/lcov-report/shared/platform-context.manager.ts.html +253 -0
  131. package/coverage/lcov-report/shared/platform.context.provider.ts.html +136 -0
  132. package/coverage/lcov-report/shared/platform.model.ts.html +298 -0
  133. package/coverage/lcov-report/shared/security.model.ts.html +142 -0
  134. package/coverage/lcov-report/shared/trie-search.service.ts.html +337 -0
  135. package/coverage/lcov-report/shared/trigger-handler-metadata.reader.ts.html +166 -0
  136. package/coverage/lcov-report/shared/zod-parser-wrapper.service.ts.html +217 -0
  137. package/coverage/lcov-report/shared/zod-parser-wrapper.ts.html +232 -0
  138. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  139. package/coverage/lcov-report/sorter.js +210 -0
  140. package/coverage/lcov-report/src/context/index.html +191 -0
  141. package/coverage/lcov-report/src/context/index.ts.html +97 -0
  142. package/coverage/lcov-report/src/context/platform-context.manager.ts.html +193 -0
  143. package/coverage/lcov-report/src/context/platform-context.model.ts.html +262 -0
  144. package/coverage/lcov-report/src/context/platform-context.provider.ts.html +196 -0
  145. package/coverage/lcov-report/src/context/platform.execution.context.ts.html +217 -0
  146. package/coverage/lcov-report/src/context/wrapped-invocation-context.ts.html +163 -0
  147. package/coverage/lcov-report/src/event-hub-handler/azure-event-hub-trigger.model.ts.html +187 -0
  148. package/coverage/lcov-report/src/event-hub-handler/azure-event-hub-trigger.service.ts.html +769 -0
  149. package/coverage/lcov-report/src/event-hub-handler/decorators/decorators.model.ts.html +313 -0
  150. package/coverage/lcov-report/src/event-hub-handler/decorators/decorators.ts.html +778 -0
  151. package/coverage/lcov-report/src/event-hub-handler/decorators/index.html +146 -0
  152. package/coverage/lcov-report/src/event-hub-handler/decorators/index.ts.html +91 -0
  153. package/coverage/lcov-report/src/event-hub-handler/event-hub-handle-method-args-metadata.service.ts.html +130 -0
  154. package/coverage/lcov-report/src/event-hub-handler/event-hub-handler-metadata.reader.ts.html +199 -0
  155. package/coverage/lcov-report/src/event-hub-handler/event-hub-handler-registration.service.ts.html +220 -0
  156. package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.factory.ts.html +283 -0
  157. package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.model.ts.html +421 -0
  158. package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.provider.ts.html +187 -0
  159. package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger-support.factory.ts.html +787 -0
  160. package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger-support.service.ts.html +832 -0
  161. package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger.model.ts.html +193 -0
  162. package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger.service.ts.html +859 -0
  163. package/coverage/lcov-report/src/event-hub-handler/event-hub-triggers-registration.service.ts.html +307 -0
  164. package/coverage/lcov-report/src/event-hub-handler/index.html +221 -0
  165. package/coverage/lcov-report/src/event-hub-handler/index.ts.html +142 -0
  166. package/coverage/lcov-report/src/framework.container.ts.html +157 -0
  167. package/coverage/lcov-report/src/http-controller/authentication.provider.ts.html +481 -0
  168. package/coverage/lcov-report/src/http-controller/authenticator.provider.ts.html +460 -0
  169. package/coverage/lcov-report/src/http-controller/azure-http-trigger.service.ts.html +865 -0
  170. package/coverage/lcov-report/src/http-controller/decorators/decorators.model.ts.html +553 -0
  171. package/coverage/lcov-report/src/http-controller/decorators/decorators.ts.html +1633 -0
  172. package/coverage/lcov-report/src/http-controller/decorators/index.html +146 -0
  173. package/coverage/lcov-report/src/http-controller/decorators/index.ts.html +94 -0
  174. package/coverage/lcov-report/src/http-controller/http-controller-metadata.reader.ts.html +271 -0
  175. package/coverage/lcov-report/src/http-controller/http-controller-metadata.service.ts.html +121 -0
  176. package/coverage/lcov-report/src/http-controller/http-controller-platform.model.ts.html +187 -0
  177. package/coverage/lcov-report/src/http-controller/http-controller-registration.service.ts.html +241 -0
  178. package/coverage/lcov-report/src/http-controller/http-controller.model.ts.html +784 -0
  179. package/coverage/lcov-report/src/http-controller/http-handler-support.factory.ts.html +481 -0
  180. package/coverage/lcov-report/src/http-controller/http-handler.factory.ts.html +406 -0
  181. package/coverage/lcov-report/src/http-controller/http-operation-registration.service.ts.html +328 -0
  182. package/coverage/lcov-report/src/http-controller/http-operations-registration.service.ts.html +328 -0
  183. package/coverage/lcov-report/src/http-controller/http-request-arg-provider.factory.ts.html +580 -0
  184. package/coverage/lcov-report/src/http-controller/http-request-handler.provider.ts.html +388 -0
  185. package/coverage/lcov-report/src/http-controller/http-response-processor.factory.ts.html +316 -0
  186. package/coverage/lcov-report/src/http-controller/index.html +311 -0
  187. package/coverage/lcov-report/src/http-controller/index.ts.html +226 -0
  188. package/coverage/lcov-report/src/http-controller/open-api-definition.service.ts.html +550 -0
  189. package/coverage/lcov-report/src/http-controller/open-api-metadata.service.ts.html +373 -0
  190. package/coverage/lcov-report/src/http-controller/open-api-print.service.ts.html +232 -0
  191. package/coverage/lcov-report/src/http-controller/open-api-registration.service.ts.html +220 -0
  192. package/coverage/lcov-report/src/http-controller/rest-open-api.regstry.ts.html +262 -0
  193. package/coverage/lcov-report/src/http-controller/security/authentication-service.factory.ts.html +280 -0
  194. package/coverage/lcov-report/src/http-controller/security/authentication-service.ts.html +139 -0
  195. package/coverage/lcov-report/src/http-controller/security/authenticator.provider.ts.html +799 -0
  196. package/coverage/lcov-report/src/http-controller/security/bearer-security-authentication.service.ts.html +133 -0
  197. package/coverage/lcov-report/src/http-controller/security/index.html +206 -0
  198. package/coverage/lcov-report/src/http-controller/security/index.ts.html +94 -0
  199. package/coverage/lcov-report/src/http-controller/security/model.ts.html +133 -0
  200. package/coverage/lcov-report/src/http-controller/security/operation-authentication.resolver.ts.html +418 -0
  201. package/coverage/lcov-report/src/http-controller/security/principal-merge.service.ts.html +163 -0
  202. package/coverage/lcov-report/src/http-controller/security/strict-principal-merge.servce.ts.html +154 -0
  203. package/coverage/lcov-report/src/http-controller/swagger-handling.service.ts.html +463 -0
  204. package/coverage/lcov-report/src/index.html +161 -0
  205. package/coverage/lcov-report/src/init.ts.html +97 -0
  206. package/coverage/lcov-report/src/logger/azure-log-transport.service.ts.html +433 -0
  207. package/coverage/lcov-report/src/logger/bindings.ts.html +253 -0
  208. package/coverage/lcov-report/src/logger/index.html +221 -0
  209. package/coverage/lcov-report/src/logger/index.ts.html +163 -0
  210. package/coverage/lcov-report/src/logger/log-level.service.ts.html +127 -0
  211. package/coverage/lcov-report/src/logger/log-transport.service.ts.html +571 -0
  212. package/coverage/lcov-report/src/logger/logger-factory.provider.ts.html +142 -0
  213. package/coverage/lcov-report/src/logger/logger.factory.ts.html +172 -0
  214. package/coverage/lcov-report/src/logger/logger.model.ts.html +868 -0
  215. package/coverage/lcov-report/src/logger/logger.utils.ts.html +877 -0
  216. package/coverage/lcov-report/src/logger/otel.logger.ts.html +358 -0
  217. package/coverage/lcov-report/src/logger/platform.logger.ts.html +229 -0
  218. package/coverage/lcov-report/src/logger/trie-search.service.ts.html +616 -0
  219. package/coverage/lcov-report/src/middleware.ts.html +232 -0
  220. package/coverage/lcov-report/src/platform/azure-platform.ts.html +256 -0
  221. package/coverage/lcov-report/src/platform/index.html +176 -0
  222. package/coverage/lcov-report/src/platform/index.ts.html +139 -0
  223. package/coverage/lcov-report/src/platform/platform-component-metadata.service.ts.html +115 -0
  224. package/coverage/lcov-report/src/platform/register-function.factory.ts.html +145 -0
  225. package/coverage/lcov-report/src/platform/register-trigger-handler.factory.ts.html +214 -0
  226. package/coverage/lcov-report/src/platform/security-context.ts.html +127 -0
  227. package/coverage/lcov-report/src/platform/startup.service.ts.html +202 -0
  228. package/coverage/lcov-report/src/platform/system-logger-name.provider.ts.html +145 -0
  229. package/coverage/lcov-report/src/platform/system.container.ts.html +172 -0
  230. package/coverage/lcov-report/src/platform.container.ts.html +148 -0
  231. package/coverage/lcov-report/src/security/index.html +146 -0
  232. package/coverage/lcov-report/src/security/index.ts.html +91 -0
  233. package/coverage/lcov-report/src/security/security-context.ts.html +175 -0
  234. package/coverage/lcov-report/src/security/security.model.ts.html +223 -0
  235. package/coverage/lcov-report/src/shared/decorators/decorators.model.ts.html +136 -0
  236. package/coverage/lcov-report/src/shared/decorators/decorators.ts.html +346 -0
  237. package/coverage/lcov-report/src/shared/decorators/index.html +146 -0
  238. package/coverage/lcov-report/src/shared/decorators/index.ts.html +91 -0
  239. package/coverage/lcov-report/src/shared/index.html +176 -0
  240. package/coverage/lcov-report/src/shared/index.ts.html +133 -0
  241. package/coverage/lcov-report/src/shared/ioc-container.utils.ts.html +115 -0
  242. package/coverage/lcov-report/src/shared/platform-context-local-storage.ts.html +133 -0
  243. package/coverage/lcov-report/src/shared/platform.model.ts.html +298 -0
  244. package/coverage/lcov-report/src/shared/security.model.ts.html +139 -0
  245. package/coverage/lcov-report/src/shared/trie-search.service.ts.html +337 -0
  246. package/coverage/lcov-report/src/shared/trigger-handler-metadata.reader.ts.html +166 -0
  247. package/coverage/lcov-report/src/shared/zod-parser-wrapper.ts.html +232 -0
  248. package/coverage/lcov-report/test/index.html +116 -0
  249. package/coverage/lcov-report/test/utils.ts.html +100 -0
  250. package/coverage/lcov-report/test-utils/index.html +116 -0
  251. package/coverage/lcov-report/test-utils/utils.ts.html +100 -0
  252. package/coverage/lcov-report/trie-search.service.ts.html +469 -0
  253. package/coverage/lcov-report/trigger-handler-metadata.reader.ts.html +187 -0
  254. package/coverage/lcov-report/wrapped-invocation-context.ts.html +163 -0
  255. package/coverage/lcov-report/zod-parser-wrapper.ts.html +232 -0
  256. package/coverage/lcov.info +3220 -0
  257. package/dist/assets/swagger-ui/LICENSE +202 -0
  258. package/dist/assets/swagger-ui/NOTICE +2 -0
  259. package/dist/assets/swagger-ui/README.md +40 -0
  260. package/dist/assets/swagger-ui/absolute-path.js +1 -0
  261. package/dist/assets/swagger-ui/favicon-16x16.png +0 -0
  262. package/dist/assets/swagger-ui/favicon-32x32.png +0 -0
  263. package/dist/assets/swagger-ui/index.css +16 -0
  264. package/dist/assets/swagger-ui/index.html +19 -0
  265. package/dist/assets/swagger-ui/index.js +1 -0
  266. package/dist/assets/swagger-ui/log.bundle-sizes.swagger-ui.txt +114 -0
  267. package/dist/assets/swagger-ui/log.es-bundle-core-sizes.swagger-ui.txt +14 -0
  268. package/dist/assets/swagger-ui/log.es-bundle-sizes.swagger-ui.txt +114 -0
  269. package/dist/assets/swagger-ui/oauth2-redirect.html +6 -0
  270. package/dist/assets/swagger-ui/oauth2-redirect.js +1 -0
  271. package/dist/assets/swagger-ui/package.json +20 -0
  272. package/dist/assets/swagger-ui/swagger-initializer.js +1 -0
  273. package/dist/assets/swagger-ui/swagger-ui-bundle.js +2 -0
  274. package/dist/assets/swagger-ui/swagger-ui-bundle.js.LICENSE.txt +106 -0
  275. package/dist/assets/swagger-ui/swagger-ui-bundle.js.map +1 -0
  276. package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js +2 -0
  277. package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js.LICENSE.txt +35 -0
  278. package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js.map +1 -0
  279. package/dist/assets/swagger-ui/swagger-ui-es-bundle.js +2 -0
  280. package/dist/assets/swagger-ui/swagger-ui-es-bundle.js.LICENSE.txt +106 -0
  281. package/dist/assets/swagger-ui/swagger-ui-es-bundle.js.map +1 -0
  282. package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js +2 -0
  283. package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js.LICENSE.txt +22 -0
  284. package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js.map +1 -0
  285. package/dist/assets/swagger-ui/swagger-ui.css +3 -0
  286. package/dist/assets/swagger-ui/swagger-ui.css.map +1 -0
  287. package/dist/assets/swagger-ui/swagger-ui.js +1 -0
  288. package/dist/assets/swagger-ui/swagger-ui.js.map +1 -0
  289. package/dist/index.cjs +3 -0
  290. package/dist/index.cjs.LICENSE.txt +24 -0
  291. package/dist/src/context/index.d.ts +4 -0
  292. package/dist/src/context/platform-context.manager.d.ts +23 -0
  293. package/dist/src/context/platform-context.model.d.ts +56 -0
  294. package/dist/src/context/platform-context.provider.d.ts +23 -0
  295. package/dist/src/context/platform.execution.context.d.ts +13 -0
  296. package/dist/src/context/wrapped-invocation-context.d.ts +5 -0
  297. package/dist/src/event-hub-handler/decorators/decorators.d.ts +161 -0
  298. package/dist/src/event-hub-handler/decorators/decorators.model.d.ts +62 -0
  299. package/dist/src/event-hub-handler/decorators/index.d.ts +2 -0
  300. package/dist/src/event-hub-handler/event-hub-handler-metadata.reader.d.ts +8 -0
  301. package/dist/src/event-hub-handler/event-hub-handler-registration.service.d.ts +12 -0
  302. package/dist/src/event-hub-handler/event-hub-handler.factory.d.ts +13 -0
  303. package/dist/src/event-hub-handler/event-hub-handler.model.d.ts +101 -0
  304. package/dist/src/event-hub-handler/event-hub-trigger-support.factory.d.ts +10 -0
  305. package/dist/src/event-hub-handler/event-hub-trigger.model.d.ts +39 -0
  306. package/dist/src/event-hub-handler/event-hub-triggers-registration.service.d.ts +18 -0
  307. package/dist/src/event-hub-handler/index.d.ts +4 -0
  308. package/dist/src/framework.container.d.ts +6 -0
  309. package/dist/src/http-controller/decorators/decorators.d.ts +410 -0
  310. package/dist/src/http-controller/decorators/decorators.model.d.ts +123 -0
  311. package/dist/src/http-controller/decorators/index.d.ts +3 -0
  312. package/dist/src/http-controller/http-controller-metadata.reader.d.ts +8 -0
  313. package/dist/src/http-controller/http-controller-registration.service.d.ts +12 -0
  314. package/dist/src/http-controller/http-controller.model.d.ts +131 -0
  315. package/dist/src/http-controller/http-handler-support.factory.d.ts +26 -0
  316. package/dist/src/http-controller/http-handler.factory.d.ts +16 -0
  317. package/dist/src/http-controller/http-operations-registration.service.d.ts +22 -0
  318. package/dist/src/http-controller/http-request-arg-provider.factory.d.ts +12 -0
  319. package/dist/src/http-controller/http-response-processor.factory.d.ts +10 -0
  320. package/dist/src/http-controller/index.d.ts +11 -0
  321. package/dist/src/http-controller/open-api-definition.service.d.ts +29 -0
  322. package/dist/src/http-controller/open-api-metadata.service.d.ts +11 -0
  323. package/dist/src/http-controller/open-api-print.service.d.ts +8 -0
  324. package/dist/src/http-controller/open-api-registration.service.d.ts +17 -0
  325. package/dist/src/http-controller/security/authentication-service.d.ts +15 -0
  326. package/dist/src/http-controller/security/authenticator.provider.d.ts +31 -0
  327. package/dist/src/http-controller/security/bearer-security-authentication.service.d.ts +9 -0
  328. package/dist/src/http-controller/security/bearer-token.service.d.ts +5 -0
  329. package/dist/src/http-controller/security/index.d.ts +3 -0
  330. package/dist/src/http-controller/security/operation-authentication.resolver.d.ts +18 -0
  331. package/dist/src/http-controller/security/principal-merge.service.d.ts +11 -0
  332. package/dist/src/http-controller/security/strict-principal-merge.servce.d.ts +5 -0
  333. package/dist/src/http-controller/swagger-handling.service.d.ts +11 -0
  334. package/dist/src/index.d.ts +9 -0
  335. package/dist/src/init.d.ts +1 -0
  336. package/dist/src/logger/bindings.d.ts +7 -0
  337. package/dist/src/logger/index.d.ts +6 -0
  338. package/dist/src/logger/log-level.service.d.ts +7 -0
  339. package/dist/src/logger/log-transport.service.d.ts +19 -0
  340. package/dist/src/logger/logger.model.d.ts +241 -0
  341. package/dist/src/logger/logger.utils.d.ts +17 -0
  342. package/dist/src/logger/otel.logger.d.ts +9 -0
  343. package/dist/src/logger/trie-search.service.d.ts +65 -0
  344. package/dist/src/middleware.d.ts +10 -0
  345. package/dist/src/platform/azure-platform.d.ts +15 -0
  346. package/dist/src/platform/index.d.ts +5 -0
  347. package/dist/src/platform/model.d.ts +18 -0
  348. package/dist/src/platform/register-trigger-handler.factory.d.ts +5 -0
  349. package/dist/src/platform/startup.service.d.ts +36 -0
  350. package/dist/src/platform/system-logger-name.provider.d.ts +1 -0
  351. package/dist/src/platform.container.d.ts +3 -0
  352. package/dist/src/security/index.d.ts +2 -0
  353. package/dist/src/security/security-context.d.ts +22 -0
  354. package/dist/src/security/security.model.d.ts +37 -0
  355. package/dist/src/shared/decorators/decorators.d.ts +37 -0
  356. package/dist/src/shared/decorators/decorators.model.d.ts +13 -0
  357. package/dist/src/shared/decorators/index.d.ts +2 -0
  358. package/dist/src/shared/index.d.ts +8 -0
  359. package/dist/src/shared/ioc-container.utils.d.ts +7 -0
  360. package/dist/src/shared/platform.model.d.ts +44 -0
  361. package/dist/src/shared/trigger-handler-metadata.reader.d.ts +6 -0
  362. package/dist/src/shared/zod-parser-wrapper.d.ts +5 -0
  363. package/docs/logging.md +805 -0
  364. package/package.json +87 -0
  365. package/src/context/index.ts +4 -0
  366. package/src/context/platform-context.manager.ts +36 -0
  367. package/src/context/platform-context.model.ts +59 -0
  368. package/src/context/platform-context.provider.ts +37 -0
  369. package/src/context/platform.execution.context.ts +44 -0
  370. package/src/context/wrapped-invocation-context.ts +26 -0
  371. package/src/event-hub-handler/decorators/decorators.model.ts +76 -0
  372. package/src/event-hub-handler/decorators/decorators.ts +231 -0
  373. package/src/event-hub-handler/decorators/index.ts +2 -0
  374. package/src/event-hub-handler/event-hub-handler-metadata.reader.ts +38 -0
  375. package/src/event-hub-handler/event-hub-handler-registration.service.ts +45 -0
  376. package/src/event-hub-handler/event-hub-handler.factory.ts +66 -0
  377. package/src/event-hub-handler/event-hub-handler.model.ts +112 -0
  378. package/src/event-hub-handler/event-hub-trigger-support.factory.ts +234 -0
  379. package/src/event-hub-handler/event-hub-trigger.model.ts +36 -0
  380. package/src/event-hub-handler/event-hub-triggers-registration.service.ts +74 -0
  381. package/src/event-hub-handler/index.ts +19 -0
  382. package/src/framework.container.ts +24 -0
  383. package/src/http-controller/decorators/decorators.model.ts +156 -0
  384. package/src/http-controller/decorators/decorators.ts +516 -0
  385. package/src/http-controller/decorators/index.ts +3 -0
  386. package/src/http-controller/http-controller-metadata.reader.ts +62 -0
  387. package/src/http-controller/http-controller-registration.service.ts +52 -0
  388. package/src/http-controller/http-controller.model.ts +233 -0
  389. package/src/http-controller/http-handler-support.factory.ts +132 -0
  390. package/src/http-controller/http-handler.factory.ts +107 -0
  391. package/src/http-controller/http-operations-registration.service.ts +81 -0
  392. package/src/http-controller/http-request-arg-provider.factory.ts +165 -0
  393. package/src/http-controller/http-response-processor.factory.ts +77 -0
  394. package/src/http-controller/index.ts +47 -0
  395. package/src/http-controller/open-api-definition.service.ts +155 -0
  396. package/src/http-controller/open-api-metadata.service.ts +96 -0
  397. package/src/http-controller/open-api-print.service.ts +49 -0
  398. package/src/http-controller/open-api-registration.service.ts +45 -0
  399. package/src/http-controller/security/authentication-service.ts +18 -0
  400. package/src/http-controller/security/authenticator.provider.ts +238 -0
  401. package/src/http-controller/security/bearer-security-authentication.service.ts +16 -0
  402. package/src/http-controller/security/bearer-token.service.ts +6 -0
  403. package/src/http-controller/security/index.ts +3 -0
  404. package/src/http-controller/security/operation-authentication.resolver.ts +111 -0
  405. package/src/http-controller/security/principal-merge.service.ts +26 -0
  406. package/src/http-controller/security/strict-principal-merge.servce.ts +23 -0
  407. package/src/http-controller/swagger-handling.service.ts +126 -0
  408. package/src/index.ts +80 -0
  409. package/src/init.ts +4 -0
  410. package/src/logger/bindings.ts +56 -0
  411. package/src/logger/index.ts +26 -0
  412. package/src/logger/log-level.service.ts +14 -0
  413. package/src/logger/log-transport.service.ts +162 -0
  414. package/src/logger/logger.model.ts +261 -0
  415. package/src/logger/logger.utils.ts +264 -0
  416. package/src/logger/otel.logger.ts +91 -0
  417. package/src/logger/trie-search.service.ts +177 -0
  418. package/src/middleware.ts +49 -0
  419. package/src/platform/azure-platform.ts +57 -0
  420. package/src/platform/index.ts +18 -0
  421. package/src/platform/model.ts +19 -0
  422. package/src/platform/register-trigger-handler.factory.ts +43 -0
  423. package/src/platform/startup.service.ts +39 -0
  424. package/src/platform/system-logger-name.provider.ts +20 -0
  425. package/src/platform.container.ts +21 -0
  426. package/src/security/index.ts +2 -0
  427. package/src/security/security-context.ts +30 -0
  428. package/src/security/security.model.ts +46 -0
  429. package/src/shared/decorators/decorators.model.ts +17 -0
  430. package/src/shared/decorators/decorators.ts +87 -0
  431. package/src/shared/decorators/index.ts +2 -0
  432. package/src/shared/index.ts +16 -0
  433. package/src/shared/ioc-container.utils.ts +10 -0
  434. package/src/shared/platform.model.ts +71 -0
  435. package/src/shared/trigger-handler-metadata.reader.ts +27 -0
  436. package/src/shared/zod-parser-wrapper.ts +49 -0
  437. package/src/test-utilities/index.ts +1 -0
  438. package/src/test-utilities/utils.ts +5 -0
  439. package/tsconfig.test.json +8 -0
@@ -0,0 +1,410 @@
1
+ import { ZodType } from 'zod';
2
+ import { ControllerConfig, ControllerOperationConfig, ControllerRequest, ControllerRequestBodyOperationConfig, PathSchema, QueryItemSchema } from './decorators.model';
3
+ /**
4
+ * Class decorator to define an HTTP controller.
5
+ *
6
+ * @param config
7
+ * @returns Class decorator function
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const ItemSchema = z.object({
12
+ * id: z.string(),
13
+ * name: z.string(),
14
+ * }).openapi('Item');
15
+ *
16
+ * type Item = z.infer<typeof ItemSchema>;
17
+ *
18
+ * @HttpController({ path: '/items' })
19
+ * export class MyController {
20
+ * @Get({ description: 'Get all items',
21
+ * directResponse: {
22
+ * description: 'A list of items',
23
+ * jsonContent: { schema: z.array(ItemSchema) }
24
+ * }
25
+ * })
26
+ * async getItems(@Request() req: HttpRequest): Promise<Item[]> {
27
+ * // Handle GET /api/items
28
+ * }
29
+ *
30
+ * @Post({
31
+ * description: 'Create a new item',
32
+ * responses: {
33
+ * 201: {
34
+ * description: 'Item created'
35
+ * }
36
+ * }
37
+ * })
38
+ * async createItem(@Body({ schema: z.object({ name: z.string() }) }) body: { name: string }): Promise<void> {
39
+ * // Handle POST /api/items
40
+ * }
41
+ * }
42
+ * ```
43
+ */
44
+ export declare function HttpController(config: ControllerConfig): ClassDecorator;
45
+ /**
46
+ * Method decorator to define an HTTP GET controllerMethod.
47
+ *
48
+ * @param operationConfig
49
+ * @return Method decorator function
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * @HttpController({ path: '/items' })
54
+ * class MyController {
55
+ * @Get({
56
+ * path: '/{id}',
57
+ * description: 'Get item by ID',
58
+ * directResponse: {
59
+ * status: 200,
60
+ * description: 'A single item',
61
+ * jsonContent: { schema: z.object({ id: z.string(), name: z.string() }) },
62
+ * }
63
+ * })
64
+ * async getItemById(@PathParam({ name: 'id', schema: z.string().uuid() }) id: string): Promise<{ id: string; name: string }> {
65
+ * // Handle GET /item/{id}
66
+ * return { id, name: 'Sample Item' };
67
+ * }
68
+ * }
69
+ * ```
70
+ */
71
+ export declare function Get(operationConfig?: ControllerOperationConfig): MethodDecorator;
72
+ /**
73
+ * Method decorator to define an HTTP HEAD controllerMethod.
74
+ *
75
+ * @param operationConfig
76
+ * @return Method decorator function
77
+ */
78
+ export declare function Head(operationConfig?: ControllerOperationConfig): MethodDecorator;
79
+ /**
80
+ * Method decorator to define an HTTP DELETE controllerMethod.
81
+ *
82
+ * @param operationConfig
83
+ * @return Method decorator function
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * @HttpController({ path: '/items' })
88
+ * class MyController {
89
+ * @Delete({
90
+ * path: '/{id}',
91
+ * description: 'Delete item by ID',
92
+ * directResponse: {
93
+ * description: 'Item deleted successfully',
94
+ * status: 204,
95
+ * },
96
+ * responses: {
97
+ * 404: {
98
+ * description: 'Item not found',
99
+ * },
100
+ * }, * })
101
+ * async deleteItemById(@PathParam({ name: 'id', schema: z.string().uuid() }) id: string): Promise<void> {
102
+ * // Handle DELETE /item/{id}
103
+ * const item = await this.itemsRepository.getItemById(id);
104
+ * if (!item) {
105
+ * throw new NotFoundError('Item not found', { details: { id } });
106
+ * }
107
+ * await this.itemsRepository.deleteItemById(id);
108
+ * }
109
+ * }
110
+ * ```
111
+ */
112
+ export declare function Delete(operationConfig?: ControllerOperationConfig): MethodDecorator;
113
+ /**
114
+ * Method decorator to define an HTTP POST controllerMethod.
115
+ * @param operationConfig
116
+ * @return Method decorator function
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * @HttpController({ path: '/items' })
121
+ * class MyController {
122
+ * @Post({
123
+ * description: 'Create a new item',
124
+ * directResponse: {
125
+ * description: 'Item created successfully',
126
+ * status: 201,
127
+ * jsonContent: { schema: z.object({ id: z.string(), name: z.string() }) },
128
+ * },
129
+ * })
130
+ * async createItem(@Body({ schema: z.object({ name: z.string() }) }) body: { name: string }): Promise<{ id: string; name: string }> {
131
+ * // Handle POST /items
132
+ * }
133
+ * }
134
+ * ```
135
+ */
136
+ export declare function Post(operationConfig?: ControllerRequestBodyOperationConfig): MethodDecorator;
137
+ /**
138
+ * Method decorator to define an HTTP PUT controllerMethod.
139
+ *
140
+ * @param operationConfig
141
+ * @return Method decorator function
142
+ *
143
+ * @example
144
+ * ```ts
145
+ * @HttpController({ path: '/items' })
146
+ * class MyController {
147
+ * @Put({
148
+ * path: '/{id}',
149
+ * description: 'Update item by ID',
150
+ * directResponse: {
151
+ * description: 'Item updated successfully',
152
+ * status: 204,
153
+ * jsonContent: { schema: z.object({ id: z.string(), name: z.string() }) },
154
+ * },
155
+ * responses: {
156
+ * 404: {
157
+ * description: 'Item not found',
158
+ * },
159
+ * },
160
+ * })
161
+ * async updateItemById(
162
+ * @PathParam({ name: 'id', schema: z.string().uuid() }) id: string,
163
+ * @Body({ schema: z.object({ name: z.string() }) }) body: { name: string }
164
+ * ): Promise<{ id: string; name: string }> {
165
+ * // Handle PUT /item/{id}
166
+ * const item = await this.itemsRepository.getItemById(id);
167
+ * if (!item) {
168
+ * throw new NotFoundError('Item not found', { details: { id } });
169
+ * }
170
+ * const updatedItem = await this.itemsRepository.updateItemById(id, body);
171
+ * return updatedItem;
172
+ * }
173
+ * }
174
+ * ```
175
+ */
176
+ export declare function Put(operationConfig?: ControllerRequestBodyOperationConfig): MethodDecorator;
177
+ /**
178
+ * Method decorator to define an HTTP PATCH controllerMethod.
179
+ *
180
+ * @param operationConfig
181
+ * @return Method decorator function
182
+ *
183
+ * @example
184
+ * ```ts
185
+ * @HttpController({ path: '/items' })
186
+ * class MyController {
187
+ * @Patch({
188
+ * path: '/{id}',
189
+ * description: 'Partially update item by ID',
190
+ * directResponse: {
191
+ * description: 'Item updated successfully',
192
+ * status: 204,
193
+ * jsonContent: { schema: z.object({ id: z.string(), name: z.string() }) },
194
+ * },
195
+ * responses: {
196
+ * 404: {
197
+ * description: 'Item not found',
198
+ * },
199
+ * }
200
+ * })
201
+ * async partiallyUpdateItemById(
202
+ * @PathParam({ name: 'id', schema: z.string().uuid() }) id: string,
203
+ * @Body({ schema: z.object({ name: z.string().optional() }) }) body: { name?: string }
204
+ * ): Promise<{ id: string; name: string }> {
205
+ * // Handle PATCH /item/{id}
206
+ * const item = await this.itemsRepository.getItemById(id);
207
+ * if (!item) {
208
+ * throw new NotFoundError('Item not found', { details: { id } });
209
+ * }
210
+ * const updatedItem = await this.itemsRepository.partiallyUpdateItemById(id, body);
211
+ * return updatedItem;
212
+ * }
213
+ * }
214
+ * ```
215
+ */
216
+ export declare function Patch(operationConfig?: ControllerRequestBodyOperationConfig): MethodDecorator;
217
+ /**
218
+ * Parameter decorator to define the HTTP request body.
219
+ *
220
+ * @param bodyConfig
221
+ * @returns Parameter decorator function
222
+ *
223
+ * @example
224
+ * ```ts
225
+ * @HttpController({ path: '/items' })
226
+ * class MyController {
227
+ * @Post({
228
+ * description: 'Create a new item',
229
+ * responses: {
230
+ * 201: {
231
+ * description: 'Item created'
232
+ * }
233
+ * }
234
+ * })
235
+ * async createItem(@Body({ schema: z.object({ name: z.string() }) }) body: { name: string }): Promise<void> {
236
+ * // Handle POST /items
237
+ * }
238
+ * }
239
+ * ```
240
+ */
241
+ export declare function Body(bodyConfig: ControllerRequest): ParameterDecorator;
242
+ /**
243
+ * Configuration for the {@link PathParam} decorator.
244
+ *
245
+ * @property name - The name of the path parameter as defined in the route.
246
+ * @property schema - Optional Zod schema to validate the path parameter.
247
+ *
248
+ */
249
+ export interface PathParamConfig {
250
+ name: string;
251
+ schema?: PathSchema;
252
+ }
253
+ /**
254
+ * Parameter decorator to define an HTTP path parameter.
255
+ *
256
+ * @param config
257
+ * @returns Parameter decorator function
258
+ *
259
+ * @example
260
+ * ```ts
261
+ * @HttpController({ path: '/items' })
262
+ * class MyController {
263
+ * @Get({
264
+ * path: '/{id}',
265
+ * description: 'Get item by ID',
266
+ * responses: {
267
+ * 200: {
268
+ * description: 'Successful directResponse',
269
+ * schema: z.object({ id: z.string(), name: z.string() })
270
+ * }
271
+ * }
272
+ * })
273
+ * async getItemById(@PathParam({ name: 'id', schema: z.string().uuid() }) id: string): Promise<{ id: string; name: string }> {
274
+ * // Handle GET /item/{id}
275
+ * return { id, name: 'Sample Item' };
276
+ * }
277
+ * }
278
+ * ```
279
+ */
280
+ export declare function PathParam(config: PathParamConfig): ParameterDecorator;
281
+ /**
282
+ * Configuration for the {@link QueryParam} decorator.
283
+ *
284
+ * @property name - The name of the query parameter.
285
+ * @property schema - Optional schema to validate the query parameter.
286
+ */
287
+ export interface QueryParamConfig {
288
+ name: string;
289
+ schema?: QueryItemSchema;
290
+ }
291
+ /**
292
+ * Parameter decorator to define an HTTP query parameter.
293
+ *
294
+ * @param config
295
+ * @returns Parameter decorator function
296
+ *
297
+ * @example
298
+ * ```ts
299
+ * @HttpController({ path: '/items' })
300
+ * class MyController {
301
+ * @Get({
302
+ * description: 'Search items',
303
+ * responses: {
304
+ * 200: {
305
+ * description: 'Successful directResponse',
306
+ * schema: z.array(z.object({ id: z.string(), name: z.string() }))
307
+ * }
308
+ * }
309
+ * })
310
+ * async searchItems(@QueryParam({ name: 'query', schema: z.string().min(3) }) query: string): Promise<{ id: string; name: string }[]> {
311
+ * // Handle GET /items?query=searchTerm
312
+ * return [{ id: '1', name: 'Sample Item' }];
313
+ * }
314
+ * }
315
+ * ```
316
+ */
317
+ export declare function QueryParam(config: QueryParamConfig): ParameterDecorator;
318
+ /**
319
+ * Configuration for the {@link HeaderParam} decorator.
320
+ *
321
+ * @property name - The name of the header parameter.
322
+ * @property schema - Optional Zod schema to validate the header parameter.
323
+ */
324
+ export interface HeaderParamConfig {
325
+ name: string;
326
+ schema?: ZodType<string | undefined>;
327
+ }
328
+ /**
329
+ * Parameter decorator to define an HTTP header parameter.
330
+ *
331
+ * @param config
332
+ * @returns Parameter decorator function
333
+ *
334
+ * @example
335
+ * ```ts
336
+ * @HttpController({ path: '/items' })
337
+ * class MyController {
338
+ * @Get({
339
+ * description: 'Get items with custom header',
340
+ * responses: {
341
+ * 200: {
342
+ * description: 'Successful directResponse',
343
+ * schema: z.array(z.object({ id: z.string(), name: z.string() }))
344
+ * }
345
+ * }
346
+ * })
347
+ * async getItems(@HeaderParam({ name: 'X-Custom-Header', schema: z.string().optional() }) customHeader: string | undefined): Promise<{ id: string; name: string }[]> {
348
+ * // Handle GET /items with custom header
349
+ * return [{ id: '1', name: 'Sample Item' }];
350
+ * }
351
+ * }
352
+ * ```
353
+ */
354
+ export declare function HeaderParam(config: HeaderParamConfig): ParameterDecorator;
355
+ /**
356
+ * Parameter decorator to inject the full HTTP request object.
357
+ *
358
+ * @returns Parameter decorator function
359
+ *
360
+ * @example
361
+ * ```ts
362
+ * @HttpController({ path: '/items' })
363
+ * class MyController {
364
+ * @Get({
365
+ * description: 'Get all items',
366
+ * responses: {
367
+ * 200: {
368
+ * description: 'Successful directResponse',
369
+ * schema: z.array(z.object({ id: z.string(), name: z.string() }))
370
+ * }
371
+ * }
372
+ * })
373
+ * async getItems(@Request() req: HttpRequest): Promise<{ id: string; name: string }[]> {
374
+ * // Handle GET /api/items
375
+ * const name = req.query.get('name');
376
+ * return [{ id: '1', name: name ?? 'Sample Item' }];
377
+ * }
378
+ * }
379
+ * ```
380
+ */
381
+ export declare function Request(): ParameterDecorator;
382
+ /**
383
+ * Parameter decorator to inject the authentication context.
384
+ * Injects an object containing information about the authenticated user, such as their principal and claims.
385
+ * Injection should be used of type {@link AuthContext}.
386
+ *
387
+ * @returns Parameter decorator function
388
+ *
389
+ * @example
390
+ * ```ts
391
+ * @HttpController({ path: '/items' })
392
+ * class MyController {
393
+ * @Get({
394
+ * description: 'Get all items',
395
+ * responses: {
396
+ * 200: {
397
+ * description: 'Successful directResponse',
398
+ * schema: z.array(z.object({ id: z.string(), name: z.string() }))
399
+ * }
400
+ * }
401
+ * })
402
+ * async getItems(@AuthCtx() authContext: AuthContext): Promise<{ id: string; name: string }[]> {
403
+ * // Handle GET /api/items
404
+ * const userId = authContext.principal?.subject ?? 'unknown';
405
+ * return [{ id: '1', name: `Sample Item for user ${userId}` }];
406
+ * }
407
+ * }
408
+ * ```
409
+ */
410
+ export declare function AuthCtx(): ParameterDecorator;
@@ -0,0 +1,123 @@
1
+ import { ResponseConfig, ZodMediaTypeObject } from '@asteasolutions/zod-to-openapi';
2
+ import { HttpFunctionOptions } from '@azure/functions';
3
+ import { HeadersObject, OperationObject } from 'openapi3-ts/oas30';
4
+ import { CommonArgMetadata, TriggerHandlerClassMetadata } from '../../shared';
5
+ import { _ZodString, ZodObject, ZodType } from 'zod';
6
+ /**
7
+ * ControllerConfig defines the configuration for an HTTP controller.
8
+ * - `application`: Optional string representing the application name. Name should be reference to a registered application in the platform.
9
+ * if not provided, the controller will be registered under the default application.
10
+ * - `path`: Required string representing the base path for the controller, relative to the application base path.
11
+ * This path will be prefixed to all operation paths defined in the controller.
12
+ * - `tags`: Optional array of strings representing tags for the controller.
13
+ */
14
+ export interface ControllerConfig {
15
+ application?: string;
16
+ path: string;
17
+ tags?: string[];
18
+ }
19
+ export declare const HTTP_CONTROLLER_TYPE = "http-controller";
20
+ export interface HttpControllerMetadata extends TriggerHandlerClassMetadata, ControllerConfig {
21
+ type: typeof HTTP_CONTROLLER_TYPE;
22
+ }
23
+ /**
24
+ * DirectResponseObject defines the structure for a direct response in an HTTP controller operation.
25
+ * - `status`: Optional number representing the HTTP status code for the response. Defaults to 200 if not provided.
26
+ * - `description`: Required string providing a description of the response.
27
+ * - `jsonContent`: Optional ZodMediaTypeObject defining the JSON content schema for the response body.
28
+ * - `headers`: Optional object defining the headers for the response. Can be either a ZodObject or a HeadersObject.
29
+ */
30
+ export interface DirectResponseObject {
31
+ status?: number;
32
+ description: string;
33
+ jsonContent?: ZodMediaTypeObject;
34
+ headers?: ZodObject<Record<string, _ZodString>> | HeadersObject;
35
+ }
36
+ /**
37
+ * ControllerOperationConfig defines the configuration for an HTTP controller operation.
38
+ * - `operationId`: Optional string representing the unique identifier for the operation.
39
+ * - `description`: Optional string providing a description of the operation.
40
+ * - `summary`: Optional string providing a summary of the operation.
41
+ * - `tags`: Optional array of strings representing tags for the operation.
42
+ * - `parameters`: Optional array of parameters for the operation, as defined in the OpenAPI specification.
43
+ * - `security`: Optional array defining the security requirements for the operation, as defined in the OpenAPI specification.
44
+ * - `path`: Optional string representing the path for the operation, relative to the controller's base path.
45
+ * - `directResponse`: Optional DirectResponseObject defining a direct response for the operation.
46
+ * - `responses`: Optional record mapping HTTP status codes to ResponseConfig objects, defining the responses for the operation.
47
+ * - `authLevel`: Optional string defining the authentication level required for the operation, as defined in the Azure Functions HttpFunctionOptions.
48
+ * - `extraInputs`: Optional array of extra input bindings for the operation, as defined in the Azure Functions HttpFunctionOptions.
49
+ * - `extraOutputs`: Optional array of extra output bindings for the operation, as defined in the Azure Functions HttpFunctionOptions.
50
+ */
51
+ export type ControllerOperationConfig = Pick<OperationObject, 'operationId' | 'description' | 'summary' | 'tags' | 'parameters' | 'security'> & Partial<Pick<OperationObject, 'responses'>> & {
52
+ path?: string;
53
+ directResponse?: DirectResponseObject;
54
+ responses?: Record<string, ResponseConfig>;
55
+ } & Pick<HttpFunctionOptions, 'authLevel' | 'extraInputs' | 'extraOutputs'>;
56
+ /**
57
+ * ControllerRequest defines the structure for a request body in an HTTP controller operation.
58
+ * - `required`: Optional boolean indicating whether the request body is required. Defaults to false if not provided.
59
+ * - `description`: Optional string providing a description of the request body.
60
+ * - `schema`: Required ZodType defining the schema for the request body.
61
+ * - `example`: Optional example value for the request body, which can be of any type.
62
+ */
63
+ export interface ControllerRequest {
64
+ required?: boolean;
65
+ description?: string;
66
+ schema: ZodType<unknown>;
67
+ example?: unknown;
68
+ }
69
+ /**
70
+ * ControllerRequestBodyOperationConfig defines the configuration for an HTTP controller operation that includes a request body.
71
+ * It extends the ControllerOperationConfig and includes the 'requestBody' property from the OpenAPI OperationObject.
72
+ * - `operationId`: Optional string representing the unique identifier for the operation.
73
+ * - `description`: Optional string providing a description of the operation.
74
+ * - `summary`: Optional string providing a summary of the operation.
75
+ * - `tags`: Optional array of strings representing tags for the operation.
76
+ * - `parameters`: Optional array of parameters for the operation, as defined in the OpenAPI specification.
77
+ * - `security`: Optional array defining the security requirements for the operation, as defined in the OpenAPI specification.
78
+ * - `path`: Optional string representing the path for the operation, relative to the controller's base path.
79
+ * - `directResponse`: Optional DirectResponseObject defining a direct response for the operation.
80
+ * - `responses`: Optional record mapping HTTP status codes to ResponseConfig objects, defining the responses for the operation.
81
+ * - `authLevel`: Optional string defining the authentication level required for the operation, as defined in the Azure Functions HttpFunctionOptions.
82
+ * - `extraInputs`: Optional array of extra input bindings for the operation, as defined in the Azure Functions HttpFunctionOptions.
83
+ * - `extraOutputs`: Optional array of extra output bindings for the operation, as defined in the Azure Functions HttpFunctionOptions.
84
+ * - `requestBody`: Optional property from the OpenAPI OperationObject defining the request body for the operation.
85
+ */
86
+ export type ControllerRequestBodyOperationConfig = ControllerOperationConfig & Pick<OperationObject, 'requestBody'>;
87
+ export type ControllerOperationCommonArgMetadata = {
88
+ type: 'request' | 'authContext';
89
+ } | CommonArgMetadata;
90
+ export type PathSchema = ZodType<string | number>;
91
+ export interface ControllerOperationPathArgMetadata {
92
+ type: 'path';
93
+ name: string;
94
+ schema?: PathSchema;
95
+ }
96
+ export interface ControllerOperationHeaderArgMetadata {
97
+ type: 'header';
98
+ name: string;
99
+ schema?: ZodType<string | undefined>;
100
+ }
101
+ export type QueryItemType = string | number | boolean | string[] | number[] | undefined;
102
+ export type QueryItemSchema = ZodType<QueryItemType>;
103
+ export interface ControllerOperationQueryArgMetadata {
104
+ type: 'query';
105
+ name: string;
106
+ schema?: QueryItemSchema;
107
+ }
108
+ export interface ControllerOperationBodyArgMetadata extends ControllerRequest {
109
+ type: 'body';
110
+ }
111
+ export type ControllerOperationArgMetadata = ControllerOperationCommonArgMetadata | ControllerOperationPathArgMetadata | ControllerOperationHeaderArgMetadata | ControllerOperationQueryArgMetadata | ControllerOperationBodyArgMetadata;
112
+ export interface ControllerOperationArgsMetadata {
113
+ args: ControllerOperationArgMetadata[];
114
+ }
115
+ export type ControllerOperationBaseMetadata = (ControllerOperationConfig & {
116
+ method: 'get' | 'head' | 'delete';
117
+ }) | (ControllerRequestBodyOperationConfig & {
118
+ method: 'post' | 'put' | 'patch';
119
+ });
120
+ export type ControllerOperationMetadata = {
121
+ type: typeof HTTP_CONTROLLER_TYPE;
122
+ } & ControllerOperationBaseMetadata & ControllerOperationArgsMetadata;
123
+ export type OperationMethod = ControllerOperationMetadata['method'];
@@ -0,0 +1,3 @@
1
+ export * from '../http-controller-metadata.reader';
2
+ export * from './decorators';
3
+ export * from './decorators.model';
@@ -0,0 +1,8 @@
1
+ import { TriggerHandlerClass, TriggerHandlerMetadataReader } from '../shared';
2
+ import { ControllerOperationMetadata, HttpControllerMetadata } from './decorators';
3
+ export declare class HttpControllerMetadataReader {
4
+ private readonly metadataReader;
5
+ constructor(metadataReader: TriggerHandlerMetadataReader);
6
+ getHandlerClassMetadata(triggerHandlerClass: TriggerHandlerClass): HttpControllerMetadata;
7
+ getOperationMetadata(handlerClass: TriggerHandlerClass, operation: string): ControllerOperationMetadata;
8
+ }
@@ -0,0 +1,12 @@
1
+ import { Container } from 'inversify';
2
+ import { TriggerHandlerClass, TriggerHandlerRegistrationService } from '../shared';
3
+ import { HttpHandlerFactory } from './http-handler.factory';
4
+ import { HttpOperationsRegistrationService } from './http-operations-registration.service';
5
+ export declare class HttpControllerRegistrationService implements TriggerHandlerRegistrationService {
6
+ private readonly platformContainer;
7
+ private readonly operationsRegistrationService;
8
+ private readonly handlerFactory;
9
+ constructor(platformContainer: Container, operationsRegistrationService: HttpOperationsRegistrationService, handlerFactory: HttpHandlerFactory);
10
+ register(controllerClass: TriggerHandlerClass): void;
11
+ private registerTrigger;
12
+ }
@@ -0,0 +1,131 @@
1
+ import { Cookie, HttpResponseInit } from '@azure/functions';
2
+ import { StatusCodes } from 'http-status-codes';
3
+ import type { OpenAPIObject } from 'openapi3-ts/oas30';
4
+ import { AzFunctionsRuntimeError } from '../shared';
5
+ import { z } from 'zod';
6
+ export type OpenAPIObjectConfig = Omit<OpenAPIObject, 'paths' | 'webhooks'>;
7
+ /**
8
+ * Represents a REST application with a name, context, and OpenAPI configuration.
9
+ *
10
+ * @property name The name of the REST application.
11
+ * @property context The context path for the REST application.
12
+ * @property openApiConfig The OpenAPI configuration for the REST application.
13
+ */
14
+ export interface RestApplication {
15
+ name: string;
16
+ context: string;
17
+ openApiConfig: OpenAPIObjectConfig;
18
+ }
19
+ /**
20
+ * Represents the options for an HTTP trigger error, including the response and additional details.
21
+ *
22
+ * @property response The HTTP response initialization options, including the status.
23
+ * @property details Additional details about the error.
24
+ */
25
+ export interface HttpTriggerErrorOptions<Status extends number = number> extends ErrorOptions {
26
+ response?: HttpResponseInit & {
27
+ status?: Status;
28
+ };
29
+ details?: Record<string, unknown>;
30
+ }
31
+ export declare abstract class BaseHttpTriggerError<Status extends number = number> extends AzFunctionsRuntimeError {
32
+ private readonly _response;
33
+ protected abstract getStatus(): Status;
34
+ get status(): number;
35
+ constructor(message?: string, options?: HttpTriggerErrorOptions<Status>);
36
+ get response(): HttpResponseInit;
37
+ }
38
+ /**
39
+ * Represents a common HTTP trigger error with a default status of 500 (Internal Server Error).
40
+ *
41
+ * It can optionally include a response object with a specific status and body, and additional details about the error.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * throw new CommonHttpTriggerError('Resource was not found', {
46
+ * response: {
47
+ * status: 404,
48
+ * jsonBody: {
49
+ * error: 'Resource not found'
50
+ * }
51
+ * }
52
+ * });
53
+ * ```
54
+ */
55
+ export declare class CommonHttpTriggerError extends BaseHttpTriggerError {
56
+ getStatus(): number;
57
+ }
58
+ /**
59
+ * Represents a Bad Request (400) HTTP trigger error.
60
+ */
61
+ export declare class BadRequestError extends BaseHttpTriggerError<StatusCodes.BAD_REQUEST> {
62
+ getStatus(): StatusCodes.BAD_REQUEST;
63
+ }
64
+ /**
65
+ * Represents an Unauthorized (401) HTTP trigger error.
66
+ */
67
+ export declare class UnauthorizedError extends BaseHttpTriggerError<StatusCodes.UNAUTHORIZED> {
68
+ getStatus(): StatusCodes.UNAUTHORIZED;
69
+ }
70
+ /**
71
+ * Represents a Forbidden (403) HTTP trigger error.
72
+ */
73
+ export declare class ForbiddenError extends BaseHttpTriggerError<StatusCodes.FORBIDDEN> {
74
+ getStatus(): StatusCodes.FORBIDDEN;
75
+ }
76
+ /**
77
+ * Represents a Not Found (404) HTTP trigger error.
78
+ */
79
+ export declare class NotFoundError extends BaseHttpTriggerError<StatusCodes.NOT_FOUND> {
80
+ getStatus(): StatusCodes.NOT_FOUND;
81
+ }
82
+ /**
83
+ * Represents an Internal Server Error (500) HTTP trigger error.
84
+ */
85
+ export declare class InternalServerError extends BaseHttpTriggerError<StatusCodes.INTERNAL_SERVER_ERROR> {
86
+ getStatus(): StatusCodes.INTERNAL_SERVER_ERROR;
87
+ }
88
+ /**
89
+ * Default Zod schema for validating string values.
90
+ */
91
+ export declare const StringSchema: z.ZodString;
92
+ /**
93
+ * Default Zod schema for validating optional string values.
94
+ */
95
+ export declare const OptionalStringSchema: z.ZodOptional<z.ZodString>;
96
+ /**
97
+ * Default Zod schema for validating number values.
98
+ */
99
+ export declare const NumberSchema: z.ZodNumber;
100
+ /**
101
+ * Abstract builder class for constructing HTTP direct responses.
102
+ *
103
+ * @template T The type of the JSON body to be included in the response.
104
+ */
105
+ export declare abstract class HttpDirectResponseBuilder<T = unknown> {
106
+ abstract status(status: number): HttpDirectResponseBuilder<T>;
107
+ abstract header(name: string, value: string): HttpDirectResponseBuilder<T>;
108
+ abstract addCookie(value: Cookie): HttpDirectResponseBuilder<T>;
109
+ abstract jsonBody(body: T): HttpDirectResponseBuilder<T>;
110
+ abstract build(): HttpResponseInit;
111
+ /**
112
+ * Creates a new instance of the HTTP direct response builder.
113
+ *
114
+ * @template T The type of the JSON body to be included in the response.
115
+ * @returns A new instance of HttpDirectResponseBuilder.
116
+ */
117
+ static builder<T>(): HttpDirectResponseBuilder<T>;
118
+ }
119
+ export declare class HttpDirectResponseBuilderImpl<T = unknown> extends HttpDirectResponseBuilder<T> {
120
+ private _status;
121
+ private _headers?;
122
+ private _cookies?;
123
+ private _jsonBody?;
124
+ status(status: number): HttpDirectResponseBuilder<T>;
125
+ header(name: string, value: string): HttpDirectResponseBuilder<T>;
126
+ addCookie(value: Cookie): HttpDirectResponseBuilder<T>;
127
+ jsonBody(body: T): HttpDirectResponseBuilder<T>;
128
+ build(): HttpResponseInit;
129
+ }
130
+ export declare function joinPosix(...segments: string[]): string;
131
+ export declare function isHttpResponseInit(obj: unknown): obj is HttpResponseInit;