@thisisagile/easy 15.8.5 → 15.8.7
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/dist/chunk-4N72FQFX.mjs +16 -0
- package/dist/chunk-4N72FQFX.mjs.map +1 -0
- package/dist/data/Condition.d.ts +25 -0
- package/dist/data/Condition.js +71 -0
- package/dist/data/Condition.js.map +1 -0
- package/dist/data/Condition.mjs +44 -0
- package/dist/data/Condition.mjs.map +1 -0
- package/dist/data/DataProvider.d.ts +1 -0
- package/dist/data/DataProvider.js +17 -0
- package/dist/data/DataProvider.js.map +1 -0
- package/dist/data/DataProvider.mjs +1 -0
- package/dist/data/DataProvider.mjs.map +1 -0
- package/dist/data/Database.d.ts +22 -0
- package/dist/data/Database.js +42 -0
- package/dist/data/Database.js.map +1 -0
- package/dist/data/Database.mjs +18 -0
- package/dist/data/Database.mjs.map +1 -0
- package/dist/data/Field.d.ts +17 -0
- package/dist/data/Field.js +48 -0
- package/dist/data/Field.js.map +1 -0
- package/dist/data/Field.mjs +24 -0
- package/dist/data/Field.mjs.map +1 -0
- package/dist/data/InMemoryGateway.d.ts +12 -0
- package/dist/data/InMemoryGateway.js +59 -0
- package/dist/data/InMemoryGateway.js.map +1 -0
- package/dist/data/InMemoryGateway.mjs +36 -0
- package/dist/data/InMemoryGateway.mjs.map +1 -0
- package/dist/data/Query.d.ts +2 -0
- package/dist/data/Query.js +17 -0
- package/dist/data/Query.js.map +1 -0
- package/dist/data/Query.mjs +1 -0
- package/dist/data/Query.mjs.map +1 -0
- package/dist/data/QueryProvider.d.ts +7 -0
- package/dist/data/QueryProvider.js +17 -0
- package/dist/data/QueryProvider.js.map +1 -0
- package/dist/data/QueryProvider.mjs +1 -0
- package/dist/data/QueryProvider.mjs.map +1 -0
- package/dist/data/index.d.ts +7 -0
- package/dist/data/index.js +35 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/index.mjs +8 -0
- package/dist/data/index.mjs.map +1 -0
- package/dist/domain/Audit.d.ts +11 -0
- package/dist/domain/Audit.js +59 -0
- package/dist/domain/Audit.js.map +1 -0
- package/dist/domain/Audit.mjs +29 -0
- package/dist/domain/Audit.mjs.map +1 -0
- package/dist/domain/Child.d.ts +6 -0
- package/dist/domain/Child.js +49 -0
- package/dist/domain/Child.js.map +1 -0
- package/dist/domain/Child.mjs +19 -0
- package/dist/domain/Child.mjs.map +1 -0
- package/dist/domain/Entity.d.ts +9 -0
- package/dist/domain/Entity.js +62 -0
- package/dist/domain/Entity.js.map +1 -0
- package/dist/domain/Entity.mjs +32 -0
- package/dist/domain/Entity.mjs.map +1 -0
- package/dist/domain/Repo.d.ts +23 -0
- package/dist/domain/Repo.js +81 -0
- package/dist/domain/Repo.js.map +1 -0
- package/dist/domain/Repo.mjs +58 -0
- package/dist/domain/Repo.mjs.map +1 -0
- package/dist/domain/Struct.d.ts +11 -0
- package/dist/domain/Struct.js +55 -0
- package/dist/domain/Struct.js.map +1 -0
- package/dist/domain/Struct.mjs +31 -0
- package/dist/domain/Struct.mjs.map +1 -0
- package/dist/domain/Typo.d.ts +16 -0
- package/dist/domain/Typo.js +62 -0
- package/dist/domain/Typo.js.map +1 -0
- package/dist/domain/Typo.mjs +39 -0
- package/dist/domain/Typo.mjs.map +1 -0
- package/dist/domain/enums/Country.d.ts +256 -0
- package/dist/domain/enums/Country.js +290 -0
- package/dist/domain/enums/Country.js.map +1 -0
- package/dist/domain/enums/Country.mjs +267 -0
- package/dist/domain/enums/Country.mjs.map +1 -0
- package/dist/domain/enums/Currency.d.ts +127 -0
- package/dist/domain/enums/Currency.js +159 -0
- package/dist/domain/enums/Currency.js.map +1 -0
- package/dist/domain/enums/Currency.mjs +136 -0
- package/dist/domain/enums/Currency.mjs.map +1 -0
- package/dist/domain/enums/Environment.d.ts +7 -0
- package/dist/domain/enums/Environment.js +35 -0
- package/dist/domain/enums/Environment.js.map +1 -0
- package/dist/domain/enums/Environment.mjs +12 -0
- package/dist/domain/enums/Environment.mjs.map +1 -0
- package/dist/domain/enums/Locale.d.ts +571 -0
- package/dist/domain/enums/Locale.js +605 -0
- package/dist/domain/enums/Locale.js.map +1 -0
- package/dist/domain/enums/Locale.mjs +582 -0
- package/dist/domain/enums/Locale.mjs.map +1 -0
- package/dist/domain/enums/UnitOfMeasurement.d.ts +10 -0
- package/dist/domain/enums/UnitOfMeasurement.js +40 -0
- package/dist/domain/enums/UnitOfMeasurement.js.map +1 -0
- package/dist/domain/enums/UnitOfMeasurement.mjs +17 -0
- package/dist/domain/enums/UnitOfMeasurement.mjs.map +1 -0
- package/dist/domain/enums/UnitOfWeight.d.ts +8 -0
- package/dist/domain/enums/UnitOfWeight.js +38 -0
- package/dist/domain/enums/UnitOfWeight.js.map +1 -0
- package/dist/domain/enums/UnitOfWeight.mjs +15 -0
- package/dist/domain/enums/UnitOfWeight.mjs.map +1 -0
- package/dist/domain/enums/index.d.ts +6 -0
- package/dist/domain/enums/index.js +33 -0
- package/dist/domain/enums/index.js.map +1 -0
- package/dist/domain/enums/index.mjs +7 -0
- package/dist/domain/enums/index.mjs.map +1 -0
- package/dist/domain/index.d.ts +9 -0
- package/dist/domain/index.js +39 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/index.mjs +10 -0
- package/dist/domain/index.mjs.map +1 -0
- package/dist/domain/structs/Address.d.ts +12 -0
- package/dist/domain/structs/Address.js +73 -0
- package/dist/domain/structs/Address.js.map +1 -0
- package/dist/domain/structs/Address.mjs +42 -0
- package/dist/domain/structs/Address.mjs.map +1 -0
- package/dist/domain/structs/Box.d.ts +15 -0
- package/dist/domain/structs/Box.js +70 -0
- package/dist/domain/structs/Box.js.map +1 -0
- package/dist/domain/structs/Box.mjs +40 -0
- package/dist/domain/structs/Box.mjs.map +1 -0
- package/dist/domain/structs/Dimension.d.ts +10 -0
- package/dist/domain/structs/Dimension.js +61 -0
- package/dist/domain/structs/Dimension.js.map +1 -0
- package/dist/domain/structs/Dimension.mjs +31 -0
- package/dist/domain/structs/Dimension.mjs.map +1 -0
- package/dist/domain/structs/Money.d.ts +12 -0
- package/dist/domain/structs/Money.js +71 -0
- package/dist/domain/structs/Money.js.map +1 -0
- package/dist/domain/structs/Money.mjs +39 -0
- package/dist/domain/structs/Money.mjs.map +1 -0
- package/dist/domain/structs/Name.d.ts +9 -0
- package/dist/domain/structs/Name.js +57 -0
- package/dist/domain/structs/Name.js.map +1 -0
- package/dist/domain/structs/Name.mjs +26 -0
- package/dist/domain/structs/Name.mjs.map +1 -0
- package/dist/domain/structs/Weight.d.ts +13 -0
- package/dist/domain/structs/Weight.js +71 -0
- package/dist/domain/structs/Weight.js.map +1 -0
- package/dist/domain/structs/Weight.mjs +40 -0
- package/dist/domain/structs/Weight.mjs.map +1 -0
- package/dist/domain/structs/index.d.ts +6 -0
- package/dist/domain/structs/index.js +33 -0
- package/dist/domain/structs/index.js.map +1 -0
- package/dist/domain/structs/index.mjs +7 -0
- package/dist/domain/structs/index.mjs.map +1 -0
- package/dist/domain/values/DateTime.d.ts +34 -0
- package/dist/domain/values/DateTime.js +117 -0
- package/dist/domain/values/DateTime.js.map +1 -0
- package/dist/domain/values/DateTime.mjs +92 -0
- package/dist/domain/values/DateTime.mjs.map +1 -0
- package/dist/domain/values/EAN.d.ts +5 -0
- package/dist/domain/values/EAN.js +50 -0
- package/dist/domain/values/EAN.js.map +1 -0
- package/dist/domain/values/EAN.mjs +16 -0
- package/dist/domain/values/EAN.mjs.map +1 -0
- package/dist/domain/values/Email.d.ts +8 -0
- package/dist/domain/values/Email.js +57 -0
- package/dist/domain/values/Email.js.map +1 -0
- package/dist/domain/values/Email.mjs +22 -0
- package/dist/domain/values/Email.mjs.map +1 -0
- package/dist/domain/values/IBAN.d.ts +5 -0
- package/dist/domain/values/IBAN.js +50 -0
- package/dist/domain/values/IBAN.js.map +1 -0
- package/dist/domain/values/IBAN.mjs +16 -0
- package/dist/domain/values/IBAN.mjs.map +1 -0
- package/dist/domain/values/PostalCode.d.ts +8 -0
- package/dist/domain/values/PostalCode.js +53 -0
- package/dist/domain/values/PostalCode.js.map +1 -0
- package/dist/domain/values/PostalCode.mjs +19 -0
- package/dist/domain/values/PostalCode.mjs.map +1 -0
- package/dist/domain/values/Url.d.ts +22 -0
- package/dist/domain/values/Url.js +57 -0
- package/dist/domain/values/Url.js.map +1 -0
- package/dist/domain/values/Url.mjs +22 -0
- package/dist/domain/values/Url.mjs.map +1 -0
- package/dist/domain/values/index.d.ts +6 -0
- package/dist/domain/values/index.js +33 -0
- package/dist/domain/values/index.js.map +1 -0
- package/dist/domain/values/index.mjs +7 -0
- package/dist/domain/values/index.mjs.map +1 -0
- package/dist/health/HealthResource.d.ts +5 -0
- package/dist/health/HealthResource.js +49 -0
- package/dist/health/HealthResource.js.map +1 -0
- package/dist/health/HealthResource.mjs +19 -0
- package/dist/health/HealthResource.mjs.map +1 -0
- package/dist/health/HealthUri.d.ts +5 -0
- package/dist/health/HealthUri.js +33 -0
- package/dist/health/HealthUri.js.map +1 -0
- package/dist/health/HealthUri.mjs +10 -0
- package/dist/health/HealthUri.mjs.map +1 -0
- package/dist/health/index.d.ts +2 -0
- package/dist/health/index.js +25 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/index.mjs +3 -0
- package/dist/health/index.mjs.map +1 -0
- package/dist/http/CacheControl.d.ts +24 -0
- package/dist/http/CacheControl.js +56 -0
- package/dist/http/CacheControl.js.map +1 -0
- package/dist/http/CacheControl.mjs +33 -0
- package/dist/http/CacheControl.mjs.map +1 -0
- package/dist/http/ContentType.d.ts +12 -0
- package/dist/http/ContentType.js +53 -0
- package/dist/http/ContentType.js.map +1 -0
- package/dist/http/ContentType.mjs +20 -0
- package/dist/http/ContentType.mjs.map +1 -0
- package/dist/http/HttpHeader.d.ts +4 -0
- package/dist/http/HttpHeader.js +32 -0
- package/dist/http/HttpHeader.js.map +1 -0
- package/dist/http/HttpHeader.mjs +9 -0
- package/dist/http/HttpHeader.mjs.map +1 -0
- package/dist/http/HttpStatus.d.ts +72 -0
- package/dist/http/HttpStatus.js +112 -0
- package/dist/http/HttpStatus.js.map +1 -0
- package/dist/http/HttpStatus.mjs +87 -0
- package/dist/http/HttpStatus.mjs.map +1 -0
- package/dist/http/HttpVerb.d.ts +9 -0
- package/dist/http/HttpVerb.js +39 -0
- package/dist/http/HttpVerb.js.map +1 -0
- package/dist/http/HttpVerb.mjs +16 -0
- package/dist/http/HttpVerb.mjs.map +1 -0
- package/dist/http/LocalRequestStore.d.ts +7 -0
- package/dist/http/LocalRequestStore.js +36 -0
- package/dist/http/LocalRequestStore.js.map +1 -0
- package/dist/http/LocalRequestStore.mjs +13 -0
- package/dist/http/LocalRequestStore.mjs.map +1 -0
- package/dist/http/OriginatedError.d.ts +9 -0
- package/dist/http/OriginatedError.js +42 -0
- package/dist/http/OriginatedError.js.map +1 -0
- package/dist/http/OriginatedError.mjs +17 -0
- package/dist/http/OriginatedError.mjs.map +1 -0
- package/dist/http/Request.d.ts +11 -0
- package/dist/http/Request.js +17 -0
- package/dist/http/Request.js.map +1 -0
- package/dist/http/Request.mjs +1 -0
- package/dist/http/Request.mjs.map +1 -0
- package/dist/http/RequestOptions.d.ts +35 -0
- package/dist/http/RequestOptions.js +91 -0
- package/dist/http/RequestOptions.js.map +1 -0
- package/dist/http/RequestOptions.mjs +66 -0
- package/dist/http/RequestOptions.mjs.map +1 -0
- package/dist/http/RequestProvider.d.ts +5 -0
- package/dist/http/RequestProvider.js +17 -0
- package/dist/http/RequestProvider.js.map +1 -0
- package/dist/http/RequestProvider.mjs +1 -0
- package/dist/http/RequestProvider.mjs.map +1 -0
- package/dist/http/Response.d.ts +14 -0
- package/dist/http/Response.js +39 -0
- package/dist/http/Response.js.map +1 -0
- package/dist/http/Response.mjs +15 -0
- package/dist/http/Response.mjs.map +1 -0
- package/dist/http/RestResult.d.ts +23 -0
- package/dist/http/RestResult.js +56 -0
- package/dist/http/RestResult.js.map +1 -0
- package/dist/http/RestResult.mjs +32 -0
- package/dist/http/RestResult.mjs.map +1 -0
- package/dist/http/Verb.d.ts +20 -0
- package/dist/http/Verb.js +61 -0
- package/dist/http/Verb.js.map +1 -0
- package/dist/http/Verb.mjs +31 -0
- package/dist/http/Verb.mjs.map +1 -0
- package/dist/http/index.d.ts +12 -0
- package/dist/http/index.js +45 -0
- package/dist/http/index.js.map +1 -0
- package/dist/http/index.mjs +13 -0
- package/dist/http/index.mjs.map +1 -0
- package/dist/index.d.ts +12 -2821
- package/dist/index.js +45 -1
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -0
- package/dist/process/App.d.ts +5 -0
- package/dist/process/App.js +35 -0
- package/dist/process/App.js.map +1 -0
- package/dist/process/App.mjs +12 -0
- package/dist/process/App.mjs.map +1 -0
- package/dist/process/Manage.d.ts +8 -0
- package/dist/process/Manage.js +43 -0
- package/dist/process/Manage.js.map +1 -0
- package/dist/process/Manage.mjs +20 -0
- package/dist/process/Manage.mjs.map +1 -0
- package/dist/process/Scope.d.ts +5 -0
- package/dist/process/Scope.js +38 -0
- package/dist/process/Scope.js.map +1 -0
- package/dist/process/Scope.mjs +15 -0
- package/dist/process/Scope.mjs.map +1 -0
- package/dist/process/Search.d.ts +14 -0
- package/dist/process/Search.js +62 -0
- package/dist/process/Search.js.map +1 -0
- package/dist/process/Search.mjs +39 -0
- package/dist/process/Search.mjs.map +1 -0
- package/dist/process/UseCase.d.ts +10 -0
- package/dist/process/UseCase.js +48 -0
- package/dist/process/UseCase.js.map +1 -0
- package/dist/process/UseCase.mjs +25 -0
- package/dist/process/UseCase.mjs.map +1 -0
- package/dist/process/index.d.ts +5 -0
- package/dist/process/index.js +31 -0
- package/dist/process/index.js.map +1 -0
- package/dist/process/index.mjs +6 -0
- package/dist/process/index.mjs.map +1 -0
- package/dist/resources/AppProvider.d.ts +9 -0
- package/dist/resources/AppProvider.js +17 -0
- package/dist/resources/AppProvider.js.map +1 -0
- package/dist/resources/AppProvider.mjs +1 -0
- package/dist/resources/AppProvider.mjs.map +1 -0
- package/dist/resources/Req.d.ts +23 -0
- package/dist/resources/Req.js +54 -0
- package/dist/resources/Req.js.map +1 -0
- package/dist/resources/Req.mjs +30 -0
- package/dist/resources/Req.mjs.map +1 -0
- package/dist/resources/Requires.d.ts +8 -0
- package/dist/resources/Requires.js +48 -0
- package/dist/resources/Requires.js.map +1 -0
- package/dist/resources/Requires.mjs +24 -0
- package/dist/resources/Requires.mjs.map +1 -0
- package/dist/resources/Resource.d.ts +1 -0
- package/dist/resources/Resource.js +17 -0
- package/dist/resources/Resource.js.map +1 -0
- package/dist/resources/Resource.mjs +1 -0
- package/dist/resources/Resource.mjs.map +1 -0
- package/dist/resources/Route.d.ts +26 -0
- package/dist/resources/Route.js +62 -0
- package/dist/resources/Route.js.map +1 -0
- package/dist/resources/Route.mjs +38 -0
- package/dist/resources/Route.mjs.map +1 -0
- package/dist/resources/Service.d.ts +15 -0
- package/dist/resources/Service.js +49 -0
- package/dist/resources/Service.js.map +1 -0
- package/dist/resources/Service.mjs +26 -0
- package/dist/resources/Service.mjs.map +1 -0
- package/dist/resources/index.d.ts +7 -0
- package/dist/resources/index.js +35 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/index.mjs +8 -0
- package/dist/resources/index.mjs.map +1 -0
- package/dist/security/Jwt.d.ts +15 -0
- package/dist/security/Jwt.js +48 -0
- package/dist/security/Jwt.js.map +1 -0
- package/dist/security/Jwt.mjs +25 -0
- package/dist/security/Jwt.mjs.map +1 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.js +23 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/index.mjs +2 -0
- package/dist/security/index.mjs.map +1 -0
- package/dist/services/Api.d.ts +16 -0
- package/dist/services/Api.js +93 -0
- package/dist/services/Api.js.map +1 -0
- package/dist/services/Api.mjs +69 -0
- package/dist/services/Api.mjs.map +1 -0
- package/dist/services/ApiGateway.d.ts +14 -0
- package/dist/services/ApiGateway.js +57 -0
- package/dist/services/ApiGateway.js.map +1 -0
- package/dist/services/ApiGateway.mjs +34 -0
- package/dist/services/ApiGateway.mjs.map +1 -0
- package/dist/services/AxiosProvider.d.ts +7 -0
- package/dist/services/AxiosProvider.js +61 -0
- package/dist/services/AxiosProvider.js.map +1 -0
- package/dist/services/AxiosProvider.mjs +28 -0
- package/dist/services/AxiosProvider.mjs.map +1 -0
- package/dist/services/MappedRouteGateway.d.ts +16 -0
- package/dist/services/MappedRouteGateway.js +52 -0
- package/dist/services/MappedRouteGateway.js.map +1 -0
- package/dist/services/MappedRouteGateway.mjs +29 -0
- package/dist/services/MappedRouteGateway.mjs.map +1 -0
- package/dist/services/RouteGateway.d.ts +19 -0
- package/dist/services/RouteGateway.js +70 -0
- package/dist/services/RouteGateway.js.map +1 -0
- package/dist/services/RouteGateway.mjs +47 -0
- package/dist/services/RouteGateway.mjs.map +1 -0
- package/dist/services/ViewRouteGateway.d.ts +21 -0
- package/dist/services/ViewRouteGateway.js +55 -0
- package/dist/services/ViewRouteGateway.js.map +1 -0
- package/dist/services/ViewRouteGateway.mjs +32 -0
- package/dist/services/ViewRouteGateway.mjs.map +1 -0
- package/dist/services/index.d.ts +6 -0
- package/dist/services/index.js +33 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/index.mjs +7 -0
- package/dist/services/index.mjs.map +1 -0
- package/dist/sql/Clause.d.ts +17 -0
- package/dist/sql/Clause.js +58 -0
- package/dist/sql/Clause.js.map +1 -0
- package/dist/sql/Clause.mjs +31 -0
- package/dist/sql/Clause.mjs.map +1 -0
- package/dist/sql/Column.d.ts +41 -0
- package/dist/sql/Column.js +96 -0
- package/dist/sql/Column.js.map +1 -0
- package/dist/sql/Column.mjs +71 -0
- package/dist/sql/Column.mjs.map +1 -0
- package/dist/sql/Count.d.ts +7 -0
- package/dist/sql/Count.js +38 -0
- package/dist/sql/Count.js.map +1 -0
- package/dist/sql/Count.mjs +15 -0
- package/dist/sql/Count.mjs.map +1 -0
- package/dist/sql/Delete.d.ts +4 -0
- package/dist/sql/Delete.js +35 -0
- package/dist/sql/Delete.js.map +1 -0
- package/dist/sql/Delete.mjs +12 -0
- package/dist/sql/Delete.mjs.map +1 -0
- package/dist/sql/Insert.d.ts +9 -0
- package/dist/sql/Insert.js +40 -0
- package/dist/sql/Insert.js.map +1 -0
- package/dist/sql/Insert.mjs +17 -0
- package/dist/sql/Insert.mjs.map +1 -0
- package/dist/sql/Join.d.ts +12 -0
- package/dist/sql/Join.js +46 -0
- package/dist/sql/Join.js.map +1 -0
- package/dist/sql/Join.mjs +23 -0
- package/dist/sql/Join.mjs.map +1 -0
- package/dist/sql/Select.d.ts +21 -0
- package/dist/sql/Select.js +68 -0
- package/dist/sql/Select.js.map +1 -0
- package/dist/sql/Select.mjs +45 -0
- package/dist/sql/Select.mjs.map +1 -0
- package/dist/sql/SqlQuery.d.ts +8 -0
- package/dist/sql/SqlQuery.js +39 -0
- package/dist/sql/SqlQuery.js.map +1 -0
- package/dist/sql/SqlQuery.mjs +16 -0
- package/dist/sql/SqlQuery.mjs.map +1 -0
- package/dist/sql/Table.d.ts +34 -0
- package/dist/sql/Table.js +63 -0
- package/dist/sql/Table.js.map +1 -0
- package/dist/sql/Table.mjs +40 -0
- package/dist/sql/Table.mjs.map +1 -0
- package/dist/sql/TableGateway.d.ts +18 -0
- package/dist/sql/TableGateway.js +62 -0
- package/dist/sql/TableGateway.js.map +1 -0
- package/dist/sql/TableGateway.mjs +39 -0
- package/dist/sql/TableGateway.mjs.map +1 -0
- package/dist/sql/Update.d.ts +9 -0
- package/dist/sql/Update.js +41 -0
- package/dist/sql/Update.js.map +1 -0
- package/dist/sql/Update.mjs +18 -0
- package/dist/sql/Update.mjs.map +1 -0
- package/dist/sql/index.d.ts +10 -0
- package/dist/sql/index.js +41 -0
- package/dist/sql/index.js.map +1 -0
- package/dist/sql/index.mjs +11 -0
- package/dist/sql/index.mjs.map +1 -0
- package/dist/types/Array.d.ts +9 -0
- package/dist/types/Array.js +54 -0
- package/dist/types/Array.js.map +1 -0
- package/dist/types/Array.mjs +29 -0
- package/dist/types/Array.mjs.map +1 -0
- package/dist/types/Builder.d.ts +6 -0
- package/dist/types/Builder.js +43 -0
- package/dist/types/Builder.js.map +1 -0
- package/dist/types/Builder.mjs +19 -0
- package/dist/types/Builder.mjs.map +1 -0
- package/dist/types/Cache.d.ts +12 -0
- package/dist/types/Cache.js +38 -0
- package/dist/types/Cache.js.map +1 -0
- package/dist/types/Cache.mjs +14 -0
- package/dist/types/Cache.mjs.map +1 -0
- package/dist/types/CacheAge.d.ts +5 -0
- package/dist/types/CacheAge.js +64 -0
- package/dist/types/CacheAge.js.map +1 -0
- package/dist/types/CacheAge.mjs +41 -0
- package/dist/types/CacheAge.mjs.map +1 -0
- package/dist/types/Case.d.ts +59 -0
- package/dist/types/Case.js +115 -0
- package/dist/types/Case.js.map +1 -0
- package/dist/types/Case.mjs +92 -0
- package/dist/types/Case.mjs.map +1 -0
- package/dist/types/Constructor.d.ts +15 -0
- package/dist/types/Constructor.js +50 -0
- package/dist/types/Constructor.js.map +1 -0
- package/dist/types/Constructor.mjs +22 -0
- package/dist/types/Constructor.mjs.map +1 -0
- package/dist/types/Context.d.ts +63 -0
- package/dist/types/Context.js +117 -0
- package/dist/types/Context.js.map +1 -0
- package/dist/types/Context.mjs +90 -0
- package/dist/types/Context.mjs.map +1 -0
- package/dist/types/Enum.d.ts +24 -0
- package/dist/types/Enum.js +76 -0
- package/dist/types/Enum.js.map +1 -0
- package/dist/types/Enum.mjs +52 -0
- package/dist/types/Enum.mjs.map +1 -0
- package/dist/types/ErrorOrigin.d.ts +6 -0
- package/dist/types/ErrorOrigin.js +17 -0
- package/dist/types/ErrorOrigin.js.map +1 -0
- package/dist/types/ErrorOrigin.mjs +1 -0
- package/dist/types/ErrorOrigin.mjs.map +1 -0
- package/dist/types/Exception.d.ts +20 -0
- package/dist/types/Exception.js +54 -0
- package/dist/types/Exception.js.map +1 -0
- package/dist/types/Exception.mjs +29 -0
- package/dist/types/Exception.mjs.map +1 -0
- package/dist/types/Falsy.d.ts +4 -0
- package/dist/types/Falsy.js +32 -0
- package/dist/types/Falsy.js.map +1 -0
- package/dist/types/Falsy.mjs +8 -0
- package/dist/types/Falsy.mjs.map +1 -0
- package/dist/types/Func.d.ts +2 -0
- package/dist/types/Func.js +29 -0
- package/dist/types/Func.js.map +1 -0
- package/dist/types/Func.mjs +6 -0
- package/dist/types/Func.mjs.map +1 -0
- package/dist/types/Gateway.d.ts +18 -0
- package/dist/types/Gateway.js +62 -0
- package/dist/types/Gateway.js.map +1 -0
- package/dist/types/Gateway.mjs +39 -0
- package/dist/types/Gateway.mjs.map +1 -0
- package/dist/types/Get.d.ts +7 -0
- package/dist/types/Get.js +36 -0
- package/dist/types/Get.js.map +1 -0
- package/dist/types/Get.mjs +11 -0
- package/dist/types/Get.mjs.map +1 -0
- package/dist/types/Id.d.ts +7 -0
- package/dist/types/Id.js +30 -0
- package/dist/types/Id.js.map +1 -0
- package/dist/types/Id.mjs +7 -0
- package/dist/types/Id.mjs.map +1 -0
- package/dist/types/Identity.d.ts +5 -0
- package/dist/types/Identity.js +17 -0
- package/dist/types/Identity.js.map +1 -0
- package/dist/types/Identity.mjs +1 -0
- package/dist/types/Identity.mjs.map +1 -0
- package/dist/types/Is.d.ts +20 -0
- package/dist/types/Is.js +85 -0
- package/dist/types/Is.js.map +1 -0
- package/dist/types/Is.mjs +44 -0
- package/dist/types/Is.mjs.map +1 -0
- package/dist/types/IsA.d.ts +2 -0
- package/dist/types/IsA.js +33 -0
- package/dist/types/IsA.js.map +1 -0
- package/dist/types/IsA.mjs +9 -0
- package/dist/types/IsA.mjs.map +1 -0
- package/dist/types/IsDate.d.ts +9 -0
- package/dist/types/IsDate.js +46 -0
- package/dist/types/IsDate.js.map +1 -0
- package/dist/types/IsDate.mjs +20 -0
- package/dist/types/IsDate.mjs.map +1 -0
- package/dist/types/IsEqual.d.ts +1 -0
- package/dist/types/IsEqual.js +39 -0
- package/dist/types/IsEqual.js.map +1 -0
- package/dist/types/IsEqual.mjs +16 -0
- package/dist/types/IsEqual.mjs.map +1 -0
- package/dist/types/Json.d.ts +30 -0
- package/dist/types/Json.js +67 -0
- package/dist/types/Json.js.map +1 -0
- package/dist/types/Json.mjs +40 -0
- package/dist/types/Json.mjs.map +1 -0
- package/dist/types/List.d.ts +52 -0
- package/dist/types/List.js +180 -0
- package/dist/types/List.js.map +1 -0
- package/dist/types/List.mjs +154 -0
- package/dist/types/List.mjs.map +1 -0
- package/dist/types/Message.d.ts +3 -0
- package/dist/types/Message.js +30 -0
- package/dist/types/Message.js.map +1 -0
- package/dist/types/Message.mjs +7 -0
- package/dist/types/Message.mjs.map +1 -0
- package/dist/types/Meta.d.ts +33 -0
- package/dist/types/Meta.js +71 -0
- package/dist/types/Meta.js.map +1 -0
- package/dist/types/Meta.mjs +47 -0
- package/dist/types/Meta.mjs.map +1 -0
- package/dist/types/Nullish.d.ts +2 -0
- package/dist/types/Nullish.js +29 -0
- package/dist/types/Nullish.js.map +1 -0
- package/dist/types/Nullish.mjs +6 -0
- package/dist/types/Nullish.mjs.map +1 -0
- package/dist/types/Number.d.ts +2 -0
- package/dist/types/Number.js +33 -0
- package/dist/types/Number.js.map +1 -0
- package/dist/types/Number.mjs +10 -0
- package/dist/types/Number.mjs.map +1 -0
- package/dist/types/PageList.d.ts +68 -0
- package/dist/types/PageList.js +156 -0
- package/dist/types/PageList.js.map +1 -0
- package/dist/types/PageList.mjs +128 -0
- package/dist/types/PageList.mjs.map +1 -0
- package/dist/types/Primitive.d.ts +2 -0
- package/dist/types/Primitive.js +32 -0
- package/dist/types/Primitive.js.map +1 -0
- package/dist/types/Primitive.mjs +9 -0
- package/dist/types/Primitive.mjs.map +1 -0
- package/dist/types/Repository.d.ts +15 -0
- package/dist/types/Repository.js +68 -0
- package/dist/types/Repository.js.map +1 -0
- package/dist/types/Repository.mjs +45 -0
- package/dist/types/Repository.mjs.map +1 -0
- package/dist/types/Result.d.ts +9 -0
- package/dist/types/Result.js +38 -0
- package/dist/types/Result.js.map +1 -0
- package/dist/types/Result.mjs +14 -0
- package/dist/types/Result.mjs.map +1 -0
- package/dist/types/Results.d.ts +12 -0
- package/dist/types/Results.js +51 -0
- package/dist/types/Results.js.map +1 -0
- package/dist/types/Results.mjs +26 -0
- package/dist/types/Results.mjs.map +1 -0
- package/dist/types/Sort.d.ts +8 -0
- package/dist/types/Sort.js +32 -0
- package/dist/types/Sort.js.map +1 -0
- package/dist/types/Sort.mjs +8 -0
- package/dist/types/Sort.mjs.map +1 -0
- package/dist/types/Tag.d.ts +2 -0
- package/dist/types/Tag.js +35 -0
- package/dist/types/Tag.js.map +1 -0
- package/dist/types/Tag.mjs +11 -0
- package/dist/types/Tag.mjs.map +1 -0
- package/dist/types/Template.d.ts +7 -0
- package/dist/types/Template.js +62 -0
- package/dist/types/Template.js.map +1 -0
- package/dist/types/Template.mjs +39 -0
- package/dist/types/Template.mjs.map +1 -0
- package/dist/types/Text.d.ts +45 -0
- package/dist/types/Text.js +127 -0
- package/dist/types/Text.js.map +1 -0
- package/dist/types/Text.mjs +99 -0
- package/dist/types/Text.mjs.map +1 -0
- package/dist/types/Try.d.ts +44 -0
- package/dist/types/Try.js +137 -0
- package/dist/types/Try.js.map +1 -0
- package/dist/types/Try.mjs +113 -0
- package/dist/types/Try.mjs.map +1 -0
- package/dist/types/TypeGuard.d.ts +1 -0
- package/dist/types/TypeGuard.js +17 -0
- package/dist/types/TypeGuard.js.map +1 -0
- package/dist/types/TypeGuard.mjs +1 -0
- package/dist/types/TypeGuard.mjs.map +1 -0
- package/dist/types/Types.d.ts +5 -0
- package/dist/types/Types.js +17 -0
- package/dist/types/Types.js.map +1 -0
- package/dist/types/Types.mjs +1 -0
- package/dist/types/Types.mjs.map +1 -0
- package/dist/types/Uri.d.ts +69 -0
- package/dist/types/Uri.js +104 -0
- package/dist/types/Uri.js.map +1 -0
- package/dist/types/Uri.mjs +79 -0
- package/dist/types/Uri.mjs.map +1 -0
- package/dist/types/Uuid.d.ts +3 -0
- package/dist/types/Uuid.js +35 -0
- package/dist/types/Uuid.js.map +1 -0
- package/dist/types/Uuid.mjs +11 -0
- package/dist/types/Uuid.mjs.map +1 -0
- package/dist/types/Validatable.d.ts +5 -0
- package/dist/types/Validatable.js +30 -0
- package/dist/types/Validatable.js.map +1 -0
- package/dist/types/Validatable.mjs +7 -0
- package/dist/types/Validatable.mjs.map +1 -0
- package/dist/types/Value.d.ts +9 -0
- package/dist/types/Value.js +47 -0
- package/dist/types/Value.js.map +1 -0
- package/dist/types/Value.mjs +23 -0
- package/dist/types/Value.mjs.map +1 -0
- package/dist/types/index.d.ts +42 -0
- package/dist/types/index.js +105 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +43 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/utils/Convert.d.ts +19 -0
- package/dist/utils/Convert.js +69 -0
- package/dist/utils/Convert.js.map +1 -0
- package/dist/utils/Convert.mjs +45 -0
- package/dist/utils/Convert.mjs.map +1 -0
- package/dist/utils/If.d.ts +10 -0
- package/dist/utils/If.js +47 -0
- package/dist/utils/If.js.map +1 -0
- package/dist/utils/If.mjs +21 -0
- package/dist/utils/If.mjs.map +1 -0
- package/dist/utils/Loading.d.ts +1 -0
- package/dist/utils/Loading.js +30 -0
- package/dist/utils/Loading.js.map +1 -0
- package/dist/utils/Loading.mjs +7 -0
- package/dist/utils/Loading.mjs.map +1 -0
- package/dist/utils/Log.d.ts +2 -0
- package/dist/utils/Log.js +37 -0
- package/dist/utils/Log.js.map +1 -0
- package/dist/utils/Log.mjs +14 -0
- package/dist/utils/Log.mjs.map +1 -0
- package/dist/utils/Mapper.d.ts +48 -0
- package/dist/utils/Mapper.js +133 -0
- package/dist/utils/Mapper.js.map +1 -0
- package/dist/utils/Mapper.mjs +108 -0
- package/dist/utils/Mapper.mjs.map +1 -0
- package/dist/utils/Promise.d.ts +18 -0
- package/dist/utils/Promise.js +55 -0
- package/dist/utils/Promise.js.map +1 -0
- package/dist/utils/Promise.mjs +26 -0
- package/dist/utils/Promise.mjs.map +1 -0
- package/dist/utils/Property.d.ts +16 -0
- package/dist/utils/Property.js +42 -0
- package/dist/utils/Property.js.map +1 -0
- package/dist/utils/Property.mjs +19 -0
- package/dist/utils/Property.mjs.map +1 -0
- package/dist/utils/Sentence.d.ts +48 -0
- package/dist/utils/Sentence.js +80 -0
- package/dist/utils/Sentence.js.map +1 -0
- package/dist/utils/Sentence.mjs +56 -0
- package/dist/utils/Sentence.mjs.map +1 -0
- package/dist/utils/State.d.ts +7 -0
- package/dist/utils/State.js +36 -0
- package/dist/utils/State.js.map +1 -0
- package/dist/utils/State.mjs +13 -0
- package/dist/utils/State.mjs.map +1 -0
- package/dist/utils/Traverse.d.ts +1 -0
- package/dist/utils/Traverse.js +33 -0
- package/dist/utils/Traverse.js.map +1 -0
- package/dist/utils/Traverse.mjs +10 -0
- package/dist/utils/Traverse.mjs.map +1 -0
- package/dist/utils/View.d.ts +36 -0
- package/dist/utils/View.js +86 -0
- package/dist/utils/View.js.map +1 -0
- package/dist/utils/View.mjs +73 -0
- package/dist/utils/View.mjs.map +1 -0
- package/dist/utils/Wait.d.ts +5 -0
- package/dist/utils/Wait.js +39 -0
- package/dist/utils/Wait.js.map +1 -0
- package/dist/utils/Wait.mjs +15 -0
- package/dist/utils/Wait.mjs.map +1 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.js +45 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +13 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/validation/Contraints.d.ts +19 -0
- package/dist/validation/Contraints.js +88 -0
- package/dist/validation/Contraints.js.map +1 -0
- package/dist/validation/Contraints.mjs +49 -0
- package/dist/validation/Contraints.mjs.map +1 -0
- package/dist/validation/Validate.d.ts +11 -0
- package/dist/validation/Validate.js +43 -0
- package/dist/validation/Validate.js.map +1 -0
- package/dist/validation/Validate.mjs +34 -0
- package/dist/validation/Validate.mjs.map +1 -0
- package/dist/validation/When.d.ts +22 -0
- package/dist/validation/When.js +68 -0
- package/dist/validation/When.js.map +1 -0
- package/dist/validation/When.mjs +44 -0
- package/dist/validation/When.mjs.map +1 -0
- package/dist/validation/index.d.ts +3 -0
- package/dist/validation/index.js +27 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/index.mjs +4 -0
- package/dist/validation/index.mjs.map +1 -0
- package/package.json +4 -4
- package/src/process/Manage.ts +15 -4
- package/src/process/Search.ts +24 -9
- package/src/utils/If.ts +1 -0
- package/dist/index.d.mts +0 -2821
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var ContentType_exports = {};
|
|
30
|
+
__export(ContentType_exports, {
|
|
31
|
+
ContentType: () => ContentType
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(ContentType_exports);
|
|
34
|
+
var import_types = require("../types");
|
|
35
|
+
var import_form_urlencoded = __toESM(require("form-urlencoded"));
|
|
36
|
+
class ContentType extends import_types.Enum {
|
|
37
|
+
constructor(name, type, encoder = (b) => (0, import_types.asString)(b)) {
|
|
38
|
+
super(name, type);
|
|
39
|
+
this.type = type;
|
|
40
|
+
this.encoder = encoder;
|
|
41
|
+
}
|
|
42
|
+
static Form = new ContentType("form", "application/x-www-form-urlencoded", (b) => (0, import_form_urlencoded.default)(b));
|
|
43
|
+
static Json = new ContentType("json", "application/json", (b) => b);
|
|
44
|
+
static Stream = new ContentType("stream", "application/octet-stream");
|
|
45
|
+
static Text = new ContentType("text", "text/plain");
|
|
46
|
+
static Xml = new ContentType("xml", "application/xml");
|
|
47
|
+
encode = (body) => (0, import_types.ofGet)(this.encoder, body);
|
|
48
|
+
}
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
ContentType
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=ContentType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/ContentType.ts"],"sourcesContent":["import { asString, Enum, Get, ofGet } from '../types';\nimport formUrlEncoded from 'form-urlencoded';\n\nexport class ContentType extends Enum {\n static Form = new ContentType('form', 'application/x-www-form-urlencoded', b => formUrlEncoded(b));\n static Json = new ContentType('json', 'application/json', b => b);\n static Stream = new ContentType('stream', 'application/octet-stream');\n static Text = new ContentType('text', 'text/plain');\n static Xml = new ContentType('xml', 'application/xml');\n\n private constructor(name: string, readonly type: string, protected readonly encoder: Get<string> = b => asString(b)) {\n super(name, type);\n }\n\n encode = (body?: unknown): string => ofGet(this.encoder, body);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2C;AAC3C,6BAA2B;AAEpB,MAAM,oBAAoB,kBAAK;AAAA,EAO5B,YAAY,MAAuB,MAAiC,UAAuB,WAAK,uBAAS,CAAC,GAAG;AACnH,UAAM,MAAM,IAAI;AADyB;AAAiC;AAAA,EAE5E;AAAA,EARA,OAAO,OAAO,IAAI,YAAY,QAAQ,qCAAqC,WAAK,uBAAAA,SAAe,CAAC,CAAC;AAAA,EACjG,OAAO,OAAO,IAAI,YAAY,QAAQ,oBAAoB,OAAK,CAAC;AAAA,EAChE,OAAO,SAAS,IAAI,YAAY,UAAU,0BAA0B;AAAA,EACpE,OAAO,OAAO,IAAI,YAAY,QAAQ,YAAY;AAAA,EAClD,OAAO,MAAM,IAAI,YAAY,OAAO,iBAAiB;AAAA,EAMrD,SAAS,CAAC,aAA2B,oBAAM,KAAK,SAAS,IAAI;AAC/D;","names":["formUrlEncoded"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "../chunk-4N72FQFX.mjs";
|
|
2
|
+
import { asString, Enum, ofGet } from "../types";
|
|
3
|
+
import formUrlEncoded from "form-urlencoded";
|
|
4
|
+
class ContentType extends Enum {
|
|
5
|
+
constructor(name, type, encoder = (b) => asString(b)) {
|
|
6
|
+
super(name, type);
|
|
7
|
+
this.type = type;
|
|
8
|
+
this.encoder = encoder;
|
|
9
|
+
}
|
|
10
|
+
static Form = new ContentType("form", "application/x-www-form-urlencoded", (b) => formUrlEncoded(b));
|
|
11
|
+
static Json = new ContentType("json", "application/json", (b) => b);
|
|
12
|
+
static Stream = new ContentType("stream", "application/octet-stream");
|
|
13
|
+
static Text = new ContentType("text", "text/plain");
|
|
14
|
+
static Xml = new ContentType("xml", "application/xml");
|
|
15
|
+
encode = (body) => ofGet(this.encoder, body);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
ContentType
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=ContentType.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/ContentType.ts"],"sourcesContent":["import { asString, Enum, Get, ofGet } from '../types';\nimport formUrlEncoded from 'form-urlencoded';\n\nexport class ContentType extends Enum {\n static Form = new ContentType('form', 'application/x-www-form-urlencoded', b => formUrlEncoded(b));\n static Json = new ContentType('json', 'application/json', b => b);\n static Stream = new ContentType('stream', 'application/octet-stream');\n static Text = new ContentType('text', 'text/plain');\n static Xml = new ContentType('xml', 'application/xml');\n\n private constructor(name: string, readonly type: string, protected readonly encoder: Get<string> = b => asString(b)) {\n super(name, type);\n }\n\n encode = (body?: unknown): string => ofGet(this.encoder, body);\n}\n"],"mappings":";AAAA,SAAS,UAAU,MAAW,aAAa;AAC3C,OAAO,oBAAoB;AAEpB,MAAM,oBAAoB,KAAK;AAAA,EAO5B,YAAY,MAAuB,MAAiC,UAAuB,OAAK,SAAS,CAAC,GAAG;AACnH,UAAM,MAAM,IAAI;AADyB;AAAiC;AAAA,EAE5E;AAAA,EARA,OAAO,OAAO,IAAI,YAAY,QAAQ,qCAAqC,OAAK,eAAe,CAAC,CAAC;AAAA,EACjG,OAAO,OAAO,IAAI,YAAY,QAAQ,oBAAoB,OAAK,CAAC;AAAA,EAChE,OAAO,SAAS,IAAI,YAAY,UAAU,0BAA0B;AAAA,EACpE,OAAO,OAAO,IAAI,YAAY,QAAQ,YAAY;AAAA,EAClD,OAAO,MAAM,IAAI,YAAY,OAAO,iBAAiB;AAAA,EAMrD,SAAS,CAAC,SAA2B,MAAM,KAAK,SAAS,IAAI;AAC/D;","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var HttpHeader_exports = {};
|
|
20
|
+
__export(HttpHeader_exports, {
|
|
21
|
+
HttpHeader: () => HttpHeader
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(HttpHeader_exports);
|
|
24
|
+
const HttpHeader = {
|
|
25
|
+
ContentType: "Content-Type",
|
|
26
|
+
Correlation: "X-Correlation-Id"
|
|
27
|
+
};
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
HttpHeader
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=HttpHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/HttpHeader.ts"],"sourcesContent":["export const HttpHeader = {\n ContentType: 'Content-Type',\n Correlation: 'X-Correlation-Id',\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,aAAa;AACf;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/HttpHeader.ts"],"sourcesContent":["export const HttpHeader = {\n ContentType: 'Content-Type',\n Correlation: 'X-Correlation-Id',\n};\n"],"mappings":";AAAO,MAAM,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,aAAa;AACf;","names":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Code, Enum, TypeGuard } from '../types';
|
|
2
|
+
export declare class HttpStatus extends Enum {
|
|
3
|
+
static Continue: HttpStatus;
|
|
4
|
+
static SwitchingProtocols: HttpStatus;
|
|
5
|
+
static Processing: HttpStatus;
|
|
6
|
+
static EarlyHints: HttpStatus;
|
|
7
|
+
static Ok: HttpStatus;
|
|
8
|
+
static Created: HttpStatus;
|
|
9
|
+
static Accepted: HttpStatus;
|
|
10
|
+
static NonAuthoritativeInformation: HttpStatus;
|
|
11
|
+
static NoContent: HttpStatus;
|
|
12
|
+
static ResetContent: HttpStatus;
|
|
13
|
+
static PartialContent: HttpStatus;
|
|
14
|
+
static MultiStatus: HttpStatus;
|
|
15
|
+
static AlreadyReported: HttpStatus;
|
|
16
|
+
static ImUsed: HttpStatus;
|
|
17
|
+
static MultipleChoices: HttpStatus;
|
|
18
|
+
static MovedPermanently: HttpStatus;
|
|
19
|
+
static Found: HttpStatus;
|
|
20
|
+
static SeeOther: HttpStatus;
|
|
21
|
+
static NotModified: HttpStatus;
|
|
22
|
+
static UseProxy: HttpStatus;
|
|
23
|
+
static SwitchProxy: HttpStatus;
|
|
24
|
+
static TemporaryRedirect: HttpStatus;
|
|
25
|
+
static PermanentRedirect: HttpStatus;
|
|
26
|
+
static BadRequest: HttpStatus;
|
|
27
|
+
static NotAuthorized: HttpStatus;
|
|
28
|
+
static PaymentRequired: HttpStatus;
|
|
29
|
+
static Forbidden: HttpStatus;
|
|
30
|
+
static NotFound: HttpStatus;
|
|
31
|
+
static MethodNotAllowed: HttpStatus;
|
|
32
|
+
static NotAcceptable: HttpStatus;
|
|
33
|
+
static ProxyAuthenticationRequired: HttpStatus;
|
|
34
|
+
static RequestTimeout: HttpStatus;
|
|
35
|
+
static Conflict: HttpStatus;
|
|
36
|
+
static Gone: HttpStatus;
|
|
37
|
+
static LengthRequired: HttpStatus;
|
|
38
|
+
static PreconditionFailed: HttpStatus;
|
|
39
|
+
static PayloadTooLarge: HttpStatus;
|
|
40
|
+
static UriTooLong: HttpStatus;
|
|
41
|
+
static UnsupportedMediaType: HttpStatus;
|
|
42
|
+
static RangeNotSatisfiable: HttpStatus;
|
|
43
|
+
static ExpectationFailed: HttpStatus;
|
|
44
|
+
static ImATeapot: HttpStatus;
|
|
45
|
+
static MisdirectedRequest: HttpStatus;
|
|
46
|
+
static UnprocessableEntity: HttpStatus;
|
|
47
|
+
static Locked: HttpStatus;
|
|
48
|
+
static FailedDependency: HttpStatus;
|
|
49
|
+
static TooEarly: HttpStatus;
|
|
50
|
+
static UpgradeRequired: HttpStatus;
|
|
51
|
+
static PreconditionRequired: HttpStatus;
|
|
52
|
+
static TooManyRequests: HttpStatus;
|
|
53
|
+
static RequestHeaderFieldsTooLarge: HttpStatus;
|
|
54
|
+
static UnavailableForLegalReasons: HttpStatus;
|
|
55
|
+
static InternalServerError: HttpStatus;
|
|
56
|
+
static NotImplemented: HttpStatus;
|
|
57
|
+
static BadGateway: HttpStatus;
|
|
58
|
+
static ServiceUnavailable: HttpStatus;
|
|
59
|
+
static GatewayTimeout: HttpStatus;
|
|
60
|
+
static HTTPVersionNotSupported: HttpStatus;
|
|
61
|
+
static VariantAlsoNegotiates: HttpStatus;
|
|
62
|
+
static InsufficientStorage: HttpStatus;
|
|
63
|
+
static LoopDetected: HttpStatus;
|
|
64
|
+
static NotExtended: HttpStatus;
|
|
65
|
+
static NetworkAuthenticationRequired: HttpStatus;
|
|
66
|
+
get isError(): boolean;
|
|
67
|
+
get isClientError(): boolean;
|
|
68
|
+
get isServerError(): boolean;
|
|
69
|
+
get status(): number;
|
|
70
|
+
}
|
|
71
|
+
export declare const isHttpStatus: TypeGuard<HttpStatus>;
|
|
72
|
+
export declare const toHttpStatus: (s: HttpStatus | Code) => HttpStatus;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var HttpStatus_exports = {};
|
|
20
|
+
__export(HttpStatus_exports, {
|
|
21
|
+
HttpStatus: () => HttpStatus,
|
|
22
|
+
isHttpStatus: () => isHttpStatus,
|
|
23
|
+
toHttpStatus: () => toHttpStatus
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(HttpStatus_exports);
|
|
26
|
+
var import_types = require("../types");
|
|
27
|
+
class HttpStatus extends import_types.Enum {
|
|
28
|
+
static Continue = new HttpStatus("Continue", 100);
|
|
29
|
+
static SwitchingProtocols = new HttpStatus("Switching protocols", 101);
|
|
30
|
+
static Processing = new HttpStatus("Processing", 102);
|
|
31
|
+
static EarlyHints = new HttpStatus("Early hints", 103);
|
|
32
|
+
static Ok = new HttpStatus("Ok", 200);
|
|
33
|
+
static Created = new HttpStatus("Created", 201);
|
|
34
|
+
static Accepted = new HttpStatus("Accepted", 202);
|
|
35
|
+
static NonAuthoritativeInformation = new HttpStatus("Non-authoritative information", 203);
|
|
36
|
+
static NoContent = new HttpStatus("No content", 204);
|
|
37
|
+
static ResetContent = new HttpStatus("Reset content", 205);
|
|
38
|
+
static PartialContent = new HttpStatus("Partial content", 206);
|
|
39
|
+
static MultiStatus = new HttpStatus("Multi-status", 207);
|
|
40
|
+
static AlreadyReported = new HttpStatus("Already reported", 208);
|
|
41
|
+
static ImUsed = new HttpStatus("IM used", 226);
|
|
42
|
+
static MultipleChoices = new HttpStatus("Multiple Choices", 300);
|
|
43
|
+
static MovedPermanently = new HttpStatus("Moved Permanently", 301);
|
|
44
|
+
static Found = new HttpStatus("Found", 302);
|
|
45
|
+
static SeeOther = new HttpStatus("See other", 303);
|
|
46
|
+
static NotModified = new HttpStatus("Not modified", 304);
|
|
47
|
+
static UseProxy = new HttpStatus("Use proxy", 305);
|
|
48
|
+
static SwitchProxy = new HttpStatus("Switch proxy", 306);
|
|
49
|
+
static TemporaryRedirect = new HttpStatus("Temporary redirect", 307);
|
|
50
|
+
static PermanentRedirect = new HttpStatus("Permanent redirect", 308);
|
|
51
|
+
static BadRequest = new HttpStatus("Bad request", 400);
|
|
52
|
+
static NotAuthorized = new HttpStatus("Not authorized", 401);
|
|
53
|
+
static PaymentRequired = new HttpStatus("Payment required", 402);
|
|
54
|
+
static Forbidden = new HttpStatus("Forbidden", 403);
|
|
55
|
+
static NotFound = new HttpStatus("Not found", 404);
|
|
56
|
+
static MethodNotAllowed = new HttpStatus("Method not allowed", 405);
|
|
57
|
+
static NotAcceptable = new HttpStatus("Not acceptable", 406);
|
|
58
|
+
static ProxyAuthenticationRequired = new HttpStatus("Proxy authentication required", 407);
|
|
59
|
+
static RequestTimeout = new HttpStatus("Request timeout", 408);
|
|
60
|
+
static Conflict = new HttpStatus("Conflict", 409);
|
|
61
|
+
static Gone = new HttpStatus("Gone", 410);
|
|
62
|
+
static LengthRequired = new HttpStatus("Length required", 411);
|
|
63
|
+
static PreconditionFailed = new HttpStatus("Precondition failed", 412);
|
|
64
|
+
static PayloadTooLarge = new HttpStatus("Payload too large", 413);
|
|
65
|
+
static UriTooLong = new HttpStatus("URI too long", 414);
|
|
66
|
+
static UnsupportedMediaType = new HttpStatus("Unsupported media type", 415);
|
|
67
|
+
static RangeNotSatisfiable = new HttpStatus("Range not satisfiable", 416);
|
|
68
|
+
static ExpectationFailed = new HttpStatus("Expectation failed", 417);
|
|
69
|
+
static ImATeapot = new HttpStatus("I'm a teapot", 418);
|
|
70
|
+
static MisdirectedRequest = new HttpStatus("Misdirected request", 421);
|
|
71
|
+
static UnprocessableEntity = new HttpStatus("Unprocessable entity", 422);
|
|
72
|
+
static Locked = new HttpStatus("Locked", 423);
|
|
73
|
+
static FailedDependency = new HttpStatus("Failed dependency", 424);
|
|
74
|
+
static TooEarly = new HttpStatus("Too early", 425);
|
|
75
|
+
static UpgradeRequired = new HttpStatus("Upgrade required", 426);
|
|
76
|
+
static PreconditionRequired = new HttpStatus("Precondition required", 428);
|
|
77
|
+
static TooManyRequests = new HttpStatus("Too many requests", 429);
|
|
78
|
+
static RequestHeaderFieldsTooLarge = new HttpStatus("Request header fields too large", 431);
|
|
79
|
+
static UnavailableForLegalReasons = new HttpStatus("Unavailable for legal reasons", 451);
|
|
80
|
+
static InternalServerError = new HttpStatus("Internal server error", 500);
|
|
81
|
+
static NotImplemented = new HttpStatus("Not implemented", 501);
|
|
82
|
+
static BadGateway = new HttpStatus("Bad gateway", 502);
|
|
83
|
+
static ServiceUnavailable = new HttpStatus("Service unavailable", 503);
|
|
84
|
+
static GatewayTimeout = new HttpStatus("Gateway timeout", 504);
|
|
85
|
+
static HTTPVersionNotSupported = new HttpStatus("Http version not supported", 505);
|
|
86
|
+
static VariantAlsoNegotiates = new HttpStatus("Variant also negotiates", 506);
|
|
87
|
+
static InsufficientStorage = new HttpStatus("Insufficient storage", 507);
|
|
88
|
+
static LoopDetected = new HttpStatus("Loop detected", 508);
|
|
89
|
+
static NotExtended = new HttpStatus("Not extended", 510);
|
|
90
|
+
static NetworkAuthenticationRequired = new HttpStatus("Network authentication required", 511);
|
|
91
|
+
get isError() {
|
|
92
|
+
return this.isClientError || this.isServerError;
|
|
93
|
+
}
|
|
94
|
+
get isClientError() {
|
|
95
|
+
return this.id >= 400 && this.id < 500;
|
|
96
|
+
}
|
|
97
|
+
get isServerError() {
|
|
98
|
+
return this.id >= 500 && this.id < 600;
|
|
99
|
+
}
|
|
100
|
+
get status() {
|
|
101
|
+
return this.id;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const isHttpStatus = (s) => (0, import_types.isAn)(s, "id", "status");
|
|
105
|
+
const toHttpStatus = (s) => isHttpStatus(s) ? s : HttpStatus.byId(s);
|
|
106
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
107
|
+
0 && (module.exports = {
|
|
108
|
+
HttpStatus,
|
|
109
|
+
isHttpStatus,
|
|
110
|
+
toHttpStatus
|
|
111
|
+
});
|
|
112
|
+
//# sourceMappingURL=HttpStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/HttpStatus.ts"],"sourcesContent":["import { Code, Enum, isAn, TypeGuard } from '../types';\n\nexport class HttpStatus extends Enum {\n static Continue = new HttpStatus('Continue', 100);\n static SwitchingProtocols = new HttpStatus('Switching protocols', 101);\n static Processing = new HttpStatus('Processing', 102);\n static EarlyHints = new HttpStatus('Early hints', 103);\n static Ok = new HttpStatus('Ok', 200);\n static Created = new HttpStatus('Created', 201);\n static Accepted = new HttpStatus('Accepted', 202);\n static NonAuthoritativeInformation = new HttpStatus('Non-authoritative information', 203);\n static NoContent = new HttpStatus('No content', 204);\n static ResetContent = new HttpStatus('Reset content', 205);\n static PartialContent = new HttpStatus('Partial content', 206);\n static MultiStatus = new HttpStatus('Multi-status', 207);\n static AlreadyReported = new HttpStatus('Already reported', 208);\n static ImUsed = new HttpStatus('IM used', 226);\n static MultipleChoices = new HttpStatus('Multiple Choices', 300);\n static MovedPermanently = new HttpStatus('Moved Permanently', 301);\n static Found = new HttpStatus('Found', 302);\n static SeeOther = new HttpStatus('See other', 303);\n static NotModified = new HttpStatus('Not modified', 304);\n static UseProxy = new HttpStatus('Use proxy', 305);\n static SwitchProxy = new HttpStatus('Switch proxy', 306);\n static TemporaryRedirect = new HttpStatus('Temporary redirect', 307);\n static PermanentRedirect = new HttpStatus('Permanent redirect', 308);\n static BadRequest = new HttpStatus('Bad request', 400);\n static NotAuthorized = new HttpStatus('Not authorized', 401);\n static PaymentRequired = new HttpStatus('Payment required', 402);\n static Forbidden = new HttpStatus('Forbidden', 403);\n static NotFound = new HttpStatus('Not found', 404);\n static MethodNotAllowed = new HttpStatus('Method not allowed', 405);\n static NotAcceptable = new HttpStatus('Not acceptable', 406);\n static ProxyAuthenticationRequired = new HttpStatus('Proxy authentication required', 407);\n static RequestTimeout = new HttpStatus('Request timeout', 408);\n static Conflict = new HttpStatus('Conflict', 409);\n static Gone = new HttpStatus('Gone', 410);\n static LengthRequired = new HttpStatus('Length required', 411);\n static PreconditionFailed = new HttpStatus('Precondition failed', 412);\n static PayloadTooLarge = new HttpStatus('Payload too large', 413);\n static UriTooLong = new HttpStatus('URI too long', 414);\n static UnsupportedMediaType = new HttpStatus('Unsupported media type', 415);\n static RangeNotSatisfiable = new HttpStatus('Range not satisfiable', 416);\n static ExpectationFailed = new HttpStatus('Expectation failed', 417);\n static ImATeapot = new HttpStatus(\"I'm a teapot\", 418);\n static MisdirectedRequest = new HttpStatus('Misdirected request', 421);\n static UnprocessableEntity = new HttpStatus('Unprocessable entity', 422);\n static Locked = new HttpStatus('Locked', 423);\n static FailedDependency = new HttpStatus('Failed dependency', 424);\n static TooEarly = new HttpStatus('Too early', 425);\n static UpgradeRequired = new HttpStatus('Upgrade required', 426);\n static PreconditionRequired = new HttpStatus('Precondition required', 428);\n static TooManyRequests = new HttpStatus('Too many requests', 429);\n static RequestHeaderFieldsTooLarge = new HttpStatus('Request header fields too large', 431);\n static UnavailableForLegalReasons = new HttpStatus('Unavailable for legal reasons', 451);\n static InternalServerError = new HttpStatus('Internal server error', 500);\n static NotImplemented = new HttpStatus('Not implemented', 501);\n static BadGateway = new HttpStatus('Bad gateway', 502);\n static ServiceUnavailable = new HttpStatus('Service unavailable', 503);\n static GatewayTimeout = new HttpStatus('Gateway timeout', 504);\n static HTTPVersionNotSupported = new HttpStatus('Http version not supported', 505);\n static VariantAlsoNegotiates = new HttpStatus('Variant also negotiates', 506);\n static InsufficientStorage = new HttpStatus('Insufficient storage', 507);\n static LoopDetected = new HttpStatus('Loop detected', 508);\n static NotExtended = new HttpStatus('Not extended', 510);\n static NetworkAuthenticationRequired = new HttpStatus('Network authentication required', 511);\n\n get isError(): boolean {\n return this.isClientError || this.isServerError;\n }\n\n get isClientError(): boolean {\n return (this.id as number) >= 400 && (this.id as number) < 500;\n }\n\n get isServerError(): boolean {\n return (this.id as number) >= 500 && (this.id as number) < 600;\n }\n\n get status(): number {\n return this.id as number;\n }\n}\n\nexport const isHttpStatus: TypeGuard<HttpStatus> = (s?: unknown): s is HttpStatus => isAn<HttpStatus>(s, 'id', 'status');\n\nexport const toHttpStatus = (s: HttpStatus | Code): HttpStatus => (isHttpStatus(s) ? s : HttpStatus.byId(s));\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import "../chunk-4N72FQFX.mjs";
|
|
2
|
+
import { Enum, isAn } from "../types";
|
|
3
|
+
class HttpStatus extends Enum {
|
|
4
|
+
static Continue = new HttpStatus("Continue", 100);
|
|
5
|
+
static SwitchingProtocols = new HttpStatus("Switching protocols", 101);
|
|
6
|
+
static Processing = new HttpStatus("Processing", 102);
|
|
7
|
+
static EarlyHints = new HttpStatus("Early hints", 103);
|
|
8
|
+
static Ok = new HttpStatus("Ok", 200);
|
|
9
|
+
static Created = new HttpStatus("Created", 201);
|
|
10
|
+
static Accepted = new HttpStatus("Accepted", 202);
|
|
11
|
+
static NonAuthoritativeInformation = new HttpStatus("Non-authoritative information", 203);
|
|
12
|
+
static NoContent = new HttpStatus("No content", 204);
|
|
13
|
+
static ResetContent = new HttpStatus("Reset content", 205);
|
|
14
|
+
static PartialContent = new HttpStatus("Partial content", 206);
|
|
15
|
+
static MultiStatus = new HttpStatus("Multi-status", 207);
|
|
16
|
+
static AlreadyReported = new HttpStatus("Already reported", 208);
|
|
17
|
+
static ImUsed = new HttpStatus("IM used", 226);
|
|
18
|
+
static MultipleChoices = new HttpStatus("Multiple Choices", 300);
|
|
19
|
+
static MovedPermanently = new HttpStatus("Moved Permanently", 301);
|
|
20
|
+
static Found = new HttpStatus("Found", 302);
|
|
21
|
+
static SeeOther = new HttpStatus("See other", 303);
|
|
22
|
+
static NotModified = new HttpStatus("Not modified", 304);
|
|
23
|
+
static UseProxy = new HttpStatus("Use proxy", 305);
|
|
24
|
+
static SwitchProxy = new HttpStatus("Switch proxy", 306);
|
|
25
|
+
static TemporaryRedirect = new HttpStatus("Temporary redirect", 307);
|
|
26
|
+
static PermanentRedirect = new HttpStatus("Permanent redirect", 308);
|
|
27
|
+
static BadRequest = new HttpStatus("Bad request", 400);
|
|
28
|
+
static NotAuthorized = new HttpStatus("Not authorized", 401);
|
|
29
|
+
static PaymentRequired = new HttpStatus("Payment required", 402);
|
|
30
|
+
static Forbidden = new HttpStatus("Forbidden", 403);
|
|
31
|
+
static NotFound = new HttpStatus("Not found", 404);
|
|
32
|
+
static MethodNotAllowed = new HttpStatus("Method not allowed", 405);
|
|
33
|
+
static NotAcceptable = new HttpStatus("Not acceptable", 406);
|
|
34
|
+
static ProxyAuthenticationRequired = new HttpStatus("Proxy authentication required", 407);
|
|
35
|
+
static RequestTimeout = new HttpStatus("Request timeout", 408);
|
|
36
|
+
static Conflict = new HttpStatus("Conflict", 409);
|
|
37
|
+
static Gone = new HttpStatus("Gone", 410);
|
|
38
|
+
static LengthRequired = new HttpStatus("Length required", 411);
|
|
39
|
+
static PreconditionFailed = new HttpStatus("Precondition failed", 412);
|
|
40
|
+
static PayloadTooLarge = new HttpStatus("Payload too large", 413);
|
|
41
|
+
static UriTooLong = new HttpStatus("URI too long", 414);
|
|
42
|
+
static UnsupportedMediaType = new HttpStatus("Unsupported media type", 415);
|
|
43
|
+
static RangeNotSatisfiable = new HttpStatus("Range not satisfiable", 416);
|
|
44
|
+
static ExpectationFailed = new HttpStatus("Expectation failed", 417);
|
|
45
|
+
static ImATeapot = new HttpStatus("I'm a teapot", 418);
|
|
46
|
+
static MisdirectedRequest = new HttpStatus("Misdirected request", 421);
|
|
47
|
+
static UnprocessableEntity = new HttpStatus("Unprocessable entity", 422);
|
|
48
|
+
static Locked = new HttpStatus("Locked", 423);
|
|
49
|
+
static FailedDependency = new HttpStatus("Failed dependency", 424);
|
|
50
|
+
static TooEarly = new HttpStatus("Too early", 425);
|
|
51
|
+
static UpgradeRequired = new HttpStatus("Upgrade required", 426);
|
|
52
|
+
static PreconditionRequired = new HttpStatus("Precondition required", 428);
|
|
53
|
+
static TooManyRequests = new HttpStatus("Too many requests", 429);
|
|
54
|
+
static RequestHeaderFieldsTooLarge = new HttpStatus("Request header fields too large", 431);
|
|
55
|
+
static UnavailableForLegalReasons = new HttpStatus("Unavailable for legal reasons", 451);
|
|
56
|
+
static InternalServerError = new HttpStatus("Internal server error", 500);
|
|
57
|
+
static NotImplemented = new HttpStatus("Not implemented", 501);
|
|
58
|
+
static BadGateway = new HttpStatus("Bad gateway", 502);
|
|
59
|
+
static ServiceUnavailable = new HttpStatus("Service unavailable", 503);
|
|
60
|
+
static GatewayTimeout = new HttpStatus("Gateway timeout", 504);
|
|
61
|
+
static HTTPVersionNotSupported = new HttpStatus("Http version not supported", 505);
|
|
62
|
+
static VariantAlsoNegotiates = new HttpStatus("Variant also negotiates", 506);
|
|
63
|
+
static InsufficientStorage = new HttpStatus("Insufficient storage", 507);
|
|
64
|
+
static LoopDetected = new HttpStatus("Loop detected", 508);
|
|
65
|
+
static NotExtended = new HttpStatus("Not extended", 510);
|
|
66
|
+
static NetworkAuthenticationRequired = new HttpStatus("Network authentication required", 511);
|
|
67
|
+
get isError() {
|
|
68
|
+
return this.isClientError || this.isServerError;
|
|
69
|
+
}
|
|
70
|
+
get isClientError() {
|
|
71
|
+
return this.id >= 400 && this.id < 500;
|
|
72
|
+
}
|
|
73
|
+
get isServerError() {
|
|
74
|
+
return this.id >= 500 && this.id < 600;
|
|
75
|
+
}
|
|
76
|
+
get status() {
|
|
77
|
+
return this.id;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const isHttpStatus = (s) => isAn(s, "id", "status");
|
|
81
|
+
const toHttpStatus = (s) => isHttpStatus(s) ? s : HttpStatus.byId(s);
|
|
82
|
+
export {
|
|
83
|
+
HttpStatus,
|
|
84
|
+
isHttpStatus,
|
|
85
|
+
toHttpStatus
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=HttpStatus.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/HttpStatus.ts"],"sourcesContent":["import { Code, Enum, isAn, TypeGuard } from '../types';\n\nexport class HttpStatus extends Enum {\n static Continue = new HttpStatus('Continue', 100);\n static SwitchingProtocols = new HttpStatus('Switching protocols', 101);\n static Processing = new HttpStatus('Processing', 102);\n static EarlyHints = new HttpStatus('Early hints', 103);\n static Ok = new HttpStatus('Ok', 200);\n static Created = new HttpStatus('Created', 201);\n static Accepted = new HttpStatus('Accepted', 202);\n static NonAuthoritativeInformation = new HttpStatus('Non-authoritative information', 203);\n static NoContent = new HttpStatus('No content', 204);\n static ResetContent = new HttpStatus('Reset content', 205);\n static PartialContent = new HttpStatus('Partial content', 206);\n static MultiStatus = new HttpStatus('Multi-status', 207);\n static AlreadyReported = new HttpStatus('Already reported', 208);\n static ImUsed = new HttpStatus('IM used', 226);\n static MultipleChoices = new HttpStatus('Multiple Choices', 300);\n static MovedPermanently = new HttpStatus('Moved Permanently', 301);\n static Found = new HttpStatus('Found', 302);\n static SeeOther = new HttpStatus('See other', 303);\n static NotModified = new HttpStatus('Not modified', 304);\n static UseProxy = new HttpStatus('Use proxy', 305);\n static SwitchProxy = new HttpStatus('Switch proxy', 306);\n static TemporaryRedirect = new HttpStatus('Temporary redirect', 307);\n static PermanentRedirect = new HttpStatus('Permanent redirect', 308);\n static BadRequest = new HttpStatus('Bad request', 400);\n static NotAuthorized = new HttpStatus('Not authorized', 401);\n static PaymentRequired = new HttpStatus('Payment required', 402);\n static Forbidden = new HttpStatus('Forbidden', 403);\n static NotFound = new HttpStatus('Not found', 404);\n static MethodNotAllowed = new HttpStatus('Method not allowed', 405);\n static NotAcceptable = new HttpStatus('Not acceptable', 406);\n static ProxyAuthenticationRequired = new HttpStatus('Proxy authentication required', 407);\n static RequestTimeout = new HttpStatus('Request timeout', 408);\n static Conflict = new HttpStatus('Conflict', 409);\n static Gone = new HttpStatus('Gone', 410);\n static LengthRequired = new HttpStatus('Length required', 411);\n static PreconditionFailed = new HttpStatus('Precondition failed', 412);\n static PayloadTooLarge = new HttpStatus('Payload too large', 413);\n static UriTooLong = new HttpStatus('URI too long', 414);\n static UnsupportedMediaType = new HttpStatus('Unsupported media type', 415);\n static RangeNotSatisfiable = new HttpStatus('Range not satisfiable', 416);\n static ExpectationFailed = new HttpStatus('Expectation failed', 417);\n static ImATeapot = new HttpStatus(\"I'm a teapot\", 418);\n static MisdirectedRequest = new HttpStatus('Misdirected request', 421);\n static UnprocessableEntity = new HttpStatus('Unprocessable entity', 422);\n static Locked = new HttpStatus('Locked', 423);\n static FailedDependency = new HttpStatus('Failed dependency', 424);\n static TooEarly = new HttpStatus('Too early', 425);\n static UpgradeRequired = new HttpStatus('Upgrade required', 426);\n static PreconditionRequired = new HttpStatus('Precondition required', 428);\n static TooManyRequests = new HttpStatus('Too many requests', 429);\n static RequestHeaderFieldsTooLarge = new HttpStatus('Request header fields too large', 431);\n static UnavailableForLegalReasons = new HttpStatus('Unavailable for legal reasons', 451);\n static InternalServerError = new HttpStatus('Internal server error', 500);\n static NotImplemented = new HttpStatus('Not implemented', 501);\n static BadGateway = new HttpStatus('Bad gateway', 502);\n static ServiceUnavailable = new HttpStatus('Service unavailable', 503);\n static GatewayTimeout = new HttpStatus('Gateway timeout', 504);\n static HTTPVersionNotSupported = new HttpStatus('Http version not supported', 505);\n static VariantAlsoNegotiates = new HttpStatus('Variant also negotiates', 506);\n static InsufficientStorage = new HttpStatus('Insufficient storage', 507);\n static LoopDetected = new HttpStatus('Loop detected', 508);\n static NotExtended = new HttpStatus('Not extended', 510);\n static NetworkAuthenticationRequired = new HttpStatus('Network authentication required', 511);\n\n get isError(): boolean {\n return this.isClientError || this.isServerError;\n }\n\n get isClientError(): boolean {\n return (this.id as number) >= 400 && (this.id as number) < 500;\n }\n\n get isServerError(): boolean {\n return (this.id as number) >= 500 && (this.id as number) < 600;\n }\n\n get status(): number {\n return this.id as number;\n }\n}\n\nexport const isHttpStatus: TypeGuard<HttpStatus> = (s?: unknown): s is HttpStatus => isAn<HttpStatus>(s, 'id', 'status');\n\nexport const toHttpStatus = (s: HttpStatus | Code): HttpStatus => (isHttpStatus(s) ? s : HttpStatus.byId(s));\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var HttpVerb_exports = {};
|
|
20
|
+
__export(HttpVerb_exports, {
|
|
21
|
+
HttpVerb: () => HttpVerb
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(HttpVerb_exports);
|
|
24
|
+
var import_types = require("../types");
|
|
25
|
+
class HttpVerb extends import_types.Enum {
|
|
26
|
+
static Get = new HttpVerb("Get");
|
|
27
|
+
static Put = new HttpVerb("Put");
|
|
28
|
+
static Patch = new HttpVerb("Patch");
|
|
29
|
+
static Post = new HttpVerb("Post");
|
|
30
|
+
static Delete = new HttpVerb("Delete");
|
|
31
|
+
constructor(name) {
|
|
32
|
+
super(name, name.toLowerCase(), name.toUpperCase());
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
HttpVerb
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=HttpVerb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/HttpVerb.ts"],"sourcesContent":["import { Enum } from '../types';\n\nexport class HttpVerb extends Enum {\n static Get = new HttpVerb('Get');\n static Put = new HttpVerb('Put');\n static Patch = new HttpVerb('Patch');\n static Post = new HttpVerb('Post');\n static Delete = new HttpVerb('Delete');\n\n constructor(name: string) {\n super(name, name.toLowerCase(), name.toUpperCase());\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqB;AAEd,MAAM,iBAAiB,kBAAK;AAAA,EACjC,OAAO,MAAM,IAAI,SAAS,KAAK;AAAA,EAC/B,OAAO,MAAM,IAAI,SAAS,KAAK;AAAA,EAC/B,OAAO,QAAQ,IAAI,SAAS,OAAO;AAAA,EACnC,OAAO,OAAO,IAAI,SAAS,MAAM;AAAA,EACjC,OAAO,SAAS,IAAI,SAAS,QAAQ;AAAA,EAErC,YAAY,MAAc;AACxB,UAAM,MAAM,KAAK,YAAY,GAAG,KAAK,YAAY,CAAC;AAAA,EACpD;AACF;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../chunk-4N72FQFX.mjs";
|
|
2
|
+
import { Enum } from "../types";
|
|
3
|
+
class HttpVerb extends Enum {
|
|
4
|
+
static Get = new HttpVerb("Get");
|
|
5
|
+
static Put = new HttpVerb("Put");
|
|
6
|
+
static Patch = new HttpVerb("Patch");
|
|
7
|
+
static Post = new HttpVerb("Post");
|
|
8
|
+
static Delete = new HttpVerb("Delete");
|
|
9
|
+
constructor(name) {
|
|
10
|
+
super(name, name.toLowerCase(), name.toUpperCase());
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
HttpVerb
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=HttpVerb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/HttpVerb.ts"],"sourcesContent":["import { Enum } from '../types';\n\nexport class HttpVerb extends Enum {\n static Get = new HttpVerb('Get');\n static Put = new HttpVerb('Put');\n static Patch = new HttpVerb('Patch');\n static Post = new HttpVerb('Post');\n static Delete = new HttpVerb('Delete');\n\n constructor(name: string) {\n super(name, name.toLowerCase(), name.toUpperCase());\n }\n}\n"],"mappings":";AAAA,SAAS,YAAY;AAEd,MAAM,iBAAiB,KAAK;AAAA,EACjC,OAAO,MAAM,IAAI,SAAS,KAAK;AAAA,EAC/B,OAAO,MAAM,IAAI,SAAS,KAAK;AAAA,EAC/B,OAAO,QAAQ,IAAI,SAAS,OAAO;AAAA,EACnC,OAAO,OAAO,IAAI,SAAS,MAAM;AAAA,EACjC,OAAO,SAAS,IAAI,SAAS,QAAQ;AAAA,EAErC,YAAY,MAAc;AACxB,UAAM,MAAM,KAAK,YAAY,GAAG,KAAK,YAAY,CAAC;AAAA,EACpD;AACF;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Func, Store } from '../types';
|
|
2
|
+
import { Response } from './Response';
|
|
3
|
+
import { Request } from './Request';
|
|
4
|
+
export declare class LocalRequestStore implements Store<Response, Request> {
|
|
5
|
+
key: (_req: Request) => string;
|
|
6
|
+
execute(req: Request, f: Func<Promise<Response>, Request>): Promise<Response>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var LocalRequestStore_exports = {};
|
|
20
|
+
__export(LocalRequestStore_exports, {
|
|
21
|
+
LocalRequestStore: () => LocalRequestStore
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(LocalRequestStore_exports);
|
|
24
|
+
var import_types = require("../types");
|
|
25
|
+
class LocalRequestStore {
|
|
26
|
+
key = (_req) => "";
|
|
27
|
+
execute(req, f) {
|
|
28
|
+
const key = this.key(req);
|
|
29
|
+
return import_types.ctx.request.get(key) ?? import_types.ctx.request.set(key, f(req));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
LocalRequestStore
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=LocalRequestStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/LocalRequestStore.ts"],"sourcesContent":["import { ctx, Func, Store } from '../types';\nimport { Response } from './Response';\nimport { Request } from './Request';\n\nexport class LocalRequestStore implements Store<Response, Request> {\n key = (_req: Request): string => '';\n\n execute(req: Request, f: Func<Promise<Response>, Request>): Promise<Response> {\n const key = this.key(req);\n return ctx.request.get(key) ?? ctx.request.set(key, f(req));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAiC;AAI1B,MAAM,kBAAsD;AAAA,EACjE,MAAM,CAAC,SAA0B;AAAA,EAEjC,QAAQ,KAAc,GAAwD;AAC5E,UAAM,MAAM,KAAK,IAAI,GAAG;AACxB,WAAO,iBAAI,QAAQ,IAAI,GAAG,KAAK,iBAAI,QAAQ,IAAI,KAAK,EAAE,GAAG,CAAC;AAAA,EAC5D;AACF;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../chunk-4N72FQFX.mjs";
|
|
2
|
+
import { ctx } from "../types";
|
|
3
|
+
class LocalRequestStore {
|
|
4
|
+
key = (_req) => "";
|
|
5
|
+
execute(req, f) {
|
|
6
|
+
const key = this.key(req);
|
|
7
|
+
return ctx.request.get(key) ?? ctx.request.set(key, f(req));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
LocalRequestStore
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=LocalRequestStore.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/LocalRequestStore.ts"],"sourcesContent":["import { ctx, Func, Store } from '../types';\nimport { Response } from './Response';\nimport { Request } from './Request';\n\nexport class LocalRequestStore implements Store<Response, Request> {\n key = (_req: Request): string => '';\n\n execute(req: Request, f: Func<Promise<Response>, Request>): Promise<Response> {\n const key = this.key(req);\n return ctx.request.get(key) ?? ctx.request.set(key, f(req));\n }\n}\n"],"mappings":";AAAA,SAAS,WAAwB;AAI1B,MAAM,kBAAsD;AAAA,EACjE,MAAM,CAAC,SAA0B;AAAA,EAEjC,QAAQ,KAAc,GAAwD;AAC5E,UAAM,MAAM,KAAK,IAAI,GAAG;AACxB,WAAO,IAAI,QAAQ,IAAI,GAAG,KAAK,IAAI,QAAQ,IAAI,KAAK,EAAE,GAAG,CAAC;AAAA,EAC5D;AACF;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ErrorOrigin } from '../types';
|
|
2
|
+
import { VerbOptions } from './Verb';
|
|
3
|
+
export declare class OriginatedError extends Error {
|
|
4
|
+
readonly origin: ErrorOrigin;
|
|
5
|
+
readonly options?: VerbOptions | undefined;
|
|
6
|
+
constructor(origin: ErrorOrigin, options?: VerbOptions | undefined);
|
|
7
|
+
}
|
|
8
|
+
export declare const isOriginatedError: (e?: unknown) => e is OriginatedError;
|
|
9
|
+
export declare const toOriginatedError: (e: unknown, options?: VerbOptions) => OriginatedError;
|