@opra/common 1.20.0 → 1.22.0

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 (615) hide show
  1. package/README.md +3 -0
  2. package/browser.js +12 -0
  3. package/{esm/document → document}/api-document.js +7 -7
  4. package/{esm/document → document}/common/api-base.js +2 -1
  5. package/{esm/document → document}/common/data-type-map.js +3 -6
  6. package/{esm/document → document}/common/document-init-context.js +4 -3
  7. package/{esm/document → document}/common/document-node.js +4 -0
  8. package/{esm/document → document}/common/opra-document-error.js +1 -1
  9. package/{esm/document → document}/common/value.js +4 -0
  10. package/{esm/document → document}/data-type/api-field.js +1 -0
  11. package/{types/document → document}/data-type/array-type.d.ts +1 -1
  12. package/{esm/document → document}/data-type/complex-type-base.js +3 -0
  13. package/{esm/document → document}/data-type/complex-type.js +1 -0
  14. package/{esm/document → document}/data-type/extended-types/base64.type.js +1 -0
  15. package/{esm/document → document}/data-type/extended-types/date-time-tz.type.js +2 -0
  16. package/{esm/document → document}/data-type/extended-types/date-time.type.js +3 -0
  17. package/{esm/document → document}/data-type/extended-types/date.type.js +3 -0
  18. package/{esm/document → document}/data-type/extended-types/email.type.js +9 -0
  19. package/{esm/document → document}/data-type/extended-types/field-path.type.js +2 -0
  20. package/{esm/document → document}/data-type/extended-types/filter.type.js +2 -0
  21. package/{esm/document → document}/data-type/extended-types/partial-date.type.js +2 -0
  22. package/{esm/document → document}/data-type/extended-types/time.type.js +2 -0
  23. package/{esm/document → document}/data-type/extended-types/uuid.type.js +1 -0
  24. package/{esm/document → document}/data-type/mapped-type.js +4 -0
  25. package/{esm/document → document}/data-type/primitive-types/number.type.js +2 -0
  26. package/{esm/document → document}/data-type/primitive-types/string.type.js +4 -0
  27. package/{esm/document → document}/data-type/simple-type.js +3 -0
  28. package/document/decorators/ws-param.decorator.d.ts +7 -0
  29. package/{esm/document → document}/decorators/ws-param.decorator.js +2 -2
  30. package/{esm/document → document}/factory/api-document.factory.js +1 -3
  31. package/{esm/document → document}/factory/ws-api.factory.js +14 -3
  32. package/{esm/document → document}/http/http-api.js +5 -4
  33. package/{esm/document → document}/http/http-multipart-field.js +3 -0
  34. package/{esm/document → document}/http/http-operation-response.js +3 -0
  35. package/{esm/document → document}/http/http-request-body.js +8 -1
  36. package/{esm/document → document}/http/http-status-range.js +2 -2
  37. package/{esm/document → document}/mq/mq-api.js +5 -4
  38. package/{esm/document → document}/mq/mq-operation-response.js +7 -1
  39. package/{esm/document → document}/ws/ws-api.js +4 -4
  40. package/{types/document → document}/ws/ws-operation.d.ts +15 -3
  41. package/{esm/document → document}/ws/ws-operation.js +10 -2
  42. package/{esm/exception → exception}/http-errors/bad-request.error.js +1 -4
  43. package/{esm/exception → exception}/http-errors/conflict.error.js +1 -4
  44. package/{esm/exception → exception}/http-errors/failed-dependency.error.js +1 -4
  45. package/{esm/exception → exception}/http-errors/forbidden.error.js +1 -4
  46. package/{esm/exception → exception}/http-errors/internal-server.error.js +1 -4
  47. package/{esm/exception → exception}/http-errors/method-not-allowed.error.js +1 -4
  48. package/{esm/exception → exception}/http-errors/not-acceptable.error.js +1 -4
  49. package/{esm/exception → exception}/http-errors/not-found.error.js +1 -4
  50. package/{esm/exception → exception}/http-errors/resource-conflict.error.js +1 -1
  51. package/{esm/exception → exception}/http-errors/unauthorized.error.js +1 -4
  52. package/{esm/exception → exception}/http-errors/unprocessable-entity.error.js +1 -4
  53. package/{esm/exception → exception}/opra-exception.js +5 -1
  54. package/{esm/exception → exception}/opra-http-error.js +1 -0
  55. package/filter/antlr/OpraFilterLexer.js +425 -0
  56. package/filter/antlr/OpraFilterListener.js +302 -0
  57. package/{esm/filter → filter}/antlr/OpraFilterParser.js +218 -214
  58. package/filter/antlr/OpraFilterVisitor.js +185 -0
  59. package/{esm/filter → filter}/ast/abstract/ast.js +1 -0
  60. package/{esm/filter → filter}/ast/expressions/arithmetic-expression.js +3 -1
  61. package/{esm/filter → filter}/ast/expressions/array-expression.js +1 -0
  62. package/{esm/filter → filter}/ast/expressions/comparison-expression.js +4 -0
  63. package/{esm/filter → filter}/ast/expressions/logical-expression.js +2 -0
  64. package/{esm/filter → filter}/ast/expressions/negative-expression.js +1 -0
  65. package/{esm/filter → filter}/ast/expressions/parenthesized-expression.js +1 -0
  66. package/{esm/filter → filter}/ast/terms/date-literal.js +1 -0
  67. package/{esm/filter → filter}/ast/terms/date-time-literal.js +1 -0
  68. package/{esm/filter → filter}/ast/terms/null-literal.js +1 -1
  69. package/{esm/filter → filter}/ast/terms/number-literal.js +1 -0
  70. package/{esm/filter → filter}/ast/terms/time-literal.js +1 -0
  71. package/{esm/filter → filter}/filter-rules.js +2 -2
  72. package/{esm/filter → filter}/filter-tree-visitor.js +1 -0
  73. package/{esm/filter → filter}/opra-error-listener.js +1 -0
  74. package/{esm/helpers → helpers}/parse-fields-projection.js +2 -0
  75. package/package.json +15 -35
  76. package/{types/schema → schema}/ws/ws-api.interface.d.ts +4 -0
  77. package/browser/index.cjs +0 -12
  78. package/browser/index.mjs +0 -12
  79. package/cjs/document/api-document.js +0 -182
  80. package/cjs/document/common/api-base.js +0 -31
  81. package/cjs/document/common/data-type-map.js +0 -77
  82. package/cjs/document/common/document-element.js +0 -34
  83. package/cjs/document/common/document-init-context.js +0 -69
  84. package/cjs/document/common/document-node.js +0 -145
  85. package/cjs/document/common/opra-document-error.js +0 -15
  86. package/cjs/document/common/value.js +0 -39
  87. package/cjs/document/constants.js +0 -18
  88. package/cjs/document/data-type/api-field.js +0 -124
  89. package/cjs/document/data-type/array-type.js +0 -78
  90. package/cjs/document/data-type/complex-type-base.js +0 -346
  91. package/cjs/document/data-type/complex-type.js +0 -127
  92. package/cjs/document/data-type/data-type.js +0 -67
  93. package/cjs/document/data-type/enum-type.js +0 -128
  94. package/cjs/document/data-type/extended-types/base64.type.js +0 -49
  95. package/cjs/document/data-type/extended-types/date-time-tz.type.js +0 -63
  96. package/cjs/document/data-type/extended-types/date-time.type.js +0 -76
  97. package/cjs/document/data-type/extended-types/date.type.js +0 -74
  98. package/cjs/document/data-type/extended-types/email.type.js +0 -95
  99. package/cjs/document/data-type/extended-types/field-path.type.js +0 -65
  100. package/cjs/document/data-type/extended-types/filter.type.js +0 -88
  101. package/cjs/document/data-type/extended-types/index.js +0 -16
  102. package/cjs/document/data-type/extended-types/object-id.type.js +0 -31
  103. package/cjs/document/data-type/extended-types/operation-result.type.js +0 -67
  104. package/cjs/document/data-type/extended-types/partial-date.type.js +0 -85
  105. package/cjs/document/data-type/extended-types/time.type.js +0 -55
  106. package/cjs/document/data-type/extended-types/url.type.js +0 -31
  107. package/cjs/document/data-type/extended-types/uuid.type.js +0 -37
  108. package/cjs/document/data-type/mapped-type.js +0 -120
  109. package/cjs/document/data-type/mixin-type.js +0 -123
  110. package/cjs/document/data-type/omit-type.js +0 -10
  111. package/cjs/document/data-type/partial-type.js +0 -12
  112. package/cjs/document/data-type/pick-type.js +0 -10
  113. package/cjs/document/data-type/primitive-types/any.type.js +0 -27
  114. package/cjs/document/data-type/primitive-types/bigint.type.js +0 -38
  115. package/cjs/document/data-type/primitive-types/boolean.type.js +0 -31
  116. package/cjs/document/data-type/primitive-types/index.js +0 -11
  117. package/cjs/document/data-type/primitive-types/integer.type.js +0 -38
  118. package/cjs/document/data-type/primitive-types/null.type.js +0 -31
  119. package/cjs/document/data-type/primitive-types/number.type.js +0 -50
  120. package/cjs/document/data-type/primitive-types/object.type.js +0 -20
  121. package/cjs/document/data-type/primitive-types/string.type.js +0 -70
  122. package/cjs/document/data-type/required-type.js +0 -12
  123. package/cjs/document/data-type/simple-type.js +0 -133
  124. package/cjs/document/data-type/union-type.js +0 -84
  125. package/cjs/document/data-type/utils/create-mapped-class.js +0 -56
  126. package/cjs/document/data-type/utils/get-is-inherited-predicate-fn.js +0 -14
  127. package/cjs/document/decorators/api-field-decorator.js +0 -50
  128. package/cjs/document/decorators/complex-type.decorator.js +0 -31
  129. package/cjs/document/decorators/http-controller.decorator.js +0 -145
  130. package/cjs/document/decorators/http-operation-entity-create.decorator.js +0 -58
  131. package/cjs/document/decorators/http-operation-entity-delete-many.decorator.js +0 -41
  132. package/cjs/document/decorators/http-operation-entity-delete.decorator.js +0 -41
  133. package/cjs/document/decorators/http-operation-entity-find-many.decorator.js +0 -85
  134. package/cjs/document/decorators/http-operation-entity-get.decorator.js +0 -56
  135. package/cjs/document/decorators/http-operation-entity-replace.decorator.js +0 -56
  136. package/cjs/document/decorators/http-operation-entity-update-many.decorator.js +0 -50
  137. package/cjs/document/decorators/http-operation-entity-update.decorator.js +0 -66
  138. package/cjs/document/decorators/http-operation-entity.decorator.js +0 -143
  139. package/cjs/document/decorators/http-operation.decorator.js +0 -213
  140. package/cjs/document/decorators/mq-controller.decorator.js +0 -67
  141. package/cjs/document/decorators/mq-operation.decorator.js +0 -82
  142. package/cjs/document/decorators/simple-type.decorator.js +0 -67
  143. package/cjs/document/decorators/ws-controller.decorator.js +0 -51
  144. package/cjs/document/decorators/ws-operation.decorator.js +0 -42
  145. package/cjs/document/decorators/ws-param.decorator.js +0 -22
  146. package/cjs/document/factory/api-document.factory.js +0 -192
  147. package/cjs/document/factory/data-type.factory.js +0 -647
  148. package/cjs/document/factory/http-api.factory.js +0 -302
  149. package/cjs/document/factory/mq-api.factory.js +0 -203
  150. package/cjs/document/factory/ws-api.factory.js +0 -145
  151. package/cjs/document/http/http-api.js +0 -40
  152. package/cjs/document/http/http-controller.js +0 -159
  153. package/cjs/document/http/http-media-type.js +0 -104
  154. package/cjs/document/http/http-multipart-field.js +0 -32
  155. package/cjs/document/http/http-operation-response.js +0 -47
  156. package/cjs/document/http/http-operation.js +0 -126
  157. package/cjs/document/http/http-parameter.js +0 -57
  158. package/cjs/document/http/http-request-body.js +0 -27
  159. package/cjs/document/http/http-status-range.js +0 -45
  160. package/cjs/document/index.js +0 -70
  161. package/cjs/document/mq/mq-api.js +0 -54
  162. package/cjs/document/mq/mq-controller.js +0 -101
  163. package/cjs/document/mq/mq-header.js +0 -48
  164. package/cjs/document/mq/mq-operation-response.js +0 -66
  165. package/cjs/document/mq/mq-operation.js +0 -101
  166. package/cjs/document/utils/inspect.util.js +0 -7
  167. package/cjs/document/utils/parse-regexp.util.js +0 -21
  168. package/cjs/document/utils/string-compare.util.js +0 -10
  169. package/cjs/document/utils/test-scope-match.js +0 -15
  170. package/cjs/document/ws/ws-api.js +0 -52
  171. package/cjs/document/ws/ws-controller.js +0 -78
  172. package/cjs/document/ws/ws-operation.js +0 -64
  173. package/cjs/enums/http-headers-codes.enum.js +0 -411
  174. package/cjs/enums/http-status-codes.enum.js +0 -300
  175. package/cjs/enums/http-status-messages.js +0 -68
  176. package/cjs/enums/index.js +0 -7
  177. package/cjs/enums/mime-types.enum.js +0 -17
  178. package/cjs/exception/error-issue.js +0 -2
  179. package/cjs/exception/http-errors/bad-request.error.js +0 -23
  180. package/cjs/exception/http-errors/conflict.error.js +0 -22
  181. package/cjs/exception/http-errors/failed-dependency.error.js +0 -22
  182. package/cjs/exception/http-errors/forbidden.error.js +0 -25
  183. package/cjs/exception/http-errors/internal-server.error.js +0 -23
  184. package/cjs/exception/http-errors/method-not-allowed.error.js +0 -23
  185. package/cjs/exception/http-errors/not-acceptable.error.js +0 -23
  186. package/cjs/exception/http-errors/not-found.error.js +0 -26
  187. package/cjs/exception/http-errors/permission.error.js +0 -20
  188. package/cjs/exception/http-errors/resource-conflict.error.js +0 -19
  189. package/cjs/exception/http-errors/resource-not.available.error.js +0 -23
  190. package/cjs/exception/http-errors/unauthorized.error.js +0 -23
  191. package/cjs/exception/http-errors/unprocessable-entity.error.js +0 -23
  192. package/cjs/exception/index.js +0 -20
  193. package/cjs/exception/issue-severity.enum.js +0 -23
  194. package/cjs/exception/opra-exception.js +0 -70
  195. package/cjs/exception/opra-http-error.js +0 -25
  196. package/cjs/filter/antlr/OpraFilterLexer.js +0 -427
  197. package/cjs/filter/antlr/OpraFilterListener.js +0 -11
  198. package/cjs/filter/antlr/OpraFilterParser.js +0 -1851
  199. package/cjs/filter/antlr/OpraFilterVisitor.js +0 -14
  200. package/cjs/filter/ast/abstract/ast.js +0 -9
  201. package/cjs/filter/ast/abstract/expression.js +0 -7
  202. package/cjs/filter/ast/abstract/literal.js +0 -14
  203. package/cjs/filter/ast/abstract/term.js +0 -7
  204. package/cjs/filter/ast/expressions/arithmetic-expression.js +0 -29
  205. package/cjs/filter/ast/expressions/array-expression.js +0 -14
  206. package/cjs/filter/ast/expressions/comparison-expression.js +0 -15
  207. package/cjs/filter/ast/expressions/logical-expression.js +0 -18
  208. package/cjs/filter/ast/expressions/negative-expression.js +0 -14
  209. package/cjs/filter/ast/expressions/parenthesized-expression.js +0 -14
  210. package/cjs/filter/ast/index.js +0 -21
  211. package/cjs/filter/ast/terms/boolean-literal.js +0 -10
  212. package/cjs/filter/ast/terms/date-literal.js +0 -28
  213. package/cjs/filter/ast/terms/date-time-literal.js +0 -27
  214. package/cjs/filter/ast/terms/external-constant.js +0 -13
  215. package/cjs/filter/ast/terms/null-literal.js +0 -11
  216. package/cjs/filter/ast/terms/number-literal.js +0 -39
  217. package/cjs/filter/ast/terms/qualified-identifier.js +0 -10
  218. package/cjs/filter/ast/terms/string-literal.js +0 -14
  219. package/cjs/filter/ast/terms/time-literal.js +0 -34
  220. package/cjs/filter/build.js +0 -126
  221. package/cjs/filter/errors.js +0 -21
  222. package/cjs/filter/filter-rules.js +0 -150
  223. package/cjs/filter/filter-tree-visitor.js +0 -97
  224. package/cjs/filter/index.js +0 -5
  225. package/cjs/filter/opra-error-listener.js +0 -21
  226. package/cjs/filter/opra-filter.ns.js +0 -8
  227. package/cjs/filter/parse.js +0 -38
  228. package/cjs/filter/utils.js +0 -25
  229. package/cjs/helpers/function-utils.js +0 -15
  230. package/cjs/helpers/get-stack-filename.js +0 -51
  231. package/cjs/helpers/index.js +0 -12
  232. package/cjs/helpers/mixin-utils.js +0 -35
  233. package/cjs/helpers/object-utils.js +0 -19
  234. package/cjs/helpers/parse-fields-projection.js +0 -67
  235. package/cjs/helpers/responsive-map.js +0 -155
  236. package/cjs/helpers/safe-json-stringify.js +0 -16
  237. package/cjs/helpers/type-guards.js +0 -46
  238. package/cjs/i18n/i18n.js +0 -139
  239. package/cjs/i18n/index.js +0 -10
  240. package/cjs/i18n/string-utils.js +0 -12
  241. package/cjs/i18n/translate.js +0 -16
  242. package/cjs/index.js +0 -14
  243. package/cjs/package.json +0 -3
  244. package/cjs/polifils/array-find-last.js +0 -22
  245. package/cjs/schema/api-document.interface.js +0 -2
  246. package/cjs/schema/api.interface.js +0 -2
  247. package/cjs/schema/constants.js +0 -4
  248. package/cjs/schema/data-type/array-type.interface.js +0 -7
  249. package/cjs/schema/data-type/complex-type.interface.js +0 -7
  250. package/cjs/schema/data-type/data-type.interface.js +0 -2
  251. package/cjs/schema/data-type/enum-type.interface.js +0 -7
  252. package/cjs/schema/data-type/field.interface.js +0 -2
  253. package/cjs/schema/data-type/mapped-type.interface.js +0 -7
  254. package/cjs/schema/data-type/mixin-type.interface.js +0 -7
  255. package/cjs/schema/data-type/simple-type.interface.js +0 -7
  256. package/cjs/schema/data-type/union-type.interface.js +0 -7
  257. package/cjs/schema/data-type-container.interface.js +0 -2
  258. package/cjs/schema/http/http-api.interface.js +0 -2
  259. package/cjs/schema/http/http-controller.interface.js +0 -11
  260. package/cjs/schema/http/http-media-type.interface.js +0 -2
  261. package/cjs/schema/http/http-multipart-field.interface.js +0 -2
  262. package/cjs/schema/http/http-operation-response.interface.js +0 -2
  263. package/cjs/schema/http/http-operation.interface.js +0 -7
  264. package/cjs/schema/http/http-parameter.interface.js +0 -2
  265. package/cjs/schema/http/http-request-body.interface.js +0 -2
  266. package/cjs/schema/http/http-status-range.interface.js +0 -2
  267. package/cjs/schema/index.js +0 -6
  268. package/cjs/schema/mq/mq-api.interface.js +0 -2
  269. package/cjs/schema/mq/mq-controller.interface.js +0 -11
  270. package/cjs/schema/mq/mq-header.interface.js +0 -2
  271. package/cjs/schema/mq/mq-operation.interface.js +0 -7
  272. package/cjs/schema/opra-schema.js +0 -35
  273. package/cjs/schema/type-guards.js +0 -54
  274. package/cjs/schema/types.js +0 -2
  275. package/cjs/schema/value.interface.js +0 -2
  276. package/cjs/schema/ws/ws-api.interface.js +0 -2
  277. package/cjs/schema/ws/ws-controller.interface.js +0 -11
  278. package/cjs/schema/ws/ws-operation.interface.js +0 -7
  279. package/cjs/types.js +0 -2
  280. package/esm/filter/antlr/OpraFilterLexer.js +0 -425
  281. package/esm/filter/antlr/OpraFilterListener.js +0 -8
  282. package/esm/filter/antlr/OpraFilterVisitor.js +0 -11
  283. package/esm/helpers/monkey-patches.js +0 -14
  284. package/esm/package.json +0 -3
  285. package/types/document/decorators/ws-param.decorator.d.ts +0 -2
  286. package/types/index.d.cts +0 -9
  287. /package/{types/document → document}/api-document.d.ts +0 -0
  288. /package/{types/document → document}/common/api-base.d.ts +0 -0
  289. /package/{types/document → document}/common/data-type-map.d.ts +0 -0
  290. /package/{types/document → document}/common/document-element.d.ts +0 -0
  291. /package/{esm/document → document}/common/document-element.js +0 -0
  292. /package/{types/document → document}/common/document-init-context.d.ts +0 -0
  293. /package/{types/document → document}/common/document-node.d.ts +0 -0
  294. /package/{types/document → document}/common/opra-document-error.d.ts +0 -0
  295. /package/{types/document → document}/common/value.d.ts +0 -0
  296. /package/{types/document → document}/constants.d.ts +0 -0
  297. /package/{esm/document → document}/constants.js +0 -0
  298. /package/{types/document → document}/data-type/api-field.d.ts +0 -0
  299. /package/{esm/document → document}/data-type/array-type.js +0 -0
  300. /package/{types/document → document}/data-type/complex-type-base.d.ts +0 -0
  301. /package/{types/document → document}/data-type/complex-type.d.ts +0 -0
  302. /package/{types/document → document}/data-type/data-type.d.ts +0 -0
  303. /package/{esm/document → document}/data-type/data-type.js +0 -0
  304. /package/{types/document → document}/data-type/enum-type.d.ts +0 -0
  305. /package/{esm/document → document}/data-type/enum-type.js +0 -0
  306. /package/{types/document → document}/data-type/extended-types/base64.type.d.ts +0 -0
  307. /package/{types/document → document}/data-type/extended-types/date-time-tz.type.d.ts +0 -0
  308. /package/{types/document → document}/data-type/extended-types/date-time.type.d.ts +0 -0
  309. /package/{types/document → document}/data-type/extended-types/date.type.d.ts +0 -0
  310. /package/{types/document → document}/data-type/extended-types/email.type.d.ts +0 -0
  311. /package/{types/document → document}/data-type/extended-types/field-path.type.d.ts +0 -0
  312. /package/{types/document → document}/data-type/extended-types/filter.type.d.ts +0 -0
  313. /package/{types/document → document}/data-type/extended-types/index.d.ts +0 -0
  314. /package/{esm/document → document}/data-type/extended-types/index.js +0 -0
  315. /package/{types/document → document}/data-type/extended-types/object-id.type.d.ts +0 -0
  316. /package/{esm/document → document}/data-type/extended-types/object-id.type.js +0 -0
  317. /package/{types/document → document}/data-type/extended-types/operation-result.type.d.ts +0 -0
  318. /package/{esm/document → document}/data-type/extended-types/operation-result.type.js +0 -0
  319. /package/{types/document → document}/data-type/extended-types/partial-date.type.d.ts +0 -0
  320. /package/{types/document → document}/data-type/extended-types/time.type.d.ts +0 -0
  321. /package/{types/document → document}/data-type/extended-types/url.type.d.ts +0 -0
  322. /package/{esm/document → document}/data-type/extended-types/url.type.js +0 -0
  323. /package/{types/document → document}/data-type/extended-types/uuid.type.d.ts +0 -0
  324. /package/{types/document → document}/data-type/mapped-type.d.ts +0 -0
  325. /package/{types/document → document}/data-type/mixin-type.d.ts +0 -0
  326. /package/{esm/document → document}/data-type/mixin-type.js +0 -0
  327. /package/{types/document → document}/data-type/omit-type.d.ts +0 -0
  328. /package/{esm/document → document}/data-type/omit-type.js +0 -0
  329. /package/{types/document → document}/data-type/partial-type.d.ts +0 -0
  330. /package/{esm/document → document}/data-type/partial-type.js +0 -0
  331. /package/{types/document → document}/data-type/pick-type.d.ts +0 -0
  332. /package/{esm/document → document}/data-type/pick-type.js +0 -0
  333. /package/{types/document → document}/data-type/primitive-types/any.type.d.ts +0 -0
  334. /package/{esm/document → document}/data-type/primitive-types/any.type.js +0 -0
  335. /package/{types/document → document}/data-type/primitive-types/bigint.type.d.ts +0 -0
  336. /package/{esm/document → document}/data-type/primitive-types/bigint.type.js +0 -0
  337. /package/{types/document → document}/data-type/primitive-types/boolean.type.d.ts +0 -0
  338. /package/{esm/document → document}/data-type/primitive-types/boolean.type.js +0 -0
  339. /package/{types/document → document}/data-type/primitive-types/index.d.ts +0 -0
  340. /package/{esm/document → document}/data-type/primitive-types/index.js +0 -0
  341. /package/{types/document → document}/data-type/primitive-types/integer.type.d.ts +0 -0
  342. /package/{esm/document → document}/data-type/primitive-types/integer.type.js +0 -0
  343. /package/{types/document → document}/data-type/primitive-types/null.type.d.ts +0 -0
  344. /package/{esm/document → document}/data-type/primitive-types/null.type.js +0 -0
  345. /package/{types/document → document}/data-type/primitive-types/number.type.d.ts +0 -0
  346. /package/{types/document → document}/data-type/primitive-types/object.type.d.ts +0 -0
  347. /package/{esm/document → document}/data-type/primitive-types/object.type.js +0 -0
  348. /package/{types/document → document}/data-type/primitive-types/string.type.d.ts +0 -0
  349. /package/{types/document → document}/data-type/required-type.d.ts +0 -0
  350. /package/{esm/document → document}/data-type/required-type.js +0 -0
  351. /package/{types/document → document}/data-type/simple-type.d.ts +0 -0
  352. /package/{types/document → document}/data-type/union-type.d.ts +0 -0
  353. /package/{esm/document → document}/data-type/union-type.js +0 -0
  354. /package/{types/document → document}/data-type/utils/create-mapped-class.d.ts +0 -0
  355. /package/{esm/document → document}/data-type/utils/create-mapped-class.js +0 -0
  356. /package/{types/document → document}/data-type/utils/get-is-inherited-predicate-fn.d.ts +0 -0
  357. /package/{esm/document → document}/data-type/utils/get-is-inherited-predicate-fn.js +0 -0
  358. /package/{types/document → document}/decorators/api-field-decorator.d.ts +0 -0
  359. /package/{esm/document → document}/decorators/api-field-decorator.js +0 -0
  360. /package/{types/document → document}/decorators/complex-type.decorator.d.ts +0 -0
  361. /package/{esm/document → document}/decorators/complex-type.decorator.js +0 -0
  362. /package/{types/document → document}/decorators/http-controller.decorator.d.ts +0 -0
  363. /package/{esm/document → document}/decorators/http-controller.decorator.js +0 -0
  364. /package/{types/document → document}/decorators/http-operation-entity-create.decorator.d.ts +0 -0
  365. /package/{esm/document → document}/decorators/http-operation-entity-create.decorator.js +0 -0
  366. /package/{types/document → document}/decorators/http-operation-entity-delete-many.decorator.d.ts +0 -0
  367. /package/{esm/document → document}/decorators/http-operation-entity-delete-many.decorator.js +0 -0
  368. /package/{types/document → document}/decorators/http-operation-entity-delete.decorator.d.ts +0 -0
  369. /package/{esm/document → document}/decorators/http-operation-entity-delete.decorator.js +0 -0
  370. /package/{types/document → document}/decorators/http-operation-entity-find-many.decorator.d.ts +0 -0
  371. /package/{esm/document → document}/decorators/http-operation-entity-find-many.decorator.js +0 -0
  372. /package/{types/document → document}/decorators/http-operation-entity-get.decorator.d.ts +0 -0
  373. /package/{esm/document → document}/decorators/http-operation-entity-get.decorator.js +0 -0
  374. /package/{types/document → document}/decorators/http-operation-entity-replace.decorator.d.ts +0 -0
  375. /package/{esm/document → document}/decorators/http-operation-entity-replace.decorator.js +0 -0
  376. /package/{types/document → document}/decorators/http-operation-entity-update-many.decorator.d.ts +0 -0
  377. /package/{esm/document → document}/decorators/http-operation-entity-update-many.decorator.js +0 -0
  378. /package/{types/document → document}/decorators/http-operation-entity-update.decorator.d.ts +0 -0
  379. /package/{esm/document → document}/decorators/http-operation-entity-update.decorator.js +0 -0
  380. /package/{types/document → document}/decorators/http-operation-entity.decorator.d.ts +0 -0
  381. /package/{esm/document → document}/decorators/http-operation-entity.decorator.js +0 -0
  382. /package/{types/document → document}/decorators/http-operation.decorator.d.ts +0 -0
  383. /package/{esm/document → document}/decorators/http-operation.decorator.js +0 -0
  384. /package/{types/document → document}/decorators/mq-controller.decorator.d.ts +0 -0
  385. /package/{esm/document → document}/decorators/mq-controller.decorator.js +0 -0
  386. /package/{types/document → document}/decorators/mq-operation.decorator.d.ts +0 -0
  387. /package/{esm/document → document}/decorators/mq-operation.decorator.js +0 -0
  388. /package/{types/document → document}/decorators/simple-type.decorator.d.ts +0 -0
  389. /package/{esm/document → document}/decorators/simple-type.decorator.js +0 -0
  390. /package/{types/document → document}/decorators/ws-controller.decorator.d.ts +0 -0
  391. /package/{esm/document → document}/decorators/ws-controller.decorator.js +0 -0
  392. /package/{types/document → document}/decorators/ws-operation.decorator.d.ts +0 -0
  393. /package/{esm/document → document}/decorators/ws-operation.decorator.js +0 -0
  394. /package/{types/document → document}/factory/api-document.factory.d.ts +0 -0
  395. /package/{types/document → document}/factory/data-type.factory.d.ts +0 -0
  396. /package/{esm/document → document}/factory/data-type.factory.js +0 -0
  397. /package/{types/document → document}/factory/http-api.factory.d.ts +0 -0
  398. /package/{esm/document → document}/factory/http-api.factory.js +0 -0
  399. /package/{types/document → document}/factory/mq-api.factory.d.ts +0 -0
  400. /package/{esm/document → document}/factory/mq-api.factory.js +0 -0
  401. /package/{types/document → document}/factory/ws-api.factory.d.ts +0 -0
  402. /package/{types/document → document}/http/http-api.d.ts +0 -0
  403. /package/{types/document → document}/http/http-controller.d.ts +0 -0
  404. /package/{esm/document → document}/http/http-controller.js +0 -0
  405. /package/{types/document → document}/http/http-media-type.d.ts +0 -0
  406. /package/{esm/document → document}/http/http-media-type.js +0 -0
  407. /package/{types/document → document}/http/http-multipart-field.d.ts +0 -0
  408. /package/{types/document → document}/http/http-operation-response.d.ts +0 -0
  409. /package/{types/document → document}/http/http-operation.d.ts +0 -0
  410. /package/{esm/document → document}/http/http-operation.js +0 -0
  411. /package/{types/document → document}/http/http-parameter.d.ts +0 -0
  412. /package/{esm/document → document}/http/http-parameter.js +0 -0
  413. /package/{types/document → document}/http/http-request-body.d.ts +0 -0
  414. /package/{types/document → document}/http/http-status-range.d.ts +0 -0
  415. /package/{types/document → document}/index.d.ts +0 -0
  416. /package/{esm/document → document}/index.js +0 -0
  417. /package/{types/document → document}/mq/mq-api.d.ts +0 -0
  418. /package/{types/document → document}/mq/mq-controller.d.ts +0 -0
  419. /package/{esm/document → document}/mq/mq-controller.js +0 -0
  420. /package/{types/document → document}/mq/mq-header.d.ts +0 -0
  421. /package/{esm/document → document}/mq/mq-header.js +0 -0
  422. /package/{types/document → document}/mq/mq-operation-response.d.ts +0 -0
  423. /package/{types/document → document}/mq/mq-operation.d.ts +0 -0
  424. /package/{esm/document → document}/mq/mq-operation.js +0 -0
  425. /package/{types/document → document}/utils/inspect.util.d.ts +0 -0
  426. /package/{esm/document → document}/utils/inspect.util.js +0 -0
  427. /package/{types/document → document}/utils/parse-regexp.util.d.ts +0 -0
  428. /package/{esm/document → document}/utils/parse-regexp.util.js +0 -0
  429. /package/{types/document → document}/utils/string-compare.util.d.ts +0 -0
  430. /package/{esm/document → document}/utils/string-compare.util.js +0 -0
  431. /package/{types/document → document}/utils/test-scope-match.d.ts +0 -0
  432. /package/{esm/document → document}/utils/test-scope-match.js +0 -0
  433. /package/{types/document → document}/ws/ws-api.d.ts +0 -0
  434. /package/{types/document → document}/ws/ws-controller.d.ts +0 -0
  435. /package/{esm/document → document}/ws/ws-controller.js +0 -0
  436. /package/{types/enums → enums}/http-headers-codes.enum.d.ts +0 -0
  437. /package/{esm/enums → enums}/http-headers-codes.enum.js +0 -0
  438. /package/{types/enums → enums}/http-status-codes.enum.d.ts +0 -0
  439. /package/{esm/enums → enums}/http-status-codes.enum.js +0 -0
  440. /package/{types/enums → enums}/http-status-messages.d.ts +0 -0
  441. /package/{esm/enums → enums}/http-status-messages.js +0 -0
  442. /package/{types/enums → enums}/index.d.ts +0 -0
  443. /package/{esm/enums → enums}/index.js +0 -0
  444. /package/{types/enums → enums}/mime-types.enum.d.ts +0 -0
  445. /package/{esm/enums → enums}/mime-types.enum.js +0 -0
  446. /package/{types/exception → exception}/error-issue.d.ts +0 -0
  447. /package/{esm/exception → exception}/error-issue.js +0 -0
  448. /package/{types/exception → exception}/http-errors/bad-request.error.d.ts +0 -0
  449. /package/{types/exception → exception}/http-errors/conflict.error.d.ts +0 -0
  450. /package/{types/exception → exception}/http-errors/failed-dependency.error.d.ts +0 -0
  451. /package/{types/exception → exception}/http-errors/forbidden.error.d.ts +0 -0
  452. /package/{types/exception → exception}/http-errors/internal-server.error.d.ts +0 -0
  453. /package/{types/exception → exception}/http-errors/method-not-allowed.error.d.ts +0 -0
  454. /package/{types/exception → exception}/http-errors/not-acceptable.error.d.ts +0 -0
  455. /package/{types/exception → exception}/http-errors/not-found.error.d.ts +0 -0
  456. /package/{types/exception → exception}/http-errors/permission.error.d.ts +0 -0
  457. /package/{esm/exception → exception}/http-errors/permission.error.js +0 -0
  458. /package/{types/exception → exception}/http-errors/resource-conflict.error.d.ts +0 -0
  459. /package/{types/exception → exception}/http-errors/resource-not.available.error.d.ts +0 -0
  460. /package/{esm/exception → exception}/http-errors/resource-not.available.error.js +0 -0
  461. /package/{types/exception → exception}/http-errors/unauthorized.error.d.ts +0 -0
  462. /package/{types/exception → exception}/http-errors/unprocessable-entity.error.d.ts +0 -0
  463. /package/{types/exception → exception}/index.d.ts +0 -0
  464. /package/{esm/exception → exception}/index.js +0 -0
  465. /package/{types/exception → exception}/issue-severity.enum.d.ts +0 -0
  466. /package/{esm/exception → exception}/issue-severity.enum.js +0 -0
  467. /package/{types/exception → exception}/opra-exception.d.ts +0 -0
  468. /package/{types/exception → exception}/opra-http-error.d.ts +0 -0
  469. /package/{types/filter → filter}/antlr/OpraFilterLexer.d.ts +0 -0
  470. /package/{types/filter → filter}/antlr/OpraFilterListener.d.ts +0 -0
  471. /package/{types/filter → filter}/antlr/OpraFilterParser.d.ts +0 -0
  472. /package/{types/filter → filter}/antlr/OpraFilterVisitor.d.ts +0 -0
  473. /package/{types/filter → filter}/ast/abstract/ast.d.ts +0 -0
  474. /package/{types/filter → filter}/ast/abstract/expression.d.ts +0 -0
  475. /package/{esm/filter → filter}/ast/abstract/expression.js +0 -0
  476. /package/{types/filter → filter}/ast/abstract/literal.d.ts +0 -0
  477. /package/{esm/filter → filter}/ast/abstract/literal.js +0 -0
  478. /package/{types/filter → filter}/ast/abstract/term.d.ts +0 -0
  479. /package/{esm/filter → filter}/ast/abstract/term.js +0 -0
  480. /package/{types/filter → filter}/ast/expressions/arithmetic-expression.d.ts +0 -0
  481. /package/{types/filter → filter}/ast/expressions/array-expression.d.ts +0 -0
  482. /package/{types/filter → filter}/ast/expressions/comparison-expression.d.ts +0 -0
  483. /package/{types/filter → filter}/ast/expressions/logical-expression.d.ts +0 -0
  484. /package/{types/filter → filter}/ast/expressions/negative-expression.d.ts +0 -0
  485. /package/{types/filter → filter}/ast/expressions/parenthesized-expression.d.ts +0 -0
  486. /package/{types/filter → filter}/ast/index.d.ts +0 -0
  487. /package/{esm/filter → filter}/ast/index.js +0 -0
  488. /package/{types/filter → filter}/ast/terms/boolean-literal.d.ts +0 -0
  489. /package/{esm/filter → filter}/ast/terms/boolean-literal.js +0 -0
  490. /package/{types/filter → filter}/ast/terms/date-literal.d.ts +0 -0
  491. /package/{types/filter → filter}/ast/terms/date-time-literal.d.ts +0 -0
  492. /package/{types/filter → filter}/ast/terms/external-constant.d.ts +0 -0
  493. /package/{esm/filter → filter}/ast/terms/external-constant.js +0 -0
  494. /package/{types/filter → filter}/ast/terms/null-literal.d.ts +0 -0
  495. /package/{types/filter → filter}/ast/terms/number-literal.d.ts +0 -0
  496. /package/{types/filter → filter}/ast/terms/qualified-identifier.d.ts +0 -0
  497. /package/{esm/filter → filter}/ast/terms/qualified-identifier.js +0 -0
  498. /package/{types/filter → filter}/ast/terms/string-literal.d.ts +0 -0
  499. /package/{esm/filter → filter}/ast/terms/string-literal.js +0 -0
  500. /package/{types/filter → filter}/ast/terms/time-literal.d.ts +0 -0
  501. /package/{types/filter → filter}/build.d.ts +0 -0
  502. /package/{esm/filter → filter}/build.js +0 -0
  503. /package/{types/filter → filter}/errors.d.ts +0 -0
  504. /package/{esm/filter → filter}/errors.js +0 -0
  505. /package/{types/filter → filter}/filter-rules.d.ts +0 -0
  506. /package/{types/filter → filter}/filter-tree-visitor.d.ts +0 -0
  507. /package/{types/filter → filter}/index.d.ts +0 -0
  508. /package/{esm/filter → filter}/index.js +0 -0
  509. /package/{types/filter → filter}/opra-error-listener.d.ts +0 -0
  510. /package/{types/filter → filter}/opra-filter.ns.d.ts +0 -0
  511. /package/{esm/filter → filter}/opra-filter.ns.js +0 -0
  512. /package/{types/filter → filter}/parse.d.ts +0 -0
  513. /package/{esm/filter → filter}/parse.js +0 -0
  514. /package/{types/filter → filter}/utils.d.ts +0 -0
  515. /package/{esm/filter → filter}/utils.js +0 -0
  516. /package/{types/helpers → helpers}/function-utils.d.ts +0 -0
  517. /package/{esm/helpers → helpers}/function-utils.js +0 -0
  518. /package/{types/helpers → helpers}/get-stack-filename.d.ts +0 -0
  519. /package/{esm/helpers → helpers}/get-stack-filename.js +0 -0
  520. /package/{types/helpers → helpers}/index.d.ts +0 -0
  521. /package/{esm/helpers → helpers}/index.js +0 -0
  522. /package/{types/helpers → helpers}/mixin-utils.d.ts +0 -0
  523. /package/{esm/helpers → helpers}/mixin-utils.js +0 -0
  524. /package/{types/helpers → helpers}/monkey-patches.d.ts +0 -0
  525. /package/{cjs/helpers → helpers}/monkey-patches.js +0 -0
  526. /package/{types/helpers → helpers}/object-utils.d.ts +0 -0
  527. /package/{esm/helpers → helpers}/object-utils.js +0 -0
  528. /package/{types/helpers → helpers}/parse-fields-projection.d.ts +0 -0
  529. /package/{types/helpers → helpers}/responsive-map.d.ts +0 -0
  530. /package/{esm/helpers → helpers}/responsive-map.js +0 -0
  531. /package/{types/helpers → helpers}/safe-json-stringify.d.ts +0 -0
  532. /package/{esm/helpers → helpers}/safe-json-stringify.js +0 -0
  533. /package/{types/helpers → helpers}/type-guards.d.ts +0 -0
  534. /package/{esm/helpers → helpers}/type-guards.js +0 -0
  535. /package/{types/i18n → i18n}/i18n.d.ts +0 -0
  536. /package/{esm/i18n → i18n}/i18n.js +0 -0
  537. /package/{types/i18n → i18n}/index.d.ts +0 -0
  538. /package/{esm/i18n → i18n}/index.js +0 -0
  539. /package/{types/i18n → i18n}/string-utils.d.ts +0 -0
  540. /package/{esm/i18n → i18n}/string-utils.js +0 -0
  541. /package/{types/i18n → i18n}/translate.d.ts +0 -0
  542. /package/{esm/i18n → i18n}/translate.js +0 -0
  543. /package/{types/index.d.ts → index.d.ts} +0 -0
  544. /package/{esm/index.js → index.js} +0 -0
  545. /package/{types/polifils → polifils}/array-find-last.d.ts +0 -0
  546. /package/{esm/polifils → polifils}/array-find-last.js +0 -0
  547. /package/{types/schema → schema}/api-document.interface.d.ts +0 -0
  548. /package/{esm/schema → schema}/api-document.interface.js +0 -0
  549. /package/{types/schema → schema}/api.interface.d.ts +0 -0
  550. /package/{esm/schema → schema}/api.interface.js +0 -0
  551. /package/{types/schema → schema}/constants.d.ts +0 -0
  552. /package/{esm/schema → schema}/constants.js +0 -0
  553. /package/{types/schema → schema}/data-type/array-type.interface.d.ts +0 -0
  554. /package/{esm/schema → schema}/data-type/array-type.interface.js +0 -0
  555. /package/{types/schema → schema}/data-type/complex-type.interface.d.ts +0 -0
  556. /package/{esm/schema → schema}/data-type/complex-type.interface.js +0 -0
  557. /package/{types/schema → schema}/data-type/data-type.interface.d.ts +0 -0
  558. /package/{esm/schema → schema}/data-type/data-type.interface.js +0 -0
  559. /package/{types/schema → schema}/data-type/enum-type.interface.d.ts +0 -0
  560. /package/{esm/schema → schema}/data-type/enum-type.interface.js +0 -0
  561. /package/{types/schema → schema}/data-type/field.interface.d.ts +0 -0
  562. /package/{esm/schema → schema}/data-type/field.interface.js +0 -0
  563. /package/{types/schema → schema}/data-type/mapped-type.interface.d.ts +0 -0
  564. /package/{esm/schema → schema}/data-type/mapped-type.interface.js +0 -0
  565. /package/{types/schema → schema}/data-type/mixin-type.interface.d.ts +0 -0
  566. /package/{esm/schema → schema}/data-type/mixin-type.interface.js +0 -0
  567. /package/{types/schema → schema}/data-type/simple-type.interface.d.ts +0 -0
  568. /package/{esm/schema → schema}/data-type/simple-type.interface.js +0 -0
  569. /package/{types/schema → schema}/data-type/union-type.interface.d.ts +0 -0
  570. /package/{esm/schema → schema}/data-type/union-type.interface.js +0 -0
  571. /package/{types/schema → schema}/data-type-container.interface.d.ts +0 -0
  572. /package/{esm/schema → schema}/data-type-container.interface.js +0 -0
  573. /package/{types/schema → schema}/http/http-api.interface.d.ts +0 -0
  574. /package/{esm/schema → schema}/http/http-api.interface.js +0 -0
  575. /package/{types/schema → schema}/http/http-controller.interface.d.ts +0 -0
  576. /package/{esm/schema → schema}/http/http-controller.interface.js +0 -0
  577. /package/{types/schema → schema}/http/http-media-type.interface.d.ts +0 -0
  578. /package/{esm/schema → schema}/http/http-media-type.interface.js +0 -0
  579. /package/{types/schema → schema}/http/http-multipart-field.interface.d.ts +0 -0
  580. /package/{esm/schema → schema}/http/http-multipart-field.interface.js +0 -0
  581. /package/{types/schema → schema}/http/http-operation-response.interface.d.ts +0 -0
  582. /package/{esm/schema → schema}/http/http-operation-response.interface.js +0 -0
  583. /package/{types/schema → schema}/http/http-operation.interface.d.ts +0 -0
  584. /package/{esm/schema → schema}/http/http-operation.interface.js +0 -0
  585. /package/{types/schema → schema}/http/http-parameter.interface.d.ts +0 -0
  586. /package/{esm/schema → schema}/http/http-parameter.interface.js +0 -0
  587. /package/{types/schema → schema}/http/http-request-body.interface.d.ts +0 -0
  588. /package/{esm/schema → schema}/http/http-request-body.interface.js +0 -0
  589. /package/{types/schema → schema}/http/http-status-range.interface.d.ts +0 -0
  590. /package/{esm/schema → schema}/http/http-status-range.interface.js +0 -0
  591. /package/{types/schema → schema}/index.d.ts +0 -0
  592. /package/{esm/schema → schema}/index.js +0 -0
  593. /package/{types/schema → schema}/mq/mq-api.interface.d.ts +0 -0
  594. /package/{esm/schema → schema}/mq/mq-api.interface.js +0 -0
  595. /package/{types/schema → schema}/mq/mq-controller.interface.d.ts +0 -0
  596. /package/{esm/schema → schema}/mq/mq-controller.interface.js +0 -0
  597. /package/{types/schema → schema}/mq/mq-header.interface.d.ts +0 -0
  598. /package/{esm/schema → schema}/mq/mq-header.interface.js +0 -0
  599. /package/{types/schema → schema}/mq/mq-operation.interface.d.ts +0 -0
  600. /package/{esm/schema → schema}/mq/mq-operation.interface.js +0 -0
  601. /package/{types/schema → schema}/opra-schema.d.ts +0 -0
  602. /package/{esm/schema → schema}/opra-schema.js +0 -0
  603. /package/{types/schema → schema}/type-guards.d.ts +0 -0
  604. /package/{esm/schema → schema}/type-guards.js +0 -0
  605. /package/{types/schema → schema}/types.d.ts +0 -0
  606. /package/{esm/schema → schema}/types.js +0 -0
  607. /package/{types/schema → schema}/value.interface.d.ts +0 -0
  608. /package/{esm/schema → schema}/value.interface.js +0 -0
  609. /package/{esm/schema → schema}/ws/ws-api.interface.js +0 -0
  610. /package/{types/schema → schema}/ws/ws-controller.interface.d.ts +0 -0
  611. /package/{esm/schema → schema}/ws/ws-controller.interface.js +0 -0
  612. /package/{types/schema → schema}/ws/ws-operation.interface.d.ts +0 -0
  613. /package/{esm/schema → schema}/ws/ws-operation.interface.js +0 -0
  614. /package/{types/types.d.ts → types.d.ts} +0 -0
  615. /package/{esm/types.js → types.js} +0 -0
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataType = void 0;
4
- const objects_1 = require("@jsopen/objects");
5
- const ts_gems_1 = require("ts-gems");
6
- const document_element_js_1 = require("../common/document-element.js");
7
- const constants_js_1 = require("../constants.js");
8
- const inspect_util_js_1 = require("../utils/inspect.util.js");
9
- const test_scope_match_js_1 = require("../utils/test-scope-match.js");
10
- /**
11
- * DataType constructor
12
- */
13
- exports.DataType = function (owner, initArgs,
14
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
- context) {
16
- if (!this)
17
- throw new TypeError('"this" should be passed to call class constructor');
18
- if (initArgs?.name && !constants_js_1.CLASS_NAME_PATTERN.test(initArgs.name)) {
19
- throw new TypeError(`"${initArgs.name}" is not a valid DataType name`);
20
- }
21
- document_element_js_1.DocumentElement.call(this, owner);
22
- const _this = (0, ts_gems_1.asMutable)(this);
23
- _this.kind = initArgs.kind;
24
- _this.scopePattern = initArgs.scopePattern
25
- ? Array.isArray(initArgs.scopePattern)
26
- ? initArgs.scopePattern
27
- : [initArgs.scopePattern]
28
- : undefined;
29
- _this.name = initArgs.name;
30
- _this.description = initArgs.description;
31
- _this.abstract = initArgs.abstract;
32
- _this.examples = initArgs.examples;
33
- };
34
- /**
35
- *
36
- * @class DataType
37
- */
38
- class DataTypeClass extends document_element_js_1.DocumentElement {
39
- get embedded() {
40
- return !this.name;
41
- }
42
- inScope(scope) {
43
- return (0, test_scope_match_js_1.testScopeMatch)(scope, this.scopePattern);
44
- }
45
- toJSON(options) {
46
- /** Locate base model which is not available for given scope */
47
- const outOfScope = this._locateBase(dt => !dt.inScope(options?.scope));
48
- if (outOfScope) {
49
- const baseName = this.node.getDataTypeNameWithNs(outOfScope);
50
- throw new TypeError(`"${baseName}" model is not available for "${options?.scope || 'null'}" scope`);
51
- }
52
- return (0, objects_1.omitUndefined)({
53
- kind: this.kind,
54
- description: this.description,
55
- abstract: this.abstract,
56
- examples: this.examples,
57
- });
58
- }
59
- toString() {
60
- return `[${Object.getPrototypeOf(this).constructor.name} ${this.name || '#Embedded'}]`;
61
- }
62
- [inspect_util_js_1.nodeInspectCustom]() {
63
- return (`[${inspect_util_js_1.colorFgYellow + Object.getPrototypeOf(this).constructor.name + inspect_util_js_1.colorReset}` +
64
- ` ${inspect_util_js_1.colorFgMagenta + this.name + inspect_util_js_1.colorReset}]`);
65
- }
66
- }
67
- exports.DataType.prototype = DataTypeClass.prototype;
@@ -1,128 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnumType = void 0;
4
- require("reflect-metadata");
5
- const objects_1 = require("@jsopen/objects");
6
- const ts_gems_1 = require("ts-gems");
7
- const valgen_1 = require("valgen");
8
- const index_js_1 = require("../../helpers/index.js");
9
- const index_js_2 = require("../../schema/index.js");
10
- const constants_js_1 = require("../constants.js");
11
- const data_type_js_1 = require("./data-type.js");
12
- /**
13
- * @class EnumType
14
- */
15
- exports.EnumType = function (...args) {
16
- // Injector
17
- if (!this)
18
- return exports.EnumType[constants_js_1.DECORATOR].apply(undefined, args);
19
- // Constructor
20
- const [owner, initArgs, context] = args;
21
- data_type_js_1.DataType.call(this, owner, initArgs, context);
22
- const _this = (0, ts_gems_1.asMutable)(this);
23
- _this.kind = index_js_2.OpraSchema.EnumType.Kind;
24
- if (initArgs.base) {
25
- // noinspection SuspiciousTypeOfGuard
26
- if (!(initArgs.base instanceof exports.EnumType)) {
27
- throw new TypeError(`"${initArgs.base.kind}" can't be set as base for a "${_this.kind}"`);
28
- }
29
- _this.base = initArgs.base;
30
- }
31
- _this.instance = initArgs.instance;
32
- _this.ownAttributes = (0, index_js_1.cloneObject)(initArgs.attributes || {});
33
- _this.attributes = _this.base ? (0, index_js_1.cloneObject)(_this.base.attributes) : {};
34
- for (const [k, el] of Object.entries(_this.ownAttributes)) {
35
- _this.attributes[k] = el;
36
- }
37
- };
38
- /**
39
- * @class EnumType
40
- */
41
- class EnumTypeClass extends data_type_js_1.DataType {
42
- extendsFrom(baseType) {
43
- if (!(baseType instanceof data_type_js_1.DataType))
44
- baseType = this.node.getDataType(baseType);
45
- if (!(baseType instanceof exports.EnumType))
46
- return false;
47
- if (baseType === this)
48
- return true;
49
- return !!this.base?.extendsFrom(baseType);
50
- }
51
- generateCodec() {
52
- return valgen_1.vg.isEnum(Object.keys(this.attributes));
53
- }
54
- toJSON(options) {
55
- const superJson = super.toJSON(options);
56
- const baseName = this.base
57
- ? this.node.getDataTypeNameWithNs(this.base)
58
- : undefined;
59
- return (0, objects_1.omitUndefined)({
60
- ...superJson,
61
- kind: this.kind,
62
- base: baseName,
63
- attributes: (0, index_js_1.cloneObject)(this.ownAttributes),
64
- });
65
- }
66
- _locateBase(callback) {
67
- if (!this.base)
68
- return;
69
- if (callback(this.base))
70
- return this.base;
71
- if (this.base._locateBase)
72
- return this.base._locateBase(callback);
73
- }
74
- }
75
- exports.EnumType.prototype = EnumTypeClass.prototype;
76
- Object.assign(exports.EnumType, EnumTypeClass);
77
- /**
78
- *
79
- */
80
- function EnumTypeFactory(enumSource, ...args) {
81
- const base = args.length >= 2 ? args[0] : undefined;
82
- const options = args.length >= 2 ? args[1] : args[0];
83
- let attributes = {};
84
- let out = enumSource;
85
- if (Array.isArray(enumSource)) {
86
- if (base) {
87
- if (!Array.isArray(base))
88
- throw new TypeError('Both "target" and "base" arguments should be array');
89
- out = [...base, ...enumSource];
90
- }
91
- attributes = {};
92
- enumSource.forEach(k => {
93
- if (!isNaN(Number(k)))
94
- return;
95
- const description = options?.meanings?.[k];
96
- attributes[k] = (0, objects_1.omitUndefined)({ description });
97
- });
98
- }
99
- else {
100
- if (base) {
101
- if (Array.isArray(base))
102
- throw new TypeError('Both "target" and "base" arguments should be enum object');
103
- out = { ...base, ...enumSource };
104
- }
105
- Object.keys(enumSource).forEach(k => {
106
- if (!isNaN(Number(k)))
107
- return;
108
- const description = options?.meanings?.[k];
109
- attributes[enumSource[k]] = (0, objects_1.omitUndefined)({ alias: k, description });
110
- });
111
- }
112
- const metadata = {
113
- kind: index_js_2.OpraSchema.EnumType.Kind,
114
- attributes,
115
- base: options?.base,
116
- name: options?.name,
117
- description: options?.description,
118
- };
119
- Object.defineProperty(enumSource, constants_js_1.DATATYPE_METADATA, {
120
- value: metadata,
121
- enumerable: false,
122
- configurable: true,
123
- writable: true,
124
- });
125
- return out;
126
- }
127
- exports.EnumType.prototype = EnumTypeClass.prototype;
128
- exports.EnumType[constants_js_1.DECORATOR] = EnumTypeFactory;
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Base64Type = void 0;
4
- const tslib_1 = require("tslib");
5
- const valgen_1 = require("valgen");
6
- const constants_js_1 = require("../../constants.js");
7
- const simple_type_js_1 = require("../simple-type.js");
8
- let Base64Type = class Base64Type {
9
- constructor(attributes) {
10
- if (attributes)
11
- Object.assign(this, attributes);
12
- }
13
- [constants_js_1.DECODER](properties) {
14
- const fn = valgen_1.vg.isBase64({ coerce: true });
15
- if (properties.designType === Buffer)
16
- return valgen_1.vg.pipe([fn, toBuffer], { coerce: true });
17
- if (properties.designType === Uint8Array)
18
- return valgen_1.vg.pipe([fn, toUint8Array], { coerce: true });
19
- return fn;
20
- }
21
- [constants_js_1.ENCODER]() {
22
- return fromBuffer;
23
- }
24
- };
25
- exports.Base64Type = Base64Type;
26
- exports.Base64Type = Base64Type = tslib_1.__decorate([
27
- (0, simple_type_js_1.SimpleType)({
28
- name: 'base64',
29
- description: 'A stream of bytes, base64 encoded',
30
- nameMappings: {
31
- js: 'string',
32
- json: 'string',
33
- },
34
- }),
35
- tslib_1.__metadata("design:paramtypes", [Object])
36
- ], Base64Type);
37
- const toBuffer = (0, valgen_1.validator)((base64String) => {
38
- return Buffer.from(base64String, 'base64');
39
- });
40
- const toUint8Array = (0, valgen_1.validator)((base64String) => {
41
- return new Uint8Array(Buffer.from(base64String, 'base64'));
42
- });
43
- const fromBuffer = (0, valgen_1.validator)((input) => {
44
- if (Buffer.isBuffer(input))
45
- return input.toString('base64');
46
- else {
47
- return (0, valgen_1.isBase64)(input);
48
- }
49
- });
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateTimeTypeTz = void 0;
4
- const tslib_1 = require("tslib");
5
- const valgen_1 = require("valgen");
6
- const constants_js_1 = require("../../constants.js");
7
- const simple_type_js_1 = require("../simple-type.js");
8
- const _isDateString = valgen_1.vg.isDateString({
9
- precisionMin: 'tz',
10
- coerce: true,
11
- });
12
- let DateTimeTypeTz = class DateTimeTypeTz {
13
- constructor(attributes) {
14
- if (attributes)
15
- Object.assign(this, attributes);
16
- }
17
- [constants_js_1.DECODER](properties) {
18
- const fn = _isDateString;
19
- const x = [fn];
20
- if (properties.minValue != null) {
21
- x.push(valgen_1.vg.isGte(fn(properties.minValue)));
22
- }
23
- if (properties.maxValue != null) {
24
- x.push(valgen_1.vg.isLte(fn(properties.maxValue)));
25
- }
26
- return x.length > 0 ? valgen_1.vg.pipe(x, { returnIndex: 0 }) : fn;
27
- }
28
- [constants_js_1.ENCODER](properties) {
29
- const fn = _isDateString;
30
- const x = [fn];
31
- if (properties.minValue != null) {
32
- x.push(valgen_1.vg.isGte(fn(properties.minValue)));
33
- }
34
- if (properties.maxValue != null) {
35
- x.push(valgen_1.vg.isLte(fn(properties.maxValue)));
36
- }
37
- return x.length > 0 ? valgen_1.vg.pipe(x, { returnIndex: 0 }) : fn;
38
- }
39
- };
40
- exports.DateTimeTypeTz = DateTimeTypeTz;
41
- tslib_1.__decorate([
42
- simple_type_js_1.SimpleType.Attribute({
43
- description: 'Minimum value',
44
- }),
45
- tslib_1.__metadata("design:type", String)
46
- ], DateTimeTypeTz.prototype, "minValue", void 0);
47
- tslib_1.__decorate([
48
- simple_type_js_1.SimpleType.Attribute({
49
- description: 'Maximum value',
50
- }),
51
- tslib_1.__metadata("design:type", String)
52
- ], DateTimeTypeTz.prototype, "maxValue", void 0);
53
- exports.DateTimeTypeTz = DateTimeTypeTz = tslib_1.__decorate([
54
- ((0, simple_type_js_1.SimpleType)({
55
- name: 'datetimetz',
56
- description: 'A full datetime value with time zone information',
57
- nameMappings: {
58
- js: 'string',
59
- json: 'string',
60
- },
61
- }).Example('2021-04-18T22:30:15+03:00')),
62
- tslib_1.__metadata("design:paramtypes", [Object])
63
- ], DateTimeTypeTz);
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateTimeType = void 0;
4
- const tslib_1 = require("tslib");
5
- const valgen_1 = require("valgen");
6
- const constants_js_1 = require("../../constants.js");
7
- const simple_type_js_1 = require("../simple-type.js");
8
- const _isDateString = valgen_1.vg.isDateString({
9
- precisionMin: 'day',
10
- trim: 'tz',
11
- coerce: true,
12
- });
13
- const _isDate = valgen_1.vg.isDate({
14
- coerce: true,
15
- });
16
- let DateTimeType = class DateTimeType {
17
- constructor(attributes) {
18
- if (attributes)
19
- Object.assign(this, attributes);
20
- }
21
- [constants_js_1.DECODER](properties) {
22
- let fn;
23
- if (properties.designType === Date) {
24
- fn = _isDate;
25
- }
26
- else {
27
- fn = _isDateString;
28
- }
29
- const x = [fn];
30
- if (properties.minValue != null) {
31
- x.push(valgen_1.vg.isGte(fn(properties.minValue)));
32
- }
33
- if (properties.maxValue != null) {
34
- x.push(valgen_1.vg.isLte(fn(properties.maxValue)));
35
- }
36
- return x.length > 0 ? valgen_1.vg.pipe(x, { returnIndex: 0 }) : fn;
37
- }
38
- [constants_js_1.ENCODER](properties) {
39
- const fn = _isDateString;
40
- const x = [fn];
41
- if (properties.minValue != null) {
42
- x.push(valgen_1.vg.isGte(fn(properties.minValue)));
43
- }
44
- if (properties.maxValue != null) {
45
- x.push(valgen_1.vg.isLte(fn(properties.maxValue)));
46
- }
47
- return x.length > 0 ? valgen_1.vg.pipe(x, { returnIndex: 0 }) : fn;
48
- }
49
- };
50
- exports.DateTimeType = DateTimeType;
51
- tslib_1.__decorate([
52
- simple_type_js_1.SimpleType.Attribute({
53
- description: 'Minimum value',
54
- }),
55
- tslib_1.__metadata("design:type", String)
56
- ], DateTimeType.prototype, "minValue", void 0);
57
- tslib_1.__decorate([
58
- simple_type_js_1.SimpleType.Attribute({
59
- description: 'Maximum value',
60
- }),
61
- tslib_1.__metadata("design:type", String)
62
- ], DateTimeType.prototype, "maxValue", void 0);
63
- exports.DateTimeType = DateTimeType = tslib_1.__decorate([
64
- ((0, simple_type_js_1.SimpleType)({
65
- name: 'datetime',
66
- description: 'A full datetime value',
67
- nameMappings: {
68
- js: 'string',
69
- json: 'string',
70
- },
71
- })
72
- .Example('2021-04-18T22:30:15')
73
- .Example('2021-04-18 22:30:15')
74
- .Example('2021-04-18 22:30')),
75
- tslib_1.__metadata("design:paramtypes", [Object])
76
- ], DateTimeType);
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateType = void 0;
4
- const tslib_1 = require("tslib");
5
- const valgen_1 = require("valgen");
6
- const constants_js_1 = require("../../constants.js");
7
- const simple_type_js_1 = require("../simple-type.js");
8
- const _isDateString = valgen_1.vg.isDateString({
9
- precisionMin: 'day',
10
- trim: 'day',
11
- coerce: true,
12
- });
13
- const _isDate = valgen_1.vg.isDate({
14
- trim: 'day',
15
- coerce: true,
16
- });
17
- let DateType = class DateType {
18
- constructor(attributes) {
19
- if (attributes)
20
- Object.assign(this, attributes);
21
- }
22
- [constants_js_1.DECODER](properties) {
23
- let fn;
24
- if (properties.designType === Date) {
25
- fn = _isDate;
26
- }
27
- else {
28
- fn = _isDateString;
29
- }
30
- const x = [fn];
31
- if (properties.minValue != null) {
32
- x.push(valgen_1.vg.isGte(fn(properties.minValue)));
33
- }
34
- if (properties.maxValue != null) {
35
- x.push(valgen_1.vg.isLte(fn(properties.maxValue)));
36
- }
37
- return x.length > 0 ? valgen_1.vg.pipe(x, { returnIndex: 0 }) : fn;
38
- }
39
- [constants_js_1.ENCODER](properties) {
40
- const fn = _isDateString;
41
- const x = [fn];
42
- if (properties.minValue != null) {
43
- x.push(valgen_1.vg.isGte(fn(properties.minValue)));
44
- }
45
- if (properties.maxValue != null) {
46
- x.push(valgen_1.vg.isLte(fn(properties.maxValue)));
47
- }
48
- return x.length > 0 ? valgen_1.vg.pipe(x, { returnIndex: 0 }) : fn;
49
- }
50
- };
51
- exports.DateType = DateType;
52
- tslib_1.__decorate([
53
- simple_type_js_1.SimpleType.Attribute({
54
- description: 'Minimum value',
55
- }),
56
- tslib_1.__metadata("design:type", String)
57
- ], DateType.prototype, "minValue", void 0);
58
- tslib_1.__decorate([
59
- simple_type_js_1.SimpleType.Attribute({
60
- description: 'Maximum value',
61
- }),
62
- tslib_1.__metadata("design:type", String)
63
- ], DateType.prototype, "maxValue", void 0);
64
- exports.DateType = DateType = tslib_1.__decorate([
65
- ((0, simple_type_js_1.SimpleType)({
66
- name: 'date',
67
- description: 'A date without time',
68
- nameMappings: {
69
- js: 'string',
70
- json: 'string',
71
- },
72
- }).Example('2021-04-18', 'Full date value')),
73
- tslib_1.__metadata("design:paramtypes", [Object])
74
- ], DateType);
@@ -1,95 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EmailType = void 0;
4
- const tslib_1 = require("tslib");
5
- const valgen_1 = require("valgen");
6
- const constants_js_1 = require("../../constants.js");
7
- const simple_type_js_1 = require("../simple-type.js");
8
- let EmailType = class EmailType {
9
- constructor(attributes) {
10
- if (attributes)
11
- Object.assign(this, attributes);
12
- }
13
- [constants_js_1.DECODER](properties) {
14
- return valgen_1.vg.isEmail({ ...properties, coerce: true });
15
- }
16
- [constants_js_1.ENCODER](properties) {
17
- return valgen_1.vg.isEmail({ ...properties, coerce: true });
18
- }
19
- };
20
- exports.EmailType = EmailType;
21
- tslib_1.__decorate([
22
- simple_type_js_1.SimpleType.Attribute({
23
- description: 'If set to `true`, the validator will also match `Display Name <email-address>',
24
- default: false,
25
- }),
26
- tslib_1.__metadata("design:type", Boolean)
27
- ], EmailType.prototype, "allowDisplayName", void 0);
28
- tslib_1.__decorate([
29
- simple_type_js_1.SimpleType.Attribute({
30
- description: 'If set to `true`, the validator will reject strings without the format `Display Name <email-address>',
31
- default: false,
32
- }),
33
- tslib_1.__metadata("design:type", Boolean)
34
- ], EmailType.prototype, "requireDisplayName", void 0);
35
- tslib_1.__decorate([
36
- simple_type_js_1.SimpleType.Attribute({
37
- description: "If set to `false`, the validator will not allow any non-English UTF8 character in email address's local part",
38
- default: true,
39
- }),
40
- tslib_1.__metadata("design:type", Boolean)
41
- ], EmailType.prototype, "utf8LocalPart", void 0);
42
- tslib_1.__decorate([
43
- simple_type_js_1.SimpleType.Attribute({
44
- description: 'If set to `true`, the validator will not check for the standard max length of an email',
45
- default: false,
46
- }),
47
- tslib_1.__metadata("design:type", Boolean)
48
- ], EmailType.prototype, "ignoreMaxLength", void 0);
49
- tslib_1.__decorate([
50
- simple_type_js_1.SimpleType.Attribute({
51
- description: 'If set to `true`, the validator will allow IP addresses in the host part',
52
- default: false,
53
- }),
54
- tslib_1.__metadata("design:type", Boolean)
55
- ], EmailType.prototype, "allowIpDomain", void 0);
56
- tslib_1.__decorate([
57
- simple_type_js_1.SimpleType.Attribute({
58
- description: 'If set to `true`, some additional validation will be enabled, ' +
59
- 'e.g. disallowing certain syntactically valid email addresses that are rejected by GMail.',
60
- default: false,
61
- }),
62
- tslib_1.__metadata("design:type", Boolean)
63
- ], EmailType.prototype, "domainSpecificValidation", void 0);
64
- tslib_1.__decorate([
65
- simple_type_js_1.SimpleType.Attribute({
66
- description: 'If set to an array of strings and the part of the email after the @ symbol ' +
67
- ' one of the strings defined in it, the validation fails.',
68
- }),
69
- tslib_1.__metadata("design:type", Array)
70
- ], EmailType.prototype, "hostBlacklist", void 0);
71
- tslib_1.__decorate([
72
- simple_type_js_1.SimpleType.Attribute({
73
- description: 'If set to an array of strings and the part of the email after the @ symbol ' +
74
- ' matches none of the strings defined in it, the validation fails.',
75
- }),
76
- tslib_1.__metadata("design:type", Array)
77
- ], EmailType.prototype, "hostWhitelist", void 0);
78
- tslib_1.__decorate([
79
- simple_type_js_1.SimpleType.Attribute({
80
- description: 'If set to a string, then the validator will reject emails that include ' +
81
- ' any of the characters in the string, in the name part.',
82
- }),
83
- tslib_1.__metadata("design:type", String)
84
- ], EmailType.prototype, "blacklistedChars", void 0);
85
- exports.EmailType = EmailType = tslib_1.__decorate([
86
- ((0, simple_type_js_1.SimpleType)({
87
- name: 'email',
88
- description: 'An email value',
89
- nameMappings: {
90
- js: 'string',
91
- json: 'string',
92
- },
93
- }).Example('some.body@example.com')),
94
- tslib_1.__metadata("design:paramtypes", [Object])
95
- ], EmailType);
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldPathType = void 0;
4
- const tslib_1 = require("tslib");
5
- const valgen_1 = require("valgen");
6
- const constants_js_1 = require("../../constants.js");
7
- const data_type_js_1 = require("../data-type.js");
8
- const simple_type_js_1 = require("../simple-type.js");
9
- let FieldPathType = class FieldPathType {
10
- constructor(attributes) {
11
- if (attributes)
12
- Object.assign(this, attributes);
13
- }
14
- [constants_js_1.DECODER](properties, { element, scope, }) {
15
- const dataType = properties.dataType
16
- ? element.node.getComplexType(properties.dataType)
17
- : element.node.getComplexType('object');
18
- const allowSigns = properties.allowSigns;
19
- const decodeFieldPath = (0, valgen_1.validator)('decodeFieldPath', (input) => dataType.normalizeFieldPath(input, { allowSigns, scope }));
20
- return valgen_1.vg.pipe([valgen_1.toString, decodeFieldPath]);
21
- }
22
- [constants_js_1.ENCODER](properties, args) {
23
- return this[constants_js_1.DECODER](properties, args);
24
- }
25
- toJSON(properties, element, options) {
26
- const dataType = properties.dataType
27
- ? element.node.getComplexType(properties.dataType)
28
- : element.node.getComplexType('object');
29
- /** Test scope */
30
- data_type_js_1.DataType.prototype.toJSON.call(dataType, options);
31
- const typeName = dataType
32
- ? element.node.getDataTypeNameWithNs(dataType)
33
- : undefined;
34
- return {
35
- dataType: typeName ? typeName : dataType.toJSON(options),
36
- allowSigns: properties.allowSigns,
37
- };
38
- }
39
- };
40
- exports.FieldPathType = FieldPathType;
41
- tslib_1.__decorate([
42
- simple_type_js_1.SimpleType.Attribute({
43
- description: 'Data type which field belong to',
44
- }),
45
- tslib_1.__metadata("design:type", Object)
46
- ], FieldPathType.prototype, "dataType", void 0);
47
- tslib_1.__decorate([
48
- simple_type_js_1.SimpleType.Attribute({
49
- description: 'Determines if signs (+,-) are allowed. ' +
50
- 'If set "first" signs are allowed only beginning of the field path' +
51
- 'If set "each" signs are allowed at each field in the path',
52
- }),
53
- tslib_1.__metadata("design:type", String)
54
- ], FieldPathType.prototype, "allowSigns", void 0);
55
- exports.FieldPathType = FieldPathType = tslib_1.__decorate([
56
- (0, simple_type_js_1.SimpleType)({
57
- name: 'fieldpath',
58
- description: 'Field path',
59
- nameMappings: {
60
- js: 'string',
61
- json: 'string',
62
- },
63
- }),
64
- tslib_1.__metadata("design:paramtypes", [Object])
65
- ], FieldPathType);