@tsoa-next/runtime 8.0.5-dev.57.84bb4a63 → 8.0.5-dev.58.3748c499

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/config.d.ts +50 -45
  2. package/dist/decorators/customAttribute.d.ts +6 -0
  3. package/dist/decorators/customAttribute.js +6 -0
  4. package/dist/decorators/customAttribute.js.map +1 -1
  5. package/dist/decorators/deprecated.d.ts +1 -1
  6. package/dist/decorators/deprecated.js +1 -1
  7. package/dist/decorators/example.d.ts +6 -0
  8. package/dist/decorators/example.js +6 -0
  9. package/dist/decorators/example.js.map +1 -1
  10. package/dist/decorators/extension.d.ts +7 -0
  11. package/dist/decorators/extension.js +6 -0
  12. package/dist/decorators/extension.js.map +1 -1
  13. package/dist/decorators/methods.d.ts +7 -0
  14. package/dist/decorators/methods.js +7 -0
  15. package/dist/decorators/methods.js.map +1 -1
  16. package/dist/decorators/middlewares.d.ts +6 -7
  17. package/dist/decorators/middlewares.js +6 -7
  18. package/dist/decorators/middlewares.js.map +1 -1
  19. package/dist/decorators/operationid.d.ts +5 -0
  20. package/dist/decorators/operationid.js +5 -0
  21. package/dist/decorators/operationid.js.map +1 -1
  22. package/dist/decorators/parameter.d.ts +22 -24
  23. package/dist/decorators/parameter.js +22 -24
  24. package/dist/decorators/parameter.js.map +1 -1
  25. package/dist/decorators/response.d.ts +18 -3
  26. package/dist/decorators/response.js +18 -3
  27. package/dist/decorators/response.js.map +1 -1
  28. package/dist/decorators/route.d.ts +6 -1
  29. package/dist/decorators/route.js +6 -1
  30. package/dist/decorators/route.js.map +1 -1
  31. package/dist/decorators/security.d.ts +5 -2
  32. package/dist/decorators/security.js +5 -2
  33. package/dist/decorators/security.js.map +1 -1
  34. package/dist/decorators/specPath.d.ts +21 -0
  35. package/dist/decorators/specPath.js +9 -0
  36. package/dist/decorators/specPath.js.map +1 -1
  37. package/dist/decorators/tags.d.ts +5 -0
  38. package/dist/decorators/tags.js +5 -0
  39. package/dist/decorators/tags.js.map +1 -1
  40. package/dist/decorators/validate.d.ts +5 -0
  41. package/dist/decorators/validate.js +5 -0
  42. package/dist/decorators/validate.js.map +1 -1
  43. package/dist/interfaces/controller.d.ts +7 -0
  44. package/dist/interfaces/controller.js +8 -0
  45. package/dist/interfaces/controller.js.map +1 -1
  46. package/dist/interfaces/iocModule.d.ts +4 -0
  47. package/dist/interfaces/response.d.ts +8 -0
  48. package/dist/metadataGeneration/tsoa.d.ts +1 -0
  49. package/dist/routeGeneration/additionalProps.d.ts +1 -0
  50. package/dist/routeGeneration/externalValidation.d.ts +3 -0
  51. package/dist/routeGeneration/externalValidation.js +1 -0
  52. package/dist/routeGeneration/externalValidation.js.map +1 -1
  53. package/dist/routeGeneration/specPathSupport.d.ts +5 -0
  54. package/dist/routeGeneration/specPathSupport.js +3 -0
  55. package/dist/routeGeneration/specPathSupport.js.map +1 -1
  56. package/dist/routeGeneration/templateHelpers.d.ts +14 -0
  57. package/dist/routeGeneration/templateHelpers.js +2 -0
  58. package/dist/routeGeneration/templateHelpers.js.map +1 -1
  59. package/dist/routeGeneration/templates/express/expressTemplateService.d.ts +1 -0
  60. package/dist/routeGeneration/templates/express/expressTemplateService.js +1 -0
  61. package/dist/routeGeneration/templates/express/expressTemplateService.js.map +1 -1
  62. package/dist/routeGeneration/templates/hapi/hapiTemplateService.d.ts +1 -0
  63. package/dist/routeGeneration/templates/hapi/hapiTemplateService.js +1 -0
  64. package/dist/routeGeneration/templates/hapi/hapiTemplateService.js.map +1 -1
  65. package/dist/routeGeneration/templates/koa/koaTemplateService.d.ts +1 -0
  66. package/dist/routeGeneration/templates/koa/koaTemplateService.js +1 -0
  67. package/dist/routeGeneration/templates/koa/koaTemplateService.js.map +1 -1
  68. package/dist/routeGeneration/templates/templateService.d.ts +6 -0
  69. package/dist/routeGeneration/templates/templateService.js +3 -0
  70. package/dist/routeGeneration/templates/templateService.js.map +1 -1
  71. package/dist/routeGeneration/tsoa-route.d.ts +12 -2
  72. package/dist/routeGeneration/tsoa-route.js +1 -2
  73. package/dist/routeGeneration/tsoa-route.js.map +1 -1
  74. package/dist/swagger/swagger.d.ts +1 -0
  75. package/dist/swagger/swagger.js +1 -0
  76. package/dist/swagger/swagger.js.map +1 -1
  77. package/dist/utils/pathUtils.d.ts +3 -0
  78. package/dist/utils/pathUtils.js +3 -0
  79. package/dist/utils/pathUtils.js.map +1 -1
  80. package/package.json +1 -1
@@ -15,99 +15,97 @@ exports.FormField = FormField;
15
15
  exports.Consumes = Consumes;
16
16
  const noop_1 = require("./noop");
17
17
  /**
18
- * Inject http Body
19
- * @param {string} [name] properties name in body object
18
+ * Binds the full HTTP request body to a controller parameter.
20
19
  */
21
20
  function Body() {
22
21
  return (0, noop_1.createNoopParameterDecorator)('body');
23
22
  }
24
23
  /**
25
- * Inject value from body
24
+ * Binds a single property from the request body to a controller parameter.
26
25
  *
27
- * @param {string} [name] The name of the body parameter
26
+ * @param _name The property name to read from the request body. Defaults to the parameter name.
28
27
  */
29
28
  function BodyProp(_name) {
30
29
  return (0, noop_1.createNoopParameterDecorator)('body-prop');
31
30
  }
32
31
  /**
33
- * Inject http request
32
+ * Injects the underlying runtime request object.
34
33
  */
35
34
  function Request() {
36
35
  return (0, noop_1.createNoopParameterDecorator)('request');
37
36
  }
38
37
  /**
39
- * Inject value from request
38
+ * Binds a property from the underlying runtime request object.
40
39
  *
41
- * @param {name} [name] The name of the request parameter
40
+ * @param _name The request property name to read. Defaults to the parameter name.
42
41
  */
43
42
  function RequestProp(_name) {
44
43
  return (0, noop_1.createNoopParameterDecorator)('request-prop');
45
44
  }
46
45
  /**
47
- * Inject value from Path
46
+ * Binds a path parameter from the request URL.
48
47
  *
49
- * @param {string} [name] The name of the path parameter
48
+ * @param _name The path parameter name. Defaults to the parameter name.
50
49
  */
51
50
  function Path(_name) {
52
51
  return (0, noop_1.createNoopParameterDecorator)('path');
53
52
  }
54
53
  /**
55
- * Inject value from query string
54
+ * Binds a query-string value to a controller parameter.
56
55
  *
57
- * @param {string} [name] The name of the query parameter
56
+ * @param _name The query parameter name. Defaults to the parameter name.
58
57
  */
59
58
  function Query(_name) {
60
59
  return (0, noop_1.createNoopParameterDecorator)('query');
61
60
  }
62
61
  /**
63
- * Inject all query values in a single object
62
+ * Binds the entire query object to a single controller parameter.
64
63
  */
65
64
  function Queries() {
66
65
  return (0, noop_1.createNoopParameterDecorator)('queries');
67
66
  }
68
67
  /**
69
- * Inject value from Http header
68
+ * Binds an HTTP header value to a controller parameter.
70
69
  *
71
- * @param {string} [name] The name of the header parameter
70
+ * @param _name The header name. Defaults to the parameter name.
72
71
  */
73
72
  function Header(_name) {
74
73
  return (0, noop_1.createNoopParameterDecorator)('header');
75
74
  }
76
75
  /**
77
- * Mark parameter as manually injected, which will not be generated
76
+ * Marks a parameter as injected by user code so tsoa skips route-generation metadata for it.
78
77
  */
79
78
  function Inject() {
80
79
  return (0, noop_1.createNoopParameterDecorator)('inject');
81
80
  }
82
81
  /**
83
- * Inject uploaded file
82
+ * Binds a single uploaded file from a multipart/form-data request.
84
83
  *
85
- * @param {string} [name] The name of the uploaded file parameter
84
+ * @param _name The multipart field name. Defaults to the parameter name.
86
85
  */
87
86
  function UploadedFile(_name) {
88
87
  return (0, noop_1.createNoopParameterDecorator)('uploaded-file');
89
88
  }
90
89
  /**
91
- * Inject uploaded files
90
+ * Binds multiple uploaded files from a multipart/form-data request.
92
91
  *
93
- * @param {string} [name] The name of the uploaded files parameter
92
+ * @param _name The multipart field name. Defaults to the parameter name.
94
93
  */
95
94
  function UploadedFiles(_name) {
96
95
  return (0, noop_1.createNoopParameterDecorator)('uploaded-files');
97
96
  }
98
97
  /**
99
- * Inject uploaded files
98
+ * Binds a regular multipart form field from a multipart/form-data request.
100
99
  *
101
- * @param {string} [name] The name of the uploaded files parameter
100
+ * @param _name The multipart field name. Defaults to the parameter name.
102
101
  */
103
102
  function FormField(_name) {
104
103
  return (0, noop_1.createNoopParameterDecorator)('form-field');
105
104
  }
106
105
  /**
107
- * Overrides the default media type of request body.
108
- * Can be used on specific method.
109
- * Can't be used on controller level.
106
+ * Overrides the media type used to document a request body for a single action.
110
107
  *
108
+ * @param _value The request body media type, for example `application/json`.
111
109
  * @link https://swagger.io/docs/specification/describing-request-body/
112
110
  */
113
111
  function Consumes(_value) {
@@ -1 +1 @@
1
- {"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../src/decorators/parameter.ts"],"names":[],"mappings":";;AAMA,oBAEC;AAOD,4BAEC;AAKD,0BAEC;AAOD,kCAEC;AAOD,oBAEC;AAOD,sBAEC;AAKD,0BAEC;AAOD,wBAEC;AAKD,wBAEC;AAOD,oCAEC;AAOD,sCAEC;AAOD,8BAEC;AASD,4BAEC;AAhHD,iCAAgF;AAEhF;;;GAGG;AACH,SAAgB,IAAI;IAClB,OAAO,IAAA,mCAA4B,EAAC,MAAM,CAAC,CAAA;AAC7C,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,IAAA,mCAA4B,EAAC,WAAW,CAAC,CAAA;AAClD,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,mCAA4B,EAAC,SAAS,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,KAAc;IACxC,OAAO,IAAA,mCAA4B,EAAC,cAAc,CAAC,CAAA;AACrD,CAAC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,KAAc;IACjC,OAAO,IAAA,mCAA4B,EAAC,MAAM,CAAC,CAAA;AAC7C,CAAC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,IAAA,mCAA4B,EAAC,OAAO,CAAC,CAAA;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,mCAA4B,EAAC,SAAS,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CAAC,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B,EAAC,cAAc,CAAC,CAAA;AACrD,CAAC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,KAAc;IACjC,OAAO,IAAA,mCAA4B,EAAC,MAAM,CAAC,CAAA;AAC7C,CAAC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,IAAA,mCAA4B,EAAC,OAAO,CAAC,CAAA;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,mCAA4B,EAAC,SAAS,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CAAC,KAAc;IACnC,OAAO,IAAA,mCAA4B,EAAC,QAAQ,CAAC,CAAA;AAC/C,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,mCAA4B,EAAC,QAAQ,CAAC,CAAA;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,IAAA,mCAA4B,EAAC,eAAe,CAAC,CAAA;AACtD,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,KAAc;IAC1C,OAAO,IAAA,mCAA4B,EAAC,gBAAgB,CAAC,CAAA;AACvD,CAAC;AAED;;;;GAIG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,OAAO,IAAA,mCAA4B,EAAC,YAAY,CAAC,CAAA;AACnD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAAc;IACrC,OAAO,IAAA,gCAAyB,EAAC,UAAU,CAAC,CAAA;AAC9C,CAAC"}
@@ -1,17 +1,32 @@
1
1
  import { IsValidHeader } from '../utils/isHeaderType';
2
2
  import { HttpStatusCodeLiteral, HttpStatusCodeStringLiteral, OtherValidOpenApiHttpStatusCode } from '../interfaces/response';
3
+ /**
4
+ * Declares the successful response status, description, and media types for an operation.
5
+ *
6
+ * @param _name The HTTP status code returned when the operation succeeds.
7
+ * @param _description The response description shown in the generated OpenAPI document.
8
+ * @param _produces The response media type or media types.
9
+ */
3
10
  export declare function SuccessResponse<HeaderType extends IsValidHeader<HeaderType> = object>(_name: string | number, _description?: string, _produces?: string | string[]): MethodDecorator;
11
+ /**
12
+ * Adds a documented response that can be attached to a method or a controller.
13
+ *
14
+ * @param _name The HTTP status code, OpenAPI response range, or `default`.
15
+ * @param _description The response description shown in the generated OpenAPI document.
16
+ * @param _example An example payload for the response schema.
17
+ * @param _produces The response media type or media types.
18
+ */
4
19
  export declare function Response<ExampleType, HeaderType extends IsValidHeader<HeaderType> = object>(_name: HttpStatusCodeLiteral | HttpStatusCodeStringLiteral | OtherValidOpenApiHttpStatusCode, _description?: string, _example?: ExampleType, _produces?: string | string[]): MethodDecorator & ClassDecorator;
5
20
  /**
6
21
  * Inject a library-agnostic responder function that can be used to construct type-checked (usually error-) responses.
7
22
  *
8
- * The type of the responder function should be annotated `TsoaResponse<Status, Data, Headers>` in order to support OpenAPI documentation.
23
+ * Annotate the parameter as `TsoaResponse<Status, Data, Headers>` so tsoa can infer the documented response.
9
24
  */
10
25
  export declare function Res(): ParameterDecorator;
11
26
  /**
12
- * Overrides the default media type of response.
13
- * Can be used on controller level or only for specific method
27
+ * Overrides the response media type on a controller or a single action.
14
28
  *
29
+ * @param _value The response media type, for example `application/json`.
15
30
  * @link https://swagger.io/docs/specification/media-types/
16
31
  */
17
32
  export declare function Produces(_value: string): MethodDecorator & ClassDecorator;
@@ -5,24 +5,39 @@ exports.Response = Response;
5
5
  exports.Res = Res;
6
6
  exports.Produces = Produces;
7
7
  const noop_1 = require("./noop");
8
+ /**
9
+ * Declares the successful response status, description, and media types for an operation.
10
+ *
11
+ * @param _name The HTTP status code returned when the operation succeeds.
12
+ * @param _description The response description shown in the generated OpenAPI document.
13
+ * @param _produces The response media type or media types.
14
+ */
8
15
  function SuccessResponse(_name, _description, _produces) {
9
16
  return (0, noop_1.createNoopMethodDecorator)('success-response');
10
17
  }
18
+ /**
19
+ * Adds a documented response that can be attached to a method or a controller.
20
+ *
21
+ * @param _name The HTTP status code, OpenAPI response range, or `default`.
22
+ * @param _description The response description shown in the generated OpenAPI document.
23
+ * @param _example An example payload for the response schema.
24
+ * @param _produces The response media type or media types.
25
+ */
11
26
  function Response(_name, _description, _example, _produces) {
12
27
  return (0, noop_1.createNoopClassMethodDecorator)('response');
13
28
  }
14
29
  /**
15
30
  * Inject a library-agnostic responder function that can be used to construct type-checked (usually error-) responses.
16
31
  *
17
- * The type of the responder function should be annotated `TsoaResponse<Status, Data, Headers>` in order to support OpenAPI documentation.
32
+ * Annotate the parameter as `TsoaResponse<Status, Data, Headers>` so tsoa can infer the documented response.
18
33
  */
19
34
  function Res() {
20
35
  return (0, noop_1.createNoopParameterDecorator)('res');
21
36
  }
22
37
  /**
23
- * Overrides the default media type of response.
24
- * Can be used on controller level or only for specific method
38
+ * Overrides the response media type on a controller or a single action.
25
39
  *
40
+ * @param _value The response media type, for example `application/json`.
26
41
  * @link https://swagger.io/docs/specification/media-types/
27
42
  */
28
43
  function Produces(_value) {
@@ -1 +1 @@
1
- {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/decorators/response.ts"],"names":[],"mappings":";;AAIA,0CAEC;AAED,4BAOC;AAOD,kBAEC;AAQD,4BAEC;AAhCD,iCAAgH;AAEhH,SAAgB,eAAe,CAAwD,KAAsB,EAAE,YAAqB,EAAE,SAA6B;IACjK,OAAO,IAAA,gCAAyB,EAAC,kBAAkB,CAAC,CAAA;AACtD,CAAC;AAED,SAAgB,QAAQ,CACtB,KAA4F,EAC5F,YAAqB,EACrB,QAAsB,EACtB,SAA6B;IAE7B,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC;AAED;;;;GAIG;AACH,SAAgB,GAAG;IACjB,OAAO,IAAA,mCAA4B,EAAC,KAAK,CAAC,CAAA;AAC5C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAAc;IACrC,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC"}
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/decorators/response.ts"],"names":[],"mappings":";;AAWA,0CAEC;AAUD,4BAOC;AAOD,kBAEC;AAQD,4BAEC;AA/CD,iCAAgH;AAEhH;;;;;;GAMG;AACH,SAAgB,eAAe,CAAwD,KAAsB,EAAE,YAAqB,EAAE,SAA6B;IACjK,OAAO,IAAA,gCAAyB,EAAC,kBAAkB,CAAC,CAAA;AACtD,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,QAAQ,CACtB,KAA4F,EAC5F,YAAqB,EACrB,QAAsB,EACtB,SAA6B;IAE7B,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC;AAED;;;;GAIG;AACH,SAAgB,GAAG;IACjB,OAAO,IAAA,mCAA4B,EAAC,KAAK,CAAC,CAAA;AAC5C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAAc;IACrC,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC"}
@@ -1,5 +1,10 @@
1
+ /**
2
+ * Declares the base route path for a controller.
3
+ *
4
+ * @param _name The controller path segment relative to the configured API base path.
5
+ */
1
6
  export declare function Route(_name?: string): ClassDecorator;
2
7
  /**
3
- * can be used to entirely hide an method from documentation
8
+ * Hides a controller, action, or parameter from generated OpenAPI metadata.
4
9
  */
5
10
  export declare function Hidden(): ClassDecorator & MethodDecorator & ParameterDecorator;
@@ -3,11 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Route = Route;
4
4
  exports.Hidden = Hidden;
5
5
  const noop_1 = require("./noop");
6
+ /**
7
+ * Declares the base route path for a controller.
8
+ *
9
+ * @param _name The controller path segment relative to the configured API base path.
10
+ */
6
11
  function Route(_name) {
7
12
  return (0, noop_1.createNoopClassDecorator)('route');
8
13
  }
9
14
  /**
10
- * can be used to entirely hide an method from documentation
15
+ * Hides a controller, action, or parameter from generated OpenAPI metadata.
11
16
  */
12
17
  function Hidden() {
13
18
  return (0, noop_1.createNoopHiddenDecorator)('hidden');
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/decorators/route.ts"],"names":[],"mappings":";;AAEA,sBAEC;AAKD,wBAEC;AAXD,iCAA4E;AAE5E,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,IAAA,+BAAwB,EAAC,OAAO,CAAC,CAAA;AAC1C,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,gCAAyB,EAAC,QAAQ,CAAC,CAAA;AAC5C,CAAC"}
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/decorators/route.ts"],"names":[],"mappings":";;AAOA,sBAEC;AAKD,wBAEC;AAhBD,iCAA4E;AAE5E;;;;GAIG;AACH,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,IAAA,+BAAwB,EAAC,OAAO,CAAC,CAAA;AAC1C,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,gCAAyB,EAAC,QAAQ,CAAC,CAAA;AAC5C,CAAC"}
@@ -1,9 +1,12 @@
1
1
  /**
2
- * Can be used to indicate that a method requires no security.
2
+ * Clears inherited security requirements for a controller or action.
3
3
  */
4
4
  export declare function NoSecurity(): ClassDecorator & MethodDecorator;
5
5
  /**
6
- * @param {name} security name from securityDefinitions
6
+ * Declares the security requirement for a controller or action.
7
+ *
8
+ * @param _name The security scheme name, or a full security requirement object.
9
+ * @param _scopes OAuth scopes required by the scheme when `_name` is a string.
7
10
  */
8
11
  export declare function Security(_name: string | {
9
12
  [name: string]: string[];
@@ -4,13 +4,16 @@ exports.NoSecurity = NoSecurity;
4
4
  exports.Security = Security;
5
5
  const noop_1 = require("./noop");
6
6
  /**
7
- * Can be used to indicate that a method requires no security.
7
+ * Clears inherited security requirements for a controller or action.
8
8
  */
9
9
  function NoSecurity() {
10
10
  return (0, noop_1.createNoopClassMethodDecorator)('no-security');
11
11
  }
12
12
  /**
13
- * @param {name} security name from securityDefinitions
13
+ * Declares the security requirement for a controller or action.
14
+ *
15
+ * @param _name The security scheme name, or a full security requirement object.
16
+ * @param _scopes OAuth scopes required by the scheme when `_name` is a string.
14
17
  */
15
18
  function Security(_name, _scopes) {
16
19
  return (0, noop_1.createNoopClassMethodDecorator)('security');
@@ -1 +1 @@
1
- {"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/decorators/security.ts"],"names":[],"mappings":";;AAKA,gCAEC;AAKD,4BAEC;AAdD,iCAAuD;AAEvD;;GAEG;AACH,SAAgB,UAAU;IACxB,OAAO,IAAA,qCAA8B,EAAC,aAAa,CAAC,CAAA;AACtD,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,KAA4C,EAAE,OAAkB;IACvF,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC"}
1
+ {"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/decorators/security.ts"],"names":[],"mappings":";;AAKA,gCAEC;AAQD,4BAEC;AAjBD,iCAAuD;AAEvD;;GAEG;AACH,SAAgB,UAAU;IACxB,OAAO,IAAA,qCAA8B,EAAC,aAAa,CAAC,CAAA;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,KAA4C,EAAE,OAAkB;IACvF,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC"}
@@ -1,13 +1,19 @@
1
1
  import { Readable } from 'node:stream';
2
2
  import { Swagger } from '../swagger/swagger';
3
+ /** Supported runtimes for built-in {@link SpecPath} targets. */
3
4
  export type SpecRuntime = 'express' | 'koa' | 'hapi';
5
+ /** Built-in documentation targets supported by {@link SpecPath}. */
4
6
  export type BuiltinSpecPathTarget = 'json' | 'yaml' | 'swagger' | 'redoc' | 'rapidoc';
7
+ /** Serialized OpenAPI formats that can be requested from a {@link SpecGenerator}. */
5
8
  export type SpecDocumentFormat = 'json' | 'yaml';
9
+ /** Response body types accepted from built-in and custom {@link SpecPath} handlers. */
6
10
  export type SpecResponseValue = string | Readable;
11
+ /** Describes the runtime contract needed to rebuild an OpenAPI document on demand. */
7
12
  export interface SpecGenerator {
8
13
  getSpecObject(): Promise<Swagger.Spec>;
9
14
  getSpecString(format: SpecDocumentFormat): Promise<string>;
10
15
  }
16
+ /** Context passed to spec-response caches. */
11
17
  export interface SpecCacheContext {
12
18
  cacheKey: string;
13
19
  controllerClass: object;
@@ -17,27 +23,42 @@ export interface SpecCacheContext {
17
23
  target: BuiltinSpecPathTarget | 'custom';
18
24
  format?: SpecDocumentFormat | 'html';
19
25
  }
26
+ /** Request-scoped context passed to custom {@link SpecPath} handlers. */
20
27
  export interface SpecRequestContext extends SpecCacheContext {
21
28
  request?: unknown;
22
29
  response?: unknown;
23
30
  getSpecObject(): Promise<Swagger.Spec>;
24
31
  getSpecString(format: SpecDocumentFormat): Promise<string>;
25
32
  }
33
+ /** Custom handler used by {@link SpecPath} to serve spec content. */
26
34
  export type SpecResponseHandler = (context: SpecRequestContext) => SpecResponseValue | Promise<SpecResponseValue>;
35
+ /** Cache adapter used by {@link SpecPath} to memoize generated responses. */
27
36
  export interface SpecCacheHandler {
28
37
  get(context: SpecCacheContext): SpecResponseValue | Promise<SpecResponseValue | undefined> | undefined;
29
38
  set(context: SpecCacheContext, value: string): void | Promise<void>;
30
39
  }
40
+ /** Route target supported by {@link SpecPath}. */
31
41
  export type SpecPathTarget = BuiltinSpecPathTarget | SpecResponseHandler;
42
+ /** Cache strategy supported by {@link SpecPath}. */
32
43
  export type SpecPathCache = 'none' | 'memory' | SpecCacheHandler;
44
+ /** Stored definition for a single declared {@link SpecPath}. */
33
45
  export interface SpecPathDefinition {
34
46
  path: string;
35
47
  normalizedPath: string;
36
48
  target: SpecPathTarget;
37
49
  cache: SpecPathCache;
38
50
  }
51
+ /**
52
+ * Registers a controller-local route that serves the generated OpenAPI document or a custom derived response.
53
+ *
54
+ * @param path The relative route path. Defaults to `spec`.
55
+ * @param target The built-in documentation target or a custom response handler.
56
+ * @param cache Cache strategy for generated responses. Defaults to in-memory caching.
57
+ */
39
58
  export declare function SpecPath(path?: string, target?: SpecPathTarget, cache?: SpecPathCache): ClassDecorator;
59
+ /** Returns the spec-path definitions declared on a controller. */
40
60
  export declare function fetchSpecPaths(target: object): readonly SpecPathDefinition[];
61
+ /** Produces a human-readable summary of a spec-path definition for logging and diagnostics. */
41
62
  export declare function describeSpecPath(specPath: SpecPathDefinition): {
42
63
  cache: string;
43
64
  path: string;
@@ -29,6 +29,13 @@ function defineSpecPaths(target, specPaths) {
29
29
  function normalizeSpecPath(path) {
30
30
  return (0, pathUtils_1.normalisePath)(path ?? 'spec', '/');
31
31
  }
32
+ /**
33
+ * Registers a controller-local route that serves the generated OpenAPI document or a custom derived response.
34
+ *
35
+ * @param path The relative route path. Defaults to `spec`.
36
+ * @param target The built-in documentation target or a custom response handler.
37
+ * @param cache Cache strategy for generated responses. Defaults to in-memory caching.
38
+ */
32
39
  function SpecPath(path = 'spec', target = 'json', cache = 'memory') {
33
40
  return classTarget => {
34
41
  const normalizedPath = normalizeSpecPath(path);
@@ -46,9 +53,11 @@ function SpecPath(path = 'spec', target = 'json', cache = 'memory') {
46
53
  defineSpecPaths(classTarget, existing);
47
54
  };
48
55
  }
56
+ /** Returns the spec-path definitions declared on a controller. */
49
57
  function fetchSpecPaths(target) {
50
58
  return getExistingSpecPaths(target);
51
59
  }
60
+ /** Produces a human-readable summary of a spec-path definition for logging and diagnostics. */
52
61
  function describeSpecPath(specPath) {
53
62
  return {
54
63
  cache: getCacheDescription(specPath.cache),
@@ -1 +1 @@
1
- {"version":3,"file":"specPath.js","sourceRoot":"","sources":["../../src/decorators/specPath.ts"],"names":[],"mappings":";;AAgFA,4BAmBC;AAED,wCAEC;AAED,4CAMC;AA7GD,kDAAkD;AA8ClD,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;AAE7D,S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AA;QACvI,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC;YACZ,KAAK;YACL,cAAc;YACd,IAAI;YACJ,MAAM;SACP,CAAC,CAAA;QAEF,eAAe,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;IACxC,CAAC,CAAA;AACH,CAAC;AAED,kEAAkE;AAClE,SAAgB,cAAc,CAAC,MAAc;IAC3C,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAA;AACrC,CAAC;AAED,+FAA+F;AAC/F,SAAgB,gBAAgB,CAAC,QAA4B;IAC3D,OAAO;QACL,KAAK,EAAE,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC1C,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC;KAC9C,CAAA;AACH,CAAC"}
@@ -1 +1,6 @@
1
+ /**
2
+ * Adds OpenAPI tags to a controller or action.
3
+ *
4
+ * @param _values One or more tag names to attach.
5
+ */
1
6
  export declare function Tags(..._values: string[]): ClassDecorator & MethodDecorator;
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Tags = Tags;
4
+ /**
5
+ * Adds OpenAPI tags to a controller or action.
6
+ *
7
+ * @param _values One or more tag names to attach.
8
+ */
4
9
  function Tags(..._values) {
5
10
  return () => {
6
11
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/decorators/tags.ts"],"names":[],"mappings":";;AAAA,oBAIC;AAJD,SAAgB,IAAI,CAAC,GAAG,OAAiB;IACvC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/decorators/tags.ts"],"names":[],"mappings":";;AAKA,oBAIC;AATD;;;;GAIG;AACH,SAAgB,IAAI,CAAC,GAAG,OAAiB;IACvC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
@@ -5,5 +5,10 @@ type ValidateDecoratorConfig = {
5
5
  };
6
6
  type DecoratorPropertyKey = string | symbol | undefined;
7
7
  export declare function getParameterExternalValidatorMetadata(target: object, propertyKey: DecoratorPropertyKey, parameterIndex: number): ValidateDecoratorConfig | undefined;
8
+ /**
9
+ * Attaches external-schema validation metadata to a controller parameter.
10
+ *
11
+ * Supported forms are `@Validate(schema)`, `@Validate(kind, schema)`, and `@Validate({ kind, schema })`.
12
+ */
8
13
  export declare function Validate(...args: unknown[]): ParameterDecorator;
9
14
  export {};
@@ -98,6 +98,11 @@ function getParameterExternalValidatorMetadata(target, propertyKey, parameterInd
98
98
  }
99
99
  return undefined;
100
100
  }
101
+ /**
102
+ * Attaches external-schema validation metadata to a controller parameter.
103
+ *
104
+ * Supported forms are `@Validate(schema)`, `@Validate(kind, schema)`, and `@Validate({ kind, schema })`.
105
+ */
101
106
  function Validate(...args) {
102
107
  const normalized = normalizeValidateDecoratorArgs(args);
103
108
  return (target, propertyKey, parameterIndex) => {
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/decorators/validate.ts"],"names":[],"mappings":";;AAsHA,sFAeC;AAED,4BAWC;AAhJD,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAA;AACvE,MAAM,oBAAoB,GAAG,iBAAiB,CAAA;AAW9C,SAAS,kBAAkB,CAAC,MAAe;IACzC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,SAAS,GAAG,MAAiC,CAAA;IAEnD,IAAI,OAAO,SAAS,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAA;IACd,CAAC;IAED,IAAI,OAAO,SAAS,CAAC,MAAM,KAAK,UAAU,IAAI,OAAO,SAAS,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C,MAAM,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAA;QAC7C,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;QAC5C,aAAa,CAAC,cAAc,CAAC,GAAG,UAAU,CAAA;QAC1C,KAAK,CAAC,SAAS,CAAC,GAAG,aAAa,CAAA;QAChC,OAAO,CAAC,cAAc,CAAC,qBAAqB,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IAC9D,CAAC,CAAA;AACH,CAAC"}
@@ -1,14 +1,21 @@
1
1
  import type { OutgoingHttpHeaders } from 'node:http';
2
2
  type HeaderNames = keyof OutgoingHttpHeaders;
3
3
  type HeaderValue<H extends HeaderNames> = OutgoingHttpHeaders[H];
4
+ /**
5
+ * Base controller class that lets actions override the eventual status code and headers.
6
+ */
4
7
  export declare class Controller {
5
8
  private statusCode?;
6
9
  private headers;
10
+ /** Sets the HTTP status code that the generated route handler should return. */
7
11
  setStatus(statusCode: number): void;
12
+ /** Returns the HTTP status code set through {@link setStatus}, if any. */
8
13
  getStatus(): number | undefined;
9
14
  setHeader<H extends HeaderNames>(name: H, value?: HeaderValue<H>): void;
10
15
  setHeader(name: string, value?: string | string[]): void;
16
+ /** Returns a previously assigned response header value. */
11
17
  getHeader(name: string): string | string[] | undefined;
18
+ /** Returns all response headers assigned on the controller instance. */
12
19
  getHeaders(): {
13
20
  [name: string]: string | string[] | undefined;
14
21
  };
@@ -1,21 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Controller = void 0;
4
+ /**
5
+ * Base controller class that lets actions override the eventual status code and headers.
6
+ */
4
7
  class Controller {
5
8
  statusCode = undefined;
6
9
  headers = {};
10
+ /** Sets the HTTP status code that the generated route handler should return. */
7
11
  setStatus(statusCode) {
8
12
  this.statusCode = statusCode;
9
13
  }
14
+ /** Returns the HTTP status code set through {@link setStatus}, if any. */
10
15
  getStatus() {
11
16
  return this.statusCode;
12
17
  }
18
+ /** Stores a response header value that the generated route handler should emit. */
13
19
  setHeader(name, value) {
14
20
  this.headers[name] = value;
15
21
  }
22
+ /** Returns a previously assigned response header value. */
16
23
  getHeader(name) {
17
24
  return this.headers[name];
18
25
  }
26
+ /** Returns all response headers assigned on the controller instance. */
19
27
  getHeaders() {
20
28
  return this.headers;
21
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/interfaces/controller.ts"],"names":[],"mappings":";;;AAKA,MAAa,UAAU;IACb,UAAU,GAAY,SAAS,CAAA;IAC/B,OAAO,GAAG,EAAuD,CAAA;IAElE,SAAS,CAAC,UAAkB;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAKM,SAAS,CAAC,IAAY,EAAE,KAAyB;QACtD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;IAC5B,CAAC;IAEM,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AA1BD,gCA0BC"}
1
+ {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/interfaces/controller.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,MAAa,UAAU;IACb,UAAU,GAAY,SAAS,CAAA;IAC/B,OAAO,GAAG,EAAuD,CAAA;IAEzE,gFAAgF;IACzE,SAAS,CAAC,UAAkB;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAED,0EAA0E;IACnE,SAAS;QACd,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAKD,mFAAmF;IAC5E,SAAS,CAAC,IAAY,EAAE,KAAyB;QACtD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;IAC5B,CAAC;IAED,2DAA2D;IACpD,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAED,wEAAwE;IACjE,UAAU;QACf,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AA/BD,gCA+BC"}
@@ -1,9 +1,13 @@
1
+ /** Constructor type used for IoC container lookups. */
1
2
  export type Newable<T = unknown, TArgs extends unknown[] = unknown[]> = new (...args: TArgs) => T;
3
+ /** Identifier types accepted by tsoa IoC container integrations. */
2
4
  export type ServiceIdentifier<T = unknown> = string | symbol | Newable<T> | Function;
5
+ /** Minimal runtime container contract used to resolve controller instances. */
3
6
  export interface IocContainer {
4
7
  get<T>(controller: ServiceIdentifier<T>): T;
5
8
  get<T>(controller: ServiceIdentifier<T>): Promise<T>;
6
9
  }
10
+ /** Factory signature used to build an {@link IocContainer} per incoming request. */
7
11
  export type IocContainerFactory<T = unknown> = {
8
12
  bivarianceHack(request: T): IocContainer;
9
13
  }['bivarianceHack'];
@@ -1,5 +1,13 @@
1
1
  import { IsValidHeader } from '../utils/isHeaderType';
2
+ /** Enumerates the concrete HTTP status codes accepted by tsoa response helpers. */
2
3
  export type HttpStatusCodeLiteral = 100 | 101 | 102 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
4
+ /** String form of the supported concrete HTTP status codes. */
3
5
  export type HttpStatusCodeStringLiteral = `${HttpStatusCodeLiteral}`;
6
+ /** Additional OpenAPI response keys supported by {@link Response}. */
4
7
  export type OtherValidOpenApiHttpStatusCode = '1XX' | '2XX' | '3XX' | '4XX' | '5XX' | 'default';
8
+ /**
9
+ * Responder function shape injected by {@link Res}.
10
+ *
11
+ * Call the function with a status code, payload, and optional headers to short-circuit the action and send a typed response.
12
+ */
5
13
  export type TsoaResponse<T extends HttpStatusCodeLiteral, BodyType, HeaderType extends IsValidHeader<HeaderType> = object, ReturnType = never> = (status: T, data: BodyType, headers?: HeaderType) => ReturnType;
@@ -1,6 +1,7 @@
1
1
  import { ExtensionType } from '../decorators/extension';
2
2
  import type { Swagger } from '../swagger/swagger';
3
3
  import { Validator } from '..';
4
+ /** Public metadata model produced by tsoa during controller and schema analysis. */
4
5
  export declare namespace Tsoa {
5
6
  export type ExternalValidatorKind = 'zod' | 'joi' | 'yup' | 'superstruct' | 'io-ts';
6
7
  export type ValidationStrategy = 'standard' | 'external';
@@ -1,5 +1,6 @@
1
1
  import { Config, RoutesConfig } from '../config';
2
2
  import type { Tsoa } from '../metadataGeneration/tsoa';
3
+ /** Runtime validation options passed into generated route template services. */
3
4
  export interface AdditionalProps {
4
5
  noImplicitAdditionalProperties: Exclude<Config['noImplicitAdditionalProperties'], undefined>;
5
6
  bodyCoercion: Exclude<RoutesConfig['bodyCoercion'], undefined>;
@@ -1,4 +1,5 @@
1
1
  import type { Tsoa } from '../metadataGeneration/tsoa';
2
+ /** Result returned by a runtime adapter for an external validation library. */
2
3
  export type RuntimeSchemaAdapterResult<T = unknown> = {
3
4
  ok: true;
4
5
  value: T;
@@ -6,8 +7,10 @@ export type RuntimeSchemaAdapterResult<T = unknown> = {
6
7
  ok: false;
7
8
  failure: Tsoa.ValidationFailure;
8
9
  };
10
+ /** Adapter contract used to execute validation with external schema libraries at runtime. */
9
11
  export interface RuntimeSchemaAdapter {
10
12
  kind: Tsoa.ExternalValidatorKind;
11
13
  validate(value: unknown, schema: unknown, context: Tsoa.ValidationContext): RuntimeSchemaAdapterResult;
12
14
  }
15
+ /** Validates a value with the runtime adapter for the selected external schema library. */
13
16
  export declare function validateExternalSchema(kind: Tsoa.ExternalValidatorKind, schema: unknown, value: unknown, context?: Tsoa.ValidationContext): RuntimeSchemaAdapterResult;
@@ -226,6 +226,7 @@ const adapterRegistry = {
226
226
  yup: yupAdapter,
227
227
  zod: zodAdapter,
228
228
  };
229
+ /** Validates a value with the runtime adapter for the selected external schema library. */
229
230
  function validateExternalSchema(kind, schema, value, context = {}) {
230
231
  return adapterRegistry[kind].validate(value, schema, context);
231
232
  }