@tahminator/sapling 2.0.4 → 2.0.5-beta.18e683d9

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import e, { ErrorRequestHandler, NextFunction, Request, Response, Router } from "express";
1
+ import e, { ErrorRequestHandler, NextFunction, Request, RequestHandler, Response as Response$1, Router } from "express";
2
2
 
3
3
  //#region src/html/404.d.ts
4
4
  /**
@@ -26,7 +26,7 @@ type RouteDefinition = {
26
26
  };
27
27
  type Class<T> = new (...args: any[]) => T;
28
28
  type HttpHeaders = Record<string, string>;
29
- type ExpressMiddlewareFn = ($1: Request, $2: Response, $3: NextFunction) => void;
29
+ type ExpressMiddlewareFn = ($1: Request, $2: Response$1, $3: NextFunction) => void;
30
30
  //#endregion
31
31
  //#region src/annotation/controller.d.ts
32
32
  declare const _ControllerRegistry: WeakMap<Function, Router | ErrorRequestHandler>;
@@ -230,6 +230,45 @@ declare namespace StandardSchemaV1 {
230
230
  type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
231
231
  }
232
232
  /** The Standard JSON Schema interface. */
233
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
234
+ /** The Standard JSON Schema properties. */
235
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
236
+ }
237
+ declare namespace StandardJSONSchemaV1 {
238
+ /** The Standard JSON Schema properties interface. */
239
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
240
+ /** Methods for generating the input/output JSON Schema. */
241
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
242
+ }
243
+ /** The Standard JSON Schema converter interface. */
244
+ interface Converter {
245
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
246
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
247
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
248
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
249
+ }
250
+ /**
251
+ * The target version of the generated JSON Schema.
252
+ *
253
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use. All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
254
+ *
255
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
256
+ */
257
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
258
+ /** The options for the input/output methods. */
259
+ interface Options {
260
+ /** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
261
+ readonly target: Target;
262
+ /** Explicit support for additional vendor-specific parameters, if needed. */
263
+ readonly libraryOptions?: Record<string, unknown> | undefined;
264
+ }
265
+ /** The Standard types interface. */
266
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
267
+ /** Infers the input type of a Standard. */
268
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
269
+ /** Infers the output type of a Standard. */
270
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
271
+ }
233
272
  //#endregion
234
273
  //#region src/helper/redirect.d.ts
235
274
  /**
@@ -398,7 +437,7 @@ declare class ResponseStatusError extends Error {
398
437
  }
399
438
  //#endregion
400
439
  //#region src/helper/error/parse.d.ts
401
- type ParserErrorLocation = "reqbody" | "reqparams" | "reqquery";
440
+ type ParserErrorLocation = "reqbody" | "reqparams" | "reqquery" | "resbody";
402
441
  /**
403
442
  * This error should be thrown when some data cannot be parsed by a given schema.
404
443
  */
@@ -408,6 +447,15 @@ declare class ParserError extends ResponseStatusError {
408
447
  }
409
448
  //#endregion
410
449
  //#region src/helper/sapling.d.ts
450
+ type Settings = {
451
+ serialize: (value: any) => string;
452
+ deserialize: (value: string) => any;
453
+ doc: {
454
+ openApiPath: string;
455
+ swaggerPath: string;
456
+ };
457
+ };
458
+ declare const _settings: Settings;
411
459
  /**
412
460
  * Collection of utility functions which are essential for Sapling to function.
413
461
  */
@@ -481,111 +529,439 @@ declare class Sapling {
481
529
  * Replace the function used for `deserialize`
482
530
  */
483
531
  static setDeserializeFn(this: void, fn: (value: string) => any): void;
532
+ static setOpenApiPath(this: void, path: string): void;
533
+ static setSwaggerPath(this: void, path: string): void;
534
+ static chainHandlers(this: void, handlers: RequestHandler[], request: Request, response: Response$1, next: NextFunction, index?: number): void;
484
535
  }
485
536
  //#endregion
486
- //#region src/annotation/request.d.ts
487
- type RequestSchemaDefinition = {
488
- body?: StandardSchemaV1;
489
- param?: StandardSchemaV1;
490
- query?: StandardSchemaV1;
537
+ //#region node_modules/.pnpm/openapi-types@12.1.3/node_modules/openapi-types/dist/index.d.ts
538
+ declare namespace OpenAPIV3 {
539
+ interface Document<T extends {} = {}> {
540
+ openapi: string;
541
+ info: InfoObject;
542
+ servers?: ServerObject[];
543
+ paths: PathsObject<T>;
544
+ components?: ComponentsObject;
545
+ security?: SecurityRequirementObject[];
546
+ tags?: TagObject[];
547
+ externalDocs?: ExternalDocumentationObject;
548
+ 'x-express-openapi-additional-middleware'?: (((request: any, response: any, next: any) => Promise<void>) | ((request: any, response: any, next: any) => void))[];
549
+ 'x-express-openapi-validation-strict'?: boolean;
550
+ }
551
+ interface InfoObject {
552
+ title: string;
553
+ description?: string;
554
+ termsOfService?: string;
555
+ contact?: ContactObject;
556
+ license?: LicenseObject;
557
+ version: string;
558
+ }
559
+ interface ContactObject {
560
+ name?: string;
561
+ url?: string;
562
+ email?: string;
563
+ }
564
+ interface LicenseObject {
565
+ name: string;
566
+ url?: string;
567
+ }
568
+ interface ServerObject {
569
+ url: string;
570
+ description?: string;
571
+ variables?: {
572
+ [variable: string]: ServerVariableObject;
573
+ };
574
+ }
575
+ interface ServerVariableObject {
576
+ enum?: string[];
577
+ default: string;
578
+ description?: string;
579
+ }
580
+ interface PathsObject<T extends {} = {}, P extends {} = {}> {
581
+ [pattern: string]: (PathItemObject<T> & P) | undefined;
582
+ }
583
+ enum HttpMethods {
584
+ GET = "get",
585
+ PUT = "put",
586
+ POST = "post",
587
+ DELETE = "delete",
588
+ OPTIONS = "options",
589
+ HEAD = "head",
590
+ PATCH = "patch",
591
+ TRACE = "trace"
592
+ }
593
+ type PathItemObject<T extends {} = {}> = {
594
+ $ref?: string;
595
+ summary?: string;
596
+ description?: string;
597
+ servers?: ServerObject[];
598
+ parameters?: (ReferenceObject | ParameterObject)[];
599
+ } & { [method in HttpMethods]?: OperationObject<T> };
600
+ type OperationObject<T extends {} = {}> = {
601
+ tags?: string[];
602
+ summary?: string;
603
+ description?: string;
604
+ externalDocs?: ExternalDocumentationObject;
605
+ operationId?: string;
606
+ parameters?: (ReferenceObject | ParameterObject)[];
607
+ requestBody?: ReferenceObject | RequestBodyObject;
608
+ responses: ResponsesObject;
609
+ callbacks?: {
610
+ [callback: string]: ReferenceObject | CallbackObject;
611
+ };
612
+ deprecated?: boolean;
613
+ security?: SecurityRequirementObject[];
614
+ servers?: ServerObject[];
615
+ } & T;
616
+ interface ExternalDocumentationObject {
617
+ description?: string;
618
+ url: string;
619
+ }
620
+ interface ParameterObject extends ParameterBaseObject {
621
+ name: string;
622
+ in: string;
623
+ }
624
+ interface HeaderObject extends ParameterBaseObject {}
625
+ interface ParameterBaseObject {
626
+ description?: string;
627
+ required?: boolean;
628
+ deprecated?: boolean;
629
+ allowEmptyValue?: boolean;
630
+ style?: string;
631
+ explode?: boolean;
632
+ allowReserved?: boolean;
633
+ schema?: ReferenceObject | SchemaObject;
634
+ example?: any;
635
+ examples?: {
636
+ [media: string]: ReferenceObject | ExampleObject;
637
+ };
638
+ content?: {
639
+ [media: string]: MediaTypeObject;
640
+ };
641
+ }
642
+ type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer';
643
+ type ArraySchemaObjectType = 'array';
644
+ type SchemaObject = ArraySchemaObject | NonArraySchemaObject;
645
+ interface ArraySchemaObject extends BaseSchemaObject {
646
+ type: ArraySchemaObjectType;
647
+ items: ReferenceObject | SchemaObject;
648
+ }
649
+ interface NonArraySchemaObject extends BaseSchemaObject {
650
+ type?: NonArraySchemaObjectType;
651
+ }
652
+ interface BaseSchemaObject {
653
+ title?: string;
654
+ description?: string;
655
+ format?: string;
656
+ default?: any;
657
+ multipleOf?: number;
658
+ maximum?: number;
659
+ exclusiveMaximum?: boolean;
660
+ minimum?: number;
661
+ exclusiveMinimum?: boolean;
662
+ maxLength?: number;
663
+ minLength?: number;
664
+ pattern?: string;
665
+ additionalProperties?: boolean | ReferenceObject | SchemaObject;
666
+ maxItems?: number;
667
+ minItems?: number;
668
+ uniqueItems?: boolean;
669
+ maxProperties?: number;
670
+ minProperties?: number;
671
+ required?: string[];
672
+ enum?: any[];
673
+ properties?: {
674
+ [name: string]: ReferenceObject | SchemaObject;
675
+ };
676
+ allOf?: (ReferenceObject | SchemaObject)[];
677
+ oneOf?: (ReferenceObject | SchemaObject)[];
678
+ anyOf?: (ReferenceObject | SchemaObject)[];
679
+ not?: ReferenceObject | SchemaObject;
680
+ nullable?: boolean;
681
+ discriminator?: DiscriminatorObject;
682
+ readOnly?: boolean;
683
+ writeOnly?: boolean;
684
+ xml?: XMLObject;
685
+ externalDocs?: ExternalDocumentationObject;
686
+ example?: any;
687
+ deprecated?: boolean;
688
+ }
689
+ interface DiscriminatorObject {
690
+ propertyName: string;
691
+ mapping?: {
692
+ [value: string]: string;
693
+ };
694
+ }
695
+ interface XMLObject {
696
+ name?: string;
697
+ namespace?: string;
698
+ prefix?: string;
699
+ attribute?: boolean;
700
+ wrapped?: boolean;
701
+ }
702
+ interface ReferenceObject {
703
+ $ref: string;
704
+ }
705
+ interface ExampleObject {
706
+ summary?: string;
707
+ description?: string;
708
+ value?: any;
709
+ externalValue?: string;
710
+ }
711
+ interface MediaTypeObject {
712
+ schema?: ReferenceObject | SchemaObject;
713
+ example?: any;
714
+ examples?: {
715
+ [media: string]: ReferenceObject | ExampleObject;
716
+ };
717
+ encoding?: {
718
+ [media: string]: EncodingObject;
719
+ };
720
+ }
721
+ interface EncodingObject {
722
+ contentType?: string;
723
+ headers?: {
724
+ [header: string]: ReferenceObject | HeaderObject;
725
+ };
726
+ style?: string;
727
+ explode?: boolean;
728
+ allowReserved?: boolean;
729
+ }
730
+ interface RequestBodyObject {
731
+ description?: string;
732
+ content: {
733
+ [media: string]: MediaTypeObject;
734
+ };
735
+ required?: boolean;
736
+ }
737
+ interface ResponsesObject {
738
+ [code: string]: ReferenceObject | ResponseObject;
739
+ }
740
+ interface ResponseObject {
741
+ description: string;
742
+ headers?: {
743
+ [header: string]: ReferenceObject | HeaderObject;
744
+ };
745
+ content?: {
746
+ [media: string]: MediaTypeObject;
747
+ };
748
+ links?: {
749
+ [link: string]: ReferenceObject | LinkObject;
750
+ };
751
+ }
752
+ interface LinkObject {
753
+ operationRef?: string;
754
+ operationId?: string;
755
+ parameters?: {
756
+ [parameter: string]: any;
757
+ };
758
+ requestBody?: any;
759
+ description?: string;
760
+ server?: ServerObject;
761
+ }
762
+ interface CallbackObject {
763
+ [url: string]: PathItemObject;
764
+ }
765
+ interface SecurityRequirementObject {
766
+ [name: string]: string[];
767
+ }
768
+ interface ComponentsObject {
769
+ schemas?: {
770
+ [key: string]: ReferenceObject | SchemaObject;
771
+ };
772
+ responses?: {
773
+ [key: string]: ReferenceObject | ResponseObject;
774
+ };
775
+ parameters?: {
776
+ [key: string]: ReferenceObject | ParameterObject;
777
+ };
778
+ examples?: {
779
+ [key: string]: ReferenceObject | ExampleObject;
780
+ };
781
+ requestBodies?: {
782
+ [key: string]: ReferenceObject | RequestBodyObject;
783
+ };
784
+ headers?: {
785
+ [key: string]: ReferenceObject | HeaderObject;
786
+ };
787
+ securitySchemes?: {
788
+ [key: string]: ReferenceObject | SecuritySchemeObject;
789
+ };
790
+ links?: {
791
+ [key: string]: ReferenceObject | LinkObject;
792
+ };
793
+ callbacks?: {
794
+ [key: string]: ReferenceObject | CallbackObject;
795
+ };
796
+ }
797
+ type SecuritySchemeObject = HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme;
798
+ interface HttpSecurityScheme {
799
+ type: 'http';
800
+ description?: string;
801
+ scheme: string;
802
+ bearerFormat?: string;
803
+ }
804
+ interface ApiKeySecurityScheme {
805
+ type: 'apiKey';
806
+ description?: string;
807
+ name: string;
808
+ in: string;
809
+ }
810
+ interface OAuth2SecurityScheme {
811
+ type: 'oauth2';
812
+ description?: string;
813
+ flows: {
814
+ implicit?: {
815
+ authorizationUrl: string;
816
+ refreshUrl?: string;
817
+ scopes: {
818
+ [scope: string]: string;
819
+ };
820
+ };
821
+ password?: {
822
+ tokenUrl: string;
823
+ refreshUrl?: string;
824
+ scopes: {
825
+ [scope: string]: string;
826
+ };
827
+ };
828
+ clientCredentials?: {
829
+ tokenUrl: string;
830
+ refreshUrl?: string;
831
+ scopes: {
832
+ [scope: string]: string;
833
+ };
834
+ };
835
+ authorizationCode?: {
836
+ authorizationUrl: string;
837
+ tokenUrl: string;
838
+ refreshUrl?: string;
839
+ scopes: {
840
+ [scope: string]: string;
841
+ };
842
+ };
843
+ };
844
+ }
845
+ interface OpenIdSecurityScheme {
846
+ type: 'openIdConnect';
847
+ description?: string;
848
+ openIdConnectUrl: string;
849
+ }
850
+ interface TagObject {
851
+ name: string;
852
+ description?: string;
853
+ externalDocs?: ExternalDocumentationObject;
854
+ }
855
+ }
856
+ //#endregion
857
+ //#region src/helper/openapi.d.ts
858
+ type OpenAPIConfig = {
859
+ title: string;
860
+ version: string;
861
+ description?: string;
491
862
  };
492
- /**
493
- * Apply to a route method to have `request.body` be parsed by `schema`.
494
- *
495
- * This annotation will parse `request.body` & then override `request.body`.
496
- * You can then just simply cast `request.body` for your use
497
- *
498
- * @example
499
- * ```ts
500
- * const CREATE_BOOK_REQUEST_BODY_SCHEMA = z.object({
501
- * name: z.string(),
502
- * description: z.string().optional(),
503
- * });
504
- *
505
- * ⠀@Controller({ prefix: "/api/book" })
506
- * class BookController {
507
- * ⠀@RequestBody(CREATE_BOOK_REQUEST_BODY_SCHEMA)
508
- * ⠀@POST()
509
- * public createBook(request: e.Request) {
510
- * const { name, description } = request.body as unknown as z.infer<
511
- * typeof CREATE_BOOK_REQUEST_BODY_SCHEMA
512
- * >;
513
- * }
514
- * }
515
- * ```
516
- */
517
- declare function RequestBody(schema: StandardSchemaV1): MethodDecorator;
518
- /**
519
- * Apply to a route method to have `request.param` be parsed by `schema`.
520
- *
521
- * This annotation will parse `request.param` & then override `request.param`.
522
- * You can then just simply cast `request.param` for your use
523
- *
524
- * @example
525
- * ```ts
526
- * const GET_BOOK_REQUEST_PARAM_SCHEMA = z.object({
527
- * bookId: z.string(),
528
- * });
529
- *
530
- * ⠀@Controller({ prefix: "/api/book" })
531
- * class BookController {
532
- * ⠀@RequestParam(GET_BOOK_REQUEST_PARAM_SCHEMA)
533
- * ⠀@GET("/:bookId")
534
- * public getBook(request: e.Request) {
535
- * const { bookId } = request.param as unknown as z.infer<
536
- * typeof GET_BOOK_REQUEST_PARAM_SCHEMA
537
- * >;
538
- * }
539
- * }
540
- * ```
541
- */
542
- declare function RequestParam(schema: StandardSchemaV1): MethodDecorator;
543
- /**
544
- * Apply to a route method to have `request.query` be parsed by `schema`.
545
- *
546
- * This annotation will parse `request.query` & then override `request.query`.
547
- * You can then just simply cast `request.query` for your use
548
- *
549
- * @example
550
- * ```ts
551
- * const LIST_BOOKS_REQUEST_QUERY_SCHEMA = z.object({
552
- * sort: z.enum(["name", "createdAt"]).optional(),
553
- * q: z.string().optional(),
554
- * });
555
- *
556
- * ⠀@Controller({ prefix: "/api/book" })
557
- * class BookController {
558
- * ⠀@RequestQuery(LIST_BOOKS_REQUEST_QUERY_SCHEMA)
559
- * ⠀@GET()
560
- * public listBooks(request: e.Request) {
561
- * const { sort, q } = request.query as unknown as z.infer<
562
- * typeof LIST_BOOKS_REQUEST_QUERY_SCHEMA
563
- * >;
564
- * }
565
- * }
566
- * ```
567
- */
568
- declare function RequestQuery(schema: StandardSchemaV1): MethodDecorator;
569
- declare function _getRequestSchemas(ctor: Function, fnName: string): RequestSchemaDefinition | undefined;
863
+ declare class OpenAPIGenerator {
864
+ private controllers;
865
+ private config;
866
+ setConfig(config: OpenAPIConfig): void;
867
+ registerController(controllerClass: Function, prefix: string): void;
868
+ generateSpec(): OpenAPIV3.Document;
869
+ private toJsonSchema;
870
+ }
871
+ declare const openApiGenerator: OpenAPIGenerator;
872
+ declare function _registerControllerClass(controllerClass: Function, prefix: string): void;
873
+ declare function setOpenApiConfig(config: OpenAPIConfig): void;
874
+ declare function generateOpenApiSpec(): OpenAPIV3.Document;
875
+ //#endregion
876
+ //#region src/annotation/validator.d.ts
877
+ type ValidatorSchema = {
878
+ requestBody?: StandardSchemaV1 & StandardJSONSchemaV1;
879
+ requestParam?: StandardSchemaV1 & StandardJSONSchemaV1;
880
+ requestQuery?: StandardSchemaV1 & StandardJSONSchemaV1;
881
+ responseBody?: StandardSchemaV1 & StandardJSONSchemaV1;
882
+ };
883
+ declare function ResponseBody(schema: StandardSchemaV1 & StandardJSONSchemaV1): MethodDecorator;
884
+ declare function RequestBody(schema: StandardSchemaV1 & StandardJSONSchemaV1): MethodDecorator;
885
+ declare function RequestParam(schema: StandardSchemaV1 & StandardJSONSchemaV1): MethodDecorator;
886
+ declare function RequestQuery(schema: StandardSchemaV1 & StandardJSONSchemaV1): MethodDecorator;
887
+ declare function _getOrCreateSchemaDefinition(ctor: Function, fnName: string): ValidatorSchema;
570
888
  declare function _parseOrThrow<TSchema extends StandardSchemaV1>(schema: TSchema, input: unknown, kind: ParserErrorLocation): Promise<StandardSchemaV1.InferOutput<TSchema>>;
889
+ declare function _getValidatorSchema(ctor: Function, fnName: string): ValidatorSchema | undefined;
890
+ declare function _setOnce(def: ValidatorSchema, key: keyof ValidatorSchema, schema: StandardSchemaV1 & StandardJSONSchemaV1, fnName: string): void;
891
+ //#endregion
892
+ //#region src/annotation/schema.d.ts
893
+ type ResponseSchema = {
894
+ statusCode: HttpStatus;
895
+ description?: string;
896
+ schema?: StandardSchemaV1 & StandardJSONSchemaV1;
897
+ };
898
+ type RouteSchemaDefinition = {
899
+ summary?: string;
900
+ description?: string;
901
+ responses?: ResponseSchema[];
902
+ };
903
+ type ControllerSchemaDefinition = {
904
+ title?: string;
905
+ description?: string;
906
+ };
907
+ declare function ControllerSchema(options: {
908
+ title?: string;
909
+ description?: string;
910
+ }): ClassDecorator;
911
+ declare function RouteSchema(options: {
912
+ summary?: string;
913
+ description?: string;
914
+ responses?: ResponseSchema[];
915
+ }): MethodDecorator;
916
+ declare function _setRouteSchema(ctor: Function, fnName: string, options: RouteSchemaDefinition): void;
917
+ declare function _setControllerSchema(ctor: Function, options: ControllerSchemaDefinition): void;
918
+ declare function _getRouteSchema(ctor: Function, fnName: string): RouteSchemaDefinition | undefined;
919
+ declare function _getControllerSchema(ctor: Function): ControllerSchemaDefinition | undefined;
571
920
  //#endregion
572
- //#region src/middleware/default/base.d.ts
921
+ //#region src/middleware/default/error/base.d.ts
573
922
  /**
574
923
  * This should be registered last in the middleware chain.
575
924
  *
576
925
  * All exception messages are hidden from the request by default.
577
926
  */
578
927
  declare class DefaultBaseErrorMiddleware {
579
- handle(err: unknown, _request: Request, _response: Response, _next: NextFunction): ResponseEntity<{
928
+ handle(err: unknown, _request: Request, _response: Response$1, _next: NextFunction): ResponseEntity<{
580
929
  message: string;
581
930
  }>;
582
931
  }
583
932
  //#endregion
584
- //#region src/middleware/default/responsestatus.d.ts
933
+ //#region src/middleware/default/error/parse.d.ts
934
+ declare class DefaultParserErrorMiddleware {
935
+ handle(err: unknown, _request: Request, _response: Response$1, next: NextFunction): ResponseEntity<{
936
+ message: string;
937
+ }> | undefined;
938
+ }
939
+ //#endregion
940
+ //#region src/middleware/default/error/responsestatus.d.ts
585
941
  declare class DefaultResponseStatusErrorMiddleware {
586
- handle(err: unknown, _request: Request, _response: Response, next: NextFunction): ResponseEntity<{
942
+ handle(err: unknown, _request: Request, _response: Response$1, next: NextFunction): ResponseEntity<{
587
943
  message: string;
588
944
  }> | undefined;
589
945
  }
590
946
  //#endregion
591
- export { Class, Controller, DELETE, DefaultBaseErrorMiddleware, DefaultResponseStatusErrorMiddleware, ExpressMiddlewareFn, ExpressRouterMethodKey, ExpressRouterMethods, GET, HEAD, Html404ErrorPage, HttpHeaders, HttpStatus, Injectable, Middleware, MiddlewareClass, OPTIONS, PATCH, POST, PUT, ParserError, ParserErrorLocation, RedirectView, RequestBody, RequestParam, RequestQuery, ResponseEntity, ResponseEntityBuilder, ResponseStatusError, RouteDefinition, Sapling, _ControllerRegistry, _InjectableDeps, _InjectableRegistry, _Route, _getRequestSchemas, _getRoutes, _parseOrThrow, _resolve, methodResolve };
947
+ //#region src/middleware/default/openapi/index.d.ts
948
+ declare class DefaultOpenApiMiddleware {
949
+ handle(_request: Request, _response: Response$1, _next: NextFunction): ResponseEntity<OpenAPIV3.Document<{}>>;
950
+ }
951
+ //#endregion
952
+ //#region src/middleware/default/swagger/index.d.ts
953
+ declare class Serve {
954
+ private readonly handlers;
955
+ handle(request: Request, response: Response$1, next: NextFunction): void;
956
+ }
957
+ declare class Setup {
958
+ private readonly handler;
959
+ constructor();
960
+ handle(request: Request, response: Response$1, next: NextFunction): unknown;
961
+ }
962
+ declare const DefaultSwaggerMiddleware: {
963
+ Serve: typeof Serve;
964
+ Setup: typeof Setup;
965
+ };
966
+ //#endregion
967
+ export { Class, Controller, ControllerSchema, ControllerSchemaDefinition, DELETE, DefaultBaseErrorMiddleware, DefaultOpenApiMiddleware, DefaultParserErrorMiddleware, DefaultResponseStatusErrorMiddleware, DefaultSwaggerMiddleware, ExpressMiddlewareFn, ExpressRouterMethodKey, ExpressRouterMethods, GET, HEAD, Html404ErrorPage, HttpHeaders, HttpStatus, Injectable, Middleware, MiddlewareClass, OPTIONS, PATCH, POST, PUT, ParserError, ParserErrorLocation, RedirectView, RequestBody, RequestParam, RequestQuery, ResponseBody, ResponseEntity, ResponseEntityBuilder, ResponseSchema, ResponseStatusError, RouteDefinition, RouteSchema, RouteSchemaDefinition, Sapling, ValidatorSchema, _ControllerRegistry, _InjectableDeps, _InjectableRegistry, _Route, _getControllerSchema, _getOrCreateSchemaDefinition, _getRouteSchema, _getRoutes, _getValidatorSchema, _parseOrThrow, _registerControllerClass, _resolve, _setControllerSchema, _setOnce, _setRouteSchema, _settings, generateOpenApiSpec, methodResolve, openApiGenerator, setOpenApiConfig };