@depup/nestjs__common 11.1.16-depup.1

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 (378) hide show
  1. package/LICENSE +22 -0
  2. package/PACKAGE.md +1 -0
  3. package/Readme.md +31 -0
  4. package/changes.json +10 -0
  5. package/constants.d.ts +42 -0
  6. package/constants.js +44 -0
  7. package/decorators/core/apply-decorators.d.ts +10 -0
  8. package/decorators/core/apply-decorators.js +23 -0
  9. package/decorators/core/bind.decorator.d.ts +11 -0
  10. package/decorators/core/bind.decorator.js +19 -0
  11. package/decorators/core/catch.decorator.d.ts +19 -0
  12. package/decorators/core/catch.decorator.js +27 -0
  13. package/decorators/core/controller.decorator.d.ts +102 -0
  14. package/decorators/core/controller.decorator.js +61 -0
  15. package/decorators/core/dependencies.decorator.d.ts +7 -0
  16. package/decorators/core/dependencies.decorator.js +23 -0
  17. package/decorators/core/exception-filters.decorator.d.ts +23 -0
  18. package/decorators/core/exception-filters.decorator.js +43 -0
  19. package/decorators/core/index.d.ts +14 -0
  20. package/decorators/core/index.js +17 -0
  21. package/decorators/core/inject.decorator.d.ts +31 -0
  22. package/decorators/core/inject.decorator.js +53 -0
  23. package/decorators/core/injectable.decorator.d.ts +43 -0
  24. package/decorators/core/injectable.decorator.js +50 -0
  25. package/decorators/core/optional.decorator.d.ts +14 -0
  26. package/decorators/core/optional.decorator.js +29 -0
  27. package/decorators/core/set-metadata.decorator.d.ts +20 -0
  28. package/decorators/core/set-metadata.decorator.js +32 -0
  29. package/decorators/core/use-guards.decorator.d.ts +23 -0
  30. package/decorators/core/use-guards.decorator.js +41 -0
  31. package/decorators/core/use-interceptors.decorator.d.ts +23 -0
  32. package/decorators/core/use-interceptors.decorator.js +42 -0
  33. package/decorators/core/use-pipes.decorator.d.ts +23 -0
  34. package/decorators/core/use-pipes.decorator.js +40 -0
  35. package/decorators/core/version.decorator.d.ts +7 -0
  36. package/decorators/core/version.decorator.js +19 -0
  37. package/decorators/http/create-route-param-metadata.decorator.d.ts +13 -0
  38. package/decorators/http/create-route-param-metadata.decorator.js +32 -0
  39. package/decorators/http/header.decorator.d.ts +15 -0
  40. package/decorators/http/header.decorator.js +25 -0
  41. package/decorators/http/http-code.decorator.d.ts +11 -0
  42. package/decorators/http/http-code.decorator.js +20 -0
  43. package/decorators/http/index.d.ts +8 -0
  44. package/decorators/http/index.js +11 -0
  45. package/decorators/http/redirect.decorator.d.ts +6 -0
  46. package/decorators/http/redirect.decorator.js +15 -0
  47. package/decorators/http/render.decorator.d.ts +12 -0
  48. package/decorators/http/render.decorator.js +21 -0
  49. package/decorators/http/request-mapping.decorator.d.ts +134 -0
  50. package/decorators/http/request-mapping.decorator.js +154 -0
  51. package/decorators/http/route-params.decorator.d.ts +445 -0
  52. package/decorators/http/route-params.decorator.js +265 -0
  53. package/decorators/http/sse.decorator.d.ts +10 -0
  54. package/decorators/http/sse.decorator.js +21 -0
  55. package/decorators/index.d.ts +3 -0
  56. package/decorators/index.js +6 -0
  57. package/decorators/modules/global.decorator.d.ts +12 -0
  58. package/decorators/modules/global.decorator.js +20 -0
  59. package/decorators/modules/index.d.ts +2 -0
  60. package/decorators/modules/index.js +5 -0
  61. package/decorators/modules/module.decorator.d.ts +16 -0
  62. package/decorators/modules/module.decorator.js +29 -0
  63. package/enums/http-status.enum.d.ts +60 -0
  64. package/enums/http-status.enum.js +64 -0
  65. package/enums/index.d.ts +4 -0
  66. package/enums/index.js +7 -0
  67. package/enums/request-method.enum.d.ts +18 -0
  68. package/enums/request-method.enum.js +22 -0
  69. package/enums/route-paramtypes.enum.d.ts +16 -0
  70. package/enums/route-paramtypes.enum.js +20 -0
  71. package/enums/shutdown-signal.enum.d.ts +16 -0
  72. package/enums/shutdown-signal.enum.js +20 -0
  73. package/enums/version-type.enum.d.ts +9 -0
  74. package/enums/version-type.enum.js +13 -0
  75. package/exceptions/bad-gateway.exception.d.ts +35 -0
  76. package/exceptions/bad-gateway.exception.js +43 -0
  77. package/exceptions/bad-request.exception.d.ts +35 -0
  78. package/exceptions/bad-request.exception.js +43 -0
  79. package/exceptions/conflict.exception.d.ts +35 -0
  80. package/exceptions/conflict.exception.js +43 -0
  81. package/exceptions/forbidden.exception.d.ts +35 -0
  82. package/exceptions/forbidden.exception.js +43 -0
  83. package/exceptions/gateway-timeout.exception.d.ts +35 -0
  84. package/exceptions/gateway-timeout.exception.js +43 -0
  85. package/exceptions/gone.exception.d.ts +35 -0
  86. package/exceptions/gone.exception.js +43 -0
  87. package/exceptions/http-version-not-supported.exception.d.ts +35 -0
  88. package/exceptions/http-version-not-supported.exception.js +43 -0
  89. package/exceptions/http.exception.d.ts +85 -0
  90. package/exceptions/http.exception.js +133 -0
  91. package/exceptions/im-a-teapot.exception.d.ts +38 -0
  92. package/exceptions/im-a-teapot.exception.js +46 -0
  93. package/exceptions/index.d.ts +23 -0
  94. package/exceptions/index.js +26 -0
  95. package/exceptions/internal-server-error.exception.d.ts +35 -0
  96. package/exceptions/internal-server-error.exception.js +43 -0
  97. package/exceptions/intrinsic.exception.d.ts +8 -0
  98. package/exceptions/intrinsic.exception.js +12 -0
  99. package/exceptions/method-not-allowed.exception.d.ts +35 -0
  100. package/exceptions/method-not-allowed.exception.js +43 -0
  101. package/exceptions/misdirected.exception.d.ts +35 -0
  102. package/exceptions/misdirected.exception.js +43 -0
  103. package/exceptions/not-acceptable.exception.d.ts +35 -0
  104. package/exceptions/not-acceptable.exception.js +43 -0
  105. package/exceptions/not-found.exception.d.ts +35 -0
  106. package/exceptions/not-found.exception.js +43 -0
  107. package/exceptions/not-implemented.exception.d.ts +35 -0
  108. package/exceptions/not-implemented.exception.js +43 -0
  109. package/exceptions/payload-too-large.exception.d.ts +35 -0
  110. package/exceptions/payload-too-large.exception.js +43 -0
  111. package/exceptions/precondition-failed.exception.d.ts +35 -0
  112. package/exceptions/precondition-failed.exception.js +43 -0
  113. package/exceptions/request-timeout.exception.d.ts +35 -0
  114. package/exceptions/request-timeout.exception.js +43 -0
  115. package/exceptions/service-unavailable.exception.d.ts +35 -0
  116. package/exceptions/service-unavailable.exception.js +43 -0
  117. package/exceptions/unauthorized.exception.d.ts +35 -0
  118. package/exceptions/unauthorized.exception.js +43 -0
  119. package/exceptions/unprocessable-entity.exception.d.ts +35 -0
  120. package/exceptions/unprocessable-entity.exception.js +43 -0
  121. package/exceptions/unsupported-media-type.exception.d.ts +35 -0
  122. package/exceptions/unsupported-media-type.exception.js +43 -0
  123. package/file-stream/index.d.ts +1 -0
  124. package/file-stream/index.js +4 -0
  125. package/file-stream/interfaces/index.d.ts +2 -0
  126. package/file-stream/interfaces/index.js +5 -0
  127. package/file-stream/interfaces/streamable-handler-response.interface.d.ts +12 -0
  128. package/file-stream/interfaces/streamable-handler-response.interface.js +2 -0
  129. package/file-stream/interfaces/streamable-options.interface.d.ts +22 -0
  130. package/file-stream/interfaces/streamable-options.interface.js +2 -0
  131. package/file-stream/streamable-file.d.ts +27 -0
  132. package/file-stream/streamable-file.js +68 -0
  133. package/index.d.ts +11 -0
  134. package/index.js +23 -0
  135. package/interfaces/abstract.interface.d.ts +3 -0
  136. package/interfaces/abstract.interface.js +2 -0
  137. package/interfaces/controllers/controller-metadata.interface.d.ts +3 -0
  138. package/interfaces/controllers/controller-metadata.interface.js +2 -0
  139. package/interfaces/controllers/controller.interface.d.ts +1 -0
  140. package/interfaces/controllers/controller.interface.js +2 -0
  141. package/interfaces/controllers/index.d.ts +2 -0
  142. package/interfaces/controllers/index.js +5 -0
  143. package/interfaces/exceptions/exception-filter-metadata.interface.d.ts +6 -0
  144. package/interfaces/exceptions/exception-filter-metadata.interface.js +2 -0
  145. package/interfaces/exceptions/exception-filter.interface.d.ts +18 -0
  146. package/interfaces/exceptions/exception-filter.interface.js +2 -0
  147. package/interfaces/exceptions/index.d.ts +5 -0
  148. package/interfaces/exceptions/index.js +8 -0
  149. package/interfaces/exceptions/rpc-exception-filter-metadata.interface.d.ts +6 -0
  150. package/interfaces/exceptions/rpc-exception-filter-metadata.interface.js +2 -0
  151. package/interfaces/exceptions/rpc-exception-filter.interface.d.ts +19 -0
  152. package/interfaces/exceptions/rpc-exception-filter.interface.js +2 -0
  153. package/interfaces/exceptions/ws-exception-filter.interface.d.ts +18 -0
  154. package/interfaces/exceptions/ws-exception-filter.interface.js +2 -0
  155. package/interfaces/external/class-transform-options.interface.d.ts +65 -0
  156. package/interfaces/external/class-transform-options.interface.js +2 -0
  157. package/interfaces/external/cors-options.interface.d.ts +58 -0
  158. package/interfaces/external/cors-options.interface.js +2 -0
  159. package/interfaces/external/https-options.interface.d.ts +105 -0
  160. package/interfaces/external/https-options.interface.js +2 -0
  161. package/interfaces/external/transformer-package.interface.d.ts +6 -0
  162. package/interfaces/external/transformer-package.interface.js +2 -0
  163. package/interfaces/external/validation-error.interface.d.ts +42 -0
  164. package/interfaces/external/validation-error.interface.js +2 -0
  165. package/interfaces/external/validator-options.interface.d.ts +76 -0
  166. package/interfaces/external/validator-options.interface.js +2 -0
  167. package/interfaces/external/validator-package.interface.d.ts +5 -0
  168. package/interfaces/external/validator-package.interface.js +2 -0
  169. package/interfaces/features/arguments-host.interface.d.ts +88 -0
  170. package/interfaces/features/arguments-host.interface.js +2 -0
  171. package/interfaces/features/can-activate.interface.d.ts +22 -0
  172. package/interfaces/features/can-activate.interface.js +2 -0
  173. package/interfaces/features/custom-route-param-factory.interface.d.ts +5 -0
  174. package/interfaces/features/custom-route-param-factory.interface.js +2 -0
  175. package/interfaces/features/execution-context.interface.d.ts +20 -0
  176. package/interfaces/features/execution-context.interface.js +2 -0
  177. package/interfaces/features/nest-interceptor.interface.d.ts +34 -0
  178. package/interfaces/features/nest-interceptor.interface.js +2 -0
  179. package/interfaces/features/paramtype.interface.d.ts +4 -0
  180. package/interfaces/features/paramtype.interface.js +2 -0
  181. package/interfaces/features/pipe-transform.interface.d.ts +42 -0
  182. package/interfaces/features/pipe-transform.interface.js +2 -0
  183. package/interfaces/global-prefix-options.interface.d.ts +7 -0
  184. package/interfaces/global-prefix-options.interface.js +2 -0
  185. package/interfaces/hooks/before-application-shutdown.interface.d.ts +3 -0
  186. package/interfaces/hooks/before-application-shutdown.interface.js +2 -0
  187. package/interfaces/hooks/index.d.ts +5 -0
  188. package/interfaces/hooks/index.js +8 -0
  189. package/interfaces/hooks/on-application-bootstrap.interface.d.ts +11 -0
  190. package/interfaces/hooks/on-application-bootstrap.interface.js +2 -0
  191. package/interfaces/hooks/on-application-shutdown.interface.d.ts +11 -0
  192. package/interfaces/hooks/on-application-shutdown.interface.js +2 -0
  193. package/interfaces/hooks/on-destroy.interface.d.ts +12 -0
  194. package/interfaces/hooks/on-destroy.interface.js +2 -0
  195. package/interfaces/hooks/on-init.interface.d.ts +10 -0
  196. package/interfaces/hooks/on-init.interface.js +2 -0
  197. package/interfaces/http/http-exception-body.interface.d.ts +6 -0
  198. package/interfaces/http/http-exception-body.interface.js +2 -0
  199. package/interfaces/http/http-redirect-response.interface.d.ts +5 -0
  200. package/interfaces/http/http-redirect-response.interface.js +2 -0
  201. package/interfaces/http/http-server.interface.d.ts +70 -0
  202. package/interfaces/http/http-server.interface.js +2 -0
  203. package/interfaces/http/index.d.ts +5 -0
  204. package/interfaces/http/index.js +8 -0
  205. package/interfaces/http/message-event.interface.d.ts +6 -0
  206. package/interfaces/http/message-event.interface.js +2 -0
  207. package/interfaces/http/raw-body-request.interface.d.ts +6 -0
  208. package/interfaces/http/raw-body-request.interface.js +2 -0
  209. package/interfaces/index.d.ts +30 -0
  210. package/interfaces/index.js +33 -0
  211. package/interfaces/injectable.interface.d.ts +1 -0
  212. package/interfaces/injectable.interface.js +2 -0
  213. package/interfaces/microservices/nest-hybrid-application-options.interface.d.ts +7 -0
  214. package/interfaces/microservices/nest-hybrid-application-options.interface.js +2 -0
  215. package/interfaces/microservices/nest-microservice-options.interface.d.ts +5 -0
  216. package/interfaces/microservices/nest-microservice-options.interface.js +2 -0
  217. package/interfaces/middleware/index.d.ts +4 -0
  218. package/interfaces/middleware/index.js +7 -0
  219. package/interfaces/middleware/middleware-config-proxy.interface.d.ts +24 -0
  220. package/interfaces/middleware/middleware-config-proxy.interface.js +2 -0
  221. package/interfaces/middleware/middleware-configuration.interface.d.ts +12 -0
  222. package/interfaces/middleware/middleware-configuration.interface.js +2 -0
  223. package/interfaces/middleware/middleware-consumer.interface.d.ts +18 -0
  224. package/interfaces/middleware/middleware-consumer.interface.js +2 -0
  225. package/interfaces/middleware/nest-middleware.interface.d.ts +8 -0
  226. package/interfaces/middleware/nest-middleware.interface.js +2 -0
  227. package/interfaces/modules/dynamic-module.interface.d.ts +25 -0
  228. package/interfaces/modules/dynamic-module.interface.js +2 -0
  229. package/interfaces/modules/forward-reference.interface.d.ts +3 -0
  230. package/interfaces/modules/forward-reference.interface.js +2 -0
  231. package/interfaces/modules/index.d.ts +8 -0
  232. package/interfaces/modules/index.js +11 -0
  233. package/interfaces/modules/injection-token.interface.d.ts +6 -0
  234. package/interfaces/modules/injection-token.interface.js +2 -0
  235. package/interfaces/modules/introspection-result.interface.d.ts +10 -0
  236. package/interfaces/modules/introspection-result.interface.js +2 -0
  237. package/interfaces/modules/module-metadata.interface.d.ts +34 -0
  238. package/interfaces/modules/module-metadata.interface.js +2 -0
  239. package/interfaces/modules/nest-module.interface.d.ts +7 -0
  240. package/interfaces/modules/nest-module.interface.js +2 -0
  241. package/interfaces/modules/optional-factory-dependency.interface.d.ts +8 -0
  242. package/interfaces/modules/optional-factory-dependency.interface.js +2 -0
  243. package/interfaces/modules/provider.interface.d.ts +156 -0
  244. package/interfaces/modules/provider.interface.js +2 -0
  245. package/interfaces/nest-application-context-options.interface.d.ts +68 -0
  246. package/interfaces/nest-application-context-options.interface.js +9 -0
  247. package/interfaces/nest-application-context.interface.d.ts +139 -0
  248. package/interfaces/nest-application-context.interface.js +2 -0
  249. package/interfaces/nest-application-options.interface.d.ts +29 -0
  250. package/interfaces/nest-application-options.interface.js +2 -0
  251. package/interfaces/nest-application.interface.d.ts +135 -0
  252. package/interfaces/nest-application.interface.js +2 -0
  253. package/interfaces/nest-microservice.interface.d.ts +75 -0
  254. package/interfaces/nest-microservice.interface.js +2 -0
  255. package/interfaces/scope-options.interface.d.ts +37 -0
  256. package/interfaces/scope-options.interface.js +23 -0
  257. package/interfaces/shutdown-hooks-options.interface.d.ts +21 -0
  258. package/interfaces/shutdown-hooks-options.interface.js +2 -0
  259. package/interfaces/type.interface.d.ts +3 -0
  260. package/interfaces/type.interface.js +2 -0
  261. package/interfaces/version-options.interface.d.ts +92 -0
  262. package/interfaces/version-options.interface.js +9 -0
  263. package/interfaces/websockets/web-socket-adapter.interface.d.ts +19 -0
  264. package/interfaces/websockets/web-socket-adapter.interface.js +2 -0
  265. package/module-utils/configurable-module.builder.d.ts +93 -0
  266. package/module-utils/configurable-module.builder.js +219 -0
  267. package/module-utils/constants.d.ts +9 -0
  268. package/module-utils/constants.js +19 -0
  269. package/module-utils/index.d.ts +2 -0
  270. package/module-utils/index.js +5 -0
  271. package/module-utils/interfaces/configurable-module-async-options.interface.d.ts +42 -0
  272. package/module-utils/interfaces/configurable-module-async-options.interface.js +2 -0
  273. package/module-utils/interfaces/configurable-module-cls.interface.d.ts +13 -0
  274. package/module-utils/interfaces/configurable-module-cls.interface.js +2 -0
  275. package/module-utils/interfaces/configurable-module-host.interface.d.ts +62 -0
  276. package/module-utils/interfaces/configurable-module-host.interface.js +2 -0
  277. package/module-utils/interfaces/index.d.ts +3 -0
  278. package/module-utils/interfaces/index.js +6 -0
  279. package/module-utils/utils/generate-options-injection-token.util.d.ts +1 -0
  280. package/module-utils/utils/generate-options-injection-token.util.js +8 -0
  281. package/module-utils/utils/get-injection-providers.util.d.ts +8 -0
  282. package/module-utils/utils/get-injection-providers.util.js +35 -0
  283. package/module-utils/utils/index.d.ts +2 -0
  284. package/module-utils/utils/index.js +5 -0
  285. package/package.json +61 -0
  286. package/pipes/default-value.pipe.d.ts +13 -0
  287. package/pipes/default-value.pipe.js +30 -0
  288. package/pipes/file/file-type.validator.d.ts +62 -0
  289. package/pipes/file/file-type.validator.js +102 -0
  290. package/pipes/file/file-validator-context.interface.d.ts +5 -0
  291. package/pipes/file/file-validator-context.interface.js +2 -0
  292. package/pipes/file/file-validator.interface.d.ts +21 -0
  293. package/pipes/file/file-validator.interface.js +15 -0
  294. package/pipes/file/index.d.ts +6 -0
  295. package/pipes/file/index.js +9 -0
  296. package/pipes/file/interfaces/file.interface.d.ts +5 -0
  297. package/pipes/file/interfaces/file.interface.js +2 -0
  298. package/pipes/file/interfaces/index.d.ts +1 -0
  299. package/pipes/file/interfaces/index.js +4 -0
  300. package/pipes/file/max-file-size.validator.d.ts +44 -0
  301. package/pipes/file/max-file-size.validator.js +37 -0
  302. package/pipes/file/parse-file-options.interface.d.ts +15 -0
  303. package/pipes/file/parse-file-options.interface.js +2 -0
  304. package/pipes/file/parse-file-pipe.builder.d.ts +15 -0
  305. package/pipes/file/parse-file-pipe.builder.js +33 -0
  306. package/pipes/file/parse-file.pipe.d.ts +28 -0
  307. package/pipes/file/parse-file.pipe.js +76 -0
  308. package/pipes/index.d.ts +10 -0
  309. package/pipes/index.js +13 -0
  310. package/pipes/parse-array.pipe.d.ts +52 -0
  311. package/pipes/parse-array.pipe.js +148 -0
  312. package/pipes/parse-bool.pipe.d.ts +55 -0
  313. package/pipes/parse-bool.pipe.js +67 -0
  314. package/pipes/parse-date.pipe.d.ts +37 -0
  315. package/pipes/parse-date.pipe.js +42 -0
  316. package/pipes/parse-enum.pipe.d.ts +46 -0
  317. package/pipes/parse-enum.pipe.js +55 -0
  318. package/pipes/parse-float.pipe.d.ts +49 -0
  319. package/pipes/parse-float.pipe.js +56 -0
  320. package/pipes/parse-int.pipe.d.ts +48 -0
  321. package/pipes/parse-int.pipe.js +57 -0
  322. package/pipes/parse-uuid.pipe.d.ts +49 -0
  323. package/pipes/parse-uuid.pipe.js +57 -0
  324. package/pipes/validation.pipe.d.ts +51 -0
  325. package/pipes/validation.pipe.js +245 -0
  326. package/serializer/class-serializer.constants.d.ts +1 -0
  327. package/serializer/class-serializer.constants.js +4 -0
  328. package/serializer/class-serializer.interceptor.d.ts +29 -0
  329. package/serializer/class-serializer.interceptor.js +77 -0
  330. package/serializer/class-serializer.interfaces.d.ts +8 -0
  331. package/serializer/class-serializer.interfaces.js +2 -0
  332. package/serializer/decorators/index.d.ts +1 -0
  333. package/serializer/decorators/index.js +4 -0
  334. package/serializer/decorators/serialize-options.decorator.d.ts +5 -0
  335. package/serializer/decorators/serialize-options.decorator.js +10 -0
  336. package/serializer/index.d.ts +3 -0
  337. package/serializer/index.js +6 -0
  338. package/services/console-logger.service.d.ts +202 -0
  339. package/services/console-logger.service.js +379 -0
  340. package/services/index.d.ts +3 -0
  341. package/services/index.js +6 -0
  342. package/services/logger.service.d.ts +152 -0
  343. package/services/logger.service.js +251 -0
  344. package/services/utils/filter-log-levels.util.d.ts +5 -0
  345. package/services/utils/filter-log-levels.util.js +23 -0
  346. package/services/utils/index.d.ts +3 -0
  347. package/services/utils/index.js +6 -0
  348. package/services/utils/is-log-level-enabled.util.d.ts +7 -0
  349. package/services/utils/is-log-level-enabled.util.js +32 -0
  350. package/services/utils/is-log-level.util.d.ts +5 -0
  351. package/services/utils/is-log-level.util.js +10 -0
  352. package/tsconfig.build.json +10 -0
  353. package/utils/assign-custom-metadata.util.d.ts +4 -0
  354. package/utils/assign-custom-metadata.util.js +15 -0
  355. package/utils/cli-colors.util.d.ts +10 -0
  356. package/utils/cli-colors.util.js +15 -0
  357. package/utils/extend-metadata.util.d.ts +1 -0
  358. package/utils/extend-metadata.util.js +8 -0
  359. package/utils/forward-ref.util.d.ts +5 -0
  360. package/utils/forward-ref.util.js +10 -0
  361. package/utils/http-error-by-code.util.d.ts +4 -0
  362. package/utils/http-error-by-code.util.js +26 -0
  363. package/utils/index.d.ts +1 -0
  364. package/utils/index.js +4 -0
  365. package/utils/load-package.util.d.ts +1 -0
  366. package/utils/load-package.util.js +16 -0
  367. package/utils/merge-with-values.util.d.ts +4 -0
  368. package/utils/merge-with-values.util.js +18 -0
  369. package/utils/random-string-generator.util.d.ts +1 -0
  370. package/utils/random-string-generator.util.js +6 -0
  371. package/utils/select-exception-filter-metadata.util.d.ts +2 -0
  372. package/utils/select-exception-filter-metadata.util.js +6 -0
  373. package/utils/shared.utils.d.ts +13 -0
  374. package/utils/shared.utils.js +51 -0
  375. package/utils/validate-each.util.d.ts +8 -0
  376. package/utils/validate-each.util.js +25 -0
  377. package/utils/validate-module-keys.util.d.ts +2 -0
  378. package/utils/validate-module-keys.util.js +22 -0
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamableFile = void 0;
4
+ const stream_1 = require("stream");
5
+ const util_1 = require("util");
6
+ const enums_1 = require("../enums");
7
+ const services_1 = require("../services");
8
+ const shared_utils_1 = require("../utils/shared.utils");
9
+ /**
10
+ * @see [Streaming files](https://docs.nestjs.com/techniques/streaming-files)
11
+ *
12
+ * @publicApi
13
+ */
14
+ class StreamableFile {
15
+ constructor(bufferOrReadStream, options = {}) {
16
+ this.options = options;
17
+ this.logger = new services_1.Logger('StreamableFile');
18
+ this.handleError = (err, res) => {
19
+ if (res.destroyed) {
20
+ return;
21
+ }
22
+ if (res.headersSent) {
23
+ res.end();
24
+ return;
25
+ }
26
+ res.statusCode = enums_1.HttpStatus.BAD_REQUEST;
27
+ res.send(err.message);
28
+ };
29
+ this.logError = (err) => {
30
+ this.logger.error(err);
31
+ };
32
+ if (util_1.types.isUint8Array(bufferOrReadStream)) {
33
+ this.stream = new stream_1.Readable();
34
+ this.stream.push(bufferOrReadStream);
35
+ this.stream.push(null);
36
+ this.options.length ??= bufferOrReadStream.length;
37
+ }
38
+ else if (bufferOrReadStream.pipe && (0, shared_utils_1.isFunction)(bufferOrReadStream.pipe)) {
39
+ this.stream = bufferOrReadStream;
40
+ }
41
+ }
42
+ getStream() {
43
+ return this.stream;
44
+ }
45
+ getHeaders() {
46
+ const { type = 'application/octet-stream', disposition = undefined, length = undefined, } = this.options;
47
+ return {
48
+ type,
49
+ disposition,
50
+ length,
51
+ };
52
+ }
53
+ get errorHandler() {
54
+ return this.handleError;
55
+ }
56
+ setErrorHandler(handler) {
57
+ this.handleError = handler;
58
+ return this;
59
+ }
60
+ get errorLogger() {
61
+ return this.logError;
62
+ }
63
+ setErrorLogger(handler) {
64
+ this.logError = handler;
65
+ return this;
66
+ }
67
+ }
68
+ exports.StreamableFile = StreamableFile;
package/index.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ import 'reflect-metadata';
2
+ export * from './decorators';
3
+ export * from './enums';
4
+ export * from './exceptions';
5
+ export * from './file-stream';
6
+ export { Abstract, ArgumentMetadata, ArgumentsHost, BeforeApplicationShutdown, CallHandler, CanActivate, ClassProvider, ContextType, DynamicModule, ExceptionFilter, ExecutionContext, ExistingProvider, FactoryProvider, ForwardReference, HttpServer, HttpExceptionBody, HttpExceptionBodyMessage, HttpRedirectResponse, INestApplication, INestApplicationContext, INestMicroservice, InjectionToken, IntrospectionResult, MessageEvent, MiddlewareConsumer, ModuleMetadata, NestApplicationOptions, NestHybridApplicationOptions, NestInterceptor, NestMiddleware, NestModule, OnApplicationBootstrap, OnApplicationShutdown, OnModuleDestroy, OnModuleInit, OptionalFactoryDependency, Paramtype, PipeTransform, Provider, RawBodyRequest, RpcExceptionFilter, Scope, ScopeOptions, Type, ValidationError, ValueProvider, VersioningOptions, VERSION_NEUTRAL, WebSocketAdapter, WsExceptionFilter, WsMessageHandler, } from './interfaces';
7
+ export * from './module-utils';
8
+ export * from './pipes';
9
+ export * from './serializer';
10
+ export * from './services';
11
+ export * from './utils';
package/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VERSION_NEUTRAL = exports.Scope = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /*
6
+ * Nest @common
7
+ * Copyright(c) 2017 - 2025 Kamil Mysliwiec
8
+ * https://nestjs.com
9
+ * MIT Licensed
10
+ */
11
+ require("reflect-metadata");
12
+ tslib_1.__exportStar(require("./decorators"), exports);
13
+ tslib_1.__exportStar(require("./enums"), exports);
14
+ tslib_1.__exportStar(require("./exceptions"), exports);
15
+ tslib_1.__exportStar(require("./file-stream"), exports);
16
+ var interfaces_1 = require("./interfaces");
17
+ Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return interfaces_1.Scope; } });
18
+ Object.defineProperty(exports, "VERSION_NEUTRAL", { enumerable: true, get: function () { return interfaces_1.VERSION_NEUTRAL; } });
19
+ tslib_1.__exportStar(require("./module-utils"), exports);
20
+ tslib_1.__exportStar(require("./pipes"), exports);
21
+ tslib_1.__exportStar(require("./serializer"), exports);
22
+ tslib_1.__exportStar(require("./services"), exports);
23
+ tslib_1.__exportStar(require("./utils"), exports);
@@ -0,0 +1,3 @@
1
+ export interface Abstract<T> extends Function {
2
+ prototype: T;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface ControllerMetadata {
2
+ path?: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type Controller = object;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './controller-metadata.interface';
2
+ export * from './controller.interface';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./controller-metadata.interface"), exports);
5
+ tslib_1.__exportStar(require("./controller.interface"), exports);
@@ -0,0 +1,6 @@
1
+ import { ExceptionFilter } from './exception-filter.interface';
2
+ import { Type } from '../type.interface';
3
+ export interface ExceptionFilterMetadata {
4
+ func: ExceptionFilter['catch'];
5
+ exceptionMetatypes: Type<any>[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { ArgumentsHost } from '../features/arguments-host.interface';
2
+ /**
3
+ * Interface describing implementation of an exception filter.
4
+ *
5
+ * @see [Exception Filters](https://docs.nestjs.com/exception-filters)
6
+ *
7
+ * @publicApi
8
+ */
9
+ export interface ExceptionFilter<T = any> {
10
+ /**
11
+ * Method to implement a custom exception filter.
12
+ *
13
+ * @param exception the class of the exception being handled
14
+ * @param host used to access an array of arguments for
15
+ * the in-flight request
16
+ */
17
+ catch(exception: T, host: ArgumentsHost): any;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export * from './exception-filter-metadata.interface';
2
+ export * from './exception-filter.interface';
3
+ export * from './rpc-exception-filter-metadata.interface';
4
+ export * from './rpc-exception-filter.interface';
5
+ export * from './ws-exception-filter.interface';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./exception-filter-metadata.interface"), exports);
5
+ tslib_1.__exportStar(require("./exception-filter.interface"), exports);
6
+ tslib_1.__exportStar(require("./rpc-exception-filter-metadata.interface"), exports);
7
+ tslib_1.__exportStar(require("./rpc-exception-filter.interface"), exports);
8
+ tslib_1.__exportStar(require("./ws-exception-filter.interface"), exports);
@@ -0,0 +1,6 @@
1
+ import { RpcExceptionFilter } from './rpc-exception-filter.interface';
2
+ import { Type } from '../type.interface';
3
+ export interface RpcExceptionFilterMetadata {
4
+ func: RpcExceptionFilter['catch'];
5
+ exceptionMetatypes: Type<any>[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ArgumentsHost } from '../features/arguments-host.interface';
3
+ /**
4
+ * Interface describing implementation of an RPC exception filter.
5
+ *
6
+ * @see [Exception Filters](https://docs.nestjs.com/microservices/exception-filters)
7
+ *
8
+ * @publicApi
9
+ */
10
+ export interface RpcExceptionFilter<T = any, R = any> {
11
+ /**
12
+ * Method to implement a custom (microservice) exception filter.
13
+ *
14
+ * @param exception the type (class) of the exception being handled
15
+ * @param host used to access an array of arguments for
16
+ * the in-flight message
17
+ */
18
+ catch(exception: T, host: ArgumentsHost): Observable<R>;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { ArgumentsHost } from '../features/arguments-host.interface';
2
+ /**
3
+ * Interface describing implementation of a Web Sockets exception filter.
4
+ *
5
+ * @see [Exception Filters](https://docs.nestjs.com/websockets/exception-filters)
6
+ *
7
+ * @publicApi
8
+ */
9
+ export interface WsExceptionFilter<T = any> {
10
+ /**
11
+ * Method to implement a custom (web sockets) exception filter.
12
+ *
13
+ * @param exception the type (class) of the exception being handled
14
+ * @param host used to access an array of arguments for
15
+ * the in-flight message catch(exception: T, host: ArgumentsHost): any;
16
+ */
17
+ catch(exception: T, host: ArgumentsHost): any;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Options to be passed during transformation.
3
+ *
4
+ * @see https://github.com/typestack/class-transformer
5
+ *
6
+ * @publicApi
7
+ */
8
+ export interface ClassTransformOptions {
9
+ /**
10
+ * Exclusion strategy. By default exposeAll is used, which means that it will expose all properties that
11
+ * are transformed by default.
12
+ */
13
+ strategy?: 'excludeAll' | 'exposeAll';
14
+ /**
15
+ * Only properties with given groups will be transformed.
16
+ */
17
+ groups?: string[];
18
+ /**
19
+ * Only properties with "since" > version < "until" will be transformed.
20
+ */
21
+ version?: number;
22
+ /**
23
+ * Excludes properties with the given prefixes. For example, if you mark your private properties with "_" and "__"
24
+ * you can set this option's value to ["_", "__"] and all private properties will be skipped.
25
+ * This works only for "exposeAll" strategy.
26
+ */
27
+ excludePrefixes?: string[];
28
+ /**
29
+ * If set to true then class transformer will ignore all @Expose and @Exclude decorators and what's inside them.
30
+ * This option is useful if you want to "clone" your object but not apply decorators affects.
31
+ */
32
+ ignoreDecorators?: boolean;
33
+ /**
34
+ * Target maps allows to set a Types of the transforming object without using @Type decorator.
35
+ * This is useful when you are transforming external classes, or if you already have type metadata for
36
+ * objects and you don't want to set it up again.
37
+ */
38
+ targetMaps?: any[];
39
+ /**
40
+ * If set to true then class transformer will perform a circular check. (Circular check is turned off by default)
41
+ * This option is useful when you know for sure that your types might have a circular dependency.
42
+ */
43
+ enableCircularCheck?: boolean;
44
+ /**
45
+ * If set to true class-transformer will attempt conversion based on TS reflected type
46
+ */
47
+ enableImplicitConversion?: boolean;
48
+ /**
49
+ * If set to true class-transformer will exclude properties which are not part of the original class
50
+ * and exposing all class properties (with undefined, if nothing else is given)
51
+ */
52
+ excludeExtraneousValues?: boolean;
53
+ /**
54
+ * If set to true then class transformer will take default values for unprovided fields.
55
+ * This is useful when you convert a plain object to a class and have an optional field with a default value.
56
+ */
57
+ exposeDefaultValues?: boolean;
58
+ /**
59
+ * When set to true, fields with `undefined` as value will be included in class to plain transformation. Otherwise
60
+ * those fields will be omitted from the result.
61
+ *
62
+ * DEFAULT: `true`
63
+ */
64
+ exposeUnsetFields?: boolean;
65
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,58 @@
1
+ type StaticOrigin = boolean | string | RegExp | (string | RegExp)[];
2
+ /**
3
+ * Set origin to a function implementing some custom logic. The function takes the
4
+ * request origin as the first parameter and a callback (which expects the signature
5
+ * err [object], allow [bool]) as the second.
6
+ *
7
+ * @see https://github.com/expressjs/cors
8
+ *
9
+ * @publicApi
10
+ */
11
+ export type CustomOrigin = (requestOrigin: string | undefined, callback: (err: Error | null, origin?: StaticOrigin) => void) => void;
12
+ /**
13
+ * Interface describing CORS options that can be set.
14
+ *
15
+ * @see https://github.com/expressjs/cors
16
+ * @publicApi
17
+ */
18
+ export interface CorsOptions {
19
+ /**
20
+ * Configures the `Access-Control-Allow-Origins` CORS header. See [here for more detail.](https://github.com/expressjs/cors#configuration-options)
21
+ */
22
+ origin?: StaticOrigin | CustomOrigin;
23
+ /**
24
+ * Configures the Access-Control-Allow-Methods CORS header.
25
+ */
26
+ methods?: string | string[];
27
+ /**
28
+ * Configures the Access-Control-Allow-Headers CORS header.
29
+ */
30
+ allowedHeaders?: string | string[];
31
+ /**
32
+ * Configures the Access-Control-Expose-Headers CORS header.
33
+ */
34
+ exposedHeaders?: string | string[];
35
+ /**
36
+ * Configures the Access-Control-Allow-Credentials CORS header.
37
+ */
38
+ credentials?: boolean;
39
+ /**
40
+ * Configures the Access-Control-Max-Age CORS header.
41
+ */
42
+ maxAge?: number;
43
+ /**
44
+ * Whether to pass the CORS preflight response to the next handler.
45
+ */
46
+ preflightContinue?: boolean;
47
+ /**
48
+ * Provides a status code to use for successful OPTIONS requests.
49
+ */
50
+ optionsSuccessStatus?: number;
51
+ }
52
+ export interface CorsOptionsCallback {
53
+ (error: Error | null, options: CorsOptions): void;
54
+ }
55
+ export interface CorsOptionsDelegate<T> {
56
+ (req: T, cb: CorsOptionsCallback): void;
57
+ }
58
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Interface describing Https Options that can be set.
3
+ *
4
+ * @see https://nodejs.org/api/tls.html
5
+ *
6
+ * @publicApi
7
+ */
8
+ export interface HttpsOptions {
9
+ /**
10
+ * PFX or PKCS12 encoded private key and certificate chain. pfx is an alternative
11
+ * to providing key and cert individually. PFX is usually encrypted, if it is,
12
+ * passphrase will be used to decrypt it. Multiple PFX can be provided either
13
+ * as an array of unencrypted PFX buffers, or an array of objects in the form
14
+ * {buf: <string|buffer>[, passphrase: <string>]}. The object form can only
15
+ * occur in an array. object.passphrase is optional. Encrypted PFX will be decrypted
16
+ * with object.passphrase if provided, or options.passphrase if it is not.
17
+ */
18
+ pfx?: any;
19
+ /**
20
+ * Private keys in PEM format. PEM allows the option of private keys being encrypted.
21
+ * Encrypted keys will be decrypted with options.passphrase. Multiple keys using
22
+ * different algorithms can be provided either as an array of unencrypted key
23
+ * strings or buffers, or an array of objects in the form {pem: <string|buffer>[, passphrase: <string>]}.
24
+ * The object form can only occur in an array. object.passphrase is optional.
25
+ * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase
26
+ * if it is not
27
+ */
28
+ key?: any;
29
+ /**
30
+ * Shared passphrase used for a single private key and/or a PFX.
31
+ */
32
+ passphrase?: string;
33
+ /**
34
+ * Cert chains in PEM format. One cert chain should be provided per private key.
35
+ * Each cert chain should consist of the PEM formatted certificate for a provided
36
+ * private key, followed by the PEM formatted intermediate certificates (if any),
37
+ * in order, and not including the root CA (the root CA must be pre-known to the
38
+ * peer, see ca). When providing multiple cert chains, they do not have to be
39
+ * in the same order as their private keys in key. If the intermediate certificates
40
+ * are not provided, the peer will not be able to validate the certificate, and
41
+ * the handshake will fail.
42
+ */
43
+ cert?: any;
44
+ /**
45
+ * Optionally override the trusted CA certificates. Default is to trust the well-known
46
+ * CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are
47
+ * explicitly specified using this option. The value can be a string or Buffer,
48
+ * or an Array of strings and/or Buffers. Any string or Buffer can contain multiple
49
+ * PEM CAs concatenated together. The peer's certificate must be chainable to
50
+ * a CA trusted by the server for the connection to be authenticated. When using
51
+ * certificates that are not chainable to a well-known CA, the certificate's CA
52
+ * must be explicitly specified as a trusted or the connection will fail to authenticate.
53
+ * If the peer uses a certificate that doesn't match or chain to one of the default
54
+ * CAs, use the ca option to provide a CA certificate that the peer's certificate
55
+ * can match or chain to. For self-signed certificates, the certificate is its
56
+ * own CA, and must be provided. For PEM encoded certificates, supported types
57
+ * are "TRUSTED CERTIFICATE", "X509 CERTIFICATE", and "CERTIFICATE". See also tls.rootCertificates.
58
+ */
59
+ ca?: any;
60
+ /**
61
+ * PEM formatted CRLs (Certificate Revocation Lists).
62
+ */
63
+ crl?: any;
64
+ /**
65
+ * Cipher suite specification, replacing the default. For more information, see
66
+ * modifying the default cipher suite. Permitted ciphers can be obtained via tls.getCiphers().
67
+ * Cipher names must be uppercased in order for OpenSSL to accept them.
68
+ */
69
+ ciphers?: string;
70
+ /**
71
+ * Attempt to use the server's cipher suite preferences instead of the client's.
72
+ * When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be set in secureOptions,
73
+ * see OpenSSL Options for more information.
74
+ */
75
+ honorCipherOrder?: boolean;
76
+ /**
77
+ * If true the server will request a certificate from clients that connect and
78
+ * attempt to verify that certificate. Default: false.
79
+ */
80
+ requestCert?: boolean;
81
+ /**
82
+ * If not false the server will reject any connection which is not authorized
83
+ * with the list of supplied CAs. This option only has an effect if requestCert is true. Default: true
84
+ */
85
+ rejectUnauthorized?: boolean;
86
+ /**
87
+ * An array or Buffer of possible NPN protocols. (Protocols should be ordered
88
+ * by their priority).
89
+ */
90
+ NPNProtocols?: any;
91
+ /**
92
+ * A function that will be called if the client supports SNI TLS extension. Two
93
+ * arguments will be passed when called: servername and cb. SNICallback should
94
+ * invoke cb(null, ctx), where ctx is a SecureContext instance. (tls.createSecureContext(...)
95
+ * can be used to get a proper SecureContext.) If SNICallback wasn't provided
96
+ * the default callback with high-level API will be used.
97
+ */
98
+ SNICallback?: (servername: string, cb: (err: Error, ctx: any) => any) => any;
99
+ /**
100
+ * Optionally affect the OpenSSL protocol behavior, which is not usually necessary.
101
+ * This should be used carefully if at all! Value is a numeric bitmask of the SSL_OP_* options
102
+ * from OpenSSL Options.
103
+ */
104
+ secureOptions?: number;
105
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { Type } from '../type.interface';
2
+ import { ClassTransformOptions } from './class-transform-options.interface';
3
+ export interface TransformerPackage {
4
+ plainToInstance<T>(cls: Type<T>, plain: unknown, options?: ClassTransformOptions): T | T[];
5
+ classToPlain(object: unknown, options?: ClassTransformOptions): Record<string, any> | Record<string, any>[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Validation error description.
3
+ * @see https://github.com/typestack/class-validator
4
+ *
5
+ * class-validator@0.13.0
6
+ *
7
+ * @publicApi
8
+ */
9
+ export interface ValidationError {
10
+ /**
11
+ * Object that was validated.
12
+ *
13
+ * OPTIONAL - configurable via the ValidatorOptions.validationError.target option
14
+ */
15
+ target?: Record<string, any>;
16
+ /**
17
+ * Object's property that hasn't passed validation.
18
+ */
19
+ property: string;
20
+ /**
21
+ * Value that haven't pass a validation.
22
+ *
23
+ * OPTIONAL - configurable via the ValidatorOptions.validationError.value option
24
+ */
25
+ value?: any;
26
+ /**
27
+ * Constraints that failed validation with error messages.
28
+ */
29
+ constraints?: {
30
+ [type: string]: string;
31
+ };
32
+ /**
33
+ * Contains all nested validation errors of the property.
34
+ */
35
+ children?: ValidationError[];
36
+ /**
37
+ * A transient set of data passed through to the validation result for response mapping
38
+ */
39
+ contexts?: {
40
+ [type: string]: any;
41
+ };
42
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Options passed to validator during validation.
3
+ * @see https://github.com/typestack/class-validator
4
+ *
5
+ * class-validator@0.13.0
6
+ *
7
+ * @publicApi
8
+ */
9
+ export interface ValidatorOptions {
10
+ /**
11
+ * If set to true then class-validator will print extra warning messages to the console when something is not right.
12
+ */
13
+ enableDebugMessages?: boolean;
14
+ /**
15
+ * If set to true then validator will skip validation of all properties that are undefined in the validating object.
16
+ */
17
+ skipUndefinedProperties?: boolean;
18
+ /**
19
+ * If set to true then validator will skip validation of all properties that are null in the validating object.
20
+ */
21
+ skipNullProperties?: boolean;
22
+ /**
23
+ * If set to true then validator will skip validation of all properties that are null or undefined in the validating object.
24
+ */
25
+ skipMissingProperties?: boolean;
26
+ /**
27
+ * If set to true validator will strip validated object of any properties that do not have any decorators.
28
+ *
29
+ * Tip: if no other decorator is suitable for your property use @Allow decorator.
30
+ */
31
+ whitelist?: boolean;
32
+ /**
33
+ * If set to true, instead of stripping non-whitelisted properties validator will throw an error
34
+ */
35
+ forbidNonWhitelisted?: boolean;
36
+ /**
37
+ * Groups to be used during validation of the object.
38
+ */
39
+ groups?: string[];
40
+ /**
41
+ * Set default for `always` option of decorators. Default can be overridden in decorator options.
42
+ */
43
+ always?: boolean;
44
+ /**
45
+ * If [groups]{@link ValidatorOptions#groups} is not given or is empty,
46
+ * ignore decorators with at least one group.
47
+ */
48
+ strictGroups?: boolean;
49
+ /**
50
+ * If set to true, the validation will not use default messages.
51
+ * Error message always will be undefined if its not explicitly set.
52
+ */
53
+ dismissDefaultMessages?: boolean;
54
+ /**
55
+ * ValidationError special options.
56
+ */
57
+ validationError?: {
58
+ /**
59
+ * Indicates if target should be exposed in ValidationError.
60
+ */
61
+ target?: boolean;
62
+ /**
63
+ * Indicates if validated value should be exposed in ValidationError.
64
+ */
65
+ value?: boolean;
66
+ };
67
+ /**
68
+ * Settings true will cause fail validation of unknown objects.
69
+ */
70
+ forbidUnknownValues?: boolean;
71
+ /**
72
+ * When set to true, validation of the given property will stop after encountering the first error.
73
+ * This is enabled by default.
74
+ */
75
+ stopAtFirstError?: boolean;
76
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { ValidationError } from './validation-error.interface';
2
+ import { ValidatorOptions } from './validator-options.interface';
3
+ export interface ValidatorPackage {
4
+ validate(object: unknown, validatorOptions?: ValidatorOptions): ValidationError[] | Promise<ValidationError[]>;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });