@ahoo-wang/wow-client 10.0.0-alpha.3 → 10.0.0-alpha.5

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,65 +0,0 @@
1
- import { bindMethods as e } from "../../bindMethods.es.js";
2
- import t from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateMetadata.es.js";
3
- import n from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorateParam.es.js";
4
- import r from "../../../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/decorate.es.js";
5
- import { LoadStateAggregateEndpointPaths as i } from "./endpointPaths.es.js";
6
- import { api as a, attribute as o, autoGeneratedError as s, get as c, path as l } from "@ahoo-wang/fetcher-decorator";
7
- //#region src/client/query/state/loadStateAggregateClient.ts
8
- var u = class {
9
- constructor(t) {
10
- this.apiMetadata = t, e(this);
11
- }
12
- load(e, t, n) {
13
- throw s(e, t, n);
14
- }
15
- /* v8 ignore stop */
16
- loadVersioned(e, t, n, r) {
17
- throw s(e, t, n, r);
18
- }
19
- /* v8 ignore stop */
20
- loadTimeBased(e, t, n, r) {
21
- throw s(e, t, n, r);
22
- }
23
- };
24
- r([
25
- c(i.LOAD),
26
- n(0, l("id")),
27
- n(1, o()),
28
- t("design:type", Function),
29
- t("design:paramtypes", [
30
- String,
31
- typeof Record > "u" ? Object : Record,
32
- Object
33
- ]),
34
- t("design:returntype", typeof Promise > "u" ? Object : Promise)
35
- ], u.prototype, "load", null), r([
36
- c(i.LOAD_VERSIONED),
37
- n(0, l("id")),
38
- n(1, l("version")),
39
- n(2, o()),
40
- t("design:type", Function),
41
- t("design:paramtypes", [
42
- String,
43
- Number,
44
- typeof Record > "u" ? Object : Record,
45
- Object
46
- ]),
47
- t("design:returntype", typeof Promise > "u" ? Object : Promise)
48
- ], u.prototype, "loadVersioned", null), r([
49
- c(i.LOAD_TIME_BASED),
50
- n(0, l("id")),
51
- n(1, l("createTime")),
52
- n(2, o()),
53
- t("design:type", Function),
54
- t("design:paramtypes", [
55
- String,
56
- Number,
57
- typeof Record > "u" ? Object : Record,
58
- Object
59
- ]),
60
- t("design:returntype", typeof Promise > "u" ? Object : Promise)
61
- ], u.prototype, "loadTimeBased", null), u = r([a(), t("design:paramtypes", [Object])], u);
62
- //#endregion
63
- export { u as LoadStateAggregateClient };
64
-
65
- //# sourceMappingURL=loadStateAggregateClient.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadStateAggregateClient.es.js","names":["_decorate","_decorateParam","_decorateMetadata","__decorateMetadata","__decorateParam","__decorate","LoadStateAggregateClient","apiMetadata","bindMethods","autoGeneratedError","id","attributes","abort","version","createTime","get","LoadStateAggregateEndpointPaths","path","attribute","api"],"sources":["../../../../src/client/query/state/loadStateAggregateClient.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 { LoadStateAggregateApi } from './loadStateAggregateApi.js';\nimport {\n api,\n attribute,\n autoGeneratedError,\n get,\n path,\n} from '@ahoo-wang/fetcher-decorator';\nimport { LoadStateAggregateEndpointPaths } from './endpointPaths.js';\nimport { bindMethods } from '../../bindMethods.js';\n\n/**\n * Loads the state of an aggregate by its ID, as the server's aggregate\n * repository loads it: the latest snapshot and the events after it, so the\n * state is current even when snapshots lag. `GET {basePath}/{id}/state` for\n * the current state, or the state at a version or a point in time. An\n * aggregate that does not exist or is deleted answers 404. It takes no\n * filter; to search, use a `SnapshotQueryClient`. Create it with\n * `QueryClientFactory.createLoadStateAggregateClient`, or with the\n * `ApiMetadata` of the aggregate's base path.\n *\n * @template S - The type of the aggregate state\n *\n * @example\n * ```typescript\n * const orders = new LoadStateAggregateClient<{ status: string }>({\n * basePath: 'order',\n * });\n * const order = await orders.load('order-1');\n * const third = await orders.loadVersioned('order-1', 3);\n * ```\n */\n@api()\nexport class LoadStateAggregateClient<S>\n implements LoadStateAggregateApi<S>, ApiMetadataCapable\n{\n constructor(public readonly apiMetadata?: ApiMetadata) {\n bindMethods(this);\n }\n\n /**\n * Loads the current state of the aggregate by its ID.\n *\n * @param id - The unique identifier of the aggregate to load\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the current state of the aggregate\n */\n @get(LoadStateAggregateEndpointPaths.LOAD)\n /* v8 ignore start */\n load(\n @path('id') id: string,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(id, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific version by its ID.\n *\n * @param id - The unique identifier of the aggregate to load\n * @param version - The version number of the aggregate state to load\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified version\n */\n @get(LoadStateAggregateEndpointPaths.LOAD_VERSIONED)\n /* v8 ignore start */\n loadVersioned(\n @path('id') id: string,\n @path('version') version: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(id, version, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific point in time by its ID.\n *\n * @param id - The unique identifier of the aggregate to load\n * @param createTime - The creation timestamp to load the aggregate state for\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified time\n */\n @get(LoadStateAggregateEndpointPaths.LOAD_TIME_BASED)\n /* v8 ignore start */\n loadTimeBased(\n @path('id') id: string,\n @path('createTime') createTime: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(id, createTime, attributes, abort);\n }\n /* v8 ignore stop */\n}\n"],"mappings":";;;;;;;AAkDO,IAAMM,IAAN,MAEP;CACE,YAAY,GAA2C;EACrD,AAD0B,KAAA,cAAAC,GAC1BC,EAAY,IAAI;CAClB;CAYA,KAGE,GACA,GACA,GACY;EACZ,MAAMC,EAAmBC,GAAIC,GAAYC,CAAK;CAChD;;CAcA,cAGE,GACA,GACA,GACA,GACY;EACZ,MAAMH,EAAmBC,GAAIG,GAASF,GAAYC,CAAK;CACzD;;CAcA,cAGE,GACA,GACA,GACA,GACY;EACZ,MAAMH,EAAmBC,GAAII,GAAYH,GAAYC,CAAK;CAC5D;AAEF;;CAxDGG,EAAIC,EAAgC,IAAI;CAGtCf,EAAA,GAAAgB,EAAK,IAAI,CAAA;CACThB,EAAA,GAAAiB,EAAU,CAAA;;;;;;;;;CAkBZH,EAAIC,EAAgC,cAAc;CAGhDf,EAAA,GAAAgB,EAAK,IAAI,CAAA;CACThB,EAAA,GAAAgB,EAAK,SAAS,CAAA;CACdhB,EAAA,GAAAiB,EAAU,CAAA;;;;;;;;;;CAkBZH,EAAIC,EAAgC,eAAe;CAGjDf,EAAA,GAAAgB,EAAK,IAAI,CAAA;CACThB,EAAA,GAAAgB,EAAK,YAAY,CAAA;CACjBhB,EAAA,GAAAiB,EAAU,CAAA;;;;;;;;;wCApEd,IAAAlB,EAAA,CAAAmB,EAAI,GAAAjB,EAAA,qBAAA,CAAA,MAAA,CAAA,CAAA,GAAAI,CAAA"}
@@ -1,2 +0,0 @@
1
- var e=function(e){return e.NONE=``,e.TENANT=`/tenant/{tenantId}`,e.OWNER=`/owner/{ownerId}`,e.TENANT_OWNER=`/tenant/{tenantId}/owner/{ownerId}`,e}({});exports.ResourceAttributionPathSpec=e;
2
- //# sourceMappingURL=routing.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routing.cjs","names":["ResourceAttributionPathSpec","\"NONE\"","\"TENANT\"","\"OWNER\"","\"TENANT_OWNER\""],"sources":["../../src/client/routing.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Interface for path parameters used in URL construction.\n * Defines common path parameters and allows for additional custom parameters.\n * This interface is used to provide path variables for URL templating.\n */\nexport interface UrlPathParams {\n /**\n * Tenant identifier parameter.\n * Used in multi-tenant applications to identify the tenant context.\n */\n tenantId?: string;\n /**\n * Owner identifier parameter.\n * Used to identify the owner or user context for the resource.\n */\n ownerId?: string;\n /**\n * Generic identifier parameter.\n * Used as a general purpose ID for resources when tenantId or ownerId are not appropriate.\n */\n id?: string;\n\n /**\n * Index signature for additional custom path parameters.\n * Allows for any additional string key-value pairs to be included as path parameters.\n */\n [key: string]: string | undefined;\n}\n\n/**\n * Enumeration of resource attribution path specifications.\n * Defines standard path patterns for accessing resources with different attribution scopes.\n * These paths are used to construct URLs that include tenant and/or owner identifiers.\n *\n * @example\n * ```typescript\n * // Using TENANT path spec\n * const tenantPath = ResourceAttributionPathSpec.TENANT; // '/tenant/{tenantId}'\n *\n * // Using TENANT_OWNER path spec\n * const tenantOwnerPath = ResourceAttributionPathSpec.TENANT_OWNER; // '/tenant/{tenantId}/owner/{ownerId}'\n * ```\n */\nexport enum ResourceAttributionPathSpec {\n NONE = '',\n TENANT = '/tenant/{tenantId}',\n OWNER = '/owner/{ownerId}',\n TENANT_OWNER = '/tenant/{tenantId}/owner/{ownerId}',\n}\n"],"mappings":"AAwDA,IAAYA,EAAL,SAAA,EAAA,OACL,GAAAC,KAAA,GACA,EAAAC,OAAA,qBACA,EAAAC,MAAA,mBACA,EAAAC,aAAA,sCACF,EAAA,CAAA,CAAA"}
@@ -1,47 +0,0 @@
1
- /**
2
- * Interface for path parameters used in URL construction.
3
- * Defines common path parameters and allows for additional custom parameters.
4
- * This interface is used to provide path variables for URL templating.
5
- */
6
- export interface UrlPathParams {
7
- /**
8
- * Tenant identifier parameter.
9
- * Used in multi-tenant applications to identify the tenant context.
10
- */
11
- tenantId?: string;
12
- /**
13
- * Owner identifier parameter.
14
- * Used to identify the owner or user context for the resource.
15
- */
16
- ownerId?: string;
17
- /**
18
- * Generic identifier parameter.
19
- * Used as a general purpose ID for resources when tenantId or ownerId are not appropriate.
20
- */
21
- id?: string;
22
- /**
23
- * Index signature for additional custom path parameters.
24
- * Allows for any additional string key-value pairs to be included as path parameters.
25
- */
26
- [key: string]: string | undefined;
27
- }
28
- /**
29
- * Enumeration of resource attribution path specifications.
30
- * Defines standard path patterns for accessing resources with different attribution scopes.
31
- * These paths are used to construct URLs that include tenant and/or owner identifiers.
32
- *
33
- * @example
34
- * ```typescript
35
- * // Using TENANT path spec
36
- * const tenantPath = ResourceAttributionPathSpec.TENANT; // '/tenant/{tenantId}'
37
- *
38
- * // Using TENANT_OWNER path spec
39
- * const tenantOwnerPath = ResourceAttributionPathSpec.TENANT_OWNER; // '/tenant/{tenantId}/owner/{ownerId}'
40
- * ```
41
- */
42
- export declare enum ResourceAttributionPathSpec {
43
- NONE = "",
44
- TENANT = "/tenant/{tenantId}",
45
- OWNER = "/owner/{ownerId}",
46
- TENANT_OWNER = "/tenant/{tenantId}/owner/{ownerId}"
47
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * Interface for path parameters used in URL construction.
3
- * Defines common path parameters and allows for additional custom parameters.
4
- * This interface is used to provide path variables for URL templating.
5
- */
6
- export interface UrlPathParams {
7
- /**
8
- * Tenant identifier parameter.
9
- * Used in multi-tenant applications to identify the tenant context.
10
- */
11
- tenantId?: string;
12
- /**
13
- * Owner identifier parameter.
14
- * Used to identify the owner or user context for the resource.
15
- */
16
- ownerId?: string;
17
- /**
18
- * Generic identifier parameter.
19
- * Used as a general purpose ID for resources when tenantId or ownerId are not appropriate.
20
- */
21
- id?: string;
22
- /**
23
- * Index signature for additional custom path parameters.
24
- * Allows for any additional string key-value pairs to be included as path parameters.
25
- */
26
- [key: string]: string | undefined;
27
- }
28
- /**
29
- * Enumeration of resource attribution path specifications.
30
- * Defines standard path patterns for accessing resources with different attribution scopes.
31
- * These paths are used to construct URLs that include tenant and/or owner identifiers.
32
- *
33
- * @example
34
- * ```typescript
35
- * // Using TENANT path spec
36
- * const tenantPath = ResourceAttributionPathSpec.TENANT; // '/tenant/{tenantId}'
37
- *
38
- * // Using TENANT_OWNER path spec
39
- * const tenantOwnerPath = ResourceAttributionPathSpec.TENANT_OWNER; // '/tenant/{tenantId}/owner/{ownerId}'
40
- * ```
41
- */
42
- export declare enum ResourceAttributionPathSpec {
43
- NONE = "",
44
- TENANT = "/tenant/{tenantId}",
45
- OWNER = "/owner/{ownerId}",
46
- TENANT_OWNER = "/tenant/{tenantId}/owner/{ownerId}"
47
- }
@@ -1,8 +0,0 @@
1
- //#region src/client/routing.ts
2
- var e = /* @__PURE__ */ function(e) {
3
- return e.NONE = "", e.TENANT = "/tenant/{tenantId}", e.OWNER = "/owner/{ownerId}", e.TENANT_OWNER = "/tenant/{tenantId}/owner/{ownerId}", e;
4
- }({});
5
- //#endregion
6
- export { e as ResourceAttributionPathSpec };
7
-
8
- //# sourceMappingURL=routing.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routing.es.js","names":["ResourceAttributionPathSpec","\"NONE\"","\"TENANT\"","\"OWNER\"","\"TENANT_OWNER\""],"sources":["../../src/client/routing.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Interface for path parameters used in URL construction.\n * Defines common path parameters and allows for additional custom parameters.\n * This interface is used to provide path variables for URL templating.\n */\nexport interface UrlPathParams {\n /**\n * Tenant identifier parameter.\n * Used in multi-tenant applications to identify the tenant context.\n */\n tenantId?: string;\n /**\n * Owner identifier parameter.\n * Used to identify the owner or user context for the resource.\n */\n ownerId?: string;\n /**\n * Generic identifier parameter.\n * Used as a general purpose ID for resources when tenantId or ownerId are not appropriate.\n */\n id?: string;\n\n /**\n * Index signature for additional custom path parameters.\n * Allows for any additional string key-value pairs to be included as path parameters.\n */\n [key: string]: string | undefined;\n}\n\n/**\n * Enumeration of resource attribution path specifications.\n * Defines standard path patterns for accessing resources with different attribution scopes.\n * These paths are used to construct URLs that include tenant and/or owner identifiers.\n *\n * @example\n * ```typescript\n * // Using TENANT path spec\n * const tenantPath = ResourceAttributionPathSpec.TENANT; // '/tenant/{tenantId}'\n *\n * // Using TENANT_OWNER path spec\n * const tenantOwnerPath = ResourceAttributionPathSpec.TENANT_OWNER; // '/tenant/{tenantId}/owner/{ownerId}'\n * ```\n */\nexport enum ResourceAttributionPathSpec {\n NONE = '',\n TENANT = '/tenant/{tenantId}',\n OWNER = '/owner/{ownerId}',\n TENANT_OWNER = '/tenant/{tenantId}/owner/{ownerId}',\n}\n"],"mappings":";AAwDA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,OAAA,IACA,EAAAC,SAAA,sBACA,EAAAC,QAAA,oBACA,EAAAC,eAAA;AACF,EAAA,CAAA,CAAA"}
@@ -1,2 +0,0 @@
1
- var e=function(e){return e.RECOVERABLE=`RECOVERABLE`,e.UNKNOWN=`UNKNOWN`,e.UNRECOVERABLE=`UNRECOVERABLE`,e}({}),t=Object.freeze({SUCCEEDED:`Ok`,NOT_FOUND:`NotFound`,BAD_REQUEST:`BadRequest`,ILLEGAL_ARGUMENT:`IllegalArgument`,ILLEGAL_STATE:`IllegalState`,REQUEST_TIMEOUT:`RequestTimeout`,TOO_MANY_REQUESTS:`TooManyRequests`,DUPLICATE_REQUEST_ID:`DuplicateRequestId`,COMMAND_VALIDATION:`CommandValidation`,REWRITE_NO_COMMAND:`RewriteNoCommand`,EVENT_VERSION_CONFLICT:`EventVersionConflict`,DUPLICATE_AGGREGATE_ID:`DuplicateAggregateId`,COMMAND_EXPECT_VERSION_CONFLICT:`CommandExpectVersionConflict`,SOURCING_VERSION_CONFLICT:`SourcingVersionConflict`,ILLEGAL_ACCESS_DELETED_AGGREGATE:`IllegalAccessDeletedAggregate`,ILLEGAL_ACCESS_OWNER_AGGREGATE:`IllegalAccessOwnerAggregate`,ILLEGAL_ACCESS_SPACE_AGGREGATE:`IllegalAccessSpaceAggregate`,ILLEGAL_ACCESS_QUERY_SCOPE:`IllegalAccessQueryScope`,INTERNAL_SERVER_ERROR:`InternalServerError`,QUERY_SCHEMA_VALIDATION:`QuerySchemaValidation`,QUERY_SCHEMA_CONFLICT:`QuerySchemaConflict`,QUERY_SCHEMA_UNAVAILABLE:`QuerySchemaUnavailable`,BATCH_TASK_ERROR:`BatchTaskError`});exports.ErrorCodes=t,exports.RecoverableType=e;
2
- //# sourceMappingURL=errorInfo.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorInfo.cjs","names":["RecoverableType","\"RECOVERABLE\"","\"UNKNOWN\"","\"UNRECOVERABLE\"","ErrorCodes"],"sources":["../../src/error/errorInfo.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 { QueryErrorCode } from './queryErrorCodes.js';\n\n/**\n * Enumerates the types of recoverability for errors or operations, allowing for classification and handling based on whether an error is transient and can be resolved by retrying.\n *\n * The [RecoverableType] enum provides a way to categorize errors into three distinct categories: [RECOVERABLE], [UNRECOVERABLE], and [UNKNOWN].\n * This categorization is essential for implementing robust error handling and retry mechanisms in applications,\n * ensuring that temporary issues are retried while permanent or unknown issues are handled appropriately.\n *\n */\nexport enum RecoverableType {\n /**\n * Represents an error type that indicates the operation or error can be retried.\n *\n * This enum value is used to classify errors in a way that allows for the implementation of retry logic. When an error\n * is marked as [RECOVERABLE], it signifies that the error condition is temporary and might be resolved upon retrying the\n * operation. This is particularly useful in scenarios where network issues, transient server errors, or other temporary\n * conditions may cause an operation to fail, but with a high likelihood of success on subsequent attempts.\n */\n RECOVERABLE = 'RECOVERABLE',\n /**\n * Represents an unknown type of recoverability for an error or operation.\n * This is used when the recoverability of an error cannot be determined or is not specified.\n */\n UNKNOWN = 'UNKNOWN',\n\n /**\n * Represents an error type that indicates the operation or error cannot be retried.\n *\n * This enum value is used to classify errors in a way that signifies the error condition is permanent and retrying the operation will not resolve the issue. It is particularly\n * useful for handling errors where the underlying problem is fundamental and cannot be resolved by simply retrying, such as invalid input, resource exhaustion, or other non-transient\n * issues.\n */\n UNRECOVERABLE = 'UNRECOVERABLE',\n}\n\n/**\n * Represents an error that occurs during the binding process, typically when data is being mapped to or from an object.\n * This class extends the [Named] interface, inheriting the `name` property which can be used to identify the source or context of the error.\n *\n * @param name The name or identifier for the context in which the error occurred.\n * @param msg A message describing the error.\n * @param code A stable, machine-readable code of the failed rule, when the server states one.\n */\nexport interface BindingError {\n name: string;\n msg: string;\n /**\n * A stable, machine-readable code of the rule that failed, when the server\n * states one: a rejected query carries one of {@link QueryErrorCodes}.\n * Absent otherwise, as for a command's validation errors.\n */\n code?: QueryErrorCode;\n}\n\n/**\n * Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.\n *\n * This interface is designed to provide a standardized way of handling and representing errors across different parts of an application. It includes methods to check if the operation was successful, retrieve the error code\n * , and access any additional error details such as messages or binding errors.\n */\nexport interface ErrorInfo {\n /**\n * Represents the error code associated with an error. This value is used to identify the type of error that has occurred,\n * which can be useful for debugging, logging, and handling errors in a standardized way.\n */\n errorCode: ErrorCode;\n /**\n * Represents the message associated with an error. This message provides a human-readable description of the error, which can be used for logging, debugging, or displaying to the user\n * .\n */\n errorMsg: string;\n /**\n * Provides a list of [BindingError] instances that occurred during the binding process.\n * Each [BindingError] contains information about the error, including its name and a message describing the issue.\n * This property returns an empty list if no binding errors are present.\n */\n bindingErrors?: BindingError[];\n}\n\n/**\n * The error codes Wow itself answers with, as `ErrorInfo.errorCode`, as the\n * `Wow-Error-Code` response header, and as the event name of an error in a\n * server-sent event stream.\n *\n * Mirrors `ErrorCodes` in `wow-core/src/main/kotlin/me/ahoo/wow/exception/ErrorCodes.kt`\n * and the query schema and batch codes the server registers beside it.\n * Applications add their own codes; {@link ErrorCode} admits those too.\n */\nexport const ErrorCodes = Object.freeze({\n /** The request succeeded. */\n SUCCEEDED: 'Ok',\n /** The requested resource does not exist (HTTP 404). */\n NOT_FOUND: 'NotFound',\n /** The request is malformed (HTTP 400). */\n BAD_REQUEST: 'BadRequest',\n /** An argument is invalid (HTTP 400). */\n ILLEGAL_ARGUMENT: 'IllegalArgument',\n /** The aggregate is in a state that refuses the command (HTTP 400). */\n ILLEGAL_STATE: 'IllegalState',\n /** The wait timed out (HTTP 408). */\n REQUEST_TIMEOUT: 'RequestTimeout',\n /** The server is rate limiting (HTTP 429). */\n TOO_MANY_REQUESTS: 'TooManyRequests',\n /** The command's request id was used before (HTTP 400). */\n DUPLICATE_REQUEST_ID: 'DuplicateRequestId',\n /** The command failed validation (HTTP 400); see `bindingErrors`. */\n COMMAND_VALIDATION: 'CommandValidation',\n /** A command rewriter produced no command. */\n REWRITE_NO_COMMAND: 'RewriteNoCommand',\n /** Another command changed the aggregate first (HTTP 409). */\n EVENT_VERSION_CONFLICT: 'EventVersionConflict',\n /** The aggregate id already exists (HTTP 400). */\n DUPLICATE_AGGREGATE_ID: 'DuplicateAggregateId',\n /** The aggregate is not at the version the command expected (HTTP 409). */\n COMMAND_EXPECT_VERSION_CONFLICT: 'CommandExpectVersionConflict',\n /** The event stream is not at the version sourcing expected (HTTP 409). */\n SOURCING_VERSION_CONFLICT: 'SourcingVersionConflict',\n /** The aggregate is deleted (HTTP 410). */\n ILLEGAL_ACCESS_DELETED_AGGREGATE: 'IllegalAccessDeletedAggregate',\n /** The aggregate belongs to another owner (HTTP 403). */\n ILLEGAL_ACCESS_OWNER_AGGREGATE: 'IllegalAccessOwnerAggregate',\n /** The aggregate belongs to another space. */\n ILLEGAL_ACCESS_SPACE_AGGREGATE: 'IllegalAccessSpaceAggregate',\n /** A query lacks the authenticated tenant scope the server requires (HTTP 403). */\n ILLEGAL_ACCESS_QUERY_SCOPE: 'IllegalAccessQueryScope',\n /** An unexpected server failure (HTTP 500). */\n INTERNAL_SERVER_ERROR: 'InternalServerError',\n /** A query does not fit the aggregate's query schema (HTTP 400). */\n QUERY_SCHEMA_VALIDATION: 'QuerySchemaValidation',\n /** The query schema conflicts with the stored one (HTTP 500). */\n QUERY_SCHEMA_CONFLICT: 'QuerySchemaConflict',\n /** The query schema is not available yet (HTTP 503). */\n QUERY_SCHEMA_UNAVAILABLE: 'QuerySchemaUnavailable',\n /** A batch task failed. */\n BATCH_TASK_ERROR: 'BatchTaskError',\n} as const);\n\n/** One of the error codes Wow itself defines; see {@link ErrorCodes}. */\nexport type WowErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];\n\n/**\n * An error code: one of Wow's own, which editors complete, or any other an\n * application defines.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type ErrorCode = WowErrorCode | (string & {});\n"],"mappings":"AAuBA,IAAYA,EAAL,SAAA,EAAA,OASL,GAAAC,YAAA,cAKA,EAAAC,QAAA,UASA,EAAAC,cAAA,iBACF,EAAA,CAAA,CAAA,EAuDaC,EAAa,OAAO,OAAO,CAEtC,UAAW,KAEX,UAAW,WAEX,YAAa,aAEb,iBAAkB,kBAElB,cAAe,eAEf,gBAAiB,iBAEjB,kBAAmB,kBAEnB,qBAAsB,qBAEtB,mBAAoB,oBAEpB,mBAAoB,mBAEpB,uBAAwB,uBAExB,uBAAwB,uBAExB,gCAAiC,+BAEjC,0BAA2B,0BAE3B,iCAAkC,gCAElC,+BAAgC,8BAEhC,+BAAgC,8BAEhC,2BAA4B,0BAE5B,sBAAuB,sBAEvB,wBAAyB,wBAEzB,sBAAuB,sBAEvB,yBAA0B,yBAE1B,iBAAkB,gBACpB,CAAU"}
@@ -1,139 +0,0 @@
1
- import { QueryErrorCode } from './queryErrorCodes.cjs';
2
- /**
3
- * Enumerates the types of recoverability for errors or operations, allowing for classification and handling based on whether an error is transient and can be resolved by retrying.
4
- *
5
- * The [RecoverableType] enum provides a way to categorize errors into three distinct categories: [RECOVERABLE], [UNRECOVERABLE], and [UNKNOWN].
6
- * This categorization is essential for implementing robust error handling and retry mechanisms in applications,
7
- * ensuring that temporary issues are retried while permanent or unknown issues are handled appropriately.
8
- *
9
- */
10
- export declare enum RecoverableType {
11
- /**
12
- * Represents an error type that indicates the operation or error can be retried.
13
- *
14
- * This enum value is used to classify errors in a way that allows for the implementation of retry logic. When an error
15
- * is marked as [RECOVERABLE], it signifies that the error condition is temporary and might be resolved upon retrying the
16
- * operation. This is particularly useful in scenarios where network issues, transient server errors, or other temporary
17
- * conditions may cause an operation to fail, but with a high likelihood of success on subsequent attempts.
18
- */
19
- RECOVERABLE = "RECOVERABLE",
20
- /**
21
- * Represents an unknown type of recoverability for an error or operation.
22
- * This is used when the recoverability of an error cannot be determined or is not specified.
23
- */
24
- UNKNOWN = "UNKNOWN",
25
- /**
26
- * Represents an error type that indicates the operation or error cannot be retried.
27
- *
28
- * This enum value is used to classify errors in a way that signifies the error condition is permanent and retrying the operation will not resolve the issue. It is particularly
29
- * useful for handling errors where the underlying problem is fundamental and cannot be resolved by simply retrying, such as invalid input, resource exhaustion, or other non-transient
30
- * issues.
31
- */
32
- UNRECOVERABLE = "UNRECOVERABLE"
33
- }
34
- /**
35
- * Represents an error that occurs during the binding process, typically when data is being mapped to or from an object.
36
- * This class extends the [Named] interface, inheriting the `name` property which can be used to identify the source or context of the error.
37
- *
38
- * @param name The name or identifier for the context in which the error occurred.
39
- * @param msg A message describing the error.
40
- * @param code A stable, machine-readable code of the failed rule, when the server states one.
41
- */
42
- export interface BindingError {
43
- name: string;
44
- msg: string;
45
- /**
46
- * A stable, machine-readable code of the rule that failed, when the server
47
- * states one: a rejected query carries one of {@link QueryErrorCodes}.
48
- * Absent otherwise, as for a command's validation errors.
49
- */
50
- code?: QueryErrorCode;
51
- }
52
- /**
53
- * Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.
54
- *
55
- * This interface is designed to provide a standardized way of handling and representing errors across different parts of an application. It includes methods to check if the operation was successful, retrieve the error code
56
- * , and access any additional error details such as messages or binding errors.
57
- */
58
- export interface ErrorInfo {
59
- /**
60
- * Represents the error code associated with an error. This value is used to identify the type of error that has occurred,
61
- * which can be useful for debugging, logging, and handling errors in a standardized way.
62
- */
63
- errorCode: ErrorCode;
64
- /**
65
- * Represents the message associated with an error. This message provides a human-readable description of the error, which can be used for logging, debugging, or displaying to the user
66
- * .
67
- */
68
- errorMsg: string;
69
- /**
70
- * Provides a list of [BindingError] instances that occurred during the binding process.
71
- * Each [BindingError] contains information about the error, including its name and a message describing the issue.
72
- * This property returns an empty list if no binding errors are present.
73
- */
74
- bindingErrors?: BindingError[];
75
- }
76
- /**
77
- * The error codes Wow itself answers with, as `ErrorInfo.errorCode`, as the
78
- * `Wow-Error-Code` response header, and as the event name of an error in a
79
- * server-sent event stream.
80
- *
81
- * Mirrors `ErrorCodes` in `wow-core/src/main/kotlin/me/ahoo/wow/exception/ErrorCodes.kt`
82
- * and the query schema and batch codes the server registers beside it.
83
- * Applications add their own codes; {@link ErrorCode} admits those too.
84
- */
85
- export declare const ErrorCodes: Readonly<{
86
- /** The request succeeded. */
87
- readonly SUCCEEDED: "Ok";
88
- /** The requested resource does not exist (HTTP 404). */
89
- readonly NOT_FOUND: "NotFound";
90
- /** The request is malformed (HTTP 400). */
91
- readonly BAD_REQUEST: "BadRequest";
92
- /** An argument is invalid (HTTP 400). */
93
- readonly ILLEGAL_ARGUMENT: "IllegalArgument";
94
- /** The aggregate is in a state that refuses the command (HTTP 400). */
95
- readonly ILLEGAL_STATE: "IllegalState";
96
- /** The wait timed out (HTTP 408). */
97
- readonly REQUEST_TIMEOUT: "RequestTimeout";
98
- /** The server is rate limiting (HTTP 429). */
99
- readonly TOO_MANY_REQUESTS: "TooManyRequests";
100
- /** The command's request id was used before (HTTP 400). */
101
- readonly DUPLICATE_REQUEST_ID: "DuplicateRequestId";
102
- /** The command failed validation (HTTP 400); see `bindingErrors`. */
103
- readonly COMMAND_VALIDATION: "CommandValidation";
104
- /** A command rewriter produced no command. */
105
- readonly REWRITE_NO_COMMAND: "RewriteNoCommand";
106
- /** Another command changed the aggregate first (HTTP 409). */
107
- readonly EVENT_VERSION_CONFLICT: "EventVersionConflict";
108
- /** The aggregate id already exists (HTTP 400). */
109
- readonly DUPLICATE_AGGREGATE_ID: "DuplicateAggregateId";
110
- /** The aggregate is not at the version the command expected (HTTP 409). */
111
- readonly COMMAND_EXPECT_VERSION_CONFLICT: "CommandExpectVersionConflict";
112
- /** The event stream is not at the version sourcing expected (HTTP 409). */
113
- readonly SOURCING_VERSION_CONFLICT: "SourcingVersionConflict";
114
- /** The aggregate is deleted (HTTP 410). */
115
- readonly ILLEGAL_ACCESS_DELETED_AGGREGATE: "IllegalAccessDeletedAggregate";
116
- /** The aggregate belongs to another owner (HTTP 403). */
117
- readonly ILLEGAL_ACCESS_OWNER_AGGREGATE: "IllegalAccessOwnerAggregate";
118
- /** The aggregate belongs to another space. */
119
- readonly ILLEGAL_ACCESS_SPACE_AGGREGATE: "IllegalAccessSpaceAggregate";
120
- /** A query lacks the authenticated tenant scope the server requires (HTTP 403). */
121
- readonly ILLEGAL_ACCESS_QUERY_SCOPE: "IllegalAccessQueryScope";
122
- /** An unexpected server failure (HTTP 500). */
123
- readonly INTERNAL_SERVER_ERROR: "InternalServerError";
124
- /** A query does not fit the aggregate's query schema (HTTP 400). */
125
- readonly QUERY_SCHEMA_VALIDATION: "QuerySchemaValidation";
126
- /** The query schema conflicts with the stored one (HTTP 500). */
127
- readonly QUERY_SCHEMA_CONFLICT: "QuerySchemaConflict";
128
- /** The query schema is not available yet (HTTP 503). */
129
- readonly QUERY_SCHEMA_UNAVAILABLE: "QuerySchemaUnavailable";
130
- /** A batch task failed. */
131
- readonly BATCH_TASK_ERROR: "BatchTaskError";
132
- }>;
133
- /** One of the error codes Wow itself defines; see {@link ErrorCodes}. */
134
- export type WowErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
135
- /**
136
- * An error code: one of Wow's own, which editors complete, or any other an
137
- * application defines.
138
- */
139
- export type ErrorCode = WowErrorCode | (string & {});
@@ -1,139 +0,0 @@
1
- import { QueryErrorCode } from './queryErrorCodes.js';
2
- /**
3
- * Enumerates the types of recoverability for errors or operations, allowing for classification and handling based on whether an error is transient and can be resolved by retrying.
4
- *
5
- * The [RecoverableType] enum provides a way to categorize errors into three distinct categories: [RECOVERABLE], [UNRECOVERABLE], and [UNKNOWN].
6
- * This categorization is essential for implementing robust error handling and retry mechanisms in applications,
7
- * ensuring that temporary issues are retried while permanent or unknown issues are handled appropriately.
8
- *
9
- */
10
- export declare enum RecoverableType {
11
- /**
12
- * Represents an error type that indicates the operation or error can be retried.
13
- *
14
- * This enum value is used to classify errors in a way that allows for the implementation of retry logic. When an error
15
- * is marked as [RECOVERABLE], it signifies that the error condition is temporary and might be resolved upon retrying the
16
- * operation. This is particularly useful in scenarios where network issues, transient server errors, or other temporary
17
- * conditions may cause an operation to fail, but with a high likelihood of success on subsequent attempts.
18
- */
19
- RECOVERABLE = "RECOVERABLE",
20
- /**
21
- * Represents an unknown type of recoverability for an error or operation.
22
- * This is used when the recoverability of an error cannot be determined or is not specified.
23
- */
24
- UNKNOWN = "UNKNOWN",
25
- /**
26
- * Represents an error type that indicates the operation or error cannot be retried.
27
- *
28
- * This enum value is used to classify errors in a way that signifies the error condition is permanent and retrying the operation will not resolve the issue. It is particularly
29
- * useful for handling errors where the underlying problem is fundamental and cannot be resolved by simply retrying, such as invalid input, resource exhaustion, or other non-transient
30
- * issues.
31
- */
32
- UNRECOVERABLE = "UNRECOVERABLE"
33
- }
34
- /**
35
- * Represents an error that occurs during the binding process, typically when data is being mapped to or from an object.
36
- * This class extends the [Named] interface, inheriting the `name` property which can be used to identify the source or context of the error.
37
- *
38
- * @param name The name or identifier for the context in which the error occurred.
39
- * @param msg A message describing the error.
40
- * @param code A stable, machine-readable code of the failed rule, when the server states one.
41
- */
42
- export interface BindingError {
43
- name: string;
44
- msg: string;
45
- /**
46
- * A stable, machine-readable code of the rule that failed, when the server
47
- * states one: a rejected query carries one of {@link QueryErrorCodes}.
48
- * Absent otherwise, as for a command's validation errors.
49
- */
50
- code?: QueryErrorCode;
51
- }
52
- /**
53
- * Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.
54
- *
55
- * This interface is designed to provide a standardized way of handling and representing errors across different parts of an application. It includes methods to check if the operation was successful, retrieve the error code
56
- * , and access any additional error details such as messages or binding errors.
57
- */
58
- export interface ErrorInfo {
59
- /**
60
- * Represents the error code associated with an error. This value is used to identify the type of error that has occurred,
61
- * which can be useful for debugging, logging, and handling errors in a standardized way.
62
- */
63
- errorCode: ErrorCode;
64
- /**
65
- * Represents the message associated with an error. This message provides a human-readable description of the error, which can be used for logging, debugging, or displaying to the user
66
- * .
67
- */
68
- errorMsg: string;
69
- /**
70
- * Provides a list of [BindingError] instances that occurred during the binding process.
71
- * Each [BindingError] contains information about the error, including its name and a message describing the issue.
72
- * This property returns an empty list if no binding errors are present.
73
- */
74
- bindingErrors?: BindingError[];
75
- }
76
- /**
77
- * The error codes Wow itself answers with, as `ErrorInfo.errorCode`, as the
78
- * `Wow-Error-Code` response header, and as the event name of an error in a
79
- * server-sent event stream.
80
- *
81
- * Mirrors `ErrorCodes` in `wow-core/src/main/kotlin/me/ahoo/wow/exception/ErrorCodes.kt`
82
- * and the query schema and batch codes the server registers beside it.
83
- * Applications add their own codes; {@link ErrorCode} admits those too.
84
- */
85
- export declare const ErrorCodes: Readonly<{
86
- /** The request succeeded. */
87
- readonly SUCCEEDED: "Ok";
88
- /** The requested resource does not exist (HTTP 404). */
89
- readonly NOT_FOUND: "NotFound";
90
- /** The request is malformed (HTTP 400). */
91
- readonly BAD_REQUEST: "BadRequest";
92
- /** An argument is invalid (HTTP 400). */
93
- readonly ILLEGAL_ARGUMENT: "IllegalArgument";
94
- /** The aggregate is in a state that refuses the command (HTTP 400). */
95
- readonly ILLEGAL_STATE: "IllegalState";
96
- /** The wait timed out (HTTP 408). */
97
- readonly REQUEST_TIMEOUT: "RequestTimeout";
98
- /** The server is rate limiting (HTTP 429). */
99
- readonly TOO_MANY_REQUESTS: "TooManyRequests";
100
- /** The command's request id was used before (HTTP 400). */
101
- readonly DUPLICATE_REQUEST_ID: "DuplicateRequestId";
102
- /** The command failed validation (HTTP 400); see `bindingErrors`. */
103
- readonly COMMAND_VALIDATION: "CommandValidation";
104
- /** A command rewriter produced no command. */
105
- readonly REWRITE_NO_COMMAND: "RewriteNoCommand";
106
- /** Another command changed the aggregate first (HTTP 409). */
107
- readonly EVENT_VERSION_CONFLICT: "EventVersionConflict";
108
- /** The aggregate id already exists (HTTP 400). */
109
- readonly DUPLICATE_AGGREGATE_ID: "DuplicateAggregateId";
110
- /** The aggregate is not at the version the command expected (HTTP 409). */
111
- readonly COMMAND_EXPECT_VERSION_CONFLICT: "CommandExpectVersionConflict";
112
- /** The event stream is not at the version sourcing expected (HTTP 409). */
113
- readonly SOURCING_VERSION_CONFLICT: "SourcingVersionConflict";
114
- /** The aggregate is deleted (HTTP 410). */
115
- readonly ILLEGAL_ACCESS_DELETED_AGGREGATE: "IllegalAccessDeletedAggregate";
116
- /** The aggregate belongs to another owner (HTTP 403). */
117
- readonly ILLEGAL_ACCESS_OWNER_AGGREGATE: "IllegalAccessOwnerAggregate";
118
- /** The aggregate belongs to another space. */
119
- readonly ILLEGAL_ACCESS_SPACE_AGGREGATE: "IllegalAccessSpaceAggregate";
120
- /** A query lacks the authenticated tenant scope the server requires (HTTP 403). */
121
- readonly ILLEGAL_ACCESS_QUERY_SCOPE: "IllegalAccessQueryScope";
122
- /** An unexpected server failure (HTTP 500). */
123
- readonly INTERNAL_SERVER_ERROR: "InternalServerError";
124
- /** A query does not fit the aggregate's query schema (HTTP 400). */
125
- readonly QUERY_SCHEMA_VALIDATION: "QuerySchemaValidation";
126
- /** The query schema conflicts with the stored one (HTTP 500). */
127
- readonly QUERY_SCHEMA_CONFLICT: "QuerySchemaConflict";
128
- /** The query schema is not available yet (HTTP 503). */
129
- readonly QUERY_SCHEMA_UNAVAILABLE: "QuerySchemaUnavailable";
130
- /** A batch task failed. */
131
- readonly BATCH_TASK_ERROR: "BatchTaskError";
132
- }>;
133
- /** One of the error codes Wow itself defines; see {@link ErrorCodes}. */
134
- export type WowErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
135
- /**
136
- * An error code: one of Wow's own, which editors complete, or any other an
137
- * application defines.
138
- */
139
- export type ErrorCode = WowErrorCode | (string & {});
@@ -1,32 +0,0 @@
1
- //#region src/error/errorInfo.ts
2
- var e = /* @__PURE__ */ function(e) {
3
- return e.RECOVERABLE = "RECOVERABLE", e.UNKNOWN = "UNKNOWN", e.UNRECOVERABLE = "UNRECOVERABLE", e;
4
- }({}), t = Object.freeze({
5
- SUCCEEDED: "Ok",
6
- NOT_FOUND: "NotFound",
7
- BAD_REQUEST: "BadRequest",
8
- ILLEGAL_ARGUMENT: "IllegalArgument",
9
- ILLEGAL_STATE: "IllegalState",
10
- REQUEST_TIMEOUT: "RequestTimeout",
11
- TOO_MANY_REQUESTS: "TooManyRequests",
12
- DUPLICATE_REQUEST_ID: "DuplicateRequestId",
13
- COMMAND_VALIDATION: "CommandValidation",
14
- REWRITE_NO_COMMAND: "RewriteNoCommand",
15
- EVENT_VERSION_CONFLICT: "EventVersionConflict",
16
- DUPLICATE_AGGREGATE_ID: "DuplicateAggregateId",
17
- COMMAND_EXPECT_VERSION_CONFLICT: "CommandExpectVersionConflict",
18
- SOURCING_VERSION_CONFLICT: "SourcingVersionConflict",
19
- ILLEGAL_ACCESS_DELETED_AGGREGATE: "IllegalAccessDeletedAggregate",
20
- ILLEGAL_ACCESS_OWNER_AGGREGATE: "IllegalAccessOwnerAggregate",
21
- ILLEGAL_ACCESS_SPACE_AGGREGATE: "IllegalAccessSpaceAggregate",
22
- ILLEGAL_ACCESS_QUERY_SCOPE: "IllegalAccessQueryScope",
23
- INTERNAL_SERVER_ERROR: "InternalServerError",
24
- QUERY_SCHEMA_VALIDATION: "QuerySchemaValidation",
25
- QUERY_SCHEMA_CONFLICT: "QuerySchemaConflict",
26
- QUERY_SCHEMA_UNAVAILABLE: "QuerySchemaUnavailable",
27
- BATCH_TASK_ERROR: "BatchTaskError"
28
- });
29
- //#endregion
30
- export { t as ErrorCodes, e as RecoverableType };
31
-
32
- //# sourceMappingURL=errorInfo.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorInfo.es.js","names":["RecoverableType","\"RECOVERABLE\"","\"UNKNOWN\"","\"UNRECOVERABLE\"","ErrorCodes"],"sources":["../../src/error/errorInfo.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 { QueryErrorCode } from './queryErrorCodes.js';\n\n/**\n * Enumerates the types of recoverability for errors or operations, allowing for classification and handling based on whether an error is transient and can be resolved by retrying.\n *\n * The [RecoverableType] enum provides a way to categorize errors into three distinct categories: [RECOVERABLE], [UNRECOVERABLE], and [UNKNOWN].\n * This categorization is essential for implementing robust error handling and retry mechanisms in applications,\n * ensuring that temporary issues are retried while permanent or unknown issues are handled appropriately.\n *\n */\nexport enum RecoverableType {\n /**\n * Represents an error type that indicates the operation or error can be retried.\n *\n * This enum value is used to classify errors in a way that allows for the implementation of retry logic. When an error\n * is marked as [RECOVERABLE], it signifies that the error condition is temporary and might be resolved upon retrying the\n * operation. This is particularly useful in scenarios where network issues, transient server errors, or other temporary\n * conditions may cause an operation to fail, but with a high likelihood of success on subsequent attempts.\n */\n RECOVERABLE = 'RECOVERABLE',\n /**\n * Represents an unknown type of recoverability for an error or operation.\n * This is used when the recoverability of an error cannot be determined or is not specified.\n */\n UNKNOWN = 'UNKNOWN',\n\n /**\n * Represents an error type that indicates the operation or error cannot be retried.\n *\n * This enum value is used to classify errors in a way that signifies the error condition is permanent and retrying the operation will not resolve the issue. It is particularly\n * useful for handling errors where the underlying problem is fundamental and cannot be resolved by simply retrying, such as invalid input, resource exhaustion, or other non-transient\n * issues.\n */\n UNRECOVERABLE = 'UNRECOVERABLE',\n}\n\n/**\n * Represents an error that occurs during the binding process, typically when data is being mapped to or from an object.\n * This class extends the [Named] interface, inheriting the `name` property which can be used to identify the source or context of the error.\n *\n * @param name The name or identifier for the context in which the error occurred.\n * @param msg A message describing the error.\n * @param code A stable, machine-readable code of the failed rule, when the server states one.\n */\nexport interface BindingError {\n name: string;\n msg: string;\n /**\n * A stable, machine-readable code of the rule that failed, when the server\n * states one: a rejected query carries one of {@link QueryErrorCodes}.\n * Absent otherwise, as for a command's validation errors.\n */\n code?: QueryErrorCode;\n}\n\n/**\n * Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.\n *\n * This interface is designed to provide a standardized way of handling and representing errors across different parts of an application. It includes methods to check if the operation was successful, retrieve the error code\n * , and access any additional error details such as messages or binding errors.\n */\nexport interface ErrorInfo {\n /**\n * Represents the error code associated with an error. This value is used to identify the type of error that has occurred,\n * which can be useful for debugging, logging, and handling errors in a standardized way.\n */\n errorCode: ErrorCode;\n /**\n * Represents the message associated with an error. This message provides a human-readable description of the error, which can be used for logging, debugging, or displaying to the user\n * .\n */\n errorMsg: string;\n /**\n * Provides a list of [BindingError] instances that occurred during the binding process.\n * Each [BindingError] contains information about the error, including its name and a message describing the issue.\n * This property returns an empty list if no binding errors are present.\n */\n bindingErrors?: BindingError[];\n}\n\n/**\n * The error codes Wow itself answers with, as `ErrorInfo.errorCode`, as the\n * `Wow-Error-Code` response header, and as the event name of an error in a\n * server-sent event stream.\n *\n * Mirrors `ErrorCodes` in `wow-core/src/main/kotlin/me/ahoo/wow/exception/ErrorCodes.kt`\n * and the query schema and batch codes the server registers beside it.\n * Applications add their own codes; {@link ErrorCode} admits those too.\n */\nexport const ErrorCodes = Object.freeze({\n /** The request succeeded. */\n SUCCEEDED: 'Ok',\n /** The requested resource does not exist (HTTP 404). */\n NOT_FOUND: 'NotFound',\n /** The request is malformed (HTTP 400). */\n BAD_REQUEST: 'BadRequest',\n /** An argument is invalid (HTTP 400). */\n ILLEGAL_ARGUMENT: 'IllegalArgument',\n /** The aggregate is in a state that refuses the command (HTTP 400). */\n ILLEGAL_STATE: 'IllegalState',\n /** The wait timed out (HTTP 408). */\n REQUEST_TIMEOUT: 'RequestTimeout',\n /** The server is rate limiting (HTTP 429). */\n TOO_MANY_REQUESTS: 'TooManyRequests',\n /** The command's request id was used before (HTTP 400). */\n DUPLICATE_REQUEST_ID: 'DuplicateRequestId',\n /** The command failed validation (HTTP 400); see `bindingErrors`. */\n COMMAND_VALIDATION: 'CommandValidation',\n /** A command rewriter produced no command. */\n REWRITE_NO_COMMAND: 'RewriteNoCommand',\n /** Another command changed the aggregate first (HTTP 409). */\n EVENT_VERSION_CONFLICT: 'EventVersionConflict',\n /** The aggregate id already exists (HTTP 400). */\n DUPLICATE_AGGREGATE_ID: 'DuplicateAggregateId',\n /** The aggregate is not at the version the command expected (HTTP 409). */\n COMMAND_EXPECT_VERSION_CONFLICT: 'CommandExpectVersionConflict',\n /** The event stream is not at the version sourcing expected (HTTP 409). */\n SOURCING_VERSION_CONFLICT: 'SourcingVersionConflict',\n /** The aggregate is deleted (HTTP 410). */\n ILLEGAL_ACCESS_DELETED_AGGREGATE: 'IllegalAccessDeletedAggregate',\n /** The aggregate belongs to another owner (HTTP 403). */\n ILLEGAL_ACCESS_OWNER_AGGREGATE: 'IllegalAccessOwnerAggregate',\n /** The aggregate belongs to another space. */\n ILLEGAL_ACCESS_SPACE_AGGREGATE: 'IllegalAccessSpaceAggregate',\n /** A query lacks the authenticated tenant scope the server requires (HTTP 403). */\n ILLEGAL_ACCESS_QUERY_SCOPE: 'IllegalAccessQueryScope',\n /** An unexpected server failure (HTTP 500). */\n INTERNAL_SERVER_ERROR: 'InternalServerError',\n /** A query does not fit the aggregate's query schema (HTTP 400). */\n QUERY_SCHEMA_VALIDATION: 'QuerySchemaValidation',\n /** The query schema conflicts with the stored one (HTTP 500). */\n QUERY_SCHEMA_CONFLICT: 'QuerySchemaConflict',\n /** The query schema is not available yet (HTTP 503). */\n QUERY_SCHEMA_UNAVAILABLE: 'QuerySchemaUnavailable',\n /** A batch task failed. */\n BATCH_TASK_ERROR: 'BatchTaskError',\n} as const);\n\n/** One of the error codes Wow itself defines; see {@link ErrorCodes}. */\nexport type WowErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];\n\n/**\n * An error code: one of Wow's own, which editors complete, or any other an\n * application defines.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type ErrorCode = WowErrorCode | (string & {});\n"],"mappings":";AAuBA,IAAYA,IAAL,yBAAA,GAAA;QASL,EAAAC,cAAA,eAKA,EAAAC,UAAA,WASA,EAAAC,gBAAA;AACF,EAAA,CAAA,CAAA,GAuDaC,IAAa,OAAO,OAAO;CAEtC,WAAW;CAEX,WAAW;CAEX,aAAa;CAEb,kBAAkB;CAElB,eAAe;CAEf,iBAAiB;CAEjB,mBAAmB;CAEnB,sBAAsB;CAEtB,oBAAoB;CAEpB,oBAAoB;CAEpB,wBAAwB;CAExB,wBAAwB;CAExB,iCAAiC;CAEjC,2BAA2B;CAE3B,kCAAkC;CAElC,gCAAgC;CAEhC,gCAAgC;CAEhC,4BAA4B;CAE5B,uBAAuB;CAEvB,yBAAyB;CAEzB,uBAAuB;CAEvB,0BAA0B;CAE1B,kBAAkB;AACpB,CAAU"}
@@ -1,2 +0,0 @@
1
- var e=Object.freeze({WOW_HEADERS_PREFIX:`Wow-`,SPACE_ID:`Wow-Space-Id`,ERROR_CODE:`Wow-Error-Code`});exports.WowHeaders=e;
2
- //# sourceMappingURL=headers.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"headers.cjs","names":["WowHeaders"],"sources":["../../src/error/headers.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * HTTP headers the Wow server shares across commands and queries.\n *\n * Mirrors `WowHeaders` in\n * `wow-rest-contract/src/main/kotlin/me/ahoo/wow/rest/WowHeaders.kt`.\n * These headers carry the `Wow-` prefix, not the `Command-` prefix of\n * {@link CommandHeaders}. Each value is a string literal type, so a header\n * object keyed by it is checked like one keyed by the literal.\n *\n * @example\n * ```typescript\n * // Send a command into a space\n * await commandClient.send({\n * path: 'owner/{ownerId}/cart/add_cart_item',\n * method: 'POST',\n * headers: { [WowHeaders.SPACE_ID]: 'store-1' },\n * body: { productId: 'p-1', quantity: 1 },\n * });\n * ```\n */\nexport const WowHeaders = Object.freeze({\n /**\n * Prefix of the headers shared across commands and queries\n */\n WOW_HEADERS_PREFIX: 'Wow-',\n\n /**\n * Space identifier request header.\n *\n * On a command route it sets the command's space; on a query route it adds\n * a space filter. It is routing data, not proof that the caller may use\n * that space. The server ignores a blank value.\n */\n SPACE_ID: 'Wow-Space-Id',\n\n /**\n * Error code response header, `Ok` when the request succeeded. A failed\n * request carries the `errorCode` of its `ErrorInfo` body here too.\n */\n ERROR_CODE: 'Wow-Error-Code',\n} as const);\n"],"mappings":"AAiCA,IAAaA,EAAa,OAAO,OAAO,CAItC,mBAAoB,OASpB,SAAU,eAMV,WAAY,gBACd,CAAU"}
@@ -1,39 +0,0 @@
1
- /**
2
- * HTTP headers the Wow server shares across commands and queries.
3
- *
4
- * Mirrors `WowHeaders` in
5
- * `wow-rest-contract/src/main/kotlin/me/ahoo/wow/rest/WowHeaders.kt`.
6
- * These headers carry the `Wow-` prefix, not the `Command-` prefix of
7
- * {@link CommandHeaders}. Each value is a string literal type, so a header
8
- * object keyed by it is checked like one keyed by the literal.
9
- *
10
- * @example
11
- * ```typescript
12
- * // Send a command into a space
13
- * await commandClient.send({
14
- * path: 'owner/{ownerId}/cart/add_cart_item',
15
- * method: 'POST',
16
- * headers: { [WowHeaders.SPACE_ID]: 'store-1' },
17
- * body: { productId: 'p-1', quantity: 1 },
18
- * });
19
- * ```
20
- */
21
- export declare const WowHeaders: Readonly<{
22
- /**
23
- * Prefix of the headers shared across commands and queries
24
- */
25
- readonly WOW_HEADERS_PREFIX: "Wow-";
26
- /**
27
- * Space identifier request header.
28
- *
29
- * On a command route it sets the command's space; on a query route it adds
30
- * a space filter. It is routing data, not proof that the caller may use
31
- * that space. The server ignores a blank value.
32
- */
33
- readonly SPACE_ID: "Wow-Space-Id";
34
- /**
35
- * Error code response header, `Ok` when the request succeeded. A failed
36
- * request carries the `errorCode` of its `ErrorInfo` body here too.
37
- */
38
- readonly ERROR_CODE: "Wow-Error-Code";
39
- }>;