@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 @@
1
+ {"version":3,"file":"endpointPaths.es.js","names":["QueryDescriptorEndpointPaths"],"sources":["../../../../src/client/query/descriptor/endpointPaths.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: the index of this folder does not re-export this file. The\n// paths are relative to the client's base path, which names the aggregate\n// without a tenant or owner segment: the schema routes have neither.\nexport const QueryDescriptorEndpointPaths = Object.freeze({\n SNAPSHOT: 'snapshot/schema',\n EVENT_STREAM: 'event/schema',\n} as const);\n"],"mappings":";AAgBA,IAAaA,IAA+B,OAAO,OAAO;CACxD,UAAU;CACV,cAAc;AAChB,CAAU"}
@@ -0,0 +1,2 @@
1
+ export * from './queryDescriptorApi.cjs';
2
+ export * from './queryDescriptorClient.cjs';
@@ -0,0 +1,2 @@
1
+ export * from './queryDescriptorApi.js';
2
+ export * from './queryDescriptorClient.js';
@@ -0,0 +1,58 @@
1
+ import { QueryModelDescriptor } from '../../../dsl/descriptor.cjs';
2
+ /** The descriptor was read in full: the server had none matching the version sent, or none was sent. */
3
+ export interface QueryDescriptorRead {
4
+ /** `false`: `descriptor` holds the descriptor. */
5
+ notModified: false;
6
+ /** The descriptor the server answered with. */
7
+ descriptor: QueryModelDescriptor;
8
+ /** Its version, the same as `descriptor.version`; send it next time. */
9
+ version: string;
10
+ }
11
+ /**
12
+ * The server answered 304 Not Modified: the descriptor still has the version
13
+ * sent, so the copy the caller holds is current.
14
+ */
15
+ export interface QueryDescriptorNotModified {
16
+ /** `true`: keep the descriptor already held. */
17
+ notModified: true;
18
+ /** The version sent, without ETag quotes. */
19
+ version: string;
20
+ }
21
+ /**
22
+ * What {@link QueryDescriptorApi} answers: the descriptor, or word that the
23
+ * one the caller holds is current. Branch on `notModified`.
24
+ */
25
+ export type QueryDescriptorResult = QueryDescriptorRead | QueryDescriptorNotModified;
26
+ /**
27
+ * Reads an aggregate's query capability descriptors: what its snapshot and
28
+ * event stream query models admit (fields, operators, sort, paging,
29
+ * aggregation, limits). {@link QueryDescriptorClient} implements it; code
30
+ * written against the interface can take a test double.
31
+ *
32
+ * Each method takes the version of a descriptor already held, as
33
+ * `descriptor.version` or as the ETag the server sent (quoted, or weak), and
34
+ * sends it as `If-None-Match`: an unchanged descriptor then answers 304
35
+ * without a body, and the method resolves to
36
+ * `{ notModified: true, version }`. Any other failure rejects as the query
37
+ * methods do; `toWowError` reads it.
38
+ */
39
+ export interface QueryDescriptorApi {
40
+ /**
41
+ * Reads the descriptor of the snapshot query model,
42
+ * `GET {aggregate}/snapshot/schema`.
43
+ *
44
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
45
+ * @param attributes - Optional shared attributes for the interceptors
46
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
47
+ */
48
+ describeSnapshot(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
49
+ /**
50
+ * Reads the descriptor of the event stream query model,
51
+ * `GET {aggregate}/event/schema`.
52
+ *
53
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
54
+ * @param attributes - Optional shared attributes for the interceptors
55
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
56
+ */
57
+ describeEventStream(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
58
+ }
@@ -0,0 +1,58 @@
1
+ import { QueryModelDescriptor } from '../../../dsl/descriptor.js';
2
+ /** The descriptor was read in full: the server had none matching the version sent, or none was sent. */
3
+ export interface QueryDescriptorRead {
4
+ /** `false`: `descriptor` holds the descriptor. */
5
+ notModified: false;
6
+ /** The descriptor the server answered with. */
7
+ descriptor: QueryModelDescriptor;
8
+ /** Its version, the same as `descriptor.version`; send it next time. */
9
+ version: string;
10
+ }
11
+ /**
12
+ * The server answered 304 Not Modified: the descriptor still has the version
13
+ * sent, so the copy the caller holds is current.
14
+ */
15
+ export interface QueryDescriptorNotModified {
16
+ /** `true`: keep the descriptor already held. */
17
+ notModified: true;
18
+ /** The version sent, without ETag quotes. */
19
+ version: string;
20
+ }
21
+ /**
22
+ * What {@link QueryDescriptorApi} answers: the descriptor, or word that the
23
+ * one the caller holds is current. Branch on `notModified`.
24
+ */
25
+ export type QueryDescriptorResult = QueryDescriptorRead | QueryDescriptorNotModified;
26
+ /**
27
+ * Reads an aggregate's query capability descriptors: what its snapshot and
28
+ * event stream query models admit (fields, operators, sort, paging,
29
+ * aggregation, limits). {@link QueryDescriptorClient} implements it; code
30
+ * written against the interface can take a test double.
31
+ *
32
+ * Each method takes the version of a descriptor already held, as
33
+ * `descriptor.version` or as the ETag the server sent (quoted, or weak), and
34
+ * sends it as `If-None-Match`: an unchanged descriptor then answers 304
35
+ * without a body, and the method resolves to
36
+ * `{ notModified: true, version }`. Any other failure rejects as the query
37
+ * methods do; `toWowError` reads it.
38
+ */
39
+ export interface QueryDescriptorApi {
40
+ /**
41
+ * Reads the descriptor of the snapshot query model,
42
+ * `GET {aggregate}/snapshot/schema`.
43
+ *
44
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
45
+ * @param attributes - Optional shared attributes for the interceptors
46
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
47
+ */
48
+ describeSnapshot(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
49
+ /**
50
+ * Reads the descriptor of the event stream query model,
51
+ * `GET {aggregate}/event/schema`.
52
+ *
53
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
54
+ * @param attributes - Optional shared attributes for the interceptors
55
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
56
+ */
57
+ describeEventStream(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
58
+ }
@@ -0,0 +1,2 @@
1
+ const e=require("../../bindMethods.cjs"),t=require("./descriptorEndpoints.cjs");var n=class{constructor(t){this.apiMetadata=t,e.bindMethods(this)}async describeSnapshot(e,n,r){let i=t.descriptorVersion(e),a=await new t.QueryDescriptorEndpoints(this.apiMetadata).snapshot(t.ifNoneMatch(i),n,r);return t.readDescriptor(a,i)}async describeEventStream(e,n,r){let i=t.descriptorVersion(e),a=await new t.QueryDescriptorEndpoints(this.apiMetadata).eventStream(t.ifNoneMatch(i),n,r);return t.readDescriptor(a,i)}};exports.QueryDescriptorClient=n;
2
+ //# sourceMappingURL=queryDescriptorClient.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryDescriptorClient.cjs","names":["descriptorVersion","QueryDescriptorEndpoints","ifNoneMatch","readDescriptor","require_bindMethods","require_descriptorEndpoints","QueryDescriptorClient","apiMetadata","version","previous","exchange","attributes","abort"],"sources":["../../../../src/client/query/descriptor/queryDescriptorClient.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 {\n ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport type {\n QueryDescriptorApi,\n QueryDescriptorResult,\n} from './queryDescriptorApi.js';\nimport {\n descriptorVersion,\n ifNoneMatch,\n QueryDescriptorEndpoints,\n readDescriptor,\n} from './descriptorEndpoints.js';\nimport { bindMethods } from '../../bindMethods.js';\n\n/**\n * Reads an aggregate's query capability descriptors,\n * `GET {aggregate}/snapshot/schema` and `GET {aggregate}/event/schema`: what\n * each query model admits, as a `QueryModelDescriptor`. A view or form reads\n * it to offer only the fields, operators, sorts and paging the server\n * accepts, and to know the limits.\n *\n * The base path names the aggregate (`{contextAlias}/{aggregateName}`) with\n * no tenant or owner segment: the schema routes have neither, whatever\n * routes the aggregate's queries take. `QueryClientFactory.createQueryDescriptorClient`\n * builds it that way. Headers such as `Wow-Space-Id` come from the\n * `ApiMetadata` as for the other clients.\n *\n * A descriptor does not depend on the caller and changes only when the\n * server's model or configuration does, so hold it and revalidate: pass the\n * version held, and a 304 answers `{ notModified: true }` without a body.\n *\n * @example\n * ```typescript\n * const descriptors = new QueryDescriptorClient({ basePath: 'example/cart' });\n *\n * const first = await descriptors.describeSnapshot();\n * if (!first.notModified) {\n * const sku = first.descriptor.fields.find(f => f.path === 'state.items.productId');\n * console.log(sku?.filter.operators);\n * }\n *\n * // Later: revalidate the copy held.\n * const again = await descriptors.describeSnapshot(first.version);\n * console.log(again.notModified); // true while the model is unchanged\n * ```\n */\nexport class QueryDescriptorClient\n implements QueryDescriptorApi, ApiMetadataCapable\n{\n /**\n * @param apiMetadata - The fetcher, the base path naming the aggregate, and any shared headers.\n */\n constructor(public readonly apiMetadata?: ApiMetadata) {\n bindMethods(this);\n }\n\n /**\n * Reads the descriptor of the snapshot query model,\n * `GET {aggregate}/snapshot/schema`.\n *\n * @param previous - The version or ETag of the descriptor already held; omit it to read in full.\n * @param attributes - Optional shared attributes for the 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 The descriptor, or `{ notModified: true, version }` when `previous` is current.\n */\n async describeSnapshot(\n previous?: string,\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<QueryDescriptorResult> {\n const version = descriptorVersion(previous);\n const exchange = await new QueryDescriptorEndpoints(\n this.apiMetadata,\n ).snapshot(ifNoneMatch(version), attributes, abort);\n return readDescriptor(exchange, version);\n }\n\n /**\n * Reads the descriptor of the event stream query model,\n * `GET {aggregate}/event/schema`.\n *\n * @param previous - The version or ETag of the descriptor already held; omit it to read in full.\n * @param attributes - Optional shared attributes for the 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 The descriptor, or `{ notModified: true, version }` when `previous` is current.\n */\n async describeEventStream(\n previous?: string,\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<QueryDescriptorResult> {\n const version = descriptorVersion(previous);\n const exchange = await new QueryDescriptorEndpoints(\n this.apiMetadata,\n ).eventStream(ifNoneMatch(version), attributes, abort);\n return readDescriptor(exchange, version);\n }\n}\n"],"mappings":"gFA6DA,IAAaM,EAAb,KAEA,CAIE,YAAY,EAA2C,CAA3B,KAAA,YAAAC,EAC1BH,EAAA,YAAY,IAAI,CAClB,CAWA,MAAM,iBACJ,EACA,EACA,EACgC,CAChC,IAAMI,EAAUR,EAAAA,kBAAkBS,CAAQ,EACpCC,EAAW,MAAM,IAAIT,EAAAA,yBACzB,KAAK,WACP,CAAC,CAAC,SAASC,EAAAA,YAAYM,CAAO,EAAGG,EAAYC,CAAK,EAClD,OAAOT,EAAAA,eAAeO,EAAUF,CAAO,CACzC,CAWA,MAAM,oBACJ,EACA,EACA,EACgC,CAChC,IAAMA,EAAUR,EAAAA,kBAAkBS,CAAQ,EACpCC,EAAW,MAAM,IAAIT,EAAAA,yBACzB,KAAK,WACP,CAAC,CAAC,YAAYC,EAAAA,YAAYM,CAAO,EAAGG,EAAYC,CAAK,EACrD,OAAOT,EAAAA,eAAeO,EAAUF,CAAO,CACzC,CACF"}
@@ -0,0 +1,61 @@
1
+ import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
2
+ import { QueryDescriptorApi, QueryDescriptorResult } from './queryDescriptorApi.cjs';
3
+ /**
4
+ * Reads an aggregate's query capability descriptors,
5
+ * `GET {aggregate}/snapshot/schema` and `GET {aggregate}/event/schema`: what
6
+ * each query model admits, as a `QueryModelDescriptor`. A view or form reads
7
+ * it to offer only the fields, operators, sorts and paging the server
8
+ * accepts, and to know the limits.
9
+ *
10
+ * The base path names the aggregate (`{contextAlias}/{aggregateName}`) with
11
+ * no tenant or owner segment: the schema routes have neither, whatever
12
+ * routes the aggregate's queries take. `QueryClientFactory.createQueryDescriptorClient`
13
+ * builds it that way. Headers such as `Wow-Space-Id` come from the
14
+ * `ApiMetadata` as for the other clients.
15
+ *
16
+ * A descriptor does not depend on the caller and changes only when the
17
+ * server's model or configuration does, so hold it and revalidate: pass the
18
+ * version held, and a 304 answers `{ notModified: true }` without a body.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const descriptors = new QueryDescriptorClient({ basePath: 'example/cart' });
23
+ *
24
+ * const first = await descriptors.describeSnapshot();
25
+ * if (!first.notModified) {
26
+ * const sku = first.descriptor.fields.find(f => f.path === 'state.items.productId');
27
+ * console.log(sku?.filter.operators);
28
+ * }
29
+ *
30
+ * // Later: revalidate the copy held.
31
+ * const again = await descriptors.describeSnapshot(first.version);
32
+ * console.log(again.notModified); // true while the model is unchanged
33
+ * ```
34
+ */
35
+ export declare class QueryDescriptorClient implements QueryDescriptorApi, ApiMetadataCapable {
36
+ readonly apiMetadata?: ApiMetadata | undefined;
37
+ /**
38
+ * @param apiMetadata - The fetcher, the base path naming the aggregate, and any shared headers.
39
+ */
40
+ constructor(apiMetadata?: ApiMetadata | undefined);
41
+ /**
42
+ * Reads the descriptor of the snapshot query model,
43
+ * `GET {aggregate}/snapshot/schema`.
44
+ *
45
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
46
+ * @param attributes - Optional shared attributes for the interceptors
47
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
48
+ * @returns The descriptor, or `{ notModified: true, version }` when `previous` is current.
49
+ */
50
+ describeSnapshot(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
51
+ /**
52
+ * Reads the descriptor of the event stream query model,
53
+ * `GET {aggregate}/event/schema`.
54
+ *
55
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
56
+ * @param attributes - Optional shared attributes for the interceptors
57
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
58
+ * @returns The descriptor, or `{ notModified: true, version }` when `previous` is current.
59
+ */
60
+ describeEventStream(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
61
+ }
@@ -0,0 +1,61 @@
1
+ import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
2
+ import { QueryDescriptorApi, QueryDescriptorResult } from './queryDescriptorApi.js';
3
+ /**
4
+ * Reads an aggregate's query capability descriptors,
5
+ * `GET {aggregate}/snapshot/schema` and `GET {aggregate}/event/schema`: what
6
+ * each query model admits, as a `QueryModelDescriptor`. A view or form reads
7
+ * it to offer only the fields, operators, sorts and paging the server
8
+ * accepts, and to know the limits.
9
+ *
10
+ * The base path names the aggregate (`{contextAlias}/{aggregateName}`) with
11
+ * no tenant or owner segment: the schema routes have neither, whatever
12
+ * routes the aggregate's queries take. `QueryClientFactory.createQueryDescriptorClient`
13
+ * builds it that way. Headers such as `Wow-Space-Id` come from the
14
+ * `ApiMetadata` as for the other clients.
15
+ *
16
+ * A descriptor does not depend on the caller and changes only when the
17
+ * server's model or configuration does, so hold it and revalidate: pass the
18
+ * version held, and a 304 answers `{ notModified: true }` without a body.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const descriptors = new QueryDescriptorClient({ basePath: 'example/cart' });
23
+ *
24
+ * const first = await descriptors.describeSnapshot();
25
+ * if (!first.notModified) {
26
+ * const sku = first.descriptor.fields.find(f => f.path === 'state.items.productId');
27
+ * console.log(sku?.filter.operators);
28
+ * }
29
+ *
30
+ * // Later: revalidate the copy held.
31
+ * const again = await descriptors.describeSnapshot(first.version);
32
+ * console.log(again.notModified); // true while the model is unchanged
33
+ * ```
34
+ */
35
+ export declare class QueryDescriptorClient implements QueryDescriptorApi, ApiMetadataCapable {
36
+ readonly apiMetadata?: ApiMetadata | undefined;
37
+ /**
38
+ * @param apiMetadata - The fetcher, the base path naming the aggregate, and any shared headers.
39
+ */
40
+ constructor(apiMetadata?: ApiMetadata | undefined);
41
+ /**
42
+ * Reads the descriptor of the snapshot query model,
43
+ * `GET {aggregate}/snapshot/schema`.
44
+ *
45
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
46
+ * @param attributes - Optional shared attributes for the interceptors
47
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
48
+ * @returns The descriptor, or `{ notModified: true, version }` when `previous` is current.
49
+ */
50
+ describeSnapshot(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
51
+ /**
52
+ * Reads the descriptor of the event stream query model,
53
+ * `GET {aggregate}/event/schema`.
54
+ *
55
+ * @param previous - The version or ETag of the descriptor already held; omit it to read in full.
56
+ * @param attributes - Optional shared attributes for the interceptors
57
+ * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
58
+ * @returns The descriptor, or `{ notModified: true, version }` when `previous` is current.
59
+ */
60
+ describeEventStream(previous?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<QueryDescriptorResult>;
61
+ }
@@ -0,0 +1,20 @@
1
+ import { bindMethods as e } from "../../bindMethods.es.js";
2
+ import { QueryDescriptorEndpoints as t, descriptorVersion as n, ifNoneMatch as r, readDescriptor as i } from "./descriptorEndpoints.es.js";
3
+ //#region src/client/query/descriptor/queryDescriptorClient.ts
4
+ var a = class {
5
+ constructor(t) {
6
+ this.apiMetadata = t, e(this);
7
+ }
8
+ async describeSnapshot(e, a, o) {
9
+ let s = n(e), c = await new t(this.apiMetadata).snapshot(r(s), a, o);
10
+ return i(c, s);
11
+ }
12
+ async describeEventStream(e, a, o) {
13
+ let s = n(e), c = await new t(this.apiMetadata).eventStream(r(s), a, o);
14
+ return i(c, s);
15
+ }
16
+ };
17
+ //#endregion
18
+ export { a as QueryDescriptorClient };
19
+
20
+ //# sourceMappingURL=queryDescriptorClient.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryDescriptorClient.es.js","names":["QueryDescriptorClient","apiMetadata","bindMethods","version","descriptorVersion","previous","exchange","QueryDescriptorEndpoints","ifNoneMatch","attributes","abort","readDescriptor"],"sources":["../../../../src/client/query/descriptor/queryDescriptorClient.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 {\n ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport type {\n QueryDescriptorApi,\n QueryDescriptorResult,\n} from './queryDescriptorApi.js';\nimport {\n descriptorVersion,\n ifNoneMatch,\n QueryDescriptorEndpoints,\n readDescriptor,\n} from './descriptorEndpoints.js';\nimport { bindMethods } from '../../bindMethods.js';\n\n/**\n * Reads an aggregate's query capability descriptors,\n * `GET {aggregate}/snapshot/schema` and `GET {aggregate}/event/schema`: what\n * each query model admits, as a `QueryModelDescriptor`. A view or form reads\n * it to offer only the fields, operators, sorts and paging the server\n * accepts, and to know the limits.\n *\n * The base path names the aggregate (`{contextAlias}/{aggregateName}`) with\n * no tenant or owner segment: the schema routes have neither, whatever\n * routes the aggregate's queries take. `QueryClientFactory.createQueryDescriptorClient`\n * builds it that way. Headers such as `Wow-Space-Id` come from the\n * `ApiMetadata` as for the other clients.\n *\n * A descriptor does not depend on the caller and changes only when the\n * server's model or configuration does, so hold it and revalidate: pass the\n * version held, and a 304 answers `{ notModified: true }` without a body.\n *\n * @example\n * ```typescript\n * const descriptors = new QueryDescriptorClient({ basePath: 'example/cart' });\n *\n * const first = await descriptors.describeSnapshot();\n * if (!first.notModified) {\n * const sku = first.descriptor.fields.find(f => f.path === 'state.items.productId');\n * console.log(sku?.filter.operators);\n * }\n *\n * // Later: revalidate the copy held.\n * const again = await descriptors.describeSnapshot(first.version);\n * console.log(again.notModified); // true while the model is unchanged\n * ```\n */\nexport class QueryDescriptorClient\n implements QueryDescriptorApi, ApiMetadataCapable\n{\n /**\n * @param apiMetadata - The fetcher, the base path naming the aggregate, and any shared headers.\n */\n constructor(public readonly apiMetadata?: ApiMetadata) {\n bindMethods(this);\n }\n\n /**\n * Reads the descriptor of the snapshot query model,\n * `GET {aggregate}/snapshot/schema`.\n *\n * @param previous - The version or ETag of the descriptor already held; omit it to read in full.\n * @param attributes - Optional shared attributes for the 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 The descriptor, or `{ notModified: true, version }` when `previous` is current.\n */\n async describeSnapshot(\n previous?: string,\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<QueryDescriptorResult> {\n const version = descriptorVersion(previous);\n const exchange = await new QueryDescriptorEndpoints(\n this.apiMetadata,\n ).snapshot(ifNoneMatch(version), attributes, abort);\n return readDescriptor(exchange, version);\n }\n\n /**\n * Reads the descriptor of the event stream query model,\n * `GET {aggregate}/event/schema`.\n *\n * @param previous - The version or ETag of the descriptor already held; omit it to read in full.\n * @param attributes - Optional shared attributes for the 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 The descriptor, or `{ notModified: true, version }` when `previous` is current.\n */\n async describeEventStream(\n previous?: string,\n attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<QueryDescriptorResult> {\n const version = descriptorVersion(previous);\n const exchange = await new QueryDescriptorEndpoints(\n this.apiMetadata,\n ).eventStream(ifNoneMatch(version), attributes, abort);\n return readDescriptor(exchange, version);\n }\n}\n"],"mappings":";;;AA6DA,IAAaA,IAAb,MAEA;CAIE,YAAY,GAA2C;EACrD,AAD0B,KAAA,cAAAC,GAC1BC,EAAY,IAAI;CAClB;CAWA,MAAM,iBACJ,GACA,GACA,GACgC;EAChC,IAAMC,IAAUC,EAAkBC,CAAQ,GACpCC,IAAW,MAAM,IAAIC,EACzB,KAAK,WACP,CAAC,CAAC,SAASC,EAAYL,CAAO,GAAGM,GAAYC,CAAK;EAClD,OAAOC,EAAeL,GAAUH,CAAO;CACzC;CAWA,MAAM,oBACJ,GACA,GACA,GACgC;EAChC,IAAMA,IAAUC,EAAkBC,CAAQ,GACpCC,IAAW,MAAM,IAAIC,EACzB,KAAK,WACP,CAAC,CAAC,YAAYC,EAAYL,CAAO,GAAGM,GAAYC,CAAK;EACrD,OAAOC,EAAeL,GAAUH,CAAO;CACzC;AACF"}
@@ -0,0 +1,2 @@
1
+ var e=Object.freeze({HEADER:`header`,COMMAND_OPERATOR:`header.command_operator`,AGGREGATE_ID:`aggregateId`,TENANT_ID:`tenantId`,OWNER_ID:`ownerId`,SPACE_ID:`spaceId`,COMMAND_ID:`commandId`,REQUEST_ID:`requestId`,VERSION:`version`,BODY:`body`,BODY_ID:`body.id`,BODY_NAME:`body.name`,BODY_TYPE:`body.bodyType`,BODY_REVISION:`body.revision`,BODY_BODY:`body.body`,CREATE_TIME:`createTime`});exports.DomainEventStreamMetadataFields=e;
2
+ //# sourceMappingURL=domainEventStream.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainEventStream.cjs","names":["DomainEventStreamMetadataFields"],"sources":["../../../../src/client/query/event/domainEventStream.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 {\n AggregateId,\n CreateTimeCapable,\n DeletedCapable,\n FirstEventTimeCapable,\n FirstOperatorCapable,\n Identifier,\n Named,\n OwnerId,\n SpaceIdCapable,\n StateCapable,\n Version,\n BodyCapable,\n CommandId,\n CommandStage,\n RequestId,\n} from '../../../model/index.js';\n\n/**\n * Represents a domain event with a specific body type.\n * Extends Identifier, Named, and BodyCapable interfaces to provide identification,\n * naming, and body capabilities for the domain event.\n * @template BODY - The type of the event content for this domain event\n */\nexport interface DomainEvent<BODY>\n extends Identifier, Named, BodyCapable<BODY> {\n /**\n * The type of the event content.\n */\n bodyType: string;\n /**\n * The revision of the domain event.\n */\n revision: string;\n}\n\n/**\n * Represents the header information for a domain event stream.\n * Contains metadata about the event stream such as command information,\n * network details, and tracing information.\n */\nexport interface DomainEventStreamHeader {\n /**\n * The operator that executed the command.\n */\n command_operator?: string;\n /**\n * The endpoint to wait for command completion.\n */\n command_wait_endpoint?: string;\n /**\n * The stage to wait for in command execution.\n */\n command_wait_stage?: CommandStage;\n /**\n * Whether the command could be processed locally, `'true'` or `'false'`.\n */\n local_first?: string;\n /**\n * The IP address of the remote client.\n */\n remote_ip?: string;\n /**\n * The user agent of the client.\n */\n user_agent?: string;\n /**\n * The trace identifier for distributed tracing.\n */\n trace_id?: string;\n\n /**\n * Index signature for additional custom header properties.\n * Allows for any additional string key-value pairs to be included as header properties.\n */\n [key: string]: string | undefined;\n}\n\n/**\n * Represents a stream of domain events.\n * Combines multiple interfaces to provide a complete domain event stream,\n * including identification, aggregation, ownership, command information,\n * versioning, and the actual event data.\n */\nexport interface DomainEventStream<DomainEventBody = unknown>\n extends\n Identifier,\n AggregateId,\n OwnerId,\n SpaceIdCapable,\n CommandId,\n CreateTimeCapable,\n RequestId,\n Version,\n BodyCapable<DomainEvent<DomainEventBody>[]> {\n /**\n * The header information for the domain event stream.\n */\n header: DomainEventStreamHeader;\n}\n\n/**\n * A domain event stream together with the aggregate state after it was\n * applied: what Wow publishes on its state event bus. Wow's OpenAPI document\n * derives an `…StateEvent` schema from each aggregate's state, which\n * generated code maps to this type.\n *\n * @template DomainEventBody - The type of the event bodies\n * @template S - The type of the aggregate state\n */\nexport interface StateEvent<DomainEventBody = unknown, S = unknown>\n extends\n DomainEventStream<DomainEventBody>,\n StateCapable<S>,\n FirstOperatorCapable,\n FirstEventTimeCapable,\n DeletedCapable {}\n\n/**\n * The field names of a domain event stream, for filters, sorts and\n * projections over event streams (`body.name`, `header.command_operator`, …).\n *\n * A frozen name table: read `DomainEventStreamMetadataFields.BODY_NAME`; each\n * value is a string literal type.\n */\nexport const DomainEventStreamMetadataFields = Object.freeze({\n HEADER: 'header',\n COMMAND_OPERATOR: 'header.command_operator',\n AGGREGATE_ID: 'aggregateId',\n TENANT_ID: 'tenantId',\n OWNER_ID: 'ownerId',\n SPACE_ID: 'spaceId',\n COMMAND_ID: 'commandId',\n REQUEST_ID: 'requestId',\n VERSION: 'version',\n BODY: 'body',\n BODY_ID: 'body.id',\n BODY_NAME: 'body.name',\n BODY_TYPE: 'body.bodyType',\n BODY_REVISION: 'body.revision',\n BODY_BODY: 'body.body',\n CREATE_TIME: 'createTime',\n} as const);\n"],"mappings":"AA0IA,IAAaA,EAAkC,OAAO,OAAO,CAC3D,OAAQ,SACR,iBAAkB,0BAClB,aAAc,cACd,UAAW,WACX,SAAU,UACV,SAAU,UACV,WAAY,YACZ,WAAY,YACZ,QAAS,UACT,KAAM,OACN,QAAS,UACT,UAAW,YACX,UAAW,gBACX,cAAe,gBACf,UAAW,YACX,YAAa,YACf,CAAU"}
@@ -0,0 +1,105 @@
1
+ import { AggregateId, CreateTimeCapable, DeletedCapable, FirstEventTimeCapable, FirstOperatorCapable, Identifier, Named, OwnerId, SpaceIdCapable, StateCapable, Version, BodyCapable, CommandId, CommandStage, RequestId } from '../../../model/index.cjs';
2
+ /**
3
+ * Represents a domain event with a specific body type.
4
+ * Extends Identifier, Named, and BodyCapable interfaces to provide identification,
5
+ * naming, and body capabilities for the domain event.
6
+ * @template BODY - The type of the event content for this domain event
7
+ */
8
+ export interface DomainEvent<BODY> extends Identifier, Named, BodyCapable<BODY> {
9
+ /**
10
+ * The type of the event content.
11
+ */
12
+ bodyType: string;
13
+ /**
14
+ * The revision of the domain event.
15
+ */
16
+ revision: string;
17
+ }
18
+ /**
19
+ * Represents the header information for a domain event stream.
20
+ * Contains metadata about the event stream such as command information,
21
+ * network details, and tracing information.
22
+ */
23
+ export interface DomainEventStreamHeader {
24
+ /**
25
+ * The operator that executed the command.
26
+ */
27
+ command_operator?: string;
28
+ /**
29
+ * The endpoint to wait for command completion.
30
+ */
31
+ command_wait_endpoint?: string;
32
+ /**
33
+ * The stage to wait for in command execution.
34
+ */
35
+ command_wait_stage?: CommandStage;
36
+ /**
37
+ * Whether the command could be processed locally, `'true'` or `'false'`.
38
+ */
39
+ local_first?: string;
40
+ /**
41
+ * The IP address of the remote client.
42
+ */
43
+ remote_ip?: string;
44
+ /**
45
+ * The user agent of the client.
46
+ */
47
+ user_agent?: string;
48
+ /**
49
+ * The trace identifier for distributed tracing.
50
+ */
51
+ trace_id?: string;
52
+ /**
53
+ * Index signature for additional custom header properties.
54
+ * Allows for any additional string key-value pairs to be included as header properties.
55
+ */
56
+ [key: string]: string | undefined;
57
+ }
58
+ /**
59
+ * Represents a stream of domain events.
60
+ * Combines multiple interfaces to provide a complete domain event stream,
61
+ * including identification, aggregation, ownership, command information,
62
+ * versioning, and the actual event data.
63
+ */
64
+ export interface DomainEventStream<DomainEventBody = unknown> extends Identifier, AggregateId, OwnerId, SpaceIdCapable, CommandId, CreateTimeCapable, RequestId, Version, BodyCapable<DomainEvent<DomainEventBody>[]> {
65
+ /**
66
+ * The header information for the domain event stream.
67
+ */
68
+ header: DomainEventStreamHeader;
69
+ }
70
+ /**
71
+ * A domain event stream together with the aggregate state after it was
72
+ * applied: what Wow publishes on its state event bus. Wow's OpenAPI document
73
+ * derives an `…StateEvent` schema from each aggregate's state, which
74
+ * generated code maps to this type.
75
+ *
76
+ * @template DomainEventBody - The type of the event bodies
77
+ * @template S - The type of the aggregate state
78
+ */
79
+ export interface StateEvent<DomainEventBody = unknown, S = unknown> extends DomainEventStream<DomainEventBody>, StateCapable<S>, FirstOperatorCapable, FirstEventTimeCapable, DeletedCapable {
80
+ }
81
+ /**
82
+ * The field names of a domain event stream, for filters, sorts and
83
+ * projections over event streams (`body.name`, `header.command_operator`, …).
84
+ *
85
+ * A frozen name table: read `DomainEventStreamMetadataFields.BODY_NAME`; each
86
+ * value is a string literal type.
87
+ */
88
+ export declare const DomainEventStreamMetadataFields: Readonly<{
89
+ readonly HEADER: "header";
90
+ readonly COMMAND_OPERATOR: "header.command_operator";
91
+ readonly AGGREGATE_ID: "aggregateId";
92
+ readonly TENANT_ID: "tenantId";
93
+ readonly OWNER_ID: "ownerId";
94
+ readonly SPACE_ID: "spaceId";
95
+ readonly COMMAND_ID: "commandId";
96
+ readonly REQUEST_ID: "requestId";
97
+ readonly VERSION: "version";
98
+ readonly BODY: "body";
99
+ readonly BODY_ID: "body.id";
100
+ readonly BODY_NAME: "body.name";
101
+ readonly BODY_TYPE: "body.bodyType";
102
+ readonly BODY_REVISION: "body.revision";
103
+ readonly BODY_BODY: "body.body";
104
+ readonly CREATE_TIME: "createTime";
105
+ }>;
@@ -0,0 +1,105 @@
1
+ import { AggregateId, CreateTimeCapable, DeletedCapable, FirstEventTimeCapable, FirstOperatorCapable, Identifier, Named, OwnerId, SpaceIdCapable, StateCapable, Version, BodyCapable, CommandId, CommandStage, RequestId } from '../../../model/index.js';
2
+ /**
3
+ * Represents a domain event with a specific body type.
4
+ * Extends Identifier, Named, and BodyCapable interfaces to provide identification,
5
+ * naming, and body capabilities for the domain event.
6
+ * @template BODY - The type of the event content for this domain event
7
+ */
8
+ export interface DomainEvent<BODY> extends Identifier, Named, BodyCapable<BODY> {
9
+ /**
10
+ * The type of the event content.
11
+ */
12
+ bodyType: string;
13
+ /**
14
+ * The revision of the domain event.
15
+ */
16
+ revision: string;
17
+ }
18
+ /**
19
+ * Represents the header information for a domain event stream.
20
+ * Contains metadata about the event stream such as command information,
21
+ * network details, and tracing information.
22
+ */
23
+ export interface DomainEventStreamHeader {
24
+ /**
25
+ * The operator that executed the command.
26
+ */
27
+ command_operator?: string;
28
+ /**
29
+ * The endpoint to wait for command completion.
30
+ */
31
+ command_wait_endpoint?: string;
32
+ /**
33
+ * The stage to wait for in command execution.
34
+ */
35
+ command_wait_stage?: CommandStage;
36
+ /**
37
+ * Whether the command could be processed locally, `'true'` or `'false'`.
38
+ */
39
+ local_first?: string;
40
+ /**
41
+ * The IP address of the remote client.
42
+ */
43
+ remote_ip?: string;
44
+ /**
45
+ * The user agent of the client.
46
+ */
47
+ user_agent?: string;
48
+ /**
49
+ * The trace identifier for distributed tracing.
50
+ */
51
+ trace_id?: string;
52
+ /**
53
+ * Index signature for additional custom header properties.
54
+ * Allows for any additional string key-value pairs to be included as header properties.
55
+ */
56
+ [key: string]: string | undefined;
57
+ }
58
+ /**
59
+ * Represents a stream of domain events.
60
+ * Combines multiple interfaces to provide a complete domain event stream,
61
+ * including identification, aggregation, ownership, command information,
62
+ * versioning, and the actual event data.
63
+ */
64
+ export interface DomainEventStream<DomainEventBody = unknown> extends Identifier, AggregateId, OwnerId, SpaceIdCapable, CommandId, CreateTimeCapable, RequestId, Version, BodyCapable<DomainEvent<DomainEventBody>[]> {
65
+ /**
66
+ * The header information for the domain event stream.
67
+ */
68
+ header: DomainEventStreamHeader;
69
+ }
70
+ /**
71
+ * A domain event stream together with the aggregate state after it was
72
+ * applied: what Wow publishes on its state event bus. Wow's OpenAPI document
73
+ * derives an `…StateEvent` schema from each aggregate's state, which
74
+ * generated code maps to this type.
75
+ *
76
+ * @template DomainEventBody - The type of the event bodies
77
+ * @template S - The type of the aggregate state
78
+ */
79
+ export interface StateEvent<DomainEventBody = unknown, S = unknown> extends DomainEventStream<DomainEventBody>, StateCapable<S>, FirstOperatorCapable, FirstEventTimeCapable, DeletedCapable {
80
+ }
81
+ /**
82
+ * The field names of a domain event stream, for filters, sorts and
83
+ * projections over event streams (`body.name`, `header.command_operator`, …).
84
+ *
85
+ * A frozen name table: read `DomainEventStreamMetadataFields.BODY_NAME`; each
86
+ * value is a string literal type.
87
+ */
88
+ export declare const DomainEventStreamMetadataFields: Readonly<{
89
+ readonly HEADER: "header";
90
+ readonly COMMAND_OPERATOR: "header.command_operator";
91
+ readonly AGGREGATE_ID: "aggregateId";
92
+ readonly TENANT_ID: "tenantId";
93
+ readonly OWNER_ID: "ownerId";
94
+ readonly SPACE_ID: "spaceId";
95
+ readonly COMMAND_ID: "commandId";
96
+ readonly REQUEST_ID: "requestId";
97
+ readonly VERSION: "version";
98
+ readonly BODY: "body";
99
+ readonly BODY_ID: "body.id";
100
+ readonly BODY_NAME: "body.name";
101
+ readonly BODY_TYPE: "body.bodyType";
102
+ readonly BODY_REVISION: "body.revision";
103
+ readonly BODY_BODY: "body.body";
104
+ readonly CREATE_TIME: "createTime";
105
+ }>;
@@ -0,0 +1,23 @@
1
+ //#region src/client/query/event/domainEventStream.ts
2
+ var e = Object.freeze({
3
+ HEADER: "header",
4
+ COMMAND_OPERATOR: "header.command_operator",
5
+ AGGREGATE_ID: "aggregateId",
6
+ TENANT_ID: "tenantId",
7
+ OWNER_ID: "ownerId",
8
+ SPACE_ID: "spaceId",
9
+ COMMAND_ID: "commandId",
10
+ REQUEST_ID: "requestId",
11
+ VERSION: "version",
12
+ BODY: "body",
13
+ BODY_ID: "body.id",
14
+ BODY_NAME: "body.name",
15
+ BODY_TYPE: "body.bodyType",
16
+ BODY_REVISION: "body.revision",
17
+ BODY_BODY: "body.body",
18
+ CREATE_TIME: "createTime"
19
+ });
20
+ //#endregion
21
+ export { e as DomainEventStreamMetadataFields };
22
+
23
+ //# sourceMappingURL=domainEventStream.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domainEventStream.es.js","names":["DomainEventStreamMetadataFields"],"sources":["../../../../src/client/query/event/domainEventStream.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 {\n AggregateId,\n CreateTimeCapable,\n DeletedCapable,\n FirstEventTimeCapable,\n FirstOperatorCapable,\n Identifier,\n Named,\n OwnerId,\n SpaceIdCapable,\n StateCapable,\n Version,\n BodyCapable,\n CommandId,\n CommandStage,\n RequestId,\n} from '../../../model/index.js';\n\n/**\n * Represents a domain event with a specific body type.\n * Extends Identifier, Named, and BodyCapable interfaces to provide identification,\n * naming, and body capabilities for the domain event.\n * @template BODY - The type of the event content for this domain event\n */\nexport interface DomainEvent<BODY>\n extends Identifier, Named, BodyCapable<BODY> {\n /**\n * The type of the event content.\n */\n bodyType: string;\n /**\n * The revision of the domain event.\n */\n revision: string;\n}\n\n/**\n * Represents the header information for a domain event stream.\n * Contains metadata about the event stream such as command information,\n * network details, and tracing information.\n */\nexport interface DomainEventStreamHeader {\n /**\n * The operator that executed the command.\n */\n command_operator?: string;\n /**\n * The endpoint to wait for command completion.\n */\n command_wait_endpoint?: string;\n /**\n * The stage to wait for in command execution.\n */\n command_wait_stage?: CommandStage;\n /**\n * Whether the command could be processed locally, `'true'` or `'false'`.\n */\n local_first?: string;\n /**\n * The IP address of the remote client.\n */\n remote_ip?: string;\n /**\n * The user agent of the client.\n */\n user_agent?: string;\n /**\n * The trace identifier for distributed tracing.\n */\n trace_id?: string;\n\n /**\n * Index signature for additional custom header properties.\n * Allows for any additional string key-value pairs to be included as header properties.\n */\n [key: string]: string | undefined;\n}\n\n/**\n * Represents a stream of domain events.\n * Combines multiple interfaces to provide a complete domain event stream,\n * including identification, aggregation, ownership, command information,\n * versioning, and the actual event data.\n */\nexport interface DomainEventStream<DomainEventBody = unknown>\n extends\n Identifier,\n AggregateId,\n OwnerId,\n SpaceIdCapable,\n CommandId,\n CreateTimeCapable,\n RequestId,\n Version,\n BodyCapable<DomainEvent<DomainEventBody>[]> {\n /**\n * The header information for the domain event stream.\n */\n header: DomainEventStreamHeader;\n}\n\n/**\n * A domain event stream together with the aggregate state after it was\n * applied: what Wow publishes on its state event bus. Wow's OpenAPI document\n * derives an `…StateEvent` schema from each aggregate's state, which\n * generated code maps to this type.\n *\n * @template DomainEventBody - The type of the event bodies\n * @template S - The type of the aggregate state\n */\nexport interface StateEvent<DomainEventBody = unknown, S = unknown>\n extends\n DomainEventStream<DomainEventBody>,\n StateCapable<S>,\n FirstOperatorCapable,\n FirstEventTimeCapable,\n DeletedCapable {}\n\n/**\n * The field names of a domain event stream, for filters, sorts and\n * projections over event streams (`body.name`, `header.command_operator`, …).\n *\n * A frozen name table: read `DomainEventStreamMetadataFields.BODY_NAME`; each\n * value is a string literal type.\n */\nexport const DomainEventStreamMetadataFields = Object.freeze({\n HEADER: 'header',\n COMMAND_OPERATOR: 'header.command_operator',\n AGGREGATE_ID: 'aggregateId',\n TENANT_ID: 'tenantId',\n OWNER_ID: 'ownerId',\n SPACE_ID: 'spaceId',\n COMMAND_ID: 'commandId',\n REQUEST_ID: 'requestId',\n VERSION: 'version',\n BODY: 'body',\n BODY_ID: 'body.id',\n BODY_NAME: 'body.name',\n BODY_TYPE: 'body.bodyType',\n BODY_REVISION: 'body.revision',\n BODY_BODY: 'body.body',\n CREATE_TIME: 'createTime',\n} as const);\n"],"mappings":";AA0IA,IAAaA,IAAkC,OAAO,OAAO;CAC3D,QAAQ;CACR,kBAAkB;CAClB,cAAc;CACd,WAAW;CACX,UAAU;CACV,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,MAAM;CACN,SAAS;CACT,WAAW;CACX,WAAW;CACX,eAAe;CACf,WAAW;CACX,aAAa;AACf,CAAU"}
@@ -0,0 +1,2 @@
1
+ var e=Object.freeze({AGGREGATION:`event/aggregation`,COUNT:`event/count`,LIST:`event/list`,PAGED:`event/paged`,CURSOR:`event/cursor`,LOAD:`{id}/event/{headVersion}/{tailVersion}`});exports.EventStreamQueryEndpointPaths=e;
2
+ //# sourceMappingURL=endpointPaths.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpointPaths.cjs","names":["EventStreamQueryEndpointPaths"],"sources":["../../../../src/client/query/event/endpointPaths.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: the index of this folder does not re-export this file. The\n// paths are relative to the client's base path.\nexport const EventStreamQueryEndpointPaths = Object.freeze({\n AGGREGATION: 'event/aggregation',\n COUNT: 'event/count',\n LIST: 'event/list',\n PAGED: 'event/paged',\n CURSOR: 'event/cursor',\n LOAD: '{id}/event/{headVersion}/{tailVersion}',\n} as const);\n"],"mappings":"AAeA,IAAaA,EAAgC,OAAO,OAAO,CACzD,YAAa,oBACb,MAAO,cACP,KAAM,aACN,MAAO,cACP,OAAQ,eACR,KAAM,wCACR,CAAU"}
@@ -0,0 +1,8 @@
1
+ export declare const EventStreamQueryEndpointPaths: Readonly<{
2
+ readonly AGGREGATION: "event/aggregation";
3
+ readonly COUNT: "event/count";
4
+ readonly LIST: "event/list";
5
+ readonly PAGED: "event/paged";
6
+ readonly CURSOR: "event/cursor";
7
+ readonly LOAD: "{id}/event/{headVersion}/{tailVersion}";
8
+ }>;
@@ -0,0 +1,8 @@
1
+ export declare const EventStreamQueryEndpointPaths: Readonly<{
2
+ readonly AGGREGATION: "event/aggregation";
3
+ readonly COUNT: "event/count";
4
+ readonly LIST: "event/list";
5
+ readonly PAGED: "event/paged";
6
+ readonly CURSOR: "event/cursor";
7
+ readonly LOAD: "{id}/event/{headVersion}/{tailVersion}";
8
+ }>;
@@ -0,0 +1,13 @@
1
+ //#region src/client/query/event/endpointPaths.ts
2
+ var e = Object.freeze({
3
+ AGGREGATION: "event/aggregation",
4
+ COUNT: "event/count",
5
+ LIST: "event/list",
6
+ PAGED: "event/paged",
7
+ CURSOR: "event/cursor",
8
+ LOAD: "{id}/event/{headVersion}/{tailVersion}"
9
+ });
10
+ //#endregion
11
+ export { e as EventStreamQueryEndpointPaths };
12
+
13
+ //# sourceMappingURL=endpointPaths.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpointPaths.es.js","names":["EventStreamQueryEndpointPaths"],"sources":["../../../../src/client/query/event/endpointPaths.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: the index of this folder does not re-export this file. The\n// paths are relative to the client's base path.\nexport const EventStreamQueryEndpointPaths = Object.freeze({\n AGGREGATION: 'event/aggregation',\n COUNT: 'event/count',\n LIST: 'event/list',\n PAGED: 'event/paged',\n CURSOR: 'event/cursor',\n LOAD: '{id}/event/{headVersion}/{tailVersion}',\n} as const);\n"],"mappings":";AAeA,IAAaA,IAAgC,OAAO,OAAO;CACzD,aAAa;CACb,OAAO;CACP,MAAM;CACN,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAU"}