@ahoo-wang/wow-client 10.0.0-alpha.3 → 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 (420) 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/{v10/commands.d.cts → commands.d.cts} +21 -3
  6. package/dist/{v10/commands.d.ts → commands.d.ts} +21 -3
  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 +1 -1
  19. package/dist/dsl/descriptor.d.ts +1 -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/{v10/http.d.cts → http.d.cts} +16 -7
  48. package/dist/{v10/http.d.ts → http.d.ts} +16 -7
  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.map +1 -0
  56. package/dist/{v10/manifest.es.js → manifest.es.js} +1 -1
  57. package/dist/manifest.es.js.map +1 -0
  58. package/dist/problem.cjs +2 -0
  59. package/dist/problem.cjs.map +1 -0
  60. package/dist/{v10/problem.d.cts → problem.d.cts} +51 -4
  61. package/dist/{v10/problem.d.ts → problem.d.ts} +51 -4
  62. package/dist/{v10/problem.es.js → problem.es.js} +30 -11
  63. package/dist/problem.es.js.map +1 -0
  64. package/dist/queries.cjs +2 -0
  65. package/dist/queries.cjs.map +1 -0
  66. package/dist/{v10/queries.d.cts → queries.d.cts} +63 -17
  67. package/dist/{v10/queries.d.ts → queries.d.ts} +63 -17
  68. package/dist/queries.es.js +112 -0
  69. package/dist/queries.es.js.map +1 -0
  70. package/dist/state.cjs +2 -0
  71. package/dist/state.cjs.map +1 -0
  72. package/dist/{v10/state.d.cts → state.d.cts} +26 -4
  73. package/dist/{v10/state.d.ts → state.d.ts} +26 -4
  74. package/dist/state.es.js +70 -0
  75. package/dist/state.es.js.map +1 -0
  76. package/dist/streams.cjs +2 -0
  77. package/dist/streams.cjs.map +1 -0
  78. package/dist/streams.d.cts +74 -0
  79. package/dist/streams.d.ts +74 -0
  80. package/dist/streams.es.js +103 -0
  81. package/dist/streams.es.js.map +1 -0
  82. package/dist/wait.cjs.map +1 -0
  83. package/dist/{v10/wait.es.js → wait.es.js} +1 -1
  84. package/dist/wait.es.js.map +1 -0
  85. package/dist/wire.cjs.map +1 -0
  86. package/dist/{v10/wire.d.cts → wire.d.cts} +32 -7
  87. package/dist/{v10/wire.d.ts → wire.d.ts} +32 -7
  88. package/dist/{v10/wire.es.js → wire.es.js} +1 -1
  89. package/dist/wire.es.js.map +1 -0
  90. package/package.json +4 -26
  91. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.cjs +0 -1
  92. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.es.js +0 -9
  93. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.cjs +0 -1
  94. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.es.js +0 -6
  95. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.cjs +0 -1
  96. package/dist/_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.es.js +0 -8
  97. package/dist/client/bindMethods.cjs +0 -2
  98. package/dist/client/bindMethods.cjs.map +0 -1
  99. package/dist/client/bindMethods.d.cts +0 -13
  100. package/dist/client/bindMethods.d.ts +0 -13
  101. package/dist/client/bindMethods.es.js +0 -19
  102. package/dist/client/bindMethods.es.js.map +0 -1
  103. package/dist/client/command/commandClient.cjs +0 -2
  104. package/dist/client/command/commandClient.cjs.map +0 -1
  105. package/dist/client/command/commandClient.d.cts +0 -67
  106. package/dist/client/command/commandClient.d.ts +0 -67
  107. package/dist/client/command/commandClient.es.js +0 -38
  108. package/dist/client/command/commandClient.es.js.map +0 -1
  109. package/dist/client/command/commandHeaders.cjs +0 -2
  110. package/dist/client/command/commandHeaders.cjs.map +0 -1
  111. package/dist/client/command/commandHeaders.d.cts +0 -75
  112. package/dist/client/command/commandHeaders.d.ts +0 -75
  113. package/dist/client/command/commandHeaders.es.js +0 -31
  114. package/dist/client/command/commandHeaders.es.js.map +0 -1
  115. package/dist/client/command/commandRequest.cjs +0 -2
  116. package/dist/client/command/commandRequest.cjs.map +0 -1
  117. package/dist/client/command/commandRequest.d.cts +0 -180
  118. package/dist/client/command/commandRequest.d.ts +0 -180
  119. package/dist/client/command/commandRequest.es.js +0 -31
  120. package/dist/client/command/commandRequest.es.js.map +0 -1
  121. package/dist/client/command/commandResult.d.cts +0 -15
  122. package/dist/client/command/commandResult.d.ts +0 -15
  123. package/dist/client/command/index.d.cts +0 -5
  124. package/dist/client/command/index.d.ts +0 -5
  125. package/dist/client/command/types.d.cts +0 -71
  126. package/dist/client/command/types.d.ts +0 -71
  127. package/dist/client/metadata/index.d.cts +0 -2
  128. package/dist/client/metadata/index.d.ts +0 -2
  129. package/dist/client/metadata/wowMetadata.d.cts +0 -48
  130. package/dist/client/metadata/wowMetadata.d.ts +0 -48
  131. package/dist/client/metadata/wowMetadataClient.cjs +0 -2
  132. package/dist/client/metadata/wowMetadataClient.cjs.map +0 -1
  133. package/dist/client/metadata/wowMetadataClient.d.cts +0 -23
  134. package/dist/client/metadata/wowMetadataClient.d.ts +0 -23
  135. package/dist/client/metadata/wowMetadataClient.es.js +0 -25
  136. package/dist/client/metadata/wowMetadataClient.es.js.map +0 -1
  137. package/dist/client/query/dataset/datasetDescriptorEndpoint.cjs +0 -2
  138. package/dist/client/query/dataset/datasetDescriptorEndpoint.cjs.map +0 -1
  139. package/dist/client/query/dataset/datasetDescriptorEndpoint.d.cts +0 -8
  140. package/dist/client/query/dataset/datasetDescriptorEndpoint.d.ts +0 -8
  141. package/dist/client/query/dataset/datasetDescriptorEndpoint.es.js +0 -34
  142. package/dist/client/query/dataset/datasetDescriptorEndpoint.es.js.map +0 -1
  143. package/dist/client/query/dataset/datasetDirectoryClient.cjs +0 -2
  144. package/dist/client/query/dataset/datasetDirectoryClient.cjs.map +0 -1
  145. package/dist/client/query/dataset/datasetDirectoryClient.d.cts +0 -29
  146. package/dist/client/query/dataset/datasetDirectoryClient.d.ts +0 -29
  147. package/dist/client/query/dataset/datasetDirectoryClient.es.js +0 -25
  148. package/dist/client/query/dataset/datasetDirectoryClient.es.js.map +0 -1
  149. package/dist/client/query/dataset/datasetQueryApi.d.cts +0 -40
  150. package/dist/client/query/dataset/datasetQueryApi.d.ts +0 -40
  151. package/dist/client/query/dataset/datasetQueryClient.cjs +0 -2
  152. package/dist/client/query/dataset/datasetQueryClient.cjs.map +0 -1
  153. package/dist/client/query/dataset/datasetQueryClient.d.cts +0 -57
  154. package/dist/client/query/dataset/datasetQueryClient.d.ts +0 -57
  155. package/dist/client/query/dataset/datasetQueryClient.es.js +0 -154
  156. package/dist/client/query/dataset/datasetQueryClient.es.js.map +0 -1
  157. package/dist/client/query/dataset/endpointPaths.cjs +0 -2
  158. package/dist/client/query/dataset/endpointPaths.cjs.map +0 -1
  159. package/dist/client/query/dataset/endpointPaths.d.cts +0 -9
  160. package/dist/client/query/dataset/endpointPaths.d.ts +0 -9
  161. package/dist/client/query/dataset/endpointPaths.es.js +0 -14
  162. package/dist/client/query/dataset/endpointPaths.es.js.map +0 -1
  163. package/dist/client/query/dataset/index.d.cts +0 -3
  164. package/dist/client/query/dataset/index.d.ts +0 -3
  165. package/dist/client/query/descriptor/descriptorEndpoints.cjs +0 -2
  166. package/dist/client/query/descriptor/descriptorEndpoints.cjs.map +0 -1
  167. package/dist/client/query/descriptor/descriptorEndpoints.d.cts +0 -29
  168. package/dist/client/query/descriptor/descriptorEndpoints.d.ts +0 -29
  169. package/dist/client/query/descriptor/descriptorEndpoints.es.js +0 -69
  170. package/dist/client/query/descriptor/descriptorEndpoints.es.js.map +0 -1
  171. package/dist/client/query/descriptor/endpointPaths.cjs +0 -2
  172. package/dist/client/query/descriptor/endpointPaths.cjs.map +0 -1
  173. package/dist/client/query/descriptor/endpointPaths.d.cts +0 -4
  174. package/dist/client/query/descriptor/endpointPaths.d.ts +0 -4
  175. package/dist/client/query/descriptor/endpointPaths.es.js +0 -9
  176. package/dist/client/query/descriptor/endpointPaths.es.js.map +0 -1
  177. package/dist/client/query/descriptor/index.d.cts +0 -2
  178. package/dist/client/query/descriptor/index.d.ts +0 -2
  179. package/dist/client/query/descriptor/queryDescriptorApi.d.cts +0 -58
  180. package/dist/client/query/descriptor/queryDescriptorApi.d.ts +0 -58
  181. package/dist/client/query/descriptor/queryDescriptorClient.cjs +0 -2
  182. package/dist/client/query/descriptor/queryDescriptorClient.cjs.map +0 -1
  183. package/dist/client/query/descriptor/queryDescriptorClient.d.cts +0 -61
  184. package/dist/client/query/descriptor/queryDescriptorClient.d.ts +0 -61
  185. package/dist/client/query/descriptor/queryDescriptorClient.es.js +0 -20
  186. package/dist/client/query/descriptor/queryDescriptorClient.es.js.map +0 -1
  187. package/dist/client/query/event/endpointPaths.cjs +0 -2
  188. package/dist/client/query/event/endpointPaths.cjs.map +0 -1
  189. package/dist/client/query/event/endpointPaths.d.cts +0 -8
  190. package/dist/client/query/event/endpointPaths.d.ts +0 -8
  191. package/dist/client/query/event/endpointPaths.es.js +0 -13
  192. package/dist/client/query/event/endpointPaths.es.js.map +0 -1
  193. package/dist/client/query/event/eventStreamQueryApi.d.cts +0 -29
  194. package/dist/client/query/event/eventStreamQueryApi.d.ts +0 -29
  195. package/dist/client/query/event/eventStreamQueryClient.cjs +0 -2
  196. package/dist/client/query/event/eventStreamQueryClient.cjs.map +0 -1
  197. package/dist/client/query/event/eventStreamQueryClient.d.cts +0 -193
  198. package/dist/client/query/event/eventStreamQueryClient.d.ts +0 -193
  199. package/dist/client/query/event/eventStreamQueryClient.es.js +0 -160
  200. package/dist/client/query/event/eventStreamQueryClient.es.js.map +0 -1
  201. package/dist/client/query/event/index.d.cts +0 -2
  202. package/dist/client/query/event/index.d.ts +0 -2
  203. package/dist/client/query/factory.cjs +0 -2
  204. package/dist/client/query/factory.cjs.map +0 -1
  205. package/dist/client/query/factory.d.cts +0 -165
  206. package/dist/client/query/factory.d.ts +0 -165
  207. package/dist/client/query/factory.es.js +0 -45
  208. package/dist/client/query/factory.es.js.map +0 -1
  209. package/dist/client/query/index.d.cts +0 -7
  210. package/dist/client/query/index.d.ts +0 -7
  211. package/dist/client/query/queryApi.d.cts +0 -68
  212. package/dist/client/query/queryApi.d.ts +0 -68
  213. package/dist/client/query/requests.d.cts +0 -24
  214. package/dist/client/query/requests.d.ts +0 -24
  215. package/dist/client/query/snapshot/endpointPaths.cjs +0 -2
  216. package/dist/client/query/snapshot/endpointPaths.cjs.map +0 -1
  217. package/dist/client/query/snapshot/endpointPaths.d.cts +0 -12
  218. package/dist/client/query/snapshot/endpointPaths.d.ts +0 -12
  219. package/dist/client/query/snapshot/endpointPaths.es.js +0 -17
  220. package/dist/client/query/snapshot/endpointPaths.es.js.map +0 -1
  221. package/dist/client/query/snapshot/index.d.cts +0 -2
  222. package/dist/client/query/snapshot/index.d.ts +0 -2
  223. package/dist/client/query/snapshot/snapshotQueryApi.d.cts +0 -101
  224. package/dist/client/query/snapshot/snapshotQueryApi.d.ts +0 -101
  225. package/dist/client/query/snapshot/snapshotQueryClient.cjs +0 -2
  226. package/dist/client/query/snapshot/snapshotQueryClient.cjs.map +0 -1
  227. package/dist/client/query/snapshot/snapshotQueryClient.d.cts +0 -372
  228. package/dist/client/query/snapshot/snapshotQueryClient.d.ts +0 -372
  229. package/dist/client/query/snapshot/snapshotQueryClient.es.js +0 -239
  230. package/dist/client/query/snapshot/snapshotQueryClient.es.js.map +0 -1
  231. package/dist/client/query/state/endpointPaths.cjs +0 -2
  232. package/dist/client/query/state/endpointPaths.cjs.map +0 -1
  233. package/dist/client/query/state/endpointPaths.d.cts +0 -10
  234. package/dist/client/query/state/endpointPaths.d.ts +0 -10
  235. package/dist/client/query/state/endpointPaths.es.js +0 -14
  236. package/dist/client/query/state/endpointPaths.es.js.map +0 -1
  237. package/dist/client/query/state/index.d.cts +0 -4
  238. package/dist/client/query/state/index.d.ts +0 -4
  239. package/dist/client/query/state/loadOwnerStateAggregateApi.d.cts +0 -36
  240. package/dist/client/query/state/loadOwnerStateAggregateApi.d.ts +0 -36
  241. package/dist/client/query/state/loadOwnerStateAggregateClient.cjs +0 -2
  242. package/dist/client/query/state/loadOwnerStateAggregateClient.cjs.map +0 -1
  243. package/dist/client/query/state/loadOwnerStateAggregateClient.d.cts +0 -58
  244. package/dist/client/query/state/loadOwnerStateAggregateClient.d.ts +0 -58
  245. package/dist/client/query/state/loadOwnerStateAggregateClient.es.js +0 -56
  246. package/dist/client/query/state/loadOwnerStateAggregateClient.es.js.map +0 -1
  247. package/dist/client/query/state/loadStateAggregateApi.d.cts +0 -37
  248. package/dist/client/query/state/loadStateAggregateApi.d.ts +0 -37
  249. package/dist/client/query/state/loadStateAggregateClient.cjs +0 -2
  250. package/dist/client/query/state/loadStateAggregateClient.cjs.map +0 -1
  251. package/dist/client/query/state/loadStateAggregateClient.d.cts +0 -62
  252. package/dist/client/query/state/loadStateAggregateClient.d.ts +0 -62
  253. package/dist/client/query/state/loadStateAggregateClient.es.js +0 -65
  254. package/dist/client/query/state/loadStateAggregateClient.es.js.map +0 -1
  255. package/dist/client/routing.cjs +0 -2
  256. package/dist/client/routing.cjs.map +0 -1
  257. package/dist/client/routing.d.cts +0 -47
  258. package/dist/client/routing.d.ts +0 -47
  259. package/dist/client/routing.es.js +0 -8
  260. package/dist/client/routing.es.js.map +0 -1
  261. package/dist/error/errorInfo.cjs +0 -2
  262. package/dist/error/errorInfo.cjs.map +0 -1
  263. package/dist/error/errorInfo.d.cts +0 -139
  264. package/dist/error/errorInfo.d.ts +0 -139
  265. package/dist/error/errorInfo.es.js +0 -32
  266. package/dist/error/errorInfo.es.js.map +0 -1
  267. package/dist/error/headers.cjs +0 -2
  268. package/dist/error/headers.cjs.map +0 -1
  269. package/dist/error/headers.d.cts +0 -39
  270. package/dist/error/headers.d.ts +0 -39
  271. package/dist/error/headers.es.js +0 -10
  272. package/dist/error/headers.es.js.map +0 -1
  273. package/dist/error/index.d.cts +0 -21
  274. package/dist/error/index.d.ts +0 -21
  275. package/dist/error/queryErrorCodes.cjs +0 -2
  276. package/dist/error/queryErrorCodes.es.js.map +0 -1
  277. package/dist/error/wowError.cjs +0 -2
  278. package/dist/error/wowError.cjs.map +0 -1
  279. package/dist/error/wowError.d.cts +0 -99
  280. package/dist/error/wowError.d.ts +0 -99
  281. package/dist/error/wowError.es.js +0 -53
  282. package/dist/error/wowError.es.js.map +0 -1
  283. package/dist/legacy/condition.cjs +0 -2
  284. package/dist/legacy/condition.cjs.map +0 -1
  285. package/dist/legacy/condition.d.cts +0 -517
  286. package/dist/legacy/condition.d.ts +0 -517
  287. package/dist/legacy/condition.es.js +0 -338
  288. package/dist/legacy/condition.es.js.map +0 -1
  289. package/dist/legacy/index.d.cts +0 -16
  290. package/dist/legacy/index.d.ts +0 -16
  291. package/dist/legacy/locale/en_US.cjs +0 -2
  292. package/dist/legacy/locale/en_US.cjs.map +0 -1
  293. package/dist/legacy/locale/en_US.d.cts +0 -7
  294. package/dist/legacy/locale/en_US.d.ts +0 -7
  295. package/dist/legacy/locale/en_US.es.js +0 -50
  296. package/dist/legacy/locale/en_US.es.js.map +0 -1
  297. package/dist/legacy/locale/operatorLocale.d.cts +0 -10
  298. package/dist/legacy/locale/operatorLocale.d.ts +0 -10
  299. package/dist/legacy/locale/zh_CN.cjs +0 -2
  300. package/dist/legacy/locale/zh_CN.cjs.map +0 -1
  301. package/dist/legacy/locale/zh_CN.d.cts +0 -7
  302. package/dist/legacy/locale/zh_CN.d.ts +0 -7
  303. package/dist/legacy/locale/zh_CN.es.js +0 -50
  304. package/dist/legacy/locale/zh_CN.es.js.map +0 -1
  305. package/dist/legacy/operator.cjs +0 -2
  306. package/dist/legacy/operator.cjs.map +0 -1
  307. package/dist/legacy/operator.d.cts +0 -218
  308. package/dist/legacy/operator.d.ts +0 -218
  309. package/dist/legacy/operator.es.js +0 -25
  310. package/dist/legacy/operator.es.js.map +0 -1
  311. package/dist/legacy/queryable.cjs +0 -2
  312. package/dist/legacy/queryable.cjs.map +0 -1
  313. package/dist/legacy/queryable.d.cts +0 -61
  314. package/dist/legacy/queryable.d.ts +0 -61
  315. package/dist/legacy/queryable.es.js +0 -34
  316. package/dist/legacy/queryable.es.js.map +0 -1
  317. package/dist/legacy.cjs +0 -1
  318. package/dist/legacy.es.js +0 -6
  319. package/dist/model/abac.cjs +0 -2
  320. package/dist/model/abac.cjs.map +0 -1
  321. package/dist/model/abac.d.cts +0 -33
  322. package/dist/model/abac.d.ts +0 -33
  323. package/dist/model/abac.es.js +0 -6
  324. package/dist/model/abac.es.js.map +0 -1
  325. package/dist/model/bi.cjs +0 -2
  326. package/dist/model/bi.cjs.map +0 -1
  327. package/dist/model/bi.d.cts +0 -12
  328. package/dist/model/bi.d.ts +0 -12
  329. package/dist/model/bi.es.js +0 -8
  330. package/dist/model/bi.es.js.map +0 -1
  331. package/dist/model/command.cjs +0 -2
  332. package/dist/model/command.cjs.map +0 -1
  333. package/dist/model/command.d.cts +0 -137
  334. package/dist/model/command.d.ts +0 -137
  335. package/dist/model/command.es.js +0 -8
  336. package/dist/model/command.es.js.map +0 -1
  337. package/dist/model/common.d.cts +0 -19
  338. package/dist/model/common.d.ts +0 -19
  339. package/dist/model/domainEventStream.cjs +0 -2
  340. package/dist/model/domainEventStream.cjs.map +0 -1
  341. package/dist/model/domainEventStream.d.cts +0 -109
  342. package/dist/model/domainEventStream.d.ts +0 -109
  343. package/dist/model/domainEventStream.es.js +0 -23
  344. package/dist/model/domainEventStream.es.js.map +0 -1
  345. package/dist/model/function.cjs +0 -2
  346. package/dist/model/function.cjs.map +0 -1
  347. package/dist/model/function.d.cts +0 -41
  348. package/dist/model/function.d.ts +0 -41
  349. package/dist/model/function.es.js +0 -8
  350. package/dist/model/function.es.js.map +0 -1
  351. package/dist/model/index.d.cts +0 -24
  352. package/dist/model/index.d.ts +0 -24
  353. package/dist/model/messaging.d.cts +0 -5
  354. package/dist/model/messaging.d.ts +0 -5
  355. package/dist/model/modeling.d.cts +0 -145
  356. package/dist/model/modeling.d.ts +0 -145
  357. package/dist/model/naming.d.cts +0 -27
  358. package/dist/model/naming.d.ts +0 -27
  359. package/dist/model/snapshot.cjs +0 -2
  360. package/dist/model/snapshot.cjs.map +0 -1
  361. package/dist/model/snapshot.d.cts +0 -53
  362. package/dist/model/snapshot.d.ts +0 -53
  363. package/dist/model/snapshot.es.js +0 -20
  364. package/dist/model/snapshot.es.js.map +0 -1
  365. package/dist/transport/endpoints.cjs +0 -2
  366. package/dist/transport/endpoints.cjs.map +0 -1
  367. package/dist/transport/endpoints.d.cts +0 -79
  368. package/dist/transport/endpoints.d.ts +0 -79
  369. package/dist/transport/endpoints.es.js +0 -14
  370. package/dist/transport/endpoints.es.js.map +0 -1
  371. package/dist/transport/eventStreams.cjs +0 -2
  372. package/dist/transport/eventStreams.cjs.map +0 -1
  373. package/dist/transport/eventStreams.d.cts +0 -25
  374. package/dist/transport/eventStreams.d.ts +0 -25
  375. package/dist/transport/eventStreams.es.js +0 -21
  376. package/dist/transport/eventStreams.es.js.map +0 -1
  377. package/dist/transport/index.d.cts +0 -1
  378. package/dist/transport/index.d.ts +0 -1
  379. package/dist/v10/commands.cjs +0 -2
  380. package/dist/v10/commands.cjs.map +0 -1
  381. package/dist/v10/commands.es.js +0 -68
  382. package/dist/v10/commands.es.js.map +0 -1
  383. package/dist/v10/http.cjs +0 -2
  384. package/dist/v10/http.cjs.map +0 -1
  385. package/dist/v10/http.es.js +0 -73
  386. package/dist/v10/http.es.js.map +0 -1
  387. package/dist/v10/index.d.cts +0 -19
  388. package/dist/v10/index.d.ts +0 -19
  389. package/dist/v10/manifest.cjs.map +0 -1
  390. package/dist/v10/manifest.es.js.map +0 -1
  391. package/dist/v10/problem.cjs +0 -2
  392. package/dist/v10/problem.cjs.map +0 -1
  393. package/dist/v10/problem.es.js.map +0 -1
  394. package/dist/v10/queries.cjs +0 -2
  395. package/dist/v10/queries.cjs.map +0 -1
  396. package/dist/v10/queries.es.js +0 -88
  397. package/dist/v10/queries.es.js.map +0 -1
  398. package/dist/v10/state.cjs +0 -2
  399. package/dist/v10/state.cjs.map +0 -1
  400. package/dist/v10/state.es.js +0 -51
  401. package/dist/v10/state.es.js.map +0 -1
  402. package/dist/v10/streams.cjs +0 -2
  403. package/dist/v10/streams.cjs.map +0 -1
  404. package/dist/v10/streams.d.cts +0 -14
  405. package/dist/v10/streams.d.ts +0 -14
  406. package/dist/v10/streams.es.js +0 -22
  407. package/dist/v10/streams.es.js.map +0 -1
  408. package/dist/v10/wait.cjs.map +0 -1
  409. package/dist/v10/wait.es.js.map +0 -1
  410. package/dist/v10/wire.cjs.map +0 -1
  411. package/dist/v10/wire.es.js.map +0 -1
  412. package/dist/v10.cjs +0 -1
  413. package/dist/v10.es.js +0 -9
  414. /package/dist/{v10/manifest.cjs → manifest.cjs} +0 -0
  415. /package/dist/{v10/manifest.d.cts → manifest.d.cts} +0 -0
  416. /package/dist/{v10/manifest.d.ts → manifest.d.ts} +0 -0
  417. /package/dist/{v10/wait.cjs → wait.cjs} +0 -0
  418. /package/dist/{v10/wait.d.cts → wait.d.cts} +0 -0
  419. /package/dist/{v10/wait.d.ts → wait.d.ts} +0 -0
  420. /package/dist/{v10/wire.cjs → wire.cjs} +0 -0
@@ -1,154 +0,0 @@
1
- import { QUERY_STREAM_ENDPOINT as e } from "../../../transport/endpoints.es.js";
2
- import { bindMethods as t } from "../../bindMethods.es.js";
3
- import n from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.es.js";
4
- import r from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.es.js";
5
- import i from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.es.js";
6
- import { descriptorVersion as a, ifNoneMatch as o, readDescriptor as s } from "../descriptor/descriptorEndpoints.es.js";
7
- import { ResourceAttributionPathSpec as c } from "../../routing.es.js";
8
- import { DatasetQueryEndpointPaths as l } from "./endpointPaths.es.js";
9
- import { DatasetDescriptorEndpoint as u } from "./datasetDescriptorEndpoint.es.js";
10
- import { combineURLs as d } from "@ahoo-wang/fetcher";
11
- import { api as f, attribute as p, autoGeneratedError as m, body as h, post as g } from "@ahoo-wang/fetcher-decorator";
12
- //#region src/client/query/dataset/datasetQueryClient.ts
13
- function _(e, t, n = c.NONE) {
14
- let r = `dataset/${encodeURIComponent(e)}/${encodeURIComponent(t)}`;
15
- return n ? d(n, r) : r;
16
- }
17
- var v = class {
18
- constructor(e) {
19
- let { context: n, dataset: r, resourceAttribution: i, ...a } = e;
20
- this.apiMetadata = {
21
- ...a,
22
- basePath: e.basePath ?? _(n, r, i)
23
- }, t(this);
24
- }
25
- single(e, t, n) {
26
- throw m(e, t, n);
27
- }
28
- /* v8 ignore stop */
29
- list(e, t, n) {
30
- throw m(e, t, n);
31
- }
32
- /* v8 ignore stop */
33
- listStream(e, t, n) {
34
- throw m(e, t, n);
35
- }
36
- /* v8 ignore stop */
37
- paged(e, t, n) {
38
- throw m(e, t, n);
39
- }
40
- /* v8 ignore stop */
41
- cursor(e, t, n) {
42
- throw m(e, t, n);
43
- }
44
- /* v8 ignore stop */
45
- count(e, t, n) {
46
- throw m(e, t, n);
47
- }
48
- /* v8 ignore stop */
49
- aggregate(e, t, n) {
50
- throw m(e, t, n);
51
- }
52
- /* v8 ignore stop */
53
- aggregateStream(e, t, n) {
54
- throw m(e, t, n);
55
- }
56
- /* v8 ignore stop */
57
- async describe(e, t, n) {
58
- let r = a(e), i = await new u(this.apiMetadata).schema(o(r), t, n);
59
- return s(i, r);
60
- }
61
- };
62
- i([
63
- g(l.SINGLE),
64
- r(0, h()),
65
- r(1, p()),
66
- n("design:type", Function),
67
- n("design:paramtypes", [
68
- Object,
69
- typeof Record > "u" ? Object : Record,
70
- Object
71
- ]),
72
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
73
- ], v.prototype, "single", null), i([
74
- g(l.LIST),
75
- r(0, h()),
76
- r(1, p()),
77
- n("design:type", Function),
78
- n("design:paramtypes", [
79
- Object,
80
- typeof Record > "u" ? Object : Record,
81
- Object
82
- ]),
83
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
84
- ], v.prototype, "list", null), i([
85
- g(l.LIST, e),
86
- r(0, h()),
87
- r(1, p()),
88
- n("design:type", Function),
89
- n("design:paramtypes", [
90
- Object,
91
- typeof Record > "u" ? Object : Record,
92
- Object
93
- ]),
94
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
95
- ], v.prototype, "listStream", null), i([
96
- g(l.PAGED),
97
- r(0, h()),
98
- r(1, p()),
99
- n("design:type", Function),
100
- n("design:paramtypes", [
101
- Object,
102
- typeof Record > "u" ? Object : Record,
103
- Object
104
- ]),
105
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
106
- ], v.prototype, "paged", null), i([
107
- g(l.CURSOR),
108
- r(0, h()),
109
- r(1, p()),
110
- n("design:type", Function),
111
- n("design:paramtypes", [
112
- Object,
113
- typeof Record > "u" ? Object : Record,
114
- Object
115
- ]),
116
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
117
- ], v.prototype, "cursor", null), i([
118
- g(l.COUNT),
119
- r(0, h()),
120
- r(1, p()),
121
- n("design:type", Function),
122
- n("design:paramtypes", [
123
- Object,
124
- typeof Record > "u" ? Object : Record,
125
- Object
126
- ]),
127
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
128
- ], v.prototype, "count", null), i([
129
- g(l.AGGREGATION),
130
- r(0, h()),
131
- r(1, p()),
132
- n("design:type", Function),
133
- n("design:paramtypes", [
134
- Object,
135
- typeof Record > "u" ? Object : Record,
136
- Object
137
- ]),
138
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
139
- ], v.prototype, "aggregate", null), i([
140
- g(l.AGGREGATION, e),
141
- r(0, h()),
142
- r(1, p()),
143
- n("design:type", Function),
144
- n("design:paramtypes", [
145
- Object,
146
- typeof Record > "u" ? Object : Record,
147
- Object
148
- ]),
149
- n("design:returntype", typeof Promise > "u" ? Object : Promise)
150
- ], v.prototype, "aggregateStream", null), v = i([f(), n("design:paramtypes", [Object])], v);
151
- //#endregion
152
- export { v as DatasetQueryClient, _ as datasetBasePath };
153
-
154
- //# sourceMappingURL=datasetQueryClient.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datasetQueryClient.es.js","names":["_decorate","_decorateParam","_decorateMetadata","__decorateMetadata","__decorateParam","__decorate","datasetBasePath","ResourceAttributionPathSpec","path","context","dataset","resourceAttribution","combineURLs","DatasetQueryClient","apiMetadata","options","bindMethods","autoGeneratedError","query","attributes","abort","filter","version","descriptorVersion","previous","exchange","DatasetDescriptorEndpoint","ifNoneMatch","readDescriptor","post","DatasetQueryEndpointPaths","body","attribute","QUERY_STREAM_ENDPOINT","api"],"sources":["../../../../src/client/query/dataset/datasetQueryClient.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 { combineURLs, type PartialBy } from '@ahoo-wang/fetcher';\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 type { AggregationQuery } from '../../../dsl/aggregation/index.js';\nimport type { CursorPage, CursorQuery } from '../../../dsl/cursorQuery.js';\nimport type { DynamicDocument } from '../../../dsl/documents.js';\nimport type { FilterExpression } from '../../../dsl/filter/index.js';\nimport type {\n FilterListQuery,\n FilterPagedQuery,\n FilterSingleQuery,\n PagedList,\n} from '../../../dsl/queryable.js';\nimport { QUERY_STREAM_ENDPOINT } from '../../../transport/endpoints.js';\nimport { bindMethods } from '../../bindMethods.js';\nimport { ResourceAttributionPathSpec } from '../../routing.js';\nimport type { QueryDescriptorResult } from '../descriptor/queryDescriptorApi.js';\nimport {\n descriptorVersion,\n ifNoneMatch,\n readDescriptor,\n} from '../descriptor/descriptorEndpoints.js';\nimport type { DatasetQueryApi } from './datasetQueryApi.js';\nimport { DatasetDescriptorEndpoint } from './datasetDescriptorEndpoint.js';\nimport { DatasetQueryEndpointPaths } from './endpointPaths.js';\n\n/**\n * Where a dataset client sends its queries: the dataset's bounded context and\n * name, and optionally a tenant prefix (`ResourceAttributionPathSpec.TENANT`,\n * whose `{tenantId}` the `urlParams` fill). `basePath` replaces\n * the computed `{attribution}/dataset/{context}/{dataset}` when given.\n */\nexport interface DatasetQueryClientOptions extends PartialBy<\n ApiMetadata,\n 'basePath'\n> {\n context: string;\n dataset: string;\n resourceAttribution?:\n ResourceAttributionPathSpec.NONE | ResourceAttributionPathSpec.TENANT;\n}\n\n/** `{attribution}/dataset/{context}/{dataset}`, the base path of a dataset's routes. */\nexport function datasetBasePath(\n context: string,\n dataset: string,\n resourceAttribution: ResourceAttributionPathSpec = ResourceAttributionPathSpec.NONE,\n): string {\n const path = `dataset/${encodeURIComponent(context)}/${encodeURIComponent(dataset)}`;\n return resourceAttribution ? combineURLs(resourceAttribution, path) : path;\n}\n\n/**\n * A client for one dataset's query routes. It implements\n * {@link DatasetQueryApi}, the shape of a view-engine data source, so it can be\n * handed to the engine's `resources` as it is.\n *\n * @example\n * ```typescript\n * import { DatasetQueryClient, aggregation } from '@ahoo-wang/wow-client';\n *\n * const orders = new DatasetQueryClient({\n * context: 'analytics',\n * dataset: 'order_wide',\n * });\n * const byCity = await orders.aggregate(\n * aggregation.query({\n * groupBy: [aggregation.terms('city', 'city')],\n * metrics: [aggregation.count('orders')],\n * }),\n * );\n * ```\n */\n@api()\nexport class DatasetQueryClient<\n R = DynamicDocument,\n FIELDS extends string = string,\n>\n implements DatasetQueryApi<R, FIELDS>, ApiMetadataCapable\n{\n public readonly apiMetadata: ApiMetadata;\n\n constructor(options: DatasetQueryClientOptions) {\n const { context, dataset, resourceAttribution, ...apiMetadata } = options;\n this.apiMetadata = {\n ...apiMetadata,\n basePath:\n options.basePath ??\n datasetBasePath(context, dataset, resourceAttribution),\n };\n bindMethods(this);\n }\n\n @post(DatasetQueryEndpointPaths.SINGLE)\n /* v8 ignore start */\n single<T extends Partial<R> = R>(\n @body() query: FilterSingleQuery<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<T> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n @post(DatasetQueryEndpointPaths.LIST)\n /* v8 ignore start */\n list<T extends Partial<R> = R>(\n @body() query: FilterListQuery<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<T[]> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n @post(DatasetQueryEndpointPaths.LIST, QUERY_STREAM_ENDPOINT)\n /* v8 ignore start */\n listStream<T extends Partial<R> = R>(\n @body() query: FilterListQuery<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<ReadableStream<T>> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n @post(DatasetQueryEndpointPaths.PAGED)\n /* v8 ignore start */\n paged<T extends Partial<R> = R>(\n @body() query: FilterPagedQuery<FIELDS>,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<PagedList<T>> {\n throw autoGeneratedError(query, attributes, abort);\n }\n /* v8 ignore stop */\n\n @post(DatasetQueryEndpointPaths.CURSOR)\n /* v8 ignore start */\n cursor<T extends Partial<R> = R>(\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 @post(DatasetQueryEndpointPaths.COUNT)\n /* v8 ignore start */\n count(\n @body() filter: FilterExpression<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 @post(DatasetQueryEndpointPaths.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 @post(DatasetQueryEndpointPaths.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 async describe(\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 DatasetDescriptorEndpoint(\n this.apiMetadata,\n ).schema(ifNoneMatch(version), attributes, abort);\n return readDescriptor(exchange, version);\n }\n}\n"],"mappings":";;;;;;;;;;;;AAiEA,SAAgBM,EACd,GACA,GACA,IAAmDC,EAA4B,MACvE;CACR,IAAMC,IAAO,WAAW,mBAAmBC,CAAO,EAAE,GAAG,mBAAmBC,CAAO;CACjF,OAAOC,IAAsBC,EAAYD,GAAqBH,CAAI,IAAIA;AACxE;AAwBO,IAAMK,IAAN,MAKP;CAGE,YAAY,GAAoC;EAC9C,IAAM,EAAE,YAAS,YAAS,wBAAqB,GAAGC,MAAgBC;EAOlE,AANA,KAAK,cAAc;GACjB,GAAGD;GACH,UACEC,EAAQ,YACRT,EAAgBG,GAASC,GAASC,CAAmB;EACzD,GACAK,EAAY,IAAI;CAClB;CAEA,OAGE,GACA,GACA,GACY;EACZ,MAAMC,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAGA,KAGE,GACA,GACA,GACc;EACd,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAGA,WAGE,GACA,GACA,GAC4B;EAC5B,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAGA,MAGE,GACA,GACA,GACuB;EACvB,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAGA,OAGE,GACA,GACA,GACwB;EACxB,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAGA,MAGE,GACA,GACA,GACiB;EACjB,MAAMH,EAAmBI,GAAQF,GAAYC,CAAK;CACpD;;CAGA,UAME,GACA,GACA,GACgB;EAChB,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAGA,gBAME,GACA,GACA,GAC8B;EAC9B,MAAMH,EAAmBC,GAAOC,GAAYC,CAAK;CACnD;;CAGA,MAAM,SACJ,GACA,GACA,GACgC;EAChC,IAAME,IAAUC,EAAkBC,CAAQ,GACpCC,IAAW,MAAM,IAAIC,EACzB,KAAK,WACP,CAAC,CAAC,OAAOC,EAAYL,CAAO,GAAGH,GAAYC,CAAK;EAChD,OAAOQ,EAAeH,GAAUH,CAAO;CACzC;AACF;;CAzGGO,EAAKC,EAA0B,MAAM;CAGnC7B,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;;CAOZH,EAAKC,EAA0B,IAAI;CAGjC7B,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;;CAOZH,EAAKC,EAA0B,MAAMG,CAAqB;CAGxDhC,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;;CAOZH,EAAKC,EAA0B,KAAK;CAGlC7B,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;;CAOZH,EAAKC,EAA0B,MAAM;CAGnC7B,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;;CAOZH,EAAKC,EAA0B,KAAK;CAGlC7B,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;;CAOZH,EAAKC,EAA0B,WAAW;CAMxC7B,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;;CAOZH,EAAKC,EAA0B,aAAaG,CAAqB;CAM/DhC,EAAA,GAAA8B,EAAK,CAAA;CACL9B,EAAA,GAAA+B,EAAU,CAAA;;;;;;;;0CA3Gd,IAAAhC,EAAA,CAAAkC,EAAI,GAAAhC,EAAA,qBAAA,CAAA,MAAA,CAAA,CAAA,GAAAW,CAAA"}
@@ -1,2 +0,0 @@
1
- var e=Object.freeze({SCHEMA:`schema`,AGGREGATION:`aggregation`,COUNT:`count`,LIST:`list`,PAGED:`paged`,CURSOR:`cursor`,SINGLE:`single`});exports.DatasetQueryEndpointPaths=e;
2
- //# sourceMappingURL=endpointPaths.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpointPaths.cjs","names":["DatasetQueryEndpointPaths"],"sources":["../../../../src/client/query/dataset/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, `dataset/{context}/{dataset}`.\nexport const DatasetQueryEndpointPaths = Object.freeze({\n SCHEMA: 'schema',\n AGGREGATION: 'aggregation',\n COUNT: 'count',\n LIST: 'list',\n PAGED: 'paged',\n CURSOR: 'cursor',\n SINGLE: 'single',\n} as const);\n"],"mappings":"AAeA,IAAaA,EAA4B,OAAO,OAAO,CACrD,OAAQ,SACR,YAAa,cACb,MAAO,QACP,KAAM,OACN,MAAO,QACP,OAAQ,SACR,OAAQ,QACV,CAAU"}
@@ -1,9 +0,0 @@
1
- export declare const DatasetQueryEndpointPaths: Readonly<{
2
- readonly SCHEMA: "schema";
3
- readonly AGGREGATION: "aggregation";
4
- readonly COUNT: "count";
5
- readonly LIST: "list";
6
- readonly PAGED: "paged";
7
- readonly CURSOR: "cursor";
8
- readonly SINGLE: "single";
9
- }>;
@@ -1,9 +0,0 @@
1
- export declare const DatasetQueryEndpointPaths: Readonly<{
2
- readonly SCHEMA: "schema";
3
- readonly AGGREGATION: "aggregation";
4
- readonly COUNT: "count";
5
- readonly LIST: "list";
6
- readonly PAGED: "paged";
7
- readonly CURSOR: "cursor";
8
- readonly SINGLE: "single";
9
- }>;
@@ -1,14 +0,0 @@
1
- //#region src/client/query/dataset/endpointPaths.ts
2
- var e = Object.freeze({
3
- SCHEMA: "schema",
4
- AGGREGATION: "aggregation",
5
- COUNT: "count",
6
- LIST: "list",
7
- PAGED: "paged",
8
- CURSOR: "cursor",
9
- SINGLE: "single"
10
- });
11
- //#endregion
12
- export { e as DatasetQueryEndpointPaths };
13
-
14
- //# sourceMappingURL=endpointPaths.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpointPaths.es.js","names":["DatasetQueryEndpointPaths"],"sources":["../../../../src/client/query/dataset/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, `dataset/{context}/{dataset}`.\nexport const DatasetQueryEndpointPaths = Object.freeze({\n SCHEMA: 'schema',\n AGGREGATION: 'aggregation',\n COUNT: 'count',\n LIST: 'list',\n PAGED: 'paged',\n CURSOR: 'cursor',\n SINGLE: 'single',\n} as const);\n"],"mappings":";AAeA,IAAaA,IAA4B,OAAO,OAAO;CACrD,QAAQ;CACR,aAAa;CACb,OAAO;CACP,MAAM;CACN,OAAO;CACP,QAAQ;CACR,QAAQ;AACV,CAAU"}
@@ -1,3 +0,0 @@
1
- export * from './datasetQueryApi.cjs';
2
- export * from './datasetQueryClient.cjs';
3
- export * from './datasetDirectoryClient.cjs';
@@ -1,3 +0,0 @@
1
- export * from './datasetQueryApi.js';
2
- export * from './datasetQueryClient.js';
3
- export * from './datasetDirectoryClient.js';
@@ -1,2 +0,0 @@
1
- const e=require("../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.cjs"),t=require("../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.cjs"),n=require("../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.cjs"),r=require("./endpointPaths.cjs");let i=require("@ahoo-wang/fetcher"),a=require("@ahoo-wang/fetcher-decorator");var o=Object.freeze({resultExtractor:i.ExchangeResultExtractor,attributes:Object.freeze({[i.IGNORE_VALIDATE_STATUS]:!0})}),s=class{constructor(e){this.apiMetadata=e}snapshot(e,t,n){throw(0,a.autoGeneratedError)(e,t,n)}eventStream(e,t,n){throw(0,a.autoGeneratedError)(e,t,n)}};n.default([(0,a.get)(r.QueryDescriptorEndpointPaths.SNAPSHOT,o),t.default(0,(0,a.header)(`If-None-Match`)),t.default(1,(0,a.attribute)()),e.default(`design:type`,Function),e.default(`design:paramtypes`,[String,typeof Record>`u`?Object:Record,Object]),e.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],s.prototype,`snapshot`,null),n.default([(0,a.get)(r.QueryDescriptorEndpointPaths.EVENT_STREAM,o),t.default(0,(0,a.header)(`If-None-Match`)),t.default(1,(0,a.attribute)()),e.default(`design:type`,Function),e.default(`design:paramtypes`,[String,typeof Record>`u`?Object:Record,Object]),e.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],s.prototype,`eventStream`,null),s=n.default([(0,a.api)(),e.default(`design:paramtypes`,[Object])],s);function c(e){return e?.trim().replace(/^W\//,``).replace(/^"(.*)"$/,`$1`)||void 0}function l(e){return e===void 0?void 0:`"${e}"`}async function u(e,t){let n=e.requiredResponse;if(n.status===304&&t!==void 0)return{notModified:!0,version:t};if(!n.ok)throw new i.HttpStatusValidationError(e);let r=await n.json();return{notModified:!1,descriptor:r,version:r.version}}Object.defineProperty(exports,"QueryDescriptorEndpoints",{enumerable:!0,get:function(){return s}}),exports.descriptorVersion=c,exports.ifNoneMatch=l,exports.readDescriptor=u;
2
- //# sourceMappingURL=descriptorEndpoints.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptorEndpoints.cjs","names":["ExchangeResultExtractor","IGNORE_VALIDATE_STATUS","autoGeneratedError","_decorate","get","QueryDescriptorEndpointPaths","_decorateParam","header","attribute","_decorateMetadata","api","HttpStatusValidationError","require_decorateMetadata","require_decorateParam","require_decorate","require_endpointPaths","_ahoo_wang_fetcher","_ahoo_wang_fetcher_decorator","DESCRIPTOR_ENDPOINT","QueryDescriptorEndpoints","apiMetadata","ifNoneMatch","attributes","abort","descriptorVersion","previous","version","readDescriptor","response","exchange","descriptor"],"sources":["../../../../src/client/query/descriptor/descriptorEndpoints.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.\n\nimport {\n ExchangeResultExtractor,\n type FetchExchange,\n HttpStatusValidationError,\n IGNORE_VALIDATE_STATUS,\n} from '@ahoo-wang/fetcher';\nimport type {\n ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport {\n api,\n attribute,\n autoGeneratedError,\n get,\n header,\n} from '@ahoo-wang/fetcher-decorator';\nimport type { QueryModelDescriptor } from '../../../dsl/descriptor.js';\nimport type { QueryDescriptorResult } from './queryDescriptorApi.js';\nimport { QueryDescriptorEndpointPaths } from './endpointPaths.js';\n\n/**\n * The endpoints answer the exchange with its status unchecked, so a 304 is\n * not an error; {@link readDescriptor} checks the status instead.\n */\nconst DESCRIPTOR_ENDPOINT = Object.freeze({\n resultExtractor: ExchangeResultExtractor,\n attributes: Object.freeze({ [IGNORE_VALIDATE_STATUS]: true }),\n});\n\n/**\n * The decorated requests behind `QueryDescriptorClient`, which turns the\n * version it is given into an ETag before they run.\n */\n@api()\nexport class QueryDescriptorEndpoints implements ApiMetadataCapable {\n constructor(public readonly apiMetadata?: ApiMetadata) {}\n\n @get(QueryDescriptorEndpointPaths.SNAPSHOT, DESCRIPTOR_ENDPOINT)\n /* v8 ignore start */\n snapshot(\n @header('If-None-Match') ifNoneMatch?: string,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<FetchExchange> {\n throw autoGeneratedError(ifNoneMatch, attributes, abort);\n }\n /* v8 ignore stop */\n\n @get(QueryDescriptorEndpointPaths.EVENT_STREAM, DESCRIPTOR_ENDPOINT)\n /* v8 ignore start */\n eventStream(\n @header('If-None-Match') ifNoneMatch?: string,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<FetchExchange> {\n throw autoGeneratedError(ifNoneMatch, attributes, abort);\n }\n /* v8 ignore stop */\n}\n\n/**\n * The version a descriptor version or an ETag names: `sha256:…`,\n * `\"sha256:…\"` and `W/\"sha256:…\"` all name `sha256:…`. `undefined` for\n * nothing, or only blanks.\n */\nexport function descriptorVersion(previous?: string): string | undefined {\n const version = previous\n ?.trim()\n .replace(/^W\\//, '')\n .replace(/^\"(.*)\"$/, '$1');\n return version ? version : undefined;\n}\n\n/**\n * The `If-None-Match` value for `version`: the ETag the server sends, which it\n * compares as it is.\n */\nexport function ifNoneMatch(version?: string): string | undefined {\n return version === undefined ? undefined : `\"${version}\"`;\n}\n\n/**\n * What an exchange answers: 304 means the version sent is current; any other\n * status outside 2xx rejects with the error the fetcher would have thrown.\n */\nexport async function readDescriptor(\n exchange: FetchExchange,\n version: string | undefined,\n): Promise<QueryDescriptorResult> {\n const response = exchange.requiredResponse;\n if (response.status === 304 && version !== undefined)\n return { notModified: true, version };\n if (!response.ok) throw new HttpStatusValidationError(exchange);\n const descriptor = (await response.json()) as QueryModelDescriptor;\n return { notModified: false, descriptor, version: descriptor.version };\n}\n"],"mappings":"oYAwCA,IAAMkB,EAAsB,OAAO,OAAO,CACxC,gBAAiBlB,EAAAA,wBACjB,WAAY,OAAO,OAAO,EAAGC,EAAAA,wBAAyB,EAAK,CAAC,CAC9D,CAAC,EAOYkB,EAAN,KAA6D,CAClE,YAAY,EAA2C,CAA3B,KAAA,YAAAC,CAA4B,CAExD,SAGE,EACA,EACA,EACwB,CACxB,MAAA,EAAMlB,EAAAA,mBAAAA,CAAmBmB,EAAaC,EAAYC,CAAK,CACzD,CAGA,YAGE,EACA,EACA,EACwB,CACxB,MAAA,EAAMrB,EAAAA,mBAAAA,CAAmBmB,EAAaC,EAAYC,CAAK,CACzD,CAEF,cArBGnB,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,6BAA6B,SAAUa,CAAmB,EAG5DZ,EAAAA,QAAA,GAAA,EAAAC,EAAAA,OAAAA,CAAO,eAAe,CAAA,EACtBD,EAAAA,QAAA,GAAA,EAAAE,EAAAA,UAAAA,CAAU,CAAA,8NAOZJ,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,6BAA6B,aAAca,CAAmB,EAGhEZ,EAAAA,QAAA,GAAA,EAAAC,EAAAA,OAAAA,CAAO,eAAe,CAAA,EACtBD,EAAAA,QAAA,GAAA,EAAAE,EAAAA,UAAAA,CAAU,CAAA,qNAnBd,EAAAL,EAAAA,QAAA,EAAA,EAAAO,EAAAA,IAAAA,CAAI,EAAAD,EAAAA,QAAA,oBAAA,CAAA,MAAA,CAAA,CAAA,EAAAU,CAAA,EAgCL,SAAgBK,EAAkB,EAAuC,CAKvE,OAJgBC,GACZ,KAAK,CAAC,CACP,QAAQ,OAAQ,EAAE,CAAC,CACnB,QAAQ,WAAY,IAAI,GACA,IAAA,EAC7B,CAMA,SAAgBJ,EAAY,EAAsC,CAChE,OAAOK,IAAY,IAAA,GAAY,IAAA,GAAY,IAAIA,EAAQ,EACzD,CAMA,eAAsBC,EACpB,EACA,EACgC,CAChC,IAAMC,EAAWC,EAAS,iBAC1B,GAAID,EAAS,SAAW,KAAOF,IAAY,IAAA,GACzC,MAAO,CAAE,YAAa,GAAM,SAAQ,EACtC,GAAI,CAACE,EAAS,GAAI,MAAM,IAAIjB,EAAAA,0BAA0BkB,CAAQ,EAC9D,IAAMC,EAAc,MAAMF,EAAS,KAAK,EACxC,MAAO,CAAE,YAAa,GAAO,aAAY,QAASE,EAAW,OAAQ,CACvE"}
@@ -1,29 +0,0 @@
1
- import { FetchExchange } from '@ahoo-wang/fetcher';
2
- import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
3
- import { QueryDescriptorResult } from './queryDescriptorApi.cjs';
4
- /**
5
- * The decorated requests behind `QueryDescriptorClient`, which turns the
6
- * version it is given into an ETag before they run.
7
- */
8
- export declare class QueryDescriptorEndpoints implements ApiMetadataCapable {
9
- readonly apiMetadata?: ApiMetadata | undefined;
10
- constructor(apiMetadata?: ApiMetadata | undefined);
11
- snapshot(ifNoneMatch?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<FetchExchange>;
12
- eventStream(ifNoneMatch?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<FetchExchange>;
13
- }
14
- /**
15
- * The version a descriptor version or an ETag names: `sha256:…`,
16
- * `"sha256:…"` and `W/"sha256:…"` all name `sha256:…`. `undefined` for
17
- * nothing, or only blanks.
18
- */
19
- export declare function descriptorVersion(previous?: string): string | undefined;
20
- /**
21
- * The `If-None-Match` value for `version`: the ETag the server sends, which it
22
- * compares as it is.
23
- */
24
- export declare function ifNoneMatch(version?: string): string | undefined;
25
- /**
26
- * What an exchange answers: 304 means the version sent is current; any other
27
- * status outside 2xx rejects with the error the fetcher would have thrown.
28
- */
29
- export declare function readDescriptor(exchange: FetchExchange, version: string | undefined): Promise<QueryDescriptorResult>;
@@ -1,29 +0,0 @@
1
- import { FetchExchange } from '@ahoo-wang/fetcher';
2
- import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
3
- import { QueryDescriptorResult } from './queryDescriptorApi.js';
4
- /**
5
- * The decorated requests behind `QueryDescriptorClient`, which turns the
6
- * version it is given into an ETag before they run.
7
- */
8
- export declare class QueryDescriptorEndpoints implements ApiMetadataCapable {
9
- readonly apiMetadata?: ApiMetadata | undefined;
10
- constructor(apiMetadata?: ApiMetadata | undefined);
11
- snapshot(ifNoneMatch?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<FetchExchange>;
12
- eventStream(ifNoneMatch?: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<FetchExchange>;
13
- }
14
- /**
15
- * The version a descriptor version or an ETag names: `sha256:…`,
16
- * `"sha256:…"` and `W/"sha256:…"` all name `sha256:…`. `undefined` for
17
- * nothing, or only blanks.
18
- */
19
- export declare function descriptorVersion(previous?: string): string | undefined;
20
- /**
21
- * The `If-None-Match` value for `version`: the ETag the server sends, which it
22
- * compares as it is.
23
- */
24
- export declare function ifNoneMatch(version?: string): string | undefined;
25
- /**
26
- * What an exchange answers: 304 means the version sent is current; any other
27
- * status outside 2xx rejects with the error the fetcher would have thrown.
28
- */
29
- export declare function readDescriptor(exchange: FetchExchange, version: string | undefined): Promise<QueryDescriptorResult>;
@@ -1,69 +0,0 @@
1
- import e from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.es.js";
2
- import t from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.es.js";
3
- import n from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.es.js";
4
- import { QueryDescriptorEndpointPaths as r } from "./endpointPaths.es.js";
5
- import { ExchangeResultExtractor as i, HttpStatusValidationError as a, IGNORE_VALIDATE_STATUS as o } from "@ahoo-wang/fetcher";
6
- import { api as s, attribute as c, autoGeneratedError as l, get as u, header as d } from "@ahoo-wang/fetcher-decorator";
7
- //#region src/client/query/descriptor/descriptorEndpoints.ts
8
- var f = Object.freeze({
9
- resultExtractor: i,
10
- attributes: Object.freeze({ [o]: !0 })
11
- }), p = class {
12
- constructor(e) {
13
- this.apiMetadata = e;
14
- }
15
- snapshot(e, t, n) {
16
- throw l(e, t, n);
17
- }
18
- /* v8 ignore stop */
19
- eventStream(e, t, n) {
20
- throw l(e, t, n);
21
- }
22
- };
23
- n([
24
- u(r.SNAPSHOT, f),
25
- t(0, d("If-None-Match")),
26
- t(1, c()),
27
- e("design:type", Function),
28
- e("design:paramtypes", [
29
- String,
30
- typeof Record > "u" ? Object : Record,
31
- Object
32
- ]),
33
- e("design:returntype", typeof Promise > "u" ? Object : Promise)
34
- ], p.prototype, "snapshot", null), n([
35
- u(r.EVENT_STREAM, f),
36
- t(0, d("If-None-Match")),
37
- t(1, c()),
38
- e("design:type", Function),
39
- e("design:paramtypes", [
40
- String,
41
- typeof Record > "u" ? Object : Record,
42
- Object
43
- ]),
44
- e("design:returntype", typeof Promise > "u" ? Object : Promise)
45
- ], p.prototype, "eventStream", null), p = n([s(), e("design:paramtypes", [Object])], p);
46
- function m(e) {
47
- return e?.trim().replace(/^W\//, "").replace(/^"(.*)"$/, "$1") || void 0;
48
- }
49
- function h(e) {
50
- return e === void 0 ? void 0 : `"${e}"`;
51
- }
52
- async function g(e, t) {
53
- let n = e.requiredResponse;
54
- if (n.status === 304 && t !== void 0) return {
55
- notModified: !0,
56
- version: t
57
- };
58
- if (!n.ok) throw new a(e);
59
- let r = await n.json();
60
- return {
61
- notModified: !1,
62
- descriptor: r,
63
- version: r.version
64
- };
65
- }
66
- //#endregion
67
- export { p as QueryDescriptorEndpoints, m as descriptorVersion, h as ifNoneMatch, g as readDescriptor };
68
-
69
- //# sourceMappingURL=descriptorEndpoints.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptorEndpoints.es.js","names":["_decorate","_decorateParam","_decorateMetadata","__decorateMetadata","__decorateParam","__decorate","DESCRIPTOR_ENDPOINT","ExchangeResultExtractor","IGNORE_VALIDATE_STATUS","QueryDescriptorEndpoints","apiMetadata","autoGeneratedError","ifNoneMatch","attributes","abort","get","QueryDescriptorEndpointPaths","header","attribute","api","descriptorVersion","previous","version","readDescriptor","response","exchange","HttpStatusValidationError","descriptor"],"sources":["../../../../src/client/query/descriptor/descriptorEndpoints.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.\n\nimport {\n ExchangeResultExtractor,\n type FetchExchange,\n HttpStatusValidationError,\n IGNORE_VALIDATE_STATUS,\n} from '@ahoo-wang/fetcher';\nimport type {\n ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport {\n api,\n attribute,\n autoGeneratedError,\n get,\n header,\n} from '@ahoo-wang/fetcher-decorator';\nimport type { QueryModelDescriptor } from '../../../dsl/descriptor.js';\nimport type { QueryDescriptorResult } from './queryDescriptorApi.js';\nimport { QueryDescriptorEndpointPaths } from './endpointPaths.js';\n\n/**\n * The endpoints answer the exchange with its status unchecked, so a 304 is\n * not an error; {@link readDescriptor} checks the status instead.\n */\nconst DESCRIPTOR_ENDPOINT = Object.freeze({\n resultExtractor: ExchangeResultExtractor,\n attributes: Object.freeze({ [IGNORE_VALIDATE_STATUS]: true }),\n});\n\n/**\n * The decorated requests behind `QueryDescriptorClient`, which turns the\n * version it is given into an ETag before they run.\n */\n@api()\nexport class QueryDescriptorEndpoints implements ApiMetadataCapable {\n constructor(public readonly apiMetadata?: ApiMetadata) {}\n\n @get(QueryDescriptorEndpointPaths.SNAPSHOT, DESCRIPTOR_ENDPOINT)\n /* v8 ignore start */\n snapshot(\n @header('If-None-Match') ifNoneMatch?: string,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<FetchExchange> {\n throw autoGeneratedError(ifNoneMatch, attributes, abort);\n }\n /* v8 ignore stop */\n\n @get(QueryDescriptorEndpointPaths.EVENT_STREAM, DESCRIPTOR_ENDPOINT)\n /* v8 ignore start */\n eventStream(\n @header('If-None-Match') ifNoneMatch?: string,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<FetchExchange> {\n throw autoGeneratedError(ifNoneMatch, attributes, abort);\n }\n /* v8 ignore stop */\n}\n\n/**\n * The version a descriptor version or an ETag names: `sha256:…`,\n * `\"sha256:…\"` and `W/\"sha256:…\"` all name `sha256:…`. `undefined` for\n * nothing, or only blanks.\n */\nexport function descriptorVersion(previous?: string): string | undefined {\n const version = previous\n ?.trim()\n .replace(/^W\\//, '')\n .replace(/^\"(.*)\"$/, '$1');\n return version ? version : undefined;\n}\n\n/**\n * The `If-None-Match` value for `version`: the ETag the server sends, which it\n * compares as it is.\n */\nexport function ifNoneMatch(version?: string): string | undefined {\n return version === undefined ? undefined : `\"${version}\"`;\n}\n\n/**\n * What an exchange answers: 304 means the version sent is current; any other\n * status outside 2xx rejects with the error the fetcher would have thrown.\n */\nexport async function readDescriptor(\n exchange: FetchExchange,\n version: string | undefined,\n): Promise<QueryDescriptorResult> {\n const response = exchange.requiredResponse;\n if (response.status === 304 && version !== undefined)\n return { notModified: true, version };\n if (!response.ok) throw new HttpStatusValidationError(exchange);\n const descriptor = (await response.json()) as QueryModelDescriptor;\n return { notModified: false, descriptor, version: descriptor.version };\n}\n"],"mappings":";;;;;;;AAwCA,IAAMM,IAAsB,OAAO,OAAO;CACxC,iBAAiBC;CACjB,YAAY,OAAO,OAAO,GAAGC,IAAyB,GAAK,CAAC;AAC9D,CAAC,GAOYC,IAAN,MAA6D;CAClE,YAAY,GAA2C;EAA3B,KAAA,cAAAC;CAA4B;CAExD,SAGE,GACA,GACA,GACwB;EACxB,MAAMC,EAAmBC,GAAaC,GAAYC,CAAK;CACzD;;CAGA,YAGE,GACA,GACA,GACwB;EACxB,MAAMH,EAAmBC,GAAaC,GAAYC,CAAK;CACzD;AAEF;;CArBGC,EAAIC,EAA6B,UAAUV,CAAmB;CAG5DL,EAAA,GAAAgB,EAAO,eAAe,CAAA;CACtBhB,EAAA,GAAAiB,EAAU,CAAA;;;;;;;;;CAOZH,EAAIC,EAA6B,cAAcV,CAAmB;CAGhEL,EAAA,GAAAgB,EAAO,eAAe,CAAA;CACtBhB,EAAA,GAAAiB,EAAU,CAAA;;;;;;;;sCAnBd,IAAAlB,EAAA,CAAAmB,EAAI,GAAAjB,EAAA,qBAAA,CAAA,MAAA,CAAA,CAAA,GAAAO,CAAA;AAgCL,SAAgBW,EAAkB,GAAuC;CAKvE,OAJgBC,GACZ,KAAK,CAAC,CACP,QAAQ,QAAQ,EAAE,CAAC,CACnB,QAAQ,YAAY,IAAI,KACA,KAAA;AAC7B;AAMA,SAAgBT,EAAY,GAAsC;CAChE,OAAOU,MAAY,KAAA,IAAY,KAAA,IAAY,IAAIA,EAAQ;AACzD;AAMA,eAAsBC,EACpB,GACA,GACgC;CAChC,IAAMC,IAAWC,EAAS;CAC1B,IAAID,EAAS,WAAW,OAAOF,MAAY,KAAA,GACzC,OAAO;EAAE,aAAa;EAAM;CAAQ;CACtC,IAAI,CAACE,EAAS,IAAI,MAAM,IAAIE,EAA0BD,CAAQ;CAC9D,IAAME,IAAc,MAAMH,EAAS,KAAK;CACxC,OAAO;EAAE,aAAa;EAAO;EAAY,SAASG,EAAW;CAAQ;AACvE"}
@@ -1,2 +0,0 @@
1
- var e=Object.freeze({SNAPSHOT:`snapshot/schema`,EVENT_STREAM:`event/schema`});exports.QueryDescriptorEndpointPaths=e;
2
- //# sourceMappingURL=endpointPaths.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpointPaths.cjs","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,EAA+B,OAAO,OAAO,CACxD,SAAU,kBACV,aAAc,cAChB,CAAU"}
@@ -1,4 +0,0 @@
1
- export declare const QueryDescriptorEndpointPaths: Readonly<{
2
- readonly SNAPSHOT: "snapshot/schema";
3
- readonly EVENT_STREAM: "event/schema";
4
- }>;
@@ -1,4 +0,0 @@
1
- export declare const QueryDescriptorEndpointPaths: Readonly<{
2
- readonly SNAPSHOT: "snapshot/schema";
3
- readonly EVENT_STREAM: "event/schema";
4
- }>;
@@ -1,9 +0,0 @@
1
- //#region src/client/query/descriptor/endpointPaths.ts
2
- var e = Object.freeze({
3
- SNAPSHOT: "snapshot/schema",
4
- EVENT_STREAM: "event/schema"
5
- });
6
- //#endregion
7
- export { e as QueryDescriptorEndpointPaths };
8
-
9
- //# sourceMappingURL=endpointPaths.es.js.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export * from './queryDescriptorApi.cjs';
2
- export * from './queryDescriptorClient.cjs';
@@ -1,2 +0,0 @@
1
- export * from './queryDescriptorApi.js';
2
- export * from './queryDescriptorClient.js';
@@ -1,58 +0,0 @@
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
- }
@@ -1,58 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
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"}