@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,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Partial = void 0;
4
- const groups_js_1 = require("../common/groups.js");
5
- /**
6
- * Apply Partial group strategy on the input model
7
- *
8
- * @decorator
9
- * @validation
10
- * @swagger
11
- * @schema
12
- * @input
13
- */
14
- function Partial() {
15
- return (0, groups_js_1.Groups)("partial");
16
- }
17
- exports.Partial = Partial;
18
- //# sourceMappingURL=partial.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"partial.js","sourceRoot":"","sources":["../../../../src/decorators/operations/partial.ts"],"names":[],"mappings":";;;AAAA,mDAA2C;AAE3C;;;;;;;;GAQG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,kBAAM,EAAC,SAAS,CAAQ,CAAC;AAClC,CAAC;AAFD,0BAEC"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Path = void 0;
4
- const core_1 = require("@tsed/core");
5
- const jsonEntityFn_js_1 = require("../common/jsonEntityFn.js");
6
- /**
7
- * Set class path to expose all endpoints
8
- *
9
- * ::: warning
10
- * Don't use this decorator to change the path if you develop your application with Ts.ED.
11
- * :::
12
- *
13
- * @param path
14
- * @decorator
15
- * @swagger
16
- * @schema
17
- * @classDecorator
18
- * @operation
19
- */
20
- function Path(path) {
21
- return (0, jsonEntityFn_js_1.JsonEntityFn)((store, args) => {
22
- if (store.decoratorType !== core_1.DecoratorTypes.CLASS) {
23
- throw new core_1.UnsupportedDecoratorType(Path, args);
24
- }
25
- store.path = path;
26
- });
27
- }
28
- exports.Path = Path;
29
- //# sourceMappingURL=path.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../src/decorators/operations/path.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,+DAAuD;AAEvD;;;;;;;;;;;;;GAaG;AACH,SAAgB,IAAI,CAAC,IAAY;IAC/B,OAAO,IAAA,8BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,KAAK,EAAE;YAChD,MAAM,IAAI,+BAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAChD;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC;AARD,oBAQC"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Produces = void 0;
4
- const core_1 = require("@tsed/core");
5
- const jsonEntityFn_js_1 = require("../common/jsonEntityFn.js");
6
- /**
7
- * Add produces metadata on the decorated element.
8
- *
9
- * ## Examples
10
- * ### On method
11
- *
12
- * ```typescript
13
- * class Model {
14
- * @Produces("text/html")
15
- * id: string;
16
- * }
17
- * ```
18
- *
19
- * ::: warning
20
- * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).
21
- * :::
22
- *
23
- * @param produces
24
- * @decorator
25
- * @swagger
26
- * @methodDecorator
27
- * @classDecorator
28
- * @operation
29
- * @response
30
- */
31
- function Produces(...produces) {
32
- return (0, jsonEntityFn_js_1.JsonEntityFn)((store, args) => {
33
- switch (store.decoratorType) {
34
- case core_1.DecoratorTypes.METHOD:
35
- store.operation.produces(produces);
36
- break;
37
- case core_1.DecoratorTypes.CLASS:
38
- (0, core_1.decorateMethodsOf)(args[0], Produces(...produces));
39
- break;
40
- default:
41
- throw new core_1.UnsupportedDecoratorType(Produces, args);
42
- }
43
- });
44
- }
45
- exports.Produces = Produces;
46
- //# sourceMappingURL=produces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"produces.js","sourceRoot":"","sources":["../../../../src/decorators/operations/produces.ts"],"names":[],"mappings":";;;AAAA,qCAAuF;AACvF,+DAAuD;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,IAAA,8BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,qBAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,qBAAc,CAAC,KAAK;gBACvB,IAAA,wBAAiB,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAClD,MAAM;YAER;gBACE,MAAM,IAAI,+BAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,4BAcC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Publish = void 0;
4
- const OperationVerbs_js_1 = require("../../constants/OperationVerbs.js");
5
- const operation_js_1 = require("./operation.js");
6
- function Publish(event) {
7
- return (0, operation_js_1.Operation)(OperationVerbs_js_1.OperationVerbs.PUBLISH, event);
8
- }
9
- exports.Publish = Publish;
10
- //# sourceMappingURL=publish.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/decorators/operations/publish.ts"],"names":[],"mappings":";;;AAAA,yEAAiE;AACjE,iDAAyC;AAEzC,SAAgB,OAAO,CAAC,KAAa;IACnC,OAAO,IAAA,wBAAS,EAAC,kCAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC;AAFD,0BAEC"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Redirect = void 0;
4
- const core_1 = require("@tsed/core");
5
- const jsonEntityFn_js_1 = require("../common/jsonEntityFn.js");
6
- const returns_js_1 = require("./returns.js");
7
- function Redirect(...args) {
8
- const { status, url, meta } = args.reduce((options, value) => {
9
- if ((0, core_1.isNumber)(value)) {
10
- options.status = value;
11
- return options;
12
- }
13
- if ((0, core_1.isString)(value)) {
14
- options.url = value;
15
- return options;
16
- }
17
- options.meta = value;
18
- return options;
19
- }, { status: 302, url: "", meta: {} });
20
- return (0, core_1.useDecorators)((0, returns_js_1.Returns)(status).Location(url, meta), (0, jsonEntityFn_js_1.JsonEntityFn)((entity) => {
21
- entity.operation?.setRedirection(status);
22
- }));
23
- }
24
- exports.Redirect = Redirect;
25
- //# sourceMappingURL=redirect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirect.js","sourceRoot":"","sources":["../../../../src/decorators/operations/redirect.ts"],"names":[],"mappings":";;;AAAA,qCAA6D;AAE7D,+DAAuD;AACvD,6CAAqC;AAqDrC,SAAgB,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,IAAA,eAAQ,EAAC,KAAK,CAAC,EAAE;YACnB,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;YACvB,OAAO,OAAO,CAAC;SAChB;QAED,IAAI,IAAA,eAAQ,EAAC,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,IAAA,oBAAa,EAClB,IAAA,oBAAO,EAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,EACnC,IAAA,8BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QACtB,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAxBD,4BAwBC"}
@@ -1,293 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Returns = void 0;
4
- const core_1 = require("@tsed/core");
5
- const httpStatusMessages_js_1 = require("../../constants/httpStatusMessages.js");
6
- const DecoratorContext_js_1 = require("../../domain/DecoratorContext.js");
7
- const JsonEntityStore_js_1 = require("../../domain/JsonEntityStore.js");
8
- const JsonParameter_js_1 = require("../../domain/JsonParameter.js");
9
- const JsonSchema_js_1 = require("../../domain/JsonSchema.js");
10
- const defineStatusModel_js_1 = require("../../utils/defineStatusModel.js");
11
- const from_js_1 = require("../../utils/from.js");
12
- const isSuccessStatus_js_1 = require("../../utils/isSuccessStatus.js");
13
- const mapHeaders_js_1 = require("../../utils/mapHeaders.js");
14
- /**
15
- * @ignore
16
- */
17
- function isEnum(type) {
18
- return (0, core_1.isObject)(type) && !("toJSON" in type);
19
- }
20
- function mapGenerics(types) {
21
- return types.map((type) => {
22
- if (isEnum(type)) {
23
- return (0, from_js_1.string)().enum(Object.values(type));
24
- }
25
- return type;
26
- });
27
- }
28
- /**
29
- * @ignore
30
- */
31
- class ReturnDecoratorContext extends DecoratorContext_js_1.DecoratorContext {
32
- constructor({ status, model }) {
33
- super();
34
- this.methods = [
35
- "contentType",
36
- "description",
37
- "examples",
38
- "type",
39
- "status",
40
- "of",
41
- "ofInteger",
42
- "oneOf",
43
- "allOf",
44
- "anyOf",
45
- "nested",
46
- "header",
47
- "headers",
48
- "schema",
49
- "title",
50
- "groups",
51
- "allowedGroups",
52
- "location",
53
- "binary"
54
- ];
55
- this.model(model);
56
- this.status(status);
57
- }
58
- type(model) {
59
- return this.model(model);
60
- }
61
- model(model) {
62
- model && this.set("model", model);
63
- return this;
64
- }
65
- status(status) {
66
- this.set("status", status);
67
- if (status && (0, httpStatusMessages_js_1.getStatusMessage)(status) && !this.get("description")) {
68
- this.set("description", (0, httpStatusMessages_js_1.getStatusMessage)(status));
69
- if (!this.get("model")) {
70
- this.model((0, defineStatusModel_js_1.getStatusModel)(+status));
71
- }
72
- }
73
- return this;
74
- }
75
- headers(headers) {
76
- this.set("headers", {
77
- ...(this.get("headers") || {}),
78
- ...(0, mapHeaders_js_1.mapHeaders)(headers)
79
- });
80
- return this;
81
- }
82
- header(key, value) {
83
- if (value === undefined && (0, core_1.isString)(key)) {
84
- return this.headers({ [key]: { type: "string" } });
85
- }
86
- return this.headers({ [key]: value });
87
- }
88
- location(path, meta = {}) {
89
- this.headers({
90
- Location: {
91
- ...meta,
92
- value: path
93
- }
94
- });
95
- return this;
96
- }
97
- groups(...groups) {
98
- if (groups.length === 2 && (0, core_1.isArray)(groups[1])) {
99
- this.set("groupsName", groups[0]);
100
- this.set("groups", groups[1]);
101
- }
102
- else {
103
- this.set("groups", groups);
104
- }
105
- return this;
106
- }
107
- allowedGroups(...allowedGroups) {
108
- this.set("allowedGroups", new Set(allowedGroups));
109
- return this;
110
- }
111
- nested(...generics) {
112
- const model = this.get("model");
113
- this.checkPrimitive(model);
114
- this.checkCollection(model);
115
- this.addAction((ctx) => {
116
- this.get("schema").nestedGenerics.push(mapGenerics(generics));
117
- });
118
- return this;
119
- }
120
- of(...types) {
121
- const model = this.get("model");
122
- this.checkPrimitive(model);
123
- this.addAction(() => {
124
- const schema = this.get("schema");
125
- if ((0, core_1.isCollection)(model)) {
126
- schema?.itemSchema({ type: types[0] });
127
- }
128
- else {
129
- schema?.nestedGenerics.push(mapGenerics(types));
130
- }
131
- });
132
- return this;
133
- }
134
- ofInteger() {
135
- return this.of("integer");
136
- }
137
- oneOf(...types) {
138
- return this.manyOf("oneOf", types);
139
- }
140
- allOf(...types) {
141
- return this.manyOf("allOf", types);
142
- }
143
- anyOf(...types) {
144
- return this.manyOf("anyOf", types);
145
- }
146
- schema(partial) {
147
- this.addAction(() => {
148
- const schema = this.get("schema");
149
- schema.assign(partial);
150
- });
151
- return this;
152
- }
153
- examples(examples) {
154
- this.set("examples", (0, core_1.isString)(examples) ? [examples] : examples);
155
- return this;
156
- }
157
- title(title) {
158
- return this.schema({ title });
159
- }
160
- binary() {
161
- this.type(String);
162
- this.set("contentType", "application/octet-stream");
163
- this.schema({ format: "binary" });
164
- return this;
165
- }
166
- checkPrimitive(model) {
167
- if ((0, core_1.isPrimitiveOrPrimitiveClass)(model)) {
168
- throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean");
169
- }
170
- }
171
- checkCollection(model) {
172
- if ((0, core_1.isCollection)(model)) {
173
- throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean");
174
- }
175
- }
176
- getContentType() {
177
- const model = this.get("model");
178
- let contentType = this.get("contentType");
179
- if ((model && !(0, core_1.isPlainObject)(model) && !(0, core_1.isPrimitiveOrPrimitiveClass)(model)) || this.hasOfTypes) {
180
- contentType = contentType || "application/json";
181
- }
182
- return contentType;
183
- }
184
- getStatus() {
185
- return this.get("status") || "default";
186
- }
187
- onInit(args, decorator) {
188
- const type = (0, core_1.decoratorTypeOf)(args);
189
- switch (type) {
190
- case core_1.DecoratorTypes.METHOD:
191
- this.entity = JsonEntityStore_js_1.JsonEntityStore.from(...args);
192
- if (this.entity.operation) {
193
- this.map();
194
- }
195
- break;
196
- case core_1.DecoratorTypes.CLASS:
197
- this.decoratorType = core_1.DecoratorTypes.CLASS;
198
- (0, core_1.decorateMethodsOf)(args[0], decorator);
199
- break;
200
- }
201
- }
202
- map() {
203
- const model = this.get("model");
204
- const { entity, decoratorType } = this;
205
- const operation = this.entity.operation;
206
- const currentStatus = this.getStatus();
207
- const response = operation.ensureResponseOf(currentStatus);
208
- const contentType = this.getContentType();
209
- let { description = response.get("description") } = this.toObject();
210
- if (description) {
211
- description = decoratorType === core_1.DecoratorTypes.CLASS ? response.get("description") || description : description;
212
- response.description(description);
213
- }
214
- const headers = this.getMergedKey("headers", response.get("headers"));
215
- if (headers) {
216
- response.headers(headers);
217
- }
218
- this.mapMedia(response);
219
- if ((0, isSuccessStatus_js_1.isSuccessStatus)(this.get("status")) || currentStatus === "default") {
220
- if (model) {
221
- entity.type = model;
222
- }
223
- }
224
- // additional info for OS2
225
- contentType && operation.addProduce(contentType);
226
- // run additional actions
227
- return this.runActions();
228
- }
229
- mapMedia(response) {
230
- const contentType = this.getContentType();
231
- const model = this.get("model");
232
- const media = response.getMedia(contentType || "*/*");
233
- const schema = media.get("schema") || new JsonSchema_js_1.JsonSchema({ type: model });
234
- const groups = this.get("groups");
235
- const groupsName = this.get("groupsName");
236
- const allowedGroups = this.get("allowedGroups");
237
- const operation = this.entity.operation;
238
- if (model) {
239
- if ((0, core_1.isArray)(model)) {
240
- schema.oneOf(model.map((type) => ({ type })));
241
- }
242
- else {
243
- schema.type(model);
244
- }
245
- }
246
- this.set("schema", schema);
247
- media.schema(schema);
248
- media.groups = groups;
249
- media.groupsName = groupsName;
250
- if (allowedGroups) {
251
- media.allowedGroups = allowedGroups;
252
- const jsonParameter = new JsonParameter_js_1.JsonParameter();
253
- jsonParameter.in("query").name("includes");
254
- jsonParameter.schema(JsonSchema_js_1.JsonSchema.from({
255
- type: "array",
256
- items: {
257
- type: "string",
258
- enum: [...allowedGroups]
259
- }
260
- }));
261
- operation.addParameter(-1, jsonParameter);
262
- }
263
- const examples = this.get("examples");
264
- if (examples) {
265
- media.examples(examples);
266
- }
267
- return media;
268
- }
269
- manyOf(kind, types) {
270
- const model = this.get("model");
271
- this.hasOfTypes = true;
272
- this.addAction(() => {
273
- const schema = this.get("schema");
274
- if ((0, core_1.isCollection)(model)) {
275
- schema.type(model || Object);
276
- schema.itemSchema().set(kind, types);
277
- }
278
- else {
279
- schema.set(kind, types);
280
- }
281
- });
282
- return this;
283
- }
284
- }
285
- function Returns(status, model) {
286
- const context = new ReturnDecoratorContext({
287
- status,
288
- model
289
- });
290
- return context.build();
291
- }
292
- exports.Returns = Returns;
293
- //# sourceMappingURL=returns.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"returns.js","sourceRoot":"","sources":["../../../../src/decorators/operations/returns.ts"],"names":[],"mappings":";;;AAAA,qCAWoB;AAEpB,iFAAuE;AACvE,0EAAkE;AAClE,wEAAgE;AAChE,oEAA4D;AAE5D,8DAAwE;AAExE,2EAAgE;AAChE,iDAA2C;AAE3C,uEAA+D;AAC/D,6DAAqD;AAkIrD;;GAEG;AACH,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,IAAA,eAAQ,EAAC,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,IAAA,gBAAM,GAAE,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,MAAM,sBAAuB,SAAQ,sCAA0C;IAyB7E,YAAY,EAAC,MAAM,EAAE,KAAK,EAAM;QAC9B,KAAK,EAAE,CAAC;QAzBD,YAAO,GAAa;YAC3B,aAAa;YACb,aAAa;YACb,UAAU;YACV,MAAM;YACN,QAAQ;YACR,IAAI;YACJ,WAAW;YACX,OAAO;YACP,OAAO;YACP,OAAO;YACP,QA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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;QAChC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAEvB,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE;YAClB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAe,CAAC;YAEhD,IAAI,IAAA,mBAAY,EAAC,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,SAAgB,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;AAPD,0BAOC"}
@@ -1,158 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Options = exports.Patch = exports.Head = exports.Delete = exports.Put = exports.Post = exports.Get = exports.All = void 0;
4
- const OperationVerbs_js_1 = require("../../constants/OperationVerbs.js");
5
- const operation_js_1 = require("./operation.js");
6
- /**
7
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
8
- *
9
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
10
- * For example, if you placed the following route at the top of all other route definitions, it would require that
11
- * all routes from that point on would require authentication, and automatically load a user.
12
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
13
- * to continue matching subsequent routes.
14
- * @param path
15
- * @param args
16
- * @returns {Function}
17
- * @decorator
18
- * @operation
19
- * @httpMethod
20
- */
21
- function All(path = "/", ...args) {
22
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.ALL, path].concat(args));
23
- }
24
- exports.All = All;
25
- /**
26
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
27
- *
28
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
29
- * For example, if you placed the following route at the top of all other route definitions, it would require that
30
- * all routes from that point on would require authentication, and automatically load a user.
31
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
32
- * to continue matching subsequent routes.
33
- * @param path
34
- * @param args
35
- * @returns {Function}
36
- * @decorator
37
- * @operation
38
- * @httpMethod
39
- */
40
- function Get(path = "/", ...args) {
41
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.GET, path].concat(args));
42
- }
43
- exports.Get = Get;
44
- /**
45
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
46
- *
47
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
48
- * For example, if you placed the following route at the top of all other route definitions, it would require that
49
- * all routes from that point on would require authentication, and automatically load a user.
50
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
51
- * to continue matching subsequent routes.
52
- * @param path
53
- * @param args
54
- * @returns {Function}
55
- * @decorator
56
- * @operation
57
- * @httpMethod
58
- */
59
- function Post(path = "/", ...args) {
60
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.POST, path].concat(args));
61
- }
62
- exports.Post = Post;
63
- /**
64
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
65
- *
66
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
67
- * For example, if you placed the following route at the top of all other route definitions, it would require that
68
- * all routes from that point on would require authentication, and automatically load a user.
69
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
70
- * to continue matching subsequent routes.
71
- * @param path
72
- * @param args
73
- * @returns {Function}
74
- * @decorator
75
- * @operation
76
- * @httpMethod
77
- */
78
- function Put(path = "/", ...args) {
79
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.PUT, path].concat(args));
80
- }
81
- exports.Put = Put;
82
- /**
83
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
84
- *
85
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
86
- * For example, if you placed the following route at the top of all other route definitions, it would require that
87
- * all routes from that point on would require authentication, and automatically load a user.
88
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
89
- * to continue matching subsequent routes.
90
- * @param path
91
- * @param args
92
- * @returns {Function}
93
- * @decorator
94
- * @operation
95
- * @httpMethod
96
- */
97
- function Delete(path = "/", ...args) {
98
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.DELETE, path].concat(args));
99
- }
100
- exports.Delete = Delete;
101
- /**
102
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
103
- *
104
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
105
- * For example, if you placed the following route at the top of all other route definitions, it would require that
106
- * all routes from that point on would require authentication, and automatically load a user.
107
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
108
- * to continue matching subsequent routes.
109
- * @param path
110
- * @param args
111
- * @returns {Function}
112
- * @decorator
113
- * @operation
114
- * @httpMethod
115
- */
116
- function Head(path = "/", ...args) {
117
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.HEAD, path].concat(args));
118
- }
119
- exports.Head = Head;
120
- /**
121
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
122
- *
123
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
124
- * For example, if you placed the following route at the top of all other route definitions, it would require that
125
- * all routes from that point on would require authentication, and automatically load a user.
126
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
127
- * to continue matching subsequent routes.
128
- * @param path
129
- * @param args
130
- * @returns {Function}
131
- * @decorator
132
- * @operation
133
- * @httpMethod
134
- */
135
- function Patch(path = "/", ...args) {
136
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.PATCH, path].concat(args));
137
- }
138
- exports.Patch = Patch;
139
- /**
140
- * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
141
- *
142
- * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
143
- * For example, if you placed the following route at the top of all other route definitions, it would require that
144
- * all routes from that point on would require authentication, and automatically load a user.
145
- * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
146
- * to continue matching subsequent routes.
147
- * @param path
148
- * @param args
149
- * @returns {Function}
150
- * @decorator
151
- * @operation
152
- * @httpMethod
153
- */
154
- function Options(path = "/", ...args) {
155
- return (0, operation_js_1.Operation)(...[OperationVerbs_js_1.OperationVerbs.OPTIONS, path].concat(args));
156
- }
157
- exports.Options = Options;
158
- //# sourceMappingURL=route.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../src/decorators/operations/route.ts"],"names":[],"mappings":";;;AAAA,yEAAiE;AACjE,iDAAyC;AAEzC;;;;;;;;;;;;;;GAcG;AACH,SAAgB,GAAG,CAAC,OAAkC,GAAG,EAAE,GAAG,IAAe;IAC3E,OAAO,IAAA,wBAAS,EAAC,GAAG,CAAC,kCAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/D,CAAC;AAFD,kBAEC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,GAAG,CAAC,OAAkC,GAAG,EAAE,GAAG,IAAe;IAC3E,OAAO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MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC;AAFD,sBAEC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,OAAO,CAAC,OAAkC,GAAG,EAAE,GAAG,IAAe;IAC/E,OAAO,IAAA,wBAAS,EAAC,GAAG,CAAC,kCAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,0BAEC"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Security = void 0;
4
- const core_1 = require("@tsed/core");
5
- const jsonEntityFn_js_1 = require("../common/jsonEntityFn.js");
6
- function Security(nameOrSecurity, ...scopes) {
7
- return (0, jsonEntityFn_js_1.JsonEntityFn)((store, args) => {
8
- switch (store.decoratorType) {
9
- case core_1.DecoratorTypes.METHOD:
10
- if (Array.isArray(nameOrSecurity)) {
11
- store.operation.security(nameOrSecurity);
12
- }
13
- else {
14
- store.operation.addSecurityScopes(nameOrSecurity, scopes);
15
- }
16
- break;
17
- case core_1.DecoratorTypes.CLASS:
18
- if (Array.isArray(nameOrSecurity)) {
19
- (0, core_1.decorateMethodsOf)(args[0], Security(nameOrSecurity));
20
- }
21
- else {
22
- (0, core_1.decorateMethodsOf)(args[0], Security(nameOrSecurity, ...scopes));
23
- }
24
- break;
25
- default:
26
- throw new core_1.UnsupportedDecoratorType(Security, args);
27
- }
28
- });
29
- }
30
- exports.Security = Security;
31
- //# sourceMappingURL=security.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"security.js","sourceRoot":"","sources":["../../../../src/decorators/operations/security.ts"],"names":[],"mappings":";;;AAAA,qCAAuF;AACvF,+DAAuD;AA0DvD,SAAgB,QAAQ,CAAC,cAAyC,EAAE,GAAG,MAAgB;IACrF,OAAO,IAAA,8BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,qBAAc,CAAC,MAAM;gBACxB,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;oBACjC,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;iBAC3C;qBAAM;oBACL,KAAK,CAAC,SAAU,CAAC,iBAAiB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;iBAC5D;gBACD,MAAM;YACR,KAAK,qBAAc,CAAC,KAAK;gBACvB,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;oBACjC,IAAA,wBAAiB,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;iBACtD;qBAAM;oBACL,IAAA,wBAAiB,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,cAAc,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;iBACjE;gBACD,MAAM;YAER;gBACE,MAAM,IAAI,+BAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,4BAsBC"}