@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.
- package/LICENSE +21 -0
- package/README.md +830 -0
- package/coverage/cobertura-coverage.xml +3482 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/context/forked-invocation-context.ts.html +127 -0
- package/coverage/lcov-report/context/index.html +191 -0
- package/coverage/lcov-report/context/index.ts.html +97 -0
- package/coverage/lcov-report/context/platform-context.manager.ts.html +193 -0
- package/coverage/lcov-report/context/platform-context.model.ts.html +262 -0
- package/coverage/lcov-report/context/platform-context.provider.ts.html +196 -0
- package/coverage/lcov-report/context/platform.execution.context.ts.html +217 -0
- package/coverage/lcov-report/context/wrapped-invocation-context.ts.html +163 -0
- package/coverage/lcov-report/event-hub-handler/azure-event-hub-trigger.model.ts.html +187 -0
- package/coverage/lcov-report/event-hub-handler/azure-event-hub-trigger.service.ts.html +760 -0
- package/coverage/lcov-report/event-hub-handler/decorators/decorators.model.ts.html +292 -0
- package/coverage/lcov-report/event-hub-handler/decorators/decorators.ts.html +778 -0
- package/coverage/lcov-report/event-hub-handler/decorators/index.html +146 -0
- package/coverage/lcov-report/event-hub-handler/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handle-method-args-metadata.service.ts.html +130 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler-metadata.reader.ts.html +199 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler-registration.service.ts.html +220 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler.factory.ts.html +283 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler.model.ts.html +421 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler.provider.ts.html +187 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger-support.factory.ts.html +787 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger-support.service.ts.html +829 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger.model.ts.html +193 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger.service.ts.html +859 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-triggers-registration.service.ts.html +307 -0
- package/coverage/lcov-report/event-hub-handler/index.html +221 -0
- package/coverage/lcov-report/event-hub-handler/index.ts.html +142 -0
- package/coverage/lcov-report/eventhub-handler/decorators/decorators.model.ts.html +277 -0
- package/coverage/lcov-report/eventhub-handler/decorators/decorators.ts.html +679 -0
- package/coverage/lcov-report/eventhub-handler/decorators/index.html +131 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler-metadata.reader.ts.html +196 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler-registration.service.ts.html +220 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler.factory.ts.html +193 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler.model.ts.html +406 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-trigger.model.ts.html +187 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-trigger.service.ts.html +760 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-triggers-registration.service.ts.html +304 -0
- package/coverage/lcov-report/eventhub-handler/index.html +206 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/forked-invocation-context.ts.html +127 -0
- package/coverage/lcov-report/function-handler-metadata.reader.ts.html +172 -0
- package/coverage/lcov-report/http-controller/authentication.provider.ts.html +481 -0
- package/coverage/lcov-report/http-controller/authenticator.provider.ts.html +460 -0
- package/coverage/lcov-report/http-controller/azure-http-trigger.service.ts.html +1045 -0
- package/coverage/lcov-report/http-controller/decorators/decorators.model.ts.html +388 -0
- package/coverage/lcov-report/http-controller/decorators/decorators.ts.html +1627 -0
- package/coverage/lcov-report/http-controller/decorators/index.html +146 -0
- package/coverage/lcov-report/http-controller/decorators/index.ts.html +94 -0
- package/coverage/lcov-report/http-controller/http-controller-metadata.reader.ts.html +271 -0
- package/coverage/lcov-report/http-controller/http-controller-metadata.service.ts.html +130 -0
- package/coverage/lcov-report/http-controller/http-controller-platform.model.ts.html +187 -0
- package/coverage/lcov-report/http-controller/http-controller-registration.service.ts.html +241 -0
- package/coverage/lcov-report/http-controller/http-controller.model.ts.html +745 -0
- package/coverage/lcov-report/http-controller/http-handler-support.factory.ts.html +499 -0
- package/coverage/lcov-report/http-controller/http-handler.factory.ts.html +415 -0
- package/coverage/lcov-report/http-controller/http-operation-registration.service.ts.html +328 -0
- package/coverage/lcov-report/http-controller/http-operations-registration.service.ts.html +328 -0
- package/coverage/lcov-report/http-controller/http-request-arg-provider.factory.ts.html +580 -0
- package/coverage/lcov-report/http-controller/http-request-handler.provider.ts.html +388 -0
- package/coverage/lcov-report/http-controller/http-response-processor.factory.ts.html +316 -0
- package/coverage/lcov-report/http-controller/index.html +311 -0
- package/coverage/lcov-report/http-controller/index.ts.html +226 -0
- package/coverage/lcov-report/http-controller/open-api-definition.service.ts.html +568 -0
- package/coverage/lcov-report/http-controller/open-api-metadata.service.ts.html +373 -0
- package/coverage/lcov-report/http-controller/open-api-print.service.ts.html +232 -0
- package/coverage/lcov-report/http-controller/open-api-registration.service.ts.html +220 -0
- package/coverage/lcov-report/http-controller/rest-open-api.regstry.ts.html +262 -0
- package/coverage/lcov-report/http-controller/security/authentication-service.factory.ts.html +280 -0
- package/coverage/lcov-report/http-controller/security/authentication-service.ts.html +115 -0
- package/coverage/lcov-report/http-controller/security/authenticator.provider.ts.html +799 -0
- package/coverage/lcov-report/http-controller/security/bearer-security-authentication.service.ts.html +133 -0
- package/coverage/lcov-report/http-controller/security/index.html +206 -0
- package/coverage/lcov-report/http-controller/security/index.ts.html +94 -0
- package/coverage/lcov-report/http-controller/security/model.ts.html +133 -0
- package/coverage/lcov-report/http-controller/security/operation-authentication.resolver.ts.html +418 -0
- package/coverage/lcov-report/http-controller/security/principal-merge.service.ts.html +163 -0
- package/coverage/lcov-report/http-controller/security/strict-principal-merge.servce.ts.html +154 -0
- package/coverage/lcov-report/http-controller/swagger-handling.service.ts.html +463 -0
- package/coverage/lcov-report/index.html +281 -0
- package/coverage/lcov-report/init.ts.html +97 -0
- package/coverage/lcov-report/ioc-container.utils.ts.html +100 -0
- package/coverage/lcov-report/logger/azure-log-transport.service.ts.html +433 -0
- package/coverage/lcov-report/logger/bindings.ts.html +253 -0
- package/coverage/lcov-report/logger/index.html +221 -0
- package/coverage/lcov-report/logger/index.ts.html +163 -0
- package/coverage/lcov-report/logger/log-level.service.ts.html +127 -0
- package/coverage/lcov-report/logger/log-transport.service.ts.html +571 -0
- package/coverage/lcov-report/logger/logger-factory.provider.ts.html +142 -0
- package/coverage/lcov-report/logger/logger.factory.ts.html +172 -0
- package/coverage/lcov-report/logger/logger.model.ts.html +868 -0
- package/coverage/lcov-report/logger/logger.utils.ts.html +877 -0
- package/coverage/lcov-report/logger/model.ts.html +172 -0
- package/coverage/lcov-report/logger/otel.logger.ts.html +358 -0
- package/coverage/lcov-report/logger/platform.logger.ts.html +229 -0
- package/coverage/lcov-report/logger/trie-search.service.ts.html +616 -0
- package/coverage/lcov-report/platform/azure-platform.ts.html +256 -0
- package/coverage/lcov-report/platform/index.html +176 -0
- package/coverage/lcov-report/platform/index.ts.html +139 -0
- package/coverage/lcov-report/platform/platform-component-metadata.service.ts.html +115 -0
- package/coverage/lcov-report/platform/register-function.factory.ts.html +145 -0
- package/coverage/lcov-report/platform/register-trigger-handler.factory.ts.html +214 -0
- package/coverage/lcov-report/platform/security-context.ts.html +127 -0
- package/coverage/lcov-report/platform/startup.service.ts.html +106 -0
- package/coverage/lcov-report/platform/system-logger-name.provider.ts.html +145 -0
- package/coverage/lcov-report/platform/system.container.ts.html +169 -0
- package/coverage/lcov-report/platform-context.model.ts.html +124 -0
- package/coverage/lcov-report/platform.logger.ts.html +316 -0
- package/coverage/lcov-report/platform.model.ts.html +292 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/security/index.html +146 -0
- package/coverage/lcov-report/security/index.ts.html +91 -0
- package/coverage/lcov-report/security/security-context.ts.html +130 -0
- package/coverage/lcov-report/security/security.model.ts.html +169 -0
- package/coverage/lcov-report/shared/all-settled.util.ts.html +118 -0
- package/coverage/lcov-report/shared/decorators/decorators.model.ts.html +136 -0
- package/coverage/lcov-report/shared/decorators/decorators.ts.html +346 -0
- package/coverage/lcov-report/shared/decorators/index.html +146 -0
- package/coverage/lcov-report/shared/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/shared/function-handler-metadata.reader.ts.html +172 -0
- package/coverage/lcov-report/shared/index.html +176 -0
- package/coverage/lcov-report/shared/index.ts.html +133 -0
- package/coverage/lcov-report/shared/ioc-container.utils.ts.html +115 -0
- package/coverage/lcov-report/shared/platform-context-local-storage.ts.html +133 -0
- package/coverage/lcov-report/shared/platform-context.manager.ts.html +253 -0
- package/coverage/lcov-report/shared/platform.context.provider.ts.html +136 -0
- package/coverage/lcov-report/shared/platform.model.ts.html +298 -0
- package/coverage/lcov-report/shared/security.model.ts.html +142 -0
- package/coverage/lcov-report/shared/trie-search.service.ts.html +337 -0
- package/coverage/lcov-report/shared/trigger-handler-metadata.reader.ts.html +166 -0
- package/coverage/lcov-report/shared/zod-parser-wrapper.service.ts.html +217 -0
- package/coverage/lcov-report/shared/zod-parser-wrapper.ts.html +232 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/context/index.html +191 -0
- package/coverage/lcov-report/src/context/index.ts.html +97 -0
- package/coverage/lcov-report/src/context/platform-context.manager.ts.html +193 -0
- package/coverage/lcov-report/src/context/platform-context.model.ts.html +262 -0
- package/coverage/lcov-report/src/context/platform-context.provider.ts.html +196 -0
- package/coverage/lcov-report/src/context/platform.execution.context.ts.html +217 -0
- package/coverage/lcov-report/src/context/wrapped-invocation-context.ts.html +163 -0
- package/coverage/lcov-report/src/event-hub-handler/azure-event-hub-trigger.model.ts.html +187 -0
- package/coverage/lcov-report/src/event-hub-handler/azure-event-hub-trigger.service.ts.html +769 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/decorators.model.ts.html +313 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/decorators.ts.html +778 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/index.html +146 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handle-method-args-metadata.service.ts.html +130 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler-metadata.reader.ts.html +199 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler-registration.service.ts.html +220 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.factory.ts.html +283 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.model.ts.html +421 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.provider.ts.html +187 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger-support.factory.ts.html +787 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger-support.service.ts.html +832 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger.model.ts.html +193 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger.service.ts.html +859 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-triggers-registration.service.ts.html +307 -0
- package/coverage/lcov-report/src/event-hub-handler/index.html +221 -0
- package/coverage/lcov-report/src/event-hub-handler/index.ts.html +142 -0
- package/coverage/lcov-report/src/framework.container.ts.html +157 -0
- package/coverage/lcov-report/src/http-controller/authentication.provider.ts.html +481 -0
- package/coverage/lcov-report/src/http-controller/authenticator.provider.ts.html +460 -0
- package/coverage/lcov-report/src/http-controller/azure-http-trigger.service.ts.html +865 -0
- package/coverage/lcov-report/src/http-controller/decorators/decorators.model.ts.html +553 -0
- package/coverage/lcov-report/src/http-controller/decorators/decorators.ts.html +1633 -0
- package/coverage/lcov-report/src/http-controller/decorators/index.html +146 -0
- package/coverage/lcov-report/src/http-controller/decorators/index.ts.html +94 -0
- package/coverage/lcov-report/src/http-controller/http-controller-metadata.reader.ts.html +271 -0
- package/coverage/lcov-report/src/http-controller/http-controller-metadata.service.ts.html +121 -0
- package/coverage/lcov-report/src/http-controller/http-controller-platform.model.ts.html +187 -0
- package/coverage/lcov-report/src/http-controller/http-controller-registration.service.ts.html +241 -0
- package/coverage/lcov-report/src/http-controller/http-controller.model.ts.html +784 -0
- package/coverage/lcov-report/src/http-controller/http-handler-support.factory.ts.html +481 -0
- package/coverage/lcov-report/src/http-controller/http-handler.factory.ts.html +406 -0
- package/coverage/lcov-report/src/http-controller/http-operation-registration.service.ts.html +328 -0
- package/coverage/lcov-report/src/http-controller/http-operations-registration.service.ts.html +328 -0
- package/coverage/lcov-report/src/http-controller/http-request-arg-provider.factory.ts.html +580 -0
- package/coverage/lcov-report/src/http-controller/http-request-handler.provider.ts.html +388 -0
- package/coverage/lcov-report/src/http-controller/http-response-processor.factory.ts.html +316 -0
- package/coverage/lcov-report/src/http-controller/index.html +311 -0
- package/coverage/lcov-report/src/http-controller/index.ts.html +226 -0
- package/coverage/lcov-report/src/http-controller/open-api-definition.service.ts.html +550 -0
- package/coverage/lcov-report/src/http-controller/open-api-metadata.service.ts.html +373 -0
- package/coverage/lcov-report/src/http-controller/open-api-print.service.ts.html +232 -0
- package/coverage/lcov-report/src/http-controller/open-api-registration.service.ts.html +220 -0
- package/coverage/lcov-report/src/http-controller/rest-open-api.regstry.ts.html +262 -0
- package/coverage/lcov-report/src/http-controller/security/authentication-service.factory.ts.html +280 -0
- package/coverage/lcov-report/src/http-controller/security/authentication-service.ts.html +139 -0
- package/coverage/lcov-report/src/http-controller/security/authenticator.provider.ts.html +799 -0
- package/coverage/lcov-report/src/http-controller/security/bearer-security-authentication.service.ts.html +133 -0
- package/coverage/lcov-report/src/http-controller/security/index.html +206 -0
- package/coverage/lcov-report/src/http-controller/security/index.ts.html +94 -0
- package/coverage/lcov-report/src/http-controller/security/model.ts.html +133 -0
- package/coverage/lcov-report/src/http-controller/security/operation-authentication.resolver.ts.html +418 -0
- package/coverage/lcov-report/src/http-controller/security/principal-merge.service.ts.html +163 -0
- package/coverage/lcov-report/src/http-controller/security/strict-principal-merge.servce.ts.html +154 -0
- package/coverage/lcov-report/src/http-controller/swagger-handling.service.ts.html +463 -0
- package/coverage/lcov-report/src/index.html +161 -0
- package/coverage/lcov-report/src/init.ts.html +97 -0
- package/coverage/lcov-report/src/logger/azure-log-transport.service.ts.html +433 -0
- package/coverage/lcov-report/src/logger/bindings.ts.html +253 -0
- package/coverage/lcov-report/src/logger/index.html +221 -0
- package/coverage/lcov-report/src/logger/index.ts.html +163 -0
- package/coverage/lcov-report/src/logger/log-level.service.ts.html +127 -0
- package/coverage/lcov-report/src/logger/log-transport.service.ts.html +571 -0
- package/coverage/lcov-report/src/logger/logger-factory.provider.ts.html +142 -0
- package/coverage/lcov-report/src/logger/logger.factory.ts.html +172 -0
- package/coverage/lcov-report/src/logger/logger.model.ts.html +868 -0
- package/coverage/lcov-report/src/logger/logger.utils.ts.html +877 -0
- package/coverage/lcov-report/src/logger/otel.logger.ts.html +358 -0
- package/coverage/lcov-report/src/logger/platform.logger.ts.html +229 -0
- package/coverage/lcov-report/src/logger/trie-search.service.ts.html +616 -0
- package/coverage/lcov-report/src/middleware.ts.html +232 -0
- package/coverage/lcov-report/src/platform/azure-platform.ts.html +256 -0
- package/coverage/lcov-report/src/platform/index.html +176 -0
- package/coverage/lcov-report/src/platform/index.ts.html +139 -0
- package/coverage/lcov-report/src/platform/platform-component-metadata.service.ts.html +115 -0
- package/coverage/lcov-report/src/platform/register-function.factory.ts.html +145 -0
- package/coverage/lcov-report/src/platform/register-trigger-handler.factory.ts.html +214 -0
- package/coverage/lcov-report/src/platform/security-context.ts.html +127 -0
- package/coverage/lcov-report/src/platform/startup.service.ts.html +202 -0
- package/coverage/lcov-report/src/platform/system-logger-name.provider.ts.html +145 -0
- package/coverage/lcov-report/src/platform/system.container.ts.html +172 -0
- package/coverage/lcov-report/src/platform.container.ts.html +148 -0
- package/coverage/lcov-report/src/security/index.html +146 -0
- package/coverage/lcov-report/src/security/index.ts.html +91 -0
- package/coverage/lcov-report/src/security/security-context.ts.html +175 -0
- package/coverage/lcov-report/src/security/security.model.ts.html +223 -0
- package/coverage/lcov-report/src/shared/decorators/decorators.model.ts.html +136 -0
- package/coverage/lcov-report/src/shared/decorators/decorators.ts.html +346 -0
- package/coverage/lcov-report/src/shared/decorators/index.html +146 -0
- package/coverage/lcov-report/src/shared/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/src/shared/index.html +176 -0
- package/coverage/lcov-report/src/shared/index.ts.html +133 -0
- package/coverage/lcov-report/src/shared/ioc-container.utils.ts.html +115 -0
- package/coverage/lcov-report/src/shared/platform-context-local-storage.ts.html +133 -0
- package/coverage/lcov-report/src/shared/platform.model.ts.html +298 -0
- package/coverage/lcov-report/src/shared/security.model.ts.html +139 -0
- package/coverage/lcov-report/src/shared/trie-search.service.ts.html +337 -0
- package/coverage/lcov-report/src/shared/trigger-handler-metadata.reader.ts.html +166 -0
- package/coverage/lcov-report/src/shared/zod-parser-wrapper.ts.html +232 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov-report/test/utils.ts.html +100 -0
- package/coverage/lcov-report/test-utils/index.html +116 -0
- package/coverage/lcov-report/test-utils/utils.ts.html +100 -0
- package/coverage/lcov-report/trie-search.service.ts.html +469 -0
- package/coverage/lcov-report/trigger-handler-metadata.reader.ts.html +187 -0
- package/coverage/lcov-report/wrapped-invocation-context.ts.html +163 -0
- package/coverage/lcov-report/zod-parser-wrapper.ts.html +232 -0
- package/coverage/lcov.info +3220 -0
- package/dist/assets/swagger-ui/LICENSE +202 -0
- package/dist/assets/swagger-ui/NOTICE +2 -0
- package/dist/assets/swagger-ui/README.md +40 -0
- package/dist/assets/swagger-ui/absolute-path.js +1 -0
- package/dist/assets/swagger-ui/favicon-16x16.png +0 -0
- package/dist/assets/swagger-ui/favicon-32x32.png +0 -0
- package/dist/assets/swagger-ui/index.css +16 -0
- package/dist/assets/swagger-ui/index.html +19 -0
- package/dist/assets/swagger-ui/index.js +1 -0
- package/dist/assets/swagger-ui/log.bundle-sizes.swagger-ui.txt +114 -0
- package/dist/assets/swagger-ui/log.es-bundle-core-sizes.swagger-ui.txt +14 -0
- package/dist/assets/swagger-ui/log.es-bundle-sizes.swagger-ui.txt +114 -0
- package/dist/assets/swagger-ui/oauth2-redirect.html +6 -0
- package/dist/assets/swagger-ui/oauth2-redirect.js +1 -0
- package/dist/assets/swagger-ui/package.json +20 -0
- package/dist/assets/swagger-ui/swagger-initializer.js +1 -0
- package/dist/assets/swagger-ui/swagger-ui-bundle.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-bundle.js.LICENSE.txt +106 -0
- package/dist/assets/swagger-ui/swagger-ui-bundle.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js.LICENSE.txt +35 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle.js.LICENSE.txt +106 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js.LICENSE.txt +22 -0
- package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui.css +3 -0
- package/dist/assets/swagger-ui/swagger-ui.css.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui.js +1 -0
- package/dist/assets/swagger-ui/swagger-ui.js.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.LICENSE.txt +24 -0
- package/dist/src/context/index.d.ts +4 -0
- package/dist/src/context/platform-context.manager.d.ts +23 -0
- package/dist/src/context/platform-context.model.d.ts +56 -0
- package/dist/src/context/platform-context.provider.d.ts +23 -0
- package/dist/src/context/platform.execution.context.d.ts +13 -0
- package/dist/src/context/wrapped-invocation-context.d.ts +5 -0
- package/dist/src/event-hub-handler/decorators/decorators.d.ts +161 -0
- package/dist/src/event-hub-handler/decorators/decorators.model.d.ts +62 -0
- package/dist/src/event-hub-handler/decorators/index.d.ts +2 -0
- package/dist/src/event-hub-handler/event-hub-handler-metadata.reader.d.ts +8 -0
- package/dist/src/event-hub-handler/event-hub-handler-registration.service.d.ts +12 -0
- package/dist/src/event-hub-handler/event-hub-handler.factory.d.ts +13 -0
- package/dist/src/event-hub-handler/event-hub-handler.model.d.ts +101 -0
- package/dist/src/event-hub-handler/event-hub-trigger-support.factory.d.ts +10 -0
- package/dist/src/event-hub-handler/event-hub-trigger.model.d.ts +39 -0
- package/dist/src/event-hub-handler/event-hub-triggers-registration.service.d.ts +18 -0
- package/dist/src/event-hub-handler/index.d.ts +4 -0
- package/dist/src/framework.container.d.ts +6 -0
- package/dist/src/http-controller/decorators/decorators.d.ts +410 -0
- package/dist/src/http-controller/decorators/decorators.model.d.ts +123 -0
- package/dist/src/http-controller/decorators/index.d.ts +3 -0
- package/dist/src/http-controller/http-controller-metadata.reader.d.ts +8 -0
- package/dist/src/http-controller/http-controller-registration.service.d.ts +12 -0
- package/dist/src/http-controller/http-controller.model.d.ts +131 -0
- package/dist/src/http-controller/http-handler-support.factory.d.ts +26 -0
- package/dist/src/http-controller/http-handler.factory.d.ts +16 -0
- package/dist/src/http-controller/http-operations-registration.service.d.ts +22 -0
- package/dist/src/http-controller/http-request-arg-provider.factory.d.ts +12 -0
- package/dist/src/http-controller/http-response-processor.factory.d.ts +10 -0
- package/dist/src/http-controller/index.d.ts +11 -0
- package/dist/src/http-controller/open-api-definition.service.d.ts +29 -0
- package/dist/src/http-controller/open-api-metadata.service.d.ts +11 -0
- package/dist/src/http-controller/open-api-print.service.d.ts +8 -0
- package/dist/src/http-controller/open-api-registration.service.d.ts +17 -0
- package/dist/src/http-controller/security/authentication-service.d.ts +15 -0
- package/dist/src/http-controller/security/authenticator.provider.d.ts +31 -0
- package/dist/src/http-controller/security/bearer-security-authentication.service.d.ts +9 -0
- package/dist/src/http-controller/security/bearer-token.service.d.ts +5 -0
- package/dist/src/http-controller/security/index.d.ts +3 -0
- package/dist/src/http-controller/security/operation-authentication.resolver.d.ts +18 -0
- package/dist/src/http-controller/security/principal-merge.service.d.ts +11 -0
- package/dist/src/http-controller/security/strict-principal-merge.servce.d.ts +5 -0
- package/dist/src/http-controller/swagger-handling.service.d.ts +11 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/init.d.ts +1 -0
- package/dist/src/logger/bindings.d.ts +7 -0
- package/dist/src/logger/index.d.ts +6 -0
- package/dist/src/logger/log-level.service.d.ts +7 -0
- package/dist/src/logger/log-transport.service.d.ts +19 -0
- package/dist/src/logger/logger.model.d.ts +241 -0
- package/dist/src/logger/logger.utils.d.ts +17 -0
- package/dist/src/logger/otel.logger.d.ts +9 -0
- package/dist/src/logger/trie-search.service.d.ts +65 -0
- package/dist/src/middleware.d.ts +10 -0
- package/dist/src/platform/azure-platform.d.ts +15 -0
- package/dist/src/platform/index.d.ts +5 -0
- package/dist/src/platform/model.d.ts +18 -0
- package/dist/src/platform/register-trigger-handler.factory.d.ts +5 -0
- package/dist/src/platform/startup.service.d.ts +36 -0
- package/dist/src/platform/system-logger-name.provider.d.ts +1 -0
- package/dist/src/platform.container.d.ts +3 -0
- package/dist/src/security/index.d.ts +2 -0
- package/dist/src/security/security-context.d.ts +22 -0
- package/dist/src/security/security.model.d.ts +37 -0
- package/dist/src/shared/decorators/decorators.d.ts +37 -0
- package/dist/src/shared/decorators/decorators.model.d.ts +13 -0
- package/dist/src/shared/decorators/index.d.ts +2 -0
- package/dist/src/shared/index.d.ts +8 -0
- package/dist/src/shared/ioc-container.utils.d.ts +7 -0
- package/dist/src/shared/platform.model.d.ts +44 -0
- package/dist/src/shared/trigger-handler-metadata.reader.d.ts +6 -0
- package/dist/src/shared/zod-parser-wrapper.d.ts +5 -0
- package/docs/logging.md +805 -0
- package/package.json +87 -0
- package/src/context/index.ts +4 -0
- package/src/context/platform-context.manager.ts +36 -0
- package/src/context/platform-context.model.ts +59 -0
- package/src/context/platform-context.provider.ts +37 -0
- package/src/context/platform.execution.context.ts +44 -0
- package/src/context/wrapped-invocation-context.ts +26 -0
- package/src/event-hub-handler/decorators/decorators.model.ts +76 -0
- package/src/event-hub-handler/decorators/decorators.ts +231 -0
- package/src/event-hub-handler/decorators/index.ts +2 -0
- package/src/event-hub-handler/event-hub-handler-metadata.reader.ts +38 -0
- package/src/event-hub-handler/event-hub-handler-registration.service.ts +45 -0
- package/src/event-hub-handler/event-hub-handler.factory.ts +66 -0
- package/src/event-hub-handler/event-hub-handler.model.ts +112 -0
- package/src/event-hub-handler/event-hub-trigger-support.factory.ts +234 -0
- package/src/event-hub-handler/event-hub-trigger.model.ts +36 -0
- package/src/event-hub-handler/event-hub-triggers-registration.service.ts +74 -0
- package/src/event-hub-handler/index.ts +19 -0
- package/src/framework.container.ts +24 -0
- package/src/http-controller/decorators/decorators.model.ts +156 -0
- package/src/http-controller/decorators/decorators.ts +516 -0
- package/src/http-controller/decorators/index.ts +3 -0
- package/src/http-controller/http-controller-metadata.reader.ts +62 -0
- package/src/http-controller/http-controller-registration.service.ts +52 -0
- package/src/http-controller/http-controller.model.ts +233 -0
- package/src/http-controller/http-handler-support.factory.ts +132 -0
- package/src/http-controller/http-handler.factory.ts +107 -0
- package/src/http-controller/http-operations-registration.service.ts +81 -0
- package/src/http-controller/http-request-arg-provider.factory.ts +165 -0
- package/src/http-controller/http-response-processor.factory.ts +77 -0
- package/src/http-controller/index.ts +47 -0
- package/src/http-controller/open-api-definition.service.ts +155 -0
- package/src/http-controller/open-api-metadata.service.ts +96 -0
- package/src/http-controller/open-api-print.service.ts +49 -0
- package/src/http-controller/open-api-registration.service.ts +45 -0
- package/src/http-controller/security/authentication-service.ts +18 -0
- package/src/http-controller/security/authenticator.provider.ts +238 -0
- package/src/http-controller/security/bearer-security-authentication.service.ts +16 -0
- package/src/http-controller/security/bearer-token.service.ts +6 -0
- package/src/http-controller/security/index.ts +3 -0
- package/src/http-controller/security/operation-authentication.resolver.ts +111 -0
- package/src/http-controller/security/principal-merge.service.ts +26 -0
- package/src/http-controller/security/strict-principal-merge.servce.ts +23 -0
- package/src/http-controller/swagger-handling.service.ts +126 -0
- package/src/index.ts +80 -0
- package/src/init.ts +4 -0
- package/src/logger/bindings.ts +56 -0
- package/src/logger/index.ts +26 -0
- package/src/logger/log-level.service.ts +14 -0
- package/src/logger/log-transport.service.ts +162 -0
- package/src/logger/logger.model.ts +261 -0
- package/src/logger/logger.utils.ts +264 -0
- package/src/logger/otel.logger.ts +91 -0
- package/src/logger/trie-search.service.ts +177 -0
- package/src/middleware.ts +49 -0
- package/src/platform/azure-platform.ts +57 -0
- package/src/platform/index.ts +18 -0
- package/src/platform/model.ts +19 -0
- package/src/platform/register-trigger-handler.factory.ts +43 -0
- package/src/platform/startup.service.ts +39 -0
- package/src/platform/system-logger-name.provider.ts +20 -0
- package/src/platform.container.ts +21 -0
- package/src/security/index.ts +2 -0
- package/src/security/security-context.ts +30 -0
- package/src/security/security.model.ts +46 -0
- package/src/shared/decorators/decorators.model.ts +17 -0
- package/src/shared/decorators/decorators.ts +87 -0
- package/src/shared/decorators/index.ts +2 -0
- package/src/shared/index.ts +16 -0
- package/src/shared/ioc-container.utils.ts +10 -0
- package/src/shared/platform.model.ts +71 -0
- package/src/shared/trigger-handler-metadata.reader.ts +27 -0
- package/src/shared/zod-parser-wrapper.ts +49 -0
- package/src/test-utilities/index.ts +1 -0
- package/src/test-utilities/utils.ts +5 -0
- 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,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;
|