@ahoo-wang/wow-client 9.9.0 → 10.0.0-alpha.4

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 (385) hide show
  1. package/README.md +85 -230
  2. package/README.zh-CN.md +74 -209
  3. package/dist/commands.cjs +2 -0
  4. package/dist/commands.cjs.map +1 -0
  5. package/dist/commands.d.cts +123 -0
  6. package/dist/commands.d.ts +123 -0
  7. package/dist/commands.es.js +96 -0
  8. package/dist/commands.es.js.map +1 -0
  9. package/dist/dsl/aggregation/types.cjs.map +1 -1
  10. package/dist/dsl/aggregation/types.d.cts +1 -1
  11. package/dist/dsl/aggregation/types.d.ts +1 -1
  12. package/dist/dsl/aggregation/types.es.js.map +1 -1
  13. package/dist/dsl/cursorQuery.cjs.map +1 -1
  14. package/dist/dsl/cursorQuery.d.cts +7 -8
  15. package/dist/dsl/cursorQuery.d.ts +7 -8
  16. package/dist/dsl/cursorQuery.es.js.map +1 -1
  17. package/dist/dsl/descriptor.cjs.map +1 -1
  18. package/dist/dsl/descriptor.d.cts +8 -1
  19. package/dist/dsl/descriptor.d.ts +8 -1
  20. package/dist/dsl/descriptor.es.js.map +1 -1
  21. package/dist/dsl/documents.d.cts +1 -1
  22. package/dist/dsl/documents.d.ts +1 -1
  23. package/dist/dsl/filter/types.d.cts +2 -1
  24. package/dist/dsl/filter/types.d.ts +2 -1
  25. package/dist/dsl/projection.cjs.map +1 -1
  26. package/dist/dsl/projection.d.cts +22 -0
  27. package/dist/dsl/projection.d.ts +22 -0
  28. package/dist/dsl/projection.es.js.map +1 -1
  29. package/dist/dsl/queryErrorCodes.cjs +2 -0
  30. package/dist/dsl/queryErrorCodes.cjs.map +1 -0
  31. package/dist/{error → dsl}/queryErrorCodes.d.cts +25 -24
  32. package/dist/{error → dsl}/queryErrorCodes.d.ts +25 -24
  33. package/dist/{error → dsl}/queryErrorCodes.es.js +2 -1
  34. package/dist/{error/queryErrorCodes.cjs.map → dsl/queryErrorCodes.es.js.map} +1 -1
  35. package/dist/dsl.cjs +1 -1
  36. package/dist/dsl.d.cts +1 -2
  37. package/dist/dsl.d.ts +1 -2
  38. package/dist/dsl.es.js +2 -3
  39. package/dist/exactJson.cjs +3 -0
  40. package/dist/exactJson.cjs.map +1 -0
  41. package/dist/exactJson.d.cts +54 -0
  42. package/dist/exactJson.d.ts +54 -0
  43. package/dist/exactJson.es.js +213 -0
  44. package/dist/exactJson.es.js.map +1 -0
  45. package/dist/http.cjs +2 -0
  46. package/dist/http.cjs.map +1 -0
  47. package/dist/http.d.cts +96 -0
  48. package/dist/http.d.ts +96 -0
  49. package/dist/http.es.js +77 -0
  50. package/dist/http.es.js.map +1 -0
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.d.cts +19 -17
  53. package/dist/index.d.ts +19 -17
  54. package/dist/index.es.js +10 -36
  55. package/dist/manifest.cjs +2 -0
  56. package/dist/manifest.cjs.map +1 -0
  57. package/dist/manifest.d.cts +109 -0
  58. package/dist/manifest.d.ts +109 -0
  59. package/dist/manifest.es.js +14 -0
  60. package/dist/manifest.es.js.map +1 -0
  61. package/dist/problem.cjs +2 -0
  62. package/dist/problem.cjs.map +1 -0
  63. package/dist/problem.d.cts +211 -0
  64. package/dist/problem.d.ts +211 -0
  65. package/dist/problem.es.js +138 -0
  66. package/dist/problem.es.js.map +1 -0
  67. package/dist/queries.cjs +2 -0
  68. package/dist/queries.cjs.map +1 -0
  69. package/dist/queries.d.cts +182 -0
  70. package/dist/queries.d.ts +182 -0
  71. package/dist/queries.es.js +112 -0
  72. package/dist/queries.es.js.map +1 -0
  73. package/dist/state.cjs +2 -0
  74. package/dist/state.cjs.map +1 -0
  75. package/dist/state.d.cts +75 -0
  76. package/dist/state.d.ts +75 -0
  77. package/dist/state.es.js +70 -0
  78. package/dist/state.es.js.map +1 -0
  79. package/dist/streams.cjs +2 -0
  80. package/dist/streams.cjs.map +1 -0
  81. package/dist/streams.d.cts +74 -0
  82. package/dist/streams.d.ts +74 -0
  83. package/dist/streams.es.js +103 -0
  84. package/dist/streams.es.js.map +1 -0
  85. package/dist/wait.cjs +2 -0
  86. package/dist/wait.cjs.map +1 -0
  87. package/dist/wait.d.cts +61 -0
  88. package/dist/wait.d.ts +61 -0
  89. package/dist/wait.es.js +44 -0
  90. package/dist/wait.es.js.map +1 -0
  91. package/dist/wire.cjs +2 -0
  92. package/dist/wire.cjs.map +1 -0
  93. package/dist/wire.d.cts +326 -0
  94. package/dist/wire.d.ts +326 -0
  95. package/dist/wire.es.js +10 -0
  96. package/dist/wire.es.js.map +1 -0
  97. package/package.json +4 -16
  98. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.cjs +0 -1
  99. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.es.js +0 -9
  100. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.cjs +0 -1
  101. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.es.js +0 -6
  102. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.cjs +0 -1
  103. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.es.js +0 -8
  104. package/dist/client/bindMethods.cjs +0 -2
  105. package/dist/client/bindMethods.cjs.map +0 -1
  106. package/dist/client/bindMethods.d.cts +0 -13
  107. package/dist/client/bindMethods.d.ts +0 -13
  108. package/dist/client/bindMethods.es.js +0 -19
  109. package/dist/client/bindMethods.es.js.map +0 -1
  110. package/dist/client/command/commandClient.cjs +0 -2
  111. package/dist/client/command/commandClient.cjs.map +0 -1
  112. package/dist/client/command/commandClient.d.cts +0 -67
  113. package/dist/client/command/commandClient.d.ts +0 -67
  114. package/dist/client/command/commandClient.es.js +0 -38
  115. package/dist/client/command/commandClient.es.js.map +0 -1
  116. package/dist/client/command/commandHeaders.cjs +0 -2
  117. package/dist/client/command/commandHeaders.cjs.map +0 -1
  118. package/dist/client/command/commandHeaders.d.cts +0 -75
  119. package/dist/client/command/commandHeaders.d.ts +0 -75
  120. package/dist/client/command/commandHeaders.es.js +0 -31
  121. package/dist/client/command/commandHeaders.es.js.map +0 -1
  122. package/dist/client/command/commandRequest.cjs +0 -2
  123. package/dist/client/command/commandRequest.cjs.map +0 -1
  124. package/dist/client/command/commandRequest.d.cts +0 -180
  125. package/dist/client/command/commandRequest.d.ts +0 -180
  126. package/dist/client/command/commandRequest.es.js +0 -31
  127. package/dist/client/command/commandRequest.es.js.map +0 -1
  128. package/dist/client/command/commandResult.d.cts +0 -15
  129. package/dist/client/command/commandResult.d.ts +0 -15
  130. package/dist/client/command/index.d.cts +0 -5
  131. package/dist/client/command/index.d.ts +0 -5
  132. package/dist/client/command/types.d.cts +0 -71
  133. package/dist/client/command/types.d.ts +0 -71
  134. package/dist/client/metadata/index.d.cts +0 -2
  135. package/dist/client/metadata/index.d.ts +0 -2
  136. package/dist/client/metadata/wowMetadata.d.cts +0 -48
  137. package/dist/client/metadata/wowMetadata.d.ts +0 -48
  138. package/dist/client/metadata/wowMetadataClient.cjs +0 -2
  139. package/dist/client/metadata/wowMetadataClient.cjs.map +0 -1
  140. package/dist/client/metadata/wowMetadataClient.d.cts +0 -23
  141. package/dist/client/metadata/wowMetadataClient.d.ts +0 -23
  142. package/dist/client/metadata/wowMetadataClient.es.js +0 -25
  143. package/dist/client/metadata/wowMetadataClient.es.js.map +0 -1
  144. package/dist/client/query/dataset/datasetDescriptorEndpoint.cjs +0 -2
  145. package/dist/client/query/dataset/datasetDescriptorEndpoint.cjs.map +0 -1
  146. package/dist/client/query/dataset/datasetDescriptorEndpoint.d.cts +0 -8
  147. package/dist/client/query/dataset/datasetDescriptorEndpoint.d.ts +0 -8
  148. package/dist/client/query/dataset/datasetDescriptorEndpoint.es.js +0 -34
  149. package/dist/client/query/dataset/datasetDescriptorEndpoint.es.js.map +0 -1
  150. package/dist/client/query/dataset/datasetDirectoryClient.cjs +0 -2
  151. package/dist/client/query/dataset/datasetDirectoryClient.cjs.map +0 -1
  152. package/dist/client/query/dataset/datasetDirectoryClient.d.cts +0 -29
  153. package/dist/client/query/dataset/datasetDirectoryClient.d.ts +0 -29
  154. package/dist/client/query/dataset/datasetDirectoryClient.es.js +0 -25
  155. package/dist/client/query/dataset/datasetDirectoryClient.es.js.map +0 -1
  156. package/dist/client/query/dataset/datasetQueryApi.d.cts +0 -40
  157. package/dist/client/query/dataset/datasetQueryApi.d.ts +0 -40
  158. package/dist/client/query/dataset/datasetQueryClient.cjs +0 -2
  159. package/dist/client/query/dataset/datasetQueryClient.cjs.map +0 -1
  160. package/dist/client/query/dataset/datasetQueryClient.d.cts +0 -57
  161. package/dist/client/query/dataset/datasetQueryClient.d.ts +0 -57
  162. package/dist/client/query/dataset/datasetQueryClient.es.js +0 -154
  163. package/dist/client/query/dataset/datasetQueryClient.es.js.map +0 -1
  164. package/dist/client/query/dataset/endpointPaths.cjs +0 -2
  165. package/dist/client/query/dataset/endpointPaths.cjs.map +0 -1
  166. package/dist/client/query/dataset/endpointPaths.d.cts +0 -9
  167. package/dist/client/query/dataset/endpointPaths.d.ts +0 -9
  168. package/dist/client/query/dataset/endpointPaths.es.js +0 -14
  169. package/dist/client/query/dataset/endpointPaths.es.js.map +0 -1
  170. package/dist/client/query/dataset/index.d.cts +0 -3
  171. package/dist/client/query/dataset/index.d.ts +0 -3
  172. package/dist/client/query/descriptor/descriptorEndpoints.cjs +0 -2
  173. package/dist/client/query/descriptor/descriptorEndpoints.cjs.map +0 -1
  174. package/dist/client/query/descriptor/descriptorEndpoints.d.cts +0 -29
  175. package/dist/client/query/descriptor/descriptorEndpoints.d.ts +0 -29
  176. package/dist/client/query/descriptor/descriptorEndpoints.es.js +0 -69
  177. package/dist/client/query/descriptor/descriptorEndpoints.es.js.map +0 -1
  178. package/dist/client/query/descriptor/endpointPaths.cjs +0 -2
  179. package/dist/client/query/descriptor/endpointPaths.cjs.map +0 -1
  180. package/dist/client/query/descriptor/endpointPaths.d.cts +0 -4
  181. package/dist/client/query/descriptor/endpointPaths.d.ts +0 -4
  182. package/dist/client/query/descriptor/endpointPaths.es.js +0 -9
  183. package/dist/client/query/descriptor/endpointPaths.es.js.map +0 -1
  184. package/dist/client/query/descriptor/index.d.cts +0 -2
  185. package/dist/client/query/descriptor/index.d.ts +0 -2
  186. package/dist/client/query/descriptor/queryDescriptorApi.d.cts +0 -58
  187. package/dist/client/query/descriptor/queryDescriptorApi.d.ts +0 -58
  188. package/dist/client/query/descriptor/queryDescriptorClient.cjs +0 -2
  189. package/dist/client/query/descriptor/queryDescriptorClient.cjs.map +0 -1
  190. package/dist/client/query/descriptor/queryDescriptorClient.d.cts +0 -61
  191. package/dist/client/query/descriptor/queryDescriptorClient.d.ts +0 -61
  192. package/dist/client/query/descriptor/queryDescriptorClient.es.js +0 -20
  193. package/dist/client/query/descriptor/queryDescriptorClient.es.js.map +0 -1
  194. package/dist/client/query/event/endpointPaths.cjs +0 -2
  195. package/dist/client/query/event/endpointPaths.cjs.map +0 -1
  196. package/dist/client/query/event/endpointPaths.d.cts +0 -8
  197. package/dist/client/query/event/endpointPaths.d.ts +0 -8
  198. package/dist/client/query/event/endpointPaths.es.js +0 -13
  199. package/dist/client/query/event/endpointPaths.es.js.map +0 -1
  200. package/dist/client/query/event/eventStreamQueryApi.d.cts +0 -29
  201. package/dist/client/query/event/eventStreamQueryApi.d.ts +0 -29
  202. package/dist/client/query/event/eventStreamQueryClient.cjs +0 -2
  203. package/dist/client/query/event/eventStreamQueryClient.cjs.map +0 -1
  204. package/dist/client/query/event/eventStreamQueryClient.d.cts +0 -193
  205. package/dist/client/query/event/eventStreamQueryClient.d.ts +0 -193
  206. package/dist/client/query/event/eventStreamQueryClient.es.js +0 -160
  207. package/dist/client/query/event/eventStreamQueryClient.es.js.map +0 -1
  208. package/dist/client/query/event/index.d.cts +0 -2
  209. package/dist/client/query/event/index.d.ts +0 -2
  210. package/dist/client/query/factory.cjs +0 -2
  211. package/dist/client/query/factory.cjs.map +0 -1
  212. package/dist/client/query/factory.d.cts +0 -165
  213. package/dist/client/query/factory.d.ts +0 -165
  214. package/dist/client/query/factory.es.js +0 -45
  215. package/dist/client/query/factory.es.js.map +0 -1
  216. package/dist/client/query/index.d.cts +0 -7
  217. package/dist/client/query/index.d.ts +0 -7
  218. package/dist/client/query/queryApi.d.cts +0 -68
  219. package/dist/client/query/queryApi.d.ts +0 -68
  220. package/dist/client/query/requests.d.cts +0 -24
  221. package/dist/client/query/requests.d.ts +0 -24
  222. package/dist/client/query/snapshot/endpointPaths.cjs +0 -2
  223. package/dist/client/query/snapshot/endpointPaths.cjs.map +0 -1
  224. package/dist/client/query/snapshot/endpointPaths.d.cts +0 -12
  225. package/dist/client/query/snapshot/endpointPaths.d.ts +0 -12
  226. package/dist/client/query/snapshot/endpointPaths.es.js +0 -17
  227. package/dist/client/query/snapshot/endpointPaths.es.js.map +0 -1
  228. package/dist/client/query/snapshot/index.d.cts +0 -2
  229. package/dist/client/query/snapshot/index.d.ts +0 -2
  230. package/dist/client/query/snapshot/snapshotQueryApi.d.cts +0 -101
  231. package/dist/client/query/snapshot/snapshotQueryApi.d.ts +0 -101
  232. package/dist/client/query/snapshot/snapshotQueryClient.cjs +0 -2
  233. package/dist/client/query/snapshot/snapshotQueryClient.cjs.map +0 -1
  234. package/dist/client/query/snapshot/snapshotQueryClient.d.cts +0 -372
  235. package/dist/client/query/snapshot/snapshotQueryClient.d.ts +0 -372
  236. package/dist/client/query/snapshot/snapshotQueryClient.es.js +0 -239
  237. package/dist/client/query/snapshot/snapshotQueryClient.es.js.map +0 -1
  238. package/dist/client/query/state/endpointPaths.cjs +0 -2
  239. package/dist/client/query/state/endpointPaths.cjs.map +0 -1
  240. package/dist/client/query/state/endpointPaths.d.cts +0 -10
  241. package/dist/client/query/state/endpointPaths.d.ts +0 -10
  242. package/dist/client/query/state/endpointPaths.es.js +0 -14
  243. package/dist/client/query/state/endpointPaths.es.js.map +0 -1
  244. package/dist/client/query/state/index.d.cts +0 -4
  245. package/dist/client/query/state/index.d.ts +0 -4
  246. package/dist/client/query/state/loadOwnerStateAggregateApi.d.cts +0 -36
  247. package/dist/client/query/state/loadOwnerStateAggregateApi.d.ts +0 -36
  248. package/dist/client/query/state/loadOwnerStateAggregateClient.cjs +0 -2
  249. package/dist/client/query/state/loadOwnerStateAggregateClient.cjs.map +0 -1
  250. package/dist/client/query/state/loadOwnerStateAggregateClient.d.cts +0 -58
  251. package/dist/client/query/state/loadOwnerStateAggregateClient.d.ts +0 -58
  252. package/dist/client/query/state/loadOwnerStateAggregateClient.es.js +0 -56
  253. package/dist/client/query/state/loadOwnerStateAggregateClient.es.js.map +0 -1
  254. package/dist/client/query/state/loadStateAggregateApi.d.cts +0 -37
  255. package/dist/client/query/state/loadStateAggregateApi.d.ts +0 -37
  256. package/dist/client/query/state/loadStateAggregateClient.cjs +0 -2
  257. package/dist/client/query/state/loadStateAggregateClient.cjs.map +0 -1
  258. package/dist/client/query/state/loadStateAggregateClient.d.cts +0 -62
  259. package/dist/client/query/state/loadStateAggregateClient.d.ts +0 -62
  260. package/dist/client/query/state/loadStateAggregateClient.es.js +0 -65
  261. package/dist/client/query/state/loadStateAggregateClient.es.js.map +0 -1
  262. package/dist/client/routing.cjs +0 -2
  263. package/dist/client/routing.cjs.map +0 -1
  264. package/dist/client/routing.d.cts +0 -47
  265. package/dist/client/routing.d.ts +0 -47
  266. package/dist/client/routing.es.js +0 -8
  267. package/dist/client/routing.es.js.map +0 -1
  268. package/dist/error/errorInfo.cjs +0 -2
  269. package/dist/error/errorInfo.cjs.map +0 -1
  270. package/dist/error/errorInfo.d.cts +0 -139
  271. package/dist/error/errorInfo.d.ts +0 -139
  272. package/dist/error/errorInfo.es.js +0 -32
  273. package/dist/error/errorInfo.es.js.map +0 -1
  274. package/dist/error/headers.cjs +0 -2
  275. package/dist/error/headers.cjs.map +0 -1
  276. package/dist/error/headers.d.cts +0 -39
  277. package/dist/error/headers.d.ts +0 -39
  278. package/dist/error/headers.es.js +0 -10
  279. package/dist/error/headers.es.js.map +0 -1
  280. package/dist/error/index.d.cts +0 -21
  281. package/dist/error/index.d.ts +0 -21
  282. package/dist/error/queryErrorCodes.cjs +0 -2
  283. package/dist/error/queryErrorCodes.es.js.map +0 -1
  284. package/dist/error/wowError.cjs +0 -2
  285. package/dist/error/wowError.cjs.map +0 -1
  286. package/dist/error/wowError.d.cts +0 -99
  287. package/dist/error/wowError.d.ts +0 -99
  288. package/dist/error/wowError.es.js +0 -53
  289. package/dist/error/wowError.es.js.map +0 -1
  290. package/dist/legacy/condition.cjs +0 -2
  291. package/dist/legacy/condition.cjs.map +0 -1
  292. package/dist/legacy/condition.d.cts +0 -517
  293. package/dist/legacy/condition.d.ts +0 -517
  294. package/dist/legacy/condition.es.js +0 -338
  295. package/dist/legacy/condition.es.js.map +0 -1
  296. package/dist/legacy/index.d.cts +0 -16
  297. package/dist/legacy/index.d.ts +0 -16
  298. package/dist/legacy/locale/en_US.cjs +0 -2
  299. package/dist/legacy/locale/en_US.cjs.map +0 -1
  300. package/dist/legacy/locale/en_US.d.cts +0 -7
  301. package/dist/legacy/locale/en_US.d.ts +0 -7
  302. package/dist/legacy/locale/en_US.es.js +0 -50
  303. package/dist/legacy/locale/en_US.es.js.map +0 -1
  304. package/dist/legacy/locale/operatorLocale.d.cts +0 -10
  305. package/dist/legacy/locale/operatorLocale.d.ts +0 -10
  306. package/dist/legacy/locale/zh_CN.cjs +0 -2
  307. package/dist/legacy/locale/zh_CN.cjs.map +0 -1
  308. package/dist/legacy/locale/zh_CN.d.cts +0 -7
  309. package/dist/legacy/locale/zh_CN.d.ts +0 -7
  310. package/dist/legacy/locale/zh_CN.es.js +0 -50
  311. package/dist/legacy/locale/zh_CN.es.js.map +0 -1
  312. package/dist/legacy/operator.cjs +0 -2
  313. package/dist/legacy/operator.cjs.map +0 -1
  314. package/dist/legacy/operator.d.cts +0 -218
  315. package/dist/legacy/operator.d.ts +0 -218
  316. package/dist/legacy/operator.es.js +0 -25
  317. package/dist/legacy/operator.es.js.map +0 -1
  318. package/dist/legacy/queryable.cjs +0 -2
  319. package/dist/legacy/queryable.cjs.map +0 -1
  320. package/dist/legacy/queryable.d.cts +0 -61
  321. package/dist/legacy/queryable.d.ts +0 -61
  322. package/dist/legacy/queryable.es.js +0 -34
  323. package/dist/legacy/queryable.es.js.map +0 -1
  324. package/dist/legacy.cjs +0 -1
  325. package/dist/legacy.es.js +0 -6
  326. package/dist/model/abac.cjs +0 -2
  327. package/dist/model/abac.cjs.map +0 -1
  328. package/dist/model/abac.d.cts +0 -33
  329. package/dist/model/abac.d.ts +0 -33
  330. package/dist/model/abac.es.js +0 -6
  331. package/dist/model/abac.es.js.map +0 -1
  332. package/dist/model/bi.cjs +0 -2
  333. package/dist/model/bi.cjs.map +0 -1
  334. package/dist/model/bi.d.cts +0 -12
  335. package/dist/model/bi.d.ts +0 -12
  336. package/dist/model/bi.es.js +0 -8
  337. package/dist/model/bi.es.js.map +0 -1
  338. package/dist/model/command.cjs +0 -2
  339. package/dist/model/command.cjs.map +0 -1
  340. package/dist/model/command.d.cts +0 -137
  341. package/dist/model/command.d.ts +0 -137
  342. package/dist/model/command.es.js +0 -8
  343. package/dist/model/command.es.js.map +0 -1
  344. package/dist/model/common.d.cts +0 -19
  345. package/dist/model/common.d.ts +0 -19
  346. package/dist/model/domainEventStream.cjs +0 -2
  347. package/dist/model/domainEventStream.cjs.map +0 -1
  348. package/dist/model/domainEventStream.d.cts +0 -109
  349. package/dist/model/domainEventStream.d.ts +0 -109
  350. package/dist/model/domainEventStream.es.js +0 -23
  351. package/dist/model/domainEventStream.es.js.map +0 -1
  352. package/dist/model/function.cjs +0 -2
  353. package/dist/model/function.cjs.map +0 -1
  354. package/dist/model/function.d.cts +0 -41
  355. package/dist/model/function.d.ts +0 -41
  356. package/dist/model/function.es.js +0 -8
  357. package/dist/model/function.es.js.map +0 -1
  358. package/dist/model/index.d.cts +0 -24
  359. package/dist/model/index.d.ts +0 -24
  360. package/dist/model/messaging.d.cts +0 -5
  361. package/dist/model/messaging.d.ts +0 -5
  362. package/dist/model/modeling.d.cts +0 -145
  363. package/dist/model/modeling.d.ts +0 -145
  364. package/dist/model/naming.d.cts +0 -27
  365. package/dist/model/naming.d.ts +0 -27
  366. package/dist/model/snapshot.cjs +0 -2
  367. package/dist/model/snapshot.cjs.map +0 -1
  368. package/dist/model/snapshot.d.cts +0 -53
  369. package/dist/model/snapshot.d.ts +0 -53
  370. package/dist/model/snapshot.es.js +0 -20
  371. package/dist/model/snapshot.es.js.map +0 -1
  372. package/dist/transport/endpoints.cjs +0 -2
  373. package/dist/transport/endpoints.cjs.map +0 -1
  374. package/dist/transport/endpoints.d.cts +0 -79
  375. package/dist/transport/endpoints.d.ts +0 -79
  376. package/dist/transport/endpoints.es.js +0 -14
  377. package/dist/transport/endpoints.es.js.map +0 -1
  378. package/dist/transport/eventStreams.cjs +0 -2
  379. package/dist/transport/eventStreams.cjs.map +0 -1
  380. package/dist/transport/eventStreams.d.cts +0 -25
  381. package/dist/transport/eventStreams.d.ts +0 -25
  382. package/dist/transport/eventStreams.es.js +0 -21
  383. package/dist/transport/eventStreams.es.js.map +0 -1
  384. package/dist/transport/index.d.cts +0 -1
  385. package/dist/transport/index.d.ts +0 -1
@@ -1,372 +0,0 @@
1
- import { SnapshotQueryApi } from './snapshotQueryApi.js';
2
- import { AggregationQuery } from '../../../dsl/aggregation/index.js';
3
- import { FilterExpression } from '../../../dsl/filter/index.js';
4
- import { Condition, ListQueryRequest, PagedQueryRequest, SingleQueryRequest } from '../requests.js';
5
- import { PagedList } from '../../../dsl/queryable.js';
6
- import { MaterializedSnapshot } from '../../../model/snapshot.js';
7
- import { DynamicDocument } from '../../../dsl/documents.js';
8
- import { CursorPage, CursorQuery } from '../../../dsl/cursorQuery.js';
9
- import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
10
- /**
11
- * A client for querying snapshot data through HTTP endpoints.
12
- * Provides methods for various query operations such as counting, listing, paging, and retrieving single snapshots.
13
- *
14
- * @example
15
- * ```typescript
16
- * import { Fetcher } from '@ahoo-wang/fetcher';
17
- * import type { ApiMetadata } from '@ahoo-wang/fetcher-decorator';
18
- *
19
- * // Define the state interface
20
- * interface CartItem {
21
- * productId: string;
22
- * quantity: number;
23
- * }
24
- *
25
- * interface CartState {
26
- * items: CartItem[];
27
- * }
28
- *
29
- * // Create client options configuration
30
- * const clientOptions: ApiMetadata = {
31
- * fetcher: new Fetcher({ baseURL: 'http://localhost:8080/' }),
32
- * basePath: 'owner/{ownerId}/cart'
33
- * };
34
- *
35
- * // Create a snapshot query client instance
36
- * const snapshotQueryClient = new SnapshotQueryClient<CartState>(clientOptions);
37
- *
38
- * // Count snapshots
39
- * const count = await snapshotQueryClient.count(filter.matchAll());
40
- *
41
- * // List snapshots
42
- * const listQuery: FilterListQuery = {
43
- * filter: filter.matchAll()
44
- * };
45
- * const list = await snapshotQueryClient.list(listQuery);
46
- *
47
- * // List snapshots as stream
48
- * const listStream = await snapshotQueryClient.listStream(listQuery);
49
- * for await (const snapshot of listStream) {
50
- * console.log('Received:', snapshot);
51
- * }
52
- *
53
- * // List snapshot states
54
- * const stateList = await snapshotQueryClient.listState(listQuery);
55
- *
56
- * // List snapshot states as stream
57
- * const stateListStream = await snapshotQueryClient.listStateStream(listQuery);
58
- * for await (const state of stateListStream) {
59
- * console.log('Received state:', state);
60
- * }
61
- *
62
- * // Paged snapshots
63
- * const pagedQuery: FilterPagedQuery = {
64
- * filter: filter.matchAll(),
65
- * pagination: { index: 1, size: 10 }
66
- * };
67
- * const paged = await snapshotQueryClient.paged(pagedQuery);
68
- *
69
- * // Paged snapshot states
70
- * const pagedState = await snapshotQueryClient.pagedState(pagedQuery);
71
- *
72
- * // Single snapshot
73
- * const singleQuery: FilterSingleQuery = {
74
- * filter: filter.matchAll()
75
- * };
76
- * const single = await snapshotQueryClient.single(singleQuery);
77
- *
78
- * // Single snapshot state
79
- * const singleState = await snapshotQueryClient.singleState(singleQuery);
80
- * ```
81
- *
82
- * @template S The type of the snapshot state
83
- */
84
- export declare class SnapshotQueryClient<S, FIELDS extends string = string> implements SnapshotQueryApi<S, FIELDS>, ApiMetadataCapable {
85
- readonly apiMetadata?: ApiMetadata | undefined;
86
- /**
87
- * Creates a new SnapshotQueryClient instance.
88
- */
89
- constructor(apiMetadata?: ApiMetadata | undefined);
90
- /** Runs a snapshot aggregation and returns all result rows. */
91
- aggregate<Row extends object = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<Row[]>;
92
- /** Runs a snapshot aggregation and streams the result rows, one per server-sent event. */
93
- aggregateStream<Row extends object = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<ReadableStream<Row>>;
94
- /** Retrieves the next cursor page of materialized snapshots. */
95
- cursor<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(query: CursorQuery<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<CursorPage<T>>;
96
- /** Retrieves the next cursor page of snapshot states. */
97
- cursorState<T extends Partial<S> = S>(query: CursorQuery<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<CursorPage<T>>;
98
- /**
99
- * Counts the number of snapshots that match the given filter.
100
- *
101
- * @param filter - The filter expression or legacy condition
102
- * @param attributes - Optional shared attributes that can be accessed by interceptors
103
- * throughout the request lifecycle. These attributes allow passing
104
- * custom data between different interceptors.
105
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
106
- * @returns A promise that resolves to the count of matching snapshots
107
- *
108
- * @example
109
- * ```typescript
110
- * const count = await snapshotQueryClient.count(filter.matchAll());
111
- * console.log('Total snapshots:', count);
112
- * ```
113
- */
114
- count(filter: FilterExpression<FIELDS> | Condition<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<number>;
115
- /**
116
- * Retrieves a list of materialized snapshots based on the provided query parameters.
117
- *
118
- * @param listQuery - The query parameters for listing snapshots
119
- * @param attributes - Optional shared attributes that can be accessed by interceptors
120
- * throughout the request lifecycle. These attributes allow passing
121
- * custom data between different interceptors.
122
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
123
- * @returns A promise that resolves to an array of partial materialized snapshots
124
- *
125
- * @example
126
- * ```typescript
127
- * const listQuery: FilterListQuery = {
128
- * filter: filter.matchAll()
129
- * };
130
- * const list = await snapshotQueryClient.list(listQuery);
131
- * for (const snapshot of list) {
132
- * console.log('Snapshot:', snapshot);
133
- * }
134
- * ```
135
- */
136
- list<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T[]>;
137
- /**
138
- * Retrieves a stream of materialized snapshots based on the provided query parameters.
139
- *
140
- * @param listQuery - The query parameters for listing snapshots
141
- * @param attributes - Optional shared attributes that can be accessed by interceptors
142
- * throughout the request lifecycle. These attributes allow passing
143
- * custom data between different interceptors.
144
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
145
- * @returns A promise that resolves to a readable stream of partial materialized snapshots
146
- *
147
- * @example
148
- * ```typescript
149
- * const listQuery: FilterListQuery = {
150
- * filter: filter.matchAll()
151
- * };
152
- * const listStream = await snapshotQueryClient.listStream(listQuery);
153
- * for await (const snapshot of listStream) {
154
- * console.log('Received snapshot:', snapshot);
155
- * }
156
- * ```
157
- */
158
- listStream<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<ReadableStream<T>>;
159
- /**
160
- * Retrieves a list of snapshot states based on the provided query parameters.
161
- *
162
- * @param listQuery - The query parameters for listing snapshot states
163
- * @param attributes - Optional shared attributes that can be accessed by interceptors
164
- * throughout the request lifecycle. These attributes allow passing
165
- * custom data between different interceptors.
166
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
167
- * @returns A promise that resolves to an array of partial snapshot states
168
- *
169
- * @example
170
- * ```typescript
171
- * const listQuery: FilterListQuery = {
172
- * filter: filter.matchAll()
173
- * };
174
- * const list = await snapshotQueryClient.listState(listQuery);
175
- * for (const state of list) {
176
- * console.log('State:', state);
177
- * }
178
- * ```
179
- */
180
- listState<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T[]>;
181
- /**
182
- * Retrieves a stream of snapshot states based on the provided query parameters.
183
- *
184
- * @param listQuery - The query parameters for listing snapshot states
185
- * @param attributes - Optional shared attributes that can be accessed by interceptors
186
- * throughout the request lifecycle. These attributes allow passing
187
- * custom data between different interceptors.
188
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
189
- * @returns A promise that resolves to a readable stream of partial snapshot states
190
- *
191
- * @example
192
- * ```typescript
193
- * const listQuery: FilterListQuery = {
194
- * filter: filter.matchAll()
195
- * };
196
- * const listStream = await snapshotQueryClient.listStateStream(listQuery);
197
- * for await (const state of listStream) {
198
- * console.log('Received state:', state);
199
- * }
200
- * ```
201
- */
202
- listStateStream<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<ReadableStream<T>>;
203
- /**
204
- * Retrieves a paged list of materialized snapshots based on the provided query parameters.
205
- *
206
- * @param pagedQuery - The query parameters for paging snapshots
207
- * @param attributes - Optional shared attributes that can be accessed by interceptors
208
- * throughout the request lifecycle. These attributes allow passing
209
- * custom data between different interceptors.
210
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
211
- * @returns A promise that resolves to a paged list of partial materialized snapshots
212
- *
213
- * @example
214
- * ```typescript
215
- * const pagedQuery: FilterPagedQuery = {
216
- * filter: filter.matchAll(),
217
- * pagination: { index: 1, size: 10 }
218
- * };
219
- * const paged = await snapshotQueryClient.paged(pagedQuery);
220
- * console.log('Total:', paged.total);
221
- * for (const snapshot of paged.list) {
222
- * console.log('Snapshot:', snapshot);
223
- * }
224
- * ```
225
- */
226
- paged<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<PagedList<T>>;
227
- /**
228
- * Retrieves a paged list of snapshot states based on the provided query parameters.
229
- *
230
- * @param pagedQuery - The query parameters for paging snapshot states
231
- * @param attributes - Optional shared attributes that can be accessed by interceptors
232
- * throughout the request lifecycle. These attributes allow passing
233
- * custom data between different interceptors.
234
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
235
- * @returns A promise that resolves to a paged list of partial snapshot states
236
- *
237
- * @example
238
- * ```typescript
239
- * const pagedQuery: FilterPagedQuery = {
240
- * filter: filter.matchAll(),
241
- * pagination: { index: 1, size: 10 }
242
- * };
243
- * const pagedState = await snapshotQueryClient.pagedState(pagedQuery);
244
- * for (const state of pagedState.list) {
245
- * console.log('State:', state);
246
- * }
247
- * ```
248
- */
249
- pagedState<T extends Partial<S> = S>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<PagedList<T>>;
250
- /**
251
- * Retrieves a single materialized snapshot based on the provided query parameters.
252
- *
253
- * @param singleQuery - The query parameters for retrieving a single snapshot
254
- * @param attributes - Optional shared attributes that can be accessed by interceptors
255
- * throughout the request lifecycle. These attributes allow passing
256
- * custom data between different interceptors.
257
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
258
- * @returns A promise that resolves to a partial materialized snapshot
259
- *
260
- * @example
261
- * ```typescript
262
- * const singleQuery: FilterSingleQuery = {
263
- * filter: filter.matchAll()
264
- * };
265
- * const single = await snapshotQueryClient.single(singleQuery);
266
- * console.log('Snapshot:', single);
267
- * ```
268
- */
269
- single<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T>;
270
- /**
271
- * Retrieves a single snapshot state based on the provided query parameters.
272
- *
273
- * @param singleQuery - The query parameters for retrieving a single snapshot state
274
- * @param attributes - Optional shared attributes that can be accessed by interceptors
275
- * throughout the request lifecycle. These attributes allow passing
276
- * custom data between different interceptors.
277
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
278
- * @returns A promise that resolves to a partial snapshot state
279
- *
280
- * @example
281
- * ```typescript
282
- * const singleQuery: FilterSingleQuery = {
283
- * filter: filter.matchAll()
284
- * };
285
- * const singleState = await snapshotQueryClient.singleState(singleQuery);
286
- * console.log('State:', singleState);
287
- * ```
288
- */
289
- singleState<T extends Partial<S> = S>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T>;
290
- /**
291
- * Retrieves a single materialized snapshot by its ID.
292
- *
293
- * @param id - The unique identifier of the snapshot to retrieve
294
- * @param attributes - Optional shared attributes that can be accessed by interceptors
295
- * throughout the request lifecycle. These attributes allow passing
296
- * custom data between different interceptors.
297
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
298
- * @returns A promise that resolves to the materialized snapshot with the specified ID
299
- *
300
- * @example
301
- * ```typescript
302
- * const snapshot = await snapshotQueryClient.getById('snapshot-123');
303
- * console.log('Snapshot:', snapshot);
304
- * ```
305
- */
306
- getById(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<MaterializedSnapshot<S>>;
307
- /**
308
- * Retrieves a single snapshot state by its ID.
309
- *
310
- * @param id - The unique identifier of the snapshot whose state to retrieve
311
- * @param attributes - Optional shared attributes that can be accessed by interceptors
312
- * throughout the request lifecycle. These attributes allow passing
313
- * custom data between different interceptors.
314
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
315
- * @returns A promise that resolves to the snapshot state with the specified ID
316
- *
317
- * @example
318
- * ```typescript
319
- * const state = await snapshotQueryClient.getStateById('snapshot-123');
320
- * console.log('State:', state);
321
- * ```
322
- */
323
- getStateById(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
324
- /**
325
- * Retrieves multiple materialized snapshots by their IDs.
326
- *
327
- * One request, filtered by `filter.aggregateIds(ids)` with `limit` set to
328
- * the number of ids; an empty `ids` sends nothing and resolves to `[]`. The
329
- * server refuses more ids than its filter value limit and its maximum list
330
- * size (1000 each by default), so split a larger set into batches.
331
- *
332
- * @param ids - An array of unique identifiers of the snapshots to retrieve
333
- * @param attributes - Optional shared attributes that can be accessed by interceptors
334
- * throughout the request lifecycle. These attributes allow passing
335
- * custom data between different interceptors.
336
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
337
- * @returns A promise that resolves to an array of materialized snapshots with the specified IDs
338
- *
339
- * @example
340
- * ```typescript
341
- * const snapshots = await snapshotQueryClient.getByIds(['snapshot-123', 'snapshot-456']);
342
- * for (const snapshot of snapshots) {
343
- * console.log('Snapshot:', snapshot);
344
- * }
345
- * ```
346
- */
347
- getByIds(ids: string[], attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<MaterializedSnapshot<S>[]>;
348
- /**
349
- * Retrieves multiple snapshot states by their IDs.
350
- *
351
- * One request, filtered by `filter.aggregateIds(ids)` with `limit` set to
352
- * the number of ids; an empty `ids` sends nothing and resolves to `[]`. The
353
- * server refuses more ids than its filter value limit and its maximum list
354
- * size (1000 each by default), so split a larger set into batches.
355
- *
356
- * @param ids - An array of unique identifiers of the snapshots whose states to retrieve
357
- * @param attributes - Optional shared attributes that can be accessed by interceptors
358
- * throughout the request lifecycle. These attributes allow passing
359
- * custom data between different interceptors.
360
- * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
361
- * @returns A promise that resolves to an array of snapshot states with the specified IDs
362
- *
363
- * @example
364
- * ```typescript
365
- * const states = await snapshotQueryClient.getStateByIds(['snapshot-123', 'snapshot-456']);
366
- * for (const state of states) {
367
- * console.log('State:', state);
368
- * }
369
- * ```
370
- */
371
- getStateByIds(ids: string[], attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S[]>;
372
- }
@@ -1,239 +0,0 @@
1
- import { filter as e } from "../../../dsl/filter/builders.es.js";
2
- import { listQuery as t, singleQuery as n } from "../../../dsl/queryable.es.js";
3
- import { QUERY_STREAM_ENDPOINT as r } from "../../../transport/endpoints.es.js";
4
- import { bindMethods as i } from "../../bindMethods.es.js";
5
- import a from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.es.js";
6
- import o from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.es.js";
7
- import s from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.es.js";
8
- import { SnapshotQueryEndpointPaths as c } from "./endpointPaths.es.js";
9
- import { api as l, attribute as u, autoGeneratedError as d, body as f, post as p } from "@ahoo-wang/fetcher-decorator";
10
- //#region src/client/query/snapshot/snapshotQueryClient.ts
11
- var m = class {
12
- constructor(e) {
13
- this.apiMetadata = e, i(this);
14
- }
15
- aggregate(e, t, n) {
16
- throw d(e, t, n);
17
- }
18
- /* v8 ignore stop */
19
- aggregateStream(e, t, n) {
20
- throw d(e, t, n);
21
- }
22
- /* v8 ignore stop */
23
- cursor(e, t, n) {
24
- throw d(e, t, n);
25
- }
26
- /* v8 ignore stop */
27
- cursorState(e, t, n) {
28
- throw d(e, t, n);
29
- }
30
- /* v8 ignore stop */
31
- count(e, t, n) {
32
- throw d(e, t, n);
33
- }
34
- /* v8 ignore stop */
35
- list(e, t, n) {
36
- throw d(e, t, n);
37
- }
38
- /* v8 ignore stop */
39
- listStream(e, t, n) {
40
- throw d(e, t, n);
41
- }
42
- /* v8 ignore stop */
43
- listState(e, t, n) {
44
- throw d(e, t, n);
45
- }
46
- /* v8 ignore stop */
47
- listStateStream(e, t, n) {
48
- throw d(e, t, n);
49
- }
50
- /* v8 ignore stop */
51
- paged(e, t, n) {
52
- throw d(e, t, n);
53
- }
54
- /* v8 ignore stop */
55
- pagedState(e, t, n) {
56
- throw d(e, t, n);
57
- }
58
- /* v8 ignore stop */
59
- single(e, t, n) {
60
- throw d(e, t, n);
61
- }
62
- /* v8 ignore stop */
63
- singleState(e, t, n) {
64
- throw d(e, t, n);
65
- }
66
- /* v8 ignore stop */
67
- getById(t, r, i) {
68
- let a = n({ filter: e.aggregateId(t) });
69
- return this.single(a, r, i);
70
- }
71
- getStateById(t, r, i) {
72
- let a = n({ filter: e.aggregateId(t) });
73
- return this.singleState(a, r, i);
74
- }
75
- getByIds(n, r, i) {
76
- if (n.length === 0) return Promise.resolve([]);
77
- let a = t({
78
- filter: e.aggregateIds(n),
79
- limit: n.length
80
- });
81
- return this.list(a, r, i);
82
- }
83
- getStateByIds(n, r, i) {
84
- if (n.length === 0) return Promise.resolve([]);
85
- let a = t({
86
- filter: e.aggregateIds(n),
87
- limit: n.length
88
- });
89
- return this.listState(a, r, i);
90
- }
91
- };
92
- s([
93
- p(c.AGGREGATION),
94
- o(0, f()),
95
- o(1, u()),
96
- a("design:type", Function),
97
- a("design:paramtypes", [
98
- Object,
99
- typeof Record > "u" ? Object : Record,
100
- Object
101
- ]),
102
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
103
- ], m.prototype, "aggregate", null), s([
104
- p(c.AGGREGATION, r),
105
- o(0, f()),
106
- o(1, u()),
107
- a("design:type", Function),
108
- a("design:paramtypes", [
109
- Object,
110
- typeof Record > "u" ? Object : Record,
111
- Object
112
- ]),
113
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
114
- ], m.prototype, "aggregateStream", null), s([
115
- p(c.CURSOR),
116
- o(0, f()),
117
- o(1, u()),
118
- a("design:type", Function),
119
- a("design:paramtypes", [
120
- Object,
121
- typeof Record > "u" ? Object : Record,
122
- Object
123
- ]),
124
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
125
- ], m.prototype, "cursor", null), s([
126
- p(c.CURSOR_STATE),
127
- o(0, f()),
128
- o(1, u()),
129
- a("design:type", Function),
130
- a("design:paramtypes", [
131
- Object,
132
- typeof Record > "u" ? Object : Record,
133
- Object
134
- ]),
135
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
136
- ], m.prototype, "cursorState", null), s([
137
- p(c.COUNT),
138
- o(0, f()),
139
- o(1, u()),
140
- a("design:type", Function),
141
- a("design:paramtypes", [
142
- Object,
143
- typeof Record > "u" ? Object : Record,
144
- Object
145
- ]),
146
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
147
- ], m.prototype, "count", null), s([
148
- p(c.LIST),
149
- o(0, f()),
150
- o(1, u()),
151
- a("design:type", Function),
152
- a("design:paramtypes", [
153
- Object,
154
- typeof Record > "u" ? Object : Record,
155
- Object
156
- ]),
157
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
158
- ], m.prototype, "list", null), s([
159
- p(c.LIST, r),
160
- o(0, f()),
161
- o(1, u()),
162
- a("design:type", Function),
163
- a("design:paramtypes", [
164
- Object,
165
- typeof Record > "u" ? Object : Record,
166
- Object
167
- ]),
168
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
169
- ], m.prototype, "listStream", null), s([
170
- p(c.LIST_STATE),
171
- o(0, f()),
172
- o(1, u()),
173
- a("design:type", Function),
174
- a("design:paramtypes", [
175
- Object,
176
- typeof Record > "u" ? Object : Record,
177
- Object
178
- ]),
179
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
180
- ], m.prototype, "listState", null), s([
181
- p(c.LIST_STATE, r),
182
- o(0, f()),
183
- o(1, u()),
184
- a("design:type", Function),
185
- a("design:paramtypes", [
186
- Object,
187
- typeof Record > "u" ? Object : Record,
188
- Object
189
- ]),
190
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
191
- ], m.prototype, "listStateStream", null), s([
192
- p(c.PAGED),
193
- o(0, f()),
194
- o(1, u()),
195
- a("design:type", Function),
196
- a("design:paramtypes", [
197
- Object,
198
- typeof Record > "u" ? Object : Record,
199
- Object
200
- ]),
201
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
202
- ], m.prototype, "paged", null), s([
203
- p(c.PAGED_STATE),
204
- o(0, f()),
205
- o(1, u()),
206
- a("design:type", Function),
207
- a("design:paramtypes", [
208
- Object,
209
- typeof Record > "u" ? Object : Record,
210
- Object
211
- ]),
212
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
213
- ], m.prototype, "pagedState", null), s([
214
- p(c.SINGLE),
215
- o(0, f()),
216
- o(1, u()),
217
- a("design:type", Function),
218
- a("design:paramtypes", [
219
- Object,
220
- typeof Record > "u" ? Object : Record,
221
- Object
222
- ]),
223
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
224
- ], m.prototype, "single", null), s([
225
- p(c.SINGLE_STATE),
226
- o(0, f()),
227
- o(1, u()),
228
- a("design:type", Function),
229
- a("design:paramtypes", [
230
- Object,
231
- typeof Record > "u" ? Object : Record,
232
- Object
233
- ]),
234
- a("design:returntype", typeof Promise > "u" ? Object : Promise)
235
- ], m.prototype, "singleState", null), m = s([l(), a("design:paramtypes", [Object])], m);
236
- //#endregion
237
- export { m as SnapshotQueryClient };
238
-
239
- //# sourceMappingURL=snapshotQueryClient.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snapshotQueryClient.es.js","names":["_decorate","_decorateParam","_decorateMetadata","__decorateMetadata","__decorateParam","__decorate","SnapshotQueryClient","apiMetadata","bindMethods","autoGeneratedError","query","attributes","abort","filter","listQuery","pagedQuery","singleQuery","id","ids","post","SnapshotQueryEndpointPaths","body","attribute","QUERY_STREAM_ENDPOINT","api"],"sources":["../../../../src/client/query/snapshot/snapshotQueryClient.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 type { SnapshotQueryApi } from './snapshotQueryApi.js';\nimport { SnapshotQueryEndpointPaths } from './endpointPaths.js';\nimport type { AggregationQuery } from '../../../dsl/aggregation/index.js';\nimport { filter, type FilterExpression } from '../../../dsl/filter/index.js';\nimport type {\n Condition,\n ListQueryRequest,\n PagedQueryRequest,\n SingleQueryRequest,\n} from '../requests.js';\nimport {\n listQuery,\n type PagedList,\n singleQuery,\n} from '../../../dsl/queryable.js';\nimport type { MaterializedSnapshot } from '../../../model/snapshot.js';\nimport type { DynamicDocument } from '../../../dsl/documents.js';\nimport type { CursorPage, CursorQuery } from '../../../dsl/cursorQuery.js';\nimport { QUERY_STREAM_ENDPOINT } from '../../../transport/endpoints.js';\nimport type {\n ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport {\n api,\n attribute,\n autoGeneratedError,\n body,\n post,\n} from '@ahoo-wang/fetcher-decorator';\nimport { bindMethods } from '../../bindMethods.js';\n\n/**\n * A client for querying snapshot data through HTTP endpoints.\n * Provides methods for various query operations such as counting, listing, paging, and retrieving single snapshots.\n *\n * @example\n * ```typescript\n * import { Fetcher } from '@ahoo-wang/fetcher';\n * import type { ApiMetadata } from '@ahoo-wang/fetcher-decorator';\n *\n * // Define the state interface\n * interface CartItem {\n * productId: string;\n * quantity: number;\n * }\n *\n * interface CartState {\n * items: CartItem[];\n * }\n *\n * // Create client options configuration\n * const clientOptions: ApiMetadata = {\n * fetcher: new Fetcher({ baseURL: 'http://localhost:8080/' }),\n * basePath: 'owner/{ownerId}/cart'\n * };\n *\n * // Create a snapshot query client instance\n * const snapshotQueryClient = new SnapshotQueryClient<CartState>(clientOptions);\n *\n * // Count snapshots\n * const count = await snapshotQueryClient.count(filter.matchAll());\n *\n * // List snapshots\n * const listQuery: FilterListQuery = {\n * filter: filter.matchAll()\n * };\n * const list = await snapshotQueryClient.list(listQuery);\n *\n * // List snapshots as stream\n * const listStream = await snapshotQueryClient.listStream(listQuery);\n * for await (const snapshot of listStream) {\n * console.log('Received:', snapshot);\n * }\n *\n * // List snapshot states\n * const stateList = await snapshotQueryClient.listState(listQuery);\n *\n * // List snapshot states as stream\n * const stateListStream = await snapshotQueryClient.listStateStream(listQuery);\n * for await (const state of stateListStream) {\n * console.log('Received state:', state);\n * }\n *\n * // Paged snapshots\n * const pagedQuery: FilterPagedQuery = {\n * filter: filter.matchAll(),\n * pagination: { index: 1, size: 10 }\n * };\n * const paged = await snapshotQueryClient.paged(pagedQuery);\n *\n * // Paged snapshot states\n * const pagedState = await snapshotQueryClient.pagedState(pagedQuery);\n *\n * // Single snapshot\n * const singleQuery: FilterSingleQuery = {\n * filter: filter.matchAll()\n * };\n * const single = await snapshotQueryClient.single(singleQuery);\n *\n * // Single snapshot state\n * const singleState = await snapshotQueryClient.singleState(singleQuery);\n * ```\n *\n * @template S The type of the snapshot state\n */\n@api()\nexport class SnapshotQueryClient<S, FIELDS extends string = string>\n implements SnapshotQueryApi<S, FIELDS>, ApiMetadataCapable\n{\n /**\n * Creates a new SnapshotQueryClient instance.\n */\n constructor(public readonly apiMetadata?: ApiMetadata) {\n bindMethods(this);\n }\n\n /** Runs a snapshot aggregation and returns all result rows. */\n @post(SnapshotQueryEndpointPaths.AGGREGATION)\n /* v8 ignore start */\n aggregate<\n Row extends object = DynamicDocument,\n AGGREGATION_FIELDS extends string = string,\n >(\n @body() query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<Row[]> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n /** Runs a snapshot aggregation and streams the result rows, one per server-sent event. */\n @post(SnapshotQueryEndpointPaths.AGGREGATION, QUERY_STREAM_ENDPOINT)\n /* v8 ignore start */\n aggregateStream<\n Row extends object = DynamicDocument,\n AGGREGATION_FIELDS extends string = string,\n >(\n @body() query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<ReadableStream<Row>> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n /** Retrieves the next cursor page of materialized snapshots. */\n @post(SnapshotQueryEndpointPaths.CURSOR)\n /* v8 ignore start */\n cursor<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(\n @body() query: CursorQuery<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<CursorPage<T>> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n /** Retrieves the next cursor page of snapshot states. */\n @post(SnapshotQueryEndpointPaths.CURSOR_STATE)\n /* v8 ignore start */\n cursorState<T extends Partial<S> = S>(\n @body() query: CursorQuery<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<CursorPage<T>> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Counts the number of snapshots that match the given filter.\n *\n * @param filter - The filter expression or legacy condition\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the count of matching snapshots\n *\n * @example\n * ```typescript\n * const count = await snapshotQueryClient.count(filter.matchAll());\n * console.log('Total snapshots:', count);\n * ```\n */\n @post(SnapshotQueryEndpointPaths.COUNT)\n /* v8 ignore start */\n count(\n // compat(wow<9): accepts the deprecated Condition, which Wow < 8.11 needs; narrow to FilterExpression in v10.\n @body() filter: FilterExpression<FIELDS> | Condition<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<number> {\n throw autoGeneratedError(filter, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a list of materialized snapshots based on the provided query parameters.\n *\n * @param listQuery - The query parameters for listing snapshots\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to an array of partial materialized snapshots\n *\n * @example\n * ```typescript\n * const listQuery: FilterListQuery = {\n * filter: filter.matchAll()\n * };\n * const list = await snapshotQueryClient.list(listQuery);\n * for (const snapshot of list) {\n * console.log('Snapshot:', snapshot);\n * }\n * ```\n */\n @post(SnapshotQueryEndpointPaths.LIST)\n /* v8 ignore start */\n list<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(\n @body() listQuery: ListQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<T[]> {\n throw autoGeneratedError(listQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a stream of materialized snapshots based on the provided query parameters.\n *\n * @param listQuery - The query parameters for listing snapshots\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to a readable stream of partial materialized snapshots\n *\n * @example\n * ```typescript\n * const listQuery: FilterListQuery = {\n * filter: filter.matchAll()\n * };\n * const listStream = await snapshotQueryClient.listStream(listQuery);\n * for await (const snapshot of listStream) {\n * console.log('Received snapshot:', snapshot);\n * }\n * ```\n */\n @post(SnapshotQueryEndpointPaths.LIST, QUERY_STREAM_ENDPOINT)\n /* v8 ignore start */\n listStream<\n T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>,\n >(\n @body() listQuery: ListQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<ReadableStream<T>> {\n throw autoGeneratedError(listQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a list of snapshot states based on the provided query parameters.\n *\n * @param listQuery - The query parameters for listing snapshot states\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to an array of partial snapshot states\n *\n * @example\n * ```typescript\n * const listQuery: FilterListQuery = {\n * filter: filter.matchAll()\n * };\n * const list = await snapshotQueryClient.listState(listQuery);\n * for (const state of list) {\n * console.log('State:', state);\n * }\n * ```\n */\n @post(SnapshotQueryEndpointPaths.LIST_STATE)\n /* v8 ignore start */\n listState<T extends Partial<S> = S>(\n @body() listQuery: ListQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<T[]> {\n throw autoGeneratedError(listQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a stream of snapshot states based on the provided query parameters.\n *\n * @param listQuery - The query parameters for listing snapshot states\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to a readable stream of partial snapshot states\n *\n * @example\n * ```typescript\n * const listQuery: FilterListQuery = {\n * filter: filter.matchAll()\n * };\n * const listStream = await snapshotQueryClient.listStateStream(listQuery);\n * for await (const state of listStream) {\n * console.log('Received state:', state);\n * }\n * ```\n */\n @post(SnapshotQueryEndpointPaths.LIST_STATE, QUERY_STREAM_ENDPOINT)\n /* v8 ignore start */\n listStateStream<T extends Partial<S> = S>(\n @body() listQuery: ListQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<ReadableStream<T>> {\n throw autoGeneratedError(listQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a paged list of materialized snapshots based on the provided query parameters.\n *\n * @param pagedQuery - The query parameters for paging snapshots\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to a paged list of partial materialized snapshots\n *\n * @example\n * ```typescript\n * const pagedQuery: FilterPagedQuery = {\n * filter: filter.matchAll(),\n * pagination: { index: 1, size: 10 }\n * };\n * const paged = await snapshotQueryClient.paged(pagedQuery);\n * console.log('Total:', paged.total);\n * for (const snapshot of paged.list) {\n * console.log('Snapshot:', snapshot);\n * }\n * ```\n */\n @post(SnapshotQueryEndpointPaths.PAGED)\n /* v8 ignore start */\n paged<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(\n @body() pagedQuery: PagedQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<PagedList<T>> {\n throw autoGeneratedError(pagedQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a paged list of snapshot states based on the provided query parameters.\n *\n * @param pagedQuery - The query parameters for paging snapshot states\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to a paged list of partial snapshot states\n *\n * @example\n * ```typescript\n * const pagedQuery: FilterPagedQuery = {\n * filter: filter.matchAll(),\n * pagination: { index: 1, size: 10 }\n * };\n * const pagedState = await snapshotQueryClient.pagedState(pagedQuery);\n * for (const state of pagedState.list) {\n * console.log('State:', state);\n * }\n * ```\n */\n @post(SnapshotQueryEndpointPaths.PAGED_STATE)\n /* v8 ignore start */\n pagedState<T extends Partial<S> = S>(\n @body() pagedQuery: PagedQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<PagedList<T>> {\n throw autoGeneratedError(pagedQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a single materialized snapshot based on the provided query parameters.\n *\n * @param singleQuery - The query parameters for retrieving a single snapshot\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to a partial materialized snapshot\n *\n * @example\n * ```typescript\n * const singleQuery: FilterSingleQuery = {\n * filter: filter.matchAll()\n * };\n * const single = await snapshotQueryClient.single(singleQuery);\n * console.log('Snapshot:', single);\n * ```\n */\n @post(SnapshotQueryEndpointPaths.SINGLE)\n /* v8 ignore start */\n single<T extends Partial<MaterializedSnapshot<S>> = MaterializedSnapshot<S>>(\n @body() singleQuery: SingleQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<T> {\n throw autoGeneratedError(singleQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a single snapshot state based on the provided query parameters.\n *\n * @param singleQuery - The query parameters for retrieving a single snapshot state\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to a partial snapshot state\n *\n * @example\n * ```typescript\n * const singleQuery: FilterSingleQuery = {\n * filter: filter.matchAll()\n * };\n * const singleState = await snapshotQueryClient.singleState(singleQuery);\n * console.log('State:', singleState);\n * ```\n */\n @post(SnapshotQueryEndpointPaths.SINGLE_STATE)\n /* v8 ignore start */\n singleState<T extends Partial<S> = S>(\n @body() singleQuery: SingleQueryRequest<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<T> {\n throw autoGeneratedError(singleQuery, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Retrieves a single materialized snapshot by its ID.\n *\n * @param id - The unique identifier of the snapshot to retrieve\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the materialized snapshot with the specified ID\n *\n * @example\n * ```typescript\n * const snapshot = await snapshotQueryClient.getById('snapshot-123');\n * console.log('Snapshot:', snapshot);\n * ```\n */\n getById(\n id: string,\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<MaterializedSnapshot<S>> {\n const query = singleQuery<FIELDS>({ filter: filter.aggregateId(id) });\n return this.single(query, attributes, abort);\n }\n\n /**\n * Retrieves a single snapshot state by its ID.\n *\n * @param id - The unique identifier of the snapshot whose state to retrieve\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the snapshot state with the specified ID\n *\n * @example\n * ```typescript\n * const state = await snapshotQueryClient.getStateById('snapshot-123');\n * console.log('State:', state);\n * ```\n */\n getStateById(\n id: string,\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n const query = singleQuery<FIELDS>({ filter: filter.aggregateId(id) });\n return this.singleState(query, attributes, abort);\n }\n\n /**\n * Retrieves multiple materialized snapshots by their IDs.\n *\n * One request, filtered by `filter.aggregateIds(ids)` with `limit` set to\n * the number of ids; an empty `ids` sends nothing and resolves to `[]`. The\n * server refuses more ids than its filter value limit and its maximum list\n * size (1000 each by default), so split a larger set into batches.\n *\n * @param ids - An array of unique identifiers of the snapshots to retrieve\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to an array of materialized snapshots with the specified IDs\n *\n * @example\n * ```typescript\n * const snapshots = await snapshotQueryClient.getByIds(['snapshot-123', 'snapshot-456']);\n * for (const snapshot of snapshots) {\n * console.log('Snapshot:', snapshot);\n * }\n * ```\n */\n getByIds(\n ids: string[],\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<MaterializedSnapshot<S>[]> {\n if (ids.length === 0) return Promise.resolve([]);\n const query = listQuery<FIELDS>({\n filter: filter.aggregateIds(ids),\n limit: ids.length,\n });\n return this.list(query, attributes, abort);\n }\n\n /**\n * Retrieves multiple snapshot states by their IDs.\n *\n * One request, filtered by `filter.aggregateIds(ids)` with `limit` set to\n * the number of ids; an empty `ids` sends nothing and resolves to `[]`. The\n * server refuses more ids than its filter value limit and its maximum list\n * size (1000 each by default), so split a larger set into batches.\n *\n * @param ids - An array of unique identifiers of the snapshots whose states to retrieve\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to an array of snapshot states with the specified IDs\n *\n * @example\n * ```typescript\n * const states = await snapshotQueryClient.getStateByIds(['snapshot-123', 'snapshot-456']);\n * for (const state of states) {\n * console.log('State:', state);\n * }\n * ```\n */\n getStateByIds(\n ids: string[],\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S[]> {\n if (ids.length === 0) return Promise.resolve([]);\n const query = listQuery<FIELDS>({\n filter: filter.aggregateIds(ids),\n limit: ids.length,\n });\n return this.listState(query, attributes, abort);\n }\n}\n"],"mappings":";;;;;;;;;;AAwHO,IAAMM,IAAN,MAEP;CAIE,YAAY,GAA2C;EACrD,AAD0B,KAAA,cAAAC,GAC1BC,EAAY,IAAI;CAClB;CAGA,UAME,GACA,GACA,GACgB;EAChB,MAAMC,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAIA,gBAME,GACA,GACA,GAC8B;EAC9B,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAIA,OAGE,GACA,GACA,GACwB;EACxB,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAIA,YAGE,GACA,GACA,GACwB;EACxB,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAmBA,MAIE,GACA,GACA,GACiB;EACjB,MAAMH,EAAmBI,GAAQF,GAAYC,CAAK;CACpD;;CAwBA,KAGE,GACA,GACA,GACc;EACd,MAAMH,EAAmBK,GAAWH,GAAYC,CAAK;CACvD;;CAwBA,WAKE,GACA,GACA,GAC4B;EAC5B,MAAMH,EAAmBK,GAAWH,GAAYC,CAAK;CACvD;;CAwBA,UAGE,GACA,GACA,GACc;EACd,MAAMH,EAAmBK,GAAWH,GAAYC,CAAK;CACvD;;CAwBA,gBAGE,GACA,GACA,GAC4B;EAC5B,MAAMH,EAAmBK,GAAWH,GAAYC,CAAK;CACvD;;CA0BA,MAGE,GACA,GACA,GACuB;EACvB,MAAMH,EAAmBM,GAAYJ,GAAYC,CAAK;CACxD;;CAyBA,WAGE,GACA,GACA,GACuB;EACvB,MAAMH,EAAmBM,GAAYJ,GAAYC,CAAK;CACxD;;CAsBA,OAGE,GACA,GACA,GACY;EACZ,MAAMH,EAAmBO,GAAaL,GAAYC,CAAK;CACzD;;CAsBA,YAGE,GACA,GACA,GACY;EACZ,MAAMH,EAAmBO,GAAaL,GAAYC,CAAK;CACzD;;CAmBA,QACE,GACA,GACA,GACkC;EAClC,IAAMF,IAAQM,EAAoB,EAAE,QAAQH,EAAO,YAAYI,CAAE,EAAE,CAAC;EACpE,OAAO,KAAK,OAAOP,GAAOC,GAAYC,CAAK;CAC7C;CAkBA,aACE,GACA,GACA,GACY;EACZ,IAAMF,IAAQM,EAAoB,EAAE,QAAQH,EAAO,YAAYI,CAAE,EAAE,CAAC;EACpE,OAAO,KAAK,YAAYP,GAAOC,GAAYC,CAAK;CAClD;CAyBA,SACE,GACA,GACA,GACoC;EACpC,IAAIM,EAAI,WAAW,GAAG,OAAO,QAAQ,QAAQ,CAAC,CAAC;EAC/C,IAAMR,IAAQI,EAAkB;GAC9B,QAAQD,EAAO,aAAaK,CAAG;GAC/B,OAAOA,EAAI;EACb,CAAC;EACD,OAAO,KAAK,KAAKR,GAAOC,GAAYC,CAAK;CAC3C;CAyBA,cACE,GACA,GACA,GACc;EACd,IAAIM,EAAI,WAAW,GAAG,OAAO,QAAQ,QAAQ,CAAC,CAAC;EAC/C,IAAMR,IAAQI,EAAkB;GAC9B,QAAQD,EAAO,aAAaK,CAAG;GAC/B,OAAOA,EAAI;EACb,CAAC;EACD,OAAO,KAAK,UAAUR,GAAOC,GAAYC,CAAK;CAChD;AACF;;CA3cGO,EAAKC,EAA2B,WAAW;CAMzCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CAQZH,EAAKC,EAA2B,aAAaG,CAAqB;CAMhEtB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CAQZH,EAAKC,EAA2B,MAAM;CAGpCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CAQZH,EAAKC,EAA2B,YAAY;CAG1CnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CAuBZH,EAAKC,EAA2B,KAAK;CAInCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA4BZH,EAAKC,EAA2B,IAAI;CAGlCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA4BZH,EAAKC,EAA2B,MAAMG,CAAqB;CAKzDtB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA4BZH,EAAKC,EAA2B,UAAU;CAGxCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA4BZH,EAAKC,EAA2B,YAAYG,CAAqB;CAG/DtB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA8BZH,EAAKC,EAA2B,KAAK;CAGnCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA6BZH,EAAKC,EAA2B,WAAW;CAGzCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA0BZH,EAAKC,EAA2B,MAAM;CAGpCnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;;CA0BZH,EAAKC,EAA2B,YAAY;CAG1CnB,EAAA,GAAAoB,EAAK,CAAA;CACLpB,EAAA,GAAAqB,EAAU,CAAA;;;;;;;;sCAvVd,IAAAtB,EAAA,CAAAwB,EAAI,GAAAtB,EAAA,qBAAA,CAAA,MAAA,CAAA,CAAA,GAAAI,CAAA"}