@cloudbase/database 1.4.3 → 1.5.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 (196) hide show
  1. package/dist/commonjs/ObjectId/index.d.ts +1 -1
  2. package/dist/commonjs/ObjectId/index.js +16 -9
  3. package/dist/commonjs/aggregate.js +126 -75
  4. package/dist/commonjs/collection.d.ts +3 -2
  5. package/dist/commonjs/collection.js +131 -58
  6. package/dist/commonjs/command.d.ts +5 -5
  7. package/dist/commonjs/command.js +181 -154
  8. package/dist/commonjs/commands/logic.js +30 -20
  9. package/dist/commonjs/commands/query.d.ts +1 -1
  10. package/dist/commonjs/commands/query.js +85 -65
  11. package/dist/commonjs/commands/update.js +9 -7
  12. package/dist/commonjs/config/error.config.js +1 -0
  13. package/dist/commonjs/const/code.js +1 -0
  14. package/dist/commonjs/constant.d.ts +7 -7
  15. package/dist/commonjs/constant.js +13 -11
  16. package/dist/commonjs/document.d.ts +10 -6
  17. package/dist/commonjs/document.js +305 -193
  18. package/dist/commonjs/geo/index.js +20 -9
  19. package/dist/commonjs/geo/lineString.d.ts +1 -1
  20. package/dist/commonjs/geo/lineString.js +62 -33
  21. package/dist/commonjs/geo/multiLineString.d.ts +1 -1
  22. package/dist/commonjs/geo/multiLineString.js +71 -32
  23. package/dist/commonjs/geo/multiPoint.d.ts +1 -1
  24. package/dist/commonjs/geo/multiPoint.js +58 -29
  25. package/dist/commonjs/geo/multiPolygon.d.ts +1 -1
  26. package/dist/commonjs/geo/multiPolygon.js +96 -36
  27. package/dist/commonjs/geo/point.d.ts +1 -1
  28. package/dist/commonjs/geo/point.js +30 -23
  29. package/dist/commonjs/geo/polygon.d.ts +1 -1
  30. package/dist/commonjs/geo/polygon.js +78 -39
  31. package/dist/commonjs/helper/symbol.js +17 -5
  32. package/dist/commonjs/index.d.ts +8 -2
  33. package/dist/commonjs/index.js +73 -20
  34. package/dist/commonjs/lib/util.d.ts +1 -0
  35. package/dist/commonjs/lib/util.js +26 -0
  36. package/dist/commonjs/operator-map.js +7 -6
  37. package/dist/commonjs/query.d.ts +8 -4
  38. package/dist/commonjs/query.js +308 -201
  39. package/dist/commonjs/regexp/index.d.ts +1 -1
  40. package/dist/commonjs/regexp/index.js +16 -9
  41. package/dist/commonjs/serializer/common.d.ts +2 -2
  42. package/dist/commonjs/serializer/common.js +59 -22
  43. package/dist/commonjs/serializer/datatype.d.ts +2 -2
  44. package/dist/commonjs/serializer/datatype.js +58 -21
  45. package/dist/commonjs/serializer/query.d.ts +1 -1
  46. package/dist/commonjs/serializer/query.js +137 -127
  47. package/dist/commonjs/serializer/update.d.ts +1 -1
  48. package/dist/commonjs/serializer/update.js +83 -78
  49. package/dist/commonjs/serverDate/index.d.ts +1 -1
  50. package/dist/commonjs/serverDate/index.js +16 -9
  51. package/dist/commonjs/transaction/collection.d.ts +7 -0
  52. package/dist/commonjs/transaction/collection.js +49 -0
  53. package/dist/commonjs/transaction/document.d.ts +27 -0
  54. package/dist/commonjs/transaction/document.js +205 -0
  55. package/dist/commonjs/transaction/index.js +196 -86
  56. package/dist/commonjs/transaction/query.d.ts +43 -0
  57. package/dist/commonjs/transaction/query.js +261 -0
  58. package/dist/commonjs/typings/index.d.ts +4 -4
  59. package/dist/commonjs/typings/realtime.d.ts +16 -16
  60. package/dist/commonjs/util.js +123 -92
  61. package/dist/commonjs/utils/error.d.ts +2 -1
  62. package/dist/commonjs/utils/error.js +74 -38
  63. package/dist/commonjs/utils/symbol.js +33 -14
  64. package/dist/commonjs/utils/type.d.ts +1 -1
  65. package/dist/commonjs/utils/type.js +25 -13
  66. package/dist/commonjs/utils/utils.d.ts +4 -1
  67. package/dist/commonjs/utils/utils.js +93 -22
  68. package/dist/commonjs/validate.js +79 -63
  69. package/dist/esm/ObjectId/index.d.ts +1 -1
  70. package/dist/esm/ObjectId/index.js +15 -8
  71. package/dist/esm/aggregate.js +118 -66
  72. package/dist/esm/collection.d.ts +3 -2
  73. package/dist/esm/collection.js +125 -52
  74. package/dist/esm/command.d.ts +5 -5
  75. package/dist/esm/command.js +175 -147
  76. package/dist/esm/commands/logic.js +30 -20
  77. package/dist/esm/commands/query.d.ts +1 -1
  78. package/dist/esm/commands/query.js +91 -71
  79. package/dist/esm/commands/update.js +8 -6
  80. package/dist/esm/config/error.config.js +1 -1
  81. package/dist/esm/const/code.js +1 -1
  82. package/dist/esm/constant.d.ts +7 -7
  83. package/dist/esm/constant.js +12 -11
  84. package/dist/esm/document.d.ts +10 -6
  85. package/dist/esm/document.js +297 -185
  86. package/dist/esm/geo/interface.js +1 -0
  87. package/dist/esm/geo/lineString.d.ts +1 -1
  88. package/dist/esm/geo/lineString.js +57 -28
  89. package/dist/esm/geo/multiLineString.d.ts +1 -1
  90. package/dist/esm/geo/multiLineString.js +66 -27
  91. package/dist/esm/geo/multiPoint.d.ts +1 -1
  92. package/dist/esm/geo/multiPoint.js +53 -24
  93. package/dist/esm/geo/multiPolygon.d.ts +1 -1
  94. package/dist/esm/geo/multiPolygon.js +91 -31
  95. package/dist/esm/geo/point.d.ts +1 -1
  96. package/dist/esm/geo/point.js +26 -19
  97. package/dist/esm/geo/polygon.d.ts +1 -1
  98. package/dist/esm/geo/polygon.js +73 -34
  99. package/dist/esm/helper/symbol.js +13 -13
  100. package/dist/esm/index.d.ts +8 -2
  101. package/dist/esm/index.js +62 -9
  102. package/dist/esm/lib/util.d.ts +1 -0
  103. package/dist/esm/lib/util.js +22 -0
  104. package/dist/esm/operator-map.js +4 -4
  105. package/dist/esm/query.d.ts +8 -4
  106. package/dist/esm/query.js +299 -192
  107. package/dist/esm/regexp/index.d.ts +1 -1
  108. package/dist/esm/regexp/index.js +15 -8
  109. package/dist/esm/serializer/common.d.ts +2 -2
  110. package/dist/esm/serializer/common.js +49 -13
  111. package/dist/esm/serializer/datatype.d.ts +2 -2
  112. package/dist/esm/serializer/datatype.js +44 -8
  113. package/dist/esm/serializer/query.d.ts +1 -1
  114. package/dist/esm/serializer/query.js +112 -102
  115. package/dist/esm/serializer/update.d.ts +1 -1
  116. package/dist/esm/serializer/update.js +69 -64
  117. package/dist/esm/serverDate/index.d.ts +1 -1
  118. package/dist/esm/serverDate/index.js +15 -8
  119. package/dist/esm/transaction/collection.d.ts +7 -0
  120. package/dist/esm/transaction/collection.js +46 -0
  121. package/dist/esm/transaction/document.d.ts +27 -0
  122. package/dist/esm/transaction/document.js +202 -0
  123. package/dist/esm/transaction/index.js +191 -81
  124. package/dist/esm/transaction/query.d.ts +43 -0
  125. package/dist/esm/transaction/query.js +258 -0
  126. package/dist/esm/typings/index.d.ts +4 -4
  127. package/dist/esm/typings/index.js +1 -0
  128. package/dist/esm/typings/realtime.d.ts +16 -16
  129. package/dist/esm/typings/realtime.js +1 -0
  130. package/dist/esm/util.js +121 -90
  131. package/dist/esm/utils/error.d.ts +2 -1
  132. package/dist/esm/utils/error.js +70 -35
  133. package/dist/esm/utils/symbol.js +33 -14
  134. package/dist/esm/utils/type.d.ts +1 -1
  135. package/dist/esm/utils/type.js +12 -12
  136. package/dist/esm/utils/utils.d.ts +4 -1
  137. package/dist/esm/utils/utils.js +78 -16
  138. package/dist/esm/validate.js +65 -49
  139. package/jest.config.js +14 -0
  140. package/package.json +14 -10
  141. package/src/aggregate.ts +1 -5
  142. package/src/collection.ts +15 -2
  143. package/src/document.ts +45 -34
  144. package/src/index.ts +51 -4
  145. package/src/query.ts +33 -29
  146. package/src/serializer/query.ts +18 -6
  147. package/src/transaction/index.ts +1 -1
  148. package/src/typings/index.ts +0 -4
  149. package/src/utils/utils.ts +46 -0
  150. package/src/validate.ts +3 -6
  151. package/tests/gateway-contract.test.ts +180 -0
  152. package/tests/index.test.ts +283 -0
  153. package/tests/transaction-query.test.ts +207 -0
  154. package/tsconfig.esm.json +4 -2
  155. package/tsconfig.json +16 -6
  156. package/tsconfig.test.json +15 -0
  157. package/dist/commonjs/realtime/error.d.ts +0 -7
  158. package/dist/commonjs/realtime/error.js +0 -11
  159. package/dist/commonjs/realtime/listener.d.ts +0 -14
  160. package/dist/commonjs/realtime/listener.js +0 -17
  161. package/dist/commonjs/realtime/message.d.ts +0 -3
  162. package/dist/commonjs/realtime/message.js +0 -10
  163. package/dist/commonjs/realtime/snapshot.d.ts +0 -16
  164. package/dist/commonjs/realtime/snapshot.js +0 -42
  165. package/dist/commonjs/realtime/virtual-websocket-client.d.ts +0 -63
  166. package/dist/commonjs/realtime/virtual-websocket-client.js +0 -736
  167. package/dist/commonjs/realtime/websocket-client.d.ts +0 -78
  168. package/dist/commonjs/realtime/websocket-client.js +0 -567
  169. package/dist/commonjs/realtime/ws-event.d.ts +0 -126
  170. package/dist/commonjs/realtime/ws-event.js +0 -139
  171. package/dist/commonjs/transaction.d.ts +0 -42
  172. package/dist/commonjs/transaction.js +0 -126
  173. package/dist/esm/realtime/error.d.ts +0 -7
  174. package/dist/esm/realtime/error.js +0 -8
  175. package/dist/esm/realtime/listener.d.ts +0 -14
  176. package/dist/esm/realtime/listener.js +0 -14
  177. package/dist/esm/realtime/message.d.ts +0 -3
  178. package/dist/esm/realtime/message.js +0 -6
  179. package/dist/esm/realtime/snapshot.d.ts +0 -16
  180. package/dist/esm/realtime/snapshot.js +0 -39
  181. package/dist/esm/realtime/virtual-websocket-client.d.ts +0 -63
  182. package/dist/esm/realtime/virtual-websocket-client.js +0 -733
  183. package/dist/esm/realtime/websocket-client.d.ts +0 -78
  184. package/dist/esm/realtime/websocket-client.js +0 -564
  185. package/dist/esm/realtime/ws-event.d.ts +0 -126
  186. package/dist/esm/realtime/ws-event.js +0 -137
  187. package/dist/esm/transaction.d.ts +0 -42
  188. package/dist/esm/transaction.js +0 -121
  189. package/src/realtime/error.ts +0 -19
  190. package/src/realtime/listener.ts +0 -35
  191. package/src/realtime/message.ts +0 -14
  192. package/src/realtime/snapshot.ts +0 -60
  193. package/src/realtime/virtual-websocket-client.ts +0 -1195
  194. package/src/realtime/websocket-client.ts +0 -995
  195. package/src/realtime/ws-event.ts +0 -163
  196. package/src/transaction.ts +0 -190
@@ -1,31 +1,68 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
29
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
30
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31
+ if (ar || !(i in from)) {
32
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
33
+ ar[i] = from[i];
34
+ }
35
+ }
36
+ return to.concat(ar || Array.prototype.slice.call(from));
37
+ };
2
38
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const type_1 = require("../utils/type");
4
- const datatype_1 = require("./datatype");
39
+ exports.decodeInternalDataType = exports.encodeInternalDataType = exports.isConversionRequired = exports.mergeConditionAfterEncode = exports.flattenObject = exports.flattenQueryObject = void 0;
40
+ var type_1 = require("../utils/type");
41
+ var datatype_1 = require("./datatype");
5
42
  function flatten(query, shouldPreserverObject, parents, visited) {
6
- const cloned = Object.assign({}, query);
7
- for (const key in query) {
43
+ var cloned = __assign({}, query);
44
+ for (var key in query) {
8
45
  if (/^\$/.test(key))
9
46
  continue;
10
- const value = query[key];
47
+ var value = query[key];
11
48
  if (value === undefined) {
12
49
  delete cloned[key];
13
50
  continue;
14
51
  }
15
52
  if (!value)
16
53
  continue;
17
- if (type_1.isObject(value) && !shouldPreserverObject(value)) {
54
+ if ((0, type_1.isObject)(value) && !shouldPreserverObject(value)) {
18
55
  if (visited.indexOf(value) > -1) {
19
56
  throw new Error('Cannot convert circular structure to JSON');
20
57
  }
21
- const newParents = [...parents, key];
22
- const newVisited = [...visited, value];
23
- const flattenedChild = flatten(value, shouldPreserverObject, newParents, newVisited);
58
+ var newParents = __spreadArray(__spreadArray([], __read(parents), false), [key], false);
59
+ var newVisited = __spreadArray(__spreadArray([], __read(visited), false), [value], false);
60
+ var flattenedChild = flatten(value, shouldPreserverObject, newParents, newVisited);
24
61
  cloned[key] = flattenedChild;
25
- let hasKeyNotCombined = false;
26
- for (const childKey in flattenedChild) {
62
+ var hasKeyNotCombined = false;
63
+ for (var childKey in flattenedChild) {
27
64
  if (!/^\$/.test(childKey)) {
28
- cloned[`${key}.${childKey}`] = flattenedChild[childKey];
65
+ cloned["".concat(key, ".").concat(childKey)] = flattenedChild[childKey];
29
66
  delete cloned[key][childKey];
30
67
  }
31
68
  else {
@@ -44,29 +81,29 @@ function flattenQueryObject(query) {
44
81
  }
45
82
  exports.flattenQueryObject = flattenQueryObject;
46
83
  function flattenObject(object) {
47
- return flatten(object, (_) => false, [], [object]);
84
+ return flatten(object, function (_) { return false; }, [], [object]);
48
85
  }
49
86
  exports.flattenObject = flattenObject;
50
87
  function mergeConditionAfterEncode(query, condition, key) {
51
88
  if (!condition[key]) {
52
89
  delete query[key];
53
90
  }
54
- for (const conditionKey in condition) {
91
+ for (var conditionKey in condition) {
55
92
  if (query[conditionKey]) {
56
- if (type_1.isArray(query[conditionKey])) {
93
+ if ((0, type_1.isArray)(query[conditionKey])) {
57
94
  query[conditionKey].push(condition[conditionKey]);
58
95
  }
59
- else if (type_1.isObject(query[conditionKey])) {
60
- if (type_1.isObject(condition[conditionKey])) {
96
+ else if ((0, type_1.isObject)(query[conditionKey])) {
97
+ if ((0, type_1.isObject)(condition[conditionKey])) {
61
98
  Object.assign(query[conditionKey], condition[conditionKey]);
62
99
  }
63
100
  else {
64
- console.warn(`unmergable condition, query is object but condition is ${type_1.getType(condition)}, can only overwrite`, condition, key);
101
+ console.warn("unmergable condition, query is object but condition is ".concat((0, type_1.getType)(condition), ", can only overwrite"), condition, key);
65
102
  query[conditionKey] = condition[conditionKey];
66
103
  }
67
104
  }
68
105
  else {
69
- console.warn(`to-merge query is of type ${type_1.getType(query)}, can only overwrite`, query, condition, key);
106
+ console.warn("to-merge query is of type ".concat((0, type_1.getType)(query), ", can only overwrite"), query, condition, key);
70
107
  query[conditionKey] = condition[conditionKey];
71
108
  }
72
109
  }
@@ -77,14 +114,14 @@ function mergeConditionAfterEncode(query, condition, key) {
77
114
  }
78
115
  exports.mergeConditionAfterEncode = mergeConditionAfterEncode;
79
116
  function isConversionRequired(val) {
80
- return type_1.isInternalObject(val) || type_1.isDate(val) || type_1.isRegExp(val);
117
+ return (0, type_1.isInternalObject)(val) || (0, type_1.isDate)(val) || (0, type_1.isRegExp)(val);
81
118
  }
82
119
  exports.isConversionRequired = isConversionRequired;
83
120
  function encodeInternalDataType(val) {
84
- return datatype_1.serialize(val);
121
+ return (0, datatype_1.serialize)(val);
85
122
  }
86
123
  exports.encodeInternalDataType = encodeInternalDataType;
87
124
  function decodeInternalDataType(object) {
88
- return datatype_1.deserialize(object);
125
+ return (0, datatype_1.deserialize)(object);
89
126
  }
90
127
  exports.decodeInternalDataType = decodeInternalDataType;
@@ -1,6 +1,6 @@
1
1
  import { LogicCommand } from '../commands/logic';
2
- export declare type IQueryCondition = Record<string, any> | LogicCommand;
3
- export declare type AnyObject = {
2
+ export type IQueryCondition = Record<string, any> | LogicCommand;
3
+ export type AnyObject = {
4
4
  [x: string]: any;
5
5
  };
6
6
  export declare function serialize(val: any): IQueryCondition;
@@ -1,15 +1,52 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
29
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
30
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31
+ if (ar || !(i in from)) {
32
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
33
+ ar[i] = from[i];
34
+ }
35
+ }
36
+ return to.concat(ar || Array.prototype.slice.call(from));
37
+ };
2
38
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const symbol_1 = require("../helper/symbol");
4
- const type_1 = require("../utils/type");
5
- const index_1 = require("../geo/index");
6
- const index_2 = require("../serverDate/index");
39
+ exports.deserialize = exports.serialize = void 0;
40
+ var symbol_1 = require("../helper/symbol");
41
+ var type_1 = require("../utils/type");
42
+ var index_1 = require("../geo/index");
43
+ var index_2 = require("../serverDate/index");
7
44
  function serialize(val) {
8
45
  return serializeHelper(val, [val]);
9
46
  }
10
47
  exports.serialize = serialize;
11
48
  function serializeHelper(val, visited) {
12
- if (type_1.isInternalObject(val)) {
49
+ if ((0, type_1.isInternalObject)(val)) {
13
50
  switch (val._internalType) {
14
51
  case symbol_1.SYMBOL_GEO_POINT: {
15
52
  return val.toJSON();
@@ -28,10 +65,10 @@ function serializeHelper(val, visited) {
28
65
  }
29
66
  }
30
67
  }
31
- else if (type_1.isDate(val)) {
68
+ else if ((0, type_1.isDate)(val)) {
32
69
  return val;
33
70
  }
34
- else if (type_1.isRegExp(val)) {
71
+ else if ((0, type_1.isRegExp)(val)) {
35
72
  return {
36
73
  $regularExpression: {
37
74
  pattern: val.source,
@@ -39,23 +76,23 @@ function serializeHelper(val, visited) {
39
76
  }
40
77
  };
41
78
  }
42
- else if (type_1.isArray(val)) {
43
- return val.map(item => {
79
+ else if ((0, type_1.isArray)(val)) {
80
+ return val.map(function (item) {
44
81
  if (visited.indexOf(item) > -1) {
45
82
  throw new Error('Cannot convert circular structure to JSON');
46
83
  }
47
- return serializeHelper(item, [...visited, item]);
84
+ return serializeHelper(item, __spreadArray(__spreadArray([], __read(visited), false), [item], false));
48
85
  });
49
86
  }
50
- else if (type_1.isObject(val)) {
51
- const rawRet = Object.assign({}, val);
52
- const finalRet = {};
53
- for (const key in rawRet) {
87
+ else if ((0, type_1.isObject)(val)) {
88
+ var rawRet = __assign({}, val);
89
+ var finalRet = {};
90
+ for (var key in rawRet) {
54
91
  if (visited.indexOf(rawRet[key]) > -1) {
55
92
  throw new Error('Cannot convert circular structure to JSON');
56
93
  }
57
94
  if (rawRet[key] !== undefined) {
58
- finalRet[key] = serializeHelper(rawRet[key], [...visited, rawRet[key]]);
95
+ finalRet[key] = serializeHelper(rawRet[key], __spreadArray(__spreadArray([], __read(visited), false), [rawRet[key]], false));
59
96
  }
60
97
  }
61
98
  return finalRet;
@@ -65,11 +102,11 @@ function serializeHelper(val, visited) {
65
102
  }
66
103
  }
67
104
  function deserialize(object) {
68
- const ret = Object.assign({}, object);
69
- for (const key in ret) {
105
+ var ret = __assign({}, object);
106
+ for (var key in ret) {
70
107
  switch (key) {
71
108
  case '$date': {
72
- switch (type_1.getType(ret[key])) {
109
+ switch ((0, type_1.getType)(ret[key])) {
73
110
  case 'number': {
74
111
  return new Date(ret[key]);
75
112
  }
@@ -82,9 +119,9 @@ function deserialize(object) {
82
119
  case 'type': {
83
120
  switch (ret.type) {
84
121
  case 'Point': {
85
- if (type_1.isArray(ret.coordinates) &&
86
- type_1.isNumber(ret.coordinates[0]) &&
87
- type_1.isNumber(ret.coordinates[1])) {
122
+ if ((0, type_1.isArray)(ret.coordinates) &&
123
+ (0, type_1.isNumber)(ret.coordinates[0]) &&
124
+ (0, type_1.isNumber)(ret.coordinates[1])) {
88
125
  return new index_1.Point(ret.coordinates[0], ret.coordinates[1]);
89
126
  }
90
127
  break;
@@ -1,6 +1,6 @@
1
1
  import { QueryCommand } from '../commands/query';
2
2
  import { LogicCommand } from '../commands/logic';
3
- export declare type IQueryCondition = Record<string, any> | LogicCommand;
3
+ export type IQueryCondition = Record<string, any> | LogicCommand;
4
4
  export declare class QuerySerializer {
5
5
  constructor();
6
6
  static encode(query: IQueryCondition | QueryCommand | LogicCommand): IQueryCondition;