@tsed/schema 8.0.0-alpha.5 → 8.0.0-alpha.6

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 (547) hide show
  1. package/lib/browser/schema.umd.min.js.map +1 -1
  2. package/lib/esm/utils/getJsonSchema.js.map +1 -1
  3. package/lib/types/utils/getJsonSchema.d.ts +1 -1
  4. package/package.json +12 -12
  5. package/lib/cjs/components/async-api/channelsMapper.js +0 -62
  6. package/lib/cjs/components/async-api/channelsMapper.js.map +0 -1
  7. package/lib/cjs/components/async-api/generate.js +0 -20
  8. package/lib/cjs/components/async-api/generate.js.map +0 -1
  9. package/lib/cjs/components/async-api/messageMapper.js +0 -44
  10. package/lib/cjs/components/async-api/messageMapper.js.map +0 -1
  11. package/lib/cjs/components/async-api/payloadMapper.js +0 -52
  12. package/lib/cjs/components/async-api/payloadMapper.js.map +0 -1
  13. package/lib/cjs/components/async-api/responseMapper.js +0 -58
  14. package/lib/cjs/components/async-api/responseMapper.js.map +0 -1
  15. package/lib/cjs/components/default/anyMapper.js +0 -29
  16. package/lib/cjs/components/default/anyMapper.js.map +0 -1
  17. package/lib/cjs/components/default/classMapper.js +0 -43
  18. package/lib/cjs/components/default/classMapper.js.map +0 -1
  19. package/lib/cjs/components/default/genericsMapper.js +0 -62
  20. package/lib/cjs/components/default/genericsMapper.js.map +0 -1
  21. package/lib/cjs/components/default/inheritedClassMapper.js +0 -22
  22. package/lib/cjs/components/default/inheritedClassMapper.js.map +0 -1
  23. package/lib/cjs/components/default/inlineEnumsMapper.js +0 -16
  24. package/lib/cjs/components/default/inlineEnumsMapper.js.map +0 -1
  25. package/lib/cjs/components/default/itemMapper.js +0 -10
  26. package/lib/cjs/components/default/itemMapper.js.map +0 -1
  27. package/lib/cjs/components/default/lazyRefMapper.js +0 -18
  28. package/lib/cjs/components/default/lazyRefMapper.js.map +0 -1
  29. package/lib/cjs/components/default/mapMapper.js +0 -25
  30. package/lib/cjs/components/default/mapMapper.js.map +0 -1
  31. package/lib/cjs/components/default/nullableMapper.js +0 -54
  32. package/lib/cjs/components/default/nullableMapper.js.map +0 -1
  33. package/lib/cjs/components/default/objectMapper.js +0 -30
  34. package/lib/cjs/components/default/objectMapper.js.map +0 -1
  35. package/lib/cjs/components/default/ofMapper.js +0 -17
  36. package/lib/cjs/components/default/ofMapper.js.map +0 -1
  37. package/lib/cjs/components/default/propertiesMapper.js +0 -25
  38. package/lib/cjs/components/default/propertiesMapper.js.map +0 -1
  39. package/lib/cjs/components/default/requiredMapper.js +0 -56
  40. package/lib/cjs/components/default/requiredMapper.js.map +0 -1
  41. package/lib/cjs/components/default/schemaMapper.js +0 -124
  42. package/lib/cjs/components/default/schemaMapper.js.map +0 -1
  43. package/lib/cjs/components/index.js +0 -37
  44. package/lib/cjs/components/index.js.map +0 -1
  45. package/lib/cjs/components/open-spec/generate.js +0 -24
  46. package/lib/cjs/components/open-spec/generate.js.map +0 -1
  47. package/lib/cjs/components/open-spec/nullableMapper.js +0 -49
  48. package/lib/cjs/components/open-spec/nullableMapper.js.map +0 -1
  49. package/lib/cjs/components/open-spec/operationInFilesMapper.js +0 -28
  50. package/lib/cjs/components/open-spec/operationInFilesMapper.js.map +0 -1
  51. package/lib/cjs/components/open-spec/operationInParameterMapper.js +0 -39
  52. package/lib/cjs/components/open-spec/operationInParameterMapper.js.map +0 -1
  53. package/lib/cjs/components/open-spec/operationInParametersMapper.js +0 -10
  54. package/lib/cjs/components/open-spec/operationInParametersMapper.js.map +0 -1
  55. package/lib/cjs/components/open-spec/operationInQueryMapper.js +0 -61
  56. package/lib/cjs/components/open-spec/operationInQueryMapper.js.map +0 -1
  57. package/lib/cjs/components/open-spec/operationMapper.js +0 -49
  58. package/lib/cjs/components/open-spec/operationMapper.js.map +0 -1
  59. package/lib/cjs/components/open-spec/operationMediaMapper.js +0 -11
  60. package/lib/cjs/components/open-spec/operationMediaMapper.js.map +0 -1
  61. package/lib/cjs/components/open-spec/operationRequestBodyMapper.js +0 -67
  62. package/lib/cjs/components/open-spec/operationRequestBodyMapper.js.map +0 -1
  63. package/lib/cjs/components/open-spec/operationResponseMapper.js +0 -24
  64. package/lib/cjs/components/open-spec/operationResponseMapper.js.map +0 -1
  65. package/lib/cjs/components/open-spec/pathsMapper.js +0 -95
  66. package/lib/cjs/components/open-spec/pathsMapper.js.map +0 -1
  67. package/lib/cjs/constants/OperationVerbs.js +0 -32
  68. package/lib/cjs/constants/OperationVerbs.js.map +0 -1
  69. package/lib/cjs/constants/httpStatusMessages.js +0 -24
  70. package/lib/cjs/constants/httpStatusMessages.js.map +0 -1
  71. package/lib/cjs/constants/jsonSchemaProperties.js +0 -21
  72. package/lib/cjs/constants/jsonSchemaProperties.js.map +0 -1
  73. package/lib/cjs/decorators/class/children.js +0 -24
  74. package/lib/cjs/decorators/class/children.js.map +0 -1
  75. package/lib/cjs/decorators/class/discriminatorValue.js +0 -56
  76. package/lib/cjs/decorators/class/discriminatorValue.js.map +0 -1
  77. package/lib/cjs/decorators/collections/collectionContains.js +0 -29
  78. package/lib/cjs/decorators/collections/collectionContains.js.map +0 -1
  79. package/lib/cjs/decorators/collections/collectionOf.js +0 -102
  80. package/lib/cjs/decorators/collections/collectionOf.js.map +0 -1
  81. package/lib/cjs/decorators/collections/maxItems.js +0 -61
  82. package/lib/cjs/decorators/collections/maxItems.js.map +0 -1
  83. package/lib/cjs/decorators/collections/maxProperties.js +0 -84
  84. package/lib/cjs/decorators/collections/maxProperties.js.map +0 -1
  85. package/lib/cjs/decorators/collections/minItems.js +0 -65
  86. package/lib/cjs/decorators/collections/minItems.js.map +0 -1
  87. package/lib/cjs/decorators/collections/minProperties.js +0 -83
  88. package/lib/cjs/decorators/collections/minProperties.js.map +0 -1
  89. package/lib/cjs/decorators/collections/uniqueItems.js +0 -61
  90. package/lib/cjs/decorators/collections/uniqueItems.js.map +0 -1
  91. package/lib/cjs/decorators/common/additionalProperties.js +0 -20
  92. package/lib/cjs/decorators/common/additionalProperties.js.map +0 -1
  93. package/lib/cjs/decorators/common/allOf.js +0 -22
  94. package/lib/cjs/decorators/common/allOf.js.map +0 -1
  95. package/lib/cjs/decorators/common/allow.js +0 -47
  96. package/lib/cjs/decorators/common/allow.js.map +0 -1
  97. package/lib/cjs/decorators/common/any.js +0 -46
  98. package/lib/cjs/decorators/common/any.js.map +0 -1
  99. package/lib/cjs/decorators/common/anyOf.js +0 -26
  100. package/lib/cjs/decorators/common/anyOf.js.map +0 -1
  101. package/lib/cjs/decorators/common/const.js +0 -70
  102. package/lib/cjs/decorators/common/const.js.map +0 -1
  103. package/lib/cjs/decorators/common/customKey.js +0 -43
  104. package/lib/cjs/decorators/common/customKey.js.map +0 -1
  105. package/lib/cjs/decorators/common/default.js +0 -51
  106. package/lib/cjs/decorators/common/default.js.map +0 -1
  107. package/lib/cjs/decorators/common/defaultMsg.js +0 -41
  108. package/lib/cjs/decorators/common/defaultMsg.js.map +0 -1
  109. package/lib/cjs/decorators/common/description.js +0 -75
  110. package/lib/cjs/decorators/common/description.js.map +0 -1
  111. package/lib/cjs/decorators/common/discriminatorKey.js +0 -13
  112. package/lib/cjs/decorators/common/discriminatorKey.js.map +0 -1
  113. package/lib/cjs/decorators/common/enum.js +0 -109
  114. package/lib/cjs/decorators/common/enum.js.map +0 -1
  115. package/lib/cjs/decorators/common/errorMsg.js +0 -18
  116. package/lib/cjs/decorators/common/errorMsg.js.map +0 -1
  117. package/lib/cjs/decorators/common/example.js +0 -21
  118. package/lib/cjs/decorators/common/example.js.map +0 -1
  119. package/lib/cjs/decorators/common/examples.js +0 -21
  120. package/lib/cjs/decorators/common/examples.js.map +0 -1
  121. package/lib/cjs/decorators/common/exclusiveMaximum.js +0 -78
  122. package/lib/cjs/decorators/common/exclusiveMaximum.js.map +0 -1
  123. package/lib/cjs/decorators/common/exclusiveMinimum.js +0 -78
  124. package/lib/cjs/decorators/common/exclusiveMinimum.js.map +0 -1
  125. package/lib/cjs/decorators/common/format.js +0 -487
  126. package/lib/cjs/decorators/common/format.js.map +0 -1
  127. package/lib/cjs/decorators/common/forwardGroups.js +0 -20
  128. package/lib/cjs/decorators/common/forwardGroups.js.map +0 -1
  129. package/lib/cjs/decorators/common/groups.js +0 -49
  130. package/lib/cjs/decorators/common/groups.js.map +0 -1
  131. package/lib/cjs/decorators/common/hidden.js +0 -40
  132. package/lib/cjs/decorators/common/hidden.js.map +0 -1
  133. package/lib/cjs/decorators/common/ignore.js +0 -68
  134. package/lib/cjs/decorators/common/ignore.js.map +0 -1
  135. package/lib/cjs/decorators/common/integer.js +0 -71
  136. package/lib/cjs/decorators/common/integer.js.map +0 -1
  137. package/lib/cjs/decorators/common/jsonEntityFn.js +0 -32
  138. package/lib/cjs/decorators/common/jsonEntityFn.js.map +0 -1
  139. package/lib/cjs/decorators/common/maxLength.js +0 -90
  140. package/lib/cjs/decorators/common/maxLength.js.map +0 -1
  141. package/lib/cjs/decorators/common/maximum.js +0 -149
  142. package/lib/cjs/decorators/common/maximum.js.map +0 -1
  143. package/lib/cjs/decorators/common/minLength.js +0 -91
  144. package/lib/cjs/decorators/common/minLength.js.map +0 -1
  145. package/lib/cjs/decorators/common/minimum.js +0 -147
  146. package/lib/cjs/decorators/common/minimum.js.map +0 -1
  147. package/lib/cjs/decorators/common/multipleOf.js +0 -82
  148. package/lib/cjs/decorators/common/multipleOf.js.map +0 -1
  149. package/lib/cjs/decorators/common/name.js +0 -52
  150. package/lib/cjs/decorators/common/name.js.map +0 -1
  151. package/lib/cjs/decorators/common/nullable.js +0 -34
  152. package/lib/cjs/decorators/common/nullable.js.map +0 -1
  153. package/lib/cjs/decorators/common/oneOf.js +0 -27
  154. package/lib/cjs/decorators/common/oneOf.js.map +0 -1
  155. package/lib/cjs/decorators/common/optional.js +0 -28
  156. package/lib/cjs/decorators/common/optional.js.map +0 -1
  157. package/lib/cjs/decorators/common/pattern.js +0 -104
  158. package/lib/cjs/decorators/common/pattern.js.map +0 -1
  159. package/lib/cjs/decorators/common/property.js +0 -27
  160. package/lib/cjs/decorators/common/property.js.map +0 -1
  161. package/lib/cjs/decorators/common/readOnly.js +0 -21
  162. package/lib/cjs/decorators/common/readOnly.js.map +0 -1
  163. package/lib/cjs/decorators/common/recordOf.js +0 -63
  164. package/lib/cjs/decorators/common/recordOf.js.map +0 -1
  165. package/lib/cjs/decorators/common/required.js +0 -53
  166. package/lib/cjs/decorators/common/required.js.map +0 -1
  167. package/lib/cjs/decorators/common/requiredGroups.js +0 -26
  168. package/lib/cjs/decorators/common/requiredGroups.js.map +0 -1
  169. package/lib/cjs/decorators/common/schema.js +0 -66
  170. package/lib/cjs/decorators/common/schema.js.map +0 -1
  171. package/lib/cjs/decorators/common/title.js +0 -49
  172. package/lib/cjs/decorators/common/title.js.map +0 -1
  173. package/lib/cjs/decorators/common/typeError.js +0 -18
  174. package/lib/cjs/decorators/common/typeError.js.map +0 -1
  175. package/lib/cjs/decorators/common/writeOnly.js +0 -21
  176. package/lib/cjs/decorators/common/writeOnly.js.map +0 -1
  177. package/lib/cjs/decorators/config/jsonEntityComponent.js +0 -18
  178. package/lib/cjs/decorators/config/jsonEntityComponent.js.map +0 -1
  179. package/lib/cjs/decorators/generics/genericOf.js +0 -99
  180. package/lib/cjs/decorators/generics/genericOf.js.map +0 -1
  181. package/lib/cjs/decorators/generics/generics.js +0 -25
  182. package/lib/cjs/decorators/generics/generics.js.map +0 -1
  183. package/lib/cjs/decorators/operations/acceptMime.js +0 -28
  184. package/lib/cjs/decorators/operations/acceptMime.js.map +0 -1
  185. package/lib/cjs/decorators/operations/consumes.js +0 -39
  186. package/lib/cjs/decorators/operations/consumes.js.map +0 -1
  187. package/lib/cjs/decorators/operations/contentType.js +0 -28
  188. package/lib/cjs/decorators/operations/contentType.js.map +0 -1
  189. package/lib/cjs/decorators/operations/deprecated.js +0 -49
  190. package/lib/cjs/decorators/operations/deprecated.js.map +0 -1
  191. package/lib/cjs/decorators/operations/header.js +0 -63
  192. package/lib/cjs/decorators/operations/header.js.map +0 -1
  193. package/lib/cjs/decorators/operations/in.js +0 -80
  194. package/lib/cjs/decorators/operations/in.js.map +0 -1
  195. package/lib/cjs/decorators/operations/inFile.js +0 -45
  196. package/lib/cjs/decorators/operations/inFile.js.map +0 -1
  197. package/lib/cjs/decorators/operations/location.js +0 -29
  198. package/lib/cjs/decorators/operations/location.js.map +0 -1
  199. package/lib/cjs/decorators/operations/operation.js +0 -48
  200. package/lib/cjs/decorators/operations/operation.js.map +0 -1
  201. package/lib/cjs/decorators/operations/operationId.js +0 -24
  202. package/lib/cjs/decorators/operations/operationId.js.map +0 -1
  203. package/lib/cjs/decorators/operations/operationPath.js +0 -34
  204. package/lib/cjs/decorators/operations/operationPath.js.map +0 -1
  205. package/lib/cjs/decorators/operations/partial.js +0 -18
  206. package/lib/cjs/decorators/operations/partial.js.map +0 -1
  207. package/lib/cjs/decorators/operations/path.js +0 -29
  208. package/lib/cjs/decorators/operations/path.js.map +0 -1
  209. package/lib/cjs/decorators/operations/produces.js +0 -46
  210. package/lib/cjs/decorators/operations/produces.js.map +0 -1
  211. package/lib/cjs/decorators/operations/publish.js +0 -10
  212. package/lib/cjs/decorators/operations/publish.js.map +0 -1
  213. package/lib/cjs/decorators/operations/redirect.js +0 -25
  214. package/lib/cjs/decorators/operations/redirect.js.map +0 -1
  215. package/lib/cjs/decorators/operations/returns.js +0 -293
  216. package/lib/cjs/decorators/operations/returns.js.map +0 -1
  217. package/lib/cjs/decorators/operations/route.js +0 -158
  218. package/lib/cjs/decorators/operations/route.js.map +0 -1
  219. package/lib/cjs/decorators/operations/security.js +0 -31
  220. package/lib/cjs/decorators/operations/security.js.map +0 -1
  221. package/lib/cjs/decorators/operations/status.js +0 -133
  222. package/lib/cjs/decorators/operations/status.js.map +0 -1
  223. package/lib/cjs/decorators/operations/subscribe.js +0 -10
  224. package/lib/cjs/decorators/operations/subscribe.js.map +0 -1
  225. package/lib/cjs/decorators/operations/summary.js +0 -34
  226. package/lib/cjs/decorators/operations/summary.js.map +0 -1
  227. package/lib/cjs/decorators/operations/tags.js +0 -52
  228. package/lib/cjs/decorators/operations/tags.js.map +0 -1
  229. package/lib/cjs/decorators/operations/view.js +0 -31
  230. package/lib/cjs/decorators/operations/view.js.map +0 -1
  231. package/lib/cjs/domain/DecoratorContext.js +0 -88
  232. package/lib/cjs/domain/DecoratorContext.js.map +0 -1
  233. package/lib/cjs/domain/JsonAliasMap.js +0 -15
  234. package/lib/cjs/domain/JsonAliasMap.js.map +0 -1
  235. package/lib/cjs/domain/JsonClassStore.js +0 -37
  236. package/lib/cjs/domain/JsonClassStore.js.map +0 -1
  237. package/lib/cjs/domain/JsonDiscriminator.js +0 -38
  238. package/lib/cjs/domain/JsonDiscriminator.js.map +0 -1
  239. package/lib/cjs/domain/JsonEntityStore.js +0 -158
  240. package/lib/cjs/domain/JsonEntityStore.js.map +0 -1
  241. package/lib/cjs/domain/JsonFormatTypes.js +0 -22
  242. package/lib/cjs/domain/JsonFormatTypes.js.map +0 -1
  243. package/lib/cjs/domain/JsonLazyRef.js +0 -22
  244. package/lib/cjs/domain/JsonLazyRef.js.map +0 -1
  245. package/lib/cjs/domain/JsonMap.js +0 -29
  246. package/lib/cjs/domain/JsonMap.js.map +0 -1
  247. package/lib/cjs/domain/JsonMedia.js +0 -21
  248. package/lib/cjs/domain/JsonMedia.js.map +0 -1
  249. package/lib/cjs/domain/JsonMethodStore.js +0 -147
  250. package/lib/cjs/domain/JsonMethodStore.js.map +0 -1
  251. package/lib/cjs/domain/JsonOperation.js +0 -156
  252. package/lib/cjs/domain/JsonOperation.js.map +0 -1
  253. package/lib/cjs/domain/JsonOperationPathsMap.js +0 -19
  254. package/lib/cjs/domain/JsonOperationPathsMap.js.map +0 -1
  255. package/lib/cjs/domain/JsonOperationRoute.js +0 -54
  256. package/lib/cjs/domain/JsonOperationRoute.js.map +0 -1
  257. package/lib/cjs/domain/JsonParameter.js +0 -50
  258. package/lib/cjs/domain/JsonParameter.js.map +0 -1
  259. package/lib/cjs/domain/JsonParameterStore.js +0 -99
  260. package/lib/cjs/domain/JsonParameterStore.js.map +0 -1
  261. package/lib/cjs/domain/JsonParameterTypes.js +0 -27
  262. package/lib/cjs/domain/JsonParameterTypes.js.map +0 -1
  263. package/lib/cjs/domain/JsonPropertyStore.js +0 -80
  264. package/lib/cjs/domain/JsonPropertyStore.js.map +0 -1
  265. package/lib/cjs/domain/JsonRequestBody.js +0 -34
  266. package/lib/cjs/domain/JsonRequestBody.js.map +0 -1
  267. package/lib/cjs/domain/JsonResponse.js +0 -45
  268. package/lib/cjs/domain/JsonResponse.js.map +0 -1
  269. package/lib/cjs/domain/JsonSchema.js +0 -822
  270. package/lib/cjs/domain/JsonSchema.js.map +0 -1
  271. package/lib/cjs/domain/SpecTypes.js +0 -11
  272. package/lib/cjs/domain/SpecTypes.js.map +0 -1
  273. package/lib/cjs/hooks/alterIgnore.js +0 -24
  274. package/lib/cjs/hooks/alterIgnore.js.map +0 -1
  275. package/lib/cjs/hooks/alterOneOf.js +0 -50
  276. package/lib/cjs/hooks/alterOneOf.js.map +0 -1
  277. package/lib/cjs/hooks/alterRequiredGroups.js +0 -14
  278. package/lib/cjs/hooks/alterRequiredGroups.js.map +0 -1
  279. package/lib/cjs/index.js +0 -186
  280. package/lib/cjs/index.js.map +0 -1
  281. package/lib/cjs/interfaces/IgnoreCallback.js +0 -3
  282. package/lib/cjs/interfaces/IgnoreCallback.js.map +0 -1
  283. package/lib/cjs/interfaces/JsonHookContext.js +0 -3
  284. package/lib/cjs/interfaces/JsonHookContext.js.map +0 -1
  285. package/lib/cjs/interfaces/JsonOpenSpec.js +0 -3
  286. package/lib/cjs/interfaces/JsonOpenSpec.js.map +0 -1
  287. package/lib/cjs/interfaces/JsonSchemaOptions.js +0 -3
  288. package/lib/cjs/interfaces/JsonSchemaOptions.js.map +0 -1
  289. package/lib/cjs/package.json +0 -3
  290. package/lib/cjs/registries/JsonSchemaMapperContainer.js +0 -43
  291. package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +0 -1
  292. package/lib/cjs/registries/enumRegistries.js +0 -5
  293. package/lib/cjs/registries/enumRegistries.js.map +0 -1
  294. package/lib/cjs/utils/buildPath.js +0 -13
  295. package/lib/cjs/utils/buildPath.js.map +0 -1
  296. package/lib/cjs/utils/concatParameters.js +0 -16
  297. package/lib/cjs/utils/concatParameters.js.map +0 -1
  298. package/lib/cjs/utils/concatPath.js +0 -23
  299. package/lib/cjs/utils/concatPath.js.map +0 -1
  300. package/lib/cjs/utils/defineStatusModel.js +0 -13
  301. package/lib/cjs/utils/defineStatusModel.js.map +0 -1
  302. package/lib/cjs/utils/from.js +0 -280
  303. package/lib/cjs/utils/from.js.map +0 -1
  304. package/lib/cjs/utils/generateSpec.js +0 -47
  305. package/lib/cjs/utils/generateSpec.js.map +0 -1
  306. package/lib/cjs/utils/generics.js +0 -40
  307. package/lib/cjs/utils/generics.js.map +0 -1
  308. package/lib/cjs/utils/getComputedType.js +0 -26
  309. package/lib/cjs/utils/getComputedType.js.map +0 -1
  310. package/lib/cjs/utils/getInheritedStores.js +0 -23
  311. package/lib/cjs/utils/getInheritedStores.js.map +0 -1
  312. package/lib/cjs/utils/getJsonEntityStore.js +0 -18
  313. package/lib/cjs/utils/getJsonEntityStore.js.map +0 -1
  314. package/lib/cjs/utils/getJsonPathParameters.js +0 -87
  315. package/lib/cjs/utils/getJsonPathParameters.js.map +0 -1
  316. package/lib/cjs/utils/getJsonSchema.js +0 -59
  317. package/lib/cjs/utils/getJsonSchema.js.map +0 -1
  318. package/lib/cjs/utils/getJsonType.js +0 -40
  319. package/lib/cjs/utils/getJsonType.js.map +0 -1
  320. package/lib/cjs/utils/getOperationsRoutes.js +0 -37
  321. package/lib/cjs/utils/getOperationsRoutes.js.map +0 -1
  322. package/lib/cjs/utils/getOperationsStores.js +0 -33
  323. package/lib/cjs/utils/getOperationsStores.js.map +0 -1
  324. package/lib/cjs/utils/getPropertiesStores.js +0 -45
  325. package/lib/cjs/utils/getPropertiesStores.js.map +0 -1
  326. package/lib/cjs/utils/getSpec.js +0 -79
  327. package/lib/cjs/utils/getSpec.js.map +0 -1
  328. package/lib/cjs/utils/getSpecType.js +0 -21
  329. package/lib/cjs/utils/getSpecType.js.map +0 -1
  330. package/lib/cjs/utils/isSuccessStatus.js +0 -8
  331. package/lib/cjs/utils/isSuccessStatus.js.map +0 -1
  332. package/lib/cjs/utils/mapHeaders.js +0 -29
  333. package/lib/cjs/utils/mapHeaders.js.map +0 -1
  334. package/lib/cjs/utils/mapOpenSpec.js +0 -41
  335. package/lib/cjs/utils/mapOpenSpec.js.map +0 -1
  336. package/lib/cjs/utils/mapOpenSpec2.js +0 -34
  337. package/lib/cjs/utils/mapOpenSpec2.js.map +0 -1
  338. package/lib/cjs/utils/mapOpenSpec3.js +0 -26
  339. package/lib/cjs/utils/mapOpenSpec3.js.map +0 -1
  340. package/lib/cjs/utils/mapOpenSpecInfo.js +0 -21
  341. package/lib/cjs/utils/mapOpenSpecInfo.js.map +0 -1
  342. package/lib/cjs/utils/mapOperationOptions.js +0 -31
  343. package/lib/cjs/utils/mapOperationOptions.js.map +0 -1
  344. package/lib/cjs/utils/matchGroups.js +0 -56
  345. package/lib/cjs/utils/matchGroups.js.map +0 -1
  346. package/lib/cjs/utils/mergeSpec.js +0 -51
  347. package/lib/cjs/utils/mergeSpec.js.map +0 -1
  348. package/lib/cjs/utils/operationIdFormatter.js +0 -41
  349. package/lib/cjs/utils/operationIdFormatter.js.map +0 -1
  350. package/lib/cjs/utils/ref.js +0 -55
  351. package/lib/cjs/utils/ref.js.map +0 -1
  352. package/lib/cjs/utils/removeHiddenOperation.js +0 -8
  353. package/lib/cjs/utils/removeHiddenOperation.js.map +0 -1
  354. package/lib/cjs/utils/serializeEnumValues.js +0 -26
  355. package/lib/cjs/utils/serializeEnumValues.js.map +0 -1
  356. package/lib/cjs/utils/somethingOf.js +0 -16
  357. package/lib/cjs/utils/somethingOf.js.map +0 -1
  358. package/lib/cjs/utils/toJsonMapCollection.js +0 -15
  359. package/lib/cjs/utils/toJsonMapCollection.js.map +0 -1
  360. package/lib/cjs/utils/toJsonRegex.js +0 -12
  361. package/lib/cjs/utils/toJsonRegex.js.map +0 -1
  362. package/lib/cjs/utils/transformToOS2.js +0 -509
  363. package/lib/cjs/utils/transformToOS2.js.map +0 -1
  364. package/lib/cjs/utils/withErrorMsg.js +0 -34
  365. package/lib/cjs/utils/withErrorMsg.js.map +0 -1
  366. package/lib/esm/package.json +0 -3
  367. package/lib/types-esm/components/async-api/channelsMapper.d.ts +0 -2
  368. package/lib/types-esm/components/async-api/generate.d.ts +0 -1
  369. package/lib/types-esm/components/async-api/messageMapper.d.ts +0 -6
  370. package/lib/types-esm/components/async-api/payloadMapper.d.ts +0 -4
  371. package/lib/types-esm/components/async-api/responseMapper.d.ts +0 -6
  372. package/lib/types-esm/components/default/anyMapper.d.ts +0 -2
  373. package/lib/types-esm/components/default/classMapper.d.ts +0 -3
  374. package/lib/types-esm/components/default/genericsMapper.d.ts +0 -5
  375. package/lib/types-esm/components/default/inheritedClassMapper.d.ts +0 -5
  376. package/lib/types-esm/components/default/inlineEnumsMapper.d.ts +0 -3
  377. package/lib/types-esm/components/default/itemMapper.d.ts +0 -2
  378. package/lib/types-esm/components/default/lazyRefMapper.d.ts +0 -3
  379. package/lib/types-esm/components/default/mapMapper.d.ts +0 -9
  380. package/lib/types-esm/components/default/nullableMapper.d.ts +0 -2
  381. package/lib/types-esm/components/default/objectMapper.d.ts +0 -8
  382. package/lib/types-esm/components/default/ofMapper.d.ts +0 -3
  383. package/lib/types-esm/components/default/propertiesMapper.d.ts +0 -3
  384. package/lib/types-esm/components/default/requiredMapper.d.ts +0 -3
  385. package/lib/types-esm/components/default/schemaMapper.d.ts +0 -3
  386. package/lib/types-esm/components/index.d.ts +0 -33
  387. package/lib/types-esm/components/open-spec/generate.d.ts +0 -1
  388. package/lib/types-esm/components/open-spec/nullableMapper.d.ts +0 -2
  389. package/lib/types-esm/components/open-spec/operationInFilesMapper.d.ts +0 -2
  390. package/lib/types-esm/components/open-spec/operationInParameterMapper.d.ts +0 -10
  391. package/lib/types-esm/components/open-spec/operationInParametersMapper.d.ts +0 -3
  392. package/lib/types-esm/components/open-spec/operationInQueryMapper.d.ts +0 -2
  393. package/lib/types-esm/components/open-spec/operationMapper.d.ts +0 -3
  394. package/lib/types-esm/components/open-spec/operationMediaMapper.d.ts +0 -3
  395. package/lib/types-esm/components/open-spec/operationRequestBodyMapper.d.ts +0 -3
  396. package/lib/types-esm/components/open-spec/operationResponseMapper.d.ts +0 -3
  397. package/lib/types-esm/components/open-spec/pathsMapper.d.ts +0 -2
  398. package/lib/types-esm/constants/OperationVerbs.d.ts +0 -16
  399. package/lib/types-esm/constants/httpStatusMessages.d.ts +0 -11
  400. package/lib/types-esm/constants/jsonSchemaProperties.d.ts +0 -7
  401. package/lib/types-esm/decorators/class/children.d.ts +0 -11
  402. package/lib/types-esm/decorators/class/discriminatorValue.d.ts +0 -42
  403. package/lib/types-esm/decorators/collections/collectionContains.d.ts +0 -21
  404. package/lib/types-esm/decorators/collections/collectionOf.d.ts +0 -101
  405. package/lib/types-esm/decorators/collections/maxItems.d.ts +0 -48
  406. package/lib/types-esm/decorators/collections/maxProperties.d.ts +0 -71
  407. package/lib/types-esm/decorators/collections/minItems.d.ts +0 -52
  408. package/lib/types-esm/decorators/collections/minProperties.d.ts +0 -70
  409. package/lib/types-esm/decorators/collections/uniqueItems.d.ts +0 -51
  410. package/lib/types-esm/decorators/common/additionalProperties.d.ts +0 -11
  411. package/lib/types-esm/decorators/common/allOf.d.ts +0 -13
  412. package/lib/types-esm/decorators/common/allow.d.ts +0 -28
  413. package/lib/types-esm/decorators/common/any.d.ts +0 -38
  414. package/lib/types-esm/decorators/common/anyOf.d.ts +0 -17
  415. package/lib/types-esm/decorators/common/const.d.ts +0 -61
  416. package/lib/types-esm/decorators/common/customKey.d.ts +0 -26
  417. package/lib/types-esm/decorators/common/default.d.ts +0 -41
  418. package/lib/types-esm/decorators/common/defaultMsg.d.ts +0 -32
  419. package/lib/types-esm/decorators/common/description.d.ts +0 -53
  420. package/lib/types-esm/decorators/common/discriminatorKey.d.ts +0 -1
  421. package/lib/types-esm/decorators/common/enum.d.ts +0 -101
  422. package/lib/types-esm/decorators/common/errorMsg.d.ts +0 -6
  423. package/lib/types-esm/decorators/common/example.d.ts +0 -11
  424. package/lib/types-esm/decorators/common/examples.d.ts +0 -12
  425. package/lib/types-esm/decorators/common/exclusiveMaximum.d.ts +0 -70
  426. package/lib/types-esm/decorators/common/exclusiveMinimum.d.ts +0 -70
  427. package/lib/types-esm/decorators/common/format.d.ts +0 -466
  428. package/lib/types-esm/decorators/common/forwardGroups.d.ts +0 -10
  429. package/lib/types-esm/decorators/common/groups.d.ts +0 -12
  430. package/lib/types-esm/decorators/common/hidden.d.ts +0 -32
  431. package/lib/types-esm/decorators/common/ignore.d.ts +0 -59
  432. package/lib/types-esm/decorators/common/integer.d.ts +0 -61
  433. package/lib/types-esm/decorators/common/jsonEntityFn.d.ts +0 -21
  434. package/lib/types-esm/decorators/common/maxLength.d.ts +0 -77
  435. package/lib/types-esm/decorators/common/maximum.d.ts +0 -139
  436. package/lib/types-esm/decorators/common/minLength.d.ts +0 -78
  437. package/lib/types-esm/decorators/common/minimum.d.ts +0 -137
  438. package/lib/types-esm/decorators/common/multipleOf.d.ts +0 -69
  439. package/lib/types-esm/decorators/common/name.d.ts +0 -32
  440. package/lib/types-esm/decorators/common/nullable.d.ts +0 -25
  441. package/lib/types-esm/decorators/common/oneOf.d.ts +0 -17
  442. package/lib/types-esm/decorators/common/optional.d.ts +0 -10
  443. package/lib/types-esm/decorators/common/pattern.d.ts +0 -94
  444. package/lib/types-esm/decorators/common/property.d.ts +0 -11
  445. package/lib/types-esm/decorators/common/readOnly.d.ts +0 -11
  446. package/lib/types-esm/decorators/common/recordOf.d.ts +0 -46
  447. package/lib/types-esm/decorators/common/required.d.ts +0 -44
  448. package/lib/types-esm/decorators/common/requiredGroups.d.ts +0 -10
  449. package/lib/types-esm/decorators/common/schema.d.ts +0 -53
  450. package/lib/types-esm/decorators/common/title.d.ts +0 -39
  451. package/lib/types-esm/decorators/common/typeError.d.ts +0 -8
  452. package/lib/types-esm/decorators/common/writeOnly.d.ts +0 -11
  453. package/lib/types-esm/decorators/config/jsonEntityComponent.d.ts +0 -10
  454. package/lib/types-esm/decorators/generics/genericOf.d.ts +0 -76
  455. package/lib/types-esm/decorators/generics/generics.d.ts +0 -14
  456. package/lib/types-esm/decorators/operations/acceptMime.d.ts +0 -19
  457. package/lib/types-esm/decorators/operations/consumes.d.ts +0 -19
  458. package/lib/types-esm/decorators/operations/contentType.d.ts +0 -20
  459. package/lib/types-esm/decorators/operations/deprecated.d.ts +0 -23
  460. package/lib/types-esm/decorators/operations/header.d.ts +0 -49
  461. package/lib/types-esm/decorators/operations/in.d.ts +0 -64
  462. package/lib/types-esm/decorators/operations/inFile.d.ts +0 -25
  463. package/lib/types-esm/decorators/operations/location.d.ts +0 -22
  464. package/lib/types-esm/decorators/operations/operation.d.ts +0 -60
  465. package/lib/types-esm/decorators/operations/operationId.d.ts +0 -10
  466. package/lib/types-esm/decorators/operations/operationPath.d.ts +0 -21
  467. package/lib/types-esm/decorators/operations/partial.d.ts +0 -10
  468. package/lib/types-esm/decorators/operations/path.d.ts +0 -15
  469. package/lib/types-esm/decorators/operations/produces.d.ts +0 -26
  470. package/lib/types-esm/decorators/operations/publish.d.ts +0 -1
  471. package/lib/types-esm/decorators/operations/redirect.d.ts +0 -52
  472. package/lib/types-esm/decorators/operations/returns.d.ts +0 -267
  473. package/lib/types-esm/decorators/operations/route.d.ts +0 -128
  474. package/lib/types-esm/decorators/operations/security.d.ts +0 -56
  475. package/lib/types-esm/decorators/operations/status.d.ts +0 -127
  476. package/lib/types-esm/decorators/operations/subscribe.d.ts +0 -1
  477. package/lib/types-esm/decorators/operations/summary.d.ts +0 -20
  478. package/lib/types-esm/decorators/operations/tags.d.ts +0 -23
  479. package/lib/types-esm/decorators/operations/view.d.ts +0 -23
  480. package/lib/types-esm/domain/DecoratorContext.d.ts +0 -28
  481. package/lib/types-esm/domain/JsonAliasMap.d.ts +0 -12
  482. package/lib/types-esm/domain/JsonClassStore.d.ts +0 -12
  483. package/lib/types-esm/domain/JsonDiscriminator.d.ts +0 -18
  484. package/lib/types-esm/domain/JsonEntityStore.d.ts +0 -110
  485. package/lib/types-esm/domain/JsonFormatTypes.d.ts +0 -17
  486. package/lib/types-esm/domain/JsonLazyRef.d.ts +0 -9
  487. package/lib/types-esm/domain/JsonMap.d.ts +0 -9
  488. package/lib/types-esm/domain/JsonMedia.d.ts +0 -11
  489. package/lib/types-esm/domain/JsonMethodStore.d.ts +0 -92
  490. package/lib/types-esm/domain/JsonOperation.d.ts +0 -51
  491. package/lib/types-esm/domain/JsonOperationPathsMap.d.ts +0 -7
  492. package/lib/types-esm/domain/JsonOperationRoute.d.ts +0 -25
  493. package/lib/types-esm/domain/JsonParameter.d.ts +0 -22
  494. package/lib/types-esm/domain/JsonParameterStore.d.ts +0 -52
  495. package/lib/types-esm/domain/JsonParameterTypes.d.ts +0 -16
  496. package/lib/types-esm/domain/JsonPropertyStore.d.ts +0 -32
  497. package/lib/types-esm/domain/JsonRequestBody.d.ts +0 -12
  498. package/lib/types-esm/domain/JsonResponse.d.ts +0 -18
  499. package/lib/types-esm/domain/JsonSchema.d.ts +0 -340
  500. package/lib/types-esm/domain/SpecTypes.d.ts +0 -6
  501. package/lib/types-esm/hooks/alterIgnore.d.ts +0 -10
  502. package/lib/types-esm/hooks/alterOneOf.d.ts +0 -3
  503. package/lib/types-esm/hooks/alterRequiredGroups.d.ts +0 -6
  504. package/lib/types-esm/index.d.ts +0 -182
  505. package/lib/types-esm/interfaces/IgnoreCallback.d.ts +0 -4
  506. package/lib/types-esm/interfaces/JsonHookContext.d.ts +0 -17
  507. package/lib/types-esm/interfaces/JsonOpenSpec.d.ts +0 -9
  508. package/lib/types-esm/interfaces/JsonSchemaOptions.d.ts +0 -30
  509. package/lib/types-esm/registries/JsonSchemaMapperContainer.d.ts +0 -21
  510. package/lib/types-esm/registries/enumRegistries.d.ts +0 -2
  511. package/lib/types-esm/utils/buildPath.d.ts +0 -6
  512. package/lib/types-esm/utils/concatParameters.d.ts +0 -4
  513. package/lib/types-esm/utils/concatPath.d.ts +0 -1
  514. package/lib/types-esm/utils/defineStatusModel.d.ts +0 -3
  515. package/lib/types-esm/utils/from.d.ts +0 -190
  516. package/lib/types-esm/utils/generateSpec.d.ts +0 -16
  517. package/lib/types-esm/utils/generics.d.ts +0 -50
  518. package/lib/types-esm/utils/getComputedType.d.ts +0 -5
  519. package/lib/types-esm/utils/getInheritedStores.d.ts +0 -8
  520. package/lib/types-esm/utils/getJsonEntityStore.d.ts +0 -15
  521. package/lib/types-esm/utils/getJsonPathParameters.d.ts +0 -7
  522. package/lib/types-esm/utils/getJsonSchema.d.ts +0 -4
  523. package/lib/types-esm/utils/getJsonType.d.ts +0 -5
  524. package/lib/types-esm/utils/getOperationsRoutes.d.ts +0 -10
  525. package/lib/types-esm/utils/getOperationsStores.d.ts +0 -6
  526. package/lib/types-esm/utils/getPropertiesStores.d.ts +0 -20
  527. package/lib/types-esm/utils/getSpec.d.ts +0 -34
  528. package/lib/types-esm/utils/getSpecType.d.ts +0 -12
  529. package/lib/types-esm/utils/isSuccessStatus.d.ts +0 -2
  530. package/lib/types-esm/utils/mapHeaders.d.ts +0 -9
  531. package/lib/types-esm/utils/mapOpenSpec.d.ts +0 -10
  532. package/lib/types-esm/utils/mapOpenSpec2.d.ts +0 -9
  533. package/lib/types-esm/utils/mapOpenSpec3.d.ts +0 -8
  534. package/lib/types-esm/utils/mapOpenSpecInfo.d.ts +0 -6
  535. package/lib/types-esm/utils/mapOperationOptions.d.ts +0 -5
  536. package/lib/types-esm/utils/matchGroups.d.ts +0 -4
  537. package/lib/types-esm/utils/mergeSpec.d.ts +0 -23
  538. package/lib/types-esm/utils/operationIdFormatter.d.ts +0 -6
  539. package/lib/types-esm/utils/ref.d.ts +0 -14
  540. package/lib/types-esm/utils/removeHiddenOperation.d.ts +0 -2
  541. package/lib/types-esm/utils/serializeEnumValues.d.ts +0 -5
  542. package/lib/types-esm/utils/somethingOf.d.ts +0 -1
  543. package/lib/types-esm/utils/toJsonMapCollection.d.ts +0 -7
  544. package/lib/types-esm/utils/toJsonRegex.d.ts +0 -5
  545. package/lib/types-esm/utils/transformToOS2.d.ts +0 -25
  546. package/lib/types-esm/utils/withErrorMsg.d.ts +0 -6
  547. /package/{webpack.config.js → webpack.config.cjs} +0 -0
@@ -1,127 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { ReturnsChainedDecorators } from "./returns.js";
3
- /**
4
- * Add responses documentation for a specific status code.
5
- *
6
- * ## Usage
7
- *
8
- * Ts.ED v6 API introducing the chaining decorator concept.
9
- * Now a decorator like Returns can be used with another decorators like Description.
10
- *
11
- * ```typescript
12
- * import {Returns} from "@tsed/schema";
13
- *
14
- * @Controller("/")
15
- * class MyController {
16
- * @Status(404, String).Description("Not Found")
17
- * @Status(200, Model).Description("Success")
18
- * async myMethod(): Promise<Model> {}
19
- * }
20
- * ```
21
- *
22
- * ::: tip
23
- * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know
24
- * what chained decorators are available under Returns decorator.
25
- * :::
26
- *
27
- * This example will produce this documentation in swagger:
28
- *
29
- * ```json
30
- * {
31
- * "responses": {
32
- * "404": {
33
- * "description": "Description",
34
- * "schema": {"type": "string"}
35
- * },
36
- * "2OO": {
37
- * "description": "Description",
38
- * "schema": {"$ref": "..."}
39
- * }
40
- * }
41
- * }
42
- * ```
43
- *
44
- * ### Declaring a generic model
45
- *
46
- * 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
47
- * declare explicitly the generic models with the decorators.
48
- *
49
- * 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.
50
- *
51
- * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:
52
- *
53
- * ```typescript
54
- * @Generics("T")
55
- * class Pagination<T> {
56
- * @CollectionOf("T")
57
- * data: T[];
58
- *
59
- * @Property()
60
- * totalCount: number;
61
- * }
62
- * ```
63
- *
64
- * Now, we need a model to be used with the generic Pagination model:
65
- *
66
- * ```typescript
67
- * class Product {
68
- * @Property()
69
- * id: string;
70
- *
71
- * @Property()
72
- * title: string;
73
- * }
74
- * ```
75
- *
76
- * Finally, we can use our models on a method as following:
77
- *
78
- * ```typescript
79
- * class Controller {
80
- * @OperationPath("POST", "/")
81
- * @Status(200, Pagination).Of(Product).Description("description")
82
- * async method(): Promise<Pagination<Product> | null> {
83
- * return null;
84
- * }
85
- * }
86
- * ```
87
- *
88
- * ### Declaring a nested generics models <Badge text="6+"/>
89
- *
90
- * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:
91
- *
92
- * ```typescript
93
- * import {Generics, Property, Returns} from "@tsed/schema";
94
- * import {Post} from "@tsed/common";
95
- *
96
- * class Controller {
97
- * @Post("/")
98
- * @Status(200, Pagination).Of(Submission).Nested(Product).Description("description")
99
- * async method(): Promise<Pagination<Submission<Product>> | null> {
100
- * return null;
101
- * }
102
- * }
103
- * ```
104
- *
105
- * And here is the Submission model:
106
- *
107
- * ```typescript
108
- * import {Generics, Property} from "@tsed/schema";
109
- *
110
- * @Generics("T")
111
- * class Submission<T> {
112
- * @Property()
113
- * _id: string;
114
- * @Property("T")
115
- * data: T;
116
- * }
117
- * ```
118
- *
119
- * @param status
120
- * @param model
121
- * @decorator
122
- * @swagger
123
- * @schema
124
- * @response
125
- * @operation
126
- */
127
- export declare function Status(status: string | number, model?: Type<any> | any): ReturnsChainedDecorators;
@@ -1 +0,0 @@
1
- export declare function Subscribe(event: string): import("./operation.js").RouteChainedDecorators;
@@ -1,20 +0,0 @@
1
- /**
2
- * Add summary metadata on the decorated element.
3
- *
4
- * ## Examples
5
- * ### On method
6
- *
7
- * ```typescript
8
- * class Model {
9
- * @Summary("summary")
10
- * id: string;
11
- * }
12
- * ```
13
- *
14
- * @param summary
15
- * @decorator
16
- * @swagger
17
- * @schema
18
- * @operation
19
- */
20
- export declare function Summary(summary: string): (...args: any[]) => any;
@@ -1,23 +0,0 @@
1
- import { OpenSpecTag } from "@tsed/openspec";
2
- /**
3
- * Add tags metadata on the decorated element.
4
- *
5
- * ## Examples
6
- * ### On method
7
- *
8
- * ```typescript
9
- * @Controller("/")
10
- * class MyController {
11
- * @Tags("api")
12
- * get() {}
13
- * }
14
- * ```
15
- *
16
- * @param tags
17
- * @decorator
18
- * @swagger
19
- * @schema
20
- * @classDecorator
21
- * @operation
22
- */
23
- export declare function Tags(...tags: (string | OpenSpecTag)[]): (...args: any[]) => any;
@@ -1,23 +0,0 @@
1
- /**
2
- * Use a view and sends the rendered HTML string to the client. Optional parameter:
3
- *
4
- * * viewOptions, an object whose properties define local variables for the view.
5
- *
6
- * The view argument is a string that is the file path of the view file to render.
7
- * This can be an absolute path, or a path relative to the views setting.
8
- * If the path does not contain a file extension, then the view engine setting determines the file extension.
9
- * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())
10
- * and render it using the loaded module’s __express function.
11
- *
12
- * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).
13
- *
14
- * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,
15
- * and as so for security reasons should not contain input from the end-user.
16
- *
17
- * @param path Relative path to the view file.
18
- * @param options Additional options
19
- * @decorator
20
- * @operation
21
- * @response
22
- */
23
- export declare function View(path: string, options?: Object): MethodDecorator;
@@ -1,28 +0,0 @@
1
- import { DecoratorParameters, DecoratorTypes } from "@tsed/core";
2
- import { JsonEntityStore } from "./JsonEntityStore.js";
3
- /**
4
- * @ignore
5
- */
6
- export interface DecoratorActionHandler {
7
- (ctx: Map<string, any>): void;
8
- }
9
- /**
10
- * @ignore
11
- */
12
- export declare abstract class DecoratorContext<T = any> extends Map<string, any> {
13
- readonly methods: string[];
14
- protected decoratorType: DecoratorTypes;
15
- protected entity: JsonEntityStore;
16
- protected actions: DecoratorActionHandler[];
17
- constructor(opts?: any);
18
- addAction(cb: DecoratorActionHandler): this;
19
- build(): T;
20
- toObject(): any;
21
- getMergedKey(key: string, defaultValue: any): any;
22
- protected bind(args: DecoratorParameters, decorator: any): void;
23
- protected onInit(args: DecoratorParameters, decorator: any): void;
24
- protected onMapKey(key: string, value: any): void;
25
- protected runActions(): this;
26
- protected beforeInit(): void;
27
- protected afterInit(): void;
28
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export type AliasType = string | number | symbol;
5
- /**
6
- * @ignore
7
- */
8
- export type AliasMap = Map<AliasType, AliasType>;
9
- /**
10
- * @ignore
11
- */
12
- export declare function mapAliasedProperties(value: any, alias: AliasMap): any;
@@ -1,12 +0,0 @@
1
- import type { JsonMethodStore } from "./JsonMethodStore.js";
2
- import type { JsonPropertyStore } from "./JsonPropertyStore.js";
3
- import { JsonEntityStore } from "./JsonEntityStore.js";
4
- export declare class JsonClassStore extends JsonEntityStore {
5
- /**
6
- * List of children JsonEntityStore (properties or methods or params)
7
- */
8
- readonly children: Map<string | number, JsonMethodStore | JsonPropertyStore>;
9
- get path(): string;
10
- set path(path: string);
11
- protected build(): void;
12
- }
@@ -1,18 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- export declare class Discriminator {
3
- propertyName: string;
4
- base: Type<any>;
5
- values: Map<string, Type>;
6
- types: Map<Type, string[]>;
7
- constructor({ base, propertyName, types, values }?: Partial<{
8
- base: Type<any>;
9
- propertyName: string;
10
- values: Map<string, Type<any>>;
11
- types: Map<Type, string[]>;
12
- }>);
13
- add(type: Type<string>, values: string[]): this;
14
- getType(discriminatorValue: string): Type<any>;
15
- getValues(type: Type): string[] | undefined;
16
- getDefaultValue(type: Type<any>): string | undefined;
17
- children(): Type<any>[];
18
- }
@@ -1,110 +0,0 @@
1
- import { DecoratorTypes, Store, Type } from "@tsed/core";
2
- import type { JsonClassStore } from "./JsonClassStore.js";
3
- import type { JsonMethodStore } from "./JsonMethodStore.js";
4
- import type { JsonParameterStore } from "./JsonParameterStore.js";
5
- import type { JsonPropertyStore } from "./JsonPropertyStore.js";
6
- import type { JsonSchema } from "./JsonSchema.js";
7
- /**
8
- * @ignore
9
- */
10
- export declare const JsonEntitiesContainer: Map<DecoratorTypes, Type<JsonEntityStore>>;
11
- export interface JsonEntityStoreOptions {
12
- decoratorType: DecoratorTypes;
13
- target: Type<any>;
14
- propertyKey?: string | symbol;
15
- index?: number;
16
- descriptor?: any;
17
- type?: Type<any>;
18
- collectionType?: Type<any>;
19
- beforeMiddlewares?: Function[];
20
- middlewares?: Function[];
21
- afterMiddlewares?: Function[];
22
- [key: string]: any;
23
- }
24
- export declare abstract class JsonEntityStore implements JsonEntityStoreOptions {
25
- /**
26
- * Original property key decorated by the decorator
27
- */
28
- readonly propertyKey: string | symbol;
29
- /**
30
- * Alias of the property
31
- */
32
- readonly propertyName: string;
33
- /**
34
- * Parameter index
35
- */
36
- readonly index: number;
37
- /**
38
- * Method's descriptor
39
- */
40
- readonly descriptor: PropertyDescriptor;
41
- /**
42
- * Decorator type used to declare the JsonSchemaStore.
43
- */
44
- readonly decoratorType: DecoratorTypes;
45
- /**
46
- * Type of the collection (Array, Map, Set, etc...)
47
- */
48
- collectionType: Type<any>;
49
- token: Type<any>;
50
- readonly store: Store;
51
- readonly isStore = true;
52
- readonly parent: JsonEntityStore;
53
- readonly target: Type<any>;
54
- /**
55
- *
56
- */
57
- protected _type: Type<any>;
58
- /**
59
- * Ref to JsonSchema
60
- */
61
- protected _schema: JsonSchema;
62
- [key: string]: any;
63
- constructor(options: JsonEntityStoreOptions);
64
- /**
65
- * Return the class name of the entity.
66
- * @returns {string}
67
- */
68
- get targetName(): string;
69
- get isCollection(): boolean;
70
- get isArray(): boolean;
71
- get discriminatorAncestor(): JsonEntityStore | undefined;
72
- get isPrimitive(): boolean;
73
- get isDate(): boolean;
74
- get isObject(): boolean;
75
- get isClass(): boolean;
76
- /**
77
- * Return the JsonSchema
78
- */
79
- get schema(): JsonSchema;
80
- get nestedGenerics(): Type<any>[][];
81
- set nestedGenerics(nestedGenerics: Type<any>[][]);
82
- get type(): Type<any> | any;
83
- /**
84
- * Get original type without transformation
85
- * @param value
86
- */
87
- set type(value: Type<any> | any);
88
- /**
89
- * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to
90
- * get the right type.
91
- */
92
- get computedType(): any;
93
- get itemSchema(): JsonSchema;
94
- get parentSchema(): JsonSchema;
95
- get isDiscriminatorChild(): boolean;
96
- static from<T extends JsonClassStore = JsonClassStore>(target: Type<any>): T;
97
- static from<T extends JsonPropertyStore = JsonPropertyStore>(target: Type<any> | any, propertyKey: string | symbol): T;
98
- static from<T extends JsonParameterStore = JsonParameterStore>(target: Type<any> | any, propertyKey: string | symbol, index: number): T;
99
- static from<T extends JsonMethodStore = JsonMethodStore>(target: Type<any> | any, propertyKey: string | symbol, descriptor: PropertyDescriptor): T;
100
- static from<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T;
101
- static fromMethod<T extends JsonMethodStore = JsonMethodStore>(target: any, propertyKey: string | symbol): T;
102
- static get(target: Type<any>, propertyKey: string | symbol, descriptor?: any): JsonEntityStore;
103
- isGetterOnly(): boolean | undefined;
104
- get<T = any>(key: string, defaultValue?: any): T;
105
- set(key: string, value?: any): Store;
106
- toString(): string;
107
- protected abstract build(): void;
108
- protected buildType(type: any): void;
109
- getBestType(): any;
110
- }
@@ -1,17 +0,0 @@
1
- export declare enum JsonFormatTypes {
2
- DATE_TIME = "date-time",
3
- DATE = "date",
4
- TIME = "time",
5
- EMAIL = "email",
6
- HOSTNAME = "hostname",
7
- IPV4 = "ipv4",
8
- IPV6 = "ipv6",
9
- URI = "uri",
10
- URL = "url",
11
- URI_REF = "uri-reference",
12
- URI_TEMPLATE = "uri-template",
13
- JSON_POINTER = "json-pointer",
14
- RELATIVE_JSON_POINTER = "relative-json-pointer",
15
- UUID = "uuid",
16
- REGEX = "regex"
17
- }
@@ -1,9 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- export declare class JsonLazyRef {
3
- readonly getType: () => Type<any>;
4
- readonly isLazyRef = true;
5
- constructor(getType: () => Type<any>);
6
- get target(): Type<any>;
7
- get schema(): import("./JsonSchema.js").JsonSchema;
8
- get name(): string;
9
- }
@@ -1,9 +0,0 @@
1
- import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
2
- export declare class JsonMap<T> extends Map<string, any> {
3
- [key: string]: any;
4
- $kind: string;
5
- readonly $isJsonDocument = true;
6
- constructor(obj?: Partial<T>);
7
- assign(obj?: Partial<T> & any): this;
8
- toJSON(options?: JsonSchemaOptions): any;
9
- }
@@ -1,11 +0,0 @@
1
- import { OS3MediaType } from "@tsed/openspec";
2
- import { JsonMap } from "./JsonMap.js";
3
- import { JsonSchema } from "./JsonSchema.js";
4
- export declare class JsonMedia extends JsonMap<OS3MediaType<JsonSchema>> {
5
- $kind: string;
6
- groups: string[];
7
- groupsName: string;
8
- allowedGroups?: Set<string>;
9
- schema(schema: JsonSchema): this;
10
- examples(examples: any): this;
11
- }
@@ -1,92 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import type { JsonClassStore } from "./JsonClassStore.js";
3
- import { JsonEntityStore, JsonEntityStoreOptions } from "./JsonEntityStore.js";
4
- import { JsonOperation } from "./JsonOperation.js";
5
- import type { JsonParameterStore } from "./JsonParameterStore.js";
6
- export interface JsonViewOptions {
7
- path: string;
8
- options: any;
9
- }
10
- export interface JsonRedirectOptions {
11
- status: number | undefined;
12
- url: string;
13
- }
14
- export declare class JsonMethodStore extends JsonEntityStore {
15
- readonly parent: JsonClassStore;
16
- middlewares: any[];
17
- beforeMiddlewares: any[];
18
- afterMiddlewares: any[];
19
- /**
20
- * Ref to JsonOperation when the decorated object is a method.
21
- */
22
- readonly operation: JsonOperation;
23
- /**
24
- * List of children JsonEntityStore (properties or methods or params)
25
- */
26
- readonly children: Map<string | number, JsonParameterStore>;
27
- constructor(options: JsonEntityStoreOptions);
28
- get params(): JsonParameterStore[];
29
- get view(): JsonViewOptions;
30
- set view(view: JsonViewOptions);
31
- get acceptMimes(): string[];
32
- set acceptMimes(mimes: string[]);
33
- get parameters(): JsonParameterStore[];
34
- get operationPaths(): Map<string, import("./JsonOperation.js").JsonMethodPath>;
35
- /**
36
- * Get an endpoint.
37
- * @param target
38
- * @param propertyKey
39
- * @param descriptor
40
- */
41
- static get(target: Type<any>, propertyKey: string | symbol, descriptor?: PropertyDescriptor): JsonMethodStore;
42
- getResponseOptions(status: number, { contentType, includes }?: {
43
- contentType?: string;
44
- includes?: string[];
45
- }): undefined | any;
46
- /**
47
- * Append middlewares to the beforeMiddlewares list.
48
- * @param args
49
- * @returns {EndpointMetadata}
50
- */
51
- before(args: Function[]): this;
52
- /**
53
- * Append middlewares to the afterMiddlewares list.
54
- * @param args
55
- * @returns {EndpointMetadata}
56
- */
57
- after(args: Function[]): this;
58
- /**
59
- * Store all arguments collected via Annotation.
60
- * @param args
61
- */
62
- use(args: Function[]): this;
63
- /**
64
- * Find the value at the controller level. Let this value be extended or overridden by the endpoint itself.
65
- *
66
- * @param key
67
- * @returns {any}
68
- */
69
- get<T = any>(key: any): T;
70
- getParamTypes(): Record<string, boolean>;
71
- protected build(): void;
72
- }
73
- /**
74
- * EndpointMetadata contains metadata about a controller and his method.
75
- * Each annotation (@Get, @Body...) attached to a method are stored into endpoint.
76
- * EndpointMetadata convert this metadata to an array which contain arguments to call an Express method.
77
- *
78
- * Example :
79
- *```typescript
80
- * @Controller("/my-path")
81
- * provide MyClass {
82
- *
83
- * @Get("/")
84
- * @Authenticated()
85
- * public myMethod(){}
86
- * }
87
- *```
88
- *
89
- * @alias JsonMethodStore
90
- */
91
- export type EndpointMetadata = JsonMethodStore;
92
- export declare const EndpointMetadata: typeof JsonMethodStore;
@@ -1,51 +0,0 @@
1
- import { OpenSpecSecurity, OpenSpecTag, OS3Operation } from "@tsed/openspec";
2
- import { JsonHeader } from "../interfaces/JsonOpenSpec.js";
3
- import { JsonMap } from "./JsonMap.js";
4
- import { JsonParameter } from "./JsonParameter.js";
5
- import { JsonResponse } from "./JsonResponse.js";
6
- import { JsonSchema } from "./JsonSchema.js";
7
- export interface JsonMethodPath {
8
- path: string | RegExp;
9
- method: string;
10
- [key: string]: any;
11
- }
12
- export interface JsonOperationOptions extends OS3Operation<JsonSchema, JsonParameter, JsonMap<JsonResponse>> {
13
- consumes: string[];
14
- produces: string[];
15
- }
16
- export declare class JsonOperation extends JsonMap<JsonOperationOptions> {
17
- #private;
18
- $kind: string;
19
- readonly operationPaths: Map<string, JsonMethodPath>;
20
- constructor(obj?: Partial<JsonOperationOptions>);
21
- get response(): JsonResponse | undefined;
22
- get status(): number;
23
- tags(tags: OpenSpecTag[]): this;
24
- addTags(tags: OpenSpecTag[]): this;
25
- summary(summary: string): this;
26
- operationId(operationId: string): this;
27
- responses(responses: JsonMap<any>): this;
28
- defaultStatus(status: number): this;
29
- getStatus(): number;
30
- setRedirection(status?: number): this;
31
- isRedirection(status?: number): boolean | 0;
32
- addResponse(statusCode: string | number, response: JsonResponse): this;
33
- getResponses(): JsonMap<JsonResponse>;
34
- getResponseOf(status: number | string): JsonResponse;
35
- ensureResponseOf(status: number | string): JsonResponse;
36
- getHeadersOf(status: number): Record<string, JsonHeader & {
37
- example: string;
38
- }>;
39
- getContentTypeOf(status: number): any;
40
- security(security: OpenSpecSecurity): this;
41
- addSecurityScopes(name: string, scopes: string[]): this;
42
- description(description: string): this;
43
- deprecated(deprecated: boolean): this;
44
- parameters(parameters: JsonParameter[]): this;
45
- addParameter(index: number, parameter: JsonParameter): void;
46
- consumes(consumes: string[]): this;
47
- produces(produces: string[]): this;
48
- addProduce(produce: string): void;
49
- addOperationPath(method: string, path: string | RegExp, options?: any): this;
50
- getAllowedOperationPath(allowedVerbs?: string[]): JsonMethodPath[];
51
- }
@@ -1,7 +0,0 @@
1
- import { JsonMethodPath } from "./JsonOperation.js";
2
- export declare class JsonOperationPathsMap extends Map<string, JsonMethodPath> {
3
- $kind: string;
4
- readonly $isJsonDocument = true;
5
- setOperationPath(operationPath: JsonMethodPath): void;
6
- protected getKey: (method: string, path: any) => string;
7
- }
@@ -1,25 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonMethodStore } from "./JsonMethodStore.js";
3
- import { JsonMethodPath, JsonOperation } from "./JsonOperation.js";
4
- export declare class JsonOperationRoute<Entity extends JsonMethodStore = JsonMethodStore> {
5
- readonly token: Type<any>;
6
- readonly endpoint: Entity;
7
- readonly operationPath?: JsonMethodPath;
8
- readonly basePath?: string;
9
- readonly paramsTypes: Record<string, boolean>;
10
- constructor(options: Partial<JsonOperationRoute>);
11
- get url(): any;
12
- get path(): string | RegExp | undefined;
13
- get fullPath(): any;
14
- get method(): string;
15
- get name(): string;
16
- get className(): string;
17
- get methodClassName(): string;
18
- get parameters(): import("./JsonParameterStore.js").JsonParameterStore[];
19
- get propertyKey(): string;
20
- get propertyName(): string;
21
- get store(): import("@tsed/core").Store;
22
- get operation(): JsonOperation;
23
- get operationId(): any;
24
- has(key: string): boolean;
25
- }
@@ -1,22 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { OpenSpecHash, OpenSpecRef, OS3Example, OS3Parameter } from "@tsed/openspec";
3
- import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
4
- import { NestedGenerics } from "../utils/generics.js";
5
- import { JsonMap } from "./JsonMap.js";
6
- import { JsonSchema } from "./JsonSchema.js";
7
- export declare class JsonParameter extends JsonMap<OS3Parameter<JsonSchema>> implements NestedGenerics {
8
- $kind: string;
9
- nestedGenerics: Type<any>[][];
10
- groups: string[];
11
- groupsName: string;
12
- $schema: JsonSchema;
13
- expression: string;
14
- getName(): any;
15
- name(name: string): this;
16
- examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>): this;
17
- description(description: string): this;
18
- in(inType: string, expression?: string | any): this;
19
- required(required: boolean): this;
20
- schema(schema: JsonSchema): this;
21
- toJSON(options?: JsonSchemaOptions): any;
22
- }