@deepkit/http 1.0.1-alpha.16 → 1.0.1-alpha.160
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/CHANGELOG.md +236 -0
- package/dist/cjs/index.d.ts +14 -10
- package/dist/cjs/index.js +19 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/controllers.d.ts +10 -3
- package/dist/cjs/src/controllers.js +7 -3
- package/dist/cjs/src/controllers.js.map +1 -1
- package/dist/cjs/src/decorator.d.ts +144 -70
- package/dist/cjs/src/decorator.js +277 -102
- package/dist/cjs/src/decorator.js.map +1 -1
- package/dist/cjs/src/filter.d.ts +49 -0
- package/dist/cjs/src/filter.js +215 -0
- package/dist/cjs/src/filter.js.map +1 -0
- package/dist/cjs/src/http-app.d.ts +8 -0
- package/dist/cjs/src/http-app.js +16 -0
- package/dist/cjs/src/http-app.js.map +1 -0
- package/dist/cjs/src/http.d.ts +131 -32
- package/dist/cjs/src/http.js +523 -122
- package/dist/cjs/src/http.js.map +1 -1
- package/dist/cjs/src/kernel.d.ts +50 -9
- package/dist/cjs/src/kernel.js +109 -98
- package/dist/cjs/src/kernel.js.map +1 -1
- package/dist/cjs/src/logger.d.ts +3 -3
- package/dist/cjs/src/logger.js +9 -12
- package/dist/cjs/src/logger.js.map +1 -1
- package/dist/cjs/src/middleware.d.ts +61 -0
- package/dist/cjs/src/middleware.js +95 -0
- package/dist/cjs/src/middleware.js.map +1 -0
- package/dist/cjs/src/model.d.ts +270 -4
- package/dist/cjs/src/model.js +401 -3
- package/dist/cjs/src/model.js.map +1 -1
- package/dist/cjs/src/module.config.d.ts +149 -4
- package/dist/cjs/src/module.config.js +11 -6
- package/dist/cjs/src/module.config.js.map +1 -1
- package/dist/cjs/src/module.d.ts +14 -32
- package/dist/cjs/src/module.js +122 -7
- package/dist/cjs/src/module.js.map +1 -1
- package/dist/cjs/src/request-parser.d.ts +37 -0
- package/dist/cjs/src/request-parser.js +382 -0
- package/dist/cjs/src/request-parser.js.map +1 -0
- package/dist/cjs/src/router.d.ts +174 -75
- package/dist/cjs/src/router.js +469 -288
- package/dist/cjs/src/router.js.map +1 -1
- package/dist/cjs/src/static-serving.d.ts +32 -4
- package/dist/cjs/src/static-serving.js +115 -71
- package/dist/cjs/src/static-serving.js.map +1 -1
- package/dist/cjs/src/utils.js +2 -2
- package/dist/cjs/src/utils.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -2916
- package/dist/esm/index.d.ts +14 -10
- package/dist/esm/index.js +14 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/controllers.d.ts +10 -3
- package/dist/esm/src/controllers.js +7 -3
- package/dist/esm/src/controllers.js.map +1 -1
- package/dist/esm/src/decorator.d.ts +144 -70
- package/dist/esm/src/decorator.js +272 -99
- package/dist/esm/src/decorator.js.map +1 -1
- package/dist/esm/src/filter.d.ts +49 -0
- package/dist/esm/src/filter.js +209 -0
- package/dist/esm/src/filter.js.map +1 -0
- package/dist/esm/src/http-app.d.ts +8 -0
- package/dist/esm/src/http-app.js +12 -0
- package/dist/esm/src/http-app.js.map +1 -0
- package/dist/esm/src/http.d.ts +131 -32
- package/dist/esm/src/http.js +504 -121
- package/dist/esm/src/http.js.map +1 -1
- package/dist/esm/src/kernel.d.ts +50 -9
- package/dist/esm/src/kernel.js +110 -100
- package/dist/esm/src/kernel.js.map +1 -1
- package/dist/esm/src/logger.d.ts +3 -3
- package/dist/esm/src/logger.js +7 -11
- package/dist/esm/src/logger.js.map +1 -1
- package/dist/esm/src/middleware.d.ts +61 -0
- package/dist/esm/src/middleware.js +90 -0
- package/dist/esm/src/middleware.js.map +1 -0
- package/dist/esm/src/model.d.ts +270 -4
- package/dist/esm/src/model.js +357 -1
- package/dist/esm/src/model.js.map +1 -1
- package/dist/esm/src/module.config.d.ts +149 -4
- package/dist/esm/src/module.config.js +9 -5
- package/dist/esm/src/module.config.js.map +1 -1
- package/dist/esm/src/module.d.ts +14 -32
- package/dist/esm/src/module.js +121 -7
- package/dist/esm/src/module.js.map +1 -1
- package/dist/esm/src/request-parser.d.ts +37 -0
- package/dist/esm/src/request-parser.js +372 -0
- package/dist/esm/src/request-parser.js.map +1 -0
- package/dist/esm/src/router.d.ts +174 -75
- package/dist/esm/src/router.js +463 -285
- package/dist/esm/src/router.js.map +1 -1
- package/dist/esm/src/static-serving.d.ts +32 -4
- package/dist/esm/src/static-serving.js +107 -65
- package/dist/esm/src/static-serving.js.map +1 -1
- package/dist/esm/src/utils.js +1 -0
- package/dist/esm/src/utils.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -2916
- package/index.ts +14 -10
- package/package.json +30 -19
- package/src/controllers.ts +4 -3
- package/src/decorator.ts +242 -104
- package/src/filter.ts +224 -0
- package/src/http-app.ts +11 -0
- package/src/http.ts +501 -100
- package/src/kernel.ts +128 -80
- package/src/logger.ts +4 -6
- package/src/middleware.ts +116 -0
- package/src/model.ts +516 -5
- package/src/module.config.ts +168 -5
- package/src/module.ts +120 -7
- package/src/request-parser.ts +430 -0
- package/src/router.ts +546 -317
- package/src/static-serving.ts +120 -50
- package/src/utils.ts +0 -2
- package/tsconfig.esm.json +7 -7
- package/tsconfig.json +18 -11
- package/tsconfig.spec.json +8 -0
- package/dist/cjs/tests/router.spec.d.ts +0 -1
- package/dist/cjs/tests/router.spec.js +0 -481
- package/dist/cjs/tests/router.spec.js.map +0 -1
- package/dist/esm/tests/router.spec.d.ts +0 -1
- package/dist/esm/tests/router.spec.js +0 -479
- package/dist/esm/tests/router.spec.js.map +0 -1
- package/tests/router.spec.ts +0 -347
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [1.0.1-alpha.160](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.159...v1.0.1-alpha.160) (2025-02-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @deepkit/http
|
|
9
|
+
|
|
10
|
+
## [1.0.1-alpha.158](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.157...v1.0.1-alpha.158) (2025-02-15)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @deepkit/http
|
|
13
|
+
|
|
14
|
+
## [1.0.1-alpha.157](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.156...v1.0.1-alpha.157) (2025-02-15)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **http:** isElementStruct with null ([04e54b0](https://github.com/deepkit/deepkit-framework/commit/04e54b0dd7888592fa9db1adbf3003b1e4abe4fa))
|
|
19
|
+
- **type:** convert TypeAnnotation into intrinsic type ([#629](https://github.com/deepkit/deepkit-framework/issues/629)) ([4d1a13e](https://github.com/deepkit/deepkit-framework/commit/4d1a13ec11536e1951f5e348bd0b43b2244cccca)), closes [#626](https://github.com/deepkit/deepkit-framework/issues/626)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
- **http:** update formidable to ^3.5.2 ([e4007c3](https://github.com/deepkit/deepkit-framework/commit/e4007c39a63dddeb7dadbdd8914cfaa954a059e7))
|
|
24
|
+
- update to angular 19 and typescript 5.7.3, new @deepkit/angular-ssr package ([#627](https://github.com/deepkit/deepkit-framework/issues/627)) ([52333a7](https://github.com/deepkit/deepkit-framework/commit/52333a71f98c7e25a74f048dd57f1efba61098f5))
|
|
25
|
+
|
|
26
|
+
## [1.0.1-alpha.156](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.155...v1.0.1-alpha.156) (2025-01-30)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @deepkit/http
|
|
29
|
+
|
|
30
|
+
## [1.0.1-alpha.155](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.154...v1.0.1-alpha.155) (2024-10-30)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @deepkit/http
|
|
33
|
+
|
|
34
|
+
## [1.0.1-alpha.154](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.153...v1.0.1-alpha.154) (2024-09-06)
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
- **http:** http timeout options ([44fbf56](https://github.com/deepkit/deepkit-framework/commit/44fbf5672344f6296de6f62ca2295be17d88501f))
|
|
39
|
+
|
|
40
|
+
## [1.0.1-alpha.153](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.152...v1.0.1-alpha.153) (2024-06-06)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @deepkit/http
|
|
43
|
+
|
|
44
|
+
## [1.0.1-alpha.151](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.150...v1.0.1-alpha.151) (2024-05-14)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package @deepkit/http
|
|
47
|
+
|
|
48
|
+
## [1.0.1-alpha.150](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.149...v1.0.1-alpha.150) (2024-05-09)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @deepkit/http
|
|
51
|
+
|
|
52
|
+
## [1.0.1-alpha.149](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.148...v1.0.1-alpha.149) (2024-05-07)
|
|
53
|
+
|
|
54
|
+
**Note:** Version bump only for package @deepkit/http
|
|
55
|
+
|
|
56
|
+
## [1.0.1-alpha.148](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.147...v1.0.1-alpha.148) (2024-05-04)
|
|
57
|
+
|
|
58
|
+
**Note:** Version bump only for package @deepkit/http
|
|
59
|
+
|
|
60
|
+
## [1.0.1-alpha.147](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.146...v1.0.1-alpha.147) (2024-05-04)
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
- **http:** support for JSON array payloads ([#564](https://github.com/deepkit/deepkit-framework/issues/564)) ([feeeaa6](https://github.com/deepkit/deepkit-framework/commit/feeeaa6ef9f76d67f85b25f4d243b27ceb00360b))
|
|
65
|
+
|
|
66
|
+
## [1.0.1-alpha.146](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.145...v1.0.1-alpha.146) (2024-04-17)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @deepkit/http
|
|
69
|
+
|
|
70
|
+
## [1.0.1-alpha.145](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.144...v1.0.1-alpha.145) (2024-04-08)
|
|
71
|
+
|
|
72
|
+
### Bug Fixes
|
|
73
|
+
|
|
74
|
+
- **http:** make sure invalid formidable files are skipped ([d1ff09b](https://github.com/deepkit/deepkit-framework/commit/d1ff09ba17e82891b25c192dec7bdf2d9b921f24))
|
|
75
|
+
|
|
76
|
+
## [1.0.1-alpha.143](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.142...v1.0.1-alpha.143) (2024-03-17)
|
|
77
|
+
|
|
78
|
+
### Bug Fixes
|
|
79
|
+
|
|
80
|
+
- **http:** parameter service injection into route methods with encapsulated modules ([9c98f8b](https://github.com/deepkit/deepkit-framework/commit/9c98f8b110078ab35882fece44f45fde34a4feeb))
|
|
81
|
+
|
|
82
|
+
## [1.0.1-alpha.142](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.141...v1.0.1-alpha.142) (2024-03-06)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @deepkit/http
|
|
85
|
+
|
|
86
|
+
## [1.0.1-alpha.141](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.140...v1.0.1-alpha.141) (2024-03-05)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @deepkit/http
|
|
89
|
+
|
|
90
|
+
## [1.0.1-alpha.140](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.139...v1.0.1-alpha.140) (2024-03-02)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @deepkit/http
|
|
93
|
+
|
|
94
|
+
## [1.0.1-alpha.139](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.138...v1.0.1-alpha.139) (2024-02-29)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @deepkit/http
|
|
97
|
+
|
|
98
|
+
## [1.0.1-alpha.138](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.137...v1.0.1-alpha.138) (2024-02-27)
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
- **type:** make sure methods are not part of deserialization/type guard union resolver ([eb08a73](https://github.com/deepkit/deepkit-framework/commit/eb08a73db15c4d66f69646fe9f34b3c884e602a6))
|
|
103
|
+
|
|
104
|
+
## [1.0.1-alpha.137](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.136...v1.0.1-alpha.137) (2024-02-26)
|
|
105
|
+
|
|
106
|
+
### Bug Fixes
|
|
107
|
+
|
|
108
|
+
- **type:** correctly type guard `null` in optional properties ([c0adcb0](https://github.com/deepkit/deepkit-framework/commit/c0adcb00ce100b4c01bc6a1d793396b806464f3c))
|
|
109
|
+
|
|
110
|
+
## [1.0.1-alpha.134](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.133...v1.0.1-alpha.134) (2024-02-15)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @deepkit/http
|
|
113
|
+
|
|
114
|
+
## [1.0.1-alpha.133](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.132...v1.0.1-alpha.133) (2024-02-15)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @deepkit/http
|
|
117
|
+
|
|
118
|
+
## [1.0.1-alpha.132](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.131...v1.0.1-alpha.132) (2024-02-10)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @deepkit/http
|
|
121
|
+
|
|
122
|
+
## [1.0.1-alpha.131](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.130...v1.0.1-alpha.131) (2024-02-09)
|
|
123
|
+
|
|
124
|
+
### Bug Fixes
|
|
125
|
+
|
|
126
|
+
- **http:** make sure all path parameters are available in HttpRequestParser ([e215420](https://github.com/deepkit/deepkit-framework/commit/e215420edf4889d116b01ca0f52109e7167e7b63))
|
|
127
|
+
|
|
128
|
+
## [1.0.1-alpha.130](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.129...v1.0.1-alpha.130) (2024-02-07)
|
|
129
|
+
|
|
130
|
+
### Bug Fixes
|
|
131
|
+
|
|
132
|
+
- **http:** don't include resolver/DI objects into HttpRequestParser ([be189c5](https://github.com/deepkit/deepkit-framework/commit/be189c5bcf8d5d57e5c9a1738e458e370bff2b50))
|
|
133
|
+
|
|
134
|
+
### Features
|
|
135
|
+
|
|
136
|
+
- **http:** allow to fetch unused path parameters in HttpRequestParser ([cc3cd3b](https://github.com/deepkit/deepkit-framework/commit/cc3cd3bc4a0a75906e43ae764bff473a81b09d1b))
|
|
137
|
+
|
|
138
|
+
## [1.0.1-alpha.129](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.128...v1.0.1-alpha.129) (2024-02-07)
|
|
139
|
+
|
|
140
|
+
### Features
|
|
141
|
+
|
|
142
|
+
- **http:** also read path parameters in HttpRequestParser<T> ([888d058](https://github.com/deepkit/deepkit-framework/commit/888d058b900b29fa39a2d77a6aa5e8946f2ee5e7))
|
|
143
|
+
|
|
144
|
+
## [1.0.1-alpha.128](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.127...v1.0.1-alpha.128) (2024-02-06)
|
|
145
|
+
|
|
146
|
+
### Features
|
|
147
|
+
|
|
148
|
+
- **http:** add new HttpRequestParser<T> injection token ([6101f83](https://github.com/deepkit/deepkit-framework/commit/6101f830897e071e72b8e873bda6dbeee69cdc1e))
|
|
149
|
+
|
|
150
|
+
## [1.0.1-alpha.124](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.123...v1.0.1-alpha.124) (2024-02-04)
|
|
151
|
+
|
|
152
|
+
**Note:** Version bump only for package @deepkit/http
|
|
153
|
+
|
|
154
|
+
## [1.0.1-alpha.123](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.122...v1.0.1-alpha.123) (2024-02-02)
|
|
155
|
+
|
|
156
|
+
### Bug Fixes
|
|
157
|
+
|
|
158
|
+
- **injector:** resolve deps of exported providers correctly ([c185b38](https://github.com/deepkit/deepkit-framework/commit/c185b383c3314f08c92b65c76776864a2065a2b8))
|
|
159
|
+
|
|
160
|
+
## [1.0.1-alpha.122](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.121...v1.0.1-alpha.122) (2024-01-31)
|
|
161
|
+
|
|
162
|
+
### Features
|
|
163
|
+
|
|
164
|
+
- **injector:** new Module.configureProvider<T>(Fn) with configuration callback ([1739b95](https://github.com/deepkit/deepkit-framework/commit/1739b9564dcf4d254dd3041dc71945290e06ad4c))
|
|
165
|
+
|
|
166
|
+
## [1.0.1-alpha.121](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.120...v1.0.1-alpha.121) (2024-01-31)
|
|
167
|
+
|
|
168
|
+
### Features
|
|
169
|
+
|
|
170
|
+
- **http:** allow using unknown/any/never types that are nominal ([3221ff0](https://github.com/deepkit/deepkit-framework/commit/3221ff05ad2a2d426aa8da24c94678a672942831))
|
|
171
|
+
|
|
172
|
+
## [1.0.1-alpha.120](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.119...v1.0.1-alpha.120) (2024-01-29)
|
|
173
|
+
|
|
174
|
+
**Note:** Version bump only for package @deepkit/http
|
|
175
|
+
|
|
176
|
+
## [1.0.1-alpha.119](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.118...v1.0.1-alpha.119) (2024-01-28)
|
|
177
|
+
|
|
178
|
+
**Note:** Version bump only for package @deepkit/http
|
|
179
|
+
|
|
180
|
+
## [1.0.1-alpha.118](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.117...v1.0.1-alpha.118) (2024-01-27)
|
|
181
|
+
|
|
182
|
+
**Note:** Version bump only for package @deepkit/http
|
|
183
|
+
|
|
184
|
+
## [1.0.1-alpha.117](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.116...v1.0.1-alpha.117) (2024-01-26)
|
|
185
|
+
|
|
186
|
+
### Features
|
|
187
|
+
|
|
188
|
+
- **http:** support non-class types as DI tokens in route actions ([a296570](https://github.com/deepkit/deepkit-framework/commit/a296570e015df1d3b5539ec66ea5723843178c1b))
|
|
189
|
+
|
|
190
|
+
## [1.0.1-alpha.116](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.115...v1.0.1-alpha.116) (2024-01-22)
|
|
191
|
+
|
|
192
|
+
**Note:** Version bump only for package @deepkit/http
|
|
193
|
+
|
|
194
|
+
## [1.0.1-alpha.115](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.114...v1.0.1-alpha.115) (2024-01-21)
|
|
195
|
+
|
|
196
|
+
**Note:** Version bump only for package @deepkit/http
|
|
197
|
+
|
|
198
|
+
## [1.0.1-alpha.114](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.113...v1.0.1-alpha.114) (2024-01-21)
|
|
199
|
+
|
|
200
|
+
### Bug Fixes
|
|
201
|
+
|
|
202
|
+
- **http:** make sure HttpHeader options is defined ([ea251ed](https://github.com/deepkit/deepkit-framework/commit/ea251ed2c6a2500633ec8d5c1593c29887e31868))
|
|
203
|
+
|
|
204
|
+
## [1.0.1-alpha.113](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.112...v1.0.1-alpha.113) (2024-01-17)
|
|
205
|
+
|
|
206
|
+
**Note:** Version bump only for package @deepkit/http
|
|
207
|
+
|
|
208
|
+
## [1.0.1-alpha.112](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.111...v1.0.1-alpha.112) (2024-01-16)
|
|
209
|
+
|
|
210
|
+
**Note:** Version bump only for package @deepkit/http
|
|
211
|
+
|
|
212
|
+
## [1.0.1-alpha.111](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.110...v1.0.1-alpha.111) (2024-01-15)
|
|
213
|
+
|
|
214
|
+
**Note:** Version bump only for package @deepkit/http
|
|
215
|
+
|
|
216
|
+
## [1.0.1-alpha.110](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.109...v1.0.1-alpha.110) (2024-01-11)
|
|
217
|
+
|
|
218
|
+
**Note:** Version bump only for package @deepkit/http
|
|
219
|
+
|
|
220
|
+
## [1.0.1-alpha.109](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.108...v1.0.1-alpha.109) (2024-01-10)
|
|
221
|
+
|
|
222
|
+
### Bug Fixes
|
|
223
|
+
|
|
224
|
+
- **http:** use default values of route parameters if no http value was provided. ([fa74d16](https://github.com/deepkit/deepkit-framework/commit/fa74d166d5421f8459f64c9b2339b9cf272a1b18)), closes [#529](https://github.com/deepkit/deepkit-framework/issues/529)
|
|
225
|
+
|
|
226
|
+
## [1.0.1-alpha.108](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.107...v1.0.1-alpha.108) (2023-11-21)
|
|
227
|
+
|
|
228
|
+
### Bug Fixes
|
|
229
|
+
|
|
230
|
+
- **http:** fix tests to reflect new error reporting ([1eb83ff](https://github.com/deepkit/deepkit-framework/commit/1eb83ff2ba669fc9410269023e23b863c44e4257))
|
|
231
|
+
|
|
232
|
+
## [1.0.1-alpha.105](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.103...v1.0.1-alpha.105) (2023-10-23)
|
|
233
|
+
|
|
234
|
+
### Bug Fixes
|
|
235
|
+
|
|
236
|
+
- **type:** do not interfere with type checking when intersecting multiple type annotations. ([af85f1f](https://github.com/deepkit/deepkit-framework/commit/af85f1ff48c4be9fbd9a2ecd46e7f97b0bbb28c7))
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export * from './src/decorator';
|
|
2
|
-
export * from './src/http';
|
|
3
|
-
export * from './src/
|
|
4
|
-
export * from './src/
|
|
5
|
-
export * from './src/
|
|
6
|
-
export * from './src/
|
|
7
|
-
export * from './src/
|
|
8
|
-
export * from './src/
|
|
9
|
-
export * from './src/module.
|
|
10
|
-
export * from './src/
|
|
1
|
+
export * from './src/decorator.js';
|
|
2
|
+
export * from './src/http.js';
|
|
3
|
+
export * from './src/http-app.js';
|
|
4
|
+
export * from './src/model.js';
|
|
5
|
+
export * from './src/logger.js';
|
|
6
|
+
export * from './src/router.js';
|
|
7
|
+
export * from './src/static-serving.js';
|
|
8
|
+
export * from './src/kernel.js';
|
|
9
|
+
export * from './src/module.js';
|
|
10
|
+
export * from './src/module.config.js';
|
|
11
|
+
export * from './src/controllers.js';
|
|
12
|
+
export * from './src/middleware.js';
|
|
13
|
+
export * from './src/filter.js';
|
|
14
|
+
export * from './src/utils.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -10,14 +14,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./src/decorator"), exports);
|
|
14
|
-
__exportStar(require("./src/http"), exports);
|
|
15
|
-
__exportStar(require("./src/
|
|
16
|
-
__exportStar(require("./src/
|
|
17
|
-
__exportStar(require("./src/
|
|
18
|
-
__exportStar(require("./src/
|
|
19
|
-
__exportStar(require("./src/
|
|
20
|
-
__exportStar(require("./src/
|
|
21
|
-
__exportStar(require("./src/module.
|
|
22
|
-
__exportStar(require("./src/
|
|
17
|
+
__exportStar(require("./src/decorator.js"), exports);
|
|
18
|
+
__exportStar(require("./src/http.js"), exports);
|
|
19
|
+
__exportStar(require("./src/http-app.js"), exports);
|
|
20
|
+
__exportStar(require("./src/model.js"), exports);
|
|
21
|
+
__exportStar(require("./src/logger.js"), exports);
|
|
22
|
+
__exportStar(require("./src/router.js"), exports);
|
|
23
|
+
__exportStar(require("./src/static-serving.js"), exports);
|
|
24
|
+
__exportStar(require("./src/kernel.js"), exports);
|
|
25
|
+
__exportStar(require("./src/module.js"), exports);
|
|
26
|
+
__exportStar(require("./src/module.config.js"), exports);
|
|
27
|
+
__exportStar(require("./src/controllers.js"), exports);
|
|
28
|
+
__exportStar(require("./src/middleware.js"), exports);
|
|
29
|
+
__exportStar(require("./src/filter.js"), exports);
|
|
30
|
+
__exportStar(require("./src/utils.js"), exports);
|
|
23
31
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,0DAAwC;AACxC,kDAAgC;AAChC,kDAAgC;AAChC,yDAAuC;AACvC,uDAAqC;AACrC,sDAAoC;AACpC,kDAAgC;AAChC,iDAA+B"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ClassType } from '@deepkit/core';
|
|
2
|
+
import { InjectorModule } from '@deepkit/injector';
|
|
2
3
|
export declare class HttpControllers {
|
|
3
|
-
readonly controllers:
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
readonly controllers: {
|
|
5
|
+
controller: ClassType;
|
|
6
|
+
module: InjectorModule<any>;
|
|
7
|
+
}[];
|
|
8
|
+
constructor(controllers?: {
|
|
9
|
+
controller: ClassType;
|
|
10
|
+
module: InjectorModule<any>;
|
|
11
|
+
}[]);
|
|
12
|
+
add(controller: ClassType, module: InjectorModule<any>): void;
|
|
6
13
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HttpControllers = void 0;
|
|
4
|
+
/*@ts-ignore*/
|
|
5
|
+
const { __ΩClassType } = require('@deepkit/core');
|
|
6
|
+
const injector_1 = require("@deepkit/injector");
|
|
4
7
|
class HttpControllers {
|
|
5
|
-
constructor(controllers) {
|
|
8
|
+
constructor(controllers = []) {
|
|
6
9
|
this.controllers = controllers;
|
|
7
10
|
}
|
|
8
|
-
add(controller) {
|
|
9
|
-
this.controllers.push(controller);
|
|
11
|
+
add(controller, module) {
|
|
12
|
+
this.controllers.push({ controller, module });
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
exports.HttpControllers = HttpControllers;
|
|
16
|
+
HttpControllers.__type = [() => __ΩClassType, 'controller', () => injector_1.InjectorModule, 'module', 'controllers', () => [], 'constructor', () => __ΩClassType, () => injector_1.InjectorModule, 'add', 'HttpControllers', 'PPn!4"P"7#4$MF2%:9>&"0\'Pn(2"P"7)2$"0*5w+'];
|
|
13
17
|
//# sourceMappingURL=controllers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controllers.js","sourceRoot":"","sources":["../../../src/controllers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controllers.js","sourceRoot":"","sources":["../../../src/controllers.ts"],"names":[],"mappings":";;;;iCAA0B,eAAe;AACzC,gDAAmD;AAEnD,MAAa,eAAe;IACxB,YAA4B,cAAsE,EAAE;QAAxE,gBAAW,GAAX,WAAW,CAA6D;IACpG,CAAC;IAEM,GAAG,CAAC,UAAqB,EAAE,MAA2B;QACzD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAC,UAAU,EAAE,MAAM,EAAC,CAAC,CAAC;IAChD,CAAC;;AANL,0CAOC"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { ClassType } from '@deepkit/core';
|
|
2
|
-
import { ClassDecoratorResult,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare class HttpController {
|
|
2
|
+
import { ClassDecoratorResult, DecoratorAndFetchSignature, DualDecorator, ExtractApiDataType, ExtractClass, PropertyDecoratorFn, ReceiveType, SerializationOptions, Serializer, Type, UnionToIntersection } from '@deepkit/type';
|
|
3
|
+
import { RouteParameterResolver } from './router.js';
|
|
4
|
+
import { HttpMiddleware, HttpMiddlewareConfig, HttpMiddlewareFn } from './middleware.js';
|
|
5
|
+
type HttpActionMiddleware = (() => HttpMiddlewareConfig) | ClassType<HttpMiddleware> | HttpMiddlewareFn;
|
|
6
|
+
export declare class HttpController {
|
|
7
7
|
baseUrl: string;
|
|
8
|
-
|
|
8
|
+
actions: Set<HttpAction>;
|
|
9
9
|
groups: string[];
|
|
10
|
+
middlewares: (() => HttpMiddlewareConfig)[];
|
|
11
|
+
resolverForToken: Map<any, ClassType>;
|
|
12
|
+
resolverForParameterName: Map<string, ClassType>;
|
|
13
|
+
private actionsProcessed;
|
|
10
14
|
getUrl(action: HttpAction): string;
|
|
11
15
|
addAction(action: HttpAction): void;
|
|
12
16
|
getActions(): Set<HttpAction>;
|
|
17
|
+
removeAction(methodName: string): void;
|
|
13
18
|
getAction(methodName: string): HttpAction;
|
|
14
19
|
}
|
|
15
20
|
export declare class HttpActionParameter {
|
|
16
21
|
name: string;
|
|
17
|
-
type?: 'body' | 'query';
|
|
22
|
+
type?: 'body' | 'query' | 'queries';
|
|
18
23
|
/**
|
|
19
24
|
* undefined = propertyName, '' === root, else given path
|
|
20
25
|
*/
|
|
@@ -26,40 +31,87 @@ export declare class HttpAction {
|
|
|
26
31
|
description: string;
|
|
27
32
|
category: string;
|
|
28
33
|
path: string;
|
|
29
|
-
|
|
34
|
+
httpMethods: string[];
|
|
30
35
|
methodName: string;
|
|
31
36
|
groups: string[];
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
parameters: {
|
|
39
|
-
[name: string]: HttpActionParameter;
|
|
40
|
-
};
|
|
37
|
+
serializer?: Serializer;
|
|
38
|
+
middlewares: (() => HttpMiddlewareConfig)[];
|
|
39
|
+
serializationOptions?: SerializationOptions;
|
|
40
|
+
resolverForToken: Map<any, ClassType>;
|
|
41
|
+
resolverForParameterName: Map<string, ClassType>;
|
|
41
42
|
/**
|
|
42
43
|
* An arbitrary data container the user can use to store app specific settings/values.
|
|
43
44
|
*/
|
|
44
45
|
data: Map<any, any>;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
responses: {
|
|
47
|
+
statusCode: number;
|
|
48
|
+
description: string;
|
|
49
|
+
type?: Type;
|
|
48
50
|
}[];
|
|
49
51
|
}
|
|
50
|
-
export declare class
|
|
52
|
+
export declare class HttpControllerDecorator {
|
|
51
53
|
t: HttpController;
|
|
52
54
|
controller(baseUrl?: string): void;
|
|
53
|
-
|
|
55
|
+
group(...group: string[]): void;
|
|
56
|
+
middleware(...middlewares: HttpActionMiddleware[]): void;
|
|
57
|
+
/**
|
|
58
|
+
* Adds a parameter resolver for parameters based on the class type. Use .resolveParameterByName() for name-based resolving.
|
|
59
|
+
*
|
|
60
|
+
* ```typescript
|
|
61
|
+
*
|
|
62
|
+
* class UserResolver {
|
|
63
|
+
* resolve(context: RouteParameterResolverContext): any | Promise<any> {
|
|
64
|
+
* return new User();
|
|
65
|
+
* }
|
|
66
|
+
* }
|
|
67
|
+
*
|
|
68
|
+
* @http.resolveParameter(User, UserResolver)
|
|
69
|
+
* class MyController {
|
|
70
|
+
*
|
|
71
|
+
* @http.GET()
|
|
72
|
+
* myAction(user: User) {
|
|
73
|
+
* }
|
|
74
|
+
* }
|
|
75
|
+
*
|
|
76
|
+
* new App({providers: [UserResolver]}).run();
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
resolveParameter(classType: ClassType | string | any, resolver: ClassType<RouteParameterResolver>): void;
|
|
80
|
+
/**
|
|
81
|
+
* Adds a parameter resolver for parameters based on its name. Use .resolveParameter() for class-based resolving.
|
|
82
|
+
*
|
|
83
|
+
* ```typescript
|
|
84
|
+
*
|
|
85
|
+
* class UserResolver {
|
|
86
|
+
* resolve(context: RouteParameterResolverContext): any | Promise<any> {
|
|
87
|
+
* return new User();
|
|
88
|
+
* }
|
|
89
|
+
* }
|
|
90
|
+
*
|
|
91
|
+
* @http.resolveParameterByName('user', UserResolver)
|
|
92
|
+
* class MyController {
|
|
93
|
+
*
|
|
94
|
+
* @http.GET()
|
|
95
|
+
* myAction(user: User) {
|
|
96
|
+
* }
|
|
97
|
+
* }
|
|
98
|
+
*
|
|
99
|
+
* new App({providers: [UserResolver]}).run();
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
resolveParameterByName(name: string, resolver: ClassType<RouteParameterResolver>): void;
|
|
54
103
|
setAction(action: HttpAction): void;
|
|
55
104
|
}
|
|
56
|
-
export declare const httpClass: ClassDecoratorResult<typeof
|
|
105
|
+
export declare const httpClass: ClassDecoratorResult<typeof HttpControllerDecorator>;
|
|
106
|
+
export declare function getActions(target: ClassType): HttpAction[];
|
|
57
107
|
export declare class HttpActionDecorator {
|
|
58
108
|
t: HttpAction;
|
|
59
|
-
onDecorator(target: ClassType, property: string): void;
|
|
109
|
+
onDecorator(target: ClassType, property: string | undefined, parameterIndexOrDescriptor?: any): void;
|
|
60
110
|
name(name: string): void;
|
|
61
|
-
setParameter(name: string, parameter: HttpActionParameter): void;
|
|
62
111
|
description(description: string): void;
|
|
112
|
+
serialization(options: SerializationOptions): void;
|
|
113
|
+
serializer(serializer: Serializer): void;
|
|
114
|
+
middleware(...middlewares: HttpActionMiddleware[]): void;
|
|
63
115
|
/**
|
|
64
116
|
* Allows to change the HttpAction object and composite multiple properties into one function.
|
|
65
117
|
*
|
|
@@ -91,78 +143,100 @@ export declare class HttpActionDecorator {
|
|
|
91
143
|
* assets() {}
|
|
92
144
|
* }
|
|
93
145
|
* ```
|
|
94
|
-
|
|
146
|
+
*/
|
|
95
147
|
data(name: string, value: any): void;
|
|
96
148
|
category(category: string): void;
|
|
97
149
|
group(...group: string[]): void;
|
|
98
150
|
GET(path?: string): void;
|
|
151
|
+
HEAD(path?: string): void;
|
|
99
152
|
POST(path?: string): void;
|
|
100
153
|
PUT(path?: string): void;
|
|
101
154
|
DELETE(path?: string): void;
|
|
155
|
+
OPTIONS(path?: string): void;
|
|
156
|
+
TRACE(path?: string): void;
|
|
157
|
+
PATCH(path?: string): void;
|
|
102
158
|
ANY(path?: string): void;
|
|
103
|
-
throws(errorType: ClassType, message?: string): void;
|
|
104
|
-
regexp(parameterName: string, regex: any): void;
|
|
105
|
-
}
|
|
106
|
-
declare class HttpActionParameterDecorator {
|
|
107
|
-
t: HttpActionParameter;
|
|
108
|
-
onDecorator(target: ClassType, propertyName?: string, parameterIndex?: number): void;
|
|
109
159
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
160
|
+
* Adds additional information about what HTTP status codes are available in this route.
|
|
161
|
+
* You can add additionally a description and a response body type.
|
|
162
|
+
*
|
|
163
|
+
* The type is used for serialization for responses with the given statusCode.
|
|
164
|
+
*
|
|
165
|
+
* This information is available in Deepkit API console.
|
|
166
|
+
*
|
|
167
|
+
* ```typescript
|
|
168
|
+
*
|
|
169
|
+
* http.GET().response<boolean>(200, 'All ok')
|
|
170
|
+
*
|
|
171
|
+
* interface User {
|
|
172
|
+
* username: string;
|
|
173
|
+
* }
|
|
174
|
+
* http.GET().response<User>(200, 'User object')
|
|
175
|
+
*
|
|
176
|
+
* interface HttpErrorMessage {
|
|
177
|
+
* error: string;
|
|
178
|
+
* }
|
|
179
|
+
* http.GET().response<HttpErrorMessage>(500, 'Error')
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
response<T>(statusCode: number, description?: string, type?: ReceiveType<T>): void;
|
|
183
|
+
/**
|
|
184
|
+
* Adds a parameter resolver for parameters based on the class type. Use .resolveParameterByName() for name-based resolving.
|
|
113
185
|
*
|
|
114
|
-
* @example
|
|
115
186
|
* ```typescript
|
|
116
|
-
*
|
|
117
|
-
*
|
|
187
|
+
*
|
|
188
|
+
* class UserResolver {
|
|
189
|
+
* resolve(context: RouteParameterResolverContext): any | Promise<any> {
|
|
190
|
+
* return new User();
|
|
191
|
+
* }
|
|
118
192
|
* }
|
|
119
193
|
*
|
|
120
|
-
* class
|
|
194
|
+
* class MyController {
|
|
121
195
|
* @http.GET()
|
|
122
|
-
*
|
|
123
|
-
*
|
|
196
|
+
* @http.resolveParameter(User, UserResolver)
|
|
197
|
+
* myAction(user: User) {
|
|
124
198
|
* }
|
|
125
199
|
* }
|
|
200
|
+
*
|
|
201
|
+
* new App({providers: [UserResolver]}).run();
|
|
126
202
|
* ```
|
|
127
203
|
*/
|
|
128
|
-
|
|
129
|
-
query(path?: string): void;
|
|
130
|
-
get optional(): void;
|
|
204
|
+
resolveParameter(classType: ClassType | string | any, resolver: ClassType<RouteParameterResolver>): void;
|
|
131
205
|
/**
|
|
132
|
-
*
|
|
133
|
-
* and deserialized to the defined type.
|
|
134
|
-
* Define a `path` if you want to parse a subset of the query string only.
|
|
206
|
+
* Adds a parameter resolver for parameters based on its name. Use .resolveParameter() for class-based resolving.
|
|
135
207
|
*
|
|
136
|
-
* Note: Make sure the defined parameter type has optional properties,
|
|
137
|
-
* otherwise it's always required to pass a query string.
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
208
|
* ```typescript
|
|
141
|
-
*
|
|
142
|
-
*
|
|
209
|
+
*
|
|
210
|
+
* class UserResolver {
|
|
211
|
+
* resolve(context: RouteParameterResolverContext): any | Promise<any> {
|
|
212
|
+
* return new User();
|
|
213
|
+
* }
|
|
143
214
|
* }
|
|
144
215
|
*
|
|
145
|
-
* class
|
|
146
|
-
* @http.GET(
|
|
147
|
-
*
|
|
148
|
-
*
|
|
216
|
+
* class MyController {
|
|
217
|
+
* @http.GET()
|
|
218
|
+
* @http.resolveParameterByName('user', UserResolver)
|
|
219
|
+
* myAction(user: User) {
|
|
149
220
|
* }
|
|
150
221
|
* }
|
|
151
222
|
*
|
|
152
|
-
*
|
|
153
|
-
* // -> /my-action?name=Peter
|
|
223
|
+
* new App({providers: [UserResolver]}).run();
|
|
154
224
|
* ```
|
|
155
|
-
*
|
|
156
225
|
*/
|
|
157
|
-
|
|
226
|
+
resolveParameterByName(name: string, resolver: ClassType<RouteParameterResolver>): void;
|
|
158
227
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
228
|
+
type HttpActionFluidDecorator<T, D extends Function> = {
|
|
229
|
+
[name in keyof T]: name extends 'response' ? <T2>(statusCode: number, description?: string, type?: ReceiveType<T2>) => D & HttpActionFluidDecorator<T, D> : T[name] extends (...args: infer K) => any ? (...args: K) => D & HttpActionFluidDecorator<T, D> : D & HttpActionFluidDecorator<T, D> & {
|
|
230
|
+
_data: ExtractApiDataType<T>;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
type HttpActionPropertyDecoratorResult = HttpActionFluidDecorator<ExtractClass<typeof HttpActionDecorator>, PropertyDecoratorFn> & DecoratorAndFetchSignature<typeof HttpActionDecorator, PropertyDecoratorFn>;
|
|
234
|
+
export declare const httpAction: HttpActionPropertyDecoratorResult;
|
|
235
|
+
type HttpMerge<U> = {
|
|
236
|
+
[K in keyof U]: K extends 'response' ? <T2>(statusCode: number, description?: string, type?: ReceiveType<T2>) => PropertyDecoratorFn & U : U[K] extends ((...a: infer A) => infer R) ? R extends DualDecorator ? (...a: A) => PropertyDecoratorFn & R & U : (...a: A) => R : never;
|
|
237
|
+
};
|
|
238
|
+
type MergedHttp<T extends any[]> = HttpMerge<Omit<UnionToIntersection<T[number]>, '_fetch' | 't'>>;
|
|
239
|
+
export type HttpDecorator = PropertyDecoratorFn & HttpActionFluidDecorator<HttpActionDecorator, PropertyDecoratorFn>;
|
|
240
|
+
export declare const http: MergedHttp<[typeof httpClass, typeof httpAction]>;
|
|
168
241
|
export {};
|
|
242
|
+
export declare type __ΩHttpDecorator = any[];
|