@tsoa-next/runtime 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.MD +3 -0
  2. package/dist/config.d.ts +240 -0
  3. package/dist/config.js +3 -0
  4. package/dist/config.js.map +1 -0
  5. package/dist/decorators/customAttribute.d.ts +1 -0
  6. package/dist/decorators/customAttribute.js +9 -0
  7. package/dist/decorators/customAttribute.js.map +1 -0
  8. package/dist/decorators/deprecated.d.ts +4 -0
  9. package/dist/decorators/deprecated.js +12 -0
  10. package/dist/decorators/deprecated.js.map +1 -0
  11. package/dist/decorators/example.d.ts +1 -0
  12. package/dist/decorators/example.js +9 -0
  13. package/dist/decorators/example.js.map +1 -0
  14. package/dist/decorators/extension.d.ts +4 -0
  15. package/dist/decorators/extension.js +9 -0
  16. package/dist/decorators/extension.js.map +1 -0
  17. package/dist/decorators/methods.d.ts +7 -0
  18. package/dist/decorators/methods.js +45 -0
  19. package/dist/decorators/methods.js.map +1 -0
  20. package/dist/decorators/middlewares.d.ts +15 -0
  21. package/dist/decorators/middlewares.js +53 -0
  22. package/dist/decorators/middlewares.js.map +1 -0
  23. package/dist/decorators/operationid.d.ts +1 -0
  24. package/dist/decorators/operationid.js +9 -0
  25. package/dist/decorators/operationid.js.map +1 -0
  26. package/dist/decorators/parameter.d.ts +73 -0
  27. package/dist/decorators/parameter.js +141 -0
  28. package/dist/decorators/parameter.js.map +1 -0
  29. package/dist/decorators/response.d.ts +17 -0
  30. package/dist/decorators/response.js +38 -0
  31. package/dist/decorators/response.js.map +1 -0
  32. package/dist/decorators/route.d.ts +5 -0
  33. package/dist/decorators/route.js +18 -0
  34. package/dist/decorators/route.js.map +1 -0
  35. package/dist/decorators/security.d.ts +10 -0
  36. package/dist/decorators/security.js +21 -0
  37. package/dist/decorators/security.js.map +1 -0
  38. package/dist/decorators/tags.d.ts +1 -0
  39. package/dist/decorators/tags.js +9 -0
  40. package/dist/decorators/tags.js.map +1 -0
  41. package/dist/index.d.ts +24 -0
  42. package/dist/index.js +41 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/interfaces/controller.d.ts +16 -0
  45. package/dist/interfaces/controller.js +24 -0
  46. package/dist/interfaces/controller.js.map +1 -0
  47. package/dist/interfaces/file.d.ts +31 -0
  48. package/dist/interfaces/file.js +3 -0
  49. package/dist/interfaces/file.js.map +1 -0
  50. package/dist/interfaces/iocModule.d.ts +7 -0
  51. package/dist/interfaces/iocModule.js +3 -0
  52. package/dist/interfaces/iocModule.js.map +1 -0
  53. package/dist/interfaces/response.d.ts +5 -0
  54. package/dist/interfaces/response.js +3 -0
  55. package/dist/interfaces/response.js.map +1 -0
  56. package/dist/metadataGeneration/tsoa.d.ts +219 -0
  57. package/dist/metadataGeneration/tsoa.js +3 -0
  58. package/dist/metadataGeneration/tsoa.js.map +1 -0
  59. package/dist/routeGeneration/additionalProps.d.ts +6 -0
  60. package/dist/routeGeneration/additionalProps.js +3 -0
  61. package/dist/routeGeneration/additionalProps.js.map +1 -0
  62. package/dist/routeGeneration/templateHelpers.d.ts +203 -0
  63. package/dist/routeGeneration/templateHelpers.js +859 -0
  64. package/dist/routeGeneration/templateHelpers.js.map +1 -0
  65. package/dist/routeGeneration/templates/express/expressTemplateService.d.ts +29 -0
  66. package/dist/routeGeneration/templates/express/expressTemplateService.js +118 -0
  67. package/dist/routeGeneration/templates/express/expressTemplateService.js.map +1 -0
  68. package/dist/routeGeneration/templates/hapi/hapiTemplateService.d.ts +36 -0
  69. package/dist/routeGeneration/templates/hapi/hapiTemplateService.js +120 -0
  70. package/dist/routeGeneration/templates/hapi/hapiTemplateService.js.map +1 -0
  71. package/dist/routeGeneration/templates/index.d.ts +4 -0
  72. package/dist/routeGeneration/templates/index.js +21 -0
  73. package/dist/routeGeneration/templates/index.js.map +1 -0
  74. package/dist/routeGeneration/templates/koa/koaTemplateService.d.ts +29 -0
  75. package/dist/routeGeneration/templates/koa/koaTemplateService.js +116 -0
  76. package/dist/routeGeneration/templates/koa/koaTemplateService.js.map +1 -0
  77. package/dist/routeGeneration/templates/templateService.d.ts +15 -0
  78. package/dist/routeGeneration/templates/templateService.js +37 -0
  79. package/dist/routeGeneration/templates/templateService.js.map +1 -0
  80. package/dist/routeGeneration/tsoa-route.d.ts +56 -0
  81. package/dist/routeGeneration/tsoa-route.js +11 -0
  82. package/dist/routeGeneration/tsoa-route.js.map +1 -0
  83. package/dist/swagger/swagger.d.ts +550 -0
  84. package/dist/swagger/swagger.js +12 -0
  85. package/dist/swagger/swagger.js.map +1 -0
  86. package/dist/utils/assertNever.d.ts +4 -0
  87. package/dist/utils/assertNever.js +10 -0
  88. package/dist/utils/assertNever.js.map +1 -0
  89. package/dist/utils/isHeaderType.d.ts +5 -0
  90. package/dist/utils/isHeaderType.js +3 -0
  91. package/dist/utils/isHeaderType.js.map +1 -0
  92. package/package.json +64 -0
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Body = Body;
4
+ exports.BodyProp = BodyProp;
5
+ exports.Request = Request;
6
+ exports.RequestProp = RequestProp;
7
+ exports.Path = Path;
8
+ exports.Query = Query;
9
+ exports.Queries = Queries;
10
+ exports.Header = Header;
11
+ exports.Inject = Inject;
12
+ exports.UploadedFile = UploadedFile;
13
+ exports.UploadedFiles = UploadedFiles;
14
+ exports.FormField = FormField;
15
+ exports.Consumes = Consumes;
16
+ /**
17
+ * Inject http Body
18
+ * @param {string} [name] properties name in body object
19
+ */
20
+ function Body() {
21
+ return () => {
22
+ return;
23
+ };
24
+ }
25
+ /**
26
+ * Inject value from body
27
+ *
28
+ * @param {string} [name] The name of the body parameter
29
+ */
30
+ function BodyProp(name) {
31
+ return () => {
32
+ return;
33
+ };
34
+ }
35
+ /**
36
+ * Inject http request
37
+ */
38
+ function Request() {
39
+ return () => {
40
+ return;
41
+ };
42
+ }
43
+ /**
44
+ * Inject value from request
45
+ *
46
+ * @param {name} [name] The name of the request parameter
47
+ */
48
+ function RequestProp(name) {
49
+ return () => {
50
+ return;
51
+ };
52
+ }
53
+ /**
54
+ * Inject value from Path
55
+ *
56
+ * @param {string} [name] The name of the path parameter
57
+ */
58
+ function Path(name) {
59
+ return () => {
60
+ return;
61
+ };
62
+ }
63
+ /**
64
+ * Inject value from query string
65
+ *
66
+ * @param {string} [name] The name of the query parameter
67
+ */
68
+ function Query(name) {
69
+ return () => {
70
+ return;
71
+ };
72
+ }
73
+ /**
74
+ * Inject all query values in a single object
75
+ */
76
+ function Queries() {
77
+ return () => {
78
+ return;
79
+ };
80
+ }
81
+ /**
82
+ * Inject value from Http header
83
+ *
84
+ * @param {string} [name] The name of the header parameter
85
+ */
86
+ function Header(name) {
87
+ return () => {
88
+ return;
89
+ };
90
+ }
91
+ /**
92
+ * Mark parameter as manually injected, which will not be generated
93
+ */
94
+ function Inject() {
95
+ return () => {
96
+ return;
97
+ };
98
+ }
99
+ /**
100
+ * Inject uploaded file
101
+ *
102
+ * @param {string} [name] The name of the uploaded file parameter
103
+ */
104
+ function UploadedFile(name) {
105
+ return () => {
106
+ return;
107
+ };
108
+ }
109
+ /**
110
+ * Inject uploaded files
111
+ *
112
+ * @param {string} [name] The name of the uploaded files parameter
113
+ */
114
+ function UploadedFiles(name) {
115
+ return () => {
116
+ return;
117
+ };
118
+ }
119
+ /**
120
+ * Inject uploaded files
121
+ *
122
+ * @param {string} [name] The name of the uploaded files parameter
123
+ */
124
+ function FormField(name) {
125
+ return () => {
126
+ return;
127
+ };
128
+ }
129
+ /**
130
+ * Overrides the default media type of request body.
131
+ * Can be used on specific method.
132
+ * Can't be used on controller level.
133
+ *
134
+ * @link https://swagger.io/docs/specification/describing-request-body/
135
+ */
136
+ function Consumes(value) {
137
+ return () => {
138
+ return;
139
+ };
140
+ }
141
+ //# sourceMappingURL=parameter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../src/decorators/parameter.ts"],"names":[],"mappings":";;AAIA,oBAIC;AAOD,4BAIC;AAKD,0BAIC;AAOD,kCAIC;AAOD,oBAIC;AAOD,sBAIC;AAKD,0BAIC;AAOD,wBAIC;AAKD,wBAIC;AAOD,oCAIC;AAOD,sCAIC;AAOD,8BAIC;AASD,4BAIC;AAxID;;;GAGG;AACH,SAAgB,IAAI;IAClB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAAa;IACpC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAa;IACvC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,IAAa;IAChC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,IAAa;IACjC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CAAC,IAAa;IAClC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAa;IACxC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAa;IACzC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,SAAS,CAAC,IAAa;IACrC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,KAAa;IACpC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { IsValidHeader } from '../utils/isHeaderType';
2
+ import { HttpStatusCodeLiteral, HttpStatusCodeStringLiteral, OtherValidOpenApiHttpStatusCode } from '../interfaces/response';
3
+ export declare function SuccessResponse<HeaderType extends IsValidHeader<HeaderType> = object>(name: string | number, description?: string, produces?: string | string[]): MethodDecorator;
4
+ export declare function Response<ExampleType, HeaderType extends IsValidHeader<HeaderType> = object>(name: HttpStatusCodeLiteral | HttpStatusCodeStringLiteral | OtherValidOpenApiHttpStatusCode, description?: string, example?: ExampleType, produces?: string | string[]): MethodDecorator & ClassDecorator;
5
+ /**
6
+ * Inject a library-agnostic responder function that can be used to construct type-checked (usually error-) responses.
7
+ *
8
+ * The type of the responder function should be annotated `TsoaResponse<Status, Data, Headers>` in order to support OpenAPI documentation.
9
+ */
10
+ export declare function Res(): ParameterDecorator;
11
+ /**
12
+ * Overrides the default media type of response.
13
+ * Can be used on controller level or only for specific method
14
+ *
15
+ * @link https://swagger.io/docs/specification/media-types/
16
+ */
17
+ export declare function Produces(value: string): MethodDecorator & ClassDecorator;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SuccessResponse = SuccessResponse;
4
+ exports.Response = Response;
5
+ exports.Res = Res;
6
+ exports.Produces = Produces;
7
+ function SuccessResponse(name, description, produces) {
8
+ return () => {
9
+ return;
10
+ };
11
+ }
12
+ function Response(name, description, example, produces) {
13
+ return () => {
14
+ return;
15
+ };
16
+ }
17
+ /**
18
+ * Inject a library-agnostic responder function that can be used to construct type-checked (usually error-) responses.
19
+ *
20
+ * The type of the responder function should be annotated `TsoaResponse<Status, Data, Headers>` in order to support OpenAPI documentation.
21
+ */
22
+ function Res() {
23
+ return () => {
24
+ return;
25
+ };
26
+ }
27
+ /**
28
+ * Overrides the default media type of response.
29
+ * Can be used on controller level or only for specific method
30
+ *
31
+ * @link https://swagger.io/docs/specification/media-types/
32
+ */
33
+ function Produces(value) {
34
+ return () => {
35
+ return;
36
+ };
37
+ }
38
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/decorators/response.ts"],"names":[],"mappings":";;AAGA,0CAIC;AAED,4BASC;AAOD,kBAIC;AAQD,4BAIC;AAtCD,SAAgB,eAAe,CAAwD,IAAqB,EAAE,WAAoB,EAAE,QAA4B;IAC9J,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,QAAQ,CACtB,IAA2F,EAC3F,WAAoB,EACpB,OAAqB,EACrB,QAA4B;IAE5B,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,GAAG;IACjB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,KAAa;IACpC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function Route(name?: string): ClassDecorator;
2
+ /**
3
+ * can be used to entirely hide an method from documentation
4
+ */
5
+ export declare function Hidden(): ClassDecorator & MethodDecorator & ParameterDecorator;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Route = Route;
4
+ exports.Hidden = Hidden;
5
+ function Route(name) {
6
+ return () => {
7
+ return;
8
+ };
9
+ }
10
+ /**
11
+ * can be used to entirely hide an method from documentation
12
+ */
13
+ function Hidden() {
14
+ return () => {
15
+ return;
16
+ };
17
+ }
18
+ //# sourceMappingURL=route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/decorators/route.ts"],"names":[],"mappings":";;AAAA,sBAIC;AAKD,wBAIC;AAbD,SAAgB,KAAK,CAAC,IAAa;IACjC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Can be used to indicate that a method requires no security.
3
+ */
4
+ export declare function NoSecurity(): ClassDecorator & MethodDecorator;
5
+ /**
6
+ * @param {name} security name from securityDefinitions
7
+ */
8
+ export declare function Security(name: string | {
9
+ [name: string]: string[];
10
+ }, scopes?: string[]): ClassDecorator & MethodDecorator;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoSecurity = NoSecurity;
4
+ exports.Security = Security;
5
+ /**
6
+ * Can be used to indicate that a method requires no security.
7
+ */
8
+ function NoSecurity() {
9
+ return () => {
10
+ return;
11
+ };
12
+ }
13
+ /**
14
+ * @param {name} security name from securityDefinitions
15
+ */
16
+ function Security(name, scopes) {
17
+ return () => {
18
+ return;
19
+ };
20
+ }
21
+ //# sourceMappingURL=security.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/decorators/security.ts"],"names":[],"mappings":";;AAGA,gCAIC;AAKD,4BAIC;AAhBD;;GAEG;AACH,SAAgB,UAAU;IACxB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,IAA2C,EAAE,MAAiB;IACrF,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function Tags(...values: string[]): ClassDecorator & MethodDecorator;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tags = Tags;
4
+ function Tags(...values) {
5
+ return () => {
6
+ return;
7
+ };
8
+ }
9
+ //# sourceMappingURL=tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/decorators/tags.ts"],"names":[],"mappings":";;AAAA,oBAIC;AAJD,SAAgB,IAAI,CAAC,GAAG,MAAgB;IACtC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,24 @@
1
+ import 'reflect-metadata';
2
+ export * from './decorators/deprecated';
3
+ export * from './decorators/example';
4
+ export * from './decorators/parameter';
5
+ export * from './decorators/methods';
6
+ export * from './decorators/tags';
7
+ export * from './decorators/operationid';
8
+ export * from './decorators/route';
9
+ export * from './decorators/security';
10
+ export * from './decorators/extension';
11
+ export * from './decorators/middlewares';
12
+ export * from './interfaces/controller';
13
+ export * from './interfaces/response';
14
+ export * from './interfaces/iocModule';
15
+ export * from './interfaces/file';
16
+ export * from './decorators/response';
17
+ export * from './metadataGeneration/tsoa';
18
+ export * from './routeGeneration/templates';
19
+ export * from './routeGeneration/templateHelpers';
20
+ export * from './routeGeneration/tsoa-route';
21
+ export * from './utils/assertNever';
22
+ export * from './swagger/swagger';
23
+ export * from './config';
24
+ export * from './routeGeneration/additionalProps';
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ require("reflect-metadata");
18
+ __exportStar(require("./decorators/deprecated"), exports);
19
+ __exportStar(require("./decorators/example"), exports);
20
+ __exportStar(require("./decorators/parameter"), exports);
21
+ __exportStar(require("./decorators/methods"), exports);
22
+ __exportStar(require("./decorators/tags"), exports);
23
+ __exportStar(require("./decorators/operationid"), exports);
24
+ __exportStar(require("./decorators/route"), exports);
25
+ __exportStar(require("./decorators/security"), exports);
26
+ __exportStar(require("./decorators/extension"), exports);
27
+ __exportStar(require("./decorators/middlewares"), exports);
28
+ __exportStar(require("./interfaces/controller"), exports);
29
+ __exportStar(require("./interfaces/response"), exports);
30
+ __exportStar(require("./interfaces/iocModule"), exports);
31
+ __exportStar(require("./interfaces/file"), exports);
32
+ __exportStar(require("./decorators/response"), exports);
33
+ __exportStar(require("./metadataGeneration/tsoa"), exports);
34
+ __exportStar(require("./routeGeneration/templates"), exports);
35
+ __exportStar(require("./routeGeneration/templateHelpers"), exports);
36
+ __exportStar(require("./routeGeneration/tsoa-route"), exports);
37
+ __exportStar(require("./utils/assertNever"), exports);
38
+ __exportStar(require("./swagger/swagger"), exports);
39
+ __exportStar(require("./config"), exports);
40
+ __exportStar(require("./routeGeneration/additionalProps"), exports);
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4BAAyB;AACzB,0DAAuC;AACvC,uDAAoC;AACpC,yDAAsC;AACtC,uDAAoC;AACpC,oDAAiC;AACjC,2DAAwC;AACxC,qDAAkC;AAClC,wDAAqC;AACrC,yDAAsC;AACtC,2DAAwC;AACxC,0DAAuC;AACvC,wDAAqC;AACrC,yDAAsC;AACtC,oDAAiC;AACjC,wDAAqC;AACrC,4DAAyC;AACzC,8DAA2C;AAC3C,oEAAiD;AACjD,+DAA4C;AAC5C,sDAAmC;AACnC,oDAAiC;AACjC,2CAAwB;AACxB,oEAAiD"}
@@ -0,0 +1,16 @@
1
+ import type { OutgoingHttpHeaders } from 'node:http';
2
+ type HeaderNames = keyof OutgoingHttpHeaders;
3
+ type HeaderValue<H extends HeaderNames> = OutgoingHttpHeaders[H];
4
+ export declare class Controller {
5
+ private statusCode?;
6
+ private headers;
7
+ setStatus(statusCode: number): void;
8
+ getStatus(): number | undefined;
9
+ setHeader<H extends HeaderNames>(name: H, value?: HeaderValue<H>): void;
10
+ setHeader(name: string, value?: string | string[]): void;
11
+ getHeader(name: string): string | string[] | undefined;
12
+ getHeaders(): {
13
+ [name: string]: string | string[] | undefined;
14
+ };
15
+ }
16
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Controller = void 0;
4
+ class Controller {
5
+ statusCode = undefined;
6
+ headers = {};
7
+ setStatus(statusCode) {
8
+ this.statusCode = statusCode;
9
+ }
10
+ getStatus() {
11
+ return this.statusCode;
12
+ }
13
+ setHeader(name, value) {
14
+ this.headers[name] = value;
15
+ }
16
+ getHeader(name) {
17
+ return this.headers[name];
18
+ }
19
+ getHeaders() {
20
+ return this.headers;
21
+ }
22
+ }
23
+ exports.Controller = Controller;
24
+ //# sourceMappingURL=controller.js.map
@@ -0,0 +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"}
@@ -0,0 +1,31 @@
1
+ import { Readable } from 'stream';
2
+ /** Object containing file metadata and access information. */
3
+ export interface File {
4
+ /** Name of the form field associated with this file. */
5
+ fieldname: string;
6
+ /** Name of the file on the uploader's computer. */
7
+ originalname: string;
8
+ /**
9
+ * Value of the `Content-Transfer-Encoding` header for this file.
10
+ * @deprecated since July 2015
11
+ * @see RFC 7578, Section 4.7
12
+ */
13
+ encoding: string;
14
+ /** Value of the `Content-Type` header for this file. */
15
+ mimetype: string;
16
+ /** Size of the file in bytes. */
17
+ size: number;
18
+ /**
19
+ * A readable stream of this file. Only available to the `_handleFile`
20
+ * callback for custom `StorageEngine`s.
21
+ */
22
+ stream: Readable;
23
+ /** `DiskStorage` only: Directory to which this file has been uploaded. */
24
+ destination: string;
25
+ /** `DiskStorage` only: Name of this file within `destination`. */
26
+ filename: string;
27
+ /** `DiskStorage` only: Full path to the uploaded file. */
28
+ path: string;
29
+ /** `MemoryStorage` only: A Buffer containing the entire file. */
30
+ buffer: Buffer;
31
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/interfaces/file.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type Newable<T = unknown, TArgs extends unknown[] = any[]> = new (...args: TArgs) => T;
2
+ export type ServiceIdentifier<T = unknown> = string | symbol | Newable<T> | Function;
3
+ export interface IocContainer {
4
+ get<T>(controller: ServiceIdentifier<T>): T;
5
+ get<T>(controller: ServiceIdentifier<T>): Promise<T>;
6
+ }
7
+ export type IocContainerFactory<T = any> = (request: T) => IocContainer;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=iocModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iocModule.js","sourceRoot":"","sources":["../../src/interfaces/iocModule.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { IsValidHeader } from '../utils/isHeaderType';
2
+ 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;
3
+ export type HttpStatusCodeStringLiteral = `${HttpStatusCodeLiteral}`;
4
+ export type OtherValidOpenApiHttpStatusCode = '1XX' | '2XX' | '3XX' | '4XX' | '5XX' | 'default';
5
+ export type TsoaResponse<T extends HttpStatusCodeLiteral, BodyType, HeaderType extends IsValidHeader<HeaderType> = object> = (status: T, data: BodyType, headers?: HeaderType) => any;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/interfaces/response.ts"],"names":[],"mappings":""}