@opra/common 0.15.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/cjs/document/factory/import-resource-class.js +1 -0
  2. package/cjs/document/factory/import-type-class.js +9 -2
  3. package/cjs/document/resource/collection.js +9 -9
  4. package/cjs/document/resource/singleton.js +4 -4
  5. package/cjs/url/opra-url.js +7 -7
  6. package/esm/document/api-document.js +37 -33
  7. package/esm/document/constants.js +6 -3
  8. package/esm/document/data-type/api-field.js +15 -12
  9. package/esm/document/data-type/builtin/any.type.js +8 -5
  10. package/esm/document/data-type/builtin/base64.type.js +8 -5
  11. package/esm/document/data-type/builtin/bigint.type.js +8 -5
  12. package/esm/document/data-type/builtin/boolean.type.js +11 -8
  13. package/esm/document/data-type/builtin/date.type.js +10 -7
  14. package/esm/document/data-type/builtin/guid.type.js +12 -9
  15. package/esm/document/data-type/builtin/index.js +13 -10
  16. package/esm/document/data-type/builtin/integer.type.js +13 -10
  17. package/esm/document/data-type/builtin/number.type.js +10 -7
  18. package/esm/document/data-type/builtin/object.type.js +8 -5
  19. package/esm/document/data-type/builtin/string.type.js +11 -8
  20. package/esm/document/data-type/builtin/time.type.js +10 -7
  21. package/esm/document/data-type/builtin/timestamp.type.js +12 -9
  22. package/esm/document/data-type/complex-type.js +34 -30
  23. package/esm/document/data-type/data-type.js +12 -9
  24. package/esm/document/data-type/enum-type.js +19 -15
  25. package/esm/document/data-type/mapped-type.js +29 -24
  26. package/esm/document/data-type/simple-type.js +21 -17
  27. package/esm/document/data-type/union-type.js +29 -26
  28. package/esm/document/factory/add-references.js +7 -3
  29. package/esm/document/factory/create-document.js +16 -10
  30. package/esm/document/factory/factory.js +37 -33
  31. package/esm/document/factory/import-resource-class.js +22 -15
  32. package/esm/document/factory/import-type-class.js +43 -26
  33. package/esm/document/factory/index.js +4 -1
  34. package/esm/document/factory/process-resources.js +16 -10
  35. package/esm/document/factory/process-types.js +37 -31
  36. package/esm/document/index.js +17 -14
  37. package/esm/document/resource/collection.js +50 -46
  38. package/esm/document/resource/resource.js +12 -9
  39. package/esm/document/resource/singleton.js +29 -25
  40. package/esm/document/utils/inspect.util.js +7 -4
  41. package/esm/document/utils/string-compare.util.js +5 -1
  42. package/esm/exception/enums/issue-severity.enum.js +5 -2
  43. package/esm/exception/error-issue.js +2 -1
  44. package/esm/exception/http-errors/bad-request.error.js +8 -4
  45. package/esm/exception/http-errors/failed-dependency.error.js +8 -4
  46. package/esm/exception/http-errors/forbidden.error.js +8 -4
  47. package/esm/exception/http-errors/internal-server.error.js +8 -4
  48. package/esm/exception/http-errors/method-not-allowed.error.js +8 -4
  49. package/esm/exception/http-errors/not-acceptable.error.js +8 -4
  50. package/esm/exception/http-errors/not-found.error.js +8 -4
  51. package/esm/exception/http-errors/unauthorized.error.js +8 -4
  52. package/esm/exception/http-errors/unprocessable-entity.error.js +8 -4
  53. package/esm/exception/index.js +18 -15
  54. package/esm/exception/opra-exception.js +7 -3
  55. package/esm/exception/resource-errors/resource-conflict.error.js +8 -4
  56. package/esm/exception/resource-errors/resource-not-found.error.js +8 -4
  57. package/esm/exception/wrap-exception.js +24 -20
  58. package/esm/filter/antlr/OpraFilterLexer.js +9 -6
  59. package/esm/filter/antlr/OpraFilterListener.js +5 -2
  60. package/esm/filter/antlr/OpraFilterParser.js +126 -79
  61. package/esm/filter/antlr/OpraFilterVisitor.js +5 -2
  62. package/esm/filter/ast/abstract/ast.js +5 -1
  63. package/esm/filter/ast/abstract/expression.js +6 -2
  64. package/esm/filter/ast/abstract/literal.js +6 -2
  65. package/esm/filter/ast/abstract/term.js +6 -2
  66. package/esm/filter/ast/expressions/arithmetic-expression.js +8 -3
  67. package/esm/filter/ast/expressions/array-expression.js +6 -2
  68. package/esm/filter/ast/expressions/comparison-expression.js +6 -2
  69. package/esm/filter/ast/expressions/logical-expression.js +6 -2
  70. package/esm/filter/ast/expressions/parentheses-expression.js +6 -2
  71. package/esm/filter/ast/index.js +19 -16
  72. package/esm/filter/ast/terms/boolean-literal.js +6 -2
  73. package/esm/filter/ast/terms/date-literal.js +12 -8
  74. package/esm/filter/ast/terms/external-constant.js +6 -2
  75. package/esm/filter/ast/terms/null-literal.js +6 -2
  76. package/esm/filter/ast/terms/number-literal.js +8 -4
  77. package/esm/filter/ast/terms/qualified-identifier.js +6 -2
  78. package/esm/filter/ast/terms/string-literal.js +8 -4
  79. package/esm/filter/ast/terms/time-literal.js +10 -6
  80. package/esm/filter/build.js +69 -45
  81. package/esm/filter/errors.js +9 -3
  82. package/esm/filter/filter-tree-visitor.js +31 -26
  83. package/esm/filter/index.js +8 -5
  84. package/esm/filter/opra-error-listener.js +8 -4
  85. package/esm/filter/parse.js +19 -14
  86. package/esm/filter/utils.js +7 -2
  87. package/esm/helpers/function-utils.js +14 -8
  88. package/esm/helpers/get-stack-filename.js +5 -1
  89. package/esm/helpers/index.js +11 -8
  90. package/esm/helpers/is-url.js +5 -1
  91. package/esm/helpers/mixin-utils.js +7 -2
  92. package/esm/helpers/object-utils.js +12 -6
  93. package/esm/helpers/path-to-object-tree.js +5 -1
  94. package/esm/helpers/responsive-map.js +5 -1
  95. package/esm/helpers/type-guards.js +17 -7
  96. package/esm/http/codecs/boolean-codec.js +5 -1
  97. package/esm/http/codecs/date-codec.js +5 -1
  98. package/esm/http/codecs/filter-codec.js +9 -5
  99. package/esm/http/codecs/integer-codec.js +6 -2
  100. package/esm/http/codecs/number-codec.js +5 -1
  101. package/esm/http/codecs/string-codec.js +5 -1
  102. package/esm/http/enums/http-headers-codes.enum.js +5 -2
  103. package/esm/http/enums/http-status-codes.enum.js +5 -2
  104. package/esm/http/enums/http-status-messages.js +4 -1
  105. package/esm/http/http-headers.js +9 -5
  106. package/esm/http/http-message.host.js +18 -13
  107. package/esm/http/http-params.js +25 -20
  108. package/esm/http/http-request-message.js +22 -18
  109. package/esm/http/http-response-message.js +28 -23
  110. package/esm/http/index.js +17 -14
  111. package/esm/http/interfaces/client-http-headers.interface.js +2 -1
  112. package/esm/http/interfaces/cookie-options.interface.js +2 -1
  113. package/esm/http/interfaces/server-http-headers.interface.js +2 -1
  114. package/esm/i18n/i18n.js +28 -23
  115. package/esm/i18n/index.js +9 -5
  116. package/esm/i18n/string-utils.js +7 -2
  117. package/esm/i18n/translate.js +7 -3
  118. package/esm/index.js +16 -11
  119. package/esm/schema/constants.js +4 -1
  120. package/esm/schema/data-type/complex-type.interface.js +5 -2
  121. package/esm/schema/data-type/data-type.interface.js +2 -1
  122. package/esm/schema/data-type/enum-type.interface.js +5 -2
  123. package/esm/schema/data-type/field.interface.js +2 -1
  124. package/esm/schema/data-type/mapped-type.interface.js +5 -2
  125. package/esm/schema/data-type/simple-type.interface.js +5 -2
  126. package/esm/schema/data-type/union-type.interface.js +5 -2
  127. package/esm/schema/document.interface.js +2 -1
  128. package/esm/schema/index.js +34 -31
  129. package/esm/schema/resource/collection.interface.js +5 -2
  130. package/esm/schema/resource/container.interface.js +5 -2
  131. package/esm/schema/resource/endpoint.interface.js +2 -1
  132. package/esm/schema/resource/resource.interface.js +2 -1
  133. package/esm/schema/resource/singleton.interface.js +5 -2
  134. package/esm/schema/type-guards.js +53 -40
  135. package/esm/types.js +2 -1
  136. package/esm/url/index.js +8 -5
  137. package/esm/url/opra-url-path-component.js +7 -3
  138. package/esm/url/opra-url-path.js +18 -14
  139. package/esm/url/opra-url.js +25 -21
  140. package/esm/url/utils/decode-path-component.js +8 -4
  141. package/esm/url/utils/encode-path-component.js +8 -3
  142. package/esm/utils/path-utils.js +7 -2
  143. package/package.json +5 -4
  144. package/{esm → types}/document/factory/import-resource-class.d.ts +1 -0
  145. package/{esm → types}/document/resource/collection.d.ts +10 -10
  146. package/{esm → types}/document/resource/singleton.d.ts +4 -4
  147. package/{esm → types}/schema/resource/collection.interface.d.ts +6 -6
  148. package/{esm → types}/url/opra-url.d.ts +3 -3
  149. package/{esm → types}/document/api-document.d.ts +0 -0
  150. package/{esm → types}/document/constants.d.ts +0 -0
  151. package/{esm → types}/document/data-type/api-field.d.ts +0 -0
  152. package/{esm → types}/document/data-type/builtin/any.type.d.ts +0 -0
  153. package/{esm → types}/document/data-type/builtin/base64.type.d.ts +0 -0
  154. package/{esm → types}/document/data-type/builtin/bigint.type.d.ts +0 -0
  155. package/{esm → types}/document/data-type/builtin/boolean.type.d.ts +0 -0
  156. package/{esm → types}/document/data-type/builtin/date.type.d.ts +0 -0
  157. package/{esm → types}/document/data-type/builtin/guid.type.d.ts +0 -0
  158. package/{esm → types}/document/data-type/builtin/index.d.ts +0 -0
  159. package/{esm → types}/document/data-type/builtin/integer.type.d.ts +0 -0
  160. package/{esm → types}/document/data-type/builtin/number.type.d.ts +0 -0
  161. package/{esm → types}/document/data-type/builtin/object.type.d.ts +0 -0
  162. package/{esm → types}/document/data-type/builtin/string.type.d.ts +0 -0
  163. package/{esm → types}/document/data-type/builtin/time.type.d.ts +0 -0
  164. package/{esm → types}/document/data-type/builtin/timestamp.type.d.ts +0 -0
  165. package/{esm → types}/document/data-type/complex-type.d.ts +0 -0
  166. package/{esm → types}/document/data-type/data-type.d.ts +0 -0
  167. package/{esm → types}/document/data-type/enum-type.d.ts +0 -0
  168. package/{esm → types}/document/data-type/mapped-type.d.ts +0 -0
  169. package/{esm → types}/document/data-type/simple-type.d.ts +0 -0
  170. package/{esm → types}/document/data-type/union-type.d.ts +0 -0
  171. package/{esm → types}/document/factory/add-references.d.ts +0 -0
  172. package/{esm → types}/document/factory/create-document.d.ts +0 -0
  173. package/{esm → types}/document/factory/factory.d.ts +0 -0
  174. package/{esm → types}/document/factory/import-type-class.d.ts +0 -0
  175. package/{esm → types}/document/factory/index.d.ts +0 -0
  176. package/{esm → types}/document/factory/process-resources.d.ts +0 -0
  177. package/{esm → types}/document/factory/process-types.d.ts +0 -0
  178. package/{esm → types}/document/index.d.ts +0 -0
  179. package/{esm → types}/document/resource/resource.d.ts +0 -0
  180. package/{esm → types}/document/utils/inspect.util.d.ts +0 -0
  181. package/{esm → types}/document/utils/string-compare.util.d.ts +0 -0
  182. package/{esm → types}/exception/enums/issue-severity.enum.d.ts +0 -0
  183. package/{esm → types}/exception/error-issue.d.ts +0 -0
  184. package/{esm → types}/exception/http-errors/bad-request.error.d.ts +0 -0
  185. package/{esm → types}/exception/http-errors/failed-dependency.error.d.ts +0 -0
  186. package/{esm → types}/exception/http-errors/forbidden.error.d.ts +0 -0
  187. package/{esm → types}/exception/http-errors/internal-server.error.d.ts +0 -0
  188. package/{esm → types}/exception/http-errors/method-not-allowed.error.d.ts +0 -0
  189. package/{esm → types}/exception/http-errors/not-acceptable.error.d.ts +0 -0
  190. package/{esm → types}/exception/http-errors/not-found.error.d.ts +0 -0
  191. package/{esm → types}/exception/http-errors/unauthorized.error.d.ts +0 -0
  192. package/{esm → types}/exception/http-errors/unprocessable-entity.error.d.ts +0 -0
  193. package/{esm → types}/exception/index.d.ts +0 -0
  194. package/{esm → types}/exception/opra-exception.d.ts +0 -0
  195. package/{esm → types}/exception/resource-errors/resource-conflict.error.d.ts +0 -0
  196. package/{esm → types}/exception/resource-errors/resource-not-found.error.d.ts +0 -0
  197. package/{esm → types}/exception/wrap-exception.d.ts +0 -0
  198. package/{esm → types}/filter/antlr/OpraFilterLexer.d.ts +0 -0
  199. package/{esm → types}/filter/antlr/OpraFilterListener.d.ts +0 -0
  200. package/{esm → types}/filter/antlr/OpraFilterParser.d.ts +0 -0
  201. package/{esm → types}/filter/antlr/OpraFilterVisitor.d.ts +0 -0
  202. package/{esm → types}/filter/ast/abstract/ast.d.ts +0 -0
  203. package/{esm → types}/filter/ast/abstract/expression.d.ts +0 -0
  204. package/{esm → types}/filter/ast/abstract/literal.d.ts +0 -0
  205. package/{esm → types}/filter/ast/abstract/term.d.ts +0 -0
  206. package/{esm → types}/filter/ast/expressions/arithmetic-expression.d.ts +0 -0
  207. package/{esm → types}/filter/ast/expressions/array-expression.d.ts +0 -0
  208. package/{esm → types}/filter/ast/expressions/comparison-expression.d.ts +0 -0
  209. package/{esm → types}/filter/ast/expressions/logical-expression.d.ts +0 -0
  210. package/{esm → types}/filter/ast/expressions/parentheses-expression.d.ts +0 -0
  211. package/{esm → types}/filter/ast/index.d.ts +0 -0
  212. package/{esm → types}/filter/ast/terms/boolean-literal.d.ts +0 -0
  213. package/{esm → types}/filter/ast/terms/date-literal.d.ts +0 -0
  214. package/{esm → types}/filter/ast/terms/external-constant.d.ts +0 -0
  215. package/{esm → types}/filter/ast/terms/null-literal.d.ts +0 -0
  216. package/{esm → types}/filter/ast/terms/number-literal.d.ts +0 -0
  217. package/{esm → types}/filter/ast/terms/qualified-identifier.d.ts +0 -0
  218. package/{esm → types}/filter/ast/terms/string-literal.d.ts +0 -0
  219. package/{esm → types}/filter/ast/terms/time-literal.d.ts +0 -0
  220. package/{esm → types}/filter/build.d.ts +0 -0
  221. package/{esm → types}/filter/errors.d.ts +0 -0
  222. package/{esm → types}/filter/filter-tree-visitor.d.ts +0 -0
  223. package/{esm → types}/filter/index.d.ts +0 -0
  224. package/{esm → types}/filter/opra-error-listener.d.ts +0 -0
  225. package/{esm → types}/filter/parse.d.ts +0 -0
  226. package/{esm → types}/filter/utils.d.ts +0 -0
  227. package/{esm → types}/helpers/function-utils.d.ts +0 -0
  228. package/{esm → types}/helpers/get-stack-filename.d.ts +0 -0
  229. package/{esm → types}/helpers/index.d.ts +0 -0
  230. package/{esm → types}/helpers/is-url.d.ts +0 -0
  231. package/{esm → types}/helpers/mixin-utils.d.ts +0 -0
  232. package/{esm → types}/helpers/object-utils.d.ts +0 -0
  233. package/{esm → types}/helpers/path-to-object-tree.d.ts +0 -0
  234. package/{esm → types}/helpers/responsive-map.d.ts +0 -0
  235. package/{esm → types}/helpers/type-guards.d.ts +0 -0
  236. package/{esm → types}/http/codecs/boolean-codec.d.ts +0 -0
  237. package/{esm → types}/http/codecs/date-codec.d.ts +0 -0
  238. package/{esm → types}/http/codecs/filter-codec.d.ts +0 -0
  239. package/{esm → types}/http/codecs/integer-codec.d.ts +0 -0
  240. package/{esm → types}/http/codecs/number-codec.d.ts +0 -0
  241. package/{esm → types}/http/codecs/string-codec.d.ts +0 -0
  242. package/{esm → types}/http/enums/http-headers-codes.enum.d.ts +0 -0
  243. package/{esm → types}/http/enums/http-status-codes.enum.d.ts +0 -0
  244. package/{esm → types}/http/enums/http-status-messages.d.ts +0 -0
  245. package/{esm → types}/http/http-headers.d.ts +0 -0
  246. package/{esm → types}/http/http-message.host.d.ts +0 -0
  247. package/{esm → types}/http/http-params.d.ts +0 -0
  248. package/{esm → types}/http/http-request-message.d.ts +0 -0
  249. package/{esm → types}/http/http-response-message.d.ts +0 -0
  250. package/{esm → types}/http/index.d.ts +0 -0
  251. package/{esm → types}/http/interfaces/client-http-headers.interface.d.ts +0 -0
  252. package/{esm → types}/http/interfaces/cookie-options.interface.d.ts +0 -0
  253. package/{esm → types}/http/interfaces/server-http-headers.interface.d.ts +0 -0
  254. package/{esm → types}/http/multipart/batch-multipart.d.ts +0 -0
  255. package/{esm → types}/http/multipart/http-request-content.d.ts +0 -0
  256. package/{esm → types}/http/multipart/http-response-content.d.ts +0 -0
  257. package/{esm → types}/http/multipart/index.d.ts +0 -0
  258. package/{esm → types}/i18n/i18n.d.ts +0 -0
  259. package/{esm → types}/i18n/index.d.ts +0 -0
  260. package/{esm → types}/i18n/string-utils.d.ts +0 -0
  261. package/{esm → types}/i18n/translate.d.ts +0 -0
  262. package/{esm → types}/index.d.ts +0 -0
  263. package/{esm → types}/schema/constants.d.ts +0 -0
  264. package/{esm → types}/schema/data-type/complex-type.interface.d.ts +0 -0
  265. package/{esm → types}/schema/data-type/data-type.interface.d.ts +0 -0
  266. package/{esm → types}/schema/data-type/enum-type.interface.d.ts +0 -0
  267. package/{esm → types}/schema/data-type/field.interface.d.ts +0 -0
  268. package/{esm → types}/schema/data-type/mapped-type.interface.d.ts +0 -0
  269. package/{esm → types}/schema/data-type/simple-type.interface.d.ts +0 -0
  270. package/{esm → types}/schema/data-type/union-type.interface.d.ts +0 -0
  271. package/{esm → types}/schema/document.interface.d.ts +0 -0
  272. package/{esm → types}/schema/index.d.ts +0 -0
  273. package/{esm → types}/schema/resource/container.interface.d.ts +0 -0
  274. package/{esm → types}/schema/resource/endpoint.interface.d.ts +0 -0
  275. package/{esm → types}/schema/resource/resource.interface.d.ts +0 -0
  276. package/{esm → types}/schema/resource/singleton.interface.d.ts +2 -2
  277. /package/{esm → types}/schema/type-guards.d.ts +0 -0
  278. /package/{esm → types}/types.d.ts +0 -0
  279. /package/{esm → types}/url/index.d.ts +0 -0
  280. /package/{esm → types}/url/opra-url-path-component.d.ts +0 -0
  281. /package/{esm → types}/url/opra-url-path.d.ts +0 -0
  282. /package/{esm → types}/url/utils/decode-path-component.d.ts +0 -0
  283. /package/{esm → types}/url/utils/encode-path-component.d.ts +0 -0
  284. /package/{esm → types}/utils/path-utils.d.ts +0 -0
@@ -1,10 +1,14 @@
1
- import isPlainObject from 'putil-isplainobject';
2
- export function encodePathComponent(resource, key, typeCast) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.encodePathComponent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const putil_isplainobject_1 = tslib_1.__importDefault(require("putil-isplainobject"));
6
+ function encodePathComponent(resource, key, typeCast) {
3
7
  if (resource == null)
4
8
  return '';
5
9
  let keyString = '';
6
10
  if (key !== '' && key != null) {
7
- if (isPlainObject(key)) {
11
+ if ((0, putil_isplainobject_1.default)(key)) {
8
12
  const arr = [];
9
13
  for (const k of Object.keys(key)) {
10
14
  arr.push(encodeURIComponent(k) + '=' + encodeURIComponent(key[k]));
@@ -20,3 +24,4 @@ export function encodePathComponent(resource, key, typeCast) {
20
24
  (keyString ? '@' + keyString : '') +
21
25
  (typeCast ? '::' + typeCast : '');
22
26
  }
27
+ exports.encodePathComponent = encodePathComponent;
@@ -1,4 +1,7 @@
1
- export function normalizePath(p, noLeadingSlash) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.joinPath = exports.normalizePath = void 0;
4
+ function normalizePath(p, noLeadingSlash) {
2
5
  if (!p)
3
6
  return '';
4
7
  while (noLeadingSlash && p.startsWith('/'))
@@ -7,7 +10,8 @@ export function normalizePath(p, noLeadingSlash) {
7
10
  p = p.substring(0, p.length - 1);
8
11
  return p;
9
12
  }
10
- export function joinPath(...p) {
13
+ exports.normalizePath = normalizePath;
14
+ function joinPath(...p) {
11
15
  const out = [];
12
16
  let s;
13
17
  for (let i = 0, l = p.length; i < l; i++) {
@@ -17,3 +21,4 @@ export function joinPath(...p) {
17
21
  }
18
22
  return out.join('/');
19
23
  }
24
+ exports.joinPath = joinPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/common",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "description": "Opra internationalization package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "fast-tokenizer": "^1.2.2",
38
38
  "highland": "^2.13.5",
39
39
  "http-parser-js": "^0.5.8",
40
- "i18next": "^22.4.14",
40
+ "i18next": "^22.4.15",
41
41
  "lodash.omit": "^4.5.0",
42
42
  "mime-types": "^2.1.35",
43
43
  "putil-isplainobject": "^1.1.5",
@@ -54,12 +54,12 @@
54
54
  "@types/cookie": "^0.5.1",
55
55
  "@types/cookie-signature": "^1.1.0",
56
56
  "@types/encodeurl": "^1.0.0",
57
- "@types/type-is": "^1.6.3",
58
57
  "@types/mime-types": "^2.1.1",
58
+ "@types/type-is": "^1.6.3",
59
59
  "ts-gems": "^2.3.0"
60
60
  },
61
61
  "type": "module",
62
- "types": "esm/index.d.ts",
62
+ "types": "types/index.d.ts",
63
63
  "exports": {
64
64
  ".": {
65
65
  "require": "./cjs/index.js",
@@ -75,6 +75,7 @@
75
75
  "cjs/",
76
76
  "esm/",
77
77
  "umd/",
78
+ "types/",
78
79
  "LICENSE",
79
80
  "README.md"
80
81
  ],
@@ -1,3 +1,4 @@
1
+ import 'reflect-metadata';
1
2
  import { Type } from 'ts-gems';
2
3
  import { OpraSchema } from '../../schema/index.js';
3
4
  import type { ThunkAsync } from '../../types.js';
@@ -22,19 +22,19 @@ export declare namespace Collection {
22
22
  export interface Operations {
23
23
  create?: OpraSchema.Collection.CreateOperation & Operation;
24
24
  delete?: OpraSchema.Collection.DeleteOperation & Operation;
25
- deleteMany?: OpraSchema.Collection.DeleteManyOperation & Operation;
26
25
  get?: OpraSchema.Collection.GetOperation & Operation;
27
26
  update?: OpraSchema.Collection.UpdateOperation & Operation;
27
+ deleteMany?: OpraSchema.Collection.DeleteManyOperation & Operation;
28
+ findMany?: OpraSchema.Collection.FindManyOperation & Operation;
28
29
  updateMany?: OpraSchema.Collection.UpdateManyOperation & Operation;
29
- search?: OpraSchema.Collection.SearchOperation & Operation;
30
30
  }
31
31
  export type CreateOperationOptions = StrictOmit<OpraSchema.Collection.CreateOperation, 'handler'>;
32
32
  export type DeleteOperationOptions = StrictOmit<OpraSchema.Collection.DeleteOperation, 'handler'>;
33
33
  export type DeleteManyOperationOptions = StrictOmit<OpraSchema.Collection.DeleteManyOperation, 'handler'>;
34
+ export type FindManyOperationOptions = StrictOmit<OpraSchema.Collection.FindManyOperation, 'handler'>;
34
35
  export type GetOperationOptions = StrictOmit<OpraSchema.Collection.GetOperation, 'handler'>;
35
36
  export type UpdateOperationOptions = StrictOmit<OpraSchema.Collection.UpdateOperation, 'handler'>;
36
37
  export type UpdateManyOperationOptions = StrictOmit<OpraSchema.Collection.UpdateManyOperation, 'handler'>;
37
- export type SearchOperationOptions = StrictOmit<OpraSchema.Collection.SearchOperation, 'handler'>;
38
38
  export {};
39
39
  }
40
40
  export interface Collection extends StrictOmit<Resource, 'exportSchema' | '_construct'> {
@@ -53,13 +53,13 @@ export interface CollectionConstructor {
53
53
  prototype: Collection;
54
54
  new (document: ApiDocument, init: Collection.InitArguments): Collection;
55
55
  (type: TypeThunkAsync | string, options?: Collection.DecoratorOptions): ClassDecorator;
56
- CreateOperation: (options?: Collection.CreateOperationOptions) => PropertyDecorator;
57
- GetOperation: (options?: Collection.GetOperationOptions) => PropertyDecorator;
58
- DeleteOperation: (options?: Collection.DeleteOperationOptions) => PropertyDecorator;
59
- UpdateOperation: (options?: Collection.UpdateOperationOptions) => PropertyDecorator;
60
- SearchOperation: (options?: Collection.SearchOperationOptions) => PropertyDecorator;
61
- UpdateManyOperation: (options?: Collection.UpdateManyOperationOptions) => PropertyDecorator;
62
- DeleteManyOperation: (options?: Collection.DeleteManyOperationOptions) => PropertyDecorator;
56
+ Create: (options?: Collection.CreateOperationOptions) => PropertyDecorator;
57
+ Delete: (options?: Collection.DeleteOperationOptions) => PropertyDecorator;
58
+ Get: (options?: Collection.GetOperationOptions) => PropertyDecorator;
59
+ Update: (options?: Collection.UpdateOperationOptions) => PropertyDecorator;
60
+ FindMany: (options?: Collection.FindManyOperationOptions) => PropertyDecorator;
61
+ DeleteMany: (options?: Collection.DeleteManyOperationOptions) => PropertyDecorator;
62
+ UpdateMany: (options?: Collection.UpdateManyOperationOptions) => PropertyDecorator;
63
63
  }
64
64
  /**
65
65
  *
@@ -41,9 +41,9 @@ export interface SingletonConstructor {
41
41
  prototype: Singleton;
42
42
  new (document: ApiDocument, init: Singleton.InitArguments): Singleton;
43
43
  (type: TypeThunkAsync | string, options?: Singleton.DecoratorOptions): ClassDecorator;
44
- CreateOperation: (options?: Singleton.CreateOperationOptions) => PropertyDecorator;
45
- GetOperation: (options?: Singleton.GetOperationOptions) => PropertyDecorator;
46
- DeleteOperation: (options?: Singleton.DeleteOperationOptions) => PropertyDecorator;
47
- UpdateOperation: (options?: Singleton.UpdateOperationOptions) => PropertyDecorator;
44
+ Create: (options?: Singleton.CreateOperationOptions) => PropertyDecorator;
45
+ Delete: (options?: Singleton.DeleteOperationOptions) => PropertyDecorator;
46
+ Get: (options?: Singleton.GetOperationOptions) => PropertyDecorator;
47
+ Update: (options?: Singleton.UpdateOperationOptions) => PropertyDecorator;
48
48
  }
49
49
  export declare const Singleton: SingletonConstructor;
@@ -12,22 +12,22 @@ export declare namespace Collection {
12
12
  const Kind = "Collection";
13
13
  type Kind = 'Collection';
14
14
  type CreateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
15
- type GetOperation = Endpoint & _Operation.ResponsePickOmit;
16
15
  type DeleteOperation = Endpoint;
17
16
  type DeleteManyOperation = Endpoint & _Operation.Filter;
18
- type UpdateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
19
- type UpdateManyOperation = Endpoint & _Operation.InputPickOmit & _Operation.Filter;
20
- type SearchOperation = Endpoint & _Operation.Filter & _Operation.ResponsePickOmit & {
17
+ type GetOperation = Endpoint & _Operation.ResponsePickOmit;
18
+ type FindManyOperation = Endpoint & _Operation.Filter & _Operation.ResponsePickOmit & {
21
19
  sortFields?: string[];
22
20
  defaultSort?: string[];
23
21
  };
22
+ type UpdateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
23
+ type UpdateManyOperation = Endpoint & _Operation.InputPickOmit & _Operation.Filter;
24
24
  interface Operations {
25
25
  create?: CreateOperation;
26
26
  delete?: DeleteOperation;
27
- deleteMany?: DeleteManyOperation;
28
27
  get?: GetOperation;
29
28
  update?: UpdateOperation;
29
+ deleteMany?: DeleteManyOperation;
30
+ findMany?: FindManyOperation;
30
31
  updateMany?: UpdateManyOperation;
31
- search?: SearchOperation;
32
32
  }
33
33
  }
@@ -4,13 +4,13 @@ import { OpraURLPathComponentInit } from './opra-url-path-component.js';
4
4
  declare const nodeInspectCustom: unique symbol;
5
5
  declare const kContext: unique symbol;
6
6
  declare const kPath: unique symbol;
7
- declare const kSearchParams: unique symbol;
7
+ declare const kParams: unique symbol;
8
8
  export declare class OpraURL {
9
9
  protected static kContext: symbol;
10
10
  protected static kPath: symbol;
11
- protected static kSearchParams: symbol;
11
+ protected static kParams: symbol;
12
12
  protected [kPath]: OpraURLPath;
13
- protected [kSearchParams]: HttpParams;
13
+ protected [kParams]: HttpParams;
14
14
  protected [kContext]: {
15
15
  protocol: string;
16
16
  username: string;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -10,13 +10,13 @@ export declare namespace Singleton {
10
10
  const Kind = "Singleton";
11
11
  type Kind = 'Singleton';
12
12
  type CreateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
13
+ type DeleteOperation = Endpoint;
13
14
  type GetOperation = Endpoint & _Operation.ResponsePickOmit;
14
15
  type UpdateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
15
- type DeleteOperation = Endpoint;
16
16
  interface Operations {
17
17
  create?: CreateOperation;
18
+ delete?: DeleteOperation;
18
19
  get?: GetOperation;
19
20
  update?: UpdateOperation;
20
- delete?: DeleteOperation;
21
21
  }
22
22
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes