@opra/client 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 (174) hide show
  1. package/cjs/content-disposition-c51e31ba.js +473 -0
  2. package/cjs/cookie-signature-590f02de.js +68 -0
  3. package/cjs/index.min.mjs +10439 -9069
  4. package/cjs/{mime-db-49f150d0.js → mime-db-c6221216.js} +13 -5
  5. package/cjs/mime-types-1472f038.js +205 -0
  6. package/cjs/safe-buffer-22554edb.js +83 -0
  7. package/esm/content-disposition-da32da5d.js +471 -0
  8. package/esm/cookie-signature-40f74d13.js +66 -0
  9. package/esm/index.min.mjs +10439 -8950
  10. package/esm/{mime-db-d0f15d8f.js → mime-db-95975a69.js} +13 -5
  11. package/esm/mime-types-f653a5df.js +203 -0
  12. package/esm/safe-buffer-9b74695b.js +81 -0
  13. package/package.json +6 -7
  14. package/{typings → types}/common/document/factory/import-resource-class.d.ts +1 -0
  15. package/{typings → types}/common/document/resource/collection.d.ts +10 -10
  16. package/{typings → types}/common/document/resource/singleton.d.ts +4 -4
  17. package/{typings → types}/common/schema/resource/collection.interface.d.ts +6 -6
  18. package/{typings → types}/common/url/opra-url.d.ts +3 -3
  19. package/{typings → types}/http/http-client.d.ts +2 -2
  20. package/{typings → types}/http/http-collection-node.d.ts +4 -4
  21. package/cjs/content-disposition-d575fee5.js +0 -473
  22. package/cjs/cookie-signature-3e974173.js +0 -64
  23. package/cjs/mime-types-6e2bdb57.js +0 -201
  24. package/cjs/safe-buffer-8acd60c7.js +0 -78
  25. package/esm/content-disposition-65f281a9.js +0 -470
  26. package/esm/cookie-signature-bf274b6b.js +0 -62
  27. package/esm/mime-types-79c091fd.js +0 -199
  28. package/esm/safe-buffer-63383356.js +0 -76
  29. package/{typings → types}/client-error.d.ts +0 -0
  30. package/{typings → types}/common/document/api-document.d.ts +0 -0
  31. package/{typings → types}/common/document/constants.d.ts +0 -0
  32. package/{typings → types}/common/document/data-type/api-field.d.ts +0 -0
  33. package/{typings → types}/common/document/data-type/builtin/any.type.d.ts +0 -0
  34. package/{typings → types}/common/document/data-type/builtin/base64.type.d.ts +0 -0
  35. package/{typings → types}/common/document/data-type/builtin/bigint.type.d.ts +0 -0
  36. package/{typings → types}/common/document/data-type/builtin/boolean.type.d.ts +0 -0
  37. package/{typings → types}/common/document/data-type/builtin/date.type.d.ts +0 -0
  38. package/{typings → types}/common/document/data-type/builtin/guid.type.d.ts +0 -0
  39. package/{typings → types}/common/document/data-type/builtin/index.d.ts +0 -0
  40. package/{typings → types}/common/document/data-type/builtin/integer.type.d.ts +0 -0
  41. package/{typings → types}/common/document/data-type/builtin/number.type.d.ts +0 -0
  42. package/{typings → types}/common/document/data-type/builtin/object.type.d.ts +0 -0
  43. package/{typings → types}/common/document/data-type/builtin/string.type.d.ts +0 -0
  44. package/{typings → types}/common/document/data-type/builtin/time.type.d.ts +0 -0
  45. package/{typings → types}/common/document/data-type/builtin/timestamp.type.d.ts +0 -0
  46. package/{typings → types}/common/document/data-type/complex-type.d.ts +0 -0
  47. package/{typings → types}/common/document/data-type/data-type.d.ts +0 -0
  48. package/{typings → types}/common/document/data-type/enum-type.d.ts +0 -0
  49. package/{typings → types}/common/document/data-type/mapped-type.d.ts +0 -0
  50. package/{typings → types}/common/document/data-type/simple-type.d.ts +0 -0
  51. package/{typings → types}/common/document/data-type/union-type.d.ts +0 -0
  52. package/{typings → types}/common/document/factory/add-references.d.ts +0 -0
  53. package/{typings → types}/common/document/factory/create-document.d.ts +0 -0
  54. package/{typings → types}/common/document/factory/factory.d.ts +0 -0
  55. package/{typings → types}/common/document/factory/import-type-class.d.ts +0 -0
  56. package/{typings → types}/common/document/factory/index.d.ts +0 -0
  57. package/{typings → types}/common/document/factory/process-resources.d.ts +0 -0
  58. package/{typings → types}/common/document/factory/process-types.d.ts +0 -0
  59. package/{typings → types}/common/document/index.d.ts +0 -0
  60. package/{typings → types}/common/document/resource/resource.d.ts +0 -0
  61. package/{typings → types}/common/document/utils/inspect.util.d.ts +0 -0
  62. package/{typings → types}/common/document/utils/string-compare.util.d.ts +0 -0
  63. package/{typings → types}/common/exception/enums/issue-severity.enum.d.ts +0 -0
  64. package/{typings → types}/common/exception/error-issue.d.ts +0 -0
  65. package/{typings → types}/common/exception/http-errors/bad-request.error.d.ts +0 -0
  66. package/{typings → types}/common/exception/http-errors/failed-dependency.error.d.ts +0 -0
  67. package/{typings → types}/common/exception/http-errors/forbidden.error.d.ts +0 -0
  68. package/{typings → types}/common/exception/http-errors/internal-server.error.d.ts +0 -0
  69. package/{typings → types}/common/exception/http-errors/method-not-allowed.error.d.ts +0 -0
  70. package/{typings → types}/common/exception/http-errors/not-acceptable.error.d.ts +0 -0
  71. package/{typings → types}/common/exception/http-errors/not-found.error.d.ts +0 -0
  72. package/{typings → types}/common/exception/http-errors/unauthorized.error.d.ts +0 -0
  73. package/{typings → types}/common/exception/http-errors/unprocessable-entity.error.d.ts +0 -0
  74. package/{typings → types}/common/exception/index.d.ts +0 -0
  75. package/{typings → types}/common/exception/opra-exception.d.ts +0 -0
  76. package/{typings → types}/common/exception/resource-errors/resource-conflict.error.d.ts +0 -0
  77. package/{typings → types}/common/exception/resource-errors/resource-not-found.error.d.ts +0 -0
  78. package/{typings → types}/common/exception/wrap-exception.d.ts +0 -0
  79. package/{typings → types}/common/filter/antlr/OpraFilterLexer.d.ts +0 -0
  80. package/{typings → types}/common/filter/antlr/OpraFilterListener.d.ts +0 -0
  81. package/{typings → types}/common/filter/antlr/OpraFilterParser.d.ts +0 -0
  82. package/{typings → types}/common/filter/antlr/OpraFilterVisitor.d.ts +0 -0
  83. package/{typings → types}/common/filter/ast/abstract/ast.d.ts +0 -0
  84. package/{typings → types}/common/filter/ast/abstract/expression.d.ts +0 -0
  85. package/{typings → types}/common/filter/ast/abstract/literal.d.ts +0 -0
  86. package/{typings → types}/common/filter/ast/abstract/term.d.ts +0 -0
  87. package/{typings → types}/common/filter/ast/expressions/arithmetic-expression.d.ts +0 -0
  88. package/{typings → types}/common/filter/ast/expressions/array-expression.d.ts +0 -0
  89. package/{typings → types}/common/filter/ast/expressions/comparison-expression.d.ts +0 -0
  90. package/{typings → types}/common/filter/ast/expressions/logical-expression.d.ts +0 -0
  91. package/{typings → types}/common/filter/ast/expressions/parentheses-expression.d.ts +0 -0
  92. package/{typings → types}/common/filter/ast/index.d.ts +0 -0
  93. package/{typings → types}/common/filter/ast/terms/boolean-literal.d.ts +0 -0
  94. package/{typings → types}/common/filter/ast/terms/date-literal.d.ts +0 -0
  95. package/{typings → types}/common/filter/ast/terms/external-constant.d.ts +0 -0
  96. package/{typings → types}/common/filter/ast/terms/null-literal.d.ts +0 -0
  97. package/{typings → types}/common/filter/ast/terms/number-literal.d.ts +0 -0
  98. package/{typings → types}/common/filter/ast/terms/qualified-identifier.d.ts +0 -0
  99. package/{typings → types}/common/filter/ast/terms/string-literal.d.ts +0 -0
  100. package/{typings → types}/common/filter/ast/terms/time-literal.d.ts +0 -0
  101. package/{typings → types}/common/filter/build.d.ts +0 -0
  102. package/{typings → types}/common/filter/errors.d.ts +0 -0
  103. package/{typings → types}/common/filter/filter-tree-visitor.d.ts +0 -0
  104. package/{typings → types}/common/filter/index.d.ts +0 -0
  105. package/{typings → types}/common/filter/opra-error-listener.d.ts +0 -0
  106. package/{typings → types}/common/filter/parse.d.ts +0 -0
  107. package/{typings → types}/common/filter/utils.d.ts +0 -0
  108. package/{typings → types}/common/helpers/function-utils.d.ts +0 -0
  109. package/{typings → types}/common/helpers/get-stack-filename.d.ts +0 -0
  110. package/{typings → types}/common/helpers/index.d.ts +0 -0
  111. package/{typings → types}/common/helpers/is-url.d.ts +0 -0
  112. package/{typings → types}/common/helpers/mixin-utils.d.ts +0 -0
  113. package/{typings → types}/common/helpers/object-utils.d.ts +0 -0
  114. package/{typings → types}/common/helpers/path-to-object-tree.d.ts +0 -0
  115. package/{typings → types}/common/helpers/responsive-map.d.ts +0 -0
  116. package/{typings → types}/common/helpers/type-guards.d.ts +0 -0
  117. package/{typings → types}/common/http/codecs/boolean-codec.d.ts +0 -0
  118. package/{typings → types}/common/http/codecs/date-codec.d.ts +0 -0
  119. package/{typings → types}/common/http/codecs/filter-codec.d.ts +0 -0
  120. package/{typings → types}/common/http/codecs/integer-codec.d.ts +0 -0
  121. package/{typings → types}/common/http/codecs/number-codec.d.ts +0 -0
  122. package/{typings → types}/common/http/codecs/string-codec.d.ts +0 -0
  123. package/{typings → types}/common/http/enums/http-headers-codes.enum.d.ts +0 -0
  124. package/{typings → types}/common/http/enums/http-status-codes.enum.d.ts +0 -0
  125. package/{typings → types}/common/http/enums/http-status-messages.d.ts +0 -0
  126. package/{typings → types}/common/http/http-headers.d.ts +0 -0
  127. package/{typings → types}/common/http/http-message.host.d.ts +0 -0
  128. package/{typings → types}/common/http/http-params.d.ts +0 -0
  129. package/{typings → types}/common/http/http-request-message.d.ts +0 -0
  130. package/{typings → types}/common/http/http-response-message.d.ts +0 -0
  131. package/{typings → types}/common/http/index.d.ts +0 -0
  132. package/{typings → types}/common/http/interfaces/client-http-headers.interface.d.ts +0 -0
  133. package/{typings → types}/common/http/interfaces/cookie-options.interface.d.ts +0 -0
  134. package/{typings → types}/common/http/interfaces/server-http-headers.interface.d.ts +0 -0
  135. package/{typings → types}/common/http/multipart/batch-multipart.d.ts +0 -0
  136. package/{typings → types}/common/http/multipart/http-request-content.d.ts +0 -0
  137. package/{typings → types}/common/http/multipart/http-response-content.d.ts +0 -0
  138. package/{typings → types}/common/http/multipart/index.d.ts +0 -0
  139. package/{typings → types}/common/i18n/i18n.d.ts +0 -0
  140. package/{typings → types}/common/i18n/index.d.ts +0 -0
  141. package/{typings → types}/common/i18n/string-utils.d.ts +0 -0
  142. package/{typings → types}/common/i18n/translate.d.ts +0 -0
  143. package/{typings → types}/common/index.d.ts +0 -0
  144. package/{typings → types}/common/schema/constants.d.ts +0 -0
  145. package/{typings → types}/common/schema/data-type/complex-type.interface.d.ts +0 -0
  146. package/{typings → types}/common/schema/data-type/data-type.interface.d.ts +0 -0
  147. package/{typings → types}/common/schema/data-type/enum-type.interface.d.ts +0 -0
  148. package/{typings → types}/common/schema/data-type/field.interface.d.ts +0 -0
  149. package/{typings → types}/common/schema/data-type/mapped-type.interface.d.ts +0 -0
  150. package/{typings → types}/common/schema/data-type/simple-type.interface.d.ts +0 -0
  151. package/{typings → types}/common/schema/data-type/union-type.interface.d.ts +0 -0
  152. package/{typings → types}/common/schema/document.interface.d.ts +0 -0
  153. package/{typings → types}/common/schema/index.d.ts +0 -0
  154. package/{typings → types}/common/schema/resource/container.interface.d.ts +0 -0
  155. package/{typings → types}/common/schema/resource/endpoint.interface.d.ts +0 -0
  156. package/{typings → types}/common/schema/resource/resource.interface.d.ts +0 -0
  157. package/{typings → types}/common/schema/resource/singleton.interface.d.ts +2 -2
  158. /package/{typings → types}/common/schema/type-guards.d.ts +0 -0
  159. /package/{typings → types}/common/types.d.ts +0 -0
  160. /package/{typings → types}/common/url/index.d.ts +0 -0
  161. /package/{typings → types}/common/url/opra-url-path-component.d.ts +0 -0
  162. /package/{typings → types}/common/url/opra-url-path.d.ts +0 -0
  163. /package/{typings → types}/common/url/utils/decode-path-component.d.ts +0 -0
  164. /package/{typings → types}/common/url/utils/encode-path-component.d.ts +0 -0
  165. /package/{typings → types}/common/utils/path-utils.d.ts +0 -0
  166. /package/{typings → types}/constants.d.ts +0 -0
  167. /package/{typings → types}/http/batch-request.d.ts +0 -0
  168. /package/{typings → types}/http/http-request-observable.d.ts +0 -0
  169. /package/{typings → types}/http/http-request.d.ts +0 -0
  170. /package/{typings → types}/http/http-response.d.ts +0 -0
  171. /package/{typings → types}/http/http-service-base.d.ts +0 -0
  172. /package/{typings → types}/http/http-singleton-node.d.ts +0 -0
  173. /package/{typings → types}/http/http-types.d.ts +0 -0
  174. /package/{typings → types}/index.d.ts +0 -0
@@ -10708,10 +10708,18 @@ var require$$0 = {
10708
10708
  * MIT Licensed
10709
10709
  */
10710
10710
 
10711
- /**
10712
- * Module exports.
10713
- */
10711
+ var mimeDb;
10712
+ var hasRequiredMimeDb;
10713
+
10714
+ function requireMimeDb () {
10715
+ if (hasRequiredMimeDb) return mimeDb;
10716
+ hasRequiredMimeDb = 1;
10717
+ /**
10718
+ * Module exports.
10719
+ */
10714
10720
 
10715
- var mimeDb = require$$0;
10721
+ mimeDb = require$$0;
10722
+ return mimeDb;
10723
+ }
10716
10724
 
10717
- export { mimeDb as m };
10725
+ export { requireMimeDb as r };
@@ -0,0 +1,203 @@
1
+ import { r as requireMimeDb } from './mime-db-95975a69.js';
2
+ import require$$4 from 'path-browserify';
3
+
4
+ var mimeTypes = {};
5
+
6
+ /*!
7
+ * mime-types
8
+ * Copyright(c) 2014 Jonathan Ong
9
+ * Copyright(c) 2015 Douglas Christopher Wilson
10
+ * MIT Licensed
11
+ */
12
+
13
+ var hasRequiredMimeTypes;
14
+
15
+ function requireMimeTypes () {
16
+ if (hasRequiredMimeTypes) return mimeTypes;
17
+ hasRequiredMimeTypes = 1;
18
+ (function (exports) {
19
+
20
+ /**
21
+ * Module dependencies.
22
+ * @private
23
+ */
24
+
25
+ var db = requireMimeDb();
26
+ var extname = require$$4.extname;
27
+
28
+ /**
29
+ * Module variables.
30
+ * @private
31
+ */
32
+
33
+ var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
34
+ var TEXT_TYPE_REGEXP = /^text\//i;
35
+
36
+ /**
37
+ * Module exports.
38
+ * @public
39
+ */
40
+
41
+ exports.charset = charset;
42
+ exports.charsets = { lookup: charset };
43
+ exports.contentType = contentType;
44
+ exports.extension = extension;
45
+ exports.extensions = Object.create(null);
46
+ exports.lookup = lookup;
47
+ exports.types = Object.create(null);
48
+
49
+ // Populate the extensions/types maps
50
+ populateMaps(exports.extensions, exports.types);
51
+
52
+ /**
53
+ * Get the default charset for a MIME type.
54
+ *
55
+ * @param {string} type
56
+ * @return {boolean|string}
57
+ */
58
+
59
+ function charset (type) {
60
+ if (!type || typeof type !== 'string') {
61
+ return false
62
+ }
63
+
64
+ // TODO: use media-typer
65
+ var match = EXTRACT_TYPE_REGEXP.exec(type);
66
+ var mime = match && db[match[1].toLowerCase()];
67
+
68
+ if (mime && mime.charset) {
69
+ return mime.charset
70
+ }
71
+
72
+ // default text/* to utf-8
73
+ if (match && TEXT_TYPE_REGEXP.test(match[1])) {
74
+ return 'UTF-8'
75
+ }
76
+
77
+ return false
78
+ }
79
+
80
+ /**
81
+ * Create a full Content-Type header given a MIME type or extension.
82
+ *
83
+ * @param {string} str
84
+ * @return {boolean|string}
85
+ */
86
+
87
+ function contentType (str) {
88
+ // TODO: should this even be in this module?
89
+ if (!str || typeof str !== 'string') {
90
+ return false
91
+ }
92
+
93
+ var mime = str.indexOf('/') === -1
94
+ ? exports.lookup(str)
95
+ : str;
96
+
97
+ if (!mime) {
98
+ return false
99
+ }
100
+
101
+ // TODO: use content-type or other module
102
+ if (mime.indexOf('charset') === -1) {
103
+ var charset = exports.charset(mime);
104
+ if (charset) mime += '; charset=' + charset.toLowerCase();
105
+ }
106
+
107
+ return mime
108
+ }
109
+
110
+ /**
111
+ * Get the default extension for a MIME type.
112
+ *
113
+ * @param {string} type
114
+ * @return {boolean|string}
115
+ */
116
+
117
+ function extension (type) {
118
+ if (!type || typeof type !== 'string') {
119
+ return false
120
+ }
121
+
122
+ // TODO: use media-typer
123
+ var match = EXTRACT_TYPE_REGEXP.exec(type);
124
+
125
+ // get extensions
126
+ var exts = match && exports.extensions[match[1].toLowerCase()];
127
+
128
+ if (!exts || !exts.length) {
129
+ return false
130
+ }
131
+
132
+ return exts[0]
133
+ }
134
+
135
+ /**
136
+ * Lookup the MIME type for a file path/extension.
137
+ *
138
+ * @param {string} path
139
+ * @return {boolean|string}
140
+ */
141
+
142
+ function lookup (path) {
143
+ if (!path || typeof path !== 'string') {
144
+ return false
145
+ }
146
+
147
+ // get the extension ("ext" or ".ext" or full path)
148
+ var extension = extname('x.' + path)
149
+ .toLowerCase()
150
+ .substr(1);
151
+
152
+ if (!extension) {
153
+ return false
154
+ }
155
+
156
+ return exports.types[extension] || false
157
+ }
158
+
159
+ /**
160
+ * Populate the extensions and types maps.
161
+ * @private
162
+ */
163
+
164
+ function populateMaps (extensions, types) {
165
+ // source preference (least -> most)
166
+ var preference = ['nginx', 'apache', undefined, 'iana'];
167
+
168
+ Object.keys(db).forEach(function forEachMimeType (type) {
169
+ var mime = db[type];
170
+ var exts = mime.extensions;
171
+
172
+ if (!exts || !exts.length) {
173
+ return
174
+ }
175
+
176
+ // mime -> extensions
177
+ extensions[type] = exts;
178
+
179
+ // extension -> mime
180
+ for (var i = 0; i < exts.length; i++) {
181
+ var extension = exts[i];
182
+
183
+ if (types[extension]) {
184
+ var from = preference.indexOf(db[types[extension]].source);
185
+ var to = preference.indexOf(mime.source);
186
+
187
+ if (types[extension] !== 'application/octet-stream' &&
188
+ (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {
189
+ // skip the remapping
190
+ continue
191
+ }
192
+ }
193
+
194
+ // set the extension -> mime
195
+ types[extension] = type;
196
+ }
197
+ });
198
+ }
199
+ } (mimeTypes));
200
+ return mimeTypes;
201
+ }
202
+
203
+ export { requireMimeTypes as r };
@@ -0,0 +1,81 @@
1
+ import require$$0 from 'buffer';
2
+
3
+ var safeBuffer = {exports: {}};
4
+
5
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
6
+
7
+ var hasRequiredSafeBuffer;
8
+
9
+ function requireSafeBuffer () {
10
+ if (hasRequiredSafeBuffer) return safeBuffer.exports;
11
+ hasRequiredSafeBuffer = 1;
12
+ (function (module, exports) {
13
+ /* eslint-disable node/no-deprecated-api */
14
+ var buffer = require$$0;
15
+ var Buffer = buffer.Buffer;
16
+
17
+ // alternative to using Object.keys for old browsers
18
+ function copyProps (src, dst) {
19
+ for (var key in src) {
20
+ dst[key] = src[key];
21
+ }
22
+ }
23
+ if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
24
+ module.exports = buffer;
25
+ } else {
26
+ // Copy properties from require('buffer')
27
+ copyProps(buffer, exports);
28
+ exports.Buffer = SafeBuffer;
29
+ }
30
+
31
+ function SafeBuffer (arg, encodingOrOffset, length) {
32
+ return Buffer(arg, encodingOrOffset, length)
33
+ }
34
+
35
+ SafeBuffer.prototype = Object.create(Buffer.prototype);
36
+
37
+ // Copy static methods from Buffer
38
+ copyProps(Buffer, SafeBuffer);
39
+
40
+ SafeBuffer.from = function (arg, encodingOrOffset, length) {
41
+ if (typeof arg === 'number') {
42
+ throw new TypeError('Argument must not be a number')
43
+ }
44
+ return Buffer(arg, encodingOrOffset, length)
45
+ };
46
+
47
+ SafeBuffer.alloc = function (size, fill, encoding) {
48
+ if (typeof size !== 'number') {
49
+ throw new TypeError('Argument must be a number')
50
+ }
51
+ var buf = Buffer(size);
52
+ if (fill !== undefined) {
53
+ if (typeof encoding === 'string') {
54
+ buf.fill(fill, encoding);
55
+ } else {
56
+ buf.fill(fill);
57
+ }
58
+ } else {
59
+ buf.fill(0);
60
+ }
61
+ return buf
62
+ };
63
+
64
+ SafeBuffer.allocUnsafe = function (size) {
65
+ if (typeof size !== 'number') {
66
+ throw new TypeError('Argument must be a number')
67
+ }
68
+ return Buffer(size)
69
+ };
70
+
71
+ SafeBuffer.allocUnsafeSlow = function (size) {
72
+ if (typeof size !== 'number') {
73
+ throw new TypeError('Argument must be a number')
74
+ }
75
+ return buffer.SlowBuffer(size)
76
+ };
77
+ } (safeBuffer, safeBuffer.exports));
78
+ return safeBuffer.exports;
79
+ }
80
+
81
+ export { requireSafeBuffer as r };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/client",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "description": "Opra Client package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -12,8 +12,8 @@
12
12
  "type": "module",
13
13
  "module": "./esm/index.min.mjs",
14
14
  "main": "./cjs/index.min.cjs",
15
- "types": "./typings/index.d.ts",
16
- "typings": "./typings/index.d.ts",
15
+ "types": "./types/index.d.ts",
16
+ "typings": "./types/index.d.ts",
17
17
  "exports": {
18
18
  "./package.json": {
19
19
  "default": "./package.json"
@@ -33,8 +33,8 @@
33
33
  "@browsery/util": "^0.2.0",
34
34
  "accepts": "^1.3.8",
35
35
  "buffer": "^6.0.3",
36
- "crypto-browserify": "^3.12.0",
37
36
  "cookie": "^0.5.0",
37
+ "crypto-browserify": "^3.12.0",
38
38
  "dayjs": "^1.11.7",
39
39
  "encodeurl": "^1.0.2",
40
40
  "events": "^3.3.0",
@@ -47,7 +47,7 @@
47
47
  "putil-promisify": "^1.10.0",
48
48
  "putil-varhelpers": "^1.6.5",
49
49
  "reflect-metadata": "^0.1.13",
50
- "rxjs": "^7.8.0",
50
+ "rxjs": "^7.8.1",
51
51
  "ts-lib": "^0.0.5",
52
52
  "type-is": "^1.6.18",
53
53
  "uid": "^2.0.1"
@@ -55,10 +55,9 @@
55
55
  "devDependencies": {},
56
56
  "sideEffects": false,
57
57
  "files": [
58
- "typings/",
59
58
  "cjs/",
60
59
  "esm/",
61
- "typings/",
60
+ "types/",
62
61
  "LICENSE",
63
62
  "README.md"
64
63
  ],
@@ -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;
@@ -10,7 +10,7 @@ export interface OpraHttpClientOptions {
10
10
  /**
11
11
  // * Opra Service Metadata Document
12
12
  // */
13
- document?: ApiDocument;
13
+ api?: ApiDocument;
14
14
  /**
15
15
  *
16
16
  */
@@ -23,7 +23,7 @@ export declare class OpraHttpClient {
23
23
  protected static kAssets: symbol;
24
24
  protected [kAssets]: {
25
25
  serviceUrl: string;
26
- document?: ApiDocument;
26
+ api?: ApiDocument;
27
27
  metadataPromise?: Promise<any>;
28
28
  requestInterceptors: RequestInterceptor[];
29
29
  responseInterceptors: ResponseInterceptor[];
@@ -21,7 +21,7 @@ export declare namespace HttpCollectionNode {
21
21
  omit?: string[];
22
22
  include?: string[];
23
23
  }
24
- interface SearchOptions extends HttpRequestObservable.Options {
24
+ interface FindManyOptions extends HttpRequestObservable.Options {
25
25
  pick?: string[];
26
26
  omit?: string[];
27
27
  include?: string[];
@@ -86,13 +86,13 @@ export declare class HttpCollectionNode<TType, TResponseExt = any> {
86
86
  get(id: any, options?: StrictOmit<HttpCollectionNode.GetOptions, 'observe'> & {
87
87
  observe: 'events';
88
88
  }): HttpRequestObservable<HttpEvent, TType, TResponseExt>;
89
- search(options?: StrictOmit<HttpCollectionNode.SearchOptions, 'observe'> & {
89
+ findMany(options?: StrictOmit<HttpCollectionNode.FindManyOptions, 'observe'> & {
90
90
  observe?: 'body';
91
91
  }): HttpRequestObservable<TType[], TType, TResponseExt>;
92
- search(options?: StrictOmit<HttpCollectionNode.SearchOptions, 'observe'> & {
92
+ findMany(options?: StrictOmit<HttpCollectionNode.FindManyOptions, 'observe'> & {
93
93
  observe: 'response';
94
94
  }): HttpRequestObservable<HttpResponse<TType[]>, TType, TResponseExt>;
95
- search(options?: StrictOmit<HttpCollectionNode.SearchOptions, 'observe'> & {
95
+ findMany(options?: StrictOmit<HttpCollectionNode.FindManyOptions, 'observe'> & {
96
96
  observe: 'events';
97
97
  }): HttpRequestObservable<HttpEvent, TType, TResponseExt>;
98
98
  update(id: any, data: PartialInput<TType>, options?: StrictOmit<HttpCollectionNode.UpdateOptions, 'observe'> & {