imposters 0.1.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/Program/package.json +6 -0
- package/README.md +365 -0
- package/api/AdminApi/package.json +6 -0
- package/api/ApiErrors/package.json +6 -0
- package/api/ApiSchemas/package.json +6 -0
- package/api/Conversions/package.json +6 -0
- package/api/ImpostersGroup/package.json +6 -0
- package/api/ImpostersHandlers/package.json +6 -0
- package/api/SystemGroup/package.json +6 -0
- package/api/SystemHandlers/package.json +6 -0
- package/bin/imposters +47 -0
- package/cli/Commands/package.json +6 -0
- package/cli/ConfigLoader/package.json +6 -0
- package/client/HandlerHttpClient/package.json +6 -0
- package/client/ImpostersClient/package.json +6 -0
- package/client/testing/package.json +6 -0
- package/dist/cjs/Program.js +4 -0
- package/dist/cjs/Program.js.map +1 -0
- package/dist/cjs/api/AdminApi.js +11 -0
- package/dist/cjs/api/AdminApi.js.map +1 -0
- package/dist/cjs/api/ApiErrors.js +30 -0
- package/dist/cjs/api/ApiErrors.js.map +1 -0
- package/dist/cjs/api/ApiSchemas.js +36 -0
- package/dist/cjs/api/ApiSchemas.js.map +1 -0
- package/dist/cjs/api/Conversions.js +41 -0
- package/dist/cjs/api/Conversions.js.map +1 -0
- package/dist/cjs/api/ImpostersGroup.js +37 -0
- package/dist/cjs/api/ImpostersGroup.js.map +1 -0
- package/dist/cjs/api/ImpostersHandlers.js +361 -0
- package/dist/cjs/api/ImpostersHandlers.js.map +1 -0
- package/dist/cjs/api/SystemGroup.js +12 -0
- package/dist/cjs/api/SystemGroup.js.map +1 -0
- package/dist/cjs/api/SystemHandlers.js +74 -0
- package/dist/cjs/api/SystemHandlers.js.map +1 -0
- package/dist/cjs/cli/Commands.js +104 -0
- package/dist/cjs/cli/Commands.js.map +1 -0
- package/dist/cjs/cli/ConfigLoader.js +34 -0
- package/dist/cjs/cli/ConfigLoader.js.map +1 -0
- package/dist/cjs/client/HandlerHttpClient.js +50 -0
- package/dist/cjs/client/HandlerHttpClient.js.map +1 -0
- package/dist/cjs/client/ImpostersClient.js +20 -0
- package/dist/cjs/client/ImpostersClient.js.map +1 -0
- package/dist/cjs/client/index.js +57 -0
- package/dist/cjs/client/index.js.map +1 -0
- package/dist/cjs/client/testing.js +94 -0
- package/dist/cjs/client/testing.js.map +1 -0
- package/dist/cjs/domain/imposter.js +125 -0
- package/dist/cjs/domain/imposter.js.map +1 -0
- package/dist/cjs/domain/route.js +185 -0
- package/dist/cjs/domain/route.js.map +1 -0
- package/dist/cjs/index.js +106 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/layers/ApiLayer.js +18 -0
- package/dist/cjs/layers/ApiLayer.js.map +1 -0
- package/dist/cjs/layers/MainLayer.js +27 -0
- package/dist/cjs/layers/MainLayer.js.map +1 -0
- package/dist/cjs/matching/ExpressionEvaluator.js +103 -0
- package/dist/cjs/matching/ExpressionEvaluator.js.map +1 -0
- package/dist/cjs/matching/RequestMatcher.js +145 -0
- package/dist/cjs/matching/RequestMatcher.js.map +1 -0
- package/dist/cjs/matching/ResponseGenerator.js +80 -0
- package/dist/cjs/matching/ResponseGenerator.js.map +1 -0
- package/dist/cjs/matching/TemplateEngine.js +55 -0
- package/dist/cjs/matching/TemplateEngine.js.map +1 -0
- package/dist/cjs/repositories/ImposterRepository.js +118 -0
- package/dist/cjs/repositories/ImposterRepository.js.map +1 -0
- package/dist/cjs/schemas/ConfigFileSchema.js +44 -0
- package/dist/cjs/schemas/ConfigFileSchema.js.map +1 -0
- package/dist/cjs/schemas/ImposterSchema.js +202 -0
- package/dist/cjs/schemas/ImposterSchema.js.map +1 -0
- package/dist/cjs/schemas/RequestLogSchema.js +51 -0
- package/dist/cjs/schemas/RequestLogSchema.js.map +1 -0
- package/dist/cjs/schemas/StubSchema.js +84 -0
- package/dist/cjs/schemas/StubSchema.js.map +1 -0
- package/dist/cjs/schemas/common.js +67 -0
- package/dist/cjs/schemas/common.js.map +1 -0
- package/dist/cjs/server/AdminServer.js +36 -0
- package/dist/cjs/server/AdminServer.js.map +1 -0
- package/dist/cjs/server/BunServer.js +13 -0
- package/dist/cjs/server/BunServer.js.map +1 -0
- package/dist/cjs/server/FiberManager.js +21 -0
- package/dist/cjs/server/FiberManager.js.map +1 -0
- package/dist/cjs/server/ImposterServer.js +234 -0
- package/dist/cjs/server/ImposterServer.js.map +1 -0
- package/dist/cjs/services/AppConfig.js +18 -0
- package/dist/cjs/services/AppConfig.js.map +1 -0
- package/dist/cjs/services/MetricsService.js +113 -0
- package/dist/cjs/services/MetricsService.js.map +1 -0
- package/dist/cjs/services/PortAllocator.js +50 -0
- package/dist/cjs/services/PortAllocator.js.map +1 -0
- package/dist/cjs/services/ProxyService.js +109 -0
- package/dist/cjs/services/ProxyService.js.map +1 -0
- package/dist/cjs/services/RequestLogger.js +60 -0
- package/dist/cjs/services/RequestLogger.js.map +1 -0
- package/dist/cjs/services/Uuid.js +10 -0
- package/dist/cjs/services/Uuid.js.map +1 -0
- package/dist/cjs/services/UuidLive.js +16 -0
- package/dist/cjs/services/UuidLive.js.map +1 -0
- package/dist/cjs/ui/UiRouter.js +242 -0
- package/dist/cjs/ui/UiRouter.js.map +1 -0
- package/dist/cjs/ui/admin/AdminLayout.js +36 -0
- package/dist/cjs/ui/admin/AdminLayout.js.map +1 -0
- package/dist/cjs/ui/admin/AdminUiRouter.js +155 -0
- package/dist/cjs/ui/admin/AdminUiRouter.js.map +1 -0
- package/dist/cjs/ui/admin/pages/AdminDashboard.js +55 -0
- package/dist/cjs/ui/admin/pages/AdminDashboard.js.map +1 -0
- package/dist/cjs/ui/admin/partials.js +64 -0
- package/dist/cjs/ui/admin/partials.js.map +1 -0
- package/dist/cjs/ui/html.js +42 -0
- package/dist/cjs/ui/html.js.map +1 -0
- package/dist/cjs/ui/layout.js +39 -0
- package/dist/cjs/ui/layout.js.map +1 -0
- package/dist/cjs/ui/pages/dashboard.js +51 -0
- package/dist/cjs/ui/pages/dashboard.js.map +1 -0
- package/dist/cjs/ui/pages/request-detail.js +119 -0
- package/dist/cjs/ui/pages/request-detail.js.map +1 -0
- package/dist/cjs/ui/pages/requests.js +120 -0
- package/dist/cjs/ui/pages/requests.js.map +1 -0
- package/dist/cjs/ui/pages/stubs.js +46 -0
- package/dist/cjs/ui/pages/stubs.js.map +1 -0
- package/dist/cjs/ui/partials.js +104 -0
- package/dist/cjs/ui/partials.js.map +1 -0
- package/dist/dts/Program.d.ts +2 -0
- package/dist/dts/Program.d.ts.map +1 -0
- package/dist/dts/api/AdminApi.d.ts +490 -0
- package/dist/dts/api/AdminApi.d.ts.map +1 -0
- package/dist/dts/api/ApiErrors.d.ts +26 -0
- package/dist/dts/api/ApiErrors.d.ts.map +1 -0
- package/dist/dts/api/ApiSchemas.d.ts +36 -0
- package/dist/dts/api/ApiSchemas.d.ts.map +1 -0
- package/dist/dts/api/Conversions.d.ts +7 -0
- package/dist/dts/api/Conversions.d.ts.map +1 -0
- package/dist/dts/api/ImpostersGroup.d.ts +448 -0
- package/dist/dts/api/ImpostersGroup.d.ts.map +1 -0
- package/dist/dts/api/ImpostersHandlers.d.ts +9 -0
- package/dist/dts/api/ImpostersHandlers.d.ts.map +1 -0
- package/dist/dts/api/SystemGroup.d.ts +46 -0
- package/dist/dts/api/SystemGroup.d.ts.map +1 -0
- package/dist/dts/api/SystemHandlers.d.ts +4 -0
- package/dist/dts/api/SystemHandlers.d.ts.map +1 -0
- package/dist/dts/cli/Commands.d.ts +4 -0
- package/dist/dts/cli/Commands.d.ts.map +1 -0
- package/dist/dts/cli/ConfigLoader.d.ts +13 -0
- package/dist/dts/cli/ConfigLoader.d.ts.map +1 -0
- package/dist/dts/client/HandlerHttpClient.d.ts +5 -0
- package/dist/dts/client/HandlerHttpClient.d.ts.map +1 -0
- package/dist/dts/client/ImpostersClient.d.ts +1868 -0
- package/dist/dts/client/ImpostersClient.d.ts.map +1 -0
- package/dist/dts/client/index.d.ts +6 -0
- package/dist/dts/client/index.d.ts.map +1 -0
- package/dist/dts/client/testing.d.ts +35 -0
- package/dist/dts/client/testing.d.ts.map +1 -0
- package/dist/dts/domain/imposter.d.ts +123 -0
- package/dist/dts/domain/imposter.d.ts.map +1 -0
- package/dist/dts/domain/route.d.ts +128 -0
- package/dist/dts/domain/route.d.ts.map +1 -0
- package/dist/dts/index.d.ts +60 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/layers/ApiLayer.d.ts +3 -0
- package/dist/dts/layers/ApiLayer.d.ts.map +1 -0
- package/dist/dts/layers/MainLayer.d.ts +3 -0
- package/dist/dts/layers/MainLayer.d.ts.map +1 -0
- package/dist/dts/matching/ExpressionEvaluator.d.ts +11 -0
- package/dist/dts/matching/ExpressionEvaluator.d.ts.map +1 -0
- package/dist/dts/matching/RequestMatcher.d.ts +13 -0
- package/dist/dts/matching/RequestMatcher.d.ts.map +1 -0
- package/dist/dts/matching/ResponseGenerator.d.ts +9 -0
- package/dist/dts/matching/ResponseGenerator.d.ts.map +1 -0
- package/dist/dts/matching/TemplateEngine.d.ts +4 -0
- package/dist/dts/matching/TemplateEngine.d.ts.map +1 -0
- package/dist/dts/repositories/ImposterRepository.d.ts +33 -0
- package/dist/dts/repositories/ImposterRepository.d.ts.map +1 -0
- package/dist/dts/schemas/ConfigFileSchema.d.ts +142 -0
- package/dist/dts/schemas/ConfigFileSchema.d.ts.map +1 -0
- package/dist/dts/schemas/ImposterSchema.d.ts +368 -0
- package/dist/dts/schemas/ImposterSchema.d.ts.map +1 -0
- package/dist/dts/schemas/RequestLogSchema.d.ts +36 -0
- package/dist/dts/schemas/RequestLogSchema.d.ts.map +1 -0
- package/dist/dts/schemas/StubSchema.d.ts +112 -0
- package/dist/dts/schemas/StubSchema.d.ts.map +1 -0
- package/dist/dts/schemas/common.d.ts +56 -0
- package/dist/dts/schemas/common.d.ts.map +1 -0
- package/dist/dts/server/AdminServer.d.ts +11 -0
- package/dist/dts/server/AdminServer.d.ts.map +1 -0
- package/dist/dts/server/BunServer.d.ts +17 -0
- package/dist/dts/server/BunServer.d.ts.map +1 -0
- package/dist/dts/server/FiberManager.d.ts +12 -0
- package/dist/dts/server/FiberManager.d.ts.map +1 -0
- package/dist/dts/server/ImposterServer.d.ts +29 -0
- package/dist/dts/server/ImposterServer.d.ts.map +1 -0
- package/dist/dts/services/AppConfig.d.ts +14 -0
- package/dist/dts/services/AppConfig.d.ts.map +1 -0
- package/dist/dts/services/MetricsService.d.ts +26 -0
- package/dist/dts/services/MetricsService.d.ts.map +1 -0
- package/dist/dts/services/PortAllocator.d.ts +29 -0
- package/dist/dts/services/PortAllocator.d.ts.map +1 -0
- package/dist/dts/services/ProxyService.d.ts +24 -0
- package/dist/dts/services/ProxyService.d.ts.map +1 -0
- package/dist/dts/services/RequestLogger.d.ts +23 -0
- package/dist/dts/services/RequestLogger.d.ts.map +1 -0
- package/dist/dts/services/Uuid.d.ts +9 -0
- package/dist/dts/services/Uuid.d.ts.map +1 -0
- package/dist/dts/services/UuidLive.d.ts +4 -0
- package/dist/dts/services/UuidLive.d.ts.map +1 -0
- package/dist/dts/ui/UiRouter.d.ts +15 -0
- package/dist/dts/ui/UiRouter.d.ts.map +1 -0
- package/dist/dts/ui/admin/AdminLayout.d.ts +7 -0
- package/dist/dts/ui/admin/AdminLayout.d.ts.map +1 -0
- package/dist/dts/ui/admin/AdminUiRouter.d.ts +6 -0
- package/dist/dts/ui/admin/AdminUiRouter.d.ts.map +1 -0
- package/dist/dts/ui/admin/pages/AdminDashboard.d.ts +7 -0
- package/dist/dts/ui/admin/pages/AdminDashboard.d.ts.map +1 -0
- package/dist/dts/ui/admin/partials.d.ts +14 -0
- package/dist/dts/ui/admin/partials.d.ts.map +1 -0
- package/dist/dts/ui/html.d.ts +12 -0
- package/dist/dts/ui/html.d.ts.map +1 -0
- package/dist/dts/ui/layout.d.ts +9 -0
- package/dist/dts/ui/layout.d.ts.map +1 -0
- package/dist/dts/ui/pages/dashboard.d.ts +10 -0
- package/dist/dts/ui/pages/dashboard.d.ts.map +1 -0
- package/dist/dts/ui/pages/request-detail.d.ts +11 -0
- package/dist/dts/ui/pages/request-detail.d.ts.map +1 -0
- package/dist/dts/ui/pages/requests.d.ts +15 -0
- package/dist/dts/ui/pages/requests.d.ts.map +1 -0
- package/dist/dts/ui/pages/stubs.d.ts +8 -0
- package/dist/dts/ui/pages/stubs.d.ts.map +1 -0
- package/dist/dts/ui/partials.d.ts +13 -0
- package/dist/dts/ui/partials.d.ts.map +1 -0
- package/dist/esm/Program.js +2 -0
- package/dist/esm/Program.js.map +1 -0
- package/dist/esm/api/AdminApi.js +5 -0
- package/dist/esm/api/AdminApi.js.map +1 -0
- package/dist/esm/api/ApiErrors.js +20 -0
- package/dist/esm/api/ApiErrors.js.map +1 -0
- package/dist/esm/api/ApiSchemas.js +29 -0
- package/dist/esm/api/ApiSchemas.js.map +1 -0
- package/dist/esm/api/Conversions.js +32 -0
- package/dist/esm/api/Conversions.js.map +1 -0
- package/dist/esm/api/ImpostersGroup.js +30 -0
- package/dist/esm/api/ImpostersGroup.js.map +1 -0
- package/dist/esm/api/ImpostersHandlers.js +354 -0
- package/dist/esm/api/ImpostersHandlers.js.map +1 -0
- package/dist/esm/api/SystemGroup.js +6 -0
- package/dist/esm/api/SystemGroup.js.map +1 -0
- package/dist/esm/api/SystemHandlers.js +67 -0
- package/dist/esm/api/SystemHandlers.js.map +1 -0
- package/dist/esm/cli/Commands.js +98 -0
- package/dist/esm/cli/Commands.js.map +1 -0
- package/dist/esm/cli/ConfigLoader.js +25 -0
- package/dist/esm/cli/ConfigLoader.js.map +1 -0
- package/dist/esm/client/HandlerHttpClient.js +42 -0
- package/dist/esm/client/HandlerHttpClient.js.map +1 -0
- package/dist/esm/client/ImpostersClient.js +10 -0
- package/dist/esm/client/ImpostersClient.js.map +1 -0
- package/dist/esm/client/index.js +4 -0
- package/dist/esm/client/index.js.map +1 -0
- package/dist/esm/client/testing.js +86 -0
- package/dist/esm/client/testing.js.map +1 -0
- package/dist/esm/domain/imposter.js +103 -0
- package/dist/esm/domain/imposter.js.map +1 -0
- package/dist/esm/domain/route.js +164 -0
- package/dist/esm/domain/route.js.map +1 -0
- package/dist/esm/index.js +60 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/layers/ApiLayer.js +11 -0
- package/dist/esm/layers/ApiLayer.js.map +1 -0
- package/dist/esm/layers/MainLayer.js +20 -0
- package/dist/esm/layers/MainLayer.js.map +1 -0
- package/dist/esm/matching/ExpressionEvaluator.js +94 -0
- package/dist/esm/matching/ExpressionEvaluator.js.map +1 -0
- package/dist/esm/matching/RequestMatcher.js +135 -0
- package/dist/esm/matching/RequestMatcher.js.map +1 -0
- package/dist/esm/matching/ResponseGenerator.js +71 -0
- package/dist/esm/matching/ResponseGenerator.js.map +1 -0
- package/dist/esm/matching/TemplateEngine.js +47 -0
- package/dist/esm/matching/TemplateEngine.js.map +1 -0
- package/dist/esm/package.json +4 -0
- package/dist/esm/repositories/ImposterRepository.js +110 -0
- package/dist/esm/repositories/ImposterRepository.js.map +1 -0
- package/dist/esm/schemas/ConfigFileSchema.js +37 -0
- package/dist/esm/schemas/ConfigFileSchema.js.map +1 -0
- package/dist/esm/schemas/ImposterSchema.js +195 -0
- package/dist/esm/schemas/ImposterSchema.js.map +1 -0
- package/dist/esm/schemas/RequestLogSchema.js +44 -0
- package/dist/esm/schemas/RequestLogSchema.js.map +1 -0
- package/dist/esm/schemas/StubSchema.js +77 -0
- package/dist/esm/schemas/StubSchema.js.map +1 -0
- package/dist/esm/schemas/common.js +59 -0
- package/dist/esm/schemas/common.js.map +1 -0
- package/dist/esm/server/AdminServer.js +27 -0
- package/dist/esm/server/AdminServer.js.map +1 -0
- package/dist/esm/server/BunServer.js +6 -0
- package/dist/esm/server/BunServer.js.map +1 -0
- package/dist/esm/server/FiberManager.js +14 -0
- package/dist/esm/server/FiberManager.js.map +1 -0
- package/dist/esm/server/ImposterServer.js +225 -0
- package/dist/esm/server/ImposterServer.js.map +1 -0
- package/dist/esm/services/AppConfig.js +11 -0
- package/dist/esm/services/AppConfig.js.map +1 -0
- package/dist/esm/services/MetricsService.js +105 -0
- package/dist/esm/services/MetricsService.js.map +1 -0
- package/dist/esm/services/PortAllocator.js +41 -0
- package/dist/esm/services/PortAllocator.js.map +1 -0
- package/dist/esm/services/ProxyService.js +101 -0
- package/dist/esm/services/ProxyService.js.map +1 -0
- package/dist/esm/services/RequestLogger.js +53 -0
- package/dist/esm/services/RequestLogger.js.map +1 -0
- package/dist/esm/services/Uuid.js +3 -0
- package/dist/esm/services/Uuid.js.map +1 -0
- package/dist/esm/services/UuidLive.js +9 -0
- package/dist/esm/services/UuidLive.js.map +1 -0
- package/dist/esm/ui/UiRouter.js +235 -0
- package/dist/esm/ui/UiRouter.js.map +1 -0
- package/dist/esm/ui/admin/AdminLayout.js +29 -0
- package/dist/esm/ui/admin/AdminLayout.js.map +1 -0
- package/dist/esm/ui/admin/AdminUiRouter.js +148 -0
- package/dist/esm/ui/admin/AdminUiRouter.js.map +1 -0
- package/dist/esm/ui/admin/pages/AdminDashboard.js +48 -0
- package/dist/esm/ui/admin/pages/AdminDashboard.js.map +1 -0
- package/dist/esm/ui/admin/partials.js +54 -0
- package/dist/esm/ui/admin/partials.js.map +1 -0
- package/dist/esm/ui/html.js +32 -0
- package/dist/esm/ui/html.js.map +1 -0
- package/dist/esm/ui/layout.js +32 -0
- package/dist/esm/ui/layout.js.map +1 -0
- package/dist/esm/ui/pages/dashboard.js +44 -0
- package/dist/esm/ui/pages/dashboard.js.map +1 -0
- package/dist/esm/ui/pages/request-detail.js +112 -0
- package/dist/esm/ui/pages/request-detail.js.map +1 -0
- package/dist/esm/ui/pages/requests.js +112 -0
- package/dist/esm/ui/pages/requests.js.map +1 -0
- package/dist/esm/ui/pages/stubs.js +39 -0
- package/dist/esm/ui/pages/stubs.js.map +1 -0
- package/dist/esm/ui/partials.js +91 -0
- package/dist/esm/ui/partials.js.map +1 -0
- package/domain/imposter/package.json +6 -0
- package/domain/route/package.json +6 -0
- package/layers/ApiLayer/package.json +6 -0
- package/layers/MainLayer/package.json +6 -0
- package/matching/ExpressionEvaluator/package.json +6 -0
- package/matching/RequestMatcher/package.json +6 -0
- package/matching/ResponseGenerator/package.json +6 -0
- package/matching/TemplateEngine/package.json +6 -0
- package/package.json +435 -0
- package/repositories/ImposterRepository/package.json +6 -0
- package/schemas/ConfigFileSchema/package.json +6 -0
- package/schemas/ImposterSchema/package.json +6 -0
- package/schemas/RequestLogSchema/package.json +6 -0
- package/schemas/StubSchema/package.json +6 -0
- package/schemas/common/package.json +6 -0
- package/server/AdminServer/package.json +6 -0
- package/server/BunServer/package.json +6 -0
- package/server/FiberManager/package.json +6 -0
- package/server/ImposterServer/package.json +6 -0
- package/services/AppConfig/package.json +6 -0
- package/services/MetricsService/package.json +6 -0
- package/services/PortAllocator/package.json +6 -0
- package/services/ProxyService/package.json +6 -0
- package/services/RequestLogger/package.json +6 -0
- package/services/Uuid/package.json +6 -0
- package/services/UuidLive/package.json +6 -0
- package/src/Program.ts +1 -0
- package/src/api/AdminApi.ts +7 -0
- package/src/api/ApiErrors.ts +20 -0
- package/src/api/ApiSchemas.ts +36 -0
- package/src/api/Conversions.ts +34 -0
- package/src/api/ImpostersGroup.ts +103 -0
- package/src/api/ImpostersHandlers.ts +387 -0
- package/src/api/SystemGroup.ts +12 -0
- package/src/api/SystemHandlers.ts +76 -0
- package/src/cli/Commands.ts +119 -0
- package/src/cli/ConfigLoader.ts +41 -0
- package/src/client/HandlerHttpClient.ts +50 -0
- package/src/client/ImpostersClient.ts +21 -0
- package/src/client/index.ts +9 -0
- package/src/client/testing.ts +105 -0
- package/src/domain/imposter.ts +186 -0
- package/src/domain/route.ts +255 -0
- package/src/index.ts +153 -0
- package/src/layers/ApiLayer.ts +21 -0
- package/src/layers/MainLayer.ts +43 -0
- package/src/matching/ExpressionEvaluator.ts +102 -0
- package/src/matching/RequestMatcher.ts +162 -0
- package/src/matching/ResponseGenerator.ts +86 -0
- package/src/matching/TemplateEngine.ts +54 -0
- package/src/repositories/ImposterRepository.ts +145 -0
- package/src/schemas/ConfigFileSchema.ts +32 -0
- package/src/schemas/ImposterSchema.ts +232 -0
- package/src/schemas/RequestLogSchema.ts +38 -0
- package/src/schemas/StubSchema.ts +90 -0
- package/src/schemas/common.ts +95 -0
- package/src/server/AdminServer.ts +22 -0
- package/src/server/BunServer.ts +19 -0
- package/src/server/FiberManager.ts +25 -0
- package/src/server/ImposterServer.ts +244 -0
- package/src/services/AppConfig.ts +22 -0
- package/src/services/MetricsService.ts +157 -0
- package/src/services/PortAllocator.ts +68 -0
- package/src/services/ProxyService.ts +139 -0
- package/src/services/RequestLogger.ts +87 -0
- package/src/services/Uuid.ts +9 -0
- package/src/services/UuidLive.ts +9 -0
- package/src/types/bun.d.ts +6 -0
- package/src/ui/UiRouter.ts +278 -0
- package/src/ui/admin/AdminLayout.ts +36 -0
- package/src/ui/admin/AdminUiRouter.ts +170 -0
- package/src/ui/admin/pages/AdminDashboard.ts +54 -0
- package/src/ui/admin/partials.ts +83 -0
- package/src/ui/html.ts +37 -0
- package/src/ui/layout.ts +44 -0
- package/src/ui/pages/dashboard.ts +64 -0
- package/src/ui/pages/request-detail.ts +142 -0
- package/src/ui/pages/requests.ts +141 -0
- package/src/ui/pages/stubs.ts +52 -0
- package/src/ui/partials.ts +133 -0
- package/ui/UiRouter/package.json +6 -0
- package/ui/admin/AdminLayout/package.json +6 -0
- package/ui/admin/AdminUiRouter/package.json +6 -0
- package/ui/admin/pages/AdminDashboard/package.json +6 -0
- package/ui/admin/partials/package.json +6 -0
- package/ui/html/package.json +6 -0
- package/ui/layout/package.json +6 -0
- package/ui/pages/dashboard/package.json +6 -0
- package/ui/pages/requests/package.json +6 -0
- package/ui/pages/stubs/package.json +6 -0
|
@@ -0,0 +1,1868 @@
|
|
|
1
|
+
import type { HttpClient } from "@effect/platform";
|
|
2
|
+
import type { Effect } from "effect";
|
|
3
|
+
import { Context, Layer } from "effect";
|
|
4
|
+
export declare const makeImpostersClient: (baseUrl?: string) => Effect.Effect<{
|
|
5
|
+
readonly imposters: {
|
|
6
|
+
readonly createImposter: <WithResponse extends boolean = false>(request: {
|
|
7
|
+
readonly payload: {
|
|
8
|
+
readonly name?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
9
|
+
readonly port?: (number & import("effect/Brand").Brand<"PortNumber">) | undefined;
|
|
10
|
+
readonly protocol: "HTTP";
|
|
11
|
+
readonly adminPath: string;
|
|
12
|
+
readonly proxy?: {
|
|
13
|
+
readonly targetUrl: string;
|
|
14
|
+
readonly mode: "passthrough" | "record";
|
|
15
|
+
readonly addHeaders?: {
|
|
16
|
+
readonly [x: string]: string;
|
|
17
|
+
} | undefined;
|
|
18
|
+
readonly removeHeaders: readonly string[];
|
|
19
|
+
readonly followRedirects: boolean;
|
|
20
|
+
readonly timeout: number;
|
|
21
|
+
} | undefined;
|
|
22
|
+
};
|
|
23
|
+
readonly withResponse?: WithResponse;
|
|
24
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
25
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
26
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
27
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
28
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
29
|
+
readonly protocol: "HTTP";
|
|
30
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
31
|
+
readonly proxy?: {
|
|
32
|
+
readonly targetUrl: string;
|
|
33
|
+
readonly mode: "passthrough" | "record";
|
|
34
|
+
readonly addHeaders?: {
|
|
35
|
+
readonly [x: string]: string;
|
|
36
|
+
} | undefined;
|
|
37
|
+
readonly removeHeaders: readonly string[];
|
|
38
|
+
readonly followRedirects: boolean;
|
|
39
|
+
readonly timeout: number;
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
42
|
+
readonly endpointCount: number;
|
|
43
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
44
|
+
readonly uptime?: string | undefined;
|
|
45
|
+
readonly endpoints?: readonly {
|
|
46
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
47
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
48
|
+
readonly status: number;
|
|
49
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
50
|
+
readonly hasDelay: boolean;
|
|
51
|
+
readonly delayMs?: number | undefined;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
readonly statistics?: {
|
|
54
|
+
readonly totalRequests: number;
|
|
55
|
+
readonly requestsPerMinute: number;
|
|
56
|
+
readonly averageResponseTime: number;
|
|
57
|
+
readonly errorRate: number;
|
|
58
|
+
readonly requestsByMethod: {
|
|
59
|
+
readonly [x: string]: number;
|
|
60
|
+
};
|
|
61
|
+
readonly requestsByStatusCode: {
|
|
62
|
+
readonly [x: string]: number;
|
|
63
|
+
};
|
|
64
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
65
|
+
readonly p50ResponseTime?: number | undefined;
|
|
66
|
+
readonly p95ResponseTime?: number | undefined;
|
|
67
|
+
readonly p99ResponseTime?: number | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
70
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
71
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
72
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
73
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
74
|
+
readonly protocol: "HTTP";
|
|
75
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
76
|
+
readonly proxy?: {
|
|
77
|
+
readonly targetUrl: string;
|
|
78
|
+
readonly mode: "passthrough" | "record";
|
|
79
|
+
readonly addHeaders?: {
|
|
80
|
+
readonly [x: string]: string;
|
|
81
|
+
} | undefined;
|
|
82
|
+
readonly removeHeaders: readonly string[];
|
|
83
|
+
readonly followRedirects: boolean;
|
|
84
|
+
readonly timeout: number;
|
|
85
|
+
} | undefined;
|
|
86
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
87
|
+
readonly endpointCount: number;
|
|
88
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
89
|
+
readonly uptime?: string | undefined;
|
|
90
|
+
readonly endpoints?: readonly {
|
|
91
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
92
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
93
|
+
readonly status: number;
|
|
94
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
95
|
+
readonly hasDelay: boolean;
|
|
96
|
+
readonly delayMs?: number | undefined;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
readonly statistics?: {
|
|
99
|
+
readonly totalRequests: number;
|
|
100
|
+
readonly requestsPerMinute: number;
|
|
101
|
+
readonly averageResponseTime: number;
|
|
102
|
+
readonly errorRate: number;
|
|
103
|
+
readonly requestsByMethod: {
|
|
104
|
+
readonly [x: string]: number;
|
|
105
|
+
};
|
|
106
|
+
readonly requestsByStatusCode: {
|
|
107
|
+
readonly [x: string]: number;
|
|
108
|
+
};
|
|
109
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
110
|
+
readonly p50ResponseTime?: number | undefined;
|
|
111
|
+
readonly p95ResponseTime?: number | undefined;
|
|
112
|
+
readonly p99ResponseTime?: number | undefined;
|
|
113
|
+
} | undefined;
|
|
114
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiConflictError | import("../api/ApiErrors").ApiServiceError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
115
|
+
readonly listImposters: <WithResponse extends boolean = false>(request: {
|
|
116
|
+
readonly urlParams: {
|
|
117
|
+
readonly limit: number;
|
|
118
|
+
readonly offset: number;
|
|
119
|
+
readonly status?: "running" | "stopped" | "starting" | "stopping" | undefined;
|
|
120
|
+
readonly protocol?: "HTTP" | undefined;
|
|
121
|
+
};
|
|
122
|
+
readonly withResponse?: WithResponse;
|
|
123
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
124
|
+
readonly pagination: {
|
|
125
|
+
readonly limit: number & import("effect/Brand").Brand<"PositiveInteger">;
|
|
126
|
+
readonly offset: number;
|
|
127
|
+
readonly total: number;
|
|
128
|
+
readonly hasMore: boolean;
|
|
129
|
+
};
|
|
130
|
+
readonly imposters: readonly {
|
|
131
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
132
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
133
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
134
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
135
|
+
readonly protocol: "HTTP";
|
|
136
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
137
|
+
readonly proxy?: {
|
|
138
|
+
readonly targetUrl: string;
|
|
139
|
+
readonly mode: "passthrough" | "record";
|
|
140
|
+
readonly addHeaders?: {
|
|
141
|
+
readonly [x: string]: string;
|
|
142
|
+
} | undefined;
|
|
143
|
+
readonly removeHeaders: readonly string[];
|
|
144
|
+
readonly followRedirects: boolean;
|
|
145
|
+
readonly timeout: number;
|
|
146
|
+
} | undefined;
|
|
147
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
148
|
+
readonly endpointCount: number;
|
|
149
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
150
|
+
readonly uptime?: string | undefined;
|
|
151
|
+
readonly endpoints?: readonly {
|
|
152
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
153
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
154
|
+
readonly status: number;
|
|
155
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
156
|
+
readonly hasDelay: boolean;
|
|
157
|
+
readonly delayMs?: number | undefined;
|
|
158
|
+
}[] | undefined;
|
|
159
|
+
readonly statistics?: {
|
|
160
|
+
readonly totalRequests: number;
|
|
161
|
+
readonly requestsPerMinute: number;
|
|
162
|
+
readonly averageResponseTime: number;
|
|
163
|
+
readonly errorRate: number;
|
|
164
|
+
readonly requestsByMethod: {
|
|
165
|
+
readonly [x: string]: number;
|
|
166
|
+
};
|
|
167
|
+
readonly requestsByStatusCode: {
|
|
168
|
+
readonly [x: string]: number;
|
|
169
|
+
};
|
|
170
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
171
|
+
readonly p50ResponseTime?: number | undefined;
|
|
172
|
+
readonly p95ResponseTime?: number | undefined;
|
|
173
|
+
readonly p99ResponseTime?: number | undefined;
|
|
174
|
+
} | undefined;
|
|
175
|
+
}[];
|
|
176
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
177
|
+
readonly pagination: {
|
|
178
|
+
readonly limit: number & import("effect/Brand").Brand<"PositiveInteger">;
|
|
179
|
+
readonly offset: number;
|
|
180
|
+
readonly total: number;
|
|
181
|
+
readonly hasMore: boolean;
|
|
182
|
+
};
|
|
183
|
+
readonly imposters: readonly {
|
|
184
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
185
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
186
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
187
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
188
|
+
readonly protocol: "HTTP";
|
|
189
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
190
|
+
readonly proxy?: {
|
|
191
|
+
readonly targetUrl: string;
|
|
192
|
+
readonly mode: "passthrough" | "record";
|
|
193
|
+
readonly addHeaders?: {
|
|
194
|
+
readonly [x: string]: string;
|
|
195
|
+
} | undefined;
|
|
196
|
+
readonly removeHeaders: readonly string[];
|
|
197
|
+
readonly followRedirects: boolean;
|
|
198
|
+
readonly timeout: number;
|
|
199
|
+
} | undefined;
|
|
200
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
201
|
+
readonly endpointCount: number;
|
|
202
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
203
|
+
readonly uptime?: string | undefined;
|
|
204
|
+
readonly endpoints?: readonly {
|
|
205
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
206
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
207
|
+
readonly status: number;
|
|
208
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
209
|
+
readonly hasDelay: boolean;
|
|
210
|
+
readonly delayMs?: number | undefined;
|
|
211
|
+
}[] | undefined;
|
|
212
|
+
readonly statistics?: {
|
|
213
|
+
readonly totalRequests: number;
|
|
214
|
+
readonly requestsPerMinute: number;
|
|
215
|
+
readonly averageResponseTime: number;
|
|
216
|
+
readonly errorRate: number;
|
|
217
|
+
readonly requestsByMethod: {
|
|
218
|
+
readonly [x: string]: number;
|
|
219
|
+
};
|
|
220
|
+
readonly requestsByStatusCode: {
|
|
221
|
+
readonly [x: string]: number;
|
|
222
|
+
};
|
|
223
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
224
|
+
readonly p50ResponseTime?: number | undefined;
|
|
225
|
+
readonly p95ResponseTime?: number | undefined;
|
|
226
|
+
readonly p99ResponseTime?: number | undefined;
|
|
227
|
+
} | undefined;
|
|
228
|
+
}[];
|
|
229
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
230
|
+
readonly getImposter: <WithResponse extends boolean = false>(request: {
|
|
231
|
+
readonly path: {
|
|
232
|
+
readonly id: string;
|
|
233
|
+
};
|
|
234
|
+
readonly withResponse?: WithResponse;
|
|
235
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
236
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
237
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
238
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
239
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
240
|
+
readonly protocol: "HTTP";
|
|
241
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
242
|
+
readonly proxy?: {
|
|
243
|
+
readonly targetUrl: string;
|
|
244
|
+
readonly mode: "passthrough" | "record";
|
|
245
|
+
readonly addHeaders?: {
|
|
246
|
+
readonly [x: string]: string;
|
|
247
|
+
} | undefined;
|
|
248
|
+
readonly removeHeaders: readonly string[];
|
|
249
|
+
readonly followRedirects: boolean;
|
|
250
|
+
readonly timeout: number;
|
|
251
|
+
} | undefined;
|
|
252
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
253
|
+
readonly endpointCount: number;
|
|
254
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
255
|
+
readonly uptime?: string | undefined;
|
|
256
|
+
readonly endpoints?: readonly {
|
|
257
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
258
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
259
|
+
readonly status: number;
|
|
260
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
261
|
+
readonly hasDelay: boolean;
|
|
262
|
+
readonly delayMs?: number | undefined;
|
|
263
|
+
}[] | undefined;
|
|
264
|
+
readonly statistics?: {
|
|
265
|
+
readonly totalRequests: number;
|
|
266
|
+
readonly requestsPerMinute: number;
|
|
267
|
+
readonly averageResponseTime: number;
|
|
268
|
+
readonly errorRate: number;
|
|
269
|
+
readonly requestsByMethod: {
|
|
270
|
+
readonly [x: string]: number;
|
|
271
|
+
};
|
|
272
|
+
readonly requestsByStatusCode: {
|
|
273
|
+
readonly [x: string]: number;
|
|
274
|
+
};
|
|
275
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
276
|
+
readonly p50ResponseTime?: number | undefined;
|
|
277
|
+
readonly p95ResponseTime?: number | undefined;
|
|
278
|
+
readonly p99ResponseTime?: number | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
281
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
282
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
283
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
284
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
285
|
+
readonly protocol: "HTTP";
|
|
286
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
287
|
+
readonly proxy?: {
|
|
288
|
+
readonly targetUrl: string;
|
|
289
|
+
readonly mode: "passthrough" | "record";
|
|
290
|
+
readonly addHeaders?: {
|
|
291
|
+
readonly [x: string]: string;
|
|
292
|
+
} | undefined;
|
|
293
|
+
readonly removeHeaders: readonly string[];
|
|
294
|
+
readonly followRedirects: boolean;
|
|
295
|
+
readonly timeout: number;
|
|
296
|
+
} | undefined;
|
|
297
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
298
|
+
readonly endpointCount: number;
|
|
299
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
300
|
+
readonly uptime?: string | undefined;
|
|
301
|
+
readonly endpoints?: readonly {
|
|
302
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
303
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
304
|
+
readonly status: number;
|
|
305
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
306
|
+
readonly hasDelay: boolean;
|
|
307
|
+
readonly delayMs?: number | undefined;
|
|
308
|
+
}[] | undefined;
|
|
309
|
+
readonly statistics?: {
|
|
310
|
+
readonly totalRequests: number;
|
|
311
|
+
readonly requestsPerMinute: number;
|
|
312
|
+
readonly averageResponseTime: number;
|
|
313
|
+
readonly errorRate: number;
|
|
314
|
+
readonly requestsByMethod: {
|
|
315
|
+
readonly [x: string]: number;
|
|
316
|
+
};
|
|
317
|
+
readonly requestsByStatusCode: {
|
|
318
|
+
readonly [x: string]: number;
|
|
319
|
+
};
|
|
320
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
321
|
+
readonly p50ResponseTime?: number | undefined;
|
|
322
|
+
readonly p95ResponseTime?: number | undefined;
|
|
323
|
+
readonly p99ResponseTime?: number | undefined;
|
|
324
|
+
} | undefined;
|
|
325
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
326
|
+
readonly updateImposter: <WithResponse extends boolean = false>(request: {
|
|
327
|
+
readonly path: {
|
|
328
|
+
readonly id: string;
|
|
329
|
+
};
|
|
330
|
+
readonly payload: {
|
|
331
|
+
readonly status?: "running" | "stopped" | "starting" | "stopping" | undefined;
|
|
332
|
+
readonly name?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
333
|
+
readonly port?: (number & import("effect/Brand").Brand<"PortNumber">) | undefined;
|
|
334
|
+
readonly adminPath?: string | undefined;
|
|
335
|
+
readonly proxy?: {
|
|
336
|
+
readonly targetUrl: string;
|
|
337
|
+
readonly mode: "passthrough" | "record";
|
|
338
|
+
readonly addHeaders?: {
|
|
339
|
+
readonly [x: string]: string;
|
|
340
|
+
} | undefined;
|
|
341
|
+
readonly removeHeaders: readonly string[];
|
|
342
|
+
readonly followRedirects: boolean;
|
|
343
|
+
readonly timeout: number;
|
|
344
|
+
} | null | undefined;
|
|
345
|
+
};
|
|
346
|
+
readonly withResponse?: WithResponse;
|
|
347
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
348
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
349
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
350
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
351
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
352
|
+
readonly protocol: "HTTP";
|
|
353
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
354
|
+
readonly proxy?: {
|
|
355
|
+
readonly targetUrl: string;
|
|
356
|
+
readonly mode: "passthrough" | "record";
|
|
357
|
+
readonly addHeaders?: {
|
|
358
|
+
readonly [x: string]: string;
|
|
359
|
+
} | undefined;
|
|
360
|
+
readonly removeHeaders: readonly string[];
|
|
361
|
+
readonly followRedirects: boolean;
|
|
362
|
+
readonly timeout: number;
|
|
363
|
+
} | undefined;
|
|
364
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
365
|
+
readonly endpointCount: number;
|
|
366
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
367
|
+
readonly uptime?: string | undefined;
|
|
368
|
+
readonly endpoints?: readonly {
|
|
369
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
370
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
371
|
+
readonly status: number;
|
|
372
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
373
|
+
readonly hasDelay: boolean;
|
|
374
|
+
readonly delayMs?: number | undefined;
|
|
375
|
+
}[] | undefined;
|
|
376
|
+
readonly statistics?: {
|
|
377
|
+
readonly totalRequests: number;
|
|
378
|
+
readonly requestsPerMinute: number;
|
|
379
|
+
readonly averageResponseTime: number;
|
|
380
|
+
readonly errorRate: number;
|
|
381
|
+
readonly requestsByMethod: {
|
|
382
|
+
readonly [x: string]: number;
|
|
383
|
+
};
|
|
384
|
+
readonly requestsByStatusCode: {
|
|
385
|
+
readonly [x: string]: number;
|
|
386
|
+
};
|
|
387
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
388
|
+
readonly p50ResponseTime?: number | undefined;
|
|
389
|
+
readonly p95ResponseTime?: number | undefined;
|
|
390
|
+
readonly p99ResponseTime?: number | undefined;
|
|
391
|
+
} | undefined;
|
|
392
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
393
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
394
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
395
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
396
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
397
|
+
readonly protocol: "HTTP";
|
|
398
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
399
|
+
readonly proxy?: {
|
|
400
|
+
readonly targetUrl: string;
|
|
401
|
+
readonly mode: "passthrough" | "record";
|
|
402
|
+
readonly addHeaders?: {
|
|
403
|
+
readonly [x: string]: string;
|
|
404
|
+
} | undefined;
|
|
405
|
+
readonly removeHeaders: readonly string[];
|
|
406
|
+
readonly followRedirects: boolean;
|
|
407
|
+
readonly timeout: number;
|
|
408
|
+
} | undefined;
|
|
409
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
410
|
+
readonly endpointCount: number;
|
|
411
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
412
|
+
readonly uptime?: string | undefined;
|
|
413
|
+
readonly endpoints?: readonly {
|
|
414
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
415
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
416
|
+
readonly status: number;
|
|
417
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
418
|
+
readonly hasDelay: boolean;
|
|
419
|
+
readonly delayMs?: number | undefined;
|
|
420
|
+
}[] | undefined;
|
|
421
|
+
readonly statistics?: {
|
|
422
|
+
readonly totalRequests: number;
|
|
423
|
+
readonly requestsPerMinute: number;
|
|
424
|
+
readonly averageResponseTime: number;
|
|
425
|
+
readonly errorRate: number;
|
|
426
|
+
readonly requestsByMethod: {
|
|
427
|
+
readonly [x: string]: number;
|
|
428
|
+
};
|
|
429
|
+
readonly requestsByStatusCode: {
|
|
430
|
+
readonly [x: string]: number;
|
|
431
|
+
};
|
|
432
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
433
|
+
readonly p50ResponseTime?: number | undefined;
|
|
434
|
+
readonly p95ResponseTime?: number | undefined;
|
|
435
|
+
readonly p99ResponseTime?: number | undefined;
|
|
436
|
+
} | undefined;
|
|
437
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("../api/ApiErrors").ApiConflictError | import("../api/ApiErrors").ApiServiceError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
438
|
+
readonly deleteImposter: <WithResponse extends boolean = false>(request: {
|
|
439
|
+
readonly path: {
|
|
440
|
+
readonly id: string;
|
|
441
|
+
};
|
|
442
|
+
readonly urlParams: {
|
|
443
|
+
readonly force: boolean;
|
|
444
|
+
};
|
|
445
|
+
readonly withResponse?: WithResponse;
|
|
446
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
447
|
+
readonly message: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
448
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
449
|
+
readonly deletedAt: import("effect/DateTime").Utc;
|
|
450
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
451
|
+
readonly message: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
452
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
453
|
+
readonly deletedAt: import("effect/DateTime").Utc;
|
|
454
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("../api/ApiErrors").ApiConflictError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
455
|
+
readonly addStub: <WithResponse extends boolean = false>(request: {
|
|
456
|
+
readonly path: {
|
|
457
|
+
readonly imposterId: string;
|
|
458
|
+
};
|
|
459
|
+
readonly payload: {
|
|
460
|
+
readonly predicates: readonly {
|
|
461
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
462
|
+
readonly value: unknown;
|
|
463
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
464
|
+
readonly caseSensitive: boolean;
|
|
465
|
+
}[];
|
|
466
|
+
readonly responses: readonly [{
|
|
467
|
+
readonly headers?: {
|
|
468
|
+
readonly [x: string]: string;
|
|
469
|
+
} | undefined;
|
|
470
|
+
readonly body?: unknown;
|
|
471
|
+
readonly status: number;
|
|
472
|
+
readonly delay?: number | undefined;
|
|
473
|
+
}, ...{
|
|
474
|
+
readonly headers?: {
|
|
475
|
+
readonly [x: string]: string;
|
|
476
|
+
} | undefined;
|
|
477
|
+
readonly body?: unknown;
|
|
478
|
+
readonly status: number;
|
|
479
|
+
readonly delay?: number | undefined;
|
|
480
|
+
}[]];
|
|
481
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
482
|
+
};
|
|
483
|
+
readonly withResponse?: WithResponse;
|
|
484
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
485
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
486
|
+
readonly predicates: readonly {
|
|
487
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
488
|
+
readonly value: unknown;
|
|
489
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
490
|
+
readonly caseSensitive: boolean;
|
|
491
|
+
}[];
|
|
492
|
+
readonly responses: readonly [{
|
|
493
|
+
readonly headers?: {
|
|
494
|
+
readonly [x: string]: string;
|
|
495
|
+
} | undefined;
|
|
496
|
+
readonly body?: unknown;
|
|
497
|
+
readonly status: number;
|
|
498
|
+
readonly delay?: number | undefined;
|
|
499
|
+
}, ...{
|
|
500
|
+
readonly headers?: {
|
|
501
|
+
readonly [x: string]: string;
|
|
502
|
+
} | undefined;
|
|
503
|
+
readonly body?: unknown;
|
|
504
|
+
readonly status: number;
|
|
505
|
+
readonly delay?: number | undefined;
|
|
506
|
+
}[]];
|
|
507
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
508
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
509
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
510
|
+
readonly predicates: readonly {
|
|
511
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
512
|
+
readonly value: unknown;
|
|
513
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
514
|
+
readonly caseSensitive: boolean;
|
|
515
|
+
}[];
|
|
516
|
+
readonly responses: readonly [{
|
|
517
|
+
readonly headers?: {
|
|
518
|
+
readonly [x: string]: string;
|
|
519
|
+
} | undefined;
|
|
520
|
+
readonly body?: unknown;
|
|
521
|
+
readonly status: number;
|
|
522
|
+
readonly delay?: number | undefined;
|
|
523
|
+
}, ...{
|
|
524
|
+
readonly headers?: {
|
|
525
|
+
readonly [x: string]: string;
|
|
526
|
+
} | undefined;
|
|
527
|
+
readonly body?: unknown;
|
|
528
|
+
readonly status: number;
|
|
529
|
+
readonly delay?: number | undefined;
|
|
530
|
+
}[]];
|
|
531
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
532
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
533
|
+
readonly listStubs: <WithResponse extends boolean = false>(request: {
|
|
534
|
+
readonly path: {
|
|
535
|
+
readonly imposterId: string;
|
|
536
|
+
};
|
|
537
|
+
readonly withResponse?: WithResponse;
|
|
538
|
+
}) => Effect.Effect<WithResponse extends true ? [readonly {
|
|
539
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
540
|
+
readonly predicates: readonly {
|
|
541
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
542
|
+
readonly value: unknown;
|
|
543
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
544
|
+
readonly caseSensitive: boolean;
|
|
545
|
+
}[];
|
|
546
|
+
readonly responses: readonly [{
|
|
547
|
+
readonly headers?: {
|
|
548
|
+
readonly [x: string]: string;
|
|
549
|
+
} | undefined;
|
|
550
|
+
readonly body?: unknown;
|
|
551
|
+
readonly status: number;
|
|
552
|
+
readonly delay?: number | undefined;
|
|
553
|
+
}, ...{
|
|
554
|
+
readonly headers?: {
|
|
555
|
+
readonly [x: string]: string;
|
|
556
|
+
} | undefined;
|
|
557
|
+
readonly body?: unknown;
|
|
558
|
+
readonly status: number;
|
|
559
|
+
readonly delay?: number | undefined;
|
|
560
|
+
}[]];
|
|
561
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
562
|
+
}[], import("@effect/platform/HttpClientResponse").HttpClientResponse] : readonly {
|
|
563
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
564
|
+
readonly predicates: readonly {
|
|
565
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
566
|
+
readonly value: unknown;
|
|
567
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
568
|
+
readonly caseSensitive: boolean;
|
|
569
|
+
}[];
|
|
570
|
+
readonly responses: readonly [{
|
|
571
|
+
readonly headers?: {
|
|
572
|
+
readonly [x: string]: string;
|
|
573
|
+
} | undefined;
|
|
574
|
+
readonly body?: unknown;
|
|
575
|
+
readonly status: number;
|
|
576
|
+
readonly delay?: number | undefined;
|
|
577
|
+
}, ...{
|
|
578
|
+
readonly headers?: {
|
|
579
|
+
readonly [x: string]: string;
|
|
580
|
+
} | undefined;
|
|
581
|
+
readonly body?: unknown;
|
|
582
|
+
readonly status: number;
|
|
583
|
+
readonly delay?: number | undefined;
|
|
584
|
+
}[]];
|
|
585
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
586
|
+
}[], import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
587
|
+
readonly updateStub: <WithResponse extends boolean = false>(request: {
|
|
588
|
+
readonly path: {
|
|
589
|
+
readonly imposterId: string;
|
|
590
|
+
readonly stubId: string;
|
|
591
|
+
};
|
|
592
|
+
readonly payload: {
|
|
593
|
+
readonly predicates?: readonly {
|
|
594
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
595
|
+
readonly value: unknown;
|
|
596
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
597
|
+
readonly caseSensitive: boolean;
|
|
598
|
+
}[] | undefined;
|
|
599
|
+
readonly responses?: readonly [{
|
|
600
|
+
readonly headers?: {
|
|
601
|
+
readonly [x: string]: string;
|
|
602
|
+
} | undefined;
|
|
603
|
+
readonly body?: unknown;
|
|
604
|
+
readonly status: number;
|
|
605
|
+
readonly delay?: number | undefined;
|
|
606
|
+
}, ...{
|
|
607
|
+
readonly headers?: {
|
|
608
|
+
readonly [x: string]: string;
|
|
609
|
+
} | undefined;
|
|
610
|
+
readonly body?: unknown;
|
|
611
|
+
readonly status: number;
|
|
612
|
+
readonly delay?: number | undefined;
|
|
613
|
+
}[]] | undefined;
|
|
614
|
+
readonly responseMode?: "sequential" | "random" | "repeat" | undefined;
|
|
615
|
+
};
|
|
616
|
+
readonly withResponse?: WithResponse;
|
|
617
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
618
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
619
|
+
readonly predicates: readonly {
|
|
620
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
621
|
+
readonly value: unknown;
|
|
622
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
623
|
+
readonly caseSensitive: boolean;
|
|
624
|
+
}[];
|
|
625
|
+
readonly responses: readonly [{
|
|
626
|
+
readonly headers?: {
|
|
627
|
+
readonly [x: string]: string;
|
|
628
|
+
} | undefined;
|
|
629
|
+
readonly body?: unknown;
|
|
630
|
+
readonly status: number;
|
|
631
|
+
readonly delay?: number | undefined;
|
|
632
|
+
}, ...{
|
|
633
|
+
readonly headers?: {
|
|
634
|
+
readonly [x: string]: string;
|
|
635
|
+
} | undefined;
|
|
636
|
+
readonly body?: unknown;
|
|
637
|
+
readonly status: number;
|
|
638
|
+
readonly delay?: number | undefined;
|
|
639
|
+
}[]];
|
|
640
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
641
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
642
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
643
|
+
readonly predicates: readonly {
|
|
644
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
645
|
+
readonly value: unknown;
|
|
646
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
647
|
+
readonly caseSensitive: boolean;
|
|
648
|
+
}[];
|
|
649
|
+
readonly responses: readonly [{
|
|
650
|
+
readonly headers?: {
|
|
651
|
+
readonly [x: string]: string;
|
|
652
|
+
} | undefined;
|
|
653
|
+
readonly body?: unknown;
|
|
654
|
+
readonly status: number;
|
|
655
|
+
readonly delay?: number | undefined;
|
|
656
|
+
}, ...{
|
|
657
|
+
readonly headers?: {
|
|
658
|
+
readonly [x: string]: string;
|
|
659
|
+
} | undefined;
|
|
660
|
+
readonly body?: unknown;
|
|
661
|
+
readonly status: number;
|
|
662
|
+
readonly delay?: number | undefined;
|
|
663
|
+
}[]];
|
|
664
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
665
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
666
|
+
readonly deleteStub: <WithResponse extends boolean = false>(request: {
|
|
667
|
+
readonly path: {
|
|
668
|
+
readonly imposterId: string;
|
|
669
|
+
readonly stubId: string;
|
|
670
|
+
};
|
|
671
|
+
readonly withResponse?: WithResponse;
|
|
672
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
673
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
674
|
+
readonly predicates: readonly {
|
|
675
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
676
|
+
readonly value: unknown;
|
|
677
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
678
|
+
readonly caseSensitive: boolean;
|
|
679
|
+
}[];
|
|
680
|
+
readonly responses: readonly [{
|
|
681
|
+
readonly headers?: {
|
|
682
|
+
readonly [x: string]: string;
|
|
683
|
+
} | undefined;
|
|
684
|
+
readonly body?: unknown;
|
|
685
|
+
readonly status: number;
|
|
686
|
+
readonly delay?: number | undefined;
|
|
687
|
+
}, ...{
|
|
688
|
+
readonly headers?: {
|
|
689
|
+
readonly [x: string]: string;
|
|
690
|
+
} | undefined;
|
|
691
|
+
readonly body?: unknown;
|
|
692
|
+
readonly status: number;
|
|
693
|
+
readonly delay?: number | undefined;
|
|
694
|
+
}[]];
|
|
695
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
696
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
697
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
698
|
+
readonly predicates: readonly {
|
|
699
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
700
|
+
readonly value: unknown;
|
|
701
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
702
|
+
readonly caseSensitive: boolean;
|
|
703
|
+
}[];
|
|
704
|
+
readonly responses: readonly [{
|
|
705
|
+
readonly headers?: {
|
|
706
|
+
readonly [x: string]: string;
|
|
707
|
+
} | undefined;
|
|
708
|
+
readonly body?: unknown;
|
|
709
|
+
readonly status: number;
|
|
710
|
+
readonly delay?: number | undefined;
|
|
711
|
+
}, ...{
|
|
712
|
+
readonly headers?: {
|
|
713
|
+
readonly [x: string]: string;
|
|
714
|
+
} | undefined;
|
|
715
|
+
readonly body?: unknown;
|
|
716
|
+
readonly status: number;
|
|
717
|
+
readonly delay?: number | undefined;
|
|
718
|
+
}[]];
|
|
719
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
720
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
721
|
+
readonly listRequests: <WithResponse extends boolean = false>(request: {
|
|
722
|
+
readonly path: {
|
|
723
|
+
readonly id: string;
|
|
724
|
+
};
|
|
725
|
+
readonly urlParams: {
|
|
726
|
+
readonly method?: string | undefined;
|
|
727
|
+
readonly limit: number;
|
|
728
|
+
readonly path?: string | undefined;
|
|
729
|
+
readonly status?: number | undefined;
|
|
730
|
+
};
|
|
731
|
+
readonly withResponse?: WithResponse;
|
|
732
|
+
}) => Effect.Effect<WithResponse extends true ? [readonly {
|
|
733
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
734
|
+
readonly response: {
|
|
735
|
+
readonly headers: {
|
|
736
|
+
readonly [x: string]: string;
|
|
737
|
+
};
|
|
738
|
+
readonly body?: string | undefined;
|
|
739
|
+
readonly status: number;
|
|
740
|
+
readonly matchedStubId?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
741
|
+
readonly proxied: boolean;
|
|
742
|
+
};
|
|
743
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
744
|
+
readonly imposterId: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
745
|
+
readonly request: {
|
|
746
|
+
readonly method: string;
|
|
747
|
+
readonly headers: {
|
|
748
|
+
readonly [x: string]: string;
|
|
749
|
+
};
|
|
750
|
+
readonly body?: unknown;
|
|
751
|
+
readonly path: string;
|
|
752
|
+
readonly query: {
|
|
753
|
+
readonly [x: string]: string;
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
readonly duration: number;
|
|
757
|
+
}[], import("@effect/platform/HttpClientResponse").HttpClientResponse] : readonly {
|
|
758
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
759
|
+
readonly response: {
|
|
760
|
+
readonly headers: {
|
|
761
|
+
readonly [x: string]: string;
|
|
762
|
+
};
|
|
763
|
+
readonly body?: string | undefined;
|
|
764
|
+
readonly status: number;
|
|
765
|
+
readonly matchedStubId?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
766
|
+
readonly proxied: boolean;
|
|
767
|
+
};
|
|
768
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
769
|
+
readonly imposterId: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
770
|
+
readonly request: {
|
|
771
|
+
readonly method: string;
|
|
772
|
+
readonly headers: {
|
|
773
|
+
readonly [x: string]: string;
|
|
774
|
+
};
|
|
775
|
+
readonly body?: unknown;
|
|
776
|
+
readonly path: string;
|
|
777
|
+
readonly query: {
|
|
778
|
+
readonly [x: string]: string;
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
readonly duration: number;
|
|
782
|
+
}[], import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
783
|
+
readonly clearRequests: <WithResponse extends boolean = false>(request: {
|
|
784
|
+
readonly path: {
|
|
785
|
+
readonly id: string;
|
|
786
|
+
};
|
|
787
|
+
readonly withResponse?: WithResponse;
|
|
788
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
789
|
+
readonly message: string;
|
|
790
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
791
|
+
readonly message: string;
|
|
792
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
793
|
+
readonly getImposterStats: <WithResponse extends boolean = false>(request: {
|
|
794
|
+
readonly path: {
|
|
795
|
+
readonly id: string;
|
|
796
|
+
};
|
|
797
|
+
readonly withResponse?: WithResponse;
|
|
798
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
799
|
+
readonly totalRequests: number;
|
|
800
|
+
readonly requestsPerMinute: number;
|
|
801
|
+
readonly averageResponseTime: number;
|
|
802
|
+
readonly errorRate: number;
|
|
803
|
+
readonly requestsByMethod: {
|
|
804
|
+
readonly [x: string]: number;
|
|
805
|
+
};
|
|
806
|
+
readonly requestsByStatusCode: {
|
|
807
|
+
readonly [x: string]: number;
|
|
808
|
+
};
|
|
809
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
810
|
+
readonly p50ResponseTime?: number | undefined;
|
|
811
|
+
readonly p95ResponseTime?: number | undefined;
|
|
812
|
+
readonly p99ResponseTime?: number | undefined;
|
|
813
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
814
|
+
readonly totalRequests: number;
|
|
815
|
+
readonly requestsPerMinute: number;
|
|
816
|
+
readonly averageResponseTime: number;
|
|
817
|
+
readonly errorRate: number;
|
|
818
|
+
readonly requestsByMethod: {
|
|
819
|
+
readonly [x: string]: number;
|
|
820
|
+
};
|
|
821
|
+
readonly requestsByStatusCode: {
|
|
822
|
+
readonly [x: string]: number;
|
|
823
|
+
};
|
|
824
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
825
|
+
readonly p50ResponseTime?: number | undefined;
|
|
826
|
+
readonly p95ResponseTime?: number | undefined;
|
|
827
|
+
readonly p99ResponseTime?: number | undefined;
|
|
828
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
829
|
+
readonly resetImposterStats: <WithResponse extends boolean = false>(request: {
|
|
830
|
+
readonly path: {
|
|
831
|
+
readonly id: string;
|
|
832
|
+
};
|
|
833
|
+
readonly withResponse?: WithResponse;
|
|
834
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
835
|
+
readonly message: string;
|
|
836
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
837
|
+
readonly message: string;
|
|
838
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
839
|
+
};
|
|
840
|
+
readonly healthCheck: <WithResponse extends boolean = false>(request: void | {
|
|
841
|
+
readonly withResponse?: WithResponse;
|
|
842
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
843
|
+
readonly status: "healthy" | "unhealthy";
|
|
844
|
+
readonly uptime: string;
|
|
845
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
846
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
847
|
+
readonly system: {
|
|
848
|
+
readonly imposters: {
|
|
849
|
+
readonly running: number;
|
|
850
|
+
readonly stopped: number;
|
|
851
|
+
readonly total: number;
|
|
852
|
+
};
|
|
853
|
+
readonly memory: {
|
|
854
|
+
readonly used: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
855
|
+
readonly free: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
856
|
+
};
|
|
857
|
+
readonly ports: {
|
|
858
|
+
readonly available: number;
|
|
859
|
+
readonly allocated: number;
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
863
|
+
readonly status: "healthy" | "unhealthy";
|
|
864
|
+
readonly uptime: string;
|
|
865
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
866
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
867
|
+
readonly system: {
|
|
868
|
+
readonly imposters: {
|
|
869
|
+
readonly running: number;
|
|
870
|
+
readonly stopped: number;
|
|
871
|
+
readonly total: number;
|
|
872
|
+
};
|
|
873
|
+
readonly memory: {
|
|
874
|
+
readonly used: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
875
|
+
readonly free: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
876
|
+
};
|
|
877
|
+
readonly ports: {
|
|
878
|
+
readonly available: number;
|
|
879
|
+
readonly allocated: number;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
883
|
+
readonly serverInfo: <WithResponse extends boolean = false>(request: void | {
|
|
884
|
+
readonly withResponse?: WithResponse;
|
|
885
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
886
|
+
readonly server: {
|
|
887
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
888
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
889
|
+
readonly buildTime: import("effect/DateTime").Utc;
|
|
890
|
+
readonly platform: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
891
|
+
readonly protocols: readonly "HTTP"[];
|
|
892
|
+
};
|
|
893
|
+
readonly configuration: {
|
|
894
|
+
readonly maxImposters: number;
|
|
895
|
+
readonly portRange: {
|
|
896
|
+
readonly min: number & import("effect/Brand").Brand<"PortNumber">;
|
|
897
|
+
readonly max: number & import("effect/Brand").Brand<"PortNumber">;
|
|
898
|
+
};
|
|
899
|
+
readonly defaultTimeout: number;
|
|
900
|
+
readonly logLevel: "error" | "debug" | "info" | "warn";
|
|
901
|
+
};
|
|
902
|
+
readonly features: {
|
|
903
|
+
readonly openApiGeneration: boolean;
|
|
904
|
+
readonly clientGeneration: boolean;
|
|
905
|
+
readonly authentication: boolean;
|
|
906
|
+
readonly clustering: boolean;
|
|
907
|
+
};
|
|
908
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
909
|
+
readonly server: {
|
|
910
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
911
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
912
|
+
readonly buildTime: import("effect/DateTime").Utc;
|
|
913
|
+
readonly platform: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
914
|
+
readonly protocols: readonly "HTTP"[];
|
|
915
|
+
};
|
|
916
|
+
readonly configuration: {
|
|
917
|
+
readonly maxImposters: number;
|
|
918
|
+
readonly portRange: {
|
|
919
|
+
readonly min: number & import("effect/Brand").Brand<"PortNumber">;
|
|
920
|
+
readonly max: number & import("effect/Brand").Brand<"PortNumber">;
|
|
921
|
+
};
|
|
922
|
+
readonly defaultTimeout: number;
|
|
923
|
+
readonly logLevel: "error" | "debug" | "info" | "warn";
|
|
924
|
+
};
|
|
925
|
+
readonly features: {
|
|
926
|
+
readonly openApiGeneration: boolean;
|
|
927
|
+
readonly clientGeneration: boolean;
|
|
928
|
+
readonly authentication: boolean;
|
|
929
|
+
readonly clustering: boolean;
|
|
930
|
+
};
|
|
931
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
932
|
+
}, never, HttpClient.HttpClient>;
|
|
933
|
+
export type ImpostersClientShape = Effect.Effect.Success<ReturnType<typeof makeImpostersClient>>;
|
|
934
|
+
declare const ImpostersClient_base: Context.TagClass<ImpostersClient, "ImpostersClient", {
|
|
935
|
+
readonly imposters: {
|
|
936
|
+
readonly createImposter: <WithResponse extends boolean = false>(request: {
|
|
937
|
+
readonly payload: {
|
|
938
|
+
readonly name?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
939
|
+
readonly port?: (number & import("effect/Brand").Brand<"PortNumber">) | undefined;
|
|
940
|
+
readonly protocol: "HTTP";
|
|
941
|
+
readonly adminPath: string;
|
|
942
|
+
readonly proxy?: {
|
|
943
|
+
readonly targetUrl: string;
|
|
944
|
+
readonly mode: "passthrough" | "record";
|
|
945
|
+
readonly addHeaders?: {
|
|
946
|
+
readonly [x: string]: string;
|
|
947
|
+
} | undefined;
|
|
948
|
+
readonly removeHeaders: readonly string[];
|
|
949
|
+
readonly followRedirects: boolean;
|
|
950
|
+
readonly timeout: number;
|
|
951
|
+
} | undefined;
|
|
952
|
+
};
|
|
953
|
+
readonly withResponse?: WithResponse;
|
|
954
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
955
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
956
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
957
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
958
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
959
|
+
readonly protocol: "HTTP";
|
|
960
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
961
|
+
readonly proxy?: {
|
|
962
|
+
readonly targetUrl: string;
|
|
963
|
+
readonly mode: "passthrough" | "record";
|
|
964
|
+
readonly addHeaders?: {
|
|
965
|
+
readonly [x: string]: string;
|
|
966
|
+
} | undefined;
|
|
967
|
+
readonly removeHeaders: readonly string[];
|
|
968
|
+
readonly followRedirects: boolean;
|
|
969
|
+
readonly timeout: number;
|
|
970
|
+
} | undefined;
|
|
971
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
972
|
+
readonly endpointCount: number;
|
|
973
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
974
|
+
readonly uptime?: string | undefined;
|
|
975
|
+
readonly endpoints?: readonly {
|
|
976
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
977
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
978
|
+
readonly status: number;
|
|
979
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
980
|
+
readonly hasDelay: boolean;
|
|
981
|
+
readonly delayMs?: number | undefined;
|
|
982
|
+
}[] | undefined;
|
|
983
|
+
readonly statistics?: {
|
|
984
|
+
readonly totalRequests: number;
|
|
985
|
+
readonly requestsPerMinute: number;
|
|
986
|
+
readonly averageResponseTime: number;
|
|
987
|
+
readonly errorRate: number;
|
|
988
|
+
readonly requestsByMethod: {
|
|
989
|
+
readonly [x: string]: number;
|
|
990
|
+
};
|
|
991
|
+
readonly requestsByStatusCode: {
|
|
992
|
+
readonly [x: string]: number;
|
|
993
|
+
};
|
|
994
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
995
|
+
readonly p50ResponseTime?: number | undefined;
|
|
996
|
+
readonly p95ResponseTime?: number | undefined;
|
|
997
|
+
readonly p99ResponseTime?: number | undefined;
|
|
998
|
+
} | undefined;
|
|
999
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1000
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
1001
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1002
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1003
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1004
|
+
readonly protocol: "HTTP";
|
|
1005
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1006
|
+
readonly proxy?: {
|
|
1007
|
+
readonly targetUrl: string;
|
|
1008
|
+
readonly mode: "passthrough" | "record";
|
|
1009
|
+
readonly addHeaders?: {
|
|
1010
|
+
readonly [x: string]: string;
|
|
1011
|
+
} | undefined;
|
|
1012
|
+
readonly removeHeaders: readonly string[];
|
|
1013
|
+
readonly followRedirects: boolean;
|
|
1014
|
+
readonly timeout: number;
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
1017
|
+
readonly endpointCount: number;
|
|
1018
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1019
|
+
readonly uptime?: string | undefined;
|
|
1020
|
+
readonly endpoints?: readonly {
|
|
1021
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1022
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1023
|
+
readonly status: number;
|
|
1024
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1025
|
+
readonly hasDelay: boolean;
|
|
1026
|
+
readonly delayMs?: number | undefined;
|
|
1027
|
+
}[] | undefined;
|
|
1028
|
+
readonly statistics?: {
|
|
1029
|
+
readonly totalRequests: number;
|
|
1030
|
+
readonly requestsPerMinute: number;
|
|
1031
|
+
readonly averageResponseTime: number;
|
|
1032
|
+
readonly errorRate: number;
|
|
1033
|
+
readonly requestsByMethod: {
|
|
1034
|
+
readonly [x: string]: number;
|
|
1035
|
+
};
|
|
1036
|
+
readonly requestsByStatusCode: {
|
|
1037
|
+
readonly [x: string]: number;
|
|
1038
|
+
};
|
|
1039
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1040
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1041
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1042
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1043
|
+
} | undefined;
|
|
1044
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiConflictError | import("../api/ApiErrors").ApiServiceError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1045
|
+
readonly listImposters: <WithResponse extends boolean = false>(request: {
|
|
1046
|
+
readonly urlParams: {
|
|
1047
|
+
readonly limit: number;
|
|
1048
|
+
readonly offset: number;
|
|
1049
|
+
readonly status?: "running" | "stopped" | "starting" | "stopping" | undefined;
|
|
1050
|
+
readonly protocol?: "HTTP" | undefined;
|
|
1051
|
+
};
|
|
1052
|
+
readonly withResponse?: WithResponse;
|
|
1053
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1054
|
+
readonly pagination: {
|
|
1055
|
+
readonly limit: number & import("effect/Brand").Brand<"PositiveInteger">;
|
|
1056
|
+
readonly offset: number;
|
|
1057
|
+
readonly total: number;
|
|
1058
|
+
readonly hasMore: boolean;
|
|
1059
|
+
};
|
|
1060
|
+
readonly imposters: readonly {
|
|
1061
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
1062
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1063
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1064
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1065
|
+
readonly protocol: "HTTP";
|
|
1066
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1067
|
+
readonly proxy?: {
|
|
1068
|
+
readonly targetUrl: string;
|
|
1069
|
+
readonly mode: "passthrough" | "record";
|
|
1070
|
+
readonly addHeaders?: {
|
|
1071
|
+
readonly [x: string]: string;
|
|
1072
|
+
} | undefined;
|
|
1073
|
+
readonly removeHeaders: readonly string[];
|
|
1074
|
+
readonly followRedirects: boolean;
|
|
1075
|
+
readonly timeout: number;
|
|
1076
|
+
} | undefined;
|
|
1077
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
1078
|
+
readonly endpointCount: number;
|
|
1079
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1080
|
+
readonly uptime?: string | undefined;
|
|
1081
|
+
readonly endpoints?: readonly {
|
|
1082
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1083
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1084
|
+
readonly status: number;
|
|
1085
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1086
|
+
readonly hasDelay: boolean;
|
|
1087
|
+
readonly delayMs?: number | undefined;
|
|
1088
|
+
}[] | undefined;
|
|
1089
|
+
readonly statistics?: {
|
|
1090
|
+
readonly totalRequests: number;
|
|
1091
|
+
readonly requestsPerMinute: number;
|
|
1092
|
+
readonly averageResponseTime: number;
|
|
1093
|
+
readonly errorRate: number;
|
|
1094
|
+
readonly requestsByMethod: {
|
|
1095
|
+
readonly [x: string]: number;
|
|
1096
|
+
};
|
|
1097
|
+
readonly requestsByStatusCode: {
|
|
1098
|
+
readonly [x: string]: number;
|
|
1099
|
+
};
|
|
1100
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1101
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1102
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1103
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1104
|
+
} | undefined;
|
|
1105
|
+
}[];
|
|
1106
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1107
|
+
readonly pagination: {
|
|
1108
|
+
readonly limit: number & import("effect/Brand").Brand<"PositiveInteger">;
|
|
1109
|
+
readonly offset: number;
|
|
1110
|
+
readonly total: number;
|
|
1111
|
+
readonly hasMore: boolean;
|
|
1112
|
+
};
|
|
1113
|
+
readonly imposters: readonly {
|
|
1114
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
1115
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1116
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1117
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1118
|
+
readonly protocol: "HTTP";
|
|
1119
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1120
|
+
readonly proxy?: {
|
|
1121
|
+
readonly targetUrl: string;
|
|
1122
|
+
readonly mode: "passthrough" | "record";
|
|
1123
|
+
readonly addHeaders?: {
|
|
1124
|
+
readonly [x: string]: string;
|
|
1125
|
+
} | undefined;
|
|
1126
|
+
readonly removeHeaders: readonly string[];
|
|
1127
|
+
readonly followRedirects: boolean;
|
|
1128
|
+
readonly timeout: number;
|
|
1129
|
+
} | undefined;
|
|
1130
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
1131
|
+
readonly endpointCount: number;
|
|
1132
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1133
|
+
readonly uptime?: string | undefined;
|
|
1134
|
+
readonly endpoints?: readonly {
|
|
1135
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1136
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1137
|
+
readonly status: number;
|
|
1138
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1139
|
+
readonly hasDelay: boolean;
|
|
1140
|
+
readonly delayMs?: number | undefined;
|
|
1141
|
+
}[] | undefined;
|
|
1142
|
+
readonly statistics?: {
|
|
1143
|
+
readonly totalRequests: number;
|
|
1144
|
+
readonly requestsPerMinute: number;
|
|
1145
|
+
readonly averageResponseTime: number;
|
|
1146
|
+
readonly errorRate: number;
|
|
1147
|
+
readonly requestsByMethod: {
|
|
1148
|
+
readonly [x: string]: number;
|
|
1149
|
+
};
|
|
1150
|
+
readonly requestsByStatusCode: {
|
|
1151
|
+
readonly [x: string]: number;
|
|
1152
|
+
};
|
|
1153
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1154
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1155
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1156
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1157
|
+
} | undefined;
|
|
1158
|
+
}[];
|
|
1159
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1160
|
+
readonly getImposter: <WithResponse extends boolean = false>(request: {
|
|
1161
|
+
readonly path: {
|
|
1162
|
+
readonly id: string;
|
|
1163
|
+
};
|
|
1164
|
+
readonly withResponse?: WithResponse;
|
|
1165
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1166
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
1167
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1168
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1169
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1170
|
+
readonly protocol: "HTTP";
|
|
1171
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1172
|
+
readonly proxy?: {
|
|
1173
|
+
readonly targetUrl: string;
|
|
1174
|
+
readonly mode: "passthrough" | "record";
|
|
1175
|
+
readonly addHeaders?: {
|
|
1176
|
+
readonly [x: string]: string;
|
|
1177
|
+
} | undefined;
|
|
1178
|
+
readonly removeHeaders: readonly string[];
|
|
1179
|
+
readonly followRedirects: boolean;
|
|
1180
|
+
readonly timeout: number;
|
|
1181
|
+
} | undefined;
|
|
1182
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
1183
|
+
readonly endpointCount: number;
|
|
1184
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1185
|
+
readonly uptime?: string | undefined;
|
|
1186
|
+
readonly endpoints?: readonly {
|
|
1187
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1188
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1189
|
+
readonly status: number;
|
|
1190
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1191
|
+
readonly hasDelay: boolean;
|
|
1192
|
+
readonly delayMs?: number | undefined;
|
|
1193
|
+
}[] | undefined;
|
|
1194
|
+
readonly statistics?: {
|
|
1195
|
+
readonly totalRequests: number;
|
|
1196
|
+
readonly requestsPerMinute: number;
|
|
1197
|
+
readonly averageResponseTime: number;
|
|
1198
|
+
readonly errorRate: number;
|
|
1199
|
+
readonly requestsByMethod: {
|
|
1200
|
+
readonly [x: string]: number;
|
|
1201
|
+
};
|
|
1202
|
+
readonly requestsByStatusCode: {
|
|
1203
|
+
readonly [x: string]: number;
|
|
1204
|
+
};
|
|
1205
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1206
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1207
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1208
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1209
|
+
} | undefined;
|
|
1210
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1211
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
1212
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1213
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1214
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1215
|
+
readonly protocol: "HTTP";
|
|
1216
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1217
|
+
readonly proxy?: {
|
|
1218
|
+
readonly targetUrl: string;
|
|
1219
|
+
readonly mode: "passthrough" | "record";
|
|
1220
|
+
readonly addHeaders?: {
|
|
1221
|
+
readonly [x: string]: string;
|
|
1222
|
+
} | undefined;
|
|
1223
|
+
readonly removeHeaders: readonly string[];
|
|
1224
|
+
readonly followRedirects: boolean;
|
|
1225
|
+
readonly timeout: number;
|
|
1226
|
+
} | undefined;
|
|
1227
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
1228
|
+
readonly endpointCount: number;
|
|
1229
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1230
|
+
readonly uptime?: string | undefined;
|
|
1231
|
+
readonly endpoints?: readonly {
|
|
1232
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1233
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1234
|
+
readonly status: number;
|
|
1235
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1236
|
+
readonly hasDelay: boolean;
|
|
1237
|
+
readonly delayMs?: number | undefined;
|
|
1238
|
+
}[] | undefined;
|
|
1239
|
+
readonly statistics?: {
|
|
1240
|
+
readonly totalRequests: number;
|
|
1241
|
+
readonly requestsPerMinute: number;
|
|
1242
|
+
readonly averageResponseTime: number;
|
|
1243
|
+
readonly errorRate: number;
|
|
1244
|
+
readonly requestsByMethod: {
|
|
1245
|
+
readonly [x: string]: number;
|
|
1246
|
+
};
|
|
1247
|
+
readonly requestsByStatusCode: {
|
|
1248
|
+
readonly [x: string]: number;
|
|
1249
|
+
};
|
|
1250
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1251
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1252
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1253
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1254
|
+
} | undefined;
|
|
1255
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1256
|
+
readonly updateImposter: <WithResponse extends boolean = false>(request: {
|
|
1257
|
+
readonly path: {
|
|
1258
|
+
readonly id: string;
|
|
1259
|
+
};
|
|
1260
|
+
readonly payload: {
|
|
1261
|
+
readonly status?: "running" | "stopped" | "starting" | "stopping" | undefined;
|
|
1262
|
+
readonly name?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
1263
|
+
readonly port?: (number & import("effect/Brand").Brand<"PortNumber">) | undefined;
|
|
1264
|
+
readonly adminPath?: string | undefined;
|
|
1265
|
+
readonly proxy?: {
|
|
1266
|
+
readonly targetUrl: string;
|
|
1267
|
+
readonly mode: "passthrough" | "record";
|
|
1268
|
+
readonly addHeaders?: {
|
|
1269
|
+
readonly [x: string]: string;
|
|
1270
|
+
} | undefined;
|
|
1271
|
+
readonly removeHeaders: readonly string[];
|
|
1272
|
+
readonly followRedirects: boolean;
|
|
1273
|
+
readonly timeout: number;
|
|
1274
|
+
} | null | undefined;
|
|
1275
|
+
};
|
|
1276
|
+
readonly withResponse?: WithResponse;
|
|
1277
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1278
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
1279
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1280
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1281
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1282
|
+
readonly protocol: "HTTP";
|
|
1283
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1284
|
+
readonly proxy?: {
|
|
1285
|
+
readonly targetUrl: string;
|
|
1286
|
+
readonly mode: "passthrough" | "record";
|
|
1287
|
+
readonly addHeaders?: {
|
|
1288
|
+
readonly [x: string]: string;
|
|
1289
|
+
} | undefined;
|
|
1290
|
+
readonly removeHeaders: readonly string[];
|
|
1291
|
+
readonly followRedirects: boolean;
|
|
1292
|
+
readonly timeout: number;
|
|
1293
|
+
} | undefined;
|
|
1294
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
1295
|
+
readonly endpointCount: number;
|
|
1296
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1297
|
+
readonly uptime?: string | undefined;
|
|
1298
|
+
readonly endpoints?: readonly {
|
|
1299
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1300
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1301
|
+
readonly status: number;
|
|
1302
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1303
|
+
readonly hasDelay: boolean;
|
|
1304
|
+
readonly delayMs?: number | undefined;
|
|
1305
|
+
}[] | undefined;
|
|
1306
|
+
readonly statistics?: {
|
|
1307
|
+
readonly totalRequests: number;
|
|
1308
|
+
readonly requestsPerMinute: number;
|
|
1309
|
+
readonly averageResponseTime: number;
|
|
1310
|
+
readonly errorRate: number;
|
|
1311
|
+
readonly requestsByMethod: {
|
|
1312
|
+
readonly [x: string]: number;
|
|
1313
|
+
};
|
|
1314
|
+
readonly requestsByStatusCode: {
|
|
1315
|
+
readonly [x: string]: number;
|
|
1316
|
+
};
|
|
1317
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1318
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1319
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1320
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1321
|
+
} | undefined;
|
|
1322
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1323
|
+
readonly status: "running" | "stopped" | "starting" | "stopping";
|
|
1324
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1325
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1326
|
+
readonly port: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1327
|
+
readonly protocol: "HTTP";
|
|
1328
|
+
readonly adminPath: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1329
|
+
readonly proxy?: {
|
|
1330
|
+
readonly targetUrl: string;
|
|
1331
|
+
readonly mode: "passthrough" | "record";
|
|
1332
|
+
readonly addHeaders?: {
|
|
1333
|
+
readonly [x: string]: string;
|
|
1334
|
+
} | undefined;
|
|
1335
|
+
readonly removeHeaders: readonly string[];
|
|
1336
|
+
readonly followRedirects: boolean;
|
|
1337
|
+
readonly timeout: number;
|
|
1338
|
+
} | undefined;
|
|
1339
|
+
readonly createdAt: import("effect/DateTime").Utc;
|
|
1340
|
+
readonly endpointCount: number;
|
|
1341
|
+
readonly adminUrl: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1342
|
+
readonly uptime?: string | undefined;
|
|
1343
|
+
readonly endpoints?: readonly {
|
|
1344
|
+
readonly method: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1345
|
+
readonly path: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1346
|
+
readonly status: number;
|
|
1347
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1348
|
+
readonly hasDelay: boolean;
|
|
1349
|
+
readonly delayMs?: number | undefined;
|
|
1350
|
+
}[] | undefined;
|
|
1351
|
+
readonly statistics?: {
|
|
1352
|
+
readonly totalRequests: number;
|
|
1353
|
+
readonly requestsPerMinute: number;
|
|
1354
|
+
readonly averageResponseTime: number;
|
|
1355
|
+
readonly errorRate: number;
|
|
1356
|
+
readonly requestsByMethod: {
|
|
1357
|
+
readonly [x: string]: number;
|
|
1358
|
+
};
|
|
1359
|
+
readonly requestsByStatusCode: {
|
|
1360
|
+
readonly [x: string]: number;
|
|
1361
|
+
};
|
|
1362
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1363
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1364
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1365
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1366
|
+
} | undefined;
|
|
1367
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("../api/ApiErrors").ApiConflictError | import("../api/ApiErrors").ApiServiceError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1368
|
+
readonly deleteImposter: <WithResponse extends boolean = false>(request: {
|
|
1369
|
+
readonly path: {
|
|
1370
|
+
readonly id: string;
|
|
1371
|
+
};
|
|
1372
|
+
readonly urlParams: {
|
|
1373
|
+
readonly force: boolean;
|
|
1374
|
+
};
|
|
1375
|
+
readonly withResponse?: WithResponse;
|
|
1376
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1377
|
+
readonly message: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1378
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1379
|
+
readonly deletedAt: import("effect/DateTime").Utc;
|
|
1380
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1381
|
+
readonly message: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1382
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1383
|
+
readonly deletedAt: import("effect/DateTime").Utc;
|
|
1384
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("../api/ApiErrors").ApiConflictError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1385
|
+
readonly addStub: <WithResponse extends boolean = false>(request: {
|
|
1386
|
+
readonly path: {
|
|
1387
|
+
readonly imposterId: string;
|
|
1388
|
+
};
|
|
1389
|
+
readonly payload: {
|
|
1390
|
+
readonly predicates: readonly {
|
|
1391
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1392
|
+
readonly value: unknown;
|
|
1393
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1394
|
+
readonly caseSensitive: boolean;
|
|
1395
|
+
}[];
|
|
1396
|
+
readonly responses: readonly [{
|
|
1397
|
+
readonly headers?: {
|
|
1398
|
+
readonly [x: string]: string;
|
|
1399
|
+
} | undefined;
|
|
1400
|
+
readonly body?: unknown;
|
|
1401
|
+
readonly status: number;
|
|
1402
|
+
readonly delay?: number | undefined;
|
|
1403
|
+
}, ...{
|
|
1404
|
+
readonly headers?: {
|
|
1405
|
+
readonly [x: string]: string;
|
|
1406
|
+
} | undefined;
|
|
1407
|
+
readonly body?: unknown;
|
|
1408
|
+
readonly status: number;
|
|
1409
|
+
readonly delay?: number | undefined;
|
|
1410
|
+
}[]];
|
|
1411
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1412
|
+
};
|
|
1413
|
+
readonly withResponse?: WithResponse;
|
|
1414
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1415
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1416
|
+
readonly predicates: readonly {
|
|
1417
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1418
|
+
readonly value: unknown;
|
|
1419
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1420
|
+
readonly caseSensitive: boolean;
|
|
1421
|
+
}[];
|
|
1422
|
+
readonly responses: readonly [{
|
|
1423
|
+
readonly headers?: {
|
|
1424
|
+
readonly [x: string]: string;
|
|
1425
|
+
} | undefined;
|
|
1426
|
+
readonly body?: unknown;
|
|
1427
|
+
readonly status: number;
|
|
1428
|
+
readonly delay?: number | undefined;
|
|
1429
|
+
}, ...{
|
|
1430
|
+
readonly headers?: {
|
|
1431
|
+
readonly [x: string]: string;
|
|
1432
|
+
} | undefined;
|
|
1433
|
+
readonly body?: unknown;
|
|
1434
|
+
readonly status: number;
|
|
1435
|
+
readonly delay?: number | undefined;
|
|
1436
|
+
}[]];
|
|
1437
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1438
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1439
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1440
|
+
readonly predicates: readonly {
|
|
1441
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1442
|
+
readonly value: unknown;
|
|
1443
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1444
|
+
readonly caseSensitive: boolean;
|
|
1445
|
+
}[];
|
|
1446
|
+
readonly responses: readonly [{
|
|
1447
|
+
readonly headers?: {
|
|
1448
|
+
readonly [x: string]: string;
|
|
1449
|
+
} | undefined;
|
|
1450
|
+
readonly body?: unknown;
|
|
1451
|
+
readonly status: number;
|
|
1452
|
+
readonly delay?: number | undefined;
|
|
1453
|
+
}, ...{
|
|
1454
|
+
readonly headers?: {
|
|
1455
|
+
readonly [x: string]: string;
|
|
1456
|
+
} | undefined;
|
|
1457
|
+
readonly body?: unknown;
|
|
1458
|
+
readonly status: number;
|
|
1459
|
+
readonly delay?: number | undefined;
|
|
1460
|
+
}[]];
|
|
1461
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1462
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1463
|
+
readonly listStubs: <WithResponse extends boolean = false>(request: {
|
|
1464
|
+
readonly path: {
|
|
1465
|
+
readonly imposterId: string;
|
|
1466
|
+
};
|
|
1467
|
+
readonly withResponse?: WithResponse;
|
|
1468
|
+
}) => Effect.Effect<WithResponse extends true ? [readonly {
|
|
1469
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1470
|
+
readonly predicates: readonly {
|
|
1471
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1472
|
+
readonly value: unknown;
|
|
1473
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1474
|
+
readonly caseSensitive: boolean;
|
|
1475
|
+
}[];
|
|
1476
|
+
readonly responses: readonly [{
|
|
1477
|
+
readonly headers?: {
|
|
1478
|
+
readonly [x: string]: string;
|
|
1479
|
+
} | undefined;
|
|
1480
|
+
readonly body?: unknown;
|
|
1481
|
+
readonly status: number;
|
|
1482
|
+
readonly delay?: number | undefined;
|
|
1483
|
+
}, ...{
|
|
1484
|
+
readonly headers?: {
|
|
1485
|
+
readonly [x: string]: string;
|
|
1486
|
+
} | undefined;
|
|
1487
|
+
readonly body?: unknown;
|
|
1488
|
+
readonly status: number;
|
|
1489
|
+
readonly delay?: number | undefined;
|
|
1490
|
+
}[]];
|
|
1491
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1492
|
+
}[], import("@effect/platform/HttpClientResponse").HttpClientResponse] : readonly {
|
|
1493
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1494
|
+
readonly predicates: readonly {
|
|
1495
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1496
|
+
readonly value: unknown;
|
|
1497
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1498
|
+
readonly caseSensitive: boolean;
|
|
1499
|
+
}[];
|
|
1500
|
+
readonly responses: readonly [{
|
|
1501
|
+
readonly headers?: {
|
|
1502
|
+
readonly [x: string]: string;
|
|
1503
|
+
} | undefined;
|
|
1504
|
+
readonly body?: unknown;
|
|
1505
|
+
readonly status: number;
|
|
1506
|
+
readonly delay?: number | undefined;
|
|
1507
|
+
}, ...{
|
|
1508
|
+
readonly headers?: {
|
|
1509
|
+
readonly [x: string]: string;
|
|
1510
|
+
} | undefined;
|
|
1511
|
+
readonly body?: unknown;
|
|
1512
|
+
readonly status: number;
|
|
1513
|
+
readonly delay?: number | undefined;
|
|
1514
|
+
}[]];
|
|
1515
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1516
|
+
}[], import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1517
|
+
readonly updateStub: <WithResponse extends boolean = false>(request: {
|
|
1518
|
+
readonly path: {
|
|
1519
|
+
readonly imposterId: string;
|
|
1520
|
+
readonly stubId: string;
|
|
1521
|
+
};
|
|
1522
|
+
readonly payload: {
|
|
1523
|
+
readonly predicates?: readonly {
|
|
1524
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1525
|
+
readonly value: unknown;
|
|
1526
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1527
|
+
readonly caseSensitive: boolean;
|
|
1528
|
+
}[] | undefined;
|
|
1529
|
+
readonly responses?: readonly [{
|
|
1530
|
+
readonly headers?: {
|
|
1531
|
+
readonly [x: string]: string;
|
|
1532
|
+
} | undefined;
|
|
1533
|
+
readonly body?: unknown;
|
|
1534
|
+
readonly status: number;
|
|
1535
|
+
readonly delay?: number | undefined;
|
|
1536
|
+
}, ...{
|
|
1537
|
+
readonly headers?: {
|
|
1538
|
+
readonly [x: string]: string;
|
|
1539
|
+
} | undefined;
|
|
1540
|
+
readonly body?: unknown;
|
|
1541
|
+
readonly status: number;
|
|
1542
|
+
readonly delay?: number | undefined;
|
|
1543
|
+
}[]] | undefined;
|
|
1544
|
+
readonly responseMode?: "sequential" | "random" | "repeat" | undefined;
|
|
1545
|
+
};
|
|
1546
|
+
readonly withResponse?: WithResponse;
|
|
1547
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1548
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1549
|
+
readonly predicates: readonly {
|
|
1550
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1551
|
+
readonly value: unknown;
|
|
1552
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1553
|
+
readonly caseSensitive: boolean;
|
|
1554
|
+
}[];
|
|
1555
|
+
readonly responses: readonly [{
|
|
1556
|
+
readonly headers?: {
|
|
1557
|
+
readonly [x: string]: string;
|
|
1558
|
+
} | undefined;
|
|
1559
|
+
readonly body?: unknown;
|
|
1560
|
+
readonly status: number;
|
|
1561
|
+
readonly delay?: number | undefined;
|
|
1562
|
+
}, ...{
|
|
1563
|
+
readonly headers?: {
|
|
1564
|
+
readonly [x: string]: string;
|
|
1565
|
+
} | undefined;
|
|
1566
|
+
readonly body?: unknown;
|
|
1567
|
+
readonly status: number;
|
|
1568
|
+
readonly delay?: number | undefined;
|
|
1569
|
+
}[]];
|
|
1570
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1571
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1572
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1573
|
+
readonly predicates: readonly {
|
|
1574
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1575
|
+
readonly value: unknown;
|
|
1576
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1577
|
+
readonly caseSensitive: boolean;
|
|
1578
|
+
}[];
|
|
1579
|
+
readonly responses: readonly [{
|
|
1580
|
+
readonly headers?: {
|
|
1581
|
+
readonly [x: string]: string;
|
|
1582
|
+
} | undefined;
|
|
1583
|
+
readonly body?: unknown;
|
|
1584
|
+
readonly status: number;
|
|
1585
|
+
readonly delay?: number | undefined;
|
|
1586
|
+
}, ...{
|
|
1587
|
+
readonly headers?: {
|
|
1588
|
+
readonly [x: string]: string;
|
|
1589
|
+
} | undefined;
|
|
1590
|
+
readonly body?: unknown;
|
|
1591
|
+
readonly status: number;
|
|
1592
|
+
readonly delay?: number | undefined;
|
|
1593
|
+
}[]];
|
|
1594
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1595
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1596
|
+
readonly deleteStub: <WithResponse extends boolean = false>(request: {
|
|
1597
|
+
readonly path: {
|
|
1598
|
+
readonly imposterId: string;
|
|
1599
|
+
readonly stubId: string;
|
|
1600
|
+
};
|
|
1601
|
+
readonly withResponse?: WithResponse;
|
|
1602
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1603
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1604
|
+
readonly predicates: readonly {
|
|
1605
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1606
|
+
readonly value: unknown;
|
|
1607
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1608
|
+
readonly caseSensitive: boolean;
|
|
1609
|
+
}[];
|
|
1610
|
+
readonly responses: readonly [{
|
|
1611
|
+
readonly headers?: {
|
|
1612
|
+
readonly [x: string]: string;
|
|
1613
|
+
} | undefined;
|
|
1614
|
+
readonly body?: unknown;
|
|
1615
|
+
readonly status: number;
|
|
1616
|
+
readonly delay?: number | undefined;
|
|
1617
|
+
}, ...{
|
|
1618
|
+
readonly headers?: {
|
|
1619
|
+
readonly [x: string]: string;
|
|
1620
|
+
} | undefined;
|
|
1621
|
+
readonly body?: unknown;
|
|
1622
|
+
readonly status: number;
|
|
1623
|
+
readonly delay?: number | undefined;
|
|
1624
|
+
}[]];
|
|
1625
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1626
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1627
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1628
|
+
readonly predicates: readonly {
|
|
1629
|
+
readonly field: "method" | "headers" | "body" | "path" | "query";
|
|
1630
|
+
readonly value: unknown;
|
|
1631
|
+
readonly operator: "equals" | "contains" | "startsWith" | "matches" | "exists";
|
|
1632
|
+
readonly caseSensitive: boolean;
|
|
1633
|
+
}[];
|
|
1634
|
+
readonly responses: readonly [{
|
|
1635
|
+
readonly headers?: {
|
|
1636
|
+
readonly [x: string]: string;
|
|
1637
|
+
} | undefined;
|
|
1638
|
+
readonly body?: unknown;
|
|
1639
|
+
readonly status: number;
|
|
1640
|
+
readonly delay?: number | undefined;
|
|
1641
|
+
}, ...{
|
|
1642
|
+
readonly headers?: {
|
|
1643
|
+
readonly [x: string]: string;
|
|
1644
|
+
} | undefined;
|
|
1645
|
+
readonly body?: unknown;
|
|
1646
|
+
readonly status: number;
|
|
1647
|
+
readonly delay?: number | undefined;
|
|
1648
|
+
}[]];
|
|
1649
|
+
readonly responseMode: "sequential" | "random" | "repeat";
|
|
1650
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1651
|
+
readonly listRequests: <WithResponse extends boolean = false>(request: {
|
|
1652
|
+
readonly path: {
|
|
1653
|
+
readonly id: string;
|
|
1654
|
+
};
|
|
1655
|
+
readonly urlParams: {
|
|
1656
|
+
readonly method?: string | undefined;
|
|
1657
|
+
readonly limit: number;
|
|
1658
|
+
readonly path?: string | undefined;
|
|
1659
|
+
readonly status?: number | undefined;
|
|
1660
|
+
};
|
|
1661
|
+
readonly withResponse?: WithResponse;
|
|
1662
|
+
}) => Effect.Effect<WithResponse extends true ? [readonly {
|
|
1663
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1664
|
+
readonly response: {
|
|
1665
|
+
readonly headers: {
|
|
1666
|
+
readonly [x: string]: string;
|
|
1667
|
+
};
|
|
1668
|
+
readonly body?: string | undefined;
|
|
1669
|
+
readonly status: number;
|
|
1670
|
+
readonly matchedStubId?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
1671
|
+
readonly proxied: boolean;
|
|
1672
|
+
};
|
|
1673
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
1674
|
+
readonly imposterId: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1675
|
+
readonly request: {
|
|
1676
|
+
readonly method: string;
|
|
1677
|
+
readonly headers: {
|
|
1678
|
+
readonly [x: string]: string;
|
|
1679
|
+
};
|
|
1680
|
+
readonly body?: unknown;
|
|
1681
|
+
readonly path: string;
|
|
1682
|
+
readonly query: {
|
|
1683
|
+
readonly [x: string]: string;
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
readonly duration: number;
|
|
1687
|
+
}[], import("@effect/platform/HttpClientResponse").HttpClientResponse] : readonly {
|
|
1688
|
+
readonly id: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1689
|
+
readonly response: {
|
|
1690
|
+
readonly headers: {
|
|
1691
|
+
readonly [x: string]: string;
|
|
1692
|
+
};
|
|
1693
|
+
readonly body?: string | undefined;
|
|
1694
|
+
readonly status: number;
|
|
1695
|
+
readonly matchedStubId?: (string & import("effect/Brand").Brand<"NonEmptyString">) | undefined;
|
|
1696
|
+
readonly proxied: boolean;
|
|
1697
|
+
};
|
|
1698
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
1699
|
+
readonly imposterId: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1700
|
+
readonly request: {
|
|
1701
|
+
readonly method: string;
|
|
1702
|
+
readonly headers: {
|
|
1703
|
+
readonly [x: string]: string;
|
|
1704
|
+
};
|
|
1705
|
+
readonly body?: unknown;
|
|
1706
|
+
readonly path: string;
|
|
1707
|
+
readonly query: {
|
|
1708
|
+
readonly [x: string]: string;
|
|
1709
|
+
};
|
|
1710
|
+
};
|
|
1711
|
+
readonly duration: number;
|
|
1712
|
+
}[], import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1713
|
+
readonly clearRequests: <WithResponse extends boolean = false>(request: {
|
|
1714
|
+
readonly path: {
|
|
1715
|
+
readonly id: string;
|
|
1716
|
+
};
|
|
1717
|
+
readonly withResponse?: WithResponse;
|
|
1718
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1719
|
+
readonly message: string;
|
|
1720
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1721
|
+
readonly message: string;
|
|
1722
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1723
|
+
readonly getImposterStats: <WithResponse extends boolean = false>(request: {
|
|
1724
|
+
readonly path: {
|
|
1725
|
+
readonly id: string;
|
|
1726
|
+
};
|
|
1727
|
+
readonly withResponse?: WithResponse;
|
|
1728
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1729
|
+
readonly totalRequests: number;
|
|
1730
|
+
readonly requestsPerMinute: number;
|
|
1731
|
+
readonly averageResponseTime: number;
|
|
1732
|
+
readonly errorRate: number;
|
|
1733
|
+
readonly requestsByMethod: {
|
|
1734
|
+
readonly [x: string]: number;
|
|
1735
|
+
};
|
|
1736
|
+
readonly requestsByStatusCode: {
|
|
1737
|
+
readonly [x: string]: number;
|
|
1738
|
+
};
|
|
1739
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1740
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1741
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1742
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1743
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1744
|
+
readonly totalRequests: number;
|
|
1745
|
+
readonly requestsPerMinute: number;
|
|
1746
|
+
readonly averageResponseTime: number;
|
|
1747
|
+
readonly errorRate: number;
|
|
1748
|
+
readonly requestsByMethod: {
|
|
1749
|
+
readonly [x: string]: number;
|
|
1750
|
+
};
|
|
1751
|
+
readonly requestsByStatusCode: {
|
|
1752
|
+
readonly [x: string]: number;
|
|
1753
|
+
};
|
|
1754
|
+
readonly lastRequestAt?: import("effect/DateTime").Utc | undefined;
|
|
1755
|
+
readonly p50ResponseTime?: number | undefined;
|
|
1756
|
+
readonly p95ResponseTime?: number | undefined;
|
|
1757
|
+
readonly p99ResponseTime?: number | undefined;
|
|
1758
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1759
|
+
readonly resetImposterStats: <WithResponse extends boolean = false>(request: {
|
|
1760
|
+
readonly path: {
|
|
1761
|
+
readonly id: string;
|
|
1762
|
+
};
|
|
1763
|
+
readonly withResponse?: WithResponse;
|
|
1764
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1765
|
+
readonly message: string;
|
|
1766
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1767
|
+
readonly message: string;
|
|
1768
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("../api/ApiErrors").ApiNotFoundError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1769
|
+
};
|
|
1770
|
+
readonly healthCheck: <WithResponse extends boolean = false>(request: void | {
|
|
1771
|
+
readonly withResponse?: WithResponse;
|
|
1772
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1773
|
+
readonly status: "healthy" | "unhealthy";
|
|
1774
|
+
readonly uptime: string;
|
|
1775
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
1776
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1777
|
+
readonly system: {
|
|
1778
|
+
readonly imposters: {
|
|
1779
|
+
readonly running: number;
|
|
1780
|
+
readonly stopped: number;
|
|
1781
|
+
readonly total: number;
|
|
1782
|
+
};
|
|
1783
|
+
readonly memory: {
|
|
1784
|
+
readonly used: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1785
|
+
readonly free: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1786
|
+
};
|
|
1787
|
+
readonly ports: {
|
|
1788
|
+
readonly available: number;
|
|
1789
|
+
readonly allocated: number;
|
|
1790
|
+
};
|
|
1791
|
+
};
|
|
1792
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1793
|
+
readonly status: "healthy" | "unhealthy";
|
|
1794
|
+
readonly uptime: string;
|
|
1795
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
1796
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1797
|
+
readonly system: {
|
|
1798
|
+
readonly imposters: {
|
|
1799
|
+
readonly running: number;
|
|
1800
|
+
readonly stopped: number;
|
|
1801
|
+
readonly total: number;
|
|
1802
|
+
};
|
|
1803
|
+
readonly memory: {
|
|
1804
|
+
readonly used: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1805
|
+
readonly free: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1806
|
+
};
|
|
1807
|
+
readonly ports: {
|
|
1808
|
+
readonly available: number;
|
|
1809
|
+
readonly allocated: number;
|
|
1810
|
+
};
|
|
1811
|
+
};
|
|
1812
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1813
|
+
readonly serverInfo: <WithResponse extends boolean = false>(request: void | {
|
|
1814
|
+
readonly withResponse?: WithResponse;
|
|
1815
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1816
|
+
readonly server: {
|
|
1817
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1818
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1819
|
+
readonly buildTime: import("effect/DateTime").Utc;
|
|
1820
|
+
readonly platform: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1821
|
+
readonly protocols: readonly "HTTP"[];
|
|
1822
|
+
};
|
|
1823
|
+
readonly configuration: {
|
|
1824
|
+
readonly maxImposters: number;
|
|
1825
|
+
readonly portRange: {
|
|
1826
|
+
readonly min: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1827
|
+
readonly max: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1828
|
+
};
|
|
1829
|
+
readonly defaultTimeout: number;
|
|
1830
|
+
readonly logLevel: "error" | "debug" | "info" | "warn";
|
|
1831
|
+
};
|
|
1832
|
+
readonly features: {
|
|
1833
|
+
readonly openApiGeneration: boolean;
|
|
1834
|
+
readonly clientGeneration: boolean;
|
|
1835
|
+
readonly authentication: boolean;
|
|
1836
|
+
readonly clustering: boolean;
|
|
1837
|
+
};
|
|
1838
|
+
}, import("@effect/platform/HttpClientResponse").HttpClientResponse] : {
|
|
1839
|
+
readonly server: {
|
|
1840
|
+
readonly name: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1841
|
+
readonly version: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1842
|
+
readonly buildTime: import("effect/DateTime").Utc;
|
|
1843
|
+
readonly platform: string & import("effect/Brand").Brand<"NonEmptyString">;
|
|
1844
|
+
readonly protocols: readonly "HTTP"[];
|
|
1845
|
+
};
|
|
1846
|
+
readonly configuration: {
|
|
1847
|
+
readonly maxImposters: number;
|
|
1848
|
+
readonly portRange: {
|
|
1849
|
+
readonly min: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1850
|
+
readonly max: number & import("effect/Brand").Brand<"PortNumber">;
|
|
1851
|
+
};
|
|
1852
|
+
readonly defaultTimeout: number;
|
|
1853
|
+
readonly logLevel: "error" | "debug" | "info" | "warn";
|
|
1854
|
+
};
|
|
1855
|
+
readonly features: {
|
|
1856
|
+
readonly openApiGeneration: boolean;
|
|
1857
|
+
readonly clientGeneration: boolean;
|
|
1858
|
+
readonly authentication: boolean;
|
|
1859
|
+
readonly clustering: boolean;
|
|
1860
|
+
};
|
|
1861
|
+
}, import("@effect/platform/HttpClientError").HttpClientError | import("@effect/platform/HttpApiError").HttpApiDecodeError | import("effect/ParseResult").ParseError, never>;
|
|
1862
|
+
}>;
|
|
1863
|
+
export declare class ImpostersClient extends ImpostersClient_base {
|
|
1864
|
+
}
|
|
1865
|
+
export declare const ImpostersClientLive: (baseUrl?: string) => Layer.Layer<ImpostersClient, never, HttpClient.HttpClient>;
|
|
1866
|
+
export declare const ImpostersClientFetchLive: (baseUrl?: string) => Layer.Layer<ImpostersClient>;
|
|
1867
|
+
export {};
|
|
1868
|
+
//# sourceMappingURL=ImpostersClient.d.ts.map
|