@tsed/schema 7.0.0-alpha.2 → 7.0.0-beta.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 (724) hide show
  1. package/benchmark/cold-start.js +17 -0
  2. package/jest.config.js +14 -0
  3. package/lib/cjs/components/anyMapper.js +23 -0
  4. package/lib/cjs/components/anyMapper.js.map +1 -0
  5. package/lib/cjs/components/classMapper.js +41 -0
  6. package/lib/cjs/components/classMapper.js.map +1 -0
  7. package/lib/cjs/components/genericsMapper.js +62 -0
  8. package/lib/cjs/components/genericsMapper.js.map +1 -0
  9. package/lib/cjs/components/index.js +15 -0
  10. package/lib/cjs/components/index.js.map +1 -0
  11. package/lib/cjs/components/inheritedClassMapper.js +22 -0
  12. package/lib/cjs/components/inheritedClassMapper.js.map +1 -0
  13. package/lib/cjs/components/itemMapper.js +10 -0
  14. package/lib/cjs/components/itemMapper.js.map +1 -0
  15. package/lib/cjs/components/lazyRefMapper.js +19 -0
  16. package/lib/cjs/components/lazyRefMapper.js.map +1 -0
  17. package/lib/cjs/components/mapMapper.js +25 -0
  18. package/lib/cjs/components/mapMapper.js.map +1 -0
  19. package/lib/cjs/components/objectMapper.js +31 -0
  20. package/lib/cjs/components/objectMapper.js.map +1 -0
  21. package/lib/cjs/components/ofMapper.js +17 -0
  22. package/lib/cjs/components/ofMapper.js.map +1 -0
  23. package/lib/cjs/components/propertiesMapper.js +25 -0
  24. package/lib/cjs/components/propertiesMapper.js.map +1 -0
  25. package/lib/cjs/components/schemaMapper.js +97 -0
  26. package/lib/cjs/components/schemaMapper.js.map +1 -0
  27. package/lib/cjs/constants/httpMethods.js +46 -0
  28. package/lib/cjs/constants/httpMethods.js.map +1 -0
  29. package/lib/cjs/constants/httpStatusMessages.js +110 -0
  30. package/lib/cjs/constants/httpStatusMessages.js.map +1 -0
  31. package/lib/cjs/decorators/class/children.js +24 -0
  32. package/lib/cjs/decorators/class/children.js.map +1 -0
  33. package/lib/cjs/decorators/collections/collectionContains.js +29 -0
  34. package/lib/cjs/decorators/collections/collectionContains.js.map +1 -0
  35. package/lib/cjs/decorators/collections/collectionOf.js +103 -0
  36. package/lib/cjs/decorators/collections/collectionOf.js.map +1 -0
  37. package/lib/cjs/decorators/collections/maxItems.js +60 -0
  38. package/lib/cjs/decorators/collections/maxItems.js.map +1 -0
  39. package/lib/cjs/decorators/collections/maxProperties.js +83 -0
  40. package/lib/cjs/decorators/collections/maxProperties.js.map +1 -0
  41. package/lib/cjs/decorators/collections/minItems.js +64 -0
  42. package/lib/cjs/decorators/collections/minItems.js.map +1 -0
  43. package/lib/cjs/decorators/collections/minProperties.js +82 -0
  44. package/lib/cjs/decorators/collections/minProperties.js.map +1 -0
  45. package/lib/cjs/decorators/collections/uniqueItems.js +60 -0
  46. package/lib/cjs/decorators/collections/uniqueItems.js.map +1 -0
  47. package/lib/cjs/decorators/common/additionalProperties.js +20 -0
  48. package/lib/cjs/decorators/common/additionalProperties.js.map +1 -0
  49. package/lib/cjs/decorators/common/allOf.js +22 -0
  50. package/lib/cjs/decorators/common/allOf.js.map +1 -0
  51. package/lib/cjs/decorators/common/allow.js +47 -0
  52. package/lib/cjs/decorators/common/allow.js.map +1 -0
  53. package/lib/cjs/decorators/common/any.js +46 -0
  54. package/lib/cjs/decorators/common/any.js.map +1 -0
  55. package/lib/cjs/decorators/common/anyOf.js +26 -0
  56. package/lib/cjs/decorators/common/anyOf.js.map +1 -0
  57. package/lib/cjs/decorators/common/const.js +70 -0
  58. package/lib/cjs/decorators/common/const.js.map +1 -0
  59. package/lib/cjs/decorators/common/customKey.js +43 -0
  60. package/lib/cjs/decorators/common/customKey.js.map +1 -0
  61. package/lib/cjs/decorators/common/default.js +51 -0
  62. package/lib/cjs/decorators/common/default.js.map +1 -0
  63. package/lib/cjs/decorators/common/description.js +76 -0
  64. package/lib/cjs/decorators/common/description.js.map +1 -0
  65. package/lib/cjs/decorators/common/enum.js +30 -0
  66. package/lib/cjs/decorators/common/enum.js.map +1 -0
  67. package/lib/cjs/decorators/common/example.js +21 -0
  68. package/lib/cjs/decorators/common/example.js.map +1 -0
  69. package/lib/cjs/decorators/common/examples.js +21 -0
  70. package/lib/cjs/decorators/common/examples.js.map +1 -0
  71. package/lib/cjs/decorators/common/exclusiveMaximum.js +77 -0
  72. package/lib/cjs/decorators/common/exclusiveMaximum.js.map +1 -0
  73. package/lib/cjs/decorators/common/exclusiveMinimum.js +77 -0
  74. package/lib/cjs/decorators/common/exclusiveMinimum.js.map +1 -0
  75. package/lib/cjs/decorators/common/format.js +486 -0
  76. package/lib/cjs/decorators/common/format.js.map +1 -0
  77. package/lib/cjs/decorators/common/forwardGroups.js +20 -0
  78. package/lib/cjs/decorators/common/forwardGroups.js.map +1 -0
  79. package/lib/cjs/decorators/common/groups.js +41 -0
  80. package/lib/cjs/decorators/common/groups.js.map +1 -0
  81. package/lib/cjs/decorators/common/hidden.js +40 -0
  82. package/lib/cjs/decorators/common/hidden.js.map +1 -0
  83. package/lib/cjs/decorators/common/ignore.js +71 -0
  84. package/lib/cjs/decorators/common/ignore.js.map +1 -0
  85. package/lib/cjs/decorators/common/integer.js +71 -0
  86. package/lib/cjs/decorators/common/integer.js.map +1 -0
  87. package/lib/cjs/decorators/common/jsonEntityFn.js +32 -0
  88. package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -0
  89. package/lib/cjs/decorators/common/maxLength.js +89 -0
  90. package/lib/cjs/decorators/common/maxLength.js.map +1 -0
  91. package/lib/cjs/decorators/common/maximum.js +151 -0
  92. package/lib/cjs/decorators/common/maximum.js.map +1 -0
  93. package/lib/cjs/decorators/common/minLength.js +90 -0
  94. package/lib/cjs/decorators/common/minLength.js.map +1 -0
  95. package/lib/cjs/decorators/common/minimum.js +149 -0
  96. package/lib/cjs/decorators/common/minimum.js.map +1 -0
  97. package/lib/cjs/decorators/common/multipleOf.js +81 -0
  98. package/lib/cjs/decorators/common/multipleOf.js.map +1 -0
  99. package/lib/cjs/decorators/common/name.js +52 -0
  100. package/lib/cjs/decorators/common/name.js.map +1 -0
  101. package/lib/cjs/decorators/common/nullable.js +34 -0
  102. package/lib/cjs/decorators/common/nullable.js.map +1 -0
  103. package/lib/cjs/decorators/common/oneOf.js +27 -0
  104. package/lib/cjs/decorators/common/oneOf.js.map +1 -0
  105. package/lib/cjs/decorators/common/optional.js +28 -0
  106. package/lib/cjs/decorators/common/optional.js.map +1 -0
  107. package/lib/cjs/decorators/common/pattern.js +103 -0
  108. package/lib/cjs/decorators/common/pattern.js.map +1 -0
  109. package/lib/cjs/decorators/common/property.js +27 -0
  110. package/lib/cjs/decorators/common/property.js.map +1 -0
  111. package/lib/cjs/decorators/common/readOnly.js +21 -0
  112. package/lib/cjs/decorators/common/readOnly.js.map +1 -0
  113. package/lib/cjs/decorators/common/required.js +53 -0
  114. package/lib/cjs/decorators/common/required.js.map +1 -0
  115. package/lib/cjs/decorators/common/requiredGroups.js +26 -0
  116. package/lib/cjs/decorators/common/requiredGroups.js.map +1 -0
  117. package/lib/cjs/decorators/common/schema.js +68 -0
  118. package/lib/cjs/decorators/common/schema.js.map +1 -0
  119. package/lib/cjs/decorators/common/title.js +49 -0
  120. package/lib/cjs/decorators/common/title.js.map +1 -0
  121. package/lib/cjs/decorators/common/writeOnly.js +21 -0
  122. package/lib/cjs/decorators/common/writeOnly.js.map +1 -0
  123. package/lib/cjs/decorators/config/jsonEntityComponent.js +18 -0
  124. package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -0
  125. package/lib/cjs/decorators/generics/genericOf.js +99 -0
  126. package/lib/cjs/decorators/generics/genericOf.js.map +1 -0
  127. package/lib/cjs/decorators/generics/generics.js +25 -0
  128. package/lib/cjs/decorators/generics/generics.js.map +1 -0
  129. package/lib/cjs/decorators/index.js +77 -0
  130. package/lib/cjs/decorators/index.js.map +1 -0
  131. package/lib/cjs/decorators/operations/consumes.js +39 -0
  132. package/lib/cjs/decorators/operations/consumes.js.map +1 -0
  133. package/lib/cjs/decorators/operations/contentType.js +28 -0
  134. package/lib/cjs/decorators/operations/contentType.js.map +1 -0
  135. package/lib/cjs/decorators/operations/deprecated.js +43 -0
  136. package/lib/cjs/decorators/operations/deprecated.js.map +1 -0
  137. package/lib/cjs/decorators/operations/header.js +59 -0
  138. package/lib/cjs/decorators/operations/header.js.map +1 -0
  139. package/lib/cjs/decorators/operations/in.js +78 -0
  140. package/lib/cjs/decorators/operations/in.js.map +1 -0
  141. package/lib/cjs/decorators/operations/inFile.js +45 -0
  142. package/lib/cjs/decorators/operations/inFile.js.map +1 -0
  143. package/lib/cjs/decorators/operations/location.js +29 -0
  144. package/lib/cjs/decorators/operations/location.js.map +1 -0
  145. package/lib/cjs/decorators/operations/operationId.js +24 -0
  146. package/lib/cjs/decorators/operations/operationId.js.map +1 -0
  147. package/lib/cjs/decorators/operations/operationPath.js +34 -0
  148. package/lib/cjs/decorators/operations/operationPath.js.map +1 -0
  149. package/lib/cjs/decorators/operations/partial.js +18 -0
  150. package/lib/cjs/decorators/operations/partial.js.map +1 -0
  151. package/lib/cjs/decorators/operations/path.js +29 -0
  152. package/lib/cjs/decorators/operations/path.js.map +1 -0
  153. package/lib/cjs/decorators/operations/produces.js +46 -0
  154. package/lib/cjs/decorators/operations/produces.js.map +1 -0
  155. package/lib/cjs/decorators/operations/redirect.js +26 -0
  156. package/lib/cjs/decorators/operations/redirect.js.map +1 -0
  157. package/lib/cjs/decorators/operations/returns.js +252 -0
  158. package/lib/cjs/decorators/operations/returns.js.map +1 -0
  159. package/lib/cjs/decorators/operations/route.js +200 -0
  160. package/lib/cjs/decorators/operations/route.js.map +1 -0
  161. package/lib/cjs/decorators/operations/security.js +43 -0
  162. package/lib/cjs/decorators/operations/security.js.map +1 -0
  163. package/lib/cjs/decorators/operations/status.js +133 -0
  164. package/lib/cjs/decorators/operations/status.js.map +1 -0
  165. package/lib/cjs/decorators/operations/summary.js +34 -0
  166. package/lib/cjs/decorators/operations/summary.js.map +1 -0
  167. package/lib/cjs/decorators/operations/tags.js +52 -0
  168. package/lib/cjs/decorators/operations/tags.js.map +1 -0
  169. package/lib/cjs/domain/DecoratorContext.js +88 -0
  170. package/lib/cjs/domain/DecoratorContext.js.map +1 -0
  171. package/lib/cjs/domain/JsonAliasMap.js +15 -0
  172. package/lib/cjs/domain/JsonAliasMap.js.map +1 -0
  173. package/lib/cjs/domain/JsonClassStore.js +37 -0
  174. package/lib/cjs/domain/JsonClassStore.js.map +1 -0
  175. package/lib/cjs/domain/JsonEntityStore.js +166 -0
  176. package/lib/cjs/domain/JsonEntityStore.js.map +1 -0
  177. package/lib/cjs/domain/JsonFormatTypes.js +22 -0
  178. package/lib/cjs/domain/JsonFormatTypes.js.map +1 -0
  179. package/lib/cjs/domain/JsonLazyRef.js +26 -0
  180. package/lib/cjs/domain/JsonLazyRef.js.map +1 -0
  181. package/lib/cjs/domain/JsonMap.js +27 -0
  182. package/lib/cjs/domain/JsonMap.js.map +1 -0
  183. package/lib/cjs/domain/JsonMethodStore.js +101 -0
  184. package/lib/cjs/domain/JsonMethodStore.js.map +1 -0
  185. package/lib/cjs/domain/JsonOperation.js +250 -0
  186. package/lib/cjs/domain/JsonOperation.js.map +1 -0
  187. package/lib/cjs/domain/JsonOperationPathsMap.js +29 -0
  188. package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -0
  189. package/lib/cjs/domain/JsonOperationRoute.js +56 -0
  190. package/lib/cjs/domain/JsonOperationRoute.js.map +1 -0
  191. package/lib/cjs/domain/JsonParameter.js +157 -0
  192. package/lib/cjs/domain/JsonParameter.js.map +1 -0
  193. package/lib/cjs/domain/JsonParameterStore.js +90 -0
  194. package/lib/cjs/domain/JsonParameterStore.js.map +1 -0
  195. package/lib/cjs/domain/JsonParameterTypes.js +27 -0
  196. package/lib/cjs/domain/JsonParameterTypes.js.map +1 -0
  197. package/lib/cjs/domain/JsonPropertyStore.js +68 -0
  198. package/lib/cjs/domain/JsonPropertyStore.js.map +1 -0
  199. package/lib/cjs/domain/JsonRequestBody.js +32 -0
  200. package/lib/cjs/domain/JsonRequestBody.js.map +1 -0
  201. package/lib/cjs/domain/JsonResponse.js +86 -0
  202. package/lib/cjs/domain/JsonResponse.js.map +1 -0
  203. package/lib/cjs/domain/JsonSchema.js +723 -0
  204. package/lib/cjs/domain/JsonSchema.js.map +1 -0
  205. package/lib/cjs/domain/SpecTypes.js +13 -0
  206. package/lib/cjs/domain/SpecTypes.js.map +1 -0
  207. package/lib/cjs/domain/index.js +20 -0
  208. package/lib/cjs/domain/index.js.map +1 -0
  209. package/lib/cjs/hooks/alterIgnore.js +21 -0
  210. package/lib/cjs/hooks/alterIgnore.js.map +1 -0
  211. package/lib/cjs/hooks/alterOneOf.js +14 -0
  212. package/lib/cjs/hooks/alterOneOf.js.map +1 -0
  213. package/lib/cjs/hooks/alterRequiredGroups.js +15 -0
  214. package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -0
  215. package/lib/cjs/index.js +24 -0
  216. package/lib/cjs/index.js.map +1 -0
  217. package/lib/cjs/interfaces/IgnoreCallback.js +3 -0
  218. package/lib/cjs/interfaces/IgnoreCallback.js.map +1 -0
  219. package/lib/cjs/interfaces/JsonHookContext.js +3 -0
  220. package/lib/cjs/interfaces/JsonHookContext.js.map +1 -0
  221. package/lib/cjs/interfaces/JsonOpenSpec.js +3 -0
  222. package/lib/cjs/interfaces/JsonOpenSpec.js.map +1 -0
  223. package/lib/cjs/interfaces/JsonSchemaOptions.js +3 -0
  224. package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -0
  225. package/lib/cjs/interfaces/index.js +8 -0
  226. package/lib/cjs/interfaces/index.js.map +1 -0
  227. package/lib/cjs/registries/JsonSchemaMapperContainer.js +37 -0
  228. package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -0
  229. package/lib/cjs/utils/buildPath.js +13 -0
  230. package/lib/cjs/utils/buildPath.js.map +1 -0
  231. package/lib/cjs/utils/concatParameters.js +16 -0
  232. package/lib/cjs/utils/concatParameters.js.map +1 -0
  233. package/lib/cjs/utils/concatPath.js +8 -0
  234. package/lib/cjs/utils/concatPath.js.map +1 -0
  235. package/lib/cjs/utils/defineStatusModel.js +13 -0
  236. package/lib/cjs/utils/defineStatusModel.js.map +1 -0
  237. package/lib/cjs/utils/from.js +272 -0
  238. package/lib/cjs/utils/from.js.map +1 -0
  239. package/lib/cjs/utils/generics.js +40 -0
  240. package/lib/cjs/utils/generics.js.map +1 -0
  241. package/lib/cjs/utils/getComputedType.js +26 -0
  242. package/lib/cjs/utils/getComputedType.js.map +1 -0
  243. package/lib/cjs/utils/getInheritedStores.js +23 -0
  244. package/lib/cjs/utils/getInheritedStores.js.map +1 -0
  245. package/lib/cjs/utils/getJsonEntityStore.js +18 -0
  246. package/lib/cjs/utils/getJsonEntityStore.js.map +1 -0
  247. package/lib/cjs/utils/getJsonPathParameters.js +73 -0
  248. package/lib/cjs/utils/getJsonPathParameters.js.map +1 -0
  249. package/lib/cjs/utils/getJsonSchema.js +55 -0
  250. package/lib/cjs/utils/getJsonSchema.js.map +1 -0
  251. package/lib/cjs/utils/getJsonType.js +40 -0
  252. package/lib/cjs/utils/getJsonType.js.map +1 -0
  253. package/lib/cjs/utils/getOperationsRoutes.js +36 -0
  254. package/lib/cjs/utils/getOperationsRoutes.js.map +1 -0
  255. package/lib/cjs/utils/getOperationsStores.js +33 -0
  256. package/lib/cjs/utils/getOperationsStores.js.map +1 -0
  257. package/lib/cjs/utils/getPropertiesStores.js +45 -0
  258. package/lib/cjs/utils/getPropertiesStores.js.map +1 -0
  259. package/lib/cjs/utils/getRequiredProperties.js +66 -0
  260. package/lib/cjs/utils/getRequiredProperties.js.map +1 -0
  261. package/lib/cjs/utils/getSpec.js +87 -0
  262. package/lib/cjs/utils/getSpec.js.map +1 -0
  263. package/lib/cjs/utils/isSuccessStatus.js +8 -0
  264. package/lib/cjs/utils/isSuccessStatus.js.map +1 -0
  265. package/lib/cjs/utils/mapHeaders.js +29 -0
  266. package/lib/cjs/utils/mapHeaders.js.map +1 -0
  267. package/lib/cjs/utils/mapNullableType.js +49 -0
  268. package/lib/cjs/utils/mapNullableType.js.map +1 -0
  269. package/lib/cjs/utils/mapRouteOptions.js +26 -0
  270. package/lib/cjs/utils/mapRouteOptions.js.map +1 -0
  271. package/lib/cjs/utils/matchGroups.js +23 -0
  272. package/lib/cjs/utils/matchGroups.js.map +1 -0
  273. package/lib/cjs/utils/mergeOperation.js +44 -0
  274. package/lib/cjs/utils/mergeOperation.js.map +1 -0
  275. package/lib/cjs/utils/mergeSpec.js +46 -0
  276. package/lib/cjs/utils/mergeSpec.js.map +1 -0
  277. package/lib/cjs/utils/operationIdFormatter.js +37 -0
  278. package/lib/cjs/utils/operationIdFormatter.js.map +1 -0
  279. package/lib/cjs/utils/ref.js +73 -0
  280. package/lib/cjs/utils/ref.js.map +1 -0
  281. package/lib/cjs/utils/toJsonMapCollection.js +15 -0
  282. package/lib/cjs/utils/toJsonMapCollection.js.map +1 -0
  283. package/lib/cjs/utils/toJsonRegex.js +12 -0
  284. package/lib/cjs/utils/toJsonRegex.js.map +1 -0
  285. package/lib/esm/components/anyMapper.js +19 -0
  286. package/lib/esm/components/anyMapper.js.map +1 -0
  287. package/lib/esm/components/classMapper.js +37 -0
  288. package/lib/esm/components/classMapper.js.map +1 -0
  289. package/lib/esm/components/genericsMapper.js +58 -0
  290. package/lib/esm/components/genericsMapper.js.map +1 -0
  291. package/lib/esm/components/index.js +12 -0
  292. package/lib/esm/components/index.js.map +1 -0
  293. package/lib/esm/components/inheritedClassMapper.js +18 -0
  294. package/lib/esm/components/inheritedClassMapper.js.map +1 -0
  295. package/lib/esm/components/itemMapper.js +6 -0
  296. package/lib/esm/components/itemMapper.js.map +1 -0
  297. package/lib/esm/components/lazyRefMapper.js +15 -0
  298. package/lib/esm/components/lazyRefMapper.js.map +1 -0
  299. package/lib/esm/components/mapMapper.js +21 -0
  300. package/lib/esm/components/mapMapper.js.map +1 -0
  301. package/lib/esm/components/objectMapper.js +27 -0
  302. package/lib/esm/components/objectMapper.js.map +1 -0
  303. package/lib/esm/components/ofMapper.js +13 -0
  304. package/lib/esm/components/ofMapper.js.map +1 -0
  305. package/lib/esm/components/propertiesMapper.js +21 -0
  306. package/lib/esm/components/propertiesMapper.js.map +1 -0
  307. package/lib/esm/components/schemaMapper.js +93 -0
  308. package/lib/esm/components/schemaMapper.js.map +1 -0
  309. package/lib/esm/constants/httpMethods.js +43 -0
  310. package/lib/esm/constants/httpMethods.js.map +1 -0
  311. package/lib/esm/constants/httpStatusMessages.js +105 -0
  312. package/lib/esm/constants/httpStatusMessages.js.map +1 -0
  313. package/lib/esm/decorators/class/children.js +20 -0
  314. package/lib/esm/decorators/class/children.js.map +1 -0
  315. package/lib/esm/decorators/collections/collectionContains.js +25 -0
  316. package/lib/esm/decorators/collections/collectionContains.js.map +1 -0
  317. package/lib/esm/decorators/collections/collectionOf.js +97 -0
  318. package/lib/esm/decorators/collections/collectionOf.js.map +1 -0
  319. package/lib/esm/decorators/collections/maxItems.js +56 -0
  320. package/lib/esm/decorators/collections/maxItems.js.map +1 -0
  321. package/lib/esm/decorators/collections/maxProperties.js +79 -0
  322. package/lib/esm/decorators/collections/maxProperties.js.map +1 -0
  323. package/lib/esm/decorators/collections/minItems.js +60 -0
  324. package/lib/esm/decorators/collections/minItems.js.map +1 -0
  325. package/lib/esm/decorators/collections/minProperties.js +78 -0
  326. package/lib/esm/decorators/collections/minProperties.js.map +1 -0
  327. package/lib/esm/decorators/collections/uniqueItems.js +56 -0
  328. package/lib/esm/decorators/collections/uniqueItems.js.map +1 -0
  329. package/lib/esm/decorators/common/additionalProperties.js +16 -0
  330. package/lib/esm/decorators/common/additionalProperties.js.map +1 -0
  331. package/lib/esm/decorators/common/allOf.js +18 -0
  332. package/lib/esm/decorators/common/allOf.js.map +1 -0
  333. package/lib/esm/decorators/common/allow.js +43 -0
  334. package/lib/esm/decorators/common/allow.js.map +1 -0
  335. package/lib/esm/decorators/common/any.js +42 -0
  336. package/lib/esm/decorators/common/any.js.map +1 -0
  337. package/lib/esm/decorators/common/anyOf.js +22 -0
  338. package/lib/esm/decorators/common/anyOf.js.map +1 -0
  339. package/lib/esm/decorators/common/const.js +66 -0
  340. package/lib/esm/decorators/common/const.js.map +1 -0
  341. package/lib/esm/decorators/common/customKey.js +38 -0
  342. package/lib/esm/decorators/common/customKey.js.map +1 -0
  343. package/lib/esm/decorators/common/default.js +47 -0
  344. package/lib/esm/decorators/common/default.js.map +1 -0
  345. package/lib/esm/decorators/common/description.js +72 -0
  346. package/lib/esm/decorators/common/description.js.map +1 -0
  347. package/lib/esm/decorators/common/enum.js +26 -0
  348. package/lib/esm/decorators/common/enum.js.map +1 -0
  349. package/lib/esm/decorators/common/example.js +17 -0
  350. package/lib/esm/decorators/common/example.js.map +1 -0
  351. package/lib/esm/decorators/common/examples.js +17 -0
  352. package/lib/esm/decorators/common/examples.js.map +1 -0
  353. package/lib/esm/decorators/common/exclusiveMaximum.js +73 -0
  354. package/lib/esm/decorators/common/exclusiveMaximum.js.map +1 -0
  355. package/lib/esm/decorators/common/exclusiveMinimum.js +73 -0
  356. package/lib/esm/decorators/common/exclusiveMinimum.js.map +1 -0
  357. package/lib/esm/decorators/common/format.js +476 -0
  358. package/lib/esm/decorators/common/format.js.map +1 -0
  359. package/lib/esm/decorators/common/forwardGroups.js +16 -0
  360. package/lib/esm/decorators/common/forwardGroups.js.map +1 -0
  361. package/lib/esm/decorators/common/groups.js +37 -0
  362. package/lib/esm/decorators/common/groups.js.map +1 -0
  363. package/lib/esm/decorators/common/hidden.js +36 -0
  364. package/lib/esm/decorators/common/hidden.js.map +1 -0
  365. package/lib/esm/decorators/common/ignore.js +67 -0
  366. package/lib/esm/decorators/common/ignore.js.map +1 -0
  367. package/lib/esm/decorators/common/integer.js +67 -0
  368. package/lib/esm/decorators/common/integer.js.map +1 -0
  369. package/lib/esm/decorators/common/jsonEntityFn.js +28 -0
  370. package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -0
  371. package/lib/esm/decorators/common/maxLength.js +85 -0
  372. package/lib/esm/decorators/common/maxLength.js.map +1 -0
  373. package/lib/esm/decorators/common/maximum.js +146 -0
  374. package/lib/esm/decorators/common/maximum.js.map +1 -0
  375. package/lib/esm/decorators/common/minLength.js +86 -0
  376. package/lib/esm/decorators/common/minLength.js.map +1 -0
  377. package/lib/esm/decorators/common/minimum.js +144 -0
  378. package/lib/esm/decorators/common/minimum.js.map +1 -0
  379. package/lib/esm/decorators/common/multipleOf.js +77 -0
  380. package/lib/esm/decorators/common/multipleOf.js.map +1 -0
  381. package/lib/esm/decorators/common/name.js +48 -0
  382. package/lib/esm/decorators/common/name.js.map +1 -0
  383. package/lib/esm/decorators/common/nullable.js +30 -0
  384. package/lib/esm/decorators/common/nullable.js.map +1 -0
  385. package/lib/esm/decorators/common/oneOf.js +23 -0
  386. package/lib/esm/decorators/common/oneOf.js.map +1 -0
  387. package/lib/esm/decorators/common/optional.js +24 -0
  388. package/lib/esm/decorators/common/optional.js.map +1 -0
  389. package/lib/esm/decorators/common/pattern.js +99 -0
  390. package/lib/esm/decorators/common/pattern.js.map +1 -0
  391. package/lib/esm/decorators/common/property.js +23 -0
  392. package/lib/esm/decorators/common/property.js.map +1 -0
  393. package/lib/esm/decorators/common/readOnly.js +17 -0
  394. package/lib/esm/decorators/common/readOnly.js.map +1 -0
  395. package/lib/esm/decorators/common/required.js +49 -0
  396. package/lib/esm/decorators/common/required.js.map +1 -0
  397. package/lib/esm/decorators/common/requiredGroups.js +22 -0
  398. package/lib/esm/decorators/common/requiredGroups.js.map +1 -0
  399. package/lib/esm/decorators/common/schema.js +63 -0
  400. package/lib/esm/decorators/common/schema.js.map +1 -0
  401. package/lib/esm/decorators/common/title.js +45 -0
  402. package/lib/esm/decorators/common/title.js.map +1 -0
  403. package/lib/esm/decorators/common/writeOnly.js +17 -0
  404. package/lib/esm/decorators/common/writeOnly.js.map +1 -0
  405. package/lib/esm/decorators/config/jsonEntityComponent.js +14 -0
  406. package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -0
  407. package/lib/esm/decorators/generics/genericOf.js +95 -0
  408. package/lib/esm/decorators/generics/genericOf.js.map +1 -0
  409. package/lib/esm/decorators/generics/generics.js +21 -0
  410. package/lib/esm/decorators/generics/generics.js.map +1 -0
  411. package/lib/esm/decorators/index.js +74 -0
  412. package/lib/esm/decorators/index.js.map +1 -0
  413. package/lib/esm/decorators/operations/consumes.js +35 -0
  414. package/lib/esm/decorators/operations/consumes.js.map +1 -0
  415. package/lib/esm/decorators/operations/contentType.js +24 -0
  416. package/lib/esm/decorators/operations/contentType.js.map +1 -0
  417. package/lib/esm/decorators/operations/deprecated.js +39 -0
  418. package/lib/esm/decorators/operations/deprecated.js.map +1 -0
  419. package/lib/esm/decorators/operations/header.js +55 -0
  420. package/lib/esm/decorators/operations/header.js.map +1 -0
  421. package/lib/esm/decorators/operations/in.js +74 -0
  422. package/lib/esm/decorators/operations/in.js.map +1 -0
  423. package/lib/esm/decorators/operations/inFile.js +41 -0
  424. package/lib/esm/decorators/operations/inFile.js.map +1 -0
  425. package/lib/esm/decorators/operations/location.js +25 -0
  426. package/lib/esm/decorators/operations/location.js.map +1 -0
  427. package/lib/esm/decorators/operations/operationId.js +20 -0
  428. package/lib/esm/decorators/operations/operationId.js.map +1 -0
  429. package/lib/esm/decorators/operations/operationPath.js +30 -0
  430. package/lib/esm/decorators/operations/operationPath.js.map +1 -0
  431. package/lib/esm/decorators/operations/partial.js +14 -0
  432. package/lib/esm/decorators/operations/partial.js.map +1 -0
  433. package/lib/esm/decorators/operations/path.js +25 -0
  434. package/lib/esm/decorators/operations/path.js.map +1 -0
  435. package/lib/esm/decorators/operations/produces.js +42 -0
  436. package/lib/esm/decorators/operations/produces.js.map +1 -0
  437. package/lib/esm/decorators/operations/redirect.js +22 -0
  438. package/lib/esm/decorators/operations/redirect.js.map +1 -0
  439. package/lib/esm/decorators/operations/returns.js +248 -0
  440. package/lib/esm/decorators/operations/returns.js.map +1 -0
  441. package/lib/esm/decorators/operations/route.js +188 -0
  442. package/lib/esm/decorators/operations/route.js.map +1 -0
  443. package/lib/esm/decorators/operations/security.js +39 -0
  444. package/lib/esm/decorators/operations/security.js.map +1 -0
  445. package/lib/esm/decorators/operations/status.js +129 -0
  446. package/lib/esm/decorators/operations/status.js.map +1 -0
  447. package/lib/esm/decorators/operations/summary.js +30 -0
  448. package/lib/esm/decorators/operations/summary.js.map +1 -0
  449. package/lib/esm/decorators/operations/tags.js +48 -0
  450. package/lib/esm/decorators/operations/tags.js.map +1 -0
  451. package/lib/esm/domain/DecoratorContext.js +84 -0
  452. package/lib/esm/domain/DecoratorContext.js.map +1 -0
  453. package/lib/esm/domain/JsonAliasMap.js +11 -0
  454. package/lib/esm/domain/JsonAliasMap.js.map +1 -0
  455. package/lib/esm/domain/JsonClassStore.js +34 -0
  456. package/lib/esm/domain/JsonClassStore.js.map +1 -0
  457. package/lib/esm/domain/JsonEntityStore.js +162 -0
  458. package/lib/esm/domain/JsonEntityStore.js.map +1 -0
  459. package/lib/esm/domain/JsonFormatTypes.js +19 -0
  460. package/lib/esm/domain/JsonFormatTypes.js.map +1 -0
  461. package/lib/esm/domain/JsonLazyRef.js +22 -0
  462. package/lib/esm/domain/JsonLazyRef.js.map +1 -0
  463. package/lib/esm/domain/JsonMap.js +23 -0
  464. package/lib/esm/domain/JsonMap.js.map +1 -0
  465. package/lib/esm/domain/JsonMethodStore.js +98 -0
  466. package/lib/esm/domain/JsonMethodStore.js.map +1 -0
  467. package/lib/esm/domain/JsonOperation.js +246 -0
  468. package/lib/esm/domain/JsonOperation.js.map +1 -0
  469. package/lib/esm/domain/JsonOperationPathsMap.js +25 -0
  470. package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -0
  471. package/lib/esm/domain/JsonOperationRoute.js +52 -0
  472. package/lib/esm/domain/JsonOperationRoute.js.map +1 -0
  473. package/lib/esm/domain/JsonParameter.js +153 -0
  474. package/lib/esm/domain/JsonParameter.js.map +1 -0
  475. package/lib/esm/domain/JsonParameterStore.js +87 -0
  476. package/lib/esm/domain/JsonParameterStore.js.map +1 -0
  477. package/lib/esm/domain/JsonParameterTypes.js +22 -0
  478. package/lib/esm/domain/JsonParameterTypes.js.map +1 -0
  479. package/lib/esm/domain/JsonPropertyStore.js +65 -0
  480. package/lib/esm/domain/JsonPropertyStore.js.map +1 -0
  481. package/lib/esm/domain/JsonRequestBody.js +28 -0
  482. package/lib/esm/domain/JsonRequestBody.js.map +1 -0
  483. package/lib/esm/domain/JsonResponse.js +81 -0
  484. package/lib/esm/domain/JsonResponse.js.map +1 -0
  485. package/lib/esm/domain/JsonSchema.js +719 -0
  486. package/lib/esm/domain/JsonSchema.js.map +1 -0
  487. package/lib/esm/domain/SpecTypes.js +10 -0
  488. package/lib/esm/domain/SpecTypes.js.map +1 -0
  489. package/lib/esm/domain/index.js +17 -0
  490. package/lib/esm/domain/index.js.map +1 -0
  491. package/lib/esm/hooks/alterIgnore.js +17 -0
  492. package/lib/esm/hooks/alterIgnore.js.map +1 -0
  493. package/lib/esm/hooks/alterOneOf.js +10 -0
  494. package/lib/esm/hooks/alterOneOf.js.map +1 -0
  495. package/lib/esm/hooks/alterRequiredGroups.js +11 -0
  496. package/lib/esm/hooks/alterRequiredGroups.js.map +1 -0
  497. package/lib/esm/index.js +21 -0
  498. package/lib/esm/index.js.map +1 -0
  499. package/lib/esm/interfaces/IgnoreCallback.js +2 -0
  500. package/lib/esm/interfaces/IgnoreCallback.js.map +1 -0
  501. package/lib/esm/interfaces/JsonHookContext.js +2 -0
  502. package/lib/esm/interfaces/JsonHookContext.js.map +1 -0
  503. package/lib/esm/interfaces/JsonOpenSpec.js +2 -0
  504. package/lib/esm/interfaces/JsonOpenSpec.js.map +1 -0
  505. package/lib/esm/interfaces/JsonSchemaOptions.js +2 -0
  506. package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -0
  507. package/lib/esm/interfaces/index.js +5 -0
  508. package/lib/esm/interfaces/index.js.map +1 -0
  509. package/lib/esm/registries/JsonSchemaMapperContainer.js +30 -0
  510. package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -0
  511. package/lib/esm/utils/buildPath.js +9 -0
  512. package/lib/esm/utils/buildPath.js.map +1 -0
  513. package/lib/esm/utils/concatParameters.js +12 -0
  514. package/lib/esm/utils/concatParameters.js.map +1 -0
  515. package/lib/esm/utils/concatPath.js +4 -0
  516. package/lib/esm/utils/concatPath.js.map +1 -0
  517. package/lib/esm/utils/defineStatusModel.js +8 -0
  518. package/lib/esm/utils/defineStatusModel.js.map +1 -0
  519. package/lib/esm/utils/from.js +249 -0
  520. package/lib/esm/utils/from.js.map +1 -0
  521. package/lib/esm/utils/generics.js +34 -0
  522. package/lib/esm/utils/generics.js.map +1 -0
  523. package/lib/esm/utils/getComputedType.js +22 -0
  524. package/lib/esm/utils/getComputedType.js.map +1 -0
  525. package/lib/esm/utils/getInheritedStores.js +19 -0
  526. package/lib/esm/utils/getInheritedStores.js.map +1 -0
  527. package/lib/esm/utils/getJsonEntityStore.js +14 -0
  528. package/lib/esm/utils/getJsonEntityStore.js.map +1 -0
  529. package/lib/esm/utils/getJsonPathParameters.js +69 -0
  530. package/lib/esm/utils/getJsonPathParameters.js.map +1 -0
  531. package/lib/esm/utils/getJsonSchema.js +51 -0
  532. package/lib/esm/utils/getJsonSchema.js.map +1 -0
  533. package/lib/esm/utils/getJsonType.js +36 -0
  534. package/lib/esm/utils/getJsonType.js.map +1 -0
  535. package/lib/esm/utils/getOperationsRoutes.js +32 -0
  536. package/lib/esm/utils/getOperationsRoutes.js.map +1 -0
  537. package/lib/esm/utils/getOperationsStores.js +29 -0
  538. package/lib/esm/utils/getOperationsStores.js.map +1 -0
  539. package/lib/esm/utils/getPropertiesStores.js +40 -0
  540. package/lib/esm/utils/getPropertiesStores.js.map +1 -0
  541. package/lib/esm/utils/getRequiredProperties.js +62 -0
  542. package/lib/esm/utils/getRequiredProperties.js.map +1 -0
  543. package/lib/esm/utils/getSpec.js +83 -0
  544. package/lib/esm/utils/getSpec.js.map +1 -0
  545. package/lib/esm/utils/isSuccessStatus.js +3 -0
  546. package/lib/esm/utils/isSuccessStatus.js.map +1 -0
  547. package/lib/esm/utils/mapHeaders.js +25 -0
  548. package/lib/esm/utils/mapHeaders.js.map +1 -0
  549. package/lib/esm/utils/mapNullableType.js +45 -0
  550. package/lib/esm/utils/mapNullableType.js.map +1 -0
  551. package/lib/esm/utils/mapRouteOptions.js +22 -0
  552. package/lib/esm/utils/mapRouteOptions.js.map +1 -0
  553. package/lib/esm/utils/matchGroups.js +18 -0
  554. package/lib/esm/utils/matchGroups.js.map +1 -0
  555. package/lib/esm/utils/mergeOperation.js +40 -0
  556. package/lib/esm/utils/mergeOperation.js.map +1 -0
  557. package/lib/esm/utils/mergeSpec.js +42 -0
  558. package/lib/esm/utils/mergeSpec.js.map +1 -0
  559. package/lib/esm/utils/operationIdFormatter.js +33 -0
  560. package/lib/esm/utils/operationIdFormatter.js.map +1 -0
  561. package/lib/esm/utils/ref.js +67 -0
  562. package/lib/esm/utils/ref.js.map +1 -0
  563. package/lib/esm/utils/toJsonMapCollection.js +11 -0
  564. package/lib/esm/utils/toJsonMapCollection.js.map +1 -0
  565. package/lib/esm/utils/toJsonRegex.js +8 -0
  566. package/lib/esm/utils/toJsonRegex.js.map +1 -0
  567. package/lib/{components → types/components}/anyMapper.d.ts +0 -0
  568. package/lib/{components → types/components}/classMapper.d.ts +1 -1
  569. package/lib/{components → types/components}/genericsMapper.d.ts +0 -0
  570. package/lib/{components → types/components}/index.d.ts +2 -0
  571. package/lib/{components → types/components}/inheritedClassMapper.d.ts +1 -1
  572. package/lib/{components → types/components}/itemMapper.d.ts +0 -0
  573. package/lib/types/components/lazyRefMapper.d.ts +3 -0
  574. package/lib/{components → types/components}/mapMapper.d.ts +1 -1
  575. package/lib/{components → types/components}/objectMapper.d.ts +0 -0
  576. package/lib/types/components/ofMapper.d.ts +3 -0
  577. package/lib/types/components/propertiesMapper.d.ts +3 -0
  578. package/lib/{components → types/components}/schemaMapper.d.ts +1 -1
  579. package/lib/{constants → types/constants}/httpMethods.d.ts +0 -0
  580. package/lib/types/constants/httpStatusMessages.d.ts +272 -0
  581. package/lib/types/decorators/class/children.d.ts +11 -0
  582. package/lib/{decorators → types/decorators}/collections/collectionContains.d.ts +0 -0
  583. package/lib/{decorators → types/decorators}/collections/collectionOf.d.ts +1 -1
  584. package/lib/{decorators → types/decorators}/collections/maxItems.d.ts +0 -0
  585. package/lib/{decorators → types/decorators}/collections/maxProperties.d.ts +0 -0
  586. package/lib/{decorators → types/decorators}/collections/minItems.d.ts +0 -0
  587. package/lib/{decorators → types/decorators}/collections/minProperties.d.ts +0 -0
  588. package/lib/{decorators → types/decorators}/collections/uniqueItems.d.ts +0 -0
  589. package/lib/{decorators → types/decorators}/common/additionalProperties.d.ts +0 -0
  590. package/lib/{decorators → types/decorators}/common/allOf.d.ts +0 -0
  591. package/lib/{decorators → types/decorators}/common/allow.d.ts +0 -0
  592. package/lib/{decorators → types/decorators}/common/any.d.ts +1 -1
  593. package/lib/{decorators → types/decorators}/common/anyOf.d.ts +0 -0
  594. package/lib/{decorators → types/decorators}/common/const.d.ts +1 -1
  595. package/lib/{decorators → types/decorators}/common/customKey.d.ts +0 -0
  596. package/lib/{decorators → types/decorators}/common/default.d.ts +0 -0
  597. package/lib/{decorators → types/decorators}/common/description.d.ts +0 -0
  598. package/lib/{decorators → types/decorators}/common/enum.d.ts +1 -1
  599. package/lib/{decorators → types/decorators}/common/example.d.ts +0 -0
  600. package/lib/types/decorators/common/examples.d.ts +12 -0
  601. package/lib/{decorators → types/decorators}/common/exclusiveMaximum.d.ts +0 -0
  602. package/lib/{decorators → types/decorators}/common/exclusiveMinimum.d.ts +0 -0
  603. package/lib/{decorators → types/decorators}/common/format.d.ts +0 -0
  604. package/lib/{decorators → types/decorators}/common/forwardGroups.d.ts +0 -0
  605. package/lib/{decorators → types/decorators}/common/groups.d.ts +0 -0
  606. package/lib/{decorators → types/decorators}/common/hidden.d.ts +0 -0
  607. package/lib/{decorators → types/decorators}/common/ignore.d.ts +0 -0
  608. package/lib/{decorators → types/decorators}/common/integer.d.ts +0 -0
  609. package/lib/{decorators → types/decorators}/common/jsonEntityFn.d.ts +2 -2
  610. package/lib/{decorators → types/decorators}/common/maxLength.d.ts +0 -0
  611. package/lib/{decorators → types/decorators}/common/maximum.d.ts +0 -0
  612. package/lib/{decorators → types/decorators}/common/minLength.d.ts +0 -0
  613. package/lib/{decorators → types/decorators}/common/minimum.d.ts +0 -0
  614. package/lib/{decorators → types/decorators}/common/multipleOf.d.ts +0 -0
  615. package/lib/{decorators → types/decorators}/common/name.d.ts +0 -0
  616. package/lib/{decorators → types/decorators}/common/nullable.d.ts +1 -1
  617. package/lib/{decorators → types/decorators}/common/oneOf.d.ts +0 -0
  618. package/lib/{decorators → types/decorators}/common/optional.d.ts +0 -0
  619. package/lib/{decorators → types/decorators}/common/pattern.d.ts +0 -0
  620. package/lib/{decorators → types/decorators}/common/property.d.ts +1 -0
  621. package/lib/{decorators → types/decorators}/common/readOnly.d.ts +0 -0
  622. package/lib/{decorators → types/decorators}/common/required.d.ts +0 -0
  623. package/lib/{decorators → types/decorators}/common/requiredGroups.d.ts +1 -1
  624. package/lib/{decorators → types/decorators}/common/schema.d.ts +0 -0
  625. package/lib/{decorators → types/decorators}/common/title.d.ts +0 -0
  626. package/lib/{decorators → types/decorators}/common/writeOnly.d.ts +0 -0
  627. package/lib/{decorators → types/decorators}/config/jsonEntityComponent.d.ts +0 -0
  628. package/lib/{decorators → types/decorators}/generics/genericOf.d.ts +0 -0
  629. package/lib/{decorators → types/decorators}/generics/generics.d.ts +0 -0
  630. package/lib/{decorators → types/decorators}/index.d.ts +3 -0
  631. package/lib/{decorators → types/decorators}/operations/consumes.d.ts +0 -0
  632. package/lib/{decorators → types/decorators}/operations/contentType.d.ts +0 -0
  633. package/lib/{decorators → types/decorators}/operations/deprecated.d.ts +0 -0
  634. package/lib/{decorators → types/decorators}/operations/header.d.ts +0 -0
  635. package/lib/{decorators → types/decorators}/operations/in.d.ts +0 -0
  636. package/lib/types/decorators/operations/inFile.d.ts +25 -0
  637. package/lib/{decorators → types/decorators}/operations/location.d.ts +0 -0
  638. package/lib/{decorators → types/decorators}/operations/operationId.d.ts +0 -0
  639. package/lib/{decorators → types/decorators}/operations/operationPath.d.ts +0 -0
  640. package/lib/{decorators → types/decorators}/operations/partial.d.ts +0 -0
  641. package/lib/{decorators → types/decorators}/operations/path.d.ts +0 -0
  642. package/lib/{decorators → types/decorators}/operations/produces.d.ts +0 -0
  643. package/lib/{decorators → types/decorators}/operations/redirect.d.ts +0 -0
  644. package/lib/{decorators → types/decorators}/operations/returns.d.ts +16 -1
  645. package/lib/{decorators → types/decorators}/operations/route.d.ts +3 -0
  646. package/lib/{decorators → types/decorators}/operations/security.d.ts +0 -0
  647. package/lib/{decorators → types/decorators}/operations/status.d.ts +0 -0
  648. package/lib/{decorators → types/decorators}/operations/summary.d.ts +0 -0
  649. package/lib/{decorators → types/decorators}/operations/tags.d.ts +0 -0
  650. package/lib/{domain → types/domain}/DecoratorContext.d.ts +0 -0
  651. package/lib/{domain → types/domain}/JsonAliasMap.d.ts +0 -0
  652. package/lib/types/domain/JsonClassStore.d.ts +12 -0
  653. package/lib/types/domain/JsonEntityStore.d.ts +136 -0
  654. package/lib/{domain → types/domain}/JsonFormatTypes.d.ts +0 -0
  655. package/lib/{domain → types/domain}/JsonLazyRef.d.ts +0 -0
  656. package/lib/{domain → types/domain}/JsonMap.d.ts +0 -0
  657. package/lib/types/domain/JsonMethodStore.d.ts +40 -0
  658. package/lib/{domain → types/domain}/JsonOperation.d.ts +1 -0
  659. package/lib/types/domain/JsonOperationPathsMap.d.ts +7 -0
  660. package/lib/types/domain/JsonOperationRoute.d.ts +24 -0
  661. package/lib/{domain → types/domain}/JsonParameter.d.ts +3 -1
  662. package/lib/types/domain/JsonParameterStore.d.ts +30 -0
  663. package/lib/{domain → types/domain}/JsonParameterTypes.d.ts +0 -0
  664. package/lib/types/domain/JsonPropertyStore.d.ts +23 -0
  665. package/lib/{domain → types/domain}/JsonRequestBody.d.ts +0 -0
  666. package/lib/{domain → types/domain}/JsonResponse.d.ts +0 -0
  667. package/lib/{domain → types/domain}/JsonSchema.d.ts +6 -12
  668. package/lib/{domain → types/domain}/SpecTypes.d.ts +3 -0
  669. package/lib/{domain → types/domain}/index.d.ts +5 -0
  670. package/lib/{hooks → types/hooks}/alterIgnore.d.ts +0 -0
  671. package/lib/types/hooks/alterOneOf.d.ts +3 -0
  672. package/lib/{hooks → types/hooks}/alterRequiredGroups.d.ts +0 -0
  673. package/lib/{index.d.ts → types/index.d.ts} +3 -0
  674. package/lib/{interfaces → types/interfaces}/IgnoreCallback.d.ts +0 -0
  675. package/lib/{interfaces → types/interfaces}/JsonHookContext.d.ts +0 -0
  676. package/lib/{interfaces → types/interfaces}/JsonOpenSpec.d.ts +0 -0
  677. package/lib/{interfaces → types/interfaces}/JsonSchemaOptions.d.ts +0 -0
  678. package/lib/{interfaces → types/interfaces}/index.d.ts +0 -0
  679. package/lib/{registries → types/registries}/JsonSchemaMapperContainer.d.ts +3 -2
  680. package/lib/{utils → types/utils}/buildPath.d.ts +0 -0
  681. package/lib/{utils → types/utils}/concatParameters.d.ts +0 -0
  682. package/lib/types/utils/concatPath.d.ts +1 -0
  683. package/lib/{utils → types/utils}/defineStatusModel.d.ts +0 -0
  684. package/lib/{utils → types/utils}/from.d.ts +0 -0
  685. package/lib/{utils → types/utils}/generics.d.ts +0 -0
  686. package/lib/{utils → types/utils}/getComputedType.d.ts +0 -0
  687. package/lib/{utils → types/utils}/getInheritedStores.d.ts +2 -2
  688. package/lib/types/utils/getJsonEntityStore.d.ts +15 -0
  689. package/lib/{utils → types/utils}/getJsonPathParameters.d.ts +0 -0
  690. package/lib/types/utils/getJsonSchema.d.ts +4 -0
  691. package/lib/{utils → types/utils}/getJsonType.d.ts +0 -0
  692. package/lib/types/utils/getOperationsRoutes.d.ts +8 -0
  693. package/lib/types/utils/getOperationsStores.d.ts +6 -0
  694. package/lib/types/utils/getPropertiesStores.d.ts +20 -0
  695. package/lib/{utils → types/utils}/getRequiredProperties.d.ts +0 -0
  696. package/lib/{utils → types/utils}/getSpec.d.ts +0 -0
  697. package/lib/{utils → types/utils}/isSuccessStatus.d.ts +0 -0
  698. package/lib/{utils → types/utils}/mapHeaders.d.ts +0 -0
  699. package/lib/{utils → types/utils}/mapNullableType.d.ts +0 -0
  700. package/lib/{utils → types/utils}/mapRouteOptions.d.ts +1 -1
  701. package/lib/{utils → types/utils}/matchGroups.d.ts +0 -0
  702. package/lib/{utils → types/utils}/mergeOperation.d.ts +0 -0
  703. package/lib/{utils → types/utils}/mergeSpec.d.ts +0 -0
  704. package/lib/{utils → types/utils}/operationIdFormatter.d.ts +0 -0
  705. package/lib/types/utils/ref.d.ts +14 -0
  706. package/lib/{utils → types/utils}/toJsonMapCollection.d.ts +0 -0
  707. package/lib/{utils → types/utils}/toJsonRegex.d.ts +0 -0
  708. package/package.json +21 -17
  709. package/tsconfig.compile.esm.json +23 -0
  710. package/lib/components/lazyRefMapper.d.ts +0 -19
  711. package/lib/constants/httpStatusMessages.d.ts +0 -5
  712. package/lib/domain/JsonEntityStore.d.ts +0 -94
  713. package/lib/index.js +0 -7894
  714. package/lib/index.js.map +0 -1
  715. package/lib/index.modern.js +0 -7751
  716. package/lib/index.modern.js.map +0 -1
  717. package/lib/registries/JsonEntitiesContainer.d.ts +0 -6
  718. package/lib/utils/getJsonEntityStore.d.ts +0 -6
  719. package/lib/utils/getJsonSchema.d.ts +0 -5
  720. package/lib/utils/getOperationsStores.d.ts +0 -6
  721. package/lib/utils/getPropertiesStores.d.ts +0 -20
  722. package/lib/utils/isJsonClass.d.ts +0 -4
  723. package/lib/utils/mergeSpec.benchmark.d.ts +0 -1
  724. package/lib/utils/ref.d.ts +0 -46
@@ -0,0 +1,77 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn";
2
+ /**
3
+ * A numeric instance is valid only if division by this keyword's value results in an integer.
4
+ *
5
+ * ::: warning
6
+ * The value of `multipleOf` MUST be a number, strictly greater than 0.
7
+ * :::
8
+ *
9
+ * ::: warning
10
+ * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/common.
11
+ * :::
12
+ *
13
+ * ## Example
14
+ * ### With primitive type
15
+ *
16
+ * ```typescript
17
+ * class Model {
18
+ * @MultipleOf(2)
19
+ * property: Number;
20
+ * }
21
+ * ```
22
+ *
23
+ * ```json
24
+ * {
25
+ * "type": "object",
26
+ * "properties": {
27
+ * "property": {
28
+ * "type": "number",
29
+ * "multipleOf": 2
30
+ * }
31
+ * }
32
+ * }
33
+ * ```
34
+ *
35
+ * ### With array type
36
+ *
37
+ * ```typescript
38
+ * class Model {
39
+ * @CollectionOf(number)
40
+ * @MultipleOf(2)
41
+ * property: number[];
42
+ * }
43
+ * ```
44
+ *
45
+ * Will produce:
46
+ *
47
+ * ```json
48
+ * {
49
+ * "type": "object",
50
+ * "properties": {
51
+ * "property": {
52
+ * "type": "array",
53
+ * "items": {
54
+ * "type": "number",
55
+ * "multipleOf": 2
56
+ * }
57
+ * }
58
+ * }
59
+ * }
60
+ * ```
61
+ *
62
+ * @param {number} multipleOf The multiple value allowed
63
+ * @decorator
64
+ * @validation
65
+ * @swagger
66
+ * @schema
67
+ * @input
68
+ */
69
+ export function MultipleOf(multipleOf) {
70
+ if (multipleOf <= 0) {
71
+ throw new Error("The value of multipleOf MUST be a number, strictly greater than 0.");
72
+ }
73
+ return JsonEntityFn((store) => {
74
+ store.itemSchema.multipleOf(multipleOf);
75
+ });
76
+ }
77
+ //# sourceMappingURL=multipleOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multipleOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/multipleOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,MAAM,UAAU,UAAU,CAAC,UAAkB;IAC3C,IAAI,UAAU,IAAI,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;KACvF;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n *\n * ::: warning\n * The value of `multipleOf` MUST be a number, strictly greater than 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MultipleOf(2)\n * property: Number;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(number)\n * @MultipleOf(2)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} multipleOf The multiple value allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function MultipleOf(multipleOf: number) {\n if (multipleOf <= 0) {\n throw new Error(\"The value of multipleOf MUST be a number, strictly greater than 0.\");\n }\n\n return JsonEntityFn((store) => {\n store.itemSchema.multipleOf(multipleOf);\n });\n}\n"]}
@@ -0,0 +1,48 @@
1
+ import { decoratorTypeOf, DecoratorTypes } from "@tsed/core";
2
+ import { JsonEntityFn } from "../common/jsonEntityFn";
3
+ /**
4
+ * Add a name metadata on the decorated element.
5
+ *
6
+ * ## Examples
7
+ * ### On parameters
8
+ *
9
+ * ```typescript
10
+ * async myMethod(@Name("nameOf") @PathParams("id") id: string): Promise<Model> {
11
+ *
12
+ * }
13
+ * ```
14
+ *
15
+ * ### On parameters
16
+ *
17
+ * ```typescript
18
+ * @Name("AliasName")
19
+ * @Controller("/")
20
+ * class ModelCtrl {
21
+ *
22
+ * }
23
+ * ```
24
+ *
25
+ * @param name
26
+ * @decorator
27
+ * @validation
28
+ * @swagger
29
+ * @schema
30
+ * @input
31
+ * @classDecorator
32
+ * @operation
33
+ */
34
+ export function Name(name) {
35
+ return JsonEntityFn((store, args) => {
36
+ switch (decoratorTypeOf(args)) {
37
+ case DecoratorTypes.CLASS:
38
+ store.schema.name(name);
39
+ break;
40
+ case DecoratorTypes.PARAM:
41
+ store.parameter.name(name);
42
+ break;
43
+ default:
44
+ store.parent.schema.addAlias(args[1], name);
45
+ }
46
+ });
47
+ }
48
+ //# sourceMappingURL=name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"name.js","sourceRoot":"","sources":["../../../../src/decorators/common/name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAEhF,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,IAAI,CAAC,IAAS;IAC5B,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,IAAyB,EAAE,EAAE;QACxE,QAAQ,eAAe,CAAC,IAAI,CAAC,EAAE;YAC7B,KAAK,cAAc,CAAC,KAAK;gBACvB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACxB,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,KAAK,CAAC,SAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,MAAM;YACR;gBACE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;SAC/C;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add a name metadata on the decorated element.\n *\n * ## Examples\n * ### On parameters\n *\n * ```typescript\n * async myMethod(@Name(\"nameOf\") @PathParams(\"id\") id: string): Promise<Model> {\n *\n * }\n * ```\n *\n * ### On parameters\n *\n * ```typescript\n * @Name(\"AliasName\")\n * @Controller(\"/\")\n * class ModelCtrl {\n *\n * }\n * ```\n *\n * @param name\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @operation\n */\nexport function Name(name: any) {\n return JsonEntityFn((store: JsonEntityStore, args: DecoratorParameters) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.CLASS:\n store.schema.name(name);\n break;\n case DecoratorTypes.PARAM:\n store.parameter!.name(name);\n break;\n default:\n store.parent.schema.addAlias(args[1], name);\n }\n });\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { useDecorators } from "@tsed/core";
2
+ import { Any } from "./any";
3
+ import { Property } from "./property";
4
+ /**
5
+ * Set field as nullable.
6
+ *
7
+ * ## Example
8
+ *
9
+ * ```typescript
10
+ * class Model {
11
+ * @Nullable(Date)
12
+ * property: Date | null;
13
+ *
14
+ * @Nullable(String, Number, Boolean)
15
+ * property: string | number | boolean | null;
16
+ * }
17
+ * ```
18
+ *
19
+ * @returns {Function}
20
+ * @decorator
21
+ * @validation
22
+ * @swagger
23
+ * @schema
24
+ * @input
25
+ */
26
+ export function Nullable(type, ...types) {
27
+ types = [type, ...types];
28
+ return useDecorators(types.length === 1 && Property(types[0]), Any(null, ...types));
29
+ }
30
+ //# sourceMappingURL=nullable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nullable.js","sourceRoot":"","sources":["../../../../src/decorators/common/nullable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,aAAa,EAAC,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,QAAQ,CAAC,IAA2C,EAAE,GAAG,KAAgD;IACvH,KAAK,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;IACzB,OAAO,aAAa,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;AACtF,CAAC","sourcesContent":["import {Type, useDecorators} from \"@tsed/core\";\nimport type {JSONSchema6TypeName} from \"json-schema\";\nimport {Any} from \"./any\";\nimport {Property} from \"./property\";\n\n/**\n * Set field as nullable.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Nullable(Date)\n * property: Date | null;\n *\n * @Nullable(String, Number, Boolean)\n * property: string | number | boolean | null;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Nullable(type: JSONSchema6TypeName | Type<any> | any, ...types: (JSONSchema6TypeName | Type<any> | any)[]) {\n types = [type, ...types];\n return useDecorators(types.length === 1 && Property(types[0]), Any(null, ...types));\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn";
2
+ /**
3
+ * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
4
+ *
5
+ * ::: warning
6
+ * OneOf isn't supported by OS2
7
+ * :::
8
+ *
9
+ * @decorator
10
+ * @validation
11
+ * @swagger
12
+ * @schema
13
+ * @classDecorator
14
+ * @input
15
+ * @param oneOf
16
+ */
17
+ export function OneOf(...oneOf) {
18
+ return JsonEntityFn((entity) => {
19
+ entity.itemSchema.oneOf(oneOf);
20
+ entity.type = Object;
21
+ });
22
+ }
23
+ //# sourceMappingURL=oneOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oneOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/oneOf.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAsB;IAC7C,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC/B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {AnyJsonSchema} from \"../../domain/JsonSchema\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * ::: warning\n * OneOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param oneOf\n */\nexport function OneOf(...oneOf: AnyJsonSchema[]) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.oneOf(oneOf);\n entity.type = Object;\n });\n}\n"]}
@@ -0,0 +1,24 @@
1
+ import { DecoratorTypes } from "@tsed/core";
2
+ import { JsonEntityFn } from "./jsonEntityFn";
3
+ /**
4
+ * Add optional annotation on Property or Parameter.
5
+ *
6
+ * @decorator
7
+ * @validation
8
+ * @swagger
9
+ * @schema
10
+ * @input
11
+ */
12
+ export function Optional() {
13
+ return JsonEntityFn((store) => {
14
+ switch (store.decoratorType) {
15
+ case DecoratorTypes.PARAM:
16
+ store.required = false;
17
+ break;
18
+ case DecoratorTypes.PROP:
19
+ store.parentSchema.removeRequired(store.propertyName);
20
+ break;
21
+ }
22
+ });
23
+ }
24
+ //# sourceMappingURL=optional.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optional.js","sourceRoot":"","sources":["../../../../src/decorators/common/optional.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAA2B,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAG5C;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,KAAK;gBACtB,KAA4B,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAC/C,MAAM;YACR,KAAK,cAAc,CAAC,IAAI;gBACtB,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;gBACtD,MAAM;SACT;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore\";\n\n/**\n * Add optional annotation on Property or Parameter.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Optional() {\n return JsonEntityFn((store) => {\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).required = false;\n break;\n case DecoratorTypes.PROP:\n store.parentSchema.removeRequired(store.propertyName);\n break;\n }\n });\n}\n"]}
@@ -0,0 +1,99 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn";
2
+ /**
3
+ * The pattern and Pattern Properties keywords use regular expressions to express constraints.
4
+ * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.
5
+ *
6
+ * ::: warning
7
+ * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/common.
8
+ * :::
9
+ *
10
+ * A single unicode character (other than the special characters below) matches itself.
11
+ *
12
+ * * `^`: Matches only at the beginning of the string.
13
+ * * `$`: Matches only at the end of the string.
14
+ * * `(...)`: Group a series of regular expressions into a single regular expression.
15
+ * * `|`: Matches either the regular expression preceding or following the | symbol.
16
+ * * `[abc]`: Matches any of the characters inside the square brackets.
17
+ * * `[a-z]`: Matches the range of characters.
18
+ * * `[^abc]`: Matches any character not listed.
19
+ * * `[^a-z]`: Matches any character outside of the range.
20
+ * * `+`: Matches one or more repetitions of the preceding regular expression.
21
+ * * `*`: Matches zero or more repetitions of the preceding regular expression.
22
+ * * `?`: Matches zero or one repetitions of the preceding regular expression.
23
+ * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.
24
+ * * `{x}`: Match exactly x occurrences of the preceding regular expression.
25
+ * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.
26
+ * * `{x,}`: Match x occurrences or more of the preceding regular expression.
27
+ * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.
28
+ *
29
+ * ## Example
30
+ *
31
+ * ```typescript
32
+ * class Model {
33
+ * @Pattern("^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$")
34
+ * @Pattern(/^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$/)
35
+ * property: string;
36
+ * }
37
+ * ```
38
+ *
39
+ * ### With primitive type
40
+ *
41
+ * ```typescript
42
+ * class Model {
43
+ * @Pattern(/^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$/)
44
+ * property: string;
45
+ * }
46
+ * ```
47
+ *
48
+ * ```json
49
+ * {
50
+ * "type": "object",
51
+ * "properties": {
52
+ * "property": {
53
+ * "type": "string",
54
+ * "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$"
55
+ * }
56
+ * }
57
+ * }
58
+ * ```
59
+ *
60
+ * ### With array type
61
+ *
62
+ * ```typescript
63
+ * class Model {
64
+ * @CollectionOf(string)
65
+ * @Pattern(/^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$/)
66
+ * property: string[];
67
+ * }
68
+ * ```
69
+ *
70
+ * Will produce:
71
+ *
72
+ * ```json
73
+ * {
74
+ * "type": "object",
75
+ * "properties": {
76
+ * "property": {
77
+ * "type": "array",
78
+ * "items": {
79
+ * "type": "string",
80
+ * "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$"
81
+ * }
82
+ * }
83
+ * }
84
+ * }
85
+ * ```
86
+ *
87
+ * @param {string} pattern
88
+ * @decorator
89
+ * @validation
90
+ * @swagger
91
+ * @schema
92
+ * @input
93
+ */
94
+ export function Pattern(pattern) {
95
+ return JsonEntityFn((store) => {
96
+ store.itemSchema.pattern(pattern);
97
+ });
98
+ }
99
+ //# sourceMappingURL=pattern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../../../src/decorators/common/pattern.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,MAAM,UAAU,OAAO,CAAC,OAAwB;IAC9C,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * The pattern and Pattern Properties keywords use regular expressions to express constraints.\n * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.\n *\n * ::: warning\n * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * A single unicode character (other than the special characters below) matches itself.\n *\n * * `^`: Matches only at the beginning of the string.\n * * `$`: Matches only at the end of the string.\n * * `(...)`: Group a series of regular expressions into a single regular expression.\n * * `|`: Matches either the regular expression preceding or following the | symbol.\n * * `[abc]`: Matches any of the characters inside the square brackets.\n * * `[a-z]`: Matches the range of characters.\n * * `[^abc]`: Matches any character not listed.\n * * `[^a-z]`: Matches any character outside of the range.\n * * `+`: Matches one or more repetitions of the preceding regular expression.\n * * `*`: Matches zero or more repetitions of the preceding regular expression.\n * * `?`: Matches zero or one repetitions of the preceding regular expression.\n * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.\n * * `{x}`: Match exactly x occurrences of the preceding regular expression.\n * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.\n * * `{x,}`: Match x occurrences or more of the preceding regular expression.\n * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Pattern(\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\")\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(string)\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} pattern\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Pattern(pattern: string | RegExp) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.pattern(pattern);\n });\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { isClass } from "@tsed/core";
2
+ import { JsonEntityFn } from "./jsonEntityFn";
3
+ /**
4
+ * Declare a new property on a model.
5
+ *
6
+ * @param type
7
+ * @decorator
8
+ * @validation
9
+ * @swagger
10
+ * @schema
11
+ * @input
12
+ */
13
+ export function Property(type) {
14
+ return JsonEntityFn((store) => {
15
+ if (type) {
16
+ if (isClass(type)) {
17
+ store.type = type;
18
+ }
19
+ store.itemSchema.type(type);
20
+ }
21
+ });
22
+ }
23
+ //# sourceMappingURL=property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property.js","sourceRoot":"","sources":["../../../../src/decorators/common/property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,IAAI,IAAI,EAAE;YACR,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;gBACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;aACnB;YACD,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC7B;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {isClass} from \"@tsed/core\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Declare a new property on a model.\n *\n * @param type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Property(type?: any) {\n return JsonEntityFn((store) => {\n if (type) {\n if (isClass(type)) {\n store.type = type;\n }\n store.itemSchema.type(type);\n }\n });\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn";
2
+ /**
3
+ * Set the property as readOnly.
4
+ *
5
+ * @returns {Function}
6
+ * @decorator
7
+ * @validation
8
+ * @property
9
+ * @parameter
10
+ * @schema
11
+ */
12
+ export function ReadOnly(readOnly = true) {
13
+ return JsonEntityFn((store) => {
14
+ store.itemSchema.readOnly(readOnly);
15
+ });
16
+ }
17
+ //# sourceMappingURL=readOnly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readOnly.js","sourceRoot":"","sources":["../../../../src/decorators/common/readOnly.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,WAAoB,IAAI;IAC/C,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n/**\n * Set the property as readOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function ReadOnly(readOnly: boolean = true) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.readOnly(readOnly);\n });\n}\n"]}
@@ -0,0 +1,49 @@
1
+ import { Allow } from "./allow";
2
+ import { Optional } from "./optional";
3
+ /**
4
+ * Add required annotation on Property or Parameter.
5
+ *
6
+ * The @@Required@@ decorator can be used on two cases.
7
+ *
8
+ * To decorate a parameters:
9
+ *
10
+ * ```typescript
11
+ * @Post("/")
12
+ * async method(@Required() @BodyParams("field") field: string) {}
13
+ * ```
14
+ *
15
+ * To decorate a model:
16
+ *
17
+ * ```typescript
18
+ * class Model {
19
+ * @Required()
20
+ * field: string;
21
+ * }
22
+ * ```
23
+ *
24
+ * ::: tip
25
+ * Required will throw a BadRequest when the given value is `null`, an empty string or `undefined`.
26
+ * :::
27
+ *
28
+ * ### Allow values
29
+ *
30
+ * In some case, you didn't want trigger a BadRequest when the value is an empty string for example.
31
+ * The decorator `@Allow()`, allow you to configure a value list for which there will be no exception.
32
+ *
33
+ * ```typescript
34
+ * class Model {
35
+ * @Allow("") // add automatically required flag
36
+ * field: string;
37
+ * }
38
+ * ```
39
+ *
40
+ * @decorator
41
+ * @validation
42
+ * @swagger
43
+ * @schema
44
+ * @input
45
+ */
46
+ export function Required(required = true, ...allowedRequiredValues) {
47
+ return required ? Allow(...allowedRequiredValues) : Optional();
48
+ }
49
+ //# sourceMappingURL=required.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"required.js","sourceRoot":"","sources":["../../../../src/decorators/common/required.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,UAAU,QAAQ,CAAC,WAAoB,IAAI,EAAE,GAAG,qBAA4B;IAChF,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AACjE,CAAC","sourcesContent":["import {Allow} from \"./allow\";\nimport {Optional} from \"./optional\";\n\n/**\n * Add required annotation on Property or Parameter.\n *\n * The @@Required@@ decorator can be used on two cases.\n *\n * To decorate a parameters:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Required() @BodyParams(\"field\") field: string) {}\n * ```\n *\n * To decorate a model:\n *\n * ```typescript\n * class Model {\n * @Required()\n * field: string;\n * }\n * ```\n *\n * ::: tip\n * Required will throw a BadRequest when the given value is `null`, an empty string or `undefined`.\n * :::\n *\n * ### Allow values\n *\n * In some case, you didn't want trigger a BadRequest when the value is an empty string for example.\n * The decorator `@Allow()`, allow you to configure a value list for which there will be no exception.\n *\n * ```typescript\n * class Model {\n * @Allow(\"\") // add automatically required flag\n * field: string;\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Required(required: boolean = true, ...allowedRequiredValues: any[]) {\n return required ? Allow(...allowedRequiredValues) : Optional();\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { matchGroups } from "../../utils/matchGroups";
2
+ import { JsonEntityFn } from "./jsonEntityFn";
3
+ /**
4
+ * Apply groups validation strategy for required property.
5
+ *
6
+ * @decorator
7
+ * @validation
8
+ * @swagger
9
+ * @schema
10
+ * @input
11
+ */
12
+ export function RequiredGroups(...groups) {
13
+ return JsonEntityFn((entity) => {
14
+ entity.parent.schema.$hooks.on("requiredGroups", (required, givenGroups) => {
15
+ if (matchGroups(groups, givenGroups)) {
16
+ return required.filter((key) => key !== entity.propertyKey);
17
+ }
18
+ return required;
19
+ });
20
+ });
21
+ }
22
+ //# sourceMappingURL=requiredGroups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requiredGroups.js","sourceRoot":"","sources":["../../../../src/decorators/common/requiredGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,GAAG,MAAgB;IAChD,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,QAAkB,EAAE,WAAqB,EAAE,EAAE;YAC7F,IAAI,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE;gBACpC,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,KAAK,MAAM,CAAC,WAAW,CAAC,CAAC;aACrE;YAED,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {matchGroups} from \"../../utils/matchGroups\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Apply groups validation strategy for required property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function RequiredGroups(...groups: string[]): PropertyDecorator {\n return JsonEntityFn((entity) => {\n entity.parent.schema.$hooks.on(\"requiredGroups\", (required: string[], givenGroups: string[]) => {\n if (matchGroups(groups, givenGroups)) {\n return required.filter((key: string) => key !== entity.propertyKey);\n }\n\n return required;\n });\n });\n}\n"]}
@@ -0,0 +1,63 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn";
2
+ /**
3
+ * Write data formatted to JsonSchema.
4
+ *
5
+ * ## Example
6
+ *
7
+ * ```typescript
8
+ * @Schema({title: "test"})
9
+ * class Model {
10
+ * @Schema({formatMinimum: "1987-10-24"})
11
+ * @Format("date")
12
+ * birthDate: Date
13
+ * }
14
+ * ```
15
+ *
16
+ * Will produce:
17
+ *
18
+ * ```json
19
+ * {
20
+ * "type": "object",
21
+ * "title": "test",
22
+ * "properties": {
23
+ * "birthdate": {
24
+ * "type": "string",
25
+ * "format": "date",
26
+ * "formatMinimum": "1987-10-24"
27
+ * }
28
+ * }
29
+ * }
30
+ * ```
31
+ *
32
+ * @param partialSchema
33
+ * @decorator
34
+ * @validation
35
+ * @swagger
36
+ * @schema
37
+ * @classDecorator
38
+ * @input
39
+ */
40
+ export function Schema(partialSchema) {
41
+ return JsonEntityFn((entity) => {
42
+ Object.entries(partialSchema).forEach(([key, value]) => {
43
+ entity.schema.set(key, value);
44
+ });
45
+ });
46
+ }
47
+ /**
48
+ * Apply specific schema depending on the spec version
49
+ * @param specType
50
+ * @param schema
51
+ * @decorator
52
+ * @validation
53
+ * @swagger
54
+ * @schema
55
+ * @classDecorator
56
+ * @input
57
+ */
58
+ export function For(specType, schema) {
59
+ return JsonEntityFn((entity) => {
60
+ entity.schema.set(specType, schema);
61
+ });
62
+ }
63
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/decorators/common/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,MAAM,CAAC,aAAqD;IAC1E,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACrD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,CAAC,QAAmB,EAAE,MAAW;IAClD,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonSchema, JsonSchemaObject} from \"../../domain/JsonSchema\";\nimport {SpecTypes} from \"../../domain/SpecTypes\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Write data formatted to JsonSchema.\n *\n * ## Example\n *\n * ```typescript\n * @Schema({title: \"test\"})\n * class Model {\n * @Schema({formatMinimum: \"1987-10-24\"})\n * @Format(\"date\")\n * birthDate: Date\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"title\": \"test\",\n * \"properties\": {\n * \"birthdate\": {\n * \"type\": \"string\",\n * \"format\": \"date\",\n * \"formatMinimum\": \"1987-10-24\"\n * }\n * }\n * }\n * ```\n *\n * @param partialSchema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Schema(partialSchema: Partial<JsonSchemaObject> | JsonSchema) {\n return JsonEntityFn((entity) => {\n Object.entries(partialSchema).forEach(([key, value]) => {\n entity.schema.set(key, value);\n });\n });\n}\n\n/**\n * Apply specific schema depending on the spec version\n * @param specType\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function For(specType: SpecTypes, schema: any) {\n return JsonEntityFn((entity) => {\n entity.schema.set(specType, schema);\n });\n}\n"]}
@@ -0,0 +1,45 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn";
2
+ /**
3
+ * Add title metadata on the decorated element.
4
+ *
5
+ * ::: warning
6
+ * For v6 user, use @@Title@@ from @tsed/schema instead of @tsed/common.
7
+ * :::
8
+ *
9
+ * ## Example
10
+ *
11
+ * ```typescript
12
+ * class Model {
13
+ * @Title("title")
14
+ * id: string;
15
+ * }
16
+ * ```
17
+ *
18
+ * Will produce:
19
+ *
20
+ * ```json
21
+ * {
22
+ * "type": "object",
23
+ * "properties": {
24
+ * "id": {
25
+ * "type": "string",
26
+ * "title": "title"
27
+ * }
28
+ * }
29
+ * }
30
+ * ```
31
+ *
32
+ * @param {string} title
33
+ * @decorator
34
+ * @validation
35
+ * @swagger
36
+ * @schema
37
+ * @classDecorator
38
+ * @input
39
+ */
40
+ export function Title(title) {
41
+ return JsonEntityFn((entity) => {
42
+ entity.schema.title(title);
43
+ });
44
+ }
45
+ //# sourceMappingURL=title.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"title.js","sourceRoot":"","sources":["../../../../src/decorators/common/title.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Add title metadata on the decorated element.\n *\n * ::: warning\n * For v6 user, use @@Title@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Title(\"title\")\n * id: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"id\": {\n * \"type\": \"string\",\n * \"title\": \"title\"\n * }\n * }\n * }\n * ```\n *\n * @param {string} title\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Title(title: string) {\n return JsonEntityFn((entity) => {\n entity.schema.title(title);\n });\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn";
2
+ /**
3
+ * Set the property as WriteOnly.
4
+ *
5
+ * @returns {Function}
6
+ * @decorator
7
+ * @validation
8
+ * @property
9
+ * @parameter
10
+ * @schema
11
+ */
12
+ export function WriteOnly(writeOnly = true) {
13
+ return JsonEntityFn((store) => {
14
+ store.itemSchema.writeOnly(writeOnly);
15
+ });
16
+ }
17
+ //# sourceMappingURL=writeOnly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeOnly.js","sourceRoot":"","sources":["../../../../src/decorators/common/writeOnly.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS,CAAC,YAAqB,IAAI;IACjD,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n/**\n * Set the property as WriteOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function WriteOnly(writeOnly: boolean = true) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.writeOnly(writeOnly);\n });\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { JsonEntitiesContainer } from "../../domain/JsonEntityStore";
2
+ /**
3
+ * Declare a new JsonEntityStore class for a specific decorator type.
4
+ *
5
+ * @ignore
6
+ * @param type
7
+ * @decorator
8
+ */
9
+ export function JsonEntityComponent(type) {
10
+ return (target) => {
11
+ JsonEntitiesContainer.set(type, target);
12
+ };
13
+ }
14
+ //# sourceMappingURL=jsonEntityComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonEntityComponent.js","sourceRoot":"","sources":["../../../../src/decorators/config/jsonEntityComponent.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AAEpF;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAoB;IACtD,OAAO,CAAC,MAA6B,EAAE,EAAE;QACvC,qBAAqB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {DecoratorTypes, Type} from \"@tsed/core\";\nimport {JsonEntityStore, JsonEntitiesContainer} from \"../../domain/JsonEntityStore\";\n\n/**\n * Declare a new JsonEntityStore class for a specific decorator type.\n *\n * @ignore\n * @param type\n * @decorator\n */\nexport function JsonEntityComponent(type: DecoratorTypes) {\n return (target: Type<JsonEntityStore>) => {\n JsonEntitiesContainer.set(type, target);\n };\n}\n"]}