@tsed/schema 7.18.3-rc.1 → 7.18.4

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 (347) hide show
  1. package/.eslintignore +13 -0
  2. package/.eslintrc.js +1 -0
  3. package/jest.config.js +13 -3
  4. package/lib/browser/schema.umd.min.js +1 -1
  5. package/lib/browser/schema.umd.min.js.map +1 -1
  6. package/lib/cjs/components/anyMapper.js.map +1 -1
  7. package/lib/cjs/components/classMapper.js.map +1 -1
  8. package/lib/cjs/components/genericsMapper.js.map +1 -1
  9. package/lib/cjs/components/inheritedClassMapper.js.map +1 -1
  10. package/lib/cjs/components/itemMapper.js.map +1 -1
  11. package/lib/cjs/components/lazyRefMapper.js.map +1 -1
  12. package/lib/cjs/components/mapMapper.js.map +1 -1
  13. package/lib/cjs/components/objectMapper.js.map +1 -1
  14. package/lib/cjs/components/ofMapper.js.map +1 -1
  15. package/lib/cjs/components/propertiesMapper.js.map +1 -1
  16. package/lib/cjs/components/schemaMapper.js +2 -0
  17. package/lib/cjs/components/schemaMapper.js.map +1 -1
  18. package/lib/cjs/constants/httpMethods.js.map +1 -1
  19. package/lib/cjs/constants/httpStatusMessages.js.map +1 -1
  20. package/lib/cjs/decorators/class/children.js.map +1 -1
  21. package/lib/cjs/decorators/class/discriminatorValue.js.map +1 -1
  22. package/lib/cjs/decorators/collections/collectionContains.js.map +1 -1
  23. package/lib/cjs/decorators/collections/collectionOf.js.map +1 -1
  24. package/lib/cjs/decorators/collections/maxItems.js.map +1 -1
  25. package/lib/cjs/decorators/collections/maxProperties.js.map +1 -1
  26. package/lib/cjs/decorators/collections/minItems.js.map +1 -1
  27. package/lib/cjs/decorators/collections/minProperties.js.map +1 -1
  28. package/lib/cjs/decorators/collections/uniqueItems.js.map +1 -1
  29. package/lib/cjs/decorators/common/additionalProperties.js.map +1 -1
  30. package/lib/cjs/decorators/common/allOf.js.map +1 -1
  31. package/lib/cjs/decorators/common/allow.js.map +1 -1
  32. package/lib/cjs/decorators/common/any.js.map +1 -1
  33. package/lib/cjs/decorators/common/anyOf.js.map +1 -1
  34. package/lib/cjs/decorators/common/const.js.map +1 -1
  35. package/lib/cjs/decorators/common/customKey.js.map +1 -1
  36. package/lib/cjs/decorators/common/default.js.map +1 -1
  37. package/lib/cjs/decorators/common/defaultMsg.js.map +1 -1
  38. package/lib/cjs/decorators/common/description.js.map +1 -1
  39. package/lib/cjs/decorators/common/discriminatorKey.js.map +1 -1
  40. package/lib/cjs/decorators/common/enum.js.map +1 -1
  41. package/lib/cjs/decorators/common/errorMsg.js.map +1 -1
  42. package/lib/cjs/decorators/common/example.js.map +1 -1
  43. package/lib/cjs/decorators/common/examples.js.map +1 -1
  44. package/lib/cjs/decorators/common/exclusiveMaximum.js.map +1 -1
  45. package/lib/cjs/decorators/common/exclusiveMinimum.js.map +1 -1
  46. package/lib/cjs/decorators/common/format.js.map +1 -1
  47. package/lib/cjs/decorators/common/forwardGroups.js.map +1 -1
  48. package/lib/cjs/decorators/common/groups.js.map +1 -1
  49. package/lib/cjs/decorators/common/hidden.js.map +1 -1
  50. package/lib/cjs/decorators/common/ignore.js.map +1 -1
  51. package/lib/cjs/decorators/common/integer.js.map +1 -1
  52. package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -1
  53. package/lib/cjs/decorators/common/maxLength.js.map +1 -1
  54. package/lib/cjs/decorators/common/maximum.js.map +1 -1
  55. package/lib/cjs/decorators/common/minLength.js.map +1 -1
  56. package/lib/cjs/decorators/common/minimum.js.map +1 -1
  57. package/lib/cjs/decorators/common/multipleOf.js.map +1 -1
  58. package/lib/cjs/decorators/common/name.js.map +1 -1
  59. package/lib/cjs/decorators/common/nullable.js.map +1 -1
  60. package/lib/cjs/decorators/common/oneOf.js.map +1 -1
  61. package/lib/cjs/decorators/common/optional.js.map +1 -1
  62. package/lib/cjs/decorators/common/pattern.js.map +1 -1
  63. package/lib/cjs/decorators/common/property.js.map +1 -1
  64. package/lib/cjs/decorators/common/readOnly.js.map +1 -1
  65. package/lib/cjs/decorators/common/recordOf.js.map +1 -1
  66. package/lib/cjs/decorators/common/required.js.map +1 -1
  67. package/lib/cjs/decorators/common/requiredGroups.js.map +1 -1
  68. package/lib/cjs/decorators/common/schema.js.map +1 -1
  69. package/lib/cjs/decorators/common/title.js.map +1 -1
  70. package/lib/cjs/decorators/common/typeError.js.map +1 -1
  71. package/lib/cjs/decorators/common/writeOnly.js.map +1 -1
  72. package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -1
  73. package/lib/cjs/decorators/generics/genericOf.js.map +1 -1
  74. package/lib/cjs/decorators/generics/generics.js.map +1 -1
  75. package/lib/cjs/decorators/operations/acceptMime.js.map +1 -1
  76. package/lib/cjs/decorators/operations/consumes.js.map +1 -1
  77. package/lib/cjs/decorators/operations/contentType.js.map +1 -1
  78. package/lib/cjs/decorators/operations/deprecated.js.map +1 -1
  79. package/lib/cjs/decorators/operations/header.js.map +1 -1
  80. package/lib/cjs/decorators/operations/in.js.map +1 -1
  81. package/lib/cjs/decorators/operations/inFile.js.map +1 -1
  82. package/lib/cjs/decorators/operations/location.js.map +1 -1
  83. package/lib/cjs/decorators/operations/operationId.js.map +1 -1
  84. package/lib/cjs/decorators/operations/operationPath.js.map +1 -1
  85. package/lib/cjs/decorators/operations/partial.js.map +1 -1
  86. package/lib/cjs/decorators/operations/path.js.map +1 -1
  87. package/lib/cjs/decorators/operations/produces.js.map +1 -1
  88. package/lib/cjs/decorators/operations/redirect.js.map +1 -1
  89. package/lib/cjs/decorators/operations/returns.js.map +1 -1
  90. package/lib/cjs/decorators/operations/route.js.map +1 -1
  91. package/lib/cjs/decorators/operations/security.js.map +1 -1
  92. package/lib/cjs/decorators/operations/status.js.map +1 -1
  93. package/lib/cjs/decorators/operations/summary.js.map +1 -1
  94. package/lib/cjs/decorators/operations/tags.js.map +1 -1
  95. package/lib/cjs/decorators/operations/view.js.map +1 -1
  96. package/lib/cjs/domain/DecoratorContext.js.map +1 -1
  97. package/lib/cjs/domain/JsonAliasMap.js.map +1 -1
  98. package/lib/cjs/domain/JsonClassStore.js.map +1 -1
  99. package/lib/cjs/domain/JsonDiscriminator.js.map +1 -1
  100. package/lib/cjs/domain/JsonEntityStore.js.map +1 -1
  101. package/lib/cjs/domain/JsonFormatTypes.js.map +1 -1
  102. package/lib/cjs/domain/JsonLazyRef.js.map +1 -1
  103. package/lib/cjs/domain/JsonMap.js.map +1 -1
  104. package/lib/cjs/domain/JsonMethodStore.js.map +1 -1
  105. package/lib/cjs/domain/JsonOperation.js.map +1 -1
  106. package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -1
  107. package/lib/cjs/domain/JsonOperationRoute.js.map +1 -1
  108. package/lib/cjs/domain/JsonParameter.js.map +1 -1
  109. package/lib/cjs/domain/JsonParameterStore.js.map +1 -1
  110. package/lib/cjs/domain/JsonParameterTypes.js.map +1 -1
  111. package/lib/cjs/domain/JsonPropertyStore.js.map +1 -1
  112. package/lib/cjs/domain/JsonRequestBody.js.map +1 -1
  113. package/lib/cjs/domain/JsonResponse.js.map +1 -1
  114. package/lib/cjs/domain/JsonSchema.js +1 -1
  115. package/lib/cjs/domain/JsonSchema.js.map +1 -1
  116. package/lib/cjs/domain/SpecTypes.js.map +1 -1
  117. package/lib/cjs/hooks/alterIgnore.js.map +1 -1
  118. package/lib/cjs/hooks/alterOneOf.js.map +1 -1
  119. package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -1
  120. package/lib/cjs/index.js +1 -0
  121. package/lib/cjs/index.js.map +1 -1
  122. package/lib/cjs/interfaces/IgnoreCallback.js.map +1 -1
  123. package/lib/cjs/interfaces/JsonHookContext.js.map +1 -1
  124. package/lib/cjs/interfaces/JsonOpenSpec.js.map +1 -1
  125. package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -1
  126. package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -1
  127. package/lib/cjs/registries/enumRegistries.js.map +1 -1
  128. package/lib/cjs/utils/buildPath.js.map +1 -1
  129. package/lib/cjs/utils/concatParameters.js.map +1 -1
  130. package/lib/cjs/utils/concatPath.js.map +1 -1
  131. package/lib/cjs/utils/defineStatusModel.js.map +1 -1
  132. package/lib/cjs/utils/from.js.map +1 -1
  133. package/lib/cjs/utils/generateSpec.js.map +1 -1
  134. package/lib/cjs/utils/generics.js.map +1 -1
  135. package/lib/cjs/utils/getComputedType.js +1 -1
  136. package/lib/cjs/utils/getComputedType.js.map +1 -1
  137. package/lib/cjs/utils/getInheritedStores.js.map +1 -1
  138. package/lib/cjs/utils/getJsonEntityStore.js.map +1 -1
  139. package/lib/cjs/utils/getJsonPathParameters.js.map +1 -1
  140. package/lib/cjs/utils/getJsonSchema.js.map +1 -1
  141. package/lib/cjs/utils/getJsonType.js.map +1 -1
  142. package/lib/cjs/utils/getOperationsRoutes.js.map +1 -1
  143. package/lib/cjs/utils/getOperationsStores.js.map +1 -1
  144. package/lib/cjs/utils/getPropertiesStores.js.map +1 -1
  145. package/lib/cjs/utils/getRequiredProperties.js.map +1 -1
  146. package/lib/cjs/utils/getSpec.js.map +1 -1
  147. package/lib/cjs/utils/getSpecType.js.map +1 -1
  148. package/lib/cjs/utils/inlineEnums.js +11 -0
  149. package/lib/cjs/utils/inlineEnums.js.map +1 -0
  150. package/lib/cjs/utils/isSuccessStatus.js.map +1 -1
  151. package/lib/cjs/utils/mapHeaders.js.map +1 -1
  152. package/lib/cjs/utils/mapNullableType.js.map +1 -1
  153. package/lib/cjs/utils/mapOpenSpec.js.map +1 -1
  154. package/lib/cjs/utils/mapOpenSpec2.js.map +1 -1
  155. package/lib/cjs/utils/mapOpenSpec3.js.map +1 -1
  156. package/lib/cjs/utils/mapOpenSpecInfo.js.map +1 -1
  157. package/lib/cjs/utils/mapRouteOptions.js.map +1 -1
  158. package/lib/cjs/utils/matchGroups.js.map +1 -1
  159. package/lib/cjs/utils/mergeOperation.js.map +1 -1
  160. package/lib/cjs/utils/mergeSpec.js.map +1 -1
  161. package/lib/cjs/utils/operationIdFormatter.js.map +1 -1
  162. package/lib/cjs/utils/ref.js.map +1 -1
  163. package/lib/cjs/utils/serializeEnumValues.js.map +1 -1
  164. package/lib/cjs/utils/toJsonMapCollection.js.map +1 -1
  165. package/lib/cjs/utils/toJsonRegex.js.map +1 -1
  166. package/lib/cjs/utils/transformToOS2.js.map +1 -1
  167. package/lib/cjs/utils/withErrorMsg.js.map +1 -1
  168. package/lib/esm/components/anyMapper.js.map +1 -1
  169. package/lib/esm/components/classMapper.js.map +1 -1
  170. package/lib/esm/components/genericsMapper.js.map +1 -1
  171. package/lib/esm/components/inheritedClassMapper.js.map +1 -1
  172. package/lib/esm/components/itemMapper.js.map +1 -1
  173. package/lib/esm/components/lazyRefMapper.js.map +1 -1
  174. package/lib/esm/components/mapMapper.js.map +1 -1
  175. package/lib/esm/components/objectMapper.js.map +1 -1
  176. package/lib/esm/components/ofMapper.js.map +1 -1
  177. package/lib/esm/components/propertiesMapper.js.map +1 -1
  178. package/lib/esm/components/schemaMapper.js +2 -0
  179. package/lib/esm/components/schemaMapper.js.map +1 -1
  180. package/lib/esm/constants/httpMethods.js.map +1 -1
  181. package/lib/esm/constants/httpStatusMessages.js.map +1 -1
  182. package/lib/esm/decorators/class/children.js.map +1 -1
  183. package/lib/esm/decorators/class/discriminatorValue.js.map +1 -1
  184. package/lib/esm/decorators/collections/collectionContains.js.map +1 -1
  185. package/lib/esm/decorators/collections/collectionOf.js.map +1 -1
  186. package/lib/esm/decorators/collections/maxItems.js.map +1 -1
  187. package/lib/esm/decorators/collections/maxProperties.js.map +1 -1
  188. package/lib/esm/decorators/collections/minItems.js.map +1 -1
  189. package/lib/esm/decorators/collections/minProperties.js.map +1 -1
  190. package/lib/esm/decorators/collections/uniqueItems.js.map +1 -1
  191. package/lib/esm/decorators/common/additionalProperties.js.map +1 -1
  192. package/lib/esm/decorators/common/allOf.js.map +1 -1
  193. package/lib/esm/decorators/common/allow.js.map +1 -1
  194. package/lib/esm/decorators/common/any.js.map +1 -1
  195. package/lib/esm/decorators/common/anyOf.js.map +1 -1
  196. package/lib/esm/decorators/common/const.js.map +1 -1
  197. package/lib/esm/decorators/common/customKey.js.map +1 -1
  198. package/lib/esm/decorators/common/default.js.map +1 -1
  199. package/lib/esm/decorators/common/defaultMsg.js.map +1 -1
  200. package/lib/esm/decorators/common/description.js.map +1 -1
  201. package/lib/esm/decorators/common/discriminatorKey.js.map +1 -1
  202. package/lib/esm/decorators/common/enum.js.map +1 -1
  203. package/lib/esm/decorators/common/errorMsg.js.map +1 -1
  204. package/lib/esm/decorators/common/example.js.map +1 -1
  205. package/lib/esm/decorators/common/examples.js.map +1 -1
  206. package/lib/esm/decorators/common/exclusiveMaximum.js.map +1 -1
  207. package/lib/esm/decorators/common/exclusiveMinimum.js.map +1 -1
  208. package/lib/esm/decorators/common/format.js.map +1 -1
  209. package/lib/esm/decorators/common/forwardGroups.js.map +1 -1
  210. package/lib/esm/decorators/common/groups.js.map +1 -1
  211. package/lib/esm/decorators/common/hidden.js.map +1 -1
  212. package/lib/esm/decorators/common/ignore.js.map +1 -1
  213. package/lib/esm/decorators/common/integer.js.map +1 -1
  214. package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -1
  215. package/lib/esm/decorators/common/maxLength.js.map +1 -1
  216. package/lib/esm/decorators/common/maximum.js.map +1 -1
  217. package/lib/esm/decorators/common/minLength.js.map +1 -1
  218. package/lib/esm/decorators/common/minimum.js.map +1 -1
  219. package/lib/esm/decorators/common/multipleOf.js.map +1 -1
  220. package/lib/esm/decorators/common/name.js.map +1 -1
  221. package/lib/esm/decorators/common/nullable.js.map +1 -1
  222. package/lib/esm/decorators/common/oneOf.js.map +1 -1
  223. package/lib/esm/decorators/common/optional.js.map +1 -1
  224. package/lib/esm/decorators/common/pattern.js.map +1 -1
  225. package/lib/esm/decorators/common/property.js.map +1 -1
  226. package/lib/esm/decorators/common/readOnly.js.map +1 -1
  227. package/lib/esm/decorators/common/recordOf.js.map +1 -1
  228. package/lib/esm/decorators/common/required.js.map +1 -1
  229. package/lib/esm/decorators/common/requiredGroups.js.map +1 -1
  230. package/lib/esm/decorators/common/schema.js.map +1 -1
  231. package/lib/esm/decorators/common/title.js.map +1 -1
  232. package/lib/esm/decorators/common/typeError.js.map +1 -1
  233. package/lib/esm/decorators/common/writeOnly.js.map +1 -1
  234. package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -1
  235. package/lib/esm/decorators/generics/genericOf.js.map +1 -1
  236. package/lib/esm/decorators/generics/generics.js.map +1 -1
  237. package/lib/esm/decorators/operations/acceptMime.js.map +1 -1
  238. package/lib/esm/decorators/operations/consumes.js.map +1 -1
  239. package/lib/esm/decorators/operations/contentType.js.map +1 -1
  240. package/lib/esm/decorators/operations/deprecated.js.map +1 -1
  241. package/lib/esm/decorators/operations/header.js.map +1 -1
  242. package/lib/esm/decorators/operations/in.js.map +1 -1
  243. package/lib/esm/decorators/operations/inFile.js.map +1 -1
  244. package/lib/esm/decorators/operations/location.js.map +1 -1
  245. package/lib/esm/decorators/operations/operationId.js.map +1 -1
  246. package/lib/esm/decorators/operations/operationPath.js.map +1 -1
  247. package/lib/esm/decorators/operations/partial.js.map +1 -1
  248. package/lib/esm/decorators/operations/path.js.map +1 -1
  249. package/lib/esm/decorators/operations/produces.js.map +1 -1
  250. package/lib/esm/decorators/operations/redirect.js.map +1 -1
  251. package/lib/esm/decorators/operations/returns.js.map +1 -1
  252. package/lib/esm/decorators/operations/route.js.map +1 -1
  253. package/lib/esm/decorators/operations/security.js.map +1 -1
  254. package/lib/esm/decorators/operations/status.js.map +1 -1
  255. package/lib/esm/decorators/operations/summary.js.map +1 -1
  256. package/lib/esm/decorators/operations/tags.js.map +1 -1
  257. package/lib/esm/decorators/operations/view.js.map +1 -1
  258. package/lib/esm/domain/DecoratorContext.js.map +1 -1
  259. package/lib/esm/domain/JsonAliasMap.js.map +1 -1
  260. package/lib/esm/domain/JsonClassStore.js.map +1 -1
  261. package/lib/esm/domain/JsonDiscriminator.js.map +1 -1
  262. package/lib/esm/domain/JsonEntityStore.js.map +1 -1
  263. package/lib/esm/domain/JsonFormatTypes.js.map +1 -1
  264. package/lib/esm/domain/JsonLazyRef.js.map +1 -1
  265. package/lib/esm/domain/JsonMap.js.map +1 -1
  266. package/lib/esm/domain/JsonMethodStore.js.map +1 -1
  267. package/lib/esm/domain/JsonOperation.js.map +1 -1
  268. package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -1
  269. package/lib/esm/domain/JsonOperationRoute.js.map +1 -1
  270. package/lib/esm/domain/JsonParameter.js.map +1 -1
  271. package/lib/esm/domain/JsonParameterStore.js.map +1 -1
  272. package/lib/esm/domain/JsonParameterTypes.js.map +1 -1
  273. package/lib/esm/domain/JsonPropertyStore.js.map +1 -1
  274. package/lib/esm/domain/JsonRequestBody.js.map +1 -1
  275. package/lib/esm/domain/JsonResponse.js.map +1 -1
  276. package/lib/esm/domain/JsonSchema.js +1 -1
  277. package/lib/esm/domain/JsonSchema.js.map +1 -1
  278. package/lib/esm/domain/SpecTypes.js.map +1 -1
  279. package/lib/esm/hooks/alterIgnore.js.map +1 -1
  280. package/lib/esm/hooks/alterOneOf.js.map +1 -1
  281. package/lib/esm/hooks/alterRequiredGroups.js.map +1 -1
  282. package/lib/esm/index.js +1 -0
  283. package/lib/esm/index.js.map +1 -1
  284. package/lib/esm/interfaces/IgnoreCallback.js.map +1 -1
  285. package/lib/esm/interfaces/JsonHookContext.js.map +1 -1
  286. package/lib/esm/interfaces/JsonOpenSpec.js.map +1 -1
  287. package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -1
  288. package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -1
  289. package/lib/esm/registries/enumRegistries.js.map +1 -1
  290. package/lib/esm/utils/buildPath.js.map +1 -1
  291. package/lib/esm/utils/concatParameters.js.map +1 -1
  292. package/lib/esm/utils/concatPath.js.map +1 -1
  293. package/lib/esm/utils/defineStatusModel.js.map +1 -1
  294. package/lib/esm/utils/from.js.map +1 -1
  295. package/lib/esm/utils/generateSpec.js.map +1 -1
  296. package/lib/esm/utils/generics.js.map +1 -1
  297. package/lib/esm/utils/getComputedType.js +1 -1
  298. package/lib/esm/utils/getComputedType.js.map +1 -1
  299. package/lib/esm/utils/getInheritedStores.js.map +1 -1
  300. package/lib/esm/utils/getJsonEntityStore.js.map +1 -1
  301. package/lib/esm/utils/getJsonPathParameters.js.map +1 -1
  302. package/lib/esm/utils/getJsonSchema.js.map +1 -1
  303. package/lib/esm/utils/getJsonType.js.map +1 -1
  304. package/lib/esm/utils/getOperationsRoutes.js.map +1 -1
  305. package/lib/esm/utils/getOperationsStores.js.map +1 -1
  306. package/lib/esm/utils/getPropertiesStores.js.map +1 -1
  307. package/lib/esm/utils/getRequiredProperties.js.map +1 -1
  308. package/lib/esm/utils/getSpec.js.map +1 -1
  309. package/lib/esm/utils/getSpecType.js.map +1 -1
  310. package/lib/esm/utils/inlineEnums.js +7 -0
  311. package/lib/esm/utils/inlineEnums.js.map +1 -0
  312. package/lib/esm/utils/isSuccessStatus.js.map +1 -1
  313. package/lib/esm/utils/mapHeaders.js.map +1 -1
  314. package/lib/esm/utils/mapNullableType.js.map +1 -1
  315. package/lib/esm/utils/mapOpenSpec.js.map +1 -1
  316. package/lib/esm/utils/mapOpenSpec2.js.map +1 -1
  317. package/lib/esm/utils/mapOpenSpec3.js.map +1 -1
  318. package/lib/esm/utils/mapOpenSpecInfo.js.map +1 -1
  319. package/lib/esm/utils/mapRouteOptions.js.map +1 -1
  320. package/lib/esm/utils/matchGroups.js.map +1 -1
  321. package/lib/esm/utils/mergeOperation.js.map +1 -1
  322. package/lib/esm/utils/mergeSpec.js.map +1 -1
  323. package/lib/esm/utils/operationIdFormatter.js.map +1 -1
  324. package/lib/esm/utils/ref.js.map +1 -1
  325. package/lib/esm/utils/serializeEnumValues.js.map +1 -1
  326. package/lib/esm/utils/toJsonMapCollection.js.map +1 -1
  327. package/lib/esm/utils/toJsonRegex.js.map +1 -1
  328. package/lib/esm/utils/transformToOS2.js.map +1 -1
  329. package/lib/esm/utils/withErrorMsg.js.map +1 -1
  330. package/lib/tsconfig.esm.tsbuildinfo +1 -0
  331. package/lib/tsconfig.tsbuildinfo +1 -0
  332. package/lib/types/domain/JsonAliasMap.d.ts +2 -2
  333. package/lib/types/domain/JsonMethodStore.d.ts +1 -1
  334. package/lib/types/domain/JsonParameterStore.d.ts +1 -1
  335. package/lib/types/domain/JsonPropertyStore.d.ts +1 -1
  336. package/lib/types/domain/JsonRequestBody.d.ts +1 -1
  337. package/lib/types/domain/JsonResponse.d.ts +1 -1
  338. package/lib/types/domain/JsonSchema.d.ts +1 -1
  339. package/lib/types/index.d.ts +1 -0
  340. package/lib/types/interfaces/JsonSchemaOptions.d.ts +1 -0
  341. package/lib/types/utils/generics.d.ts +2 -2
  342. package/lib/types/utils/getSpec.d.ts +1 -1
  343. package/lib/types/utils/inlineEnums.d.ts +3 -0
  344. package/lib/types/utils/withErrorMsg.d.ts +1 -1
  345. package/package.json +16 -15
  346. package/{tsconfig.compile.esm.json → tsconfig.esm.json} +15 -5
  347. package/coverage.json +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"exclusiveMinimum.js","sourceRoot":"","sources":["../../../../src/decorators/common/exclusiveMinimum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC,kBAAkB,EAAE,CAAC,OAAe,EAAE,mBAA4B,IAAI,EAAE,EAAE;IACrH,OAAO,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {Minimum} from \"./minimum\";\n\n/**\n * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * @CollectionOf(Number)\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 * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param minimum\n * @param {boolean} exclusiveMinimum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMinimum = withErrorMsg(\"exclusiveMinimum\", (minimum: number, exclusiveMinimum: boolean = true) => {\n return Minimum(minimum, exclusiveMinimum);\n});\n"]}
1
+ {"version":3,"file":"exclusiveMinimum.js","sourceRoot":"","sources":["../../../../src/decorators/common/exclusiveMinimum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC,kBAAkB,EAAE,CAAC,OAAe,EAAE,mBAA4B,IAAI,EAAE,E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GA8DG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE;IACpD,OAAO,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE;IACpD,OAAO,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC","sourcesContent":["import {ValueOf} from \"@tsed/core\";\nimport {JsonFormatTypes} from \"../../domain/JsonFormatTypes\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * The following formats are supported for string validation with `format` keyword:\n *\n * - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).\n * - **time**: time with optional time-zone.\n * - **date-time**: date-time from the same source (time-zone is mandatory).\n * - **uri**: full uri with optional protocol.\n * - **email**: email address.\n * - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).\n * - **ipv4**: IP address v4.\n * - **ipv6**: IP address v6.\n * - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n *\n * ::: warning\n * For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * @CollectionOf(String)\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 * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} format\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Format = withErrorMsg(\"format\", (format: JsonFormatTypes | ValueOf<JsonFormatTypes>) => {\n return JsonEntityFn((store) => {\n store.itemSchema.format(format);\n });\n});\n\n/**\n * Apply an email validation on property.\n *\n * ::: warning\n * For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Email()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Email()\n * @CollectionOf(String)\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 * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @schema\n * @swagger\n * @input\n * @ajv-errors\n */\nexport const Email = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.EMAIL);\n});\n\n/**\n * Apply a date-time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * @CollectionOf(String)\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 * \"format\": \"date-time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).\n * @ajv-errors\n */\nexport const DateTime = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE_TIME);\n});\n\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Time()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Time()\n * @CollectionOf(String)\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 * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const DateFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE);\n});\n\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * @CollectionOf(String)\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 * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const TimeFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.TIME);\n});\n\n/**\n * Apply a uri validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * @CollectionOf(String)\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 * \"format\": \"uri\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Uri = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URI);\n});\n\n/**\n * Apply a url validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Url()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Url()\n * @CollectionOf(String)\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 * \"format\": \"url\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Url = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URL);\n});\n"]}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../../src/decorators/common/format.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAkD,E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M,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"forwardGroups.js","sourceRoot":"","sources":["../../../../src/decorators/common/forwardGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,IAAI,GAAG,IAAI;IACvC,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Allow to forward group on specific property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ForwardGroups(bool = true): PropertyDecorator {\n return JsonEntityFn((entity) => {\n entity.schema.$forwardGroups = bool;\n });\n}\n"]}
1
+ {"version":3,"file":"forwardGroups.js","sourceRoot":"","sources":["../../../../src/decorators/common/forwardGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,IAAI,GAAG,IAAI;IACvC,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC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a,EAAE,WAAqB,EAAE,EAAE;oBACzE,IAAI,CAAC,IAAI,EAAE;wBACT,IAAI,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE;4BACpC,OAAO,IAAI,CAAC;yBACb;qBACF;oBAED,OAAO,IAAI,CAAC;gBACd,CAAC,CAAC,CAAC;gBACH,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,IAAI,UAAU,GAAG,EAAE,CAAC;gBAEpB,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;oBAC5C,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;oBACvB,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;iBACpB;gBAEA,MAA6B,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;gBACxD,MAA6B,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC;gBACjE,MAAM;SACT;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, isArray} from \"@tsed/core\";\nimport type {JsonClassStore} from \"../../domain/JsonClassStore\";\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore\";\nimport {matchGroups} from \"../../utils/matchGroups\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * @ignore\n */\nfunction groupsClass(groups: any, entity: JsonClassStore) {\n const entries: [string, string[]][] = Object.entries(groups[0]);\n\n entity.children.forEach((propEntity) => {\n const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);\n const decorator: any = Groups(...groups);\n\n decorator(propEntity.target, propEntity.propertyKey);\n });\n}\n\n/**\n * Apply groups validation strategy\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Groups<T>(groupsDefinition: Record<string, (keyof T)[]>): ClassDecorator;\nexport function Groups<T>(groupName: string, groups: string[]): ParameterDecorator;\nexport function Groups(...groups: string[]): Function;\nexport function Groups(...groups: any): any {\n return JsonEntityFn((entity) => {\n switch (entity.decoratorType) {\n case DecoratorTypes.CLASS:\n groupsClass(groups, entity as JsonClassStore);\n break;\n case DecoratorTypes.PROP:\n entity.schema.$hooks.on(\"groups\", (prev: boolean, givenGroups: string[]) => {\n if (!prev) {\n if (matchGroups(groups, givenGroups)) {\n return true;\n }\n }\n\n return prev;\n });\n break;\n case DecoratorTypes.PARAM:\n let groupsName = \"\";\n\n if (groups.length == 2 && isArray(groups[1])) {\n groupsName = groups[0];\n groups = groups[1];\n }\n\n (entity as JsonParameterStore).parameter.groups = groups;\n (entity as JsonParameterStore).parameter.groupsName = groupsName;\n break;\n }\n });\n}\n"]}
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/decorators/common/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AAGnD,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,SAAS,WAAW,CAAC,MAAW,EAAE,MAAsB;IACtD,MAAM,OAAO,GAAyB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;QAC1G,MAAM,SAAS,GAAQ,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;QAEzC,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,W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,UAAU,MAAM;IACpB,OAAO,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC","sourcesContent":["import {StoreSet} from \"@tsed/core\";\n\n/**\n * Disable documentation for the class and his endpoint.\n *\n * ````typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Get('/')\n * @Hidden()\n * hiddenRoute(){\n *\n * }\n * }\n *\n * @Controller('/')\n * @Hidden()\n * export class Ctrl {\n * @Get('/')\n * hiddenRoute() {\n *\n * }\n * @Get('/2')\n * hiddenRoute2() {\n *\n * }\n * }\n * ```\n *\n * @decorator\n * @ignore\n */\nexport function Hidden() {\n return StoreSet(\"hidden\", true);\n}\n"]}
1
+ {"version":3,"file":"hidden.js","sourceRoot":"","sources":["../../../../src/decorators/common/hidden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,MAAM;IACpB,OAAO,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../../src/decorators/common/ignore.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,UAAU,MAAM,CAAC,KAA+B,SAAS;IAC7D,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {IgnoreCallback} from \"../../interfaces/IgnoreCallback\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * @ignore\n */\nconst defaultCB = (value: any, ctx: any) => ctx.mongoose !== true;\n\n/**\n * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.\n *\n * ::: warning\n * Swagger will not generate documentation for the ignored property.\n * :::\n *\n * ```typescript\n * class User {\n * @Ignore()\n * _id: string;\n *\n * @Property()\n * firstName: string;\n *\n * @Property()\n * lastName: string;\n *\n * @Ignore((value, ctx) => !ctx.mongoose) // don't ignore prop only if mongoose\n * password: string;\n * }\n * ```\n *\n * The controller:\n * ```typescript\n * import {Post, Controller, BodyParams} from \"@tsed/common\";\n * import {Person} from \"../models/Person\";\n *\n * @Controller(\"/\")\n * export class UsersCtrl {\n * @Get(\"/\")\n * get(): User {\n * const user = new User();\n * user._id = \"12345\";\n * user.firstName = \"John\";\n * user.lastName = \"Doe\";\n * user.password = \"secretpassword\";\n * return\n * }\n * }\n * ```\n *\n * The expected json object:\n *\n * ```json\n * {\n * \"firstName\": \"John\",\n * \"lastName\": \"Doe\"\n * }\n * ```\n * @param cb Callback to know if the property must be ignored\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Ignore(cb: boolean | IgnoreCallback = defaultCB) {\n return JsonEntityFn((store) => {\n store.schema.ignore(cb);\n });\n}\n"]}
1
+ {"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../../src/decorators/common/ignore.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,UAAU,MAAM,CAAC,KAA+B,SAAS;IAC7D,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../../src/decorators/common/integer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Set integer type.\n *\n * ::: warning\n * For v6 user, use @@Integer@@ from @tsed/schema instead of @@Integer@@ from @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * ```\n *\n * ### With array of multiple types\n *\n * ```typescript\n * class Model {\n * @Integer()\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\": \"integer\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Integer() {\n return JsonEntityFn((store) => {\n store.itemSchema.type(\"integer\");\n });\n}\n"]}
1
+ {"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../../src/decorators/common/integer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"jsonEntityFn.js","sourceRoot":"","sources":["../../../../src/decorators/common/jsonEntityFn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAC1B,EAAuD;IAEvD,OAAO,CAAC,GAAG,UAA+B,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAQ,EAAE,CAAC,kBAAkB,CAAI,GAAG,UAAU,CAAM,EAAE,UAAU,CAAC,CAAC;QAC9E,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YAChC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC;SACvB;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {DecoratorParameters} from \"@tsed/core\";\nimport type {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {getJsonEntityStore} from \"../../utils/getJsonEntityStore\";\n\n/**\n * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details.\n *\n * ## Usage\n *\n * ```typescript\n * export function Description(description: any) {\n * return JsonEntityFn((entity: JsonEntityStore, args: DecoratorParameters) => {\n * entity.itemSchema.description(description)\n * });\n * }\n * ```\n *\n * @param fn\n * @decorator\n * @utils\n * @model\n */\nexport function JsonEntityFn<T extends JsonEntityStore = JsonEntityStore>(\n fn: (entity: T, parameters: DecoratorParameters) => any\n): (...args: any[]) => any {\n return (...parameters: DecoratorParameters) => {\n const result: any = fn(getJsonEntityStore<T>(...parameters) as T, parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n };\n}\n"]}
1
+ {"version":3,"file":"jsonEntityFn.js","sourceRoot":"","sources":["../../../../src/decorators/common/jsonEntityFn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAC1B,EAAuD;IAEvD,OAAO,CAAC,GAAG,UAA+B,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAQ,EAAE,CAAC,kBAAkB,CAAI,GAAG,UAAU,CAAM,EAAE,UAAU,CAAC,CAAC;QAC9E,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YAChC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC;SACvB;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"maxLength.js","sourceRoot":"","sources":["../../../../src/decorators/common/maxLength.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,SAAiB,EAAE,EAAE;IACvE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of maxLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MaxLength@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * @CollectionOf(String)\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 * \"maxLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxLength The maximum length allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MaxLength = withErrorMsg(\"maxLength\", (maxLength: number) => {\n if (maxLength < 0) {\n throw new Error(\"The value of maxLength MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.itemSchema.maxLength(maxLength);\n });\n});\n"]}
1
+ {"version":3,"file":"maxLength.js","sourceRoot":"","sources":["../../../../src/decorators/common/maxLength.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,SAAiB,EAAE,EAAE;IACvE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"maximum.js","sourceRoot":"","sources":["../../../../src/decorators/common/maximum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,OAAe,EAAE,YAAqB,KAAK,EAAE,EAAE;IAC7F,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * @CollectionOf(Number)\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 * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Maximum = withErrorMsg(\"maximum\", (maximum: number, exclusive: boolean = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMaximum(maximum) : store.itemSchema.maximum(maximum);\n });\n});\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * @CollectionOf(Number)\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 * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Max = Maximum;\n"]}
1
+ {"version":3,"file":"maximum.js","sourceRoot":"","sources":["../../../../src/decorators/common/maximum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,OAAe,EAAE,YAAqB,KAAK,EAAE,EAAE;IAC7F,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"minLength.js","sourceRoot":"","sources":["../../../../src/decorators/common/minLength.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,SAAiB,EAAE,EAAE;IACvE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n *\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of minLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinLength@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * @CollectionOf(String)\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 * \"minLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minLength\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MinLength = withErrorMsg(\"minLength\", (minLength: number) => {\n if (minLength < 0) {\n throw new Error(\"The value of minLength MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.itemSchema.minLength(minLength);\n });\n});\n"]}
1
+ {"version":3,"file":"minLength.js","sourceRoot":"","sources":["../../../../src/decorators/common/minLength.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,SAAiB,EAAE,EAAE;IACvE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"minimum.js","sourceRoot":"","sources":["../../../../src/decorators/common/minimum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,OAAe,EAAE,YAAqB,KAAK,EAAE,EAAE;IAC7F,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@Minimum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * @CollectionOf(Number)\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 * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minimum The minimum value allowed\n * @param {boolean} exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Minimum = withErrorMsg(\"minimum\", (minimum: number, exclusive: boolean = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMinimum(minimum) : store.itemSchema.minimum(minimum);\n });\n});\n\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * @CollectionOf(Number)\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 * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @alias Minimum\n * @param minimum The minimum value allowed\n * @param exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Min = Minimum;\n"]}
1
+ {"version":3,"file":"minimum.js","sourceRoot":"","sources":["../../../../src/decorators/common/minimum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,OAAe,EAAE,YAAqB,KAAK,EAAE,EAAE;IAC7F,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"multipleOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/multipleOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC,UAAkB,EAAE,EAAE;IAC1E,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,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {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 * @ajv-errors\n */\nexport const MultipleOf = withErrorMsg(\"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"]}
1
+ {"version":3,"file":"multipleOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/multipleOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC,UAAkB,EAAE,EAAE;IAC1E,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,CAAC,CAAC"}
@@ -1 +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"]}
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"}
@@ -1 +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"]}
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"}
@@ -1 +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"]}
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"}
@@ -1 +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"]}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../../../src/decorators/common/pattern.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,OAAwB,EAAE,EAAE;IAC1E,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg\";\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 * @ajv-errors\n */\nexport const Pattern = withErrorMsg(\"pattern\", (pattern: string | RegExp) => {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.pattern(pattern);\n });\n});\n"]}
1
+ {"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../../../src/decorators/common/pattern.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,OAAwB,EAAE,EAAE;IAC1E,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +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"]}
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"}
@@ -1 +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"]}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"recordOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/recordOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAU,EAAE,GAAG,IAAc;IACpD,OAAO,MAAM,CAAC;QACZ,UAAU,EAAE;YACV,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;gBAC9B,OAAO;oBACL,GAAG,OAAO;oBACV,CAAC,GAAG,CAAC,EAAE,KAAK;iBACb,CAAC;YACJ,CAAC,EAAE,EAAE,CAAC;SACP;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Schema} from \"./schema\";\n\n/**\n * Constructs a json schema object type whose property keys are keys and whose property values are type.\n *\n * ## Example\n *\n * ```typescript\n * type keys = 'one' | 'two';\n *\n * class Part {\n * prop: string;\n * }\n *\n * type Parts = Record<keys, Part>;\n *\n * class Test {\n * @RecordOf(Part, 'one', 'two')\n * parts: Parts;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"one\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * \"two\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * },\n * }\n * ```\n *\n * @param model\n * @param keys\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function RecordOf(model: any, ...keys: string[]) {\n return Schema({\n properties: {\n ...keys.reduce((initial, key) => {\n return {\n ...initial,\n [key]: model\n };\n }, {})\n }\n });\n}\n"]}
1
+ {"version":3,"file":"recordOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/recordOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAU,EAAE,GAAG,IAAc;IACpD,OAAO,MAAM,CAAC;QACZ,UAAU,EAAE;YACV,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;gBAC9B,OAAO;oBACL,GAAG,OAAO;oBACV,CAAC,GAAG,CAAC,EAAE,KAAK;iBACb,CAAC;YACJ,CAAC,EAAE,EAAE,CAAC;SACP;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"required.js","sourceRoot":"","sources":["../../../../src/decorators/common/required.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC,WAAoB,IAAI,EAAE,GAAG,qBAA4B,EAAE,EAAE;IAC7G,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AACjE,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {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 const Required = withErrorMsg(\"required\", (required: boolean = true, ...allowedRequiredValues: any[]) => {\n return required ? Allow(...allowedRequiredValues) : Optional();\n});\n"]}
1
+ {"version":3,"file":"required.js","sourceRoot":"","sources":["../../../../src/decorators/common/required.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC,WAAoB,IAAI,EAAE,GAAG,qBAA4B,EAAE,EAAE;IAC7G,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AACjE,CAAC,CAAC,CAAC"}
@@ -1 +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"]}
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,gB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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"]}
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"}
@@ -1 +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"]}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"typeError.js","sourceRoot":"","sources":["../../../../src/decorators/common/typeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import {useDecorators} from \"@tsed/core\";\nimport {ErrorMsg} from \"./errorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Create a new custom formats validator\n * @param name\n * @param options\n * @decorator\n * @ajv\n */\nexport function TypeError(msg: string): ClassDecorator {\n return JsonEntityFn(() => useDecorators(ErrorMsg({type: msg})));\n}\n"]}
1
+ {"version":3,"file":"typeError.js","sourceRoot":"","sources":["../../../../src/decorators/common/typeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
@@ -1 +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"]}
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"}
@@ -1 +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"]}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"genericOf.js","sourceRoot":"","sources":["../../../../src/decorators/generics/genericOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAO,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAGxC;;GAEG;AACH,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;AAC/C,CAAC;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,MAAM,UAAU,SAAS,CAAC,GAAG,QAAwB;IACnD,MAAM,cAAc,GAAqB;QACvC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACpB,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE;gBAChB,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;aAC3C;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;KACH,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,GAAG,IAAS,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAC5C,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;IACxC,CAAC,CAAC;IAEF,SAAS,CAAC,MAAM,GAAG,CAAC,GAAG,QAAa,EAAE,EAAE;QACtC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE9B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {isObject, Type} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {string} from \"../../utils/from\";\nimport {GenericValue} from \"../../utils/generics\";\n\n/**\n * @ignore\n */\nfunction isEnum(type: any) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n\nexport interface GenericOfChainedDecorators {\n (...args: any): any;\n\n /**\n * Declare a nested generic models\n * @param generics\n */\n Nested(...generics: GenericValue[]): this;\n}\n\n/**\n * Set the types of a Generic class.\n *\n * ## Example\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * class Payload {\n * @GenericOf(Product)\n * products: Paginated<Product>;\n * }\n * ```\n *\n * ## Example with nested generics\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * @Generics(\"D\")\n * class Submission<D> {\n * @Property()\n * _id: string;\n *\n * @Property(\"D\")\n * data: D;\n * }\n *\n * class Payload {\n * @GenericOf(Submissions).Nested(Product)\n * submissions: Paginated<Submission<Product>>;\n * }\n * ```\n *\n * @param {Type<any>[]} generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function GenericOf(...generics: GenericValue[]): GenericOfChainedDecorators {\n const nestedGenerics: GenericValue[][] = [\n generics.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n })\n ];\n\n const decorator = (...args: any) => {\n const store = JsonEntityStore.from(...args);\n store.nestedGenerics = nestedGenerics;\n };\n\n decorator.Nested = (...generics: any) => {\n nestedGenerics.push(generics);\n\n return decorator;\n };\n\n return decorator;\n}\n"]}
1
+ {"version":3,"file":"genericOf.js","sourceRoot":"","sources":["../../../../src/decorators/generics/genericOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAO,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAGxC;;GAEG;AACH,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;AAC/C,CAAC;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,MAAM,UAAU,SAAS,CAAC,GAAG,QAAwB;IACnD,MAAM,cAAc,GAAqB;QACvC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACpB,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE;gBAChB,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;aAC3C;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;KACH,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,GAAG,IAAS,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAC5C,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;IACxC,CAAC,CAAC;IAEF,SAAS,CAAC,MAAM,GAAG,CAAC,GAAG,QAAa,EAAE,EAAE;QACtC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE9B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generics.js","sourceRoot":"","sources":["../../../../src/decorators/generics/generics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAElD,YAAY,CAAC,MAAM,CAAC,aAAa,GAAG,QAAQ,CAAC;IAC/C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\n\n/**\n * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.\n *\n * See @@GenericOf@@ decorator for more details.\n *\n * @param generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function Generics(...generics: string[]) {\n return (target: any) => {\n const storedSchema = JsonEntityStore.from(target);\n\n storedSchema.schema.genericLabels = generics;\n };\n}\n"]}
1
+ {"version":3,"file":"generics.js","sourceRoot":"","sources":["../../../../src/decorators/generics/generics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAElD,YAAY,CAAC,MAAM,CAAC,aAAa,GAAG,QAAQ,CAAC;IAC/C,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"acceptMime.js","sourceRoot":"","sources":["../../../../src/decorators/operations/acceptMime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,UAAU,CAAC,GAAG,KAAe;IAC3C,OAAO,aAAa,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["import {StoreSet, useDecorators} from \"@tsed/core\";\nimport {Produces} from \"./produces\";\n\n/**\n * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.\n *\n * ```typescript\n * @Controller('/mypath')\n * export class MyCtrl {\n *\n * @Get('/')\n * @AcceptMime('application/json')\n * public getResource(){}\n * }\n * ```\n *\n * @param mimes\n * @decorator\n * @operation\n * @response\n */\nexport function AcceptMime(...mimes: string[]): Function {\n return useDecorators(Produces(...mimes), StoreSet(\"acceptMimes\", mimes));\n}\n"]}
1
+ {"version":3,"file":"acceptMime.js","sourceRoot":"","sources":["../../../../src/decorators/operations/acceptMime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,UAAU,CAAC,GAAG,KAAe;IAC3C,OAAO,aAAa,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"consumes.js","sourceRoot":"","sources":["../../../../src/decorators/operations/consumes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACvF,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAClD,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add consumes metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n * class Model {\n * @Consumes(\"application/x-www-form-urlencoded\")\n * id: string;\n * }\n * ```\n *\n * @param consumes\n * @decorator\n * @swagger\n * @classDecorator\n * @operation\n */\nexport function Consumes(...consumes: string[]) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.consumes(consumes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Consumes(...consumes));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Consumes, args);\n }\n });\n}\n"]}
1
+ {"version":3,"file":"consumes.js","sourceRoot":"","sources":["../../../../src/decorators/operations/consumes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACvF,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAClD,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"contentType.js","sourceRoot":"","sources":["../../../../src/decorators/operations/contentType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import {Returns} from \"./returns\";\n\n/**\n * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.\n * If type contains the “/” character, then it sets the `Content-Type` to type.\n *\n * ```typescript\n * @ContentType('.html'); // => 'text/html'\n * @ContentType('html'); // => 'text/html'\n * @ContentType('json'); // => 'application/json'\n * @ContentType('application/json'); // => 'application/json'\n * @ContentType('png'); // => image/png\n * private myMethod() {}\n * ```\n *\n * @param type\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function ContentType(type: string) {\n return Returns().ContentType(type);\n}\n"]}
1
+ {"version":3,"file":"contentType.js","sourceRoot":"","sources":["../../../../src/decorators/operations/contentType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../../src/decorators/operations/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACxG,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,UAAU,CAAC,aAAsB,IAAI;IACnD,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,eAAe,CAAC,IAAI,CAAC,EAAE;YAC7B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;gBACxC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;gBACnD,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACtB,KAA4B,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;gBACtE,MAAM;YACR,KAAK,cAAc,CAAC,IAAI;gBACrB,KAA2B,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;gBAClE,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SACxD;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {decorateMethodsOf, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\nimport {JsonPropertyStore} from \"../../domain/JsonPropertyStore\";\nimport {JsonParameterStore} from \"../../domain/JsonParameterStore\";\n\n/**\n * Add deprecated metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n *\n * @Deprecated()\n * class MyCtrl {\n * @Deprecated()\n * @Get(\"/\")\n * method(){\n * }\n * }\n * ```\n *\n * @param deprecated\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Deprecated(deprecated: boolean = true) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.METHOD:\n store.operation!.deprecated(deprecated);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Deprecated(deprecated));\n break;\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).parameter.set(\"deprecated\", deprecated);\n break;\n case DecoratorTypes.PROP:\n (store as JsonPropertyStore).schema.set(\"deprecated\", deprecated);\n break;\n\n default:\n throw new UnsupportedDecoratorType(Deprecated, args);\n }\n });\n}\n"]}
1
+ {"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../../src/decorators/operations/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACxG,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,UAAU,CAAC,aAAsB,IAAI;IACnD,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,eAAe,CAAC,IAAI,CAAC,EAAE;YAC7B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;gBACxC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;gBACnD,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACtB,KAA4B,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;gBACtE,MAAM;YACR,KAAK,cAAc,CAAC,IAAI;gBACrB,KAA2B,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;gBAClE,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SACxD;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,UAAU,MAAM,CAAC,OAAsC,EAAE,KAAoC;IACjG,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,KAAK,EAAC,CAAC;KACxC;IAED,OAAO,OAAO,EAAE,CAAC,OAAO,CAAC,OAAsB,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import {JsonHeader, JsonHeaders} from \"../../interfaces/JsonOpenSpec\";\nimport {Returns} from \"./returns\";\n\n/**\n * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.\n *\n * ```typescript\n * @Header('Content-Type', 'text/plain');\n * private myMethod() {}\n *\n * @Status(204)\n * @Header({\n * \"Content-Type\": \"text/plain\",\n * \"Content-Length\": 123,\n * \"ETag\": {\n * \"value\": \"12345\",\n * \"description\": \"header description\"\n * }\n * })\n * private myMethod() {}\n * ```\n *\n * This example will produce the swagger responses object:\n *\n * ```json\n * {\n * \"responses\": {\n * \"204\": {\n * \"description\": \"Description\",\n * \"headers\": {\n * \"Content-Type\": {\n * \"type\": \"string\"\n * },\n * \"Content-Length\": {\n * \"type\": \"number\"\n * },\n * \"ETag\": {\n * \"type\": \"string\",\n * \"description\": \"header description\"\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @response\n */\nexport function Header(headers: string | number | JsonHeaders, value?: string | number | JsonHeader): Function {\n if (value !== undefined) {\n headers = {[headers as string]: value};\n }\n\n return Returns().Headers(headers as JsonHeaders);\n}\n"]}
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,UAAU,MAAM,CAAC,OAAsC,EAAE,KAAoC;IACjG,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,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sonEntityStore\";\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore\";\nimport {JsonParameter} from \"../../domain/JsonParameter\";\nimport {JsonParameterStore} from \"../../domain/JsonParameterStore\";\nimport {JsonParameterTypes} from \"../../domain/JsonParameterTypes\";\nimport {JsonSchema, JsonSchemaObject} from \"../../domain/JsonSchema\";\n\nexport interface InChainedDecorators {\n <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;\n\n (target: Object, propertyKey: string | symbol, parameterIndex: number): void;\n\n (target: Function): void;\n\n /**\n * Type of this in parameter\n * @param type\n */\n Type(type: Type<any>): this;\n\n /**\n *\n * @param name\n */\n Name(name: string): this;\n\n /**\n *\n * @param description\n */\n Description(description: string): this;\n\n /**\n *\n * @param required\n */\n Required(required?: boolean): this;\n\n /**\n * Add pattern constraint. Only available for OPENAPI.\n * @param pattern\n */\n Pattern(pattern: string | RegExp): this;\n\n /**\n * Add custom schema.\n * @param schema\n */\n Schema(schema: Partial<JsonSchemaObject>): this;\n}\n\n/**\n * Add a input parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Get(\"/\")\n * @In(\"header\").Type(String).Name(\"Authorization\").Required()\n * method() {\n * }\n * }\n * ```\n * :::\n *\n * @param inType\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n */\nexport function In(inType: JsonParameterTypes | string): InChainedDecorators {\n const jsonParameter = new JsonParameter();\n const schema: any = {};\n\n const decorator = (target: any, propertyKey?: string | symbol, index?: PropertyDescriptor | number) => {\n const store = JsonEntityStore.from(target, propertyKey, index);\n\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).parameter.in(inType);\n break;\n case DecoratorTypes.METHOD:\n jsonParameter.in(inType);\n (store as JsonMethodStore).operation.addParameter(-1, jsonParameter);\n\n jsonParameter.schema(JsonSchema.from(schema));\n break;\n\n case DecoratorTypes.CLASS:\n decorateMethodsOf(target, decorator);\n break;\n\n default:\n throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);\n }\n };\n\n decorator.Type = (type: Type<any>) => {\n schema.type = type;\n\n return decorator;\n };\n\n decorator.Name = (name: string) => {\n jsonParameter.name(name);\n\n return decorator;\n };\n\n decorator.Description = (description: string) => {\n jsonParameter.description(description);\n\n return decorator;\n };\n\n decorator.Required = (required: boolean = true) => {\n jsonParameter.required(required);\n\n return decorator;\n };\n\n decorator.Pattern = (pattern: string | RegExp) => {\n return decorator.Schema({pattern: pattern.toString()});\n };\n\n decorator.Schema = (_schema: any) => {\n Object.assign(schema, _schema);\n\n return decorator;\n };\n\n return decorator;\n}\n"]}
1
+ {"version":3,"file":"in.js","sourceRoot":"","sources":["../../../../src/decorators/operations/in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAQ,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAC7F,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAGzD,OAAO,EAAC,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AA8CrE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,EAAE,CAAC,MAAmC;IACpD,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,MAAM,SAAS,GAAG,CAAC,MAAW,EAAE,WAA6B,EAAE,KAAmC,EAAE,EAAE;QACpG,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAE/D,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,KAAK;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AAG,CAAC,CAAC;QAEtE,MAAM,UAAU,GAAG,aAAa,CAC9B,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAC5B,IAAI,CAAC,UAAU,CAAC,EAChB,mBAAmB,CACjB,OAAO,CAAC,GAAG,CAAC,CAAC,WAAW,CACtB,+KAA+K,CAChL,EACD,QAAQ,CAAC,qBAAqB,CAAC,CAChC,CACF,CAAC;QAEF,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {DecoratorParameters, Metadata, useDecorators, useMethodDecorators} from \"@tsed/core\";\nimport {In} from \"./in\";\nimport {JsonParameterTypes} from \"../../domain/JsonParameterTypes\";\nimport {Returns} from \"./returns\";\nimport {Name} from \"../common/name\";\nimport {Consumes} from \"./consumes\";\n\n/**\n * Add a input file parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Post(\"/\")\n * method(@InFile(\"file1\") file: any) {\n * }\n * }\n * ```\n * :::\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n * @param name\n */\nexport function InFile(name: string): ParameterDecorator {\n return (...args: DecoratorParameters): void => {\n const [target, propertyKey, index] = args;\n const multiple = Metadata.getParamTypes(target, propertyKey)[index as number] === Array;\n\n name = (typeof name === \"object\" ? undefined : name)!;\n\n const expression = [name, !multiple && \"0\"].filter(Boolean).join(\".\");\n\n const decorators = useDecorators(\n In(JsonParameterTypes.FILES),\n Name(expression),\n useMethodDecorators(\n Returns(400).Description(\n `<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1`\n ),\n Consumes(\"multipart/form-data\")\n )\n );\n\n decorators(...args);\n };\n}\n"]}
1
+ {"version":3,"file":"inFile.js","sourceRoot":"","sources":["../../../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1 +1 @@
1
- {"version":3,"file":"location.js","sourceRoot":"","sources":["../../../../src/decorators/operations/location.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB,EAAE,IAAiB;IAC1D,OAAO,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import {JsonHeader} from \"../../interfaces/JsonOpenSpec\";\nimport {Returns} from \"./returns\";\n\n/**\n * Sets the response Location HTTP header to the specified path parameter.\n *\n * ```typescript\n * @Location('/foo/bar', {description: 'Location to the next step'})\n * @Location('http://example.com')\n * @Location('back')\n * private myMethod() {\n *\n * }\n * ```\n *\n * A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.\n *\n * @param location\n * @param meta\n * @returns {Function}\n * @decorator\n * @operation\n */\nexport function Location(location: string, meta?: JsonHeader) {\n return Returns().Location(location, meta);\n}\n"]}
1
+ {"version":3,"file":"location.js","sourceRoot":"","sources":["../../../../src/decorators/operations/location.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB,EAAE,IAAiB;IAC1D,OAAO,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"operationId.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,wBAAwB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;SACvD;QAED,KAAK,CAAC,SAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Set a swagger operationId explicitly.\n *\n * @param operationId\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationId(operationId: string) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationId, args);\n }\n\n store.operation!.operationId(operationId);\n });\n}\n"]}
1
+ {"version":3,"file":"operationId.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,wBAAwB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;SACvD;QAED,KAAK,CAAC,SAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"operationPath.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAGpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAAC,MAAiC,EAAE,OAAwB,GAAG;IAC1F,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,wBAAwB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;SACzD;QAED,KAAK,CAAC,SAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\nimport {OperationMethods} from \"../../constants/httpMethods\";\n\n/**\n * Declare new Operation with his path and http method.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application.\n *\n * Use theses decorators instead:\n *\n * <ApiList query=\"status.includes('decorator') && status.includes('httpMethod')\" />\n *\n * :::\n *\n * @param method\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationPath(method: OperationMethods | string, path: string | RegExp = \"/\") {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationPath, args);\n }\n\n store.operation!.addOperationPath(method.toUpperCase(), path);\n });\n}\n"]}
1
+ {"version":3,"file":"operationPath.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAGpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAAC,MAAiC,EAAE,OAAwB,GAAG;IAC1F,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,wBAAwB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;SACzD;QAED,KAAK,CAAC,SAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"partial.js","sourceRoot":"","sources":["../../../../src/decorators/operations/partial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,MAAM,CAAC,SAAS,CAAQ,CAAC;AAClC,CAAC","sourcesContent":["import {Groups} from \"../common/groups\";\n\n/**\n * Apply Partial group strategy on the input model\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Partial(): ParameterDecorator {\n return Groups(\"partial\") as any;\n}\n"]}
1
+ {"version":3,"file":"partial.js","sourceRoot":"","sources":["../../../../src/decorators/operations/partial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,MAAM,CAAC,SAAS,CAAQ,CAAC;AAClC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../src/decorators/operations/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,KAAK,EAAE;YAChD,MAAM,IAAI,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAChD;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Set class path to expose all endpoints\n *\n * ::: warning\n * Don't use this decorator to change the path if you develop your application with Ts.ED.\n * :::\n *\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Path(path: string) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.CLASS) {\n throw new UnsupportedDecoratorType(Path, args);\n }\n\n store.path = path;\n });\n}\n"]}
1
+ {"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../src/decorators/operations/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,KAAK,EAAE;YAChD,MAAM,IAAI,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAChD;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"produces.js","sourceRoot":"","sources":["../../../../src/decorators/operations/produces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACvF,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAClD,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add produces metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Produces(\"text/html\")\n * id: string;\n * }\n * ```\n *\n * ::: warning\n * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).\n * :::\n *\n * @param produces\n * @decorator\n * @swagger\n * @methodDecorator\n * @classDecorator\n * @operation\n * @response\n */\nexport function Produces(...produces: string[]) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.produces(produces);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Produces(...produces));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Produces, args);\n }\n });\n}\n"]}
1
+ {"version":3,"file":"produces.js","sourceRoot":"","sources":["../../../../src/decorators/operations/produces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACvF,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAClD,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"redirect.js","sourceRoot":"","sources":["../../../../src/decorators/operations/redirect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAqDlC,MAAM,UAAU,QAAQ,CAAC,GAAG,IAAW;IACrC,MAAM,EAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,MAAM,CACrC,CAAC,OAAY,EAAE,KAAU,EAAE,EAAE;QAC3B,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;YACnB,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;YACvB,OAAO,OAAO,CAAC;SAChB;QAED,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;YACnB,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC;YACpB,OAAO,OAAO,CAAC;SAChB;QAED,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;QACrB,OAAO,OAAO,CAAC;IACjB,CAAC,EACD,EAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAC,CACjC,CAAC;IACF,OAAO,aAAa,CAClB,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,EACnC,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QACtB,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import {isNumber, isString, useDecorators} from \"@tsed/core\";\nimport {JsonHeader} from \"../../interfaces/JsonOpenSpec\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\nimport {Returns} from \"./returns\";\n\n/**\n * Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code . If not specified, status defaults to “302 “Found”.\n *\n * ```typescript\n * @Redirect('/foo/bar')\n * @Redirect(301, 'http://example.com').Type(Model)\n * private myMethod() {}\n * ```\n * Redirects can be a fully-qualified URL for redirecting to a different site:\n *\n * ```typescript\n * @Redirect('http://google.com');\n * private myMethod() {}\n * ```\n *\n * Redirects can be relative to the root of the host name. For example, if the application is on http://example.com/admin/post/new, the following would redirect to the URL http://example.com/admin:\n *\n * ```typescript\n * @Redirect('/admin');\n * ```\n * Redirects can be relative to the current URL. For example, from http://example.com/blog/admin/ (notice the trailing slash), the following would redirect to the URL http://example.com/blog/admin/post/new.\n *\n * ```typescript\n * @Redirect('post/new');\n * ```\n *\n * Redirecting to post/new from http://example.com/blog/admin (no trailing slash), will redirect to http://example.com/blog/post/new.\n *\n * If you found the above behavior confusing, think of path segments as directories (with trailing slashes) and files, it will start to make sense.\n *\n * Path-relative redirects are also possible. If you were on http://example.com/admin/post/new, the following would redirect to http//example.com/admin/post:\n *\n * ```typescript\n * @Redirect('..');\n * ``\n *\n * A back redirection redirects the request back to the referer, defaulting to / when the referer is missing.\n *\n * ```typescript\n * @Redirect('back');\n * ```\n *\n * @param url\n * @param meta\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function Redirect(url: string, meta?: JsonHeader): Function;\nexport function Redirect(status: number, url: string, meta?: JsonHeader): Function;\nexport function Redirect(...args: any[]): Function {\n const {status, url, meta} = args.reduce(\n (options: any, value: any) => {\n if (isNumber(value)) {\n options.status = value;\n return options;\n }\n\n if (isString(value)) {\n options.url = value;\n return options;\n }\n\n options.meta = value;\n return options;\n },\n {status: 302, url: \"\", meta: {}}\n );\n return useDecorators(\n Returns(status).Location(url, meta),\n JsonEntityFn((entity) => {\n entity.operation?.setRedirection(status);\n })\n );\n}\n"]}
1
+ {"version":3,"file":"redirect.js","sourceRoot":"","sources":["../../../../src/decorators/operations/redirect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAqDlC,MAAM,UAAU,QAAQ,CAAC,GAAG,IAAW;IACrC,MAAM,EAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,MAAM,CACrC,CAAC,OAAY,EAAE,KAAU,EAAE,EAAE;QAC3B,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;YACnB,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;YACvB,OAAO,OAAO,CAAC;SAChB;QAED,IAAI,QAAQ,CAAC,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AAC,CAAC;QAEtC,IAAI,QAAQ,EAAE;YACZ,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SAC1B;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,MAAM,CAAC,IAAY,EAAE,KAAY;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAEhC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE;YAClB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAe,CAAC;YAEhD,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;gBACvB,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC;gBAE7B,MAAM,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACtC;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACzB;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA+JD,MAAM,UAAU,OAAO,CAAC,MAAwB,EAAE,KAAqC;IACrF,MAAM,OAAO,GAAG,IAAI,sBAAsB,CAAC;QACzC,MAAM;QACN,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC;AACzB,CAAC","sourcesContent":["import {\n decorateMethodsOf,\n decoratorTypeOf,\n DecoratorTypes,\n isArray,\n isCollection,\n isObject,\n isPlainObject,\n isPrimitiveOrPrimitiveClass,\n isString,\n Type\n} from \"@tsed/core\";\nimport {OS3Example} from \"@tsed/openspec\";\nimport {getStatusMessage} from \"../../constants/httpStatusMessages\";\nimport {DecoratorContext} from \"../../domain/DecoratorContext\";\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonParameter} from \"../../domain/JsonParameter\";\nimport {JsonResponse} from \"../../domain/JsonResponse\";\nimport {JsonSchema, JsonSchemaObject} from \"../../domain/JsonSchema\";\nimport {JsonHeader, JsonHeaders} from \"../../interfaces/JsonOpenSpec\";\nimport {getStatusModel} from \"../../utils/defineStatusModel\";\nimport {string} from \"../../utils/from\";\nimport {GenericValue} from \"../../utils/generics\";\nimport {isSuccessStatus} from \"../../utils/isSuccessStatus\";\nimport {mapHeaders} from \"../../utils/mapHeaders\";\n\nexport interface ReturnsChainedDecorators {\n <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;\n\n (target: Function): void;\n\n /**\n * Set a Content-Type for the current response\n * @param value\n * @constructor\n */\n ContentType(value: string): this;\n\n /**\n * Add a description\n * @param description\n */\n Description(description: string): this;\n\n /**\n * Add examples\n * @param examples\n */\n Examples(examples: Record<string, OS3Example>): this;\n\n Examples(examples: Record<string, any>): this;\n\n Examples(examples: any): this;\n\n /**\n * Change the model type\n * @param type\n */\n Type(type: Type<any> | any): this;\n\n /**\n * Change the status\n * @param status\n * @constructor\n */\n Status(status: string | number): this;\n\n /**\n * Add the nested types\n * @param types\n */\n Of(...types: GenericValue[]): this;\n\n /**\n * For the integer type\n */\n OfInteger(): this;\n\n /**\n * Add the nested types\n * @param types\n */\n OneOf(...types: GenericValue[]): this;\n\n /**\n * Add the nested types\n * @param types\n */\n AllOf(...types: GenericValue[]): this;\n\n /**\n * Add the nested types\n * @param types\n */\n AnyOf(...types: GenericValue[]): this;\n\n /**\n * Declare a nested generic models\n * @param generics\n */\n Nested(...generics: GenericValue[]): this;\n\n /**\n * Add header.\n * @param key\n * @param value\n */\n Header(key: string, value: number | string | (JsonHeader & {value?: string | number | boolean})): this;\n\n /**\n * Add headers\n */\n Headers(headers: JsonHeaders): this;\n\n /**\n * Add location hea\n */\n Location(location: string, meta?: JsonHeader): this;\n\n /**\n * Assign partial schema\n * @param schema\n */\n Schema(schema: Partial<JsonSchemaObject> | JsonSchema): this;\n\n /**\n * Add an inline title for the return model.\n * @param title\n */\n Title(title: string): this;\n\n /**\n * Use group to filter model\n * @param groups\n */\n Groups(...groups: string[]): this;\n\n Groups(groupName: string, groups: string[]): this;\n\n /**\n * Add a list of allowed groups to filter dynamically fields. Listed groups can be used by the consumer to change\n * the mapped response.\n * @param allowedGroups\n */\n AllowedGroups(...allowedGroups: string[]): this;\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nfunction isEnum(type: any) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n\nfunction mapGenerics(types: GenericValue[]) {\n return types.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n });\n}\n\n/**\n * @ignore\n */\nclass ReturnDecoratorContext extends DecoratorContext<ReturnsChainedDecorators> {\n readonly methods: string[] = [\n \"contentType\",\n \"description\",\n \"examples\",\n \"type\",\n \"status\",\n \"of\",\n \"ofInteger\",\n \"oneOf\",\n \"allOf\",\n \"anyOf\",\n \"nested\",\n \"header\",\n \"headers\",\n \"schema\",\n \"title\",\n \"groups\",\n \"allowedGroups\",\n \"location\"\n ];\n\n constructor({status, model}: any) {\n super();\n\n this.model(model);\n this.status(status);\n }\n\n type(model: any) {\n return this.model(model);\n }\n\n model(model: any) {\n model && this.set(\"model\", model);\n return this;\n }\n\n status(status: number | string) {\n this.set(\"status\", status);\n\n if (status && getStatusMessage(status) && !this.get(\"description\")) {\n this.set(\"description\", getStatusMessage(status));\n\n if (!this.get(\"model\")) {\n this.model(getStatusModel(+status));\n }\n }\n\n return this;\n }\n\n headers(headers: JsonHeaders) {\n this.set(\"headers\", {\n ...(this.get(\"headers\") || {}),\n ...mapHeaders(headers)\n });\n\n return this;\n }\n\n header(key: string, value: string | JsonHeader) {\n return this.headers({[key]: value});\n }\n\n location(path: string, meta: JsonHeaders = {}) {\n this.headers({\n Location: {\n ...meta,\n value: path\n }\n });\n\n return this;\n }\n\n groups(groupName: string, groups: string[]): this;\n groups(...groups: string[]): this;\n groups(...groups: string[] | [string, string[]]) {\n if (groups.length === 2 && isArray(groups[1])) {\n this.set(\"groupsName\", groups[0]);\n this.set(\"groups\", groups[1]);\n } else {\n this.set(\"groups\", groups);\n }\n\n return this;\n }\n\n allowedGroups(...allowedGroups: string[]) {\n this.set(\"allowedGroups\", new Set(allowedGroups));\n return this;\n }\n\n nested(...generics: GenericValue[]) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.checkCollection(model);\n\n this.addAction((ctx) => {\n (this.get(\"schema\") as JsonSchema).nestedGenerics.push(mapGenerics(generics));\n });\n\n return this;\n }\n\n of(...types: (Type<any> | any)[]) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n\n this.addAction(() => {\n const schema = this.get(\"schema\") as JsonSchema;\n\n if (isCollection(model)) {\n schema?.itemSchema({type: types[0]});\n } else {\n schema?.nestedGenerics.push(mapGenerics(types));\n }\n });\n\n return this;\n }\n\n ofInteger() {\n return this.of(\"integer\");\n }\n\n oneOf(...types: (Type<any> | any)[]) {\n return this.manyOf(\"oneOf\", types);\n }\n\n allOf(...types: (Type<any> | any)[]) {\n return this.manyOf(\"allOf\", types);\n }\n\n anyOf(...types: (Type<any> | any)[]) {\n return this.manyOf(\"anyOf\", types);\n }\n\n schema(partial: Partial<JsonSchemaObject>) {\n this.addAction(() => {\n const schema = this.get(\"schema\") as JsonSchema;\n\n schema!.assign(partial);\n });\n\n return this;\n }\n\n examples(examples: any) {\n this.set(\"examples\", isString(examples) ? [examples] : examples);\n return this;\n }\n\n title(title: string) {\n return this.schema({title});\n }\n\n protected checkPrimitive(model: any) {\n if (isPrimitiveOrPrimitiveClass(model)) {\n throw new Error(\"Returns.Of cannot be used with the following primitive classes: String, Number, Boolean\");\n }\n }\n\n protected checkCollection(model: any) {\n if (isCollection(model)) {\n throw new Error(\"Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean\");\n }\n }\n\n protected getContentType() {\n const model = this.get(\"model\");\n let contentType = this.get(\"contentType\");\n\n if (model && !isPlainObject(model) && !isPrimitiveOrPrimitiveClass(model)) {\n contentType = contentType || \"application/json\";\n }\n\n return contentType;\n }\n\n protected getStatus() {\n return this.get(\"status\") || \"default\";\n }\n\n protected onInit(args: any[], decorator: any) {\n const type = decoratorTypeOf(args);\n switch (type) {\n case DecoratorTypes.METHOD:\n this.entity = JsonEntityStore.from(...args);\n if (this.entity.operation) {\n this.map();\n }\n break;\n case DecoratorTypes.CLASS:\n this.decoratorType = DecoratorTypes.CLASS;\n decorateMethodsOf(args[0], decorator);\n break;\n }\n }\n\n protected map() {\n const model = this.get(\"model\");\n const {entity, decoratorType} = this;\n const operation = this.entity.operation!;\n const currentStatus = this.getStatus();\n const response = operation.ensureResponseOf(currentStatus);\n const contentType = this.getContentType();\n\n let {description = response.get(\"description\")} = this.toObject();\n\n if (description) {\n description = decoratorType === DecoratorTypes.CLASS ? response.get(\"description\") || description : description;\n response.description(description);\n }\n\n const headers = this.getMergedKey(\"headers\", response.get(\"headers\"));\n\n if (headers) {\n response.headers(headers);\n }\n\n this.mapMedia(response);\n\n if (isSuccessStatus(this.get(\"status\")) || currentStatus === \"default\") {\n if (model) {\n entity.type = model;\n }\n }\n\n // additional info for OS2\n contentType && operation.addProduce(contentType);\n\n // run additional actions\n return this.runActions();\n }\n\n protected mapMedia(response: JsonResponse) {\n const contentType = this.getContentType();\n const model = this.get(\"model\");\n const media = response.getMedia(contentType || \"*/*\");\n const schema = media.get(\"schema\") || new JsonSchema({type: model});\n const groups = this.get(\"groups\");\n const groupsName = this.get(\"groupsName\");\n const allowedGroups = this.get(\"allowedGroups\");\n const operation = this.entity.operation!;\n\n if (model) {\n if (isArray(model)) {\n schema.oneOf(model.map((type) => ({type})));\n } else {\n schema.type(model);\n }\n }\n\n this.set(\"schema\", schema);\n\n media.schema(schema);\n\n media.groups = groups;\n media.groupsName = groupsName;\n\n if (allowedGroups) {\n media.allowedGroups = allowedGroups;\n\n const jsonParameter = new JsonParameter();\n jsonParameter.in(\"query\").name(\"includes\");\n jsonParameter.schema(\n JsonSchema.from({\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...allowedGroups]\n }\n })\n );\n\n operation.addParameter(-1, jsonParameter);\n }\n\n const examples = this.get(\"examples\");\n\n if (examples) {\n media.examples(examples);\n }\n\n return media;\n }\n\n private manyOf(kind: string, types: any[]) {\n const model = this.get(\"model\");\n\n this.addAction(() => {\n const schema = this.get(\"schema\") as JsonSchema;\n\n if (isCollection(model)) {\n schema.type(model || Object);\n\n schema.itemSchema().set(kind, types);\n } else {\n schema.set(kind, types);\n }\n });\n\n return this;\n }\n}\n\n/**\n * Add responses documentation for a specific status code.\n *\n * ## Usage\n *\n * Ts.ED v5/v6 API introducing the chaining decorator concept. Now a decorator like Returns can be used with another decorators like Description.\n *\n * ::: warning\n * v5 has a basic support of the chaining decorator to facilitate the migration to v6!\n * :::\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @Returns(404, String).Description(\"Not Found\")\n * @Returns(200, Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ::: tip\n * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know\n * what chained decorators are available under Returns decorator.\n * :::\n *\n * This example will produce this documentation in swagger:\n *\n * ```json\n * {\n * \"responses\": {\n * \"404\": {\n * \"description\": \"Description\",\n * \"schema\": {\"type\": \"string\"}\n * },\n * \"2OO\": {\n * \"description\": \"Description\",\n * \"schema\": {\"$ref\": \"...\"}\n * }\n * }\n * }\n * ```\n *\n * ## Declaring an Array\n *\n * Use chained decorators to declare an array with model as following:\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/models\")\n * class ModelCtrl {\n * @Get(\"/\")\n * @Returns(200, Array).Of(Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {\n * }\n * }\n * ```\n *\n * Deprecated version:\n *\n * ```typescript\n * import {ReturnsArray} from \"@tsed/common\";\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @ReturnsArray(200, Model) // deprecated\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ### Declaring a generic model <Badge text=\"6+\"/>\n *\n * Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to\n * declare explicitly the generic models with the decorators.\n *\n * One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.\n *\n * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:\n *\n * ```typescript\n * @Generics(\"T\")\n * class Pagination<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n * ```\n *\n * Now, we need a model to be used with the generic Pagination model:\n *\n * ```typescript\n * class Product {\n * @Property()\n * id: string;\n *\n * @Property()\n * title: string;\n * }\n * ```\n *\n * Finally, we can use our models on a method as following:\n *\n * ```typescript\n * class Controller {\n * @OperationPath(\"POST\", \"/\")\n * @Returns(200, Pagination).Of(Product).Description(\"description\")\n * async method(): Promise<Pagination<Product> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * ### Declaring a nested generics models <Badge text=\"6+\"/>\n *\n * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:\n *\n * ```typescript\n * import {Generics, Property, Returns} from \"@tsed/schema\";\n * import {Post} from \"@tsed/common\";\n *\n * class Controller {\n * @Post(\"/\")\n * @Returns(200, Pagination).Of(Submission).Nested(Product).Description(\"description\")\n * async method(): Promise<Pagination<Submission<Product>> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * And here is the Submission model:\n *\n * ```typescript\n * import {Generics, Property} from \"@tsed/schema\";\n *\n * @Generics(\"T\")\n * class Submission<T> {\n * @Property()\n * _id: string;\n * @Property(\"T\")\n * data: T;\n * }\n * ```\n *\n * @param status\n * @param model\n * @decorator\n * @swagger\n * @schema\n * @response\n * @operation\n */\nexport function Returns(status?: string | number, model?: Type<any> | Type<any>[]): ReturnsChainedDecorators;\nexport function Returns(status?: string | number, model?: Type<any> | Type<any>[] | any): ReturnsChainedDecorators {\n const context = new ReturnDecoratorContext({\n status,\n model\n });\n\n return context.build();\n}\n"]}
1
+ {"version":3,"file":"returns.js","sourceRoot":"","sources":["../../../../src/decorators/operations/returns.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,2BAA2B,EAC3B,QAAQ,EAET,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAC,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AA6HlD;;GAEG;AACH,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,WAAW,CAAC,KAAqB;IACxC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE;YAChB,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;SAC3C;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,M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