@ahoo-wang/wow-client 9.2.0-rc.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 (404) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +291 -0
  3. package/README.zh-CN.md +267 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.cjs +1 -0
  5. package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.es.js +9 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.cjs +1 -0
  7. package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.es.js +6 -0
  8. package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.cjs +1 -0
  9. package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.es.js +8 -0
  10. package/dist/client/bindMethods.cjs +2 -0
  11. package/dist/client/bindMethods.cjs.map +1 -0
  12. package/dist/client/bindMethods.d.cts +13 -0
  13. package/dist/client/bindMethods.d.ts +13 -0
  14. package/dist/client/bindMethods.es.js +19 -0
  15. package/dist/client/bindMethods.es.js.map +1 -0
  16. package/dist/client/command/commandClient.cjs +2 -0
  17. package/dist/client/command/commandClient.cjs.map +1 -0
  18. package/dist/client/command/commandClient.d.cts +67 -0
  19. package/dist/client/command/commandClient.d.ts +67 -0
  20. package/dist/client/command/commandClient.es.js +38 -0
  21. package/dist/client/command/commandClient.es.js.map +1 -0
  22. package/dist/client/command/commandHeaders.cjs +2 -0
  23. package/dist/client/command/commandHeaders.cjs.map +1 -0
  24. package/dist/client/command/commandHeaders.d.cts +75 -0
  25. package/dist/client/command/commandHeaders.d.ts +75 -0
  26. package/dist/client/command/commandHeaders.es.js +31 -0
  27. package/dist/client/command/commandHeaders.es.js.map +1 -0
  28. package/dist/client/command/commandRequest.cjs +2 -0
  29. package/dist/client/command/commandRequest.cjs.map +1 -0
  30. package/dist/client/command/commandRequest.d.cts +180 -0
  31. package/dist/client/command/commandRequest.d.ts +180 -0
  32. package/dist/client/command/commandRequest.es.js +31 -0
  33. package/dist/client/command/commandRequest.es.js.map +1 -0
  34. package/dist/client/command/commandResult.d.cts +15 -0
  35. package/dist/client/command/commandResult.d.ts +15 -0
  36. package/dist/client/command/index.d.cts +5 -0
  37. package/dist/client/command/index.d.ts +5 -0
  38. package/dist/client/command/types.d.cts +71 -0
  39. package/dist/client/command/types.d.ts +71 -0
  40. package/dist/client/metadata/index.d.cts +2 -0
  41. package/dist/client/metadata/index.d.ts +2 -0
  42. package/dist/client/metadata/wowMetadata.d.cts +48 -0
  43. package/dist/client/metadata/wowMetadata.d.ts +48 -0
  44. package/dist/client/metadata/wowMetadataClient.cjs +2 -0
  45. package/dist/client/metadata/wowMetadataClient.cjs.map +1 -0
  46. package/dist/client/metadata/wowMetadataClient.d.cts +23 -0
  47. package/dist/client/metadata/wowMetadataClient.d.ts +23 -0
  48. package/dist/client/metadata/wowMetadataClient.es.js +25 -0
  49. package/dist/client/metadata/wowMetadataClient.es.js.map +1 -0
  50. package/dist/client/query/descriptor/descriptorEndpoints.cjs +2 -0
  51. package/dist/client/query/descriptor/descriptorEndpoints.cjs.map +1 -0
  52. package/dist/client/query/descriptor/descriptorEndpoints.d.cts +29 -0
  53. package/dist/client/query/descriptor/descriptorEndpoints.d.ts +29 -0
  54. package/dist/client/query/descriptor/descriptorEndpoints.es.js +69 -0
  55. package/dist/client/query/descriptor/descriptorEndpoints.es.js.map +1 -0
  56. package/dist/client/query/descriptor/endpointPaths.cjs +2 -0
  57. package/dist/client/query/descriptor/endpointPaths.cjs.map +1 -0
  58. package/dist/client/query/descriptor/endpointPaths.d.cts +4 -0
  59. package/dist/client/query/descriptor/endpointPaths.d.ts +4 -0
  60. package/dist/client/query/descriptor/endpointPaths.es.js +9 -0
  61. package/dist/client/query/descriptor/endpointPaths.es.js.map +1 -0
  62. package/dist/client/query/descriptor/index.d.cts +2 -0
  63. package/dist/client/query/descriptor/index.d.ts +2 -0
  64. package/dist/client/query/descriptor/queryDescriptorApi.d.cts +58 -0
  65. package/dist/client/query/descriptor/queryDescriptorApi.d.ts +58 -0
  66. package/dist/client/query/descriptor/queryDescriptorClient.cjs +2 -0
  67. package/dist/client/query/descriptor/queryDescriptorClient.cjs.map +1 -0
  68. package/dist/client/query/descriptor/queryDescriptorClient.d.cts +61 -0
  69. package/dist/client/query/descriptor/queryDescriptorClient.d.ts +61 -0
  70. package/dist/client/query/descriptor/queryDescriptorClient.es.js +20 -0
  71. package/dist/client/query/descriptor/queryDescriptorClient.es.js.map +1 -0
  72. package/dist/client/query/event/domainEventStream.cjs +2 -0
  73. package/dist/client/query/event/domainEventStream.cjs.map +1 -0
  74. package/dist/client/query/event/domainEventStream.d.cts +105 -0
  75. package/dist/client/query/event/domainEventStream.d.ts +105 -0
  76. package/dist/client/query/event/domainEventStream.es.js +23 -0
  77. package/dist/client/query/event/domainEventStream.es.js.map +1 -0
  78. package/dist/client/query/event/endpointPaths.cjs +2 -0
  79. package/dist/client/query/event/endpointPaths.cjs.map +1 -0
  80. package/dist/client/query/event/endpointPaths.d.cts +8 -0
  81. package/dist/client/query/event/endpointPaths.d.ts +8 -0
  82. package/dist/client/query/event/endpointPaths.es.js +13 -0
  83. package/dist/client/query/event/endpointPaths.es.js.map +1 -0
  84. package/dist/client/query/event/eventStreamQueryApi.d.cts +29 -0
  85. package/dist/client/query/event/eventStreamQueryApi.d.ts +29 -0
  86. package/dist/client/query/event/eventStreamQueryClient.cjs +2 -0
  87. package/dist/client/query/event/eventStreamQueryClient.cjs.map +1 -0
  88. package/dist/client/query/event/eventStreamQueryClient.d.cts +190 -0
  89. package/dist/client/query/event/eventStreamQueryClient.d.ts +190 -0
  90. package/dist/client/query/event/eventStreamQueryClient.es.js +160 -0
  91. package/dist/client/query/event/eventStreamQueryClient.es.js.map +1 -0
  92. package/dist/client/query/event/index.d.cts +3 -0
  93. package/dist/client/query/event/index.d.ts +3 -0
  94. package/dist/client/query/factory.cjs +2 -0
  95. package/dist/client/query/factory.cjs.map +1 -0
  96. package/dist/client/query/factory.d.cts +165 -0
  97. package/dist/client/query/factory.d.ts +165 -0
  98. package/dist/client/query/factory.es.js +45 -0
  99. package/dist/client/query/factory.es.js.map +1 -0
  100. package/dist/client/query/index.d.cts +6 -0
  101. package/dist/client/query/index.d.ts +6 -0
  102. package/dist/client/query/queryApi.d.cts +68 -0
  103. package/dist/client/query/queryApi.d.ts +68 -0
  104. package/dist/client/query/requests.d.cts +24 -0
  105. package/dist/client/query/requests.d.ts +24 -0
  106. package/dist/client/query/snapshot/endpointPaths.cjs +2 -0
  107. package/dist/client/query/snapshot/endpointPaths.cjs.map +1 -0
  108. package/dist/client/query/snapshot/endpointPaths.d.cts +12 -0
  109. package/dist/client/query/snapshot/endpointPaths.d.ts +12 -0
  110. package/dist/client/query/snapshot/endpointPaths.es.js +17 -0
  111. package/dist/client/query/snapshot/endpointPaths.es.js.map +1 -0
  112. package/dist/client/query/snapshot/index.d.cts +3 -0
  113. package/dist/client/query/snapshot/index.d.ts +3 -0
  114. package/dist/client/query/snapshot/snapshot.cjs +2 -0
  115. package/dist/client/query/snapshot/snapshot.cjs.map +1 -0
  116. package/dist/client/query/snapshot/snapshot.d.cts +51 -0
  117. package/dist/client/query/snapshot/snapshot.d.ts +51 -0
  118. package/dist/client/query/snapshot/snapshot.es.js +20 -0
  119. package/dist/client/query/snapshot/snapshot.es.js.map +1 -0
  120. package/dist/client/query/snapshot/snapshotQueryApi.d.cts +101 -0
  121. package/dist/client/query/snapshot/snapshotQueryApi.d.ts +101 -0
  122. package/dist/client/query/snapshot/snapshotQueryClient.cjs +2 -0
  123. package/dist/client/query/snapshot/snapshotQueryClient.cjs.map +1 -0
  124. package/dist/client/query/snapshot/snapshotQueryClient.d.cts +369 -0
  125. package/dist/client/query/snapshot/snapshotQueryClient.d.ts +369 -0
  126. package/dist/client/query/snapshot/snapshotQueryClient.es.js +239 -0
  127. package/dist/client/query/snapshot/snapshotQueryClient.es.js.map +1 -0
  128. package/dist/client/query/state/endpointPaths.cjs +2 -0
  129. package/dist/client/query/state/endpointPaths.cjs.map +1 -0
  130. package/dist/client/query/state/endpointPaths.d.cts +10 -0
  131. package/dist/client/query/state/endpointPaths.d.ts +10 -0
  132. package/dist/client/query/state/endpointPaths.es.js +14 -0
  133. package/dist/client/query/state/endpointPaths.es.js.map +1 -0
  134. package/dist/client/query/state/index.d.cts +4 -0
  135. package/dist/client/query/state/index.d.ts +4 -0
  136. package/dist/client/query/state/loadOwnerStateAggregateApi.d.cts +36 -0
  137. package/dist/client/query/state/loadOwnerStateAggregateApi.d.ts +36 -0
  138. package/dist/client/query/state/loadOwnerStateAggregateClient.cjs +2 -0
  139. package/dist/client/query/state/loadOwnerStateAggregateClient.cjs.map +1 -0
  140. package/dist/client/query/state/loadOwnerStateAggregateClient.d.cts +58 -0
  141. package/dist/client/query/state/loadOwnerStateAggregateClient.d.ts +58 -0
  142. package/dist/client/query/state/loadOwnerStateAggregateClient.es.js +56 -0
  143. package/dist/client/query/state/loadOwnerStateAggregateClient.es.js.map +1 -0
  144. package/dist/client/query/state/loadStateAggregateApi.d.cts +37 -0
  145. package/dist/client/query/state/loadStateAggregateApi.d.ts +37 -0
  146. package/dist/client/query/state/loadStateAggregateClient.cjs +2 -0
  147. package/dist/client/query/state/loadStateAggregateClient.cjs.map +1 -0
  148. package/dist/client/query/state/loadStateAggregateClient.d.cts +62 -0
  149. package/dist/client/query/state/loadStateAggregateClient.d.ts +62 -0
  150. package/dist/client/query/state/loadStateAggregateClient.es.js +65 -0
  151. package/dist/client/query/state/loadStateAggregateClient.es.js.map +1 -0
  152. package/dist/client/routing.cjs +2 -0
  153. package/dist/client/routing.cjs.map +1 -0
  154. package/dist/client/routing.d.cts +47 -0
  155. package/dist/client/routing.d.ts +47 -0
  156. package/dist/client/routing.es.js +8 -0
  157. package/dist/client/routing.es.js.map +1 -0
  158. package/dist/dsl/aggregation/admit.cjs +2 -0
  159. package/dist/dsl/aggregation/admit.cjs.map +1 -0
  160. package/dist/dsl/aggregation/admit.d.cts +6 -0
  161. package/dist/dsl/aggregation/admit.d.ts +6 -0
  162. package/dist/dsl/aggregation/admit.es.js +142 -0
  163. package/dist/dsl/aggregation/admit.es.js.map +1 -0
  164. package/dist/dsl/aggregation/builders.cjs +2 -0
  165. package/dist/dsl/aggregation/builders.cjs.map +1 -0
  166. package/dist/dsl/aggregation/builders.d.cts +309 -0
  167. package/dist/dsl/aggregation/builders.d.ts +309 -0
  168. package/dist/dsl/aggregation/builders.es.js +188 -0
  169. package/dist/dsl/aggregation/builders.es.js.map +1 -0
  170. package/dist/dsl/aggregation/derived.cjs +2 -0
  171. package/dist/dsl/aggregation/derived.cjs.map +1 -0
  172. package/dist/dsl/aggregation/derived.d.cts +33 -0
  173. package/dist/dsl/aggregation/derived.d.ts +33 -0
  174. package/dist/dsl/aggregation/derived.es.js +31 -0
  175. package/dist/dsl/aggregation/derived.es.js.map +1 -0
  176. package/dist/dsl/aggregation/expressionTrees.cjs +2 -0
  177. package/dist/dsl/aggregation/expressionTrees.cjs.map +1 -0
  178. package/dist/dsl/aggregation/expressionTrees.d.cts +10 -0
  179. package/dist/dsl/aggregation/expressionTrees.d.ts +10 -0
  180. package/dist/dsl/aggregation/expressionTrees.es.js +44 -0
  181. package/dist/dsl/aggregation/expressionTrees.es.js.map +1 -0
  182. package/dist/dsl/aggregation/having.cjs +2 -0
  183. package/dist/dsl/aggregation/having.cjs.map +1 -0
  184. package/dist/dsl/aggregation/having.d.cts +94 -0
  185. package/dist/dsl/aggregation/having.d.ts +94 -0
  186. package/dist/dsl/aggregation/having.es.js +62 -0
  187. package/dist/dsl/aggregation/having.es.js.map +1 -0
  188. package/dist/dsl/aggregation/index.d.cts +4 -0
  189. package/dist/dsl/aggregation/index.d.ts +4 -0
  190. package/dist/dsl/aggregation/sort.cjs +2 -0
  191. package/dist/dsl/aggregation/sort.cjs.map +1 -0
  192. package/dist/dsl/aggregation/sort.d.cts +7 -0
  193. package/dist/dsl/aggregation/sort.d.ts +7 -0
  194. package/dist/dsl/aggregation/sort.es.js +10 -0
  195. package/dist/dsl/aggregation/sort.es.js.map +1 -0
  196. package/dist/dsl/aggregation/types.cjs +2 -0
  197. package/dist/dsl/aggregation/types.cjs.map +1 -0
  198. package/dist/dsl/aggregation/types.d.cts +608 -0
  199. package/dist/dsl/aggregation/types.d.ts +608 -0
  200. package/dist/dsl/aggregation/types.es.js +37 -0
  201. package/dist/dsl/aggregation/types.es.js.map +1 -0
  202. package/dist/dsl/cursorQuery.cjs +2 -0
  203. package/dist/dsl/cursorQuery.cjs.map +1 -0
  204. package/dist/dsl/cursorQuery.d.cts +69 -0
  205. package/dist/dsl/cursorQuery.d.ts +69 -0
  206. package/dist/dsl/cursorQuery.es.js +19 -0
  207. package/dist/dsl/cursorQuery.es.js.map +1 -0
  208. package/dist/dsl/deletionState.cjs +2 -0
  209. package/dist/dsl/deletionState.cjs.map +1 -0
  210. package/dist/dsl/deletionState.d.cts +19 -0
  211. package/dist/dsl/deletionState.d.ts +19 -0
  212. package/dist/dsl/deletionState.es.js +8 -0
  213. package/dist/dsl/deletionState.es.js.map +1 -0
  214. package/dist/dsl/descriptor.cjs +2 -0
  215. package/dist/dsl/descriptor.cjs.map +1 -0
  216. package/dist/dsl/descriptor.d.cts +629 -0
  217. package/dist/dsl/descriptor.d.ts +629 -0
  218. package/dist/dsl/descriptor.es.js +37 -0
  219. package/dist/dsl/descriptor.es.js.map +1 -0
  220. package/dist/dsl/documents.d.cts +8 -0
  221. package/dist/dsl/documents.d.ts +8 -0
  222. package/dist/dsl/field.cjs +2 -0
  223. package/dist/dsl/field.cjs.map +1 -0
  224. package/dist/dsl/field.d.cts +2 -0
  225. package/dist/dsl/field.d.ts +2 -0
  226. package/dist/dsl/field.es.js +10 -0
  227. package/dist/dsl/field.es.js.map +1 -0
  228. package/dist/dsl/filter/builders.cjs +2 -0
  229. package/dist/dsl/filter/builders.cjs.map +1 -0
  230. package/dist/dsl/filter/builders.d.cts +962 -0
  231. package/dist/dsl/filter/builders.d.ts +962 -0
  232. package/dist/dsl/filter/builders.es.js +289 -0
  233. package/dist/dsl/filter/builders.es.js.map +1 -0
  234. package/dist/dsl/filter/datePattern.cjs +2 -0
  235. package/dist/dsl/filter/datePattern.cjs.map +1 -0
  236. package/dist/dsl/filter/datePattern.d.cts +8 -0
  237. package/dist/dsl/filter/datePattern.d.ts +8 -0
  238. package/dist/dsl/filter/datePattern.es.js +100 -0
  239. package/dist/dsl/filter/datePattern.es.js.map +1 -0
  240. package/dist/dsl/filter/index.d.cts +3 -0
  241. package/dist/dsl/filter/index.d.ts +3 -0
  242. package/dist/dsl/filter/operator.cjs +2 -0
  243. package/dist/dsl/filter/operator.cjs.map +1 -0
  244. package/dist/dsl/filter/operator.d.cts +113 -0
  245. package/dist/dsl/filter/operator.d.ts +113 -0
  246. package/dist/dsl/filter/operator.es.js +14 -0
  247. package/dist/dsl/filter/operator.es.js.map +1 -0
  248. package/dist/dsl/filter/scope.cjs +2 -0
  249. package/dist/dsl/filter/scope.cjs.map +1 -0
  250. package/dist/dsl/filter/scope.d.cts +15 -0
  251. package/dist/dsl/filter/scope.d.ts +15 -0
  252. package/dist/dsl/filter/scope.es.js +32 -0
  253. package/dist/dsl/filter/scope.es.js.map +1 -0
  254. package/dist/dsl/filter/types.d.cts +274 -0
  255. package/dist/dsl/filter/types.d.ts +274 -0
  256. package/dist/dsl/filter/validate.cjs +2 -0
  257. package/dist/dsl/filter/validate.cjs.map +1 -0
  258. package/dist/dsl/filter/validate.d.cts +18 -0
  259. package/dist/dsl/filter/validate.d.ts +18 -0
  260. package/dist/dsl/filter/validate.es.js +56 -0
  261. package/dist/dsl/filter/validate.es.js.map +1 -0
  262. package/dist/dsl/pagination.cjs +2 -0
  263. package/dist/dsl/pagination.cjs.map +1 -0
  264. package/dist/dsl/pagination.d.cts +28 -0
  265. package/dist/dsl/pagination.d.ts +28 -0
  266. package/dist/dsl/pagination.es.js +15 -0
  267. package/dist/dsl/pagination.es.js.map +1 -0
  268. package/dist/dsl/projection.cjs +2 -0
  269. package/dist/dsl/projection.cjs.map +1 -0
  270. package/dist/dsl/projection.d.cts +27 -0
  271. package/dist/dsl/projection.d.ts +27 -0
  272. package/dist/dsl/projection.es.js +12 -0
  273. package/dist/dsl/projection.es.js.map +1 -0
  274. package/dist/dsl/queryable.cjs +2 -0
  275. package/dist/dsl/queryable.cjs.map +1 -0
  276. package/dist/dsl/queryable.d.cts +101 -0
  277. package/dist/dsl/queryable.d.ts +101 -0
  278. package/dist/dsl/queryable.es.js +40 -0
  279. package/dist/dsl/queryable.es.js.map +1 -0
  280. package/dist/dsl/sort.cjs +2 -0
  281. package/dist/dsl/sort.cjs.map +1 -0
  282. package/dist/dsl/sort.d.cts +33 -0
  283. package/dist/dsl/sort.d.ts +33 -0
  284. package/dist/dsl/sort.es.js +21 -0
  285. package/dist/dsl/sort.es.js.map +1 -0
  286. package/dist/dsl.cjs +1 -0
  287. package/dist/dsl.d.cts +23 -0
  288. package/dist/dsl.d.ts +23 -0
  289. package/dist/dsl.es.js +14 -0
  290. package/dist/error/errorInfo.cjs +2 -0
  291. package/dist/error/errorInfo.cjs.map +1 -0
  292. package/dist/error/errorInfo.d.cts +139 -0
  293. package/dist/error/errorInfo.d.ts +139 -0
  294. package/dist/error/errorInfo.es.js +32 -0
  295. package/dist/error/errorInfo.es.js.map +1 -0
  296. package/dist/error/headers.cjs +2 -0
  297. package/dist/error/headers.cjs.map +1 -0
  298. package/dist/error/headers.d.cts +38 -0
  299. package/dist/error/headers.d.ts +38 -0
  300. package/dist/error/headers.es.js +10 -0
  301. package/dist/error/headers.es.js.map +1 -0
  302. package/dist/error/index.d.cts +21 -0
  303. package/dist/error/index.d.ts +21 -0
  304. package/dist/error/queryErrorCodes.cjs +2 -0
  305. package/dist/error/queryErrorCodes.cjs.map +1 -0
  306. package/dist/error/queryErrorCodes.d.cts +199 -0
  307. package/dist/error/queryErrorCodes.d.ts +199 -0
  308. package/dist/error/queryErrorCodes.es.js +53 -0
  309. package/dist/error/queryErrorCodes.es.js.map +1 -0
  310. package/dist/error/wowError.cjs +2 -0
  311. package/dist/error/wowError.cjs.map +1 -0
  312. package/dist/error/wowError.d.cts +99 -0
  313. package/dist/error/wowError.d.ts +99 -0
  314. package/dist/error/wowError.es.js +53 -0
  315. package/dist/error/wowError.es.js.map +1 -0
  316. package/dist/index.cjs +1 -0
  317. package/dist/index.d.cts +17 -0
  318. package/dist/index.d.ts +17 -0
  319. package/dist/index.es.js +34 -0
  320. package/dist/legacy/condition.cjs +2 -0
  321. package/dist/legacy/condition.cjs.map +1 -0
  322. package/dist/legacy/condition.d.cts +517 -0
  323. package/dist/legacy/condition.d.ts +517 -0
  324. package/dist/legacy/condition.es.js +338 -0
  325. package/dist/legacy/condition.es.js.map +1 -0
  326. package/dist/legacy/index.d.cts +16 -0
  327. package/dist/legacy/index.d.ts +16 -0
  328. package/dist/legacy/locale/en_US.cjs +2 -0
  329. package/dist/legacy/locale/en_US.cjs.map +1 -0
  330. package/dist/legacy/locale/en_US.d.cts +7 -0
  331. package/dist/legacy/locale/en_US.d.ts +7 -0
  332. package/dist/legacy/locale/en_US.es.js +50 -0
  333. package/dist/legacy/locale/en_US.es.js.map +1 -0
  334. package/dist/legacy/locale/operatorLocale.d.cts +10 -0
  335. package/dist/legacy/locale/operatorLocale.d.ts +10 -0
  336. package/dist/legacy/locale/zh_CN.cjs +2 -0
  337. package/dist/legacy/locale/zh_CN.cjs.map +1 -0
  338. package/dist/legacy/locale/zh_CN.d.cts +7 -0
  339. package/dist/legacy/locale/zh_CN.d.ts +7 -0
  340. package/dist/legacy/locale/zh_CN.es.js +50 -0
  341. package/dist/legacy/locale/zh_CN.es.js.map +1 -0
  342. package/dist/legacy/operator.cjs +2 -0
  343. package/dist/legacy/operator.cjs.map +1 -0
  344. package/dist/legacy/operator.d.cts +218 -0
  345. package/dist/legacy/operator.d.ts +218 -0
  346. package/dist/legacy/operator.es.js +25 -0
  347. package/dist/legacy/operator.es.js.map +1 -0
  348. package/dist/legacy/queryable.cjs +2 -0
  349. package/dist/legacy/queryable.cjs.map +1 -0
  350. package/dist/legacy/queryable.d.cts +61 -0
  351. package/dist/legacy/queryable.d.ts +61 -0
  352. package/dist/legacy/queryable.es.js +34 -0
  353. package/dist/legacy/queryable.es.js.map +1 -0
  354. package/dist/legacy.cjs +1 -0
  355. package/dist/legacy.es.js +6 -0
  356. package/dist/model/abac.cjs +2 -0
  357. package/dist/model/abac.cjs.map +1 -0
  358. package/dist/model/abac.d.cts +33 -0
  359. package/dist/model/abac.d.ts +33 -0
  360. package/dist/model/abac.es.js +6 -0
  361. package/dist/model/abac.es.js.map +1 -0
  362. package/dist/model/bi.cjs +2 -0
  363. package/dist/model/bi.cjs.map +1 -0
  364. package/dist/model/bi.d.cts +12 -0
  365. package/dist/model/bi.d.ts +12 -0
  366. package/dist/model/bi.es.js +8 -0
  367. package/dist/model/bi.es.js.map +1 -0
  368. package/dist/model/command.cjs +2 -0
  369. package/dist/model/command.cjs.map +1 -0
  370. package/dist/model/command.d.cts +137 -0
  371. package/dist/model/command.d.ts +137 -0
  372. package/dist/model/command.es.js +8 -0
  373. package/dist/model/command.es.js.map +1 -0
  374. package/dist/model/common.d.cts +19 -0
  375. package/dist/model/common.d.ts +19 -0
  376. package/dist/model/function.cjs +2 -0
  377. package/dist/model/function.cjs.map +1 -0
  378. package/dist/model/function.d.cts +41 -0
  379. package/dist/model/function.d.ts +41 -0
  380. package/dist/model/function.es.js +8 -0
  381. package/dist/model/function.es.js.map +1 -0
  382. package/dist/model/index.d.cts +22 -0
  383. package/dist/model/index.d.ts +22 -0
  384. package/dist/model/messaging.d.cts +5 -0
  385. package/dist/model/messaging.d.ts +5 -0
  386. package/dist/model/modeling.d.cts +145 -0
  387. package/dist/model/modeling.d.ts +145 -0
  388. package/dist/model/naming.d.cts +27 -0
  389. package/dist/model/naming.d.ts +27 -0
  390. package/dist/transport/endpoints.cjs +2 -0
  391. package/dist/transport/endpoints.cjs.map +1 -0
  392. package/dist/transport/endpoints.d.cts +79 -0
  393. package/dist/transport/endpoints.d.ts +79 -0
  394. package/dist/transport/endpoints.es.js +14 -0
  395. package/dist/transport/endpoints.es.js.map +1 -0
  396. package/dist/transport/eventStreams.cjs +2 -0
  397. package/dist/transport/eventStreams.cjs.map +1 -0
  398. package/dist/transport/eventStreams.d.cts +23 -0
  399. package/dist/transport/eventStreams.d.ts +23 -0
  400. package/dist/transport/eventStreams.es.js +22 -0
  401. package/dist/transport/eventStreams.es.js.map +1 -0
  402. package/dist/transport/index.d.cts +1 -0
  403. package/dist/transport/index.d.ts +1 -0
  404. package/package.json +110 -0
@@ -0,0 +1,274 @@
1
+ import { AggregationExpression, ComparisonOperator } from '../aggregation/types.js';
2
+ import { DeletionState } from '../deletionState.js';
3
+ import { FilterOperator, SearchMode, StringComparison, TimeUnit } from './operator.js';
4
+ /**
5
+ * Dot-separated logical field path. The first segment is a name; later
6
+ * segments are names or decimal array indexes. A name may start with `@`,
7
+ * begins with an ASCII letter or `_`, and continues with ASCII letters,
8
+ * digits, `_` or `-`. Builders throw `TypeError` for any other string.
9
+ */
10
+ export type QueryField<FIELDS extends string = string> = FIELDS;
11
+ /**
12
+ * JSON scalar accepted as a filter value. Numbers must be finite.
13
+ */
14
+ export type FilterLiteral = null | string | number | boolean;
15
+ /**
16
+ * Value accepted by `EQ` and `NE`, including `null`.
17
+ */
18
+ export type EqualityFilterValue = FilterLiteral;
19
+ /**
20
+ * Non-null JSON scalar accepted by comparison, range and collection filters.
21
+ */
22
+ export type ComparableFilterLiteral = Exclude<FilterLiteral, null>;
23
+ /**
24
+ * Constant filter: `MATCH_ALL` matches everything in the query scope,
25
+ * `MATCH_NONE` matches nothing.
26
+ */
27
+ export type MatchFilter = {
28
+ op: FilterOperator.MATCH_ALL | FilterOperator.MATCH_NONE;
29
+ };
30
+ /**
31
+ * Root-only filter on one system identifier: record ID, aggregate ID,
32
+ * tenant, owner or space.
33
+ */
34
+ export type MetadataValueFilter = {
35
+ op: FilterOperator.ID | FilterOperator.AGGREGATE_ID | FilterOperator.TENANT_ID | FilterOperator.OWNER_ID | FilterOperator.SPACE_ID;
36
+ value: string;
37
+ };
38
+ /**
39
+ * Root-only filter on a non-empty set of record IDs or aggregate IDs.
40
+ */
41
+ export type MetadataValuesFilter = {
42
+ op: FilterOperator.IDS | FilterOperator.AGGREGATE_IDS;
43
+ values: string[];
44
+ };
45
+ /**
46
+ * Any root-only system identifier filter.
47
+ */
48
+ export type MetadataFilter = MetadataValueFilter | MetadataValuesFilter;
49
+ /**
50
+ * `AND`, `OR` or `NOR` over a non-empty list of filter expressions.
51
+ */
52
+ export type LogicalFilter<FIELDS extends string = string> = {
53
+ op: FilterOperator.AND | FilterOperator.OR | FilterOperator.NOR;
54
+ operands: FilterExpression<FIELDS>[];
55
+ };
56
+ /**
57
+ * `AND`, `OR` or `NOR` whose operands are all valid inside an
58
+ * `ELEMENT_MATCH` predicate.
59
+ */
60
+ export type ElementLogicalFilter<FIELDS extends string = string> = {
61
+ op: FilterOperator.AND | FilterOperator.OR | FilterOperator.NOR;
62
+ operands: ElementFilterExpression<FIELDS>[];
63
+ };
64
+ /**
65
+ * `EQ` or `NE` on a field. The server rewrites a `null` value to `IS_NULL`
66
+ * or `IS_NOT_NULL`.
67
+ */
68
+ export type EqualityFilter<FIELDS extends string = string> = {
69
+ op: FilterOperator.EQ | FilterOperator.NE;
70
+ field: QueryField<FIELDS>;
71
+ value: EqualityFilterValue;
72
+ };
73
+ /**
74
+ * `GT`, `GTE`, `LT` or `LTE` on a field against a non-null scalar.
75
+ */
76
+ export type ComparisonFilter<FIELDS extends string = string> = {
77
+ op: FilterOperator.GT | FilterOperator.GTE | FilterOperator.LT | FilterOperator.LTE;
78
+ field: QueryField<FIELDS>;
79
+ value: ComparableFilterLiteral;
80
+ };
81
+ /**
82
+ * Literal substring, prefix or suffix match on a string field. No full-text
83
+ * analyzer is applied. `stringComparison` defaults to `CASE_SENSITIVE`.
84
+ */
85
+ export type StringFilter<FIELDS extends string = string> = {
86
+ op: FilterOperator.CONTAINS | FilterOperator.STARTS_WITH | FilterOperator.ENDS_WITH;
87
+ field: QueryField<FIELDS>;
88
+ value: string;
89
+ stringComparison?: StringComparison;
90
+ };
91
+ /**
92
+ * `IN`, `NOT_IN` or `CONTAINS_ALL` on a field against a non-empty list of
93
+ * non-null scalars.
94
+ */
95
+ export type CollectionFilter<FIELDS extends string = string> = {
96
+ op: FilterOperator.IN | FilterOperator.NOT_IN | FilterOperator.CONTAINS_ALL;
97
+ field: QueryField<FIELDS>;
98
+ values: ComparableFilterLiteral[];
99
+ };
100
+ /**
101
+ * Inclusive range on a field: `lowerBound <= field <= upperBound`.
102
+ */
103
+ export type BetweenFilter<FIELDS extends string = string> = {
104
+ op: FilterOperator.BETWEEN;
105
+ field: QueryField<FIELDS>;
106
+ lowerBound: ComparableFilterLiteral;
107
+ upperBound: ComparableFilterLiteral;
108
+ };
109
+ /**
110
+ * Operand-free check of a field's null, existence, empty-collection or
111
+ * empty-string state.
112
+ */
113
+ export type FieldPresenceFilter<FIELDS extends string = string> = {
114
+ op: FilterOperator.IS_EMPTY | FilterOperator.IS_EMPTY_STRING | FilterOperator.IS_NOT_EMPTY_STRING | FilterOperator.IS_NULL | FilterOperator.IS_NOT_NULL | FilterOperator.EXISTS | FilterOperator.NOT_EXISTS;
115
+ field: QueryField<FIELDS>;
116
+ };
117
+ /**
118
+ * Root-only filter on the deletion state of snapshots.
119
+ */
120
+ export type DeletionFilter = {
121
+ op: FilterOperator.DELETION;
122
+ state: DeletionState;
123
+ };
124
+ /**
125
+ * Matches when a single element of the array `field` satisfies `predicate`.
126
+ * Predicate fields are relative to the element.
127
+ */
128
+ export type ElementMatchFilter<FIELDS extends string = string, ELEMENT_FIELDS extends string = string> = {
129
+ op: FilterOperator.ELEMENT_MATCH;
130
+ field: QueryField<FIELDS>;
131
+ predicate: ElementFilterExpression<ELEMENT_FIELDS>;
132
+ };
133
+ /**
134
+ * Full-text search. Matching depends on the backend's index and analyzer.
135
+ * Empty `fields` means the backend's default search fields, a model-wide
136
+ * search, which only a record can answer; inside an `ELEMENT_MATCH` a
137
+ * search must name its fields: see {@link ElementSearchFilter}.
138
+ */
139
+ export type SearchFilter<FIELDS extends string = string> = {
140
+ op: FilterOperator.SEARCH;
141
+ query: string;
142
+ fields?: QueryField<FIELDS>[];
143
+ /**
144
+ * Matching mode. Defaults to `SearchMode.TERMS`.
145
+ */
146
+ mode?: SearchMode;
147
+ };
148
+ /**
149
+ * A `SEARCH` that names at least one field: the only search an
150
+ * `ELEMENT_MATCH` predicate takes, with fields relative to the element.
151
+ * `filter.search(query, { fields: ['name'] })` builds one. Wow 9.2 and
152
+ * later, on a storage that lists `elements[].search` in the descriptor.
153
+ */
154
+ export type ElementSearchFilter<FIELDS extends string = string> = SearchFilter<FIELDS> & {
155
+ fields: [QueryField<FIELDS>, ...QueryField<FIELDS>[]];
156
+ };
157
+ /**
158
+ * Options for {@link filter.search}.
159
+ */
160
+ export interface SearchFilterOptions<FIELDS extends string = string> {
161
+ /**
162
+ * Fields to search. Defaults to `[]`, the backend's default search fields.
163
+ */
164
+ fields?: readonly QueryField<FIELDS>[];
165
+ /**
166
+ * Matching mode. Defaults to `SearchMode.TERMS`.
167
+ */
168
+ mode?: SearchMode;
169
+ }
170
+ /**
171
+ * Options shared by relative time filters. Unset options are omitted from
172
+ * the payload, except `timeUnit`, which the builders always send.
173
+ */
174
+ export interface RelativeTimeFilterOptions {
175
+ /**
176
+ * Time zone that defines calendar days, e.g. `Asia/Shanghai` or `+08:00`.
177
+ * Defaults to the server process time zone. Must not be blank. A value
178
+ * that starts with an optional `UTC`, `GMT` or `UT` prefix followed by `+`
179
+ * or `-` must be a valid offset within +/-18:00; region IDs are checked by
180
+ * the server only.
181
+ */
182
+ zoneId?: string;
183
+ /**
184
+ * `java.time.format.DateTimeFormatter` pattern for fields stored as
185
+ * formatted strings, e.g. `yyyy-MM-dd`. Must equal the pattern declared by
186
+ * the query schema. Must not be blank.
187
+ */
188
+ datePattern?: string;
189
+ /**
190
+ * Unit of a numeric epoch field. Defaults to `TimeUnit.MILLISECONDS`.
191
+ * Ignored when `datePattern` is set.
192
+ */
193
+ timeUnit?: TimeUnit;
194
+ }
195
+ /**
196
+ * Matches times in a calendar window relative to now: `[start, end)` in the
197
+ * configured time zone. Weeks start on Monday.
198
+ */
199
+ export type CalendarFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
200
+ op: FilterOperator.TODAY | FilterOperator.TOMORROW | FilterOperator.THIS_WEEK | FilterOperator.NEXT_WEEK | FilterOperator.LAST_WEEK | FilterOperator.THIS_MONTH | FilterOperator.LAST_MONTH | FilterOperator.YESTERDAY | FilterOperator.NEXT_MONTH | FilterOperator.LAST_YEAR | FilterOperator.THIS_YEAR | FilterOperator.NEXT_YEAR;
201
+ field: QueryField<FIELDS>;
202
+ };
203
+ /**
204
+ * Matches times earlier than today at the local time `time`.
205
+ */
206
+ export type BeforeTodayFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
207
+ op: FilterOperator.BEFORE_TODAY;
208
+ field: QueryField<FIELDS>;
209
+ time: string;
210
+ };
211
+ /**
212
+ * `RECENT_DAYS` matches today and the `days - 1` previous calendar days;
213
+ * `EARLIER_DAYS` matches times before that window.
214
+ */
215
+ export type DaysFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
216
+ op: FilterOperator.RECENT_DAYS | FilterOperator.EARLIER_DAYS;
217
+ field: QueryField<FIELDS>;
218
+ days: number;
219
+ };
220
+ /**
221
+ * `BEFORE_NOW` matches times strictly before the server's `now + offset`;
222
+ * `AFTER_NOW` matches times strictly after it. The server reads its clock
223
+ * once per query, so every condition of one query compares against the same
224
+ * moment and a saved query never depends on the client's clock. `offset` is
225
+ * an ISO-8601 duration (`PT0S`, `-PT30M`, `P1DT2H`); a negative offset looks
226
+ * back.
227
+ *
228
+ * Needs a Wow server of 9.2.0 or later; an earlier one refuses the operator.
229
+ */
230
+ export type NowFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
231
+ op: FilterOperator.BEFORE_NOW | FilterOperator.AFTER_NOW;
232
+ field: QueryField<FIELDS>;
233
+ offset: string;
234
+ };
235
+ /**
236
+ * Filter expression allowed inside an `ELEMENT_MATCH` predicate. Excludes
237
+ * root-only filters: system identifiers, `DELETION` and a model-wide
238
+ * `SEARCH`; a `SEARCH` that names its fields is an element predicate. An
239
+ * aggregation element's filter takes no `SEARCH` at all, which
240
+ * {@link aggregation.element} checks when it runs.
241
+ */
242
+ export type ElementFilterExpression<FIELDS extends string = string> = MatchFilter | ElementLogicalFilter<FIELDS> | EqualityFilter<FIELDS> | ComparisonFilter<FIELDS> | StringFilter<FIELDS> | CollectionFilter<FIELDS> | BetweenFilter<FIELDS> | FieldPresenceFilter<FIELDS> | ElementMatchFilter<FIELDS> | CalendarFilter<FIELDS> | BeforeTodayFilter<FIELDS> | DaysFilter<FIELDS> | NowFilter<FIELDS> | ElementSearchFilter<FIELDS>;
243
+ /**
244
+ * A computed expression compared with a number; {@link filter.expression}.
245
+ * The expression is an {@link AggregationExpression}, such as a `DATE_DIFF`
246
+ * between two time fields, evaluated per record. A record whose expression
247
+ * has no value (an operand is absent or holds several values, or a division
248
+ * by zero) does not match, whatever the comparison, `NE` included.
249
+ *
250
+ * Allowed at the root, in a metric's filter and in an aggregation element's
251
+ * filter, but not inside `ELEMENT_MATCH`. It is an expensive operator: the
252
+ * descriptor lists `EXPRESSION` in `record.rootOperators` only where the
253
+ * server allows expensive operators. Wow 9.2 and later.
254
+ */
255
+ export type ExpressionFilter<FIELDS extends string = string> = {
256
+ op: FilterOperator.EXPRESSION;
257
+ /** The per-record value compared; it reads at least one field. */
258
+ expression: AggregationExpression<FIELDS>;
259
+ /** How the value compares with `value`. */
260
+ comparison: ComparisonOperator;
261
+ /** A finite number. */
262
+ value: number;
263
+ };
264
+ /**
265
+ * Filter expression sent to the query API. Build values with
266
+ * {@link filter}.
267
+ */
268
+ export type FilterExpression<FIELDS extends string = string> = MatchFilter | MetadataFilter | LogicalFilter<FIELDS> | EqualityFilter<FIELDS> | ComparisonFilter<FIELDS> | StringFilter<FIELDS> | CollectionFilter<FIELDS> | BetweenFilter<FIELDS> | FieldPresenceFilter<FIELDS> | DeletionFilter | ElementMatchFilter<FIELDS> | SearchFilter<FIELDS> | CalendarFilter<FIELDS> | BeforeTodayFilter<FIELDS> | DaysFilter<FIELDS> | NowFilter<FIELDS> | ExpressionFilter<FIELDS>;
269
+ /**
270
+ * Query that carries a filter expression.
271
+ */
272
+ export interface FilterCapable<FIELDS extends string = string> {
273
+ filter: FilterExpression<FIELDS>;
274
+ }
@@ -0,0 +1,2 @@
1
+ const e=require("./operator.cjs"),t=require("./datePattern.cjs");var n=/^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?$/,r=/^(?:UTC|GMT|UT)?[+-](\d{1,2}|\d{4}|\d{6}|\d{2}:\d{2}|\d{2}:\d{2}:\d{2})$/,i=/^(?:UTC|GMT|UT)?[+-]/,a=/^[-+]?P(?=.*[0-9])(?:[-+]?[0-9]+D)?(?:T(?=[-+]?[0-9])(?:[-+]?[0-9]+H)?(?:[-+]?[0-9]+M)?(?:[-+]?[0-9]+(?:[.,][0-9]{0,9})?S)?)?$/i;function o(e,t){if(!(e===null?t:typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e)))throw TypeError(`Filter value must be a JSON scalar.`);return e}function s(e,t){if(typeof t!=`string`)throw TypeError(`${e} must be a string.`);return t}function c(t){if(t!==e.StringComparison.CASE_SENSITIVE&&t!==e.StringComparison.CASE_INSENSITIVE)throw TypeError(`String comparison is invalid: [${String(t)}].`)}function l(e,t){if(t.length===0)throw TypeError(`${e} cannot be empty.`);if(t.some(e=>e==null))throw TypeError(`${e} cannot contain null.`)}function u(e){let t=r.exec(e);if(!t)return!1;let n=t[1],[i,a=0,o=0]=(n.includes(`:`)?n.split(`:`):n.length<=2?[n]:[n.slice(0,2),n.slice(2,4),n.slice(4,6)]).map(Number);return a<=59&&o<=59&&(i<18||i===18&&a===0&&o===0)}function d({zoneId:n,datePattern:r,timeUnit:a=e.TimeUnit.MILLISECONDS}){if(n!==void 0){if(typeof n!=`string`||!n.trim())throw TypeError(`zoneId cannot be blank.`);if(i.test(n)&&!u(n))throw TypeError(`zoneId is invalid: [${n}].`)}if(r!==void 0&&t.validateDatePattern(r),!Object.values(e.TimeUnit).includes(a))throw TypeError(`timeUnit is invalid: [${String(a)}].`);return{...n===void 0?{}:{zoneId:n},...r===void 0?{}:{datePattern:r},timeUnit:a}}function f(e,t){if(!Number.isInteger(t)||t<1||t>2147483647)throw TypeError(`${e} days must be a positive JVM Int.`)}function p(e,t){if(typeof t!=`string`||!a.test(t))throw TypeError(`${e} offset must be an ISO-8601 duration such as PT0S or -PT30M.`);return t}function m(e){if(typeof e!=`string`||!n.test(e))throw TypeError(`BEFORE_TODAY time is invalid.`);return e}exports.filterLiteral=o,exports.requireDuration=p,exports.requireLocalTime=m,exports.requireNonEmpty=l,exports.requiredString=s,exports.validateDays=f,exports.validateRelativeTimeOptions=d,exports.validateStringComparison=c;
2
+ //# sourceMappingURL=validate.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.cjs","names":["StringComparison","TimeUnit","require_operator","require_datePattern","LOCAL_TIME_PATTERN","OFFSET_ZONE_PATTERN","OFFSET_ZONE_CANDIDATE_PATTERN","DURATION_PATTERN","filterLiteral","value","nullable","requiredString","name","validateStringComparison","comparison","requireNonEmpty","values","isValidOffsetZone","match","zoneId","offset","hours","minutes","seconds","validateRelativeTimeOptions","datePattern","timeUnit","validateDays","days","operator","requireDuration","requireLocalTime","time"],"sources":["../../../src/dsl/filter/validate.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Internal: not re-exported by filter/index.ts. The argument checks the\n// filter builders share.\nimport { validateDatePattern } from './datePattern.js';\nimport { StringComparison, TimeUnit, type FilterOperator } from './operator.js';\nimport type { FilterLiteral, RelativeTimeFilterOptions } from './types.js';\n\nconst LOCAL_TIME_PATTERN =\n /^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\\.[0-9]{1,9})?)?$/;\nconst OFFSET_ZONE_PATTERN =\n /^(?:UTC|GMT|UT)?[+-](\\d{1,2}|\\d{4}|\\d{6}|\\d{2}:\\d{2}|\\d{2}:\\d{2}:\\d{2})$/;\nconst OFFSET_ZONE_CANDIDATE_PATTERN = /^(?:UTC|GMT|UT)?[+-]/;\n// java.time.Duration.parse: signed days, hours, minutes and seconds (up to\n// nine fraction digits after `.` or `,`), at least one of them, in that order,\n// case-insensitive. Weeks, months and years are not durations.\nconst DURATION_PATTERN =\n /^[-+]?P(?=.*[0-9])(?:[-+]?[0-9]+D)?(?:T(?=[-+]?[0-9])(?:[-+]?[0-9]+H)?(?:[-+]?[0-9]+M)?(?:[-+]?[0-9]+(?:[.,][0-9]{0,9})?S)?)?$/i;\n\nexport function filterLiteral<T extends FilterLiteral>(\n value: T,\n nullable: boolean,\n): T {\n const valid =\n value === null\n ? nullable\n : typeof value === 'string' ||\n typeof value === 'boolean' ||\n (typeof value === 'number' && Number.isFinite(value));\n if (!valid) {\n throw new TypeError('Filter value must be a JSON scalar.');\n }\n return value;\n}\n\nexport function requiredString(name: string, value: string): string {\n if (typeof value !== 'string') {\n throw new TypeError(`${name} must be a string.`);\n }\n return value;\n}\n\nexport function validateStringComparison(comparison: StringComparison): void {\n if (\n comparison !== StringComparison.CASE_SENSITIVE &&\n comparison !== StringComparison.CASE_INSENSITIVE\n ) {\n throw new TypeError(\n `String comparison is invalid: [${String(comparison)}].`,\n );\n }\n}\n\nexport function requireNonEmpty(\n name: string,\n values: readonly unknown[],\n): void {\n if (values.length === 0) {\n throw new TypeError(`${name} cannot be empty.`);\n }\n if (values.some(value => value === null || value === undefined)) {\n throw new TypeError(`${name} cannot contain null.`);\n }\n}\n\nfunction isValidOffsetZone(zoneId: string): boolean {\n const match = OFFSET_ZONE_PATTERN.exec(zoneId);\n if (!match) return false;\n const offset = match[1];\n const parts = offset.includes(':')\n ? offset.split(':')\n : offset.length <= 2\n ? [offset]\n : [offset.slice(0, 2), offset.slice(2, 4), offset.slice(4, 6)];\n const [hours, minutes = 0, seconds = 0] = parts.map(Number);\n return (\n minutes <= 59 &&\n seconds <= 59 &&\n (hours < 18 || (hours === 18 && minutes === 0 && seconds === 0))\n );\n}\n\nexport function validateRelativeTimeOptions({\n zoneId,\n datePattern,\n timeUnit = TimeUnit.MILLISECONDS,\n}: RelativeTimeFilterOptions): RelativeTimeFilterOptions & {\n timeUnit: TimeUnit;\n} {\n if (zoneId !== undefined) {\n if (typeof zoneId !== 'string' || !zoneId.trim()) {\n throw new TypeError('zoneId cannot be blank.');\n }\n if (\n OFFSET_ZONE_CANDIDATE_PATTERN.test(zoneId) &&\n !isValidOffsetZone(zoneId)\n ) {\n throw new TypeError(`zoneId is invalid: [${zoneId}].`);\n }\n }\n if (datePattern !== undefined) {\n validateDatePattern(datePattern);\n }\n if (!Object.values(TimeUnit).includes(timeUnit)) {\n throw new TypeError(`timeUnit is invalid: [${String(timeUnit)}].`);\n }\n return {\n ...(zoneId === undefined ? {} : { zoneId }),\n ...(datePattern === undefined ? {} : { datePattern }),\n timeUnit,\n };\n}\n\nexport function validateDays(operator: FilterOperator, days: number): void {\n if (!Number.isInteger(days) || days < 1 || days > 2_147_483_647) {\n throw new TypeError(`${operator} days must be a positive JVM Int.`);\n }\n}\n\n/**\n * Admits the ISO-8601 duration `BEFORE_NOW` and `AFTER_NOW` add to the\n * server's now, in the grammar `java.time.Duration.parse` accepts. A value\n * too large for a `Duration` is left to the server.\n */\nexport function requireDuration(\n operator: FilterOperator,\n offset: string,\n): string {\n if (typeof offset !== 'string' || !DURATION_PATTERN.test(offset)) {\n throw new TypeError(\n `${operator} offset must be an ISO-8601 duration such as PT0S or -PT30M.`,\n );\n }\n return offset;\n}\n\n/** Admits the 24-hour local time `BEFORE_TODAY` compares against. */\nexport function requireLocalTime(time: string): string {\n if (typeof time !== 'string' || !LOCAL_TIME_PATTERN.test(time)) {\n throw new TypeError('BEFORE_TODAY time is invalid.');\n }\n return time;\n}\n"],"mappings":"iEAmBA,IAAMI,EACJ,mEACIC,EACJ,2EACIC,EAAgC,uBAIhCC,EACJ,kIAEF,SAAgBC,EACd,EACA,EACG,CAOH,GAAI,EALFC,IAAU,KACNC,EACA,OAAOD,GAAU,UACjB,OAAOA,GAAU,WAChB,OAAOA,GAAU,UAAY,OAAO,SAASA,CAAK,GAEvD,MAAU,UAAU,qCAAqC,EAE3D,OAAOA,CACT,CAEA,SAAgBE,EAAe,EAAc,EAAuB,CAClE,GAAI,OAAOF,GAAU,SACnB,MAAU,UAAU,GAAGG,EAAK,mBAAmB,EAEjD,OAAOH,CACT,CAEA,SAAgBI,EAAyB,EAAoC,CAC3E,GACEC,IAAed,EAAAA,iBAAiB,gBAChCc,IAAed,EAAAA,iBAAiB,iBAEhC,MAAU,UACR,kCAAkC,OAAOc,CAAU,EAAE,GACvD,CAEJ,CAEA,SAAgBC,EACd,EACA,EACM,CACN,GAAIC,EAAO,SAAW,EACpB,MAAU,UAAU,GAAGJ,EAAK,kBAAkB,EAEhD,GAAII,EAAO,KAAK,GAASP,GAAU,IAA2B,EAC5D,MAAU,UAAU,GAAGG,EAAK,sBAAsB,CAEtD,CAEA,SAASK,EAAkB,EAAyB,CAClD,IAAMC,EAAQb,EAAoB,KAAKc,CAAM,EAC7C,GAAI,CAACD,EAAO,MAAO,GACnB,IAAME,EAASF,EAAM,GAMf,CAACG,EAAOC,EAAU,EAAGC,EAAU,IALvBH,EAAO,SAAS,GAAG,EAC7BA,EAAO,MAAM,GAAG,EAChBA,EAAO,QAAU,EACf,CAACA,CAAM,EACP,CAACA,EAAO,MAAM,EAAG,CAAC,EAAGA,EAAO,MAAM,EAAG,CAAC,EAAGA,EAAO,MAAM,EAAG,CAAC,CAAC,EAAA,CACjB,IAAI,MAAM,EAC1D,OACEE,GAAW,IACXC,GAAW,KACVF,EAAQ,IAAOA,IAAU,IAAMC,IAAY,GAAKC,IAAY,EAEjE,CAEA,SAAgBC,EAA4B,CAC1C,SACA,cACA,WAAWvB,EAAAA,SAAS,cAGpB,CACA,GAAIkB,IAAW,IAAA,GAAW,CACxB,GAAI,OAAOA,GAAW,UAAY,CAACA,EAAO,KAAK,EAC7C,MAAU,UAAU,yBAAyB,EAE/C,GACEb,EAA8B,KAAKa,CAAM,GACzC,CAACF,EAAkBE,CAAM,EAEzB,MAAU,UAAU,uBAAuBA,EAAO,GAAG,CAEzD,CAIA,GAHIM,IAAgB,IAAA,IAClBtB,EAAA,oBAAoBsB,CAAW,EAE7B,CAAC,OAAO,OAAOxB,EAAAA,QAAQ,CAAC,CAAC,SAASyB,CAAQ,EAC5C,MAAU,UAAU,yBAAyB,OAAOA,CAAQ,EAAE,GAAG,EAEnE,MAAO,CACL,GAAIP,IAAW,IAAA,GAAY,CAAC,EAAI,CAAE,QAAO,EACzC,GAAIM,IAAgB,IAAA,GAAY,CAAC,EAAI,CAAE,aAAY,EACnD,UACF,CACF,CAEA,SAAgBE,EAAa,EAA0B,EAAoB,CACzE,GAAI,CAAC,OAAO,UAAUC,CAAI,GAAKA,EAAO,GAAKA,EAAO,WAChD,MAAU,UAAU,GAAGC,EAAS,kCAAkC,CAEtE,CAOA,SAAgBC,EACd,EACA,EACQ,CACR,GAAI,OAAOV,GAAW,UAAY,CAACb,EAAiB,KAAKa,CAAM,EAC7D,MAAU,UACR,GAAGS,EAAS,6DACd,EAEF,OAAOT,CACT,CAGA,SAAgBW,EAAiB,EAAsB,CACrD,GAAI,OAAOC,GAAS,UAAY,CAAC5B,EAAmB,KAAK4B,CAAI,EAC3D,MAAU,UAAU,+BAA+B,EAErD,OAAOA,CACT"}
@@ -0,0 +1,18 @@
1
+ import { StringComparison, TimeUnit, FilterOperator } from './operator.cjs';
2
+ import { FilterLiteral, RelativeTimeFilterOptions } from './types.cjs';
3
+ export declare function filterLiteral<T extends FilterLiteral>(value: T, nullable: boolean): T;
4
+ export declare function requiredString(name: string, value: string): string;
5
+ export declare function validateStringComparison(comparison: StringComparison): void;
6
+ export declare function requireNonEmpty(name: string, values: readonly unknown[]): void;
7
+ export declare function validateRelativeTimeOptions({ zoneId, datePattern, timeUnit, }: RelativeTimeFilterOptions): RelativeTimeFilterOptions & {
8
+ timeUnit: TimeUnit;
9
+ };
10
+ export declare function validateDays(operator: FilterOperator, days: number): void;
11
+ /**
12
+ * Admits the ISO-8601 duration `BEFORE_NOW` and `AFTER_NOW` add to the
13
+ * server's now, in the grammar `java.time.Duration.parse` accepts. A value
14
+ * too large for a `Duration` is left to the server.
15
+ */
16
+ export declare function requireDuration(operator: FilterOperator, offset: string): string;
17
+ /** Admits the 24-hour local time `BEFORE_TODAY` compares against. */
18
+ export declare function requireLocalTime(time: string): string;
@@ -0,0 +1,18 @@
1
+ import { StringComparison, TimeUnit, FilterOperator } from './operator.js';
2
+ import { FilterLiteral, RelativeTimeFilterOptions } from './types.js';
3
+ export declare function filterLiteral<T extends FilterLiteral>(value: T, nullable: boolean): T;
4
+ export declare function requiredString(name: string, value: string): string;
5
+ export declare function validateStringComparison(comparison: StringComparison): void;
6
+ export declare function requireNonEmpty(name: string, values: readonly unknown[]): void;
7
+ export declare function validateRelativeTimeOptions({ zoneId, datePattern, timeUnit, }: RelativeTimeFilterOptions): RelativeTimeFilterOptions & {
8
+ timeUnit: TimeUnit;
9
+ };
10
+ export declare function validateDays(operator: FilterOperator, days: number): void;
11
+ /**
12
+ * Admits the ISO-8601 duration `BEFORE_NOW` and `AFTER_NOW` add to the
13
+ * server's now, in the grammar `java.time.Duration.parse` accepts. A value
14
+ * too large for a `Duration` is left to the server.
15
+ */
16
+ export declare function requireDuration(operator: FilterOperator, offset: string): string;
17
+ /** Admits the 24-hour local time `BEFORE_TODAY` compares against. */
18
+ export declare function requireLocalTime(time: string): string;
@@ -0,0 +1,56 @@
1
+ import { StringComparison as e, TimeUnit as t } from "./operator.es.js";
2
+ import { validateDatePattern as n } from "./datePattern.es.js";
3
+ //#region src/dsl/filter/validate.ts
4
+ var r = /^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?$/, i = /^(?:UTC|GMT|UT)?[+-](\d{1,2}|\d{4}|\d{6}|\d{2}:\d{2}|\d{2}:\d{2}:\d{2})$/, a = /^(?:UTC|GMT|UT)?[+-]/, o = /^[-+]?P(?=.*[0-9])(?:[-+]?[0-9]+D)?(?:T(?=[-+]?[0-9])(?:[-+]?[0-9]+H)?(?:[-+]?[0-9]+M)?(?:[-+]?[0-9]+(?:[.,][0-9]{0,9})?S)?)?$/i;
5
+ function s(e, t) {
6
+ if (!(e === null ? t : typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e))) throw TypeError("Filter value must be a JSON scalar.");
7
+ return e;
8
+ }
9
+ function c(e, t) {
10
+ if (typeof t != "string") throw TypeError(`${e} must be a string.`);
11
+ return t;
12
+ }
13
+ function l(t) {
14
+ if (t !== e.CASE_SENSITIVE && t !== e.CASE_INSENSITIVE) throw TypeError(`String comparison is invalid: [${String(t)}].`);
15
+ }
16
+ function u(e, t) {
17
+ if (t.length === 0) throw TypeError(`${e} cannot be empty.`);
18
+ if (t.some((e) => e == null)) throw TypeError(`${e} cannot contain null.`);
19
+ }
20
+ function d(e) {
21
+ let t = i.exec(e);
22
+ if (!t) return !1;
23
+ let n = t[1], [r, a = 0, o = 0] = (n.includes(":") ? n.split(":") : n.length <= 2 ? [n] : [
24
+ n.slice(0, 2),
25
+ n.slice(2, 4),
26
+ n.slice(4, 6)
27
+ ]).map(Number);
28
+ return a <= 59 && o <= 59 && (r < 18 || r === 18 && a === 0 && o === 0);
29
+ }
30
+ function f({ zoneId: e, datePattern: r, timeUnit: i = t.MILLISECONDS }) {
31
+ if (e !== void 0) {
32
+ if (typeof e != "string" || !e.trim()) throw TypeError("zoneId cannot be blank.");
33
+ if (a.test(e) && !d(e)) throw TypeError(`zoneId is invalid: [${e}].`);
34
+ }
35
+ if (r !== void 0 && n(r), !Object.values(t).includes(i)) throw TypeError(`timeUnit is invalid: [${String(i)}].`);
36
+ return {
37
+ ...e === void 0 ? {} : { zoneId: e },
38
+ ...r === void 0 ? {} : { datePattern: r },
39
+ timeUnit: i
40
+ };
41
+ }
42
+ function p(e, t) {
43
+ if (!Number.isInteger(t) || t < 1 || t > 2147483647) throw TypeError(`${e} days must be a positive JVM Int.`);
44
+ }
45
+ function m(e, t) {
46
+ if (typeof t != "string" || !o.test(t)) throw TypeError(`${e} offset must be an ISO-8601 duration such as PT0S or -PT30M.`);
47
+ return t;
48
+ }
49
+ function h(e) {
50
+ if (typeof e != "string" || !r.test(e)) throw TypeError("BEFORE_TODAY time is invalid.");
51
+ return e;
52
+ }
53
+ //#endregion
54
+ export { s as filterLiteral, m as requireDuration, h as requireLocalTime, u as requireNonEmpty, c as requiredString, p as validateDays, f as validateRelativeTimeOptions, l as validateStringComparison };
55
+
56
+ //# sourceMappingURL=validate.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.es.js","names":["LOCAL_TIME_PATTERN","OFFSET_ZONE_PATTERN","OFFSET_ZONE_CANDIDATE_PATTERN","DURATION_PATTERN","filterLiteral","value","nullable","requiredString","name","validateStringComparison","comparison","StringComparison","requireNonEmpty","values","isValidOffsetZone","match","zoneId","offset","hours","minutes","seconds","validateRelativeTimeOptions","TimeUnit","datePattern","validateDatePattern","timeUnit","validateDays","days","operator","requireDuration","requireLocalTime","time"],"sources":["../../../src/dsl/filter/validate.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Internal: not re-exported by filter/index.ts. The argument checks the\n// filter builders share.\nimport { validateDatePattern } from './datePattern.js';\nimport { StringComparison, TimeUnit, type FilterOperator } from './operator.js';\nimport type { FilterLiteral, RelativeTimeFilterOptions } from './types.js';\n\nconst LOCAL_TIME_PATTERN =\n /^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\\.[0-9]{1,9})?)?$/;\nconst OFFSET_ZONE_PATTERN =\n /^(?:UTC|GMT|UT)?[+-](\\d{1,2}|\\d{4}|\\d{6}|\\d{2}:\\d{2}|\\d{2}:\\d{2}:\\d{2})$/;\nconst OFFSET_ZONE_CANDIDATE_PATTERN = /^(?:UTC|GMT|UT)?[+-]/;\n// java.time.Duration.parse: signed days, hours, minutes and seconds (up to\n// nine fraction digits after `.` or `,`), at least one of them, in that order,\n// case-insensitive. Weeks, months and years are not durations.\nconst DURATION_PATTERN =\n /^[-+]?P(?=.*[0-9])(?:[-+]?[0-9]+D)?(?:T(?=[-+]?[0-9])(?:[-+]?[0-9]+H)?(?:[-+]?[0-9]+M)?(?:[-+]?[0-9]+(?:[.,][0-9]{0,9})?S)?)?$/i;\n\nexport function filterLiteral<T extends FilterLiteral>(\n value: T,\n nullable: boolean,\n): T {\n const valid =\n value === null\n ? nullable\n : typeof value === 'string' ||\n typeof value === 'boolean' ||\n (typeof value === 'number' && Number.isFinite(value));\n if (!valid) {\n throw new TypeError('Filter value must be a JSON scalar.');\n }\n return value;\n}\n\nexport function requiredString(name: string, value: string): string {\n if (typeof value !== 'string') {\n throw new TypeError(`${name} must be a string.`);\n }\n return value;\n}\n\nexport function validateStringComparison(comparison: StringComparison): void {\n if (\n comparison !== StringComparison.CASE_SENSITIVE &&\n comparison !== StringComparison.CASE_INSENSITIVE\n ) {\n throw new TypeError(\n `String comparison is invalid: [${String(comparison)}].`,\n );\n }\n}\n\nexport function requireNonEmpty(\n name: string,\n values: readonly unknown[],\n): void {\n if (values.length === 0) {\n throw new TypeError(`${name} cannot be empty.`);\n }\n if (values.some(value => value === null || value === undefined)) {\n throw new TypeError(`${name} cannot contain null.`);\n }\n}\n\nfunction isValidOffsetZone(zoneId: string): boolean {\n const match = OFFSET_ZONE_PATTERN.exec(zoneId);\n if (!match) return false;\n const offset = match[1];\n const parts = offset.includes(':')\n ? offset.split(':')\n : offset.length <= 2\n ? [offset]\n : [offset.slice(0, 2), offset.slice(2, 4), offset.slice(4, 6)];\n const [hours, minutes = 0, seconds = 0] = parts.map(Number);\n return (\n minutes <= 59 &&\n seconds <= 59 &&\n (hours < 18 || (hours === 18 && minutes === 0 && seconds === 0))\n );\n}\n\nexport function validateRelativeTimeOptions({\n zoneId,\n datePattern,\n timeUnit = TimeUnit.MILLISECONDS,\n}: RelativeTimeFilterOptions): RelativeTimeFilterOptions & {\n timeUnit: TimeUnit;\n} {\n if (zoneId !== undefined) {\n if (typeof zoneId !== 'string' || !zoneId.trim()) {\n throw new TypeError('zoneId cannot be blank.');\n }\n if (\n OFFSET_ZONE_CANDIDATE_PATTERN.test(zoneId) &&\n !isValidOffsetZone(zoneId)\n ) {\n throw new TypeError(`zoneId is invalid: [${zoneId}].`);\n }\n }\n if (datePattern !== undefined) {\n validateDatePattern(datePattern);\n }\n if (!Object.values(TimeUnit).includes(timeUnit)) {\n throw new TypeError(`timeUnit is invalid: [${String(timeUnit)}].`);\n }\n return {\n ...(zoneId === undefined ? {} : { zoneId }),\n ...(datePattern === undefined ? {} : { datePattern }),\n timeUnit,\n };\n}\n\nexport function validateDays(operator: FilterOperator, days: number): void {\n if (!Number.isInteger(days) || days < 1 || days > 2_147_483_647) {\n throw new TypeError(`${operator} days must be a positive JVM Int.`);\n }\n}\n\n/**\n * Admits the ISO-8601 duration `BEFORE_NOW` and `AFTER_NOW` add to the\n * server's now, in the grammar `java.time.Duration.parse` accepts. A value\n * too large for a `Duration` is left to the server.\n */\nexport function requireDuration(\n operator: FilterOperator,\n offset: string,\n): string {\n if (typeof offset !== 'string' || !DURATION_PATTERN.test(offset)) {\n throw new TypeError(\n `${operator} offset must be an ISO-8601 duration such as PT0S or -PT30M.`,\n );\n }\n return offset;\n}\n\n/** Admits the 24-hour local time `BEFORE_TODAY` compares against. */\nexport function requireLocalTime(time: string): string {\n if (typeof time !== 'string' || !LOCAL_TIME_PATTERN.test(time)) {\n throw new TypeError('BEFORE_TODAY time is invalid.');\n }\n return time;\n}\n"],"mappings":";;;AAmBA,IAAMA,IACJ,oEACIC,IACJ,4EACIC,IAAgC,wBAIhCC,IACJ;AAEF,SAAgBC,EACd,GACA,GACG;CAOH,IAAI,EALFC,MAAU,OACNC,IACA,OAAOD,KAAU,YACjB,OAAOA,KAAU,aAChB,OAAOA,KAAU,YAAY,OAAO,SAASA,CAAK,IAEvD,MAAU,UAAU,qCAAqC;CAE3D,OAAOA;AACT;AAEA,SAAgBE,EAAe,GAAc,GAAuB;CAClE,IAAI,OAAOF,KAAU,UACnB,MAAU,UAAU,GAAGG,EAAK,mBAAmB;CAEjD,OAAOH;AACT;AAEA,SAAgBI,EAAyB,GAAoC;CAC3E,IACEC,MAAeC,EAAiB,kBAChCD,MAAeC,EAAiB,kBAEhC,MAAU,UACR,kCAAkC,OAAOD,CAAU,EAAE,GACvD;AAEJ;AAEA,SAAgBE,EACd,GACA,GACM;CACN,IAAIC,EAAO,WAAW,GACpB,MAAU,UAAU,GAAGL,EAAK,kBAAkB;CAEhD,IAAIK,EAAO,MAAK,MAASR,KAAU,IAA2B,GAC5D,MAAU,UAAU,GAAGG,EAAK,sBAAsB;AAEtD;AAEA,SAASM,EAAkB,GAAyB;CAClD,IAAMC,IAAQd,EAAoB,KAAKe,CAAM;CAC7C,IAAI,CAACD,GAAO,OAAO;CACnB,IAAME,IAASF,EAAM,IAMf,CAACG,GAAOC,IAAU,GAAGC,IAAU,MALvBH,EAAO,SAAS,GAAG,IAC7BA,EAAO,MAAM,GAAG,IAChBA,EAAO,UAAU,IACf,CAACA,CAAM,IACP;EAACA,EAAO,MAAM,GAAG,CAAC;EAAGA,EAAO,MAAM,GAAG,CAAC;EAAGA,EAAO,MAAM,GAAG,CAAC;CAAC,EAAA,CACjB,IAAI,MAAM;CAC1D,OACEE,KAAW,MACXC,KAAW,OACVF,IAAQ,MAAOA,MAAU,MAAMC,MAAY,KAAKC,MAAY;AAEjE;AAEA,SAAgBC,EAA4B,EAC1C,WACA,gBACA,cAAWC,EAAS,gBAGpB;CACA,IAAIN,MAAW,KAAA,GAAW;EACxB,IAAI,OAAOA,KAAW,YAAY,CAACA,EAAO,KAAK,GAC7C,MAAU,UAAU,yBAAyB;EAE/C,IACEd,EAA8B,KAAKc,CAAM,KACzC,CAACF,EAAkBE,CAAM,GAEzB,MAAU,UAAU,uBAAuBA,EAAO,GAAG;CAEzD;CAIA,IAHIO,MAAgB,KAAA,KAClBC,EAAoBD,CAAW,GAE7B,CAAC,OAAO,OAAOD,CAAQ,CAAC,CAAC,SAASG,CAAQ,GAC5C,MAAU,UAAU,yBAAyB,OAAOA,CAAQ,EAAE,GAAG;CAEnE,OAAO;EACL,GAAIT,MAAW,KAAA,IAAY,CAAC,IAAI,EAAE,UAAO;EACzC,GAAIO,MAAgB,KAAA,IAAY,CAAC,IAAI,EAAE,eAAY;EACnD;CACF;AACF;AAEA,SAAgBG,EAAa,GAA0B,GAAoB;CACzE,IAAI,CAAC,OAAO,UAAUC,CAAI,KAAKA,IAAO,KAAKA,IAAO,YAChD,MAAU,UAAU,GAAGC,EAAS,kCAAkC;AAEtE;AAOA,SAAgBC,EACd,GACA,GACQ;CACR,IAAI,OAAOZ,KAAW,YAAY,CAACd,EAAiB,KAAKc,CAAM,GAC7D,MAAU,UACR,GAAGW,EAAS,6DACd;CAEF,OAAOX;AACT;AAGA,SAAgBa,EAAiB,GAAsB;CACrD,IAAI,OAAOC,KAAS,YAAY,CAAC/B,EAAmB,KAAK+B,CAAI,GAC3D,MAAU,UAAU,+BAA+B;CAErD,OAAOA;AACT"}
@@ -0,0 +1,2 @@
1
+ var e=Object.freeze({index:1,size:10});function t({index:t=e.index,size:n=e.size}={}){return{index:t,size:n}}exports.DEFAULT_PAGINATION=e,exports.pagination=t;
2
+ //# sourceMappingURL=pagination.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.cjs","names":["DEFAULT_PAGINATION","pagination"],"sources":["../../src/dsl/pagination.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Interface for pagination information.\n *\n * Page number, starting from 1\n * Page size\n */\nexport interface Pagination {\n index: number;\n size: number;\n}\n\n/**\n * Default pagination configuration.\n * Page index starts at 1, page size is 10. Frozen: the factories copy it.\n */\nexport const DEFAULT_PAGINATION: Readonly<Pagination> = Object.freeze({\n index: 1,\n size: 10,\n});\n\n/**\n * Creates a Pagination object with the provided parameters.\n *\n * This function is a factory for creating Pagination objects, which represent\n * pagination information including page index and page size. It provides default\n * values for optional properties while allowing customization of index and size.\n *\n * @param options - The pagination options. Optional.\n * @param options.index - The page index, starting from 1. Defaults to DEFAULT_PAGINATION.index.\n * @param options.size - The page size. Defaults to DEFAULT_PAGINATION.size.\n * @returns A Pagination object with the specified parameters\n */\nexport function pagination({\n index = DEFAULT_PAGINATION.index,\n size = DEFAULT_PAGINATION.size,\n}: Partial<Pagination> = {}): Pagination {\n return {\n index,\n size,\n };\n}\n"],"mappings":"AA4BA,IAAaA,EAA2C,OAAO,OAAO,CACpE,MAAO,EACP,KAAM,EACR,CAAC,EAcD,SAAgBC,EAAW,CACzB,QAAQD,EAAmB,MAC3B,OAAOA,EAAmB,MACH,CAAC,EAAe,CACvC,MAAO,CACL,QACA,MACF,CACF"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Interface for pagination information.
3
+ *
4
+ * Page number, starting from 1
5
+ * Page size
6
+ */
7
+ export interface Pagination {
8
+ index: number;
9
+ size: number;
10
+ }
11
+ /**
12
+ * Default pagination configuration.
13
+ * Page index starts at 1, page size is 10. Frozen: the factories copy it.
14
+ */
15
+ export declare const DEFAULT_PAGINATION: Readonly<Pagination>;
16
+ /**
17
+ * Creates a Pagination object with the provided parameters.
18
+ *
19
+ * This function is a factory for creating Pagination objects, which represent
20
+ * pagination information including page index and page size. It provides default
21
+ * values for optional properties while allowing customization of index and size.
22
+ *
23
+ * @param options - The pagination options. Optional.
24
+ * @param options.index - The page index, starting from 1. Defaults to DEFAULT_PAGINATION.index.
25
+ * @param options.size - The page size. Defaults to DEFAULT_PAGINATION.size.
26
+ * @returns A Pagination object with the specified parameters
27
+ */
28
+ export declare function pagination({ index, size, }?: Partial<Pagination>): Pagination;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Interface for pagination information.
3
+ *
4
+ * Page number, starting from 1
5
+ * Page size
6
+ */
7
+ export interface Pagination {
8
+ index: number;
9
+ size: number;
10
+ }
11
+ /**
12
+ * Default pagination configuration.
13
+ * Page index starts at 1, page size is 10. Frozen: the factories copy it.
14
+ */
15
+ export declare const DEFAULT_PAGINATION: Readonly<Pagination>;
16
+ /**
17
+ * Creates a Pagination object with the provided parameters.
18
+ *
19
+ * This function is a factory for creating Pagination objects, which represent
20
+ * pagination information including page index and page size. It provides default
21
+ * values for optional properties while allowing customization of index and size.
22
+ *
23
+ * @param options - The pagination options. Optional.
24
+ * @param options.index - The page index, starting from 1. Defaults to DEFAULT_PAGINATION.index.
25
+ * @param options.size - The page size. Defaults to DEFAULT_PAGINATION.size.
26
+ * @returns A Pagination object with the specified parameters
27
+ */
28
+ export declare function pagination({ index, size, }?: Partial<Pagination>): Pagination;
@@ -0,0 +1,15 @@
1
+ //#region src/dsl/pagination.ts
2
+ var e = Object.freeze({
3
+ index: 1,
4
+ size: 10
5
+ });
6
+ function t({ index: t = e.index, size: n = e.size } = {}) {
7
+ return {
8
+ index: t,
9
+ size: n
10
+ };
11
+ }
12
+ //#endregion
13
+ export { e as DEFAULT_PAGINATION, t as pagination };
14
+
15
+ //# sourceMappingURL=pagination.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.es.js","names":["DEFAULT_PAGINATION","pagination"],"sources":["../../src/dsl/pagination.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Interface for pagination information.\n *\n * Page number, starting from 1\n * Page size\n */\nexport interface Pagination {\n index: number;\n size: number;\n}\n\n/**\n * Default pagination configuration.\n * Page index starts at 1, page size is 10. Frozen: the factories copy it.\n */\nexport const DEFAULT_PAGINATION: Readonly<Pagination> = Object.freeze({\n index: 1,\n size: 10,\n});\n\n/**\n * Creates a Pagination object with the provided parameters.\n *\n * This function is a factory for creating Pagination objects, which represent\n * pagination information including page index and page size. It provides default\n * values for optional properties while allowing customization of index and size.\n *\n * @param options - The pagination options. Optional.\n * @param options.index - The page index, starting from 1. Defaults to DEFAULT_PAGINATION.index.\n * @param options.size - The page size. Defaults to DEFAULT_PAGINATION.size.\n * @returns A Pagination object with the specified parameters\n */\nexport function pagination({\n index = DEFAULT_PAGINATION.index,\n size = DEFAULT_PAGINATION.size,\n}: Partial<Pagination> = {}): Pagination {\n return {\n index,\n size,\n };\n}\n"],"mappings":";AA4BA,IAAaA,IAA2C,OAAO,OAAO;CACpE,OAAO;CACP,MAAM;AACR,CAAC;AAcD,SAAgBC,EAAW,EACzB,WAAQD,EAAmB,OAC3B,UAAOA,EAAmB,SACH,CAAC,GAAe;CACvC,OAAO;EACL;EACA;CACF;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("./field.cjs");function t({include:t,exclude:n}={}){return{include:t?.map(e.queryField),exclude:n?.map(e.queryField)}}exports.projection=t;
2
+ //# sourceMappingURL=projection.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.cjs","names":["queryField","require_field","projection","include","exclude"],"sources":["../../src/dsl/projection.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { queryField } from './field.js';\n\n/**\n * Interface for field projection.\n */\nexport interface Projection<FIELDS extends string = string> {\n include?: FIELDS[];\n exclude?: FIELDS[];\n}\n\n/**\n * Creates a Projection object with the provided parameters.\n *\n * This function is a factory for creating Projection objects, which represent\n * field projection specifications for queries. It allows specifying which fields\n * to include or exclude in query results.\n *\n * @param options - The projection options. Defaults to none, which includes\n * every field.\n * @param options.include - Array of field names to include in the projection. Optional.\n * @param options.exclude - Array of field names to exclude from the projection. Optional.\n * @returns A Projection object with the specified parameters\n */\nexport function projection<FIELDS extends string = string>({\n include,\n exclude,\n}: Projection<FIELDS> = {}): Projection<FIELDS> {\n // Kotlin holds these as `QueryField`, which refuses a path its pattern does\n // not match. A projection entry is a path like any other. Both keys stay\n // present whether or not they were given: the shape this factory returns is\n // its own contract, and validating a path is no reason to change it.\n return {\n include: include?.map(queryField),\n exclude: exclude?.map(queryField),\n };\n}\n\n/**\n * Interface for objects that support field projection.\n */\nexport interface ProjectionCapable<FIELDS extends string = string> {\n projection?: Projection<FIELDS>;\n}\n"],"mappings":"+BAoCA,SAAgBE,EAA2C,CACzD,UACA,WACsB,CAAC,EAAuB,CAK9C,MAAO,CACL,QAASC,GAAS,IAAIH,EAAAA,UAAU,EAChC,QAASI,GAAS,IAAIJ,EAAAA,UAAU,CAClC,CACF"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Interface for field projection.
3
+ */
4
+ export interface Projection<FIELDS extends string = string> {
5
+ include?: FIELDS[];
6
+ exclude?: FIELDS[];
7
+ }
8
+ /**
9
+ * Creates a Projection object with the provided parameters.
10
+ *
11
+ * This function is a factory for creating Projection objects, which represent
12
+ * field projection specifications for queries. It allows specifying which fields
13
+ * to include or exclude in query results.
14
+ *
15
+ * @param options - The projection options. Defaults to none, which includes
16
+ * every field.
17
+ * @param options.include - Array of field names to include in the projection. Optional.
18
+ * @param options.exclude - Array of field names to exclude from the projection. Optional.
19
+ * @returns A Projection object with the specified parameters
20
+ */
21
+ export declare function projection<FIELDS extends string = string>({ include, exclude, }?: Projection<FIELDS>): Projection<FIELDS>;
22
+ /**
23
+ * Interface for objects that support field projection.
24
+ */
25
+ export interface ProjectionCapable<FIELDS extends string = string> {
26
+ projection?: Projection<FIELDS>;
27
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Interface for field projection.
3
+ */
4
+ export interface Projection<FIELDS extends string = string> {
5
+ include?: FIELDS[];
6
+ exclude?: FIELDS[];
7
+ }
8
+ /**
9
+ * Creates a Projection object with the provided parameters.
10
+ *
11
+ * This function is a factory for creating Projection objects, which represent
12
+ * field projection specifications for queries. It allows specifying which fields
13
+ * to include or exclude in query results.
14
+ *
15
+ * @param options - The projection options. Defaults to none, which includes
16
+ * every field.
17
+ * @param options.include - Array of field names to include in the projection. Optional.
18
+ * @param options.exclude - Array of field names to exclude from the projection. Optional.
19
+ * @returns A Projection object with the specified parameters
20
+ */
21
+ export declare function projection<FIELDS extends string = string>({ include, exclude, }?: Projection<FIELDS>): Projection<FIELDS>;
22
+ /**
23
+ * Interface for objects that support field projection.
24
+ */
25
+ export interface ProjectionCapable<FIELDS extends string = string> {
26
+ projection?: Projection<FIELDS>;
27
+ }
@@ -0,0 +1,12 @@
1
+ import { queryField as e } from "./field.es.js";
2
+ //#region src/dsl/projection.ts
3
+ function t({ include: t, exclude: n } = {}) {
4
+ return {
5
+ include: t?.map(e),
6
+ exclude: n?.map(e)
7
+ };
8
+ }
9
+ //#endregion
10
+ export { t as projection };
11
+
12
+ //# sourceMappingURL=projection.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.es.js","names":["projection","include","queryField","exclude"],"sources":["../../src/dsl/projection.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { queryField } from './field.js';\n\n/**\n * Interface for field projection.\n */\nexport interface Projection<FIELDS extends string = string> {\n include?: FIELDS[];\n exclude?: FIELDS[];\n}\n\n/**\n * Creates a Projection object with the provided parameters.\n *\n * This function is a factory for creating Projection objects, which represent\n * field projection specifications for queries. It allows specifying which fields\n * to include or exclude in query results.\n *\n * @param options - The projection options. Defaults to none, which includes\n * every field.\n * @param options.include - Array of field names to include in the projection. Optional.\n * @param options.exclude - Array of field names to exclude from the projection. Optional.\n * @returns A Projection object with the specified parameters\n */\nexport function projection<FIELDS extends string = string>({\n include,\n exclude,\n}: Projection<FIELDS> = {}): Projection<FIELDS> {\n // Kotlin holds these as `QueryField`, which refuses a path its pattern does\n // not match. A projection entry is a path like any other. Both keys stay\n // present whether or not they were given: the shape this factory returns is\n // its own contract, and validating a path is no reason to change it.\n return {\n include: include?.map(queryField),\n exclude: exclude?.map(queryField),\n };\n}\n\n/**\n * Interface for objects that support field projection.\n */\nexport interface ProjectionCapable<FIELDS extends string = string> {\n projection?: Projection<FIELDS>;\n}\n"],"mappings":";;AAoCA,SAAgBA,EAA2C,EACzD,YACA,eACsB,CAAC,GAAuB;CAK9C,OAAO;EACL,SAASC,GAAS,IAAIC,CAAU;EAChC,SAASC,GAAS,IAAID,CAAU;CAClC;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("./filter/builders.cjs"),t=require("./pagination.cjs");function n(t){if(t===null)throw TypeError(`filter cannot be null.`);return t??e.filter.matchAll()}function r({filter:e,projection:t,sort:r}={}){return{filter:n(e),projection:t,sort:r}}function i({filter:e,projection:t,sort:r,limit:i}={}){return{filter:n(e),projection:t,sort:r,limit:i}}function a({filter:e,projection:r,sort:i,pagination:a={...t.DEFAULT_PAGINATION}}={}){return{filter:n(e),projection:r,sort:i,pagination:a}}function o({total:e,list:t=[]}={}){return{total:e??t.length,list:t}}exports.listQuery=i,exports.pagedList=o,exports.pagedQuery=a,exports.singleQuery=r;
2
+ //# sourceMappingURL=queryable.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryable.cjs","names":["filter","filters","DEFAULT_PAGINATION","require_builders","require_pagination","queryFilter","filter$1","singleQuery","filter","listQuery","pagedQuery","pagedList","total","list"],"sources":["../../src/dsl/queryable.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n filter as filters,\n type FilterCapable,\n type FilterExpression,\n} from './filter/index.js';\nimport { type SortCapable } from './sort.js';\nimport { DEFAULT_PAGINATION, type Pagination } from './pagination.js';\nimport { type ProjectionCapable } from './projection.js';\n\n/** A query that filters, projects and sorts with Wow's `FilterExpression`. */\nexport interface FilterQueryable<FIELDS extends string = string>\n extends\n FilterCapable<FIELDS>,\n ProjectionCapable<FIELDS>,\n SortCapable<FIELDS> {}\n\n/** The body of a `single` query: the first match of the filter, or nothing. */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface FilterSingleQuery<\n FIELDS extends string = string,\n> extends FilterQueryable<FIELDS> {}\n\n/** The body of a `list` or `listStream` query. */\nexport interface FilterListQuery<\n FIELDS extends string = string,\n> extends FilterQueryable<FIELDS> {\n /**\n * The most rows to return. The client sends no default: absent (or 0)\n * leaves the choice to the server, and what the server does depends on its\n * version.\n *\n * - Wow 9.1.5 and later apply the server's default list size over HTTP\n * (100 unless the server configures another).\n * - Wow 8.11 to 9.1.3 reject the query with `IllegalArgument: HTTP list\n * query limit[0] must be between 1 and …` (HTTP 400 for a list, the error\n * event that ends a list stream), so pass `limit` explicitly against\n * those servers.\n *\n * Wow 8.11 and later also refuse a value above the server's maximum list\n * size (1000 by default).\n */\n limit?: number;\n}\n\n/** The body of a `paged` query. */\nexport interface FilterPagedQuery<\n FIELDS extends string = string,\n> extends FilterQueryable<FIELDS> {\n pagination?: Pagination;\n}\n\n/** What `singleQuery`, `listQuery` and `pagedQuery` take in common. */\ntype QueryOptions<FIELDS extends string = string> = Partial<\n FilterQueryable<FIELDS>\n>;\n\nfunction queryFilter<FIELDS extends string>(\n filter: FilterExpression<FIELDS> | undefined,\n): FilterExpression<FIELDS> {\n if (filter === null) {\n throw new TypeError('filter cannot be null.');\n }\n return filter ?? filters.matchAll();\n}\n\n/**\n * Builds the body of a `single` query.\n *\n * @param options.filter - What to match. Defaults to `filter.matchAll()`.\n * @param options.projection - Which fields to return. Optional.\n * @param options.sort - Which match counts as the first. Optional.\n * @throws TypeError when `filter` is `null`.\n *\n * @example\n * ```typescript\n * singleQuery({ filter: filter.eq('status', 'ACTIVE') });\n * ```\n */\nexport function singleQuery<FIELDS extends string = string>({\n filter,\n projection,\n sort,\n}: QueryOptions<FIELDS> = {}): FilterSingleQuery<FIELDS> {\n return { filter: queryFilter(filter), projection, sort };\n}\n\n/**\n * Builds the body of a `list` or `listStream` query.\n *\n * @param options.filter - What to match. Defaults to `filter.matchAll()`.\n * @param options.projection - Which fields to return. Optional.\n * @param options.sort - The order of the rows. Optional.\n * @param options.limit - The most rows to return. Absent is sent as absent:\n * Wow 9.1.5 and later apply the server's default list size, Wow 8.11 to\n * 9.1.3 reject the query, so pass it for those servers; see\n * {@link FilterListQuery.limit}.\n * @throws TypeError when `filter` is `null`.\n *\n * @example\n * ```typescript\n * listQuery({ filter: filter.eq('status', 'ACTIVE'), limit: 20 });\n * ```\n */\nexport function listQuery<FIELDS extends string = string>({\n filter,\n projection,\n sort,\n limit,\n}: QueryOptions<FIELDS> & { limit?: number } = {}): FilterListQuery<FIELDS> {\n return { filter: queryFilter(filter), projection, sort, limit };\n}\n\n/**\n * Builds the body of a `paged` query.\n *\n * @param options.filter - What to match. Defaults to `filter.matchAll()`.\n * @param options.projection - Which fields to return. Optional.\n * @param options.sort - The order of the rows. Optional.\n * @param options.pagination - Which page. Defaults to a copy of\n * {@link DEFAULT_PAGINATION}: the first page of ten.\n * @throws TypeError when `filter` is `null`.\n *\n * @example\n * ```typescript\n * pagedQuery({ filter: filter.matchAll(), pagination: { index: 2, size: 20 } });\n * ```\n */\nexport function pagedQuery<FIELDS extends string = string>({\n filter,\n projection,\n sort,\n pagination = { ...DEFAULT_PAGINATION },\n}: QueryOptions<FIELDS> & {\n pagination?: Pagination;\n} = {}): FilterPagedQuery<FIELDS> {\n return { filter: queryFilter(filter), projection, sort, pagination };\n}\n\n/** One page of a `paged` query: its rows, and how many match in total. */\nexport interface PagedList<T> {\n total: number;\n list: T[];\n}\n\n/**\n * Builds a `PagedList`, for a placeholder page or a test double.\n *\n * @param options.total - How many rows match in total. Defaults to the length\n * of `list`.\n * @param options.list - The rows of this page. Defaults to a new empty array.\n */\nexport function pagedList<T>({\n total,\n list = [],\n}: Partial<PagedList<T>> = {}): PagedList<T> {\n return { total: total ?? list.length, list };\n}\n"],"mappings":"uEAqEA,SAASK,EACP,EAC0B,CAC1B,GAAIL,IAAW,KACb,MAAU,UAAU,wBAAwB,EAE9C,OAAOA,GAAUC,EAAAA,OAAQ,SAAS,CACpC,CAeA,SAAgBM,EAA4C,CAC1D,SACA,aACA,QACwB,CAAC,EAA8B,CACvD,MAAO,CAAE,OAAQF,EAAYG,CAAM,EAAG,aAAY,MAAK,CACzD,CAmBA,SAAgBC,EAA0C,CACxD,SACA,aACA,OACA,SAC6C,CAAC,EAA4B,CAC1E,MAAO,CAAE,OAAQJ,EAAYG,CAAM,EAAG,aAAY,OAAM,OAAM,CAChE,CAiBA,SAAgBE,EAA2C,CACzD,SACA,aACA,OACA,aAAa,CAAE,GAAGR,EAAAA,kBAAmB,GAGnC,CAAC,EAA6B,CAChC,MAAO,CAAE,OAAQG,EAAYG,CAAM,EAAG,aAAY,OAAM,YAAW,CACrE,CAeA,SAAgBG,EAAa,CAC3B,QACA,OAAO,CAAC,GACiB,CAAC,EAAiB,CAC3C,MAAO,CAAE,MAAOC,GAASC,EAAK,OAAQ,MAAK,CAC7C"}