@cratis/chronicle.contracts 16.45.3 → 17.0.1

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 (348) hide show
  1. package/dist/cjs/generated/captures.d.ts +208 -57
  2. package/dist/cjs/generated/captures.d.ts.map +1 -1
  3. package/dist/cjs/generated/captures.js +3209 -0
  4. package/dist/cjs/generated/captures.js.map +1 -0
  5. package/dist/cjs/generated/clients.d.ts +24 -0
  6. package/dist/cjs/generated/clients.d.ts.map +1 -1
  7. package/dist/cjs/generated/clients.js +234 -2
  8. package/dist/cjs/generated/clients.js.map +1 -1
  9. package/dist/cjs/generated/compliance.js +447 -0
  10. package/dist/cjs/generated/compliance.js.map +1 -0
  11. package/dist/cjs/generated/descriptorSet.d.ts +2 -0
  12. package/dist/cjs/generated/descriptorSet.d.ts.map +1 -0
  13. package/dist/cjs/generated/descriptorSet.js +7 -0
  14. package/dist/cjs/generated/descriptorSet.js.map +1 -0
  15. package/dist/cjs/generated/eventsequences.d.ts +33 -397
  16. package/dist/cjs/generated/eventsequences.d.ts.map +1 -1
  17. package/dist/cjs/generated/eventsequences.js +149 -4519
  18. package/dist/cjs/generated/eventsequences.js.map +1 -1
  19. package/dist/cjs/generated/eventstores.d.ts +22 -7
  20. package/dist/cjs/generated/eventstores.d.ts.map +1 -1
  21. package/dist/cjs/generated/eventstores.js +102 -13
  22. package/dist/cjs/generated/eventstores.js.map +1 -1
  23. package/dist/cjs/generated/eventtypes.d.ts +210 -0
  24. package/dist/cjs/generated/eventtypes.d.ts.map +1 -0
  25. package/dist/cjs/generated/{events.js → eventtypes.js} +855 -195
  26. package/dist/cjs/generated/eventtypes.js.map +1 -0
  27. package/dist/cjs/generated/externalservices.d.ts +159 -28
  28. package/dist/cjs/generated/externalservices.d.ts.map +1 -1
  29. package/dist/cjs/generated/externalservices.js +2928 -0
  30. package/dist/cjs/generated/externalservices.js.map +1 -0
  31. package/dist/cjs/generated/host.d.ts +1 -0
  32. package/dist/cjs/generated/host.d.ts.map +1 -1
  33. package/dist/cjs/generated/host.js +16 -1
  34. package/dist/cjs/generated/host.js.map +1 -1
  35. package/dist/cjs/generated/identities.d.ts +63 -21
  36. package/dist/cjs/generated/identities.d.ts.map +1 -1
  37. package/dist/cjs/generated/identities.js +620 -30
  38. package/dist/cjs/generated/identities.js.map +1 -1
  39. package/dist/cjs/generated/index.d.ts +35 -18
  40. package/dist/cjs/generated/index.d.ts.map +1 -1
  41. package/dist/cjs/generated/jobs.d.ts +19 -7
  42. package/dist/cjs/generated/jobs.d.ts.map +1 -1
  43. package/dist/cjs/generated/jobs.js +93 -54
  44. package/dist/cjs/generated/jobs.js.map +1 -1
  45. package/dist/cjs/generated/namespaces.d.ts +26 -7
  46. package/dist/cjs/generated/namespaces.d.ts.map +1 -1
  47. package/dist/cjs/generated/namespaces.js +164 -13
  48. package/dist/cjs/generated/namespaces.js.map +1 -1
  49. package/dist/cjs/generated/observation.d.ts +11 -1
  50. package/dist/cjs/generated/observation.d.ts.map +1 -1
  51. package/dist/cjs/generated/observation.js +66 -6
  52. package/dist/cjs/generated/observation.js.map +1 -1
  53. package/dist/cjs/generated/observation_eventstoresubscriptions.js +521 -0
  54. package/dist/cjs/generated/observation_eventstoresubscriptions.js.map +1 -0
  55. package/dist/cjs/generated/observation_reactors.d.ts +1 -3
  56. package/dist/cjs/generated/observation_reactors.d.ts.map +1 -1
  57. package/dist/cjs/generated/observation_reactors.js +1 -13
  58. package/dist/cjs/generated/observation_reactors.js.map +1 -1
  59. package/dist/cjs/generated/observation_reducers.d.ts +1 -3
  60. package/dist/cjs/generated/observation_reducers.d.ts.map +1 -1
  61. package/dist/cjs/generated/observation_reducers.js +1 -13
  62. package/dist/cjs/generated/observation_reducers.js.map +1 -1
  63. package/dist/cjs/generated/observation_webhooks.d.ts +131 -69
  64. package/dist/cjs/generated/observation_webhooks.d.ts.map +1 -1
  65. package/dist/cjs/generated/observation_webhooks.js +1171 -278
  66. package/dist/cjs/generated/observation_webhooks.js.map +1 -1
  67. package/dist/cjs/generated/patterns.d.ts +126 -34
  68. package/dist/cjs/generated/patterns.d.ts.map +1 -1
  69. package/dist/cjs/generated/patterns.js +1687 -0
  70. package/dist/cjs/generated/patterns.js.map +1 -0
  71. package/dist/cjs/generated/projectioneditor.d.ts +108 -0
  72. package/dist/cjs/generated/projectioneditor.d.ts.map +1 -0
  73. package/dist/cjs/generated/projectioneditor.js +880 -0
  74. package/dist/cjs/generated/projectioneditor.js.map +1 -0
  75. package/dist/cjs/generated/projections.d.ts +1 -43
  76. package/dist/cjs/generated/projections.d.ts.map +1 -1
  77. package/dist/cjs/generated/projections.js +16 -388
  78. package/dist/cjs/generated/projections.js.map +1 -1
  79. package/dist/cjs/generated/protobuf-net/bcl.js +97 -0
  80. package/dist/cjs/generated/protobuf-net/bcl.js.map +1 -1
  81. package/dist/cjs/generated/readmodelexplorer.d.ts +138 -0
  82. package/dist/cjs/generated/readmodelexplorer.d.ts.map +1 -0
  83. package/dist/cjs/generated/readmodelexplorer.js +1432 -0
  84. package/dist/cjs/generated/readmodelexplorer.js.map +1 -0
  85. package/dist/cjs/generated/readmodels.d.ts +1 -107
  86. package/dist/cjs/generated/readmodels.d.ts.map +1 -1
  87. package/dist/cjs/generated/readmodels.js +423 -1857
  88. package/dist/cjs/generated/readmodels.js.map +1 -1
  89. package/dist/cjs/generated/recommendations.d.ts +72 -33
  90. package/dist/cjs/generated/recommendations.d.ts.map +1 -1
  91. package/dist/cjs/generated/recommendations.js +601 -44
  92. package/dist/cjs/generated/recommendations.js.map +1 -1
  93. package/dist/cjs/generated/security.d.ts +8 -7
  94. package/dist/cjs/generated/security.d.ts.map +1 -1
  95. package/dist/cjs/generated/security.js +86 -68
  96. package/dist/cjs/generated/security.js.map +1 -1
  97. package/dist/cjs/generated/seeding.d.ts +75 -19
  98. package/dist/cjs/generated/seeding.d.ts.map +1 -1
  99. package/dist/cjs/generated/seeding.js +677 -21
  100. package/dist/cjs/generated/seeding.js.map +1 -1
  101. package/dist/cjs/generated/sequences.d.ts +774 -0
  102. package/dist/cjs/generated/sequences.d.ts.map +1 -0
  103. package/dist/cjs/generated/sequences.js +8978 -0
  104. package/dist/cjs/generated/sequences.js.map +1 -0
  105. package/dist/cjs/index.js +257 -90
  106. package/dist/cjs/index.js.map +1 -1
  107. package/dist/esm/generated/captures.d.ts +208 -57
  108. package/dist/esm/generated/captures.d.ts.map +1 -1
  109. package/dist/esm/generated/captures.js +3173 -0
  110. package/dist/esm/generated/captures.js.map +1 -0
  111. package/dist/esm/generated/clients.d.ts +24 -0
  112. package/dist/esm/generated/clients.d.ts.map +1 -1
  113. package/dist/esm/generated/clients.js +233 -2
  114. package/dist/esm/generated/clients.js.map +1 -1
  115. package/dist/esm/generated/compliance.js +441 -0
  116. package/dist/esm/generated/compliance.js.map +1 -0
  117. package/dist/esm/generated/descriptorSet.d.ts +2 -0
  118. package/dist/esm/generated/descriptorSet.d.ts.map +1 -0
  119. package/dist/esm/generated/descriptorSet.js +5 -0
  120. package/dist/esm/generated/descriptorSet.js.map +1 -0
  121. package/dist/esm/generated/eventsequences.d.ts +33 -397
  122. package/dist/esm/generated/eventsequences.d.ts.map +1 -1
  123. package/dist/esm/generated/eventsequences.js +144 -4480
  124. package/dist/esm/generated/eventsequences.js.map +1 -1
  125. package/dist/esm/generated/eventstores.d.ts +22 -7
  126. package/dist/esm/generated/eventstores.d.ts.map +1 -1
  127. package/dist/esm/generated/eventstores.js +101 -13
  128. package/dist/esm/generated/eventstores.js.map +1 -1
  129. package/dist/esm/generated/eventtypes.d.ts +210 -0
  130. package/dist/esm/generated/eventtypes.d.ts.map +1 -0
  131. package/dist/esm/generated/{events.js → eventtypes.js} +842 -192
  132. package/dist/esm/generated/eventtypes.js.map +1 -0
  133. package/dist/esm/generated/externalservices.d.ts +159 -28
  134. package/dist/esm/generated/externalservices.d.ts.map +1 -1
  135. package/dist/esm/generated/externalservices.js +2896 -0
  136. package/dist/esm/generated/externalservices.js.map +1 -0
  137. package/dist/esm/generated/host.d.ts +1 -0
  138. package/dist/esm/generated/host.d.ts.map +1 -1
  139. package/dist/esm/generated/host.js +16 -1
  140. package/dist/esm/generated/host.js.map +1 -1
  141. package/dist/esm/generated/identities.d.ts +63 -21
  142. package/dist/esm/generated/identities.d.ts.map +1 -1
  143. package/dist/esm/generated/identities.js +614 -30
  144. package/dist/esm/generated/identities.js.map +1 -1
  145. package/dist/esm/generated/index.d.ts +35 -18
  146. package/dist/esm/generated/index.d.ts.map +1 -1
  147. package/dist/esm/generated/jobs.d.ts +19 -7
  148. package/dist/esm/generated/jobs.d.ts.map +1 -1
  149. package/dist/esm/generated/jobs.js +93 -54
  150. package/dist/esm/generated/jobs.js.map +1 -1
  151. package/dist/esm/generated/namespaces.d.ts +26 -7
  152. package/dist/esm/generated/namespaces.d.ts.map +1 -1
  153. package/dist/esm/generated/namespaces.js +162 -13
  154. package/dist/esm/generated/namespaces.js.map +1 -1
  155. package/dist/esm/generated/observation.d.ts +11 -1
  156. package/dist/esm/generated/observation.d.ts.map +1 -1
  157. package/dist/esm/generated/observation.js +65 -7
  158. package/dist/esm/generated/observation.js.map +1 -1
  159. package/dist/esm/generated/observation_eventstoresubscriptions.js +513 -0
  160. package/dist/esm/generated/observation_eventstoresubscriptions.js.map +1 -0
  161. package/dist/esm/generated/observation_reactors.d.ts +1 -3
  162. package/dist/esm/generated/observation_reactors.d.ts.map +1 -1
  163. package/dist/esm/generated/observation_reactors.js +1 -13
  164. package/dist/esm/generated/observation_reactors.js.map +1 -1
  165. package/dist/esm/generated/observation_reducers.d.ts +1 -3
  166. package/dist/esm/generated/observation_reducers.d.ts.map +1 -1
  167. package/dist/esm/generated/observation_reducers.js +1 -13
  168. package/dist/esm/generated/observation_reducers.js.map +1 -1
  169. package/dist/esm/generated/observation_webhooks.d.ts +131 -69
  170. package/dist/esm/generated/observation_webhooks.d.ts.map +1 -1
  171. package/dist/esm/generated/observation_webhooks.js +1157 -270
  172. package/dist/esm/generated/observation_webhooks.js.map +1 -1
  173. package/dist/esm/generated/patterns.d.ts +126 -34
  174. package/dist/esm/generated/patterns.d.ts.map +1 -1
  175. package/dist/esm/generated/patterns.js +1669 -0
  176. package/dist/esm/generated/patterns.js.map +1 -0
  177. package/dist/esm/generated/projectioneditor.d.ts +108 -0
  178. package/dist/esm/generated/projectioneditor.d.ts.map +1 -0
  179. package/dist/esm/generated/projectioneditor.js +869 -0
  180. package/dist/esm/generated/projectioneditor.js.map +1 -0
  181. package/dist/esm/generated/projections.d.ts +1 -43
  182. package/dist/esm/generated/projections.d.ts.map +1 -1
  183. package/dist/esm/generated/projections.js +17 -385
  184. package/dist/esm/generated/projections.js.map +1 -1
  185. package/dist/esm/generated/protobuf-net/bcl.js +97 -1
  186. package/dist/esm/generated/protobuf-net/bcl.js.map +1 -1
  187. package/dist/esm/generated/readmodelexplorer.d.ts +138 -0
  188. package/dist/esm/generated/readmodelexplorer.d.ts.map +1 -0
  189. package/dist/esm/generated/readmodelexplorer.js +1415 -0
  190. package/dist/esm/generated/readmodelexplorer.js.map +1 -0
  191. package/dist/esm/generated/readmodels.d.ts +1 -107
  192. package/dist/esm/generated/readmodels.d.ts.map +1 -1
  193. package/dist/esm/generated/readmodels.js +424 -1845
  194. package/dist/esm/generated/readmodels.js.map +1 -1
  195. package/dist/esm/generated/recommendations.d.ts +72 -33
  196. package/dist/esm/generated/recommendations.d.ts.map +1 -1
  197. package/dist/esm/generated/recommendations.js +593 -42
  198. package/dist/esm/generated/recommendations.js.map +1 -1
  199. package/dist/esm/generated/security.d.ts +8 -7
  200. package/dist/esm/generated/security.d.ts.map +1 -1
  201. package/dist/esm/generated/security.js +86 -68
  202. package/dist/esm/generated/security.js.map +1 -1
  203. package/dist/esm/generated/seeding.d.ts +75 -19
  204. package/dist/esm/generated/seeding.d.ts.map +1 -1
  205. package/dist/esm/generated/seeding.js +669 -20
  206. package/dist/esm/generated/seeding.js.map +1 -1
  207. package/dist/esm/generated/sequences.d.ts +774 -0
  208. package/dist/esm/generated/sequences.d.ts.map +1 -0
  209. package/dist/esm/generated/sequences.js +8906 -0
  210. package/dist/esm/generated/sequences.js.map +1 -0
  211. package/dist/esm/index.js +24 -15
  212. package/dist/esm/index.js.map +1 -1
  213. package/dist/generated/captures.d.ts +208 -57
  214. package/dist/generated/captures.d.ts.map +1 -1
  215. package/dist/generated/captures.js +2257 -127
  216. package/dist/generated/captures.js.map +1 -1
  217. package/dist/generated/clients.d.ts +24 -0
  218. package/dist/generated/clients.d.ts.map +1 -1
  219. package/dist/generated/clients.js +232 -0
  220. package/dist/generated/clients.js.map +1 -1
  221. package/dist/generated/descriptorSet.d.ts +2 -0
  222. package/dist/generated/descriptorSet.d.ts.map +1 -0
  223. package/dist/generated/descriptorSet.js +3 -0
  224. package/dist/generated/descriptorSet.js.map +1 -0
  225. package/dist/generated/eventsequences.d.ts +33 -397
  226. package/dist/generated/eventsequences.d.ts.map +1 -1
  227. package/dist/generated/eventsequences.js +143 -4479
  228. package/dist/generated/eventsequences.js.map +1 -1
  229. package/dist/generated/eventstores.d.ts +22 -7
  230. package/dist/generated/eventstores.d.ts.map +1 -1
  231. package/dist/generated/eventstores.js +100 -12
  232. package/dist/generated/eventstores.js.map +1 -1
  233. package/dist/generated/eventtypes.d.ts +210 -0
  234. package/dist/generated/eventtypes.d.ts.map +1 -0
  235. package/dist/generated/{events.js → eventtypes.js} +842 -192
  236. package/dist/generated/eventtypes.js.map +1 -0
  237. package/dist/generated/externalservices.d.ts +159 -28
  238. package/dist/generated/externalservices.d.ts.map +1 -1
  239. package/dist/generated/externalservices.js +1951 -390
  240. package/dist/generated/externalservices.js.map +1 -1
  241. package/dist/generated/host.d.ts +1 -0
  242. package/dist/generated/host.d.ts.map +1 -1
  243. package/dist/generated/host.js +16 -1
  244. package/dist/generated/host.js.map +1 -1
  245. package/dist/generated/identities.d.ts +63 -21
  246. package/dist/generated/identities.d.ts.map +1 -1
  247. package/dist/generated/identities.js +613 -29
  248. package/dist/generated/identities.js.map +1 -1
  249. package/dist/generated/index.d.ts +35 -18
  250. package/dist/generated/index.d.ts.map +1 -1
  251. package/dist/generated/index.js +24 -15
  252. package/dist/generated/index.js.map +1 -1
  253. package/dist/generated/jobs.d.ts +19 -7
  254. package/dist/generated/jobs.d.ts.map +1 -1
  255. package/dist/generated/jobs.js +92 -53
  256. package/dist/generated/jobs.js.map +1 -1
  257. package/dist/generated/namespaces.d.ts +26 -7
  258. package/dist/generated/namespaces.d.ts.map +1 -1
  259. package/dist/generated/namespaces.js +161 -12
  260. package/dist/generated/namespaces.js.map +1 -1
  261. package/dist/generated/observation.d.ts +11 -1
  262. package/dist/generated/observation.d.ts.map +1 -1
  263. package/dist/generated/observation.js +64 -6
  264. package/dist/generated/observation.js.map +1 -1
  265. package/dist/generated/observation_reactors.d.ts +1 -3
  266. package/dist/generated/observation_reactors.d.ts.map +1 -1
  267. package/dist/generated/observation_reactors.js +1 -13
  268. package/dist/generated/observation_reactors.js.map +1 -1
  269. package/dist/generated/observation_reducers.d.ts +1 -3
  270. package/dist/generated/observation_reducers.d.ts.map +1 -1
  271. package/dist/generated/observation_reducers.js +1 -13
  272. package/dist/generated/observation_reducers.js.map +1 -1
  273. package/dist/generated/observation_webhooks.d.ts +131 -69
  274. package/dist/generated/observation_webhooks.d.ts.map +1 -1
  275. package/dist/generated/observation_webhooks.js +1156 -269
  276. package/dist/generated/observation_webhooks.js.map +1 -1
  277. package/dist/generated/patterns.d.ts +126 -34
  278. package/dist/generated/patterns.d.ts.map +1 -1
  279. package/dist/generated/patterns.js +1196 -303
  280. package/dist/generated/patterns.js.map +1 -1
  281. package/dist/generated/projectioneditor.d.ts +108 -0
  282. package/dist/generated/projectioneditor.d.ts.map +1 -0
  283. package/dist/generated/projectioneditor.js +867 -0
  284. package/dist/generated/projectioneditor.js.map +1 -0
  285. package/dist/generated/projections.d.ts +1 -43
  286. package/dist/generated/projections.d.ts.map +1 -1
  287. package/dist/generated/projections.js +16 -384
  288. package/dist/generated/projections.js.map +1 -1
  289. package/dist/generated/readmodelexplorer.d.ts +138 -0
  290. package/dist/generated/readmodelexplorer.d.ts.map +1 -0
  291. package/dist/generated/readmodelexplorer.js +1413 -0
  292. package/dist/generated/readmodelexplorer.js.map +1 -0
  293. package/dist/generated/readmodels.d.ts +1 -107
  294. package/dist/generated/readmodels.d.ts.map +1 -1
  295. package/dist/generated/readmodels.js +423 -1844
  296. package/dist/generated/readmodels.js.map +1 -1
  297. package/dist/generated/recommendations.d.ts +72 -33
  298. package/dist/generated/recommendations.d.ts.map +1 -1
  299. package/dist/generated/recommendations.js +592 -41
  300. package/dist/generated/recommendations.js.map +1 -1
  301. package/dist/generated/security.d.ts +8 -7
  302. package/dist/generated/security.d.ts.map +1 -1
  303. package/dist/generated/security.js +85 -67
  304. package/dist/generated/security.js.map +1 -1
  305. package/dist/generated/seeding.d.ts +75 -19
  306. package/dist/generated/seeding.d.ts.map +1 -1
  307. package/dist/generated/seeding.js +668 -19
  308. package/dist/generated/seeding.js.map +1 -1
  309. package/dist/generated/sequences.d.ts +774 -0
  310. package/dist/generated/sequences.d.ts.map +1 -0
  311. package/dist/generated/sequences.js +8904 -0
  312. package/dist/generated/sequences.js.map +1 -0
  313. package/dist/tsconfig.tsbuildinfo +1 -1
  314. package/generated/captures.ts +2690 -196
  315. package/generated/clients.ts +274 -0
  316. package/generated/descriptorSet.ts +14 -0
  317. package/generated/eventsequences.ts +219 -5200
  318. package/generated/eventstores.ts +228 -110
  319. package/generated/{events.ts → eventtypes.ts} +1014 -257
  320. package/generated/externalservices.ts +2218 -392
  321. package/generated/host.ts +18 -1
  322. package/generated/identities.ts +739 -54
  323. package/generated/index.ts +44 -18
  324. package/generated/jobs.ts +115 -64
  325. package/generated/namespaces.ts +208 -22
  326. package/generated/observation.ts +68 -6
  327. package/generated/observation_reactors.ts +1 -14
  328. package/generated/observation_reducers.ts +1 -14
  329. package/generated/observation_webhooks.ts +1414 -393
  330. package/generated/patterns.ts +1363 -298
  331. package/generated/projectioneditor.ts +1045 -0
  332. package/generated/projections.ts +18 -465
  333. package/generated/readmodelexplorer.ts +1670 -0
  334. package/generated/readmodels.ts +128 -1758
  335. package/generated/recommendations.ts +731 -75
  336. package/generated/security.ts +100 -79
  337. package/generated/seeding.ts +795 -43
  338. package/generated/sequences.ts +10341 -0
  339. package/package.json +2 -2
  340. package/dist/cjs/generated/events.d.ts +0 -152
  341. package/dist/cjs/generated/events.d.ts.map +0 -1
  342. package/dist/cjs/generated/events.js.map +0 -1
  343. package/dist/esm/generated/events.d.ts +0 -152
  344. package/dist/esm/generated/events.d.ts.map +0 -1
  345. package/dist/esm/generated/events.js.map +0 -1
  346. package/dist/generated/events.d.ts +0 -152
  347. package/dist/generated/events.d.ts.map +0 -1
  348. package/dist/generated/events.js.map +0 -1
@@ -7,7 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
9
  import type { CallContext, CallOptions } from "nice-grpc-common";
10
- import { Empty } from "./google/protobuf/empty";
10
+ import { Guid } from "./protobuf-net/bcl";
11
11
 
12
12
  export const protobufPackage = "Cratis.Chronicle.Contracts.Captures";
13
13
 
@@ -44,7 +44,91 @@ export function captureStatusToJSON(object: CaptureStatus): string {
44
44
  }
45
45
  }
46
46
 
47
- export interface Capture {
47
+ export enum EventObservationState {
48
+ None = 0,
49
+ Initial = 1,
50
+ Replay = 2,
51
+ UNRECOGNIZED = -1,
52
+ }
53
+
54
+ export function eventObservationStateFromJSON(object: any): EventObservationState {
55
+ switch (object) {
56
+ case 0:
57
+ case "None":
58
+ return EventObservationState.None;
59
+ case 1:
60
+ case "Initial":
61
+ return EventObservationState.Initial;
62
+ case 2:
63
+ case "Replay":
64
+ return EventObservationState.Replay;
65
+ case -1:
66
+ case "UNRECOGNIZED":
67
+ default:
68
+ return EventObservationState.UNRECOGNIZED;
69
+ }
70
+ }
71
+
72
+ export function eventObservationStateToJSON(object: EventObservationState): string {
73
+ switch (object) {
74
+ case EventObservationState.None:
75
+ return "None";
76
+ case EventObservationState.Initial:
77
+ return "Initial";
78
+ case EventObservationState.Replay:
79
+ return "Replay";
80
+ case EventObservationState.UNRECOGNIZED:
81
+ default:
82
+ return "UNRECOGNIZED";
83
+ }
84
+ }
85
+
86
+ export enum ValidationResultSeverity {
87
+ Unknown = 0,
88
+ Information = 1,
89
+ Warning = 2,
90
+ Error = 3,
91
+ UNRECOGNIZED = -1,
92
+ }
93
+
94
+ export function validationResultSeverityFromJSON(object: any): ValidationResultSeverity {
95
+ switch (object) {
96
+ case 0:
97
+ case "Unknown":
98
+ return ValidationResultSeverity.Unknown;
99
+ case 1:
100
+ case "Information":
101
+ return ValidationResultSeverity.Information;
102
+ case 2:
103
+ case "Warning":
104
+ return ValidationResultSeverity.Warning;
105
+ case 3:
106
+ case "Error":
107
+ return ValidationResultSeverity.Error;
108
+ case -1:
109
+ case "UNRECOGNIZED":
110
+ default:
111
+ return ValidationResultSeverity.UNRECOGNIZED;
112
+ }
113
+ }
114
+
115
+ export function validationResultSeverityToJSON(object: ValidationResultSeverity): string {
116
+ switch (object) {
117
+ case ValidationResultSeverity.Unknown:
118
+ return "Unknown";
119
+ case ValidationResultSeverity.Information:
120
+ return "Information";
121
+ case ValidationResultSeverity.Warning:
122
+ return "Warning";
123
+ case ValidationResultSeverity.Error:
124
+ return "Error";
125
+ case ValidationResultSeverity.UNRECOGNIZED:
126
+ default:
127
+ return "UNRECOGNIZED";
128
+ }
129
+ }
130
+
131
+ export interface CaptureDetailsResponse {
48
132
  Id: string;
49
133
  Name: string;
50
134
  Declaration: string;
@@ -57,45 +141,191 @@ export interface CaptureValidationMessage {
57
141
  Column: number;
58
142
  }
59
143
 
60
- export interface DeleteCapture {
144
+ export interface CapturedEventResponse {
145
+ Context: EventContext | undefined;
146
+ Content: string;
147
+ Id: string;
148
+ }
149
+
150
+ export interface CapturedEventsRequest {
151
+ EventStore: string;
152
+ CaptureName: string;
153
+ Namespace: string;
154
+ MaxEvents: number;
155
+ }
156
+
157
+ export interface Causation {
158
+ Occurred: SerializableDateTimeOffset | undefined;
159
+ Type: string;
160
+ Properties: { [key: string]: string };
161
+ }
162
+
163
+ export interface Causation_PropertiesEntry {
164
+ key: string;
165
+ value: string;
166
+ }
167
+
168
+ export interface CommandResult {
169
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
170
+ CorrelationId:
171
+ | Guid
172
+ | undefined;
173
+ /** default value could not be applied: True */
174
+ IsAuthorized: boolean;
175
+ ValidationResults: ValidationResult[];
176
+ ExceptionMessages: string[];
177
+ ExceptionStackTrace: string;
178
+ AuthorizationFailureReason: string;
179
+ }
180
+
181
+ export interface CommandResultSaveCaptureResponse {
182
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
183
+ CorrelationId:
184
+ | Guid
185
+ | undefined;
186
+ /** default value could not be applied: True */
187
+ IsAuthorized: boolean;
188
+ ValidationResults: ValidationResult[];
189
+ ExceptionMessages: string[];
190
+ ExceptionStackTrace: string;
191
+ AuthorizationFailureReason: string;
192
+ Response: SaveCaptureResponse | undefined;
193
+ }
194
+
195
+ export interface CommandResultStartCaptureResponse {
196
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
197
+ CorrelationId:
198
+ | Guid
199
+ | undefined;
200
+ /** default value could not be applied: True */
201
+ IsAuthorized: boolean;
202
+ ValidationResults: ValidationResult[];
203
+ ExceptionMessages: string[];
204
+ ExceptionStackTrace: string;
205
+ AuthorizationFailureReason: string;
206
+ Response: StartCaptureResponse | undefined;
207
+ }
208
+
209
+ export interface CommandResultValidateCaptureDeclarationResponse {
210
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
211
+ CorrelationId:
212
+ | Guid
213
+ | undefined;
214
+ /** default value could not be applied: True */
215
+ IsAuthorized: boolean;
216
+ ValidationResults: ValidationResult[];
217
+ ExceptionMessages: string[];
218
+ ExceptionStackTrace: string;
219
+ AuthorizationFailureReason: string;
220
+ Response: ValidateCaptureDeclarationResponse | undefined;
221
+ }
222
+
223
+ export interface DeleteCaptureRequest {
224
+ EventStore: string;
225
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
226
+ CaptureId: Guid | undefined;
227
+ }
228
+
229
+ export interface EventContext {
230
+ EventType: EventType | undefined;
231
+ EventSourceType: string;
232
+ EventSourceId: string;
233
+ SequenceNumber: bigint;
234
+ EventStreamType: string;
235
+ EventStreamId: string;
236
+ Occurred: SerializableDateTimeOffset | undefined;
61
237
  EventStore: string;
238
+ Namespace: string;
239
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
240
+ CorrelationId: Guid | undefined;
241
+ Causation: Causation[];
242
+ CausedBy: Identity | undefined;
243
+ ObservationState: EventObservationState;
244
+ Tags: string[];
245
+ Hash: string;
246
+ }
247
+
248
+ export interface EventType {
62
249
  Id: string;
250
+ Generation: number;
251
+ Tombstone: boolean;
63
252
  }
64
253
 
65
254
  export interface GetCapturesRequest {
66
255
  EventStore: string;
67
256
  }
68
257
 
69
- export interface IEnumerableCapture {
70
- items: Capture[];
258
+ export interface Identity {
259
+ Subject: string;
260
+ Name: string;
261
+ UserName: string;
262
+ OnBehalfOf: Identity | undefined;
71
263
  }
72
264
 
73
- export interface SaveCapture {
265
+ export interface ObserveCapturesRequest {
74
266
  EventStore: string;
75
- Id: string;
267
+ }
268
+
269
+ export interface QueryResultIEnumerableCaptureDetailsResponse {
270
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
271
+ CorrelationId:
272
+ | Guid
273
+ | undefined;
274
+ /** default value could not be applied: True */
275
+ IsAuthorized: boolean;
276
+ ValidationResults: ValidationResult[];
277
+ ExceptionMessages: string[];
278
+ ExceptionStackTrace: string;
279
+ Data: CaptureDetailsResponse[];
280
+ }
281
+
282
+ export interface QueryResultIEnumerableCapturedEventResponse {
283
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
284
+ CorrelationId:
285
+ | Guid
286
+ | undefined;
287
+ /** default value could not be applied: True */
288
+ IsAuthorized: boolean;
289
+ ValidationResults: ValidationResult[];
290
+ ExceptionMessages: string[];
291
+ ExceptionStackTrace: string;
292
+ Data: CapturedEventResponse[];
293
+ }
294
+
295
+ export interface SaveCaptureRequest {
296
+ EventStore: string;
297
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
298
+ Id: Guid | undefined;
76
299
  Declaration: string;
77
300
  }
78
301
 
79
302
  export interface SaveCaptureResponse {
80
- Capture: Capture | undefined;
303
+ Capture: CaptureDetailsResponse | undefined;
81
304
  Messages: CaptureValidationMessage[];
82
305
  }
83
306
 
84
- export interface StartCapture {
307
+ /** Represents a DateTimeOffset value as an ISO 8601 string (e.g., "2024-01-15T12:30:00.0000000+02:00"). */
308
+ export interface SerializableDateTimeOffset {
309
+ Value: string;
310
+ }
311
+
312
+ export interface StartCaptureRequest {
85
313
  EventStore: string;
86
- Id: string;
314
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
315
+ CaptureId: Guid | undefined;
87
316
  }
88
317
 
89
318
  export interface StartCaptureResponse {
90
319
  Messages: CaptureValidationMessage[];
91
320
  }
92
321
 
93
- export interface StopCapture {
322
+ export interface StopCaptureRequest {
94
323
  EventStore: string;
95
- Id: string;
324
+ /** default value could not be applied: 00000000-0000-0000-0000-000000000000 */
325
+ CaptureId: Guid | undefined;
96
326
  }
97
327
 
98
- export interface ValidateCaptureDeclaration {
328
+ export interface ValidateCaptureDeclarationRequest {
99
329
  EventStore: string;
100
330
  Declaration: string;
101
331
  }
@@ -104,12 +334,19 @@ export interface ValidateCaptureDeclarationResponse {
104
334
  Messages: CaptureValidationMessage[];
105
335
  }
106
336
 
107
- function createBaseCapture(): Capture {
337
+ export interface ValidationResult {
338
+ /** default value could not be applied: Error */
339
+ Severity: ValidationResultSeverity;
340
+ Message: string;
341
+ Members: string[];
342
+ }
343
+
344
+ function createBaseCaptureDetailsResponse(): CaptureDetailsResponse {
108
345
  return { Id: "", Name: "", Declaration: "", Status: 0 };
109
346
  }
110
347
 
111
- export const Capture: MessageFns<Capture> = {
112
- encode(message: Capture, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
348
+ export const CaptureDetailsResponse: MessageFns<CaptureDetailsResponse> = {
349
+ encode(message: CaptureDetailsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
113
350
  if (message.Id !== "") {
114
351
  writer.uint32(10).string(message.Id);
115
352
  }
@@ -125,7 +362,7 @@ export const Capture: MessageFns<Capture> = {
125
362
  return writer;
126
363
  },
127
364
 
128
- decode(input: BinaryReader | Uint8Array, length?: number): Capture {
365
+ decode(input: BinaryReader | Uint8Array, length?: number): CaptureDetailsResponse {
129
366
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
130
367
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
131
368
  if (previousRecursionDepth >= 100) {
@@ -134,7 +371,7 @@ export const Capture: MessageFns<Capture> = {
134
371
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
135
372
  try {
136
373
  const end = length === undefined ? reader.len : reader.pos + length;
137
- const message = createBaseCapture();
374
+ const message = createBaseCaptureDetailsResponse();
138
375
  while (reader.pos < end) {
139
376
  const tag = reader.uint32();
140
377
  switch (tag >>> 3) {
@@ -182,7 +419,7 @@ export const Capture: MessageFns<Capture> = {
182
419
  }
183
420
  },
184
421
 
185
- fromJSON(object: any): Capture {
422
+ fromJSON(object: any): CaptureDetailsResponse {
186
423
  return {
187
424
  Id: isSet(object.Id) ? globalThis.String(object.Id) : "",
188
425
  Name: isSet(object.Name) ? globalThis.String(object.Name) : "",
@@ -191,7 +428,7 @@ export const Capture: MessageFns<Capture> = {
191
428
  };
192
429
  },
193
430
 
194
- toJSON(message: Capture): unknown {
431
+ toJSON(message: CaptureDetailsResponse): unknown {
195
432
  const obj: any = {};
196
433
  if (message.Id !== "") {
197
434
  obj.Id = message.Id;
@@ -208,11 +445,11 @@ export const Capture: MessageFns<Capture> = {
208
445
  return obj;
209
446
  },
210
447
 
211
- create(base?: DeepPartial<Capture>): Capture {
212
- return Capture.fromPartial(base ?? {});
448
+ create(base?: DeepPartial<CaptureDetailsResponse>): CaptureDetailsResponse {
449
+ return CaptureDetailsResponse.fromPartial(base ?? {});
213
450
  },
214
- fromPartial(object: DeepPartial<Capture>): Capture {
215
- const message = createBaseCapture();
451
+ fromPartial(object: DeepPartial<CaptureDetailsResponse>): CaptureDetailsResponse {
452
+ const message = createBaseCaptureDetailsResponse();
216
453
  message.Id = object.Id ?? "";
217
454
  message.Name = object.Name ?? "";
218
455
  message.Declaration = object.Declaration ?? "";
@@ -322,22 +559,25 @@ export const CaptureValidationMessage: MessageFns<CaptureValidationMessage> = {
322
559
  },
323
560
  };
324
561
 
325
- function createBaseDeleteCapture(): DeleteCapture {
326
- return { EventStore: "", Id: "" };
562
+ function createBaseCapturedEventResponse(): CapturedEventResponse {
563
+ return { Context: undefined, Content: "", Id: "" };
327
564
  }
328
565
 
329
- export const DeleteCapture: MessageFns<DeleteCapture> = {
330
- encode(message: DeleteCapture, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
331
- if (message.EventStore !== "") {
332
- writer.uint32(10).string(message.EventStore);
566
+ export const CapturedEventResponse: MessageFns<CapturedEventResponse> = {
567
+ encode(message: CapturedEventResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
568
+ if (message.Context !== undefined) {
569
+ EventContext.encode(message.Context, writer.uint32(10).fork()).join();
570
+ }
571
+ if (message.Content !== "") {
572
+ writer.uint32(18).string(message.Content);
333
573
  }
334
574
  if (message.Id !== "") {
335
- writer.uint32(18).string(message.Id);
575
+ writer.uint32(26).string(message.Id);
336
576
  }
337
577
  return writer;
338
578
  },
339
579
 
340
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteCapture {
580
+ decode(input: BinaryReader | Uint8Array, length?: number): CapturedEventResponse {
341
581
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
342
582
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
343
583
  if (previousRecursionDepth >= 100) {
@@ -346,7 +586,7 @@ export const DeleteCapture: MessageFns<DeleteCapture> = {
346
586
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
347
587
  try {
348
588
  const end = length === undefined ? reader.len : reader.pos + length;
349
- const message = createBaseDeleteCapture();
589
+ const message = createBaseCapturedEventResponse();
350
590
  while (reader.pos < end) {
351
591
  const tag = reader.uint32();
352
592
  switch (tag >>> 3) {
@@ -355,7 +595,7 @@ export const DeleteCapture: MessageFns<DeleteCapture> = {
355
595
  break;
356
596
  }
357
597
 
358
- message.EventStore = reader.string();
598
+ message.Context = EventContext.decode(reader, reader.uint32());
359
599
  continue;
360
600
  }
361
601
  case 2: {
@@ -363,6 +603,14 @@ export const DeleteCapture: MessageFns<DeleteCapture> = {
363
603
  break;
364
604
  }
365
605
 
606
+ message.Content = reader.string();
607
+ continue;
608
+ }
609
+ case 3: {
610
+ if (tag !== 26) {
611
+ break;
612
+ }
613
+
366
614
  message.Id = reader.string();
367
615
  continue;
368
616
  }
@@ -378,17 +626,21 @@ export const DeleteCapture: MessageFns<DeleteCapture> = {
378
626
  }
379
627
  },
380
628
 
381
- fromJSON(object: any): DeleteCapture {
629
+ fromJSON(object: any): CapturedEventResponse {
382
630
  return {
383
- EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
631
+ Context: isSet(object.Context) ? EventContext.fromJSON(object.Context) : undefined,
632
+ Content: isSet(object.Content) ? globalThis.String(object.Content) : "",
384
633
  Id: isSet(object.Id) ? globalThis.String(object.Id) : "",
385
634
  };
386
635
  },
387
636
 
388
- toJSON(message: DeleteCapture): unknown {
637
+ toJSON(message: CapturedEventResponse): unknown {
389
638
  const obj: any = {};
390
- if (message.EventStore !== "") {
391
- obj.EventStore = message.EventStore;
639
+ if (message.Context !== undefined) {
640
+ obj.Context = EventContext.toJSON(message.Context);
641
+ }
642
+ if (message.Content !== "") {
643
+ obj.Content = message.Content;
392
644
  }
393
645
  if (message.Id !== "") {
394
646
  obj.Id = message.Id;
@@ -396,30 +648,42 @@ export const DeleteCapture: MessageFns<DeleteCapture> = {
396
648
  return obj;
397
649
  },
398
650
 
399
- create(base?: DeepPartial<DeleteCapture>): DeleteCapture {
400
- return DeleteCapture.fromPartial(base ?? {});
651
+ create(base?: DeepPartial<CapturedEventResponse>): CapturedEventResponse {
652
+ return CapturedEventResponse.fromPartial(base ?? {});
401
653
  },
402
- fromPartial(object: DeepPartial<DeleteCapture>): DeleteCapture {
403
- const message = createBaseDeleteCapture();
404
- message.EventStore = object.EventStore ?? "";
654
+ fromPartial(object: DeepPartial<CapturedEventResponse>): CapturedEventResponse {
655
+ const message = createBaseCapturedEventResponse();
656
+ message.Context = (object.Context !== undefined && object.Context !== null)
657
+ ? EventContext.fromPartial(object.Context)
658
+ : undefined;
659
+ message.Content = object.Content ?? "";
405
660
  message.Id = object.Id ?? "";
406
661
  return message;
407
662
  },
408
663
  };
409
664
 
410
- function createBaseGetCapturesRequest(): GetCapturesRequest {
411
- return { EventStore: "" };
665
+ function createBaseCapturedEventsRequest(): CapturedEventsRequest {
666
+ return { EventStore: "", CaptureName: "", Namespace: "", MaxEvents: 0 };
412
667
  }
413
668
 
414
- export const GetCapturesRequest: MessageFns<GetCapturesRequest> = {
415
- encode(message: GetCapturesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
669
+ export const CapturedEventsRequest: MessageFns<CapturedEventsRequest> = {
670
+ encode(message: CapturedEventsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
416
671
  if (message.EventStore !== "") {
417
672
  writer.uint32(10).string(message.EventStore);
418
673
  }
674
+ if (message.CaptureName !== "") {
675
+ writer.uint32(18).string(message.CaptureName);
676
+ }
677
+ if (message.Namespace !== "") {
678
+ writer.uint32(26).string(message.Namespace);
679
+ }
680
+ if (message.MaxEvents !== 0) {
681
+ writer.uint32(32).int32(message.MaxEvents);
682
+ }
419
683
  return writer;
420
684
  },
421
685
 
422
- decode(input: BinaryReader | Uint8Array, length?: number): GetCapturesRequest {
686
+ decode(input: BinaryReader | Uint8Array, length?: number): CapturedEventsRequest {
423
687
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
424
688
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
425
689
  if (previousRecursionDepth >= 100) {
@@ -428,7 +692,1845 @@ export const GetCapturesRequest: MessageFns<GetCapturesRequest> = {
428
692
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
429
693
  try {
430
694
  const end = length === undefined ? reader.len : reader.pos + length;
431
- const message = createBaseGetCapturesRequest();
695
+ const message = createBaseCapturedEventsRequest();
696
+ while (reader.pos < end) {
697
+ const tag = reader.uint32();
698
+ switch (tag >>> 3) {
699
+ case 1: {
700
+ if (tag !== 10) {
701
+ break;
702
+ }
703
+
704
+ message.EventStore = reader.string();
705
+ continue;
706
+ }
707
+ case 2: {
708
+ if (tag !== 18) {
709
+ break;
710
+ }
711
+
712
+ message.CaptureName = reader.string();
713
+ continue;
714
+ }
715
+ case 3: {
716
+ if (tag !== 26) {
717
+ break;
718
+ }
719
+
720
+ message.Namespace = reader.string();
721
+ continue;
722
+ }
723
+ case 4: {
724
+ if (tag !== 32) {
725
+ break;
726
+ }
727
+
728
+ message.MaxEvents = reader.int32();
729
+ continue;
730
+ }
731
+ }
732
+ if ((tag & 7) === 4 || tag === 0) {
733
+ break;
734
+ }
735
+ reader.skip(tag & 7);
736
+ }
737
+ return message;
738
+ } finally {
739
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
740
+ }
741
+ },
742
+
743
+ fromJSON(object: any): CapturedEventsRequest {
744
+ return {
745
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
746
+ CaptureName: isSet(object.CaptureName) ? globalThis.String(object.CaptureName) : "",
747
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
748
+ MaxEvents: isSet(object.MaxEvents) ? globalThis.Number(object.MaxEvents) : 0,
749
+ };
750
+ },
751
+
752
+ toJSON(message: CapturedEventsRequest): unknown {
753
+ const obj: any = {};
754
+ if (message.EventStore !== "") {
755
+ obj.EventStore = message.EventStore;
756
+ }
757
+ if (message.CaptureName !== "") {
758
+ obj.CaptureName = message.CaptureName;
759
+ }
760
+ if (message.Namespace !== "") {
761
+ obj.Namespace = message.Namespace;
762
+ }
763
+ if (message.MaxEvents !== 0) {
764
+ obj.MaxEvents = Math.round(message.MaxEvents);
765
+ }
766
+ return obj;
767
+ },
768
+
769
+ create(base?: DeepPartial<CapturedEventsRequest>): CapturedEventsRequest {
770
+ return CapturedEventsRequest.fromPartial(base ?? {});
771
+ },
772
+ fromPartial(object: DeepPartial<CapturedEventsRequest>): CapturedEventsRequest {
773
+ const message = createBaseCapturedEventsRequest();
774
+ message.EventStore = object.EventStore ?? "";
775
+ message.CaptureName = object.CaptureName ?? "";
776
+ message.Namespace = object.Namespace ?? "";
777
+ message.MaxEvents = object.MaxEvents ?? 0;
778
+ return message;
779
+ },
780
+ };
781
+
782
+ function createBaseCausation(): Causation {
783
+ return { Occurred: undefined, Type: "", Properties: {} };
784
+ }
785
+
786
+ export const Causation: MessageFns<Causation> = {
787
+ encode(message: Causation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
788
+ if (message.Occurred !== undefined) {
789
+ SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(10).fork()).join();
790
+ }
791
+ if (message.Type !== "") {
792
+ writer.uint32(18).string(message.Type);
793
+ }
794
+ globalThis.Object.entries(message.Properties).forEach(([key, value]: [string, string]) => {
795
+ Causation_PropertiesEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join();
796
+ });
797
+ return writer;
798
+ },
799
+
800
+ decode(input: BinaryReader | Uint8Array, length?: number): Causation {
801
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
802
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
803
+ if (previousRecursionDepth >= 100) {
804
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
805
+ }
806
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
807
+ try {
808
+ const end = length === undefined ? reader.len : reader.pos + length;
809
+ const message = createBaseCausation();
810
+ while (reader.pos < end) {
811
+ const tag = reader.uint32();
812
+ switch (tag >>> 3) {
813
+ case 1: {
814
+ if (tag !== 10) {
815
+ break;
816
+ }
817
+
818
+ message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
819
+ continue;
820
+ }
821
+ case 2: {
822
+ if (tag !== 18) {
823
+ break;
824
+ }
825
+
826
+ message.Type = reader.string();
827
+ continue;
828
+ }
829
+ case 3: {
830
+ if (tag !== 26) {
831
+ break;
832
+ }
833
+
834
+ const entry3 = Causation_PropertiesEntry.decode(reader, reader.uint32());
835
+ if (entry3.value !== undefined) {
836
+ message.Properties[entry3.key] = entry3.value;
837
+ }
838
+ continue;
839
+ }
840
+ }
841
+ if ((tag & 7) === 4 || tag === 0) {
842
+ break;
843
+ }
844
+ reader.skip(tag & 7);
845
+ }
846
+ return message;
847
+ } finally {
848
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
849
+ }
850
+ },
851
+
852
+ fromJSON(object: any): Causation {
853
+ return {
854
+ Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
855
+ Type: isSet(object.Type) ? globalThis.String(object.Type) : "",
856
+ Properties: isObject(object.Properties)
857
+ ? (globalThis.Object.entries(object.Properties) as [string, any][]).reduce(
858
+ (acc: { [key: string]: string }, [key, value]: [string, any]) => {
859
+ globalThis.Object.defineProperty(acc, key, {
860
+ value: globalThis.String(value),
861
+ enumerable: true,
862
+ configurable: true,
863
+ writable: true,
864
+ });
865
+ return acc;
866
+ },
867
+ {},
868
+ )
869
+ : {},
870
+ };
871
+ },
872
+
873
+ toJSON(message: Causation): unknown {
874
+ const obj: any = {};
875
+ if (message.Occurred !== undefined) {
876
+ obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
877
+ }
878
+ if (message.Type !== "") {
879
+ obj.Type = message.Type;
880
+ }
881
+ if (message.Properties) {
882
+ const entries = globalThis.Object.entries(message.Properties) as [string, string][];
883
+ if (entries.length > 0) {
884
+ obj.Properties = {};
885
+ entries.forEach(([k, v]) => {
886
+ obj.Properties[k] = v;
887
+ });
888
+ }
889
+ }
890
+ return obj;
891
+ },
892
+
893
+ create(base?: DeepPartial<Causation>): Causation {
894
+ return Causation.fromPartial(base ?? {});
895
+ },
896
+ fromPartial(object: DeepPartial<Causation>): Causation {
897
+ const message = createBaseCausation();
898
+ message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
899
+ ? SerializableDateTimeOffset.fromPartial(object.Occurred)
900
+ : undefined;
901
+ message.Type = object.Type ?? "";
902
+ message.Properties = (globalThis.Object.entries(object.Properties ?? {}) as [string, string][]).reduce(
903
+ (acc: { [key: string]: string }, [key, value]: [string, string]) => {
904
+ if (value !== undefined) {
905
+ acc[key] = globalThis.String(value);
906
+ }
907
+ return acc;
908
+ },
909
+ {},
910
+ );
911
+ return message;
912
+ },
913
+ };
914
+
915
+ function createBaseCausation_PropertiesEntry(): Causation_PropertiesEntry {
916
+ return { key: "", value: "" };
917
+ }
918
+
919
+ export const Causation_PropertiesEntry: MessageFns<Causation_PropertiesEntry> = {
920
+ encode(message: Causation_PropertiesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
921
+ if (message.key !== "") {
922
+ writer.uint32(10).string(message.key);
923
+ }
924
+ if (message.value !== "") {
925
+ writer.uint32(18).string(message.value);
926
+ }
927
+ return writer;
928
+ },
929
+
930
+ decode(input: BinaryReader | Uint8Array, length?: number): Causation_PropertiesEntry {
931
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
932
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
933
+ if (previousRecursionDepth >= 100) {
934
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
935
+ }
936
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
937
+ try {
938
+ const end = length === undefined ? reader.len : reader.pos + length;
939
+ const message = createBaseCausation_PropertiesEntry();
940
+ while (reader.pos < end) {
941
+ const tag = reader.uint32();
942
+ switch (tag >>> 3) {
943
+ case 1: {
944
+ if (tag !== 10) {
945
+ break;
946
+ }
947
+
948
+ message.key = reader.string();
949
+ continue;
950
+ }
951
+ case 2: {
952
+ if (tag !== 18) {
953
+ break;
954
+ }
955
+
956
+ message.value = reader.string();
957
+ continue;
958
+ }
959
+ }
960
+ if ((tag & 7) === 4 || tag === 0) {
961
+ break;
962
+ }
963
+ reader.skip(tag & 7);
964
+ }
965
+ return message;
966
+ } finally {
967
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
968
+ }
969
+ },
970
+
971
+ fromJSON(object: any): Causation_PropertiesEntry {
972
+ return {
973
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
974
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
975
+ };
976
+ },
977
+
978
+ toJSON(message: Causation_PropertiesEntry): unknown {
979
+ const obj: any = {};
980
+ if (message.key !== "") {
981
+ obj.key = message.key;
982
+ }
983
+ if (message.value !== "") {
984
+ obj.value = message.value;
985
+ }
986
+ return obj;
987
+ },
988
+
989
+ create(base?: DeepPartial<Causation_PropertiesEntry>): Causation_PropertiesEntry {
990
+ return Causation_PropertiesEntry.fromPartial(base ?? {});
991
+ },
992
+ fromPartial(object: DeepPartial<Causation_PropertiesEntry>): Causation_PropertiesEntry {
993
+ const message = createBaseCausation_PropertiesEntry();
994
+ message.key = object.key ?? "";
995
+ message.value = object.value ?? "";
996
+ return message;
997
+ },
998
+ };
999
+
1000
+ function createBaseCommandResult(): CommandResult {
1001
+ return {
1002
+ CorrelationId: undefined,
1003
+ IsAuthorized: false,
1004
+ ValidationResults: [],
1005
+ ExceptionMessages: [],
1006
+ ExceptionStackTrace: "",
1007
+ AuthorizationFailureReason: "",
1008
+ };
1009
+ }
1010
+
1011
+ export const CommandResult: MessageFns<CommandResult> = {
1012
+ encode(message: CommandResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1013
+ if (message.CorrelationId !== undefined) {
1014
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1015
+ }
1016
+ if (message.IsAuthorized !== false) {
1017
+ writer.uint32(16).bool(message.IsAuthorized);
1018
+ }
1019
+ for (const v of message.ValidationResults) {
1020
+ ValidationResult.encode(v!, writer.uint32(26).fork()).join();
1021
+ }
1022
+ for (const v of message.ExceptionMessages) {
1023
+ writer.uint32(34).string(v!);
1024
+ }
1025
+ if (message.ExceptionStackTrace !== "") {
1026
+ writer.uint32(42).string(message.ExceptionStackTrace);
1027
+ }
1028
+ if (message.AuthorizationFailureReason !== "") {
1029
+ writer.uint32(50).string(message.AuthorizationFailureReason);
1030
+ }
1031
+ return writer;
1032
+ },
1033
+
1034
+ decode(input: BinaryReader | Uint8Array, length?: number): CommandResult {
1035
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1036
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1037
+ if (previousRecursionDepth >= 100) {
1038
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1039
+ }
1040
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1041
+ try {
1042
+ const end = length === undefined ? reader.len : reader.pos + length;
1043
+ const message = createBaseCommandResult();
1044
+ while (reader.pos < end) {
1045
+ const tag = reader.uint32();
1046
+ switch (tag >>> 3) {
1047
+ case 1: {
1048
+ if (tag !== 10) {
1049
+ break;
1050
+ }
1051
+
1052
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1053
+ continue;
1054
+ }
1055
+ case 2: {
1056
+ if (tag !== 16) {
1057
+ break;
1058
+ }
1059
+
1060
+ message.IsAuthorized = reader.bool();
1061
+ continue;
1062
+ }
1063
+ case 3: {
1064
+ if (tag !== 26) {
1065
+ break;
1066
+ }
1067
+
1068
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
1069
+ continue;
1070
+ }
1071
+ case 4: {
1072
+ if (tag !== 34) {
1073
+ break;
1074
+ }
1075
+
1076
+ message.ExceptionMessages.push(reader.string());
1077
+ continue;
1078
+ }
1079
+ case 5: {
1080
+ if (tag !== 42) {
1081
+ break;
1082
+ }
1083
+
1084
+ message.ExceptionStackTrace = reader.string();
1085
+ continue;
1086
+ }
1087
+ case 6: {
1088
+ if (tag !== 50) {
1089
+ break;
1090
+ }
1091
+
1092
+ message.AuthorizationFailureReason = reader.string();
1093
+ continue;
1094
+ }
1095
+ }
1096
+ if ((tag & 7) === 4 || tag === 0) {
1097
+ break;
1098
+ }
1099
+ reader.skip(tag & 7);
1100
+ }
1101
+ return message;
1102
+ } finally {
1103
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1104
+ }
1105
+ },
1106
+
1107
+ fromJSON(object: any): CommandResult {
1108
+ return {
1109
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1110
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
1111
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
1112
+ ? object.ValidationResults.map((e: any) => ValidationResult.fromJSON(e))
1113
+ : [],
1114
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
1115
+ ? object.ExceptionMessages.map((e: any) => globalThis.String(e))
1116
+ : [],
1117
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
1118
+ AuthorizationFailureReason: isSet(object.AuthorizationFailureReason)
1119
+ ? globalThis.String(object.AuthorizationFailureReason)
1120
+ : "",
1121
+ };
1122
+ },
1123
+
1124
+ toJSON(message: CommandResult): unknown {
1125
+ const obj: any = {};
1126
+ if (message.CorrelationId !== undefined) {
1127
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
1128
+ }
1129
+ if (message.IsAuthorized !== false) {
1130
+ obj.IsAuthorized = message.IsAuthorized;
1131
+ }
1132
+ if (message.ValidationResults?.length) {
1133
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
1134
+ }
1135
+ if (message.ExceptionMessages?.length) {
1136
+ obj.ExceptionMessages = message.ExceptionMessages;
1137
+ }
1138
+ if (message.ExceptionStackTrace !== "") {
1139
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
1140
+ }
1141
+ if (message.AuthorizationFailureReason !== "") {
1142
+ obj.AuthorizationFailureReason = message.AuthorizationFailureReason;
1143
+ }
1144
+ return obj;
1145
+ },
1146
+
1147
+ create(base?: DeepPartial<CommandResult>): CommandResult {
1148
+ return CommandResult.fromPartial(base ?? {});
1149
+ },
1150
+ fromPartial(object: DeepPartial<CommandResult>): CommandResult {
1151
+ const message = createBaseCommandResult();
1152
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1153
+ ? Guid.fromPartial(object.CorrelationId)
1154
+ : undefined;
1155
+ message.IsAuthorized = object.IsAuthorized ?? false;
1156
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
1157
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
1158
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
1159
+ message.AuthorizationFailureReason = object.AuthorizationFailureReason ?? "";
1160
+ return message;
1161
+ },
1162
+ };
1163
+
1164
+ function createBaseCommandResultSaveCaptureResponse(): CommandResultSaveCaptureResponse {
1165
+ return {
1166
+ CorrelationId: undefined,
1167
+ IsAuthorized: false,
1168
+ ValidationResults: [],
1169
+ ExceptionMessages: [],
1170
+ ExceptionStackTrace: "",
1171
+ AuthorizationFailureReason: "",
1172
+ Response: undefined,
1173
+ };
1174
+ }
1175
+
1176
+ export const CommandResultSaveCaptureResponse: MessageFns<CommandResultSaveCaptureResponse> = {
1177
+ encode(message: CommandResultSaveCaptureResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1178
+ if (message.CorrelationId !== undefined) {
1179
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1180
+ }
1181
+ if (message.IsAuthorized !== false) {
1182
+ writer.uint32(16).bool(message.IsAuthorized);
1183
+ }
1184
+ for (const v of message.ValidationResults) {
1185
+ ValidationResult.encode(v!, writer.uint32(26).fork()).join();
1186
+ }
1187
+ for (const v of message.ExceptionMessages) {
1188
+ writer.uint32(34).string(v!);
1189
+ }
1190
+ if (message.ExceptionStackTrace !== "") {
1191
+ writer.uint32(42).string(message.ExceptionStackTrace);
1192
+ }
1193
+ if (message.AuthorizationFailureReason !== "") {
1194
+ writer.uint32(50).string(message.AuthorizationFailureReason);
1195
+ }
1196
+ if (message.Response !== undefined) {
1197
+ SaveCaptureResponse.encode(message.Response, writer.uint32(58).fork()).join();
1198
+ }
1199
+ return writer;
1200
+ },
1201
+
1202
+ decode(input: BinaryReader | Uint8Array, length?: number): CommandResultSaveCaptureResponse {
1203
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1204
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1205
+ if (previousRecursionDepth >= 100) {
1206
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1207
+ }
1208
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1209
+ try {
1210
+ const end = length === undefined ? reader.len : reader.pos + length;
1211
+ const message = createBaseCommandResultSaveCaptureResponse();
1212
+ while (reader.pos < end) {
1213
+ const tag = reader.uint32();
1214
+ switch (tag >>> 3) {
1215
+ case 1: {
1216
+ if (tag !== 10) {
1217
+ break;
1218
+ }
1219
+
1220
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1221
+ continue;
1222
+ }
1223
+ case 2: {
1224
+ if (tag !== 16) {
1225
+ break;
1226
+ }
1227
+
1228
+ message.IsAuthorized = reader.bool();
1229
+ continue;
1230
+ }
1231
+ case 3: {
1232
+ if (tag !== 26) {
1233
+ break;
1234
+ }
1235
+
1236
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
1237
+ continue;
1238
+ }
1239
+ case 4: {
1240
+ if (tag !== 34) {
1241
+ break;
1242
+ }
1243
+
1244
+ message.ExceptionMessages.push(reader.string());
1245
+ continue;
1246
+ }
1247
+ case 5: {
1248
+ if (tag !== 42) {
1249
+ break;
1250
+ }
1251
+
1252
+ message.ExceptionStackTrace = reader.string();
1253
+ continue;
1254
+ }
1255
+ case 6: {
1256
+ if (tag !== 50) {
1257
+ break;
1258
+ }
1259
+
1260
+ message.AuthorizationFailureReason = reader.string();
1261
+ continue;
1262
+ }
1263
+ case 7: {
1264
+ if (tag !== 58) {
1265
+ break;
1266
+ }
1267
+
1268
+ message.Response = SaveCaptureResponse.decode(reader, reader.uint32());
1269
+ continue;
1270
+ }
1271
+ }
1272
+ if ((tag & 7) === 4 || tag === 0) {
1273
+ break;
1274
+ }
1275
+ reader.skip(tag & 7);
1276
+ }
1277
+ return message;
1278
+ } finally {
1279
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1280
+ }
1281
+ },
1282
+
1283
+ fromJSON(object: any): CommandResultSaveCaptureResponse {
1284
+ return {
1285
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1286
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
1287
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
1288
+ ? object.ValidationResults.map((e: any) => ValidationResult.fromJSON(e))
1289
+ : [],
1290
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
1291
+ ? object.ExceptionMessages.map((e: any) => globalThis.String(e))
1292
+ : [],
1293
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
1294
+ AuthorizationFailureReason: isSet(object.AuthorizationFailureReason)
1295
+ ? globalThis.String(object.AuthorizationFailureReason)
1296
+ : "",
1297
+ Response: isSet(object.Response) ? SaveCaptureResponse.fromJSON(object.Response) : undefined,
1298
+ };
1299
+ },
1300
+
1301
+ toJSON(message: CommandResultSaveCaptureResponse): unknown {
1302
+ const obj: any = {};
1303
+ if (message.CorrelationId !== undefined) {
1304
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
1305
+ }
1306
+ if (message.IsAuthorized !== false) {
1307
+ obj.IsAuthorized = message.IsAuthorized;
1308
+ }
1309
+ if (message.ValidationResults?.length) {
1310
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
1311
+ }
1312
+ if (message.ExceptionMessages?.length) {
1313
+ obj.ExceptionMessages = message.ExceptionMessages;
1314
+ }
1315
+ if (message.ExceptionStackTrace !== "") {
1316
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
1317
+ }
1318
+ if (message.AuthorizationFailureReason !== "") {
1319
+ obj.AuthorizationFailureReason = message.AuthorizationFailureReason;
1320
+ }
1321
+ if (message.Response !== undefined) {
1322
+ obj.Response = SaveCaptureResponse.toJSON(message.Response);
1323
+ }
1324
+ return obj;
1325
+ },
1326
+
1327
+ create(base?: DeepPartial<CommandResultSaveCaptureResponse>): CommandResultSaveCaptureResponse {
1328
+ return CommandResultSaveCaptureResponse.fromPartial(base ?? {});
1329
+ },
1330
+ fromPartial(object: DeepPartial<CommandResultSaveCaptureResponse>): CommandResultSaveCaptureResponse {
1331
+ const message = createBaseCommandResultSaveCaptureResponse();
1332
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1333
+ ? Guid.fromPartial(object.CorrelationId)
1334
+ : undefined;
1335
+ message.IsAuthorized = object.IsAuthorized ?? false;
1336
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
1337
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
1338
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
1339
+ message.AuthorizationFailureReason = object.AuthorizationFailureReason ?? "";
1340
+ message.Response = (object.Response !== undefined && object.Response !== null)
1341
+ ? SaveCaptureResponse.fromPartial(object.Response)
1342
+ : undefined;
1343
+ return message;
1344
+ },
1345
+ };
1346
+
1347
+ function createBaseCommandResultStartCaptureResponse(): CommandResultStartCaptureResponse {
1348
+ return {
1349
+ CorrelationId: undefined,
1350
+ IsAuthorized: false,
1351
+ ValidationResults: [],
1352
+ ExceptionMessages: [],
1353
+ ExceptionStackTrace: "",
1354
+ AuthorizationFailureReason: "",
1355
+ Response: undefined,
1356
+ };
1357
+ }
1358
+
1359
+ export const CommandResultStartCaptureResponse: MessageFns<CommandResultStartCaptureResponse> = {
1360
+ encode(message: CommandResultStartCaptureResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1361
+ if (message.CorrelationId !== undefined) {
1362
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1363
+ }
1364
+ if (message.IsAuthorized !== false) {
1365
+ writer.uint32(16).bool(message.IsAuthorized);
1366
+ }
1367
+ for (const v of message.ValidationResults) {
1368
+ ValidationResult.encode(v!, writer.uint32(26).fork()).join();
1369
+ }
1370
+ for (const v of message.ExceptionMessages) {
1371
+ writer.uint32(34).string(v!);
1372
+ }
1373
+ if (message.ExceptionStackTrace !== "") {
1374
+ writer.uint32(42).string(message.ExceptionStackTrace);
1375
+ }
1376
+ if (message.AuthorizationFailureReason !== "") {
1377
+ writer.uint32(50).string(message.AuthorizationFailureReason);
1378
+ }
1379
+ if (message.Response !== undefined) {
1380
+ StartCaptureResponse.encode(message.Response, writer.uint32(58).fork()).join();
1381
+ }
1382
+ return writer;
1383
+ },
1384
+
1385
+ decode(input: BinaryReader | Uint8Array, length?: number): CommandResultStartCaptureResponse {
1386
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1387
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1388
+ if (previousRecursionDepth >= 100) {
1389
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1390
+ }
1391
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1392
+ try {
1393
+ const end = length === undefined ? reader.len : reader.pos + length;
1394
+ const message = createBaseCommandResultStartCaptureResponse();
1395
+ while (reader.pos < end) {
1396
+ const tag = reader.uint32();
1397
+ switch (tag >>> 3) {
1398
+ case 1: {
1399
+ if (tag !== 10) {
1400
+ break;
1401
+ }
1402
+
1403
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1404
+ continue;
1405
+ }
1406
+ case 2: {
1407
+ if (tag !== 16) {
1408
+ break;
1409
+ }
1410
+
1411
+ message.IsAuthorized = reader.bool();
1412
+ continue;
1413
+ }
1414
+ case 3: {
1415
+ if (tag !== 26) {
1416
+ break;
1417
+ }
1418
+
1419
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
1420
+ continue;
1421
+ }
1422
+ case 4: {
1423
+ if (tag !== 34) {
1424
+ break;
1425
+ }
1426
+
1427
+ message.ExceptionMessages.push(reader.string());
1428
+ continue;
1429
+ }
1430
+ case 5: {
1431
+ if (tag !== 42) {
1432
+ break;
1433
+ }
1434
+
1435
+ message.ExceptionStackTrace = reader.string();
1436
+ continue;
1437
+ }
1438
+ case 6: {
1439
+ if (tag !== 50) {
1440
+ break;
1441
+ }
1442
+
1443
+ message.AuthorizationFailureReason = reader.string();
1444
+ continue;
1445
+ }
1446
+ case 7: {
1447
+ if (tag !== 58) {
1448
+ break;
1449
+ }
1450
+
1451
+ message.Response = StartCaptureResponse.decode(reader, reader.uint32());
1452
+ continue;
1453
+ }
1454
+ }
1455
+ if ((tag & 7) === 4 || tag === 0) {
1456
+ break;
1457
+ }
1458
+ reader.skip(tag & 7);
1459
+ }
1460
+ return message;
1461
+ } finally {
1462
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1463
+ }
1464
+ },
1465
+
1466
+ fromJSON(object: any): CommandResultStartCaptureResponse {
1467
+ return {
1468
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1469
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
1470
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
1471
+ ? object.ValidationResults.map((e: any) => ValidationResult.fromJSON(e))
1472
+ : [],
1473
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
1474
+ ? object.ExceptionMessages.map((e: any) => globalThis.String(e))
1475
+ : [],
1476
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
1477
+ AuthorizationFailureReason: isSet(object.AuthorizationFailureReason)
1478
+ ? globalThis.String(object.AuthorizationFailureReason)
1479
+ : "",
1480
+ Response: isSet(object.Response) ? StartCaptureResponse.fromJSON(object.Response) : undefined,
1481
+ };
1482
+ },
1483
+
1484
+ toJSON(message: CommandResultStartCaptureResponse): unknown {
1485
+ const obj: any = {};
1486
+ if (message.CorrelationId !== undefined) {
1487
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
1488
+ }
1489
+ if (message.IsAuthorized !== false) {
1490
+ obj.IsAuthorized = message.IsAuthorized;
1491
+ }
1492
+ if (message.ValidationResults?.length) {
1493
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
1494
+ }
1495
+ if (message.ExceptionMessages?.length) {
1496
+ obj.ExceptionMessages = message.ExceptionMessages;
1497
+ }
1498
+ if (message.ExceptionStackTrace !== "") {
1499
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
1500
+ }
1501
+ if (message.AuthorizationFailureReason !== "") {
1502
+ obj.AuthorizationFailureReason = message.AuthorizationFailureReason;
1503
+ }
1504
+ if (message.Response !== undefined) {
1505
+ obj.Response = StartCaptureResponse.toJSON(message.Response);
1506
+ }
1507
+ return obj;
1508
+ },
1509
+
1510
+ create(base?: DeepPartial<CommandResultStartCaptureResponse>): CommandResultStartCaptureResponse {
1511
+ return CommandResultStartCaptureResponse.fromPartial(base ?? {});
1512
+ },
1513
+ fromPartial(object: DeepPartial<CommandResultStartCaptureResponse>): CommandResultStartCaptureResponse {
1514
+ const message = createBaseCommandResultStartCaptureResponse();
1515
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1516
+ ? Guid.fromPartial(object.CorrelationId)
1517
+ : undefined;
1518
+ message.IsAuthorized = object.IsAuthorized ?? false;
1519
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
1520
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
1521
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
1522
+ message.AuthorizationFailureReason = object.AuthorizationFailureReason ?? "";
1523
+ message.Response = (object.Response !== undefined && object.Response !== null)
1524
+ ? StartCaptureResponse.fromPartial(object.Response)
1525
+ : undefined;
1526
+ return message;
1527
+ },
1528
+ };
1529
+
1530
+ function createBaseCommandResultValidateCaptureDeclarationResponse(): CommandResultValidateCaptureDeclarationResponse {
1531
+ return {
1532
+ CorrelationId: undefined,
1533
+ IsAuthorized: false,
1534
+ ValidationResults: [],
1535
+ ExceptionMessages: [],
1536
+ ExceptionStackTrace: "",
1537
+ AuthorizationFailureReason: "",
1538
+ Response: undefined,
1539
+ };
1540
+ }
1541
+
1542
+ export const CommandResultValidateCaptureDeclarationResponse: MessageFns<
1543
+ CommandResultValidateCaptureDeclarationResponse
1544
+ > = {
1545
+ encode(
1546
+ message: CommandResultValidateCaptureDeclarationResponse,
1547
+ writer: BinaryWriter = new BinaryWriter(),
1548
+ ): BinaryWriter {
1549
+ if (message.CorrelationId !== undefined) {
1550
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
1551
+ }
1552
+ if (message.IsAuthorized !== false) {
1553
+ writer.uint32(16).bool(message.IsAuthorized);
1554
+ }
1555
+ for (const v of message.ValidationResults) {
1556
+ ValidationResult.encode(v!, writer.uint32(26).fork()).join();
1557
+ }
1558
+ for (const v of message.ExceptionMessages) {
1559
+ writer.uint32(34).string(v!);
1560
+ }
1561
+ if (message.ExceptionStackTrace !== "") {
1562
+ writer.uint32(42).string(message.ExceptionStackTrace);
1563
+ }
1564
+ if (message.AuthorizationFailureReason !== "") {
1565
+ writer.uint32(50).string(message.AuthorizationFailureReason);
1566
+ }
1567
+ if (message.Response !== undefined) {
1568
+ ValidateCaptureDeclarationResponse.encode(message.Response, writer.uint32(58).fork()).join();
1569
+ }
1570
+ return writer;
1571
+ },
1572
+
1573
+ decode(input: BinaryReader | Uint8Array, length?: number): CommandResultValidateCaptureDeclarationResponse {
1574
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1575
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1576
+ if (previousRecursionDepth >= 100) {
1577
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1578
+ }
1579
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1580
+ try {
1581
+ const end = length === undefined ? reader.len : reader.pos + length;
1582
+ const message = createBaseCommandResultValidateCaptureDeclarationResponse();
1583
+ while (reader.pos < end) {
1584
+ const tag = reader.uint32();
1585
+ switch (tag >>> 3) {
1586
+ case 1: {
1587
+ if (tag !== 10) {
1588
+ break;
1589
+ }
1590
+
1591
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1592
+ continue;
1593
+ }
1594
+ case 2: {
1595
+ if (tag !== 16) {
1596
+ break;
1597
+ }
1598
+
1599
+ message.IsAuthorized = reader.bool();
1600
+ continue;
1601
+ }
1602
+ case 3: {
1603
+ if (tag !== 26) {
1604
+ break;
1605
+ }
1606
+
1607
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
1608
+ continue;
1609
+ }
1610
+ case 4: {
1611
+ if (tag !== 34) {
1612
+ break;
1613
+ }
1614
+
1615
+ message.ExceptionMessages.push(reader.string());
1616
+ continue;
1617
+ }
1618
+ case 5: {
1619
+ if (tag !== 42) {
1620
+ break;
1621
+ }
1622
+
1623
+ message.ExceptionStackTrace = reader.string();
1624
+ continue;
1625
+ }
1626
+ case 6: {
1627
+ if (tag !== 50) {
1628
+ break;
1629
+ }
1630
+
1631
+ message.AuthorizationFailureReason = reader.string();
1632
+ continue;
1633
+ }
1634
+ case 7: {
1635
+ if (tag !== 58) {
1636
+ break;
1637
+ }
1638
+
1639
+ message.Response = ValidateCaptureDeclarationResponse.decode(reader, reader.uint32());
1640
+ continue;
1641
+ }
1642
+ }
1643
+ if ((tag & 7) === 4 || tag === 0) {
1644
+ break;
1645
+ }
1646
+ reader.skip(tag & 7);
1647
+ }
1648
+ return message;
1649
+ } finally {
1650
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1651
+ }
1652
+ },
1653
+
1654
+ fromJSON(object: any): CommandResultValidateCaptureDeclarationResponse {
1655
+ return {
1656
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
1657
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
1658
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
1659
+ ? object.ValidationResults.map((e: any) => ValidationResult.fromJSON(e))
1660
+ : [],
1661
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
1662
+ ? object.ExceptionMessages.map((e: any) => globalThis.String(e))
1663
+ : [],
1664
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
1665
+ AuthorizationFailureReason: isSet(object.AuthorizationFailureReason)
1666
+ ? globalThis.String(object.AuthorizationFailureReason)
1667
+ : "",
1668
+ Response: isSet(object.Response) ? ValidateCaptureDeclarationResponse.fromJSON(object.Response) : undefined,
1669
+ };
1670
+ },
1671
+
1672
+ toJSON(message: CommandResultValidateCaptureDeclarationResponse): unknown {
1673
+ const obj: any = {};
1674
+ if (message.CorrelationId !== undefined) {
1675
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
1676
+ }
1677
+ if (message.IsAuthorized !== false) {
1678
+ obj.IsAuthorized = message.IsAuthorized;
1679
+ }
1680
+ if (message.ValidationResults?.length) {
1681
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
1682
+ }
1683
+ if (message.ExceptionMessages?.length) {
1684
+ obj.ExceptionMessages = message.ExceptionMessages;
1685
+ }
1686
+ if (message.ExceptionStackTrace !== "") {
1687
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
1688
+ }
1689
+ if (message.AuthorizationFailureReason !== "") {
1690
+ obj.AuthorizationFailureReason = message.AuthorizationFailureReason;
1691
+ }
1692
+ if (message.Response !== undefined) {
1693
+ obj.Response = ValidateCaptureDeclarationResponse.toJSON(message.Response);
1694
+ }
1695
+ return obj;
1696
+ },
1697
+
1698
+ create(
1699
+ base?: DeepPartial<CommandResultValidateCaptureDeclarationResponse>,
1700
+ ): CommandResultValidateCaptureDeclarationResponse {
1701
+ return CommandResultValidateCaptureDeclarationResponse.fromPartial(base ?? {});
1702
+ },
1703
+ fromPartial(
1704
+ object: DeepPartial<CommandResultValidateCaptureDeclarationResponse>,
1705
+ ): CommandResultValidateCaptureDeclarationResponse {
1706
+ const message = createBaseCommandResultValidateCaptureDeclarationResponse();
1707
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
1708
+ ? Guid.fromPartial(object.CorrelationId)
1709
+ : undefined;
1710
+ message.IsAuthorized = object.IsAuthorized ?? false;
1711
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
1712
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
1713
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
1714
+ message.AuthorizationFailureReason = object.AuthorizationFailureReason ?? "";
1715
+ message.Response = (object.Response !== undefined && object.Response !== null)
1716
+ ? ValidateCaptureDeclarationResponse.fromPartial(object.Response)
1717
+ : undefined;
1718
+ return message;
1719
+ },
1720
+ };
1721
+
1722
+ function createBaseDeleteCaptureRequest(): DeleteCaptureRequest {
1723
+ return { EventStore: "", CaptureId: undefined };
1724
+ }
1725
+
1726
+ export const DeleteCaptureRequest: MessageFns<DeleteCaptureRequest> = {
1727
+ encode(message: DeleteCaptureRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1728
+ if (message.EventStore !== "") {
1729
+ writer.uint32(10).string(message.EventStore);
1730
+ }
1731
+ if (message.CaptureId !== undefined) {
1732
+ Guid.encode(message.CaptureId, writer.uint32(18).fork()).join();
1733
+ }
1734
+ return writer;
1735
+ },
1736
+
1737
+ decode(input: BinaryReader | Uint8Array, length?: number): DeleteCaptureRequest {
1738
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1739
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1740
+ if (previousRecursionDepth >= 100) {
1741
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1742
+ }
1743
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1744
+ try {
1745
+ const end = length === undefined ? reader.len : reader.pos + length;
1746
+ const message = createBaseDeleteCaptureRequest();
1747
+ while (reader.pos < end) {
1748
+ const tag = reader.uint32();
1749
+ switch (tag >>> 3) {
1750
+ case 1: {
1751
+ if (tag !== 10) {
1752
+ break;
1753
+ }
1754
+
1755
+ message.EventStore = reader.string();
1756
+ continue;
1757
+ }
1758
+ case 2: {
1759
+ if (tag !== 18) {
1760
+ break;
1761
+ }
1762
+
1763
+ message.CaptureId = Guid.decode(reader, reader.uint32());
1764
+ continue;
1765
+ }
1766
+ }
1767
+ if ((tag & 7) === 4 || tag === 0) {
1768
+ break;
1769
+ }
1770
+ reader.skip(tag & 7);
1771
+ }
1772
+ return message;
1773
+ } finally {
1774
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
1775
+ }
1776
+ },
1777
+
1778
+ fromJSON(object: any): DeleteCaptureRequest {
1779
+ return {
1780
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
1781
+ CaptureId: isSet(object.CaptureId) ? Guid.fromJSON(object.CaptureId) : undefined,
1782
+ };
1783
+ },
1784
+
1785
+ toJSON(message: DeleteCaptureRequest): unknown {
1786
+ const obj: any = {};
1787
+ if (message.EventStore !== "") {
1788
+ obj.EventStore = message.EventStore;
1789
+ }
1790
+ if (message.CaptureId !== undefined) {
1791
+ obj.CaptureId = Guid.toJSON(message.CaptureId);
1792
+ }
1793
+ return obj;
1794
+ },
1795
+
1796
+ create(base?: DeepPartial<DeleteCaptureRequest>): DeleteCaptureRequest {
1797
+ return DeleteCaptureRequest.fromPartial(base ?? {});
1798
+ },
1799
+ fromPartial(object: DeepPartial<DeleteCaptureRequest>): DeleteCaptureRequest {
1800
+ const message = createBaseDeleteCaptureRequest();
1801
+ message.EventStore = object.EventStore ?? "";
1802
+ message.CaptureId = (object.CaptureId !== undefined && object.CaptureId !== null)
1803
+ ? Guid.fromPartial(object.CaptureId)
1804
+ : undefined;
1805
+ return message;
1806
+ },
1807
+ };
1808
+
1809
+ function createBaseEventContext(): EventContext {
1810
+ return {
1811
+ EventType: undefined,
1812
+ EventSourceType: "",
1813
+ EventSourceId: "",
1814
+ SequenceNumber: 0n,
1815
+ EventStreamType: "",
1816
+ EventStreamId: "",
1817
+ Occurred: undefined,
1818
+ EventStore: "",
1819
+ Namespace: "",
1820
+ CorrelationId: undefined,
1821
+ Causation: [],
1822
+ CausedBy: undefined,
1823
+ ObservationState: 0,
1824
+ Tags: [],
1825
+ Hash: "",
1826
+ };
1827
+ }
1828
+
1829
+ export const EventContext: MessageFns<EventContext> = {
1830
+ encode(message: EventContext, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1831
+ if (message.EventType !== undefined) {
1832
+ EventType.encode(message.EventType, writer.uint32(10).fork()).join();
1833
+ }
1834
+ if (message.EventSourceType !== "") {
1835
+ writer.uint32(18).string(message.EventSourceType);
1836
+ }
1837
+ if (message.EventSourceId !== "") {
1838
+ writer.uint32(26).string(message.EventSourceId);
1839
+ }
1840
+ if (message.SequenceNumber !== 0n) {
1841
+ if (BigInt.asUintN(64, message.SequenceNumber) !== message.SequenceNumber) {
1842
+ throw new globalThis.Error("value provided for field message.SequenceNumber of type uint64 too large");
1843
+ }
1844
+ writer.uint32(32).uint64(message.SequenceNumber);
1845
+ }
1846
+ if (message.EventStreamType !== "") {
1847
+ writer.uint32(42).string(message.EventStreamType);
1848
+ }
1849
+ if (message.EventStreamId !== "") {
1850
+ writer.uint32(50).string(message.EventStreamId);
1851
+ }
1852
+ if (message.Occurred !== undefined) {
1853
+ SerializableDateTimeOffset.encode(message.Occurred, writer.uint32(58).fork()).join();
1854
+ }
1855
+ if (message.EventStore !== "") {
1856
+ writer.uint32(66).string(message.EventStore);
1857
+ }
1858
+ if (message.Namespace !== "") {
1859
+ writer.uint32(74).string(message.Namespace);
1860
+ }
1861
+ if (message.CorrelationId !== undefined) {
1862
+ Guid.encode(message.CorrelationId, writer.uint32(82).fork()).join();
1863
+ }
1864
+ for (const v of message.Causation) {
1865
+ Causation.encode(v!, writer.uint32(90).fork()).join();
1866
+ }
1867
+ if (message.CausedBy !== undefined) {
1868
+ Identity.encode(message.CausedBy, writer.uint32(98).fork()).join();
1869
+ }
1870
+ if (message.ObservationState !== 0) {
1871
+ writer.uint32(104).int32(message.ObservationState);
1872
+ }
1873
+ for (const v of message.Tags) {
1874
+ writer.uint32(114).string(v!);
1875
+ }
1876
+ if (message.Hash !== "") {
1877
+ writer.uint32(122).string(message.Hash);
1878
+ }
1879
+ return writer;
1880
+ },
1881
+
1882
+ decode(input: BinaryReader | Uint8Array, length?: number): EventContext {
1883
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1884
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
1885
+ if (previousRecursionDepth >= 100) {
1886
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1887
+ }
1888
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
1889
+ try {
1890
+ const end = length === undefined ? reader.len : reader.pos + length;
1891
+ const message = createBaseEventContext();
1892
+ while (reader.pos < end) {
1893
+ const tag = reader.uint32();
1894
+ switch (tag >>> 3) {
1895
+ case 1: {
1896
+ if (tag !== 10) {
1897
+ break;
1898
+ }
1899
+
1900
+ message.EventType = EventType.decode(reader, reader.uint32());
1901
+ continue;
1902
+ }
1903
+ case 2: {
1904
+ if (tag !== 18) {
1905
+ break;
1906
+ }
1907
+
1908
+ message.EventSourceType = reader.string();
1909
+ continue;
1910
+ }
1911
+ case 3: {
1912
+ if (tag !== 26) {
1913
+ break;
1914
+ }
1915
+
1916
+ message.EventSourceId = reader.string();
1917
+ continue;
1918
+ }
1919
+ case 4: {
1920
+ if (tag !== 32) {
1921
+ break;
1922
+ }
1923
+
1924
+ message.SequenceNumber = reader.uint64() as bigint;
1925
+ continue;
1926
+ }
1927
+ case 5: {
1928
+ if (tag !== 42) {
1929
+ break;
1930
+ }
1931
+
1932
+ message.EventStreamType = reader.string();
1933
+ continue;
1934
+ }
1935
+ case 6: {
1936
+ if (tag !== 50) {
1937
+ break;
1938
+ }
1939
+
1940
+ message.EventStreamId = reader.string();
1941
+ continue;
1942
+ }
1943
+ case 7: {
1944
+ if (tag !== 58) {
1945
+ break;
1946
+ }
1947
+
1948
+ message.Occurred = SerializableDateTimeOffset.decode(reader, reader.uint32());
1949
+ continue;
1950
+ }
1951
+ case 8: {
1952
+ if (tag !== 66) {
1953
+ break;
1954
+ }
1955
+
1956
+ message.EventStore = reader.string();
1957
+ continue;
1958
+ }
1959
+ case 9: {
1960
+ if (tag !== 74) {
1961
+ break;
1962
+ }
1963
+
1964
+ message.Namespace = reader.string();
1965
+ continue;
1966
+ }
1967
+ case 10: {
1968
+ if (tag !== 82) {
1969
+ break;
1970
+ }
1971
+
1972
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
1973
+ continue;
1974
+ }
1975
+ case 11: {
1976
+ if (tag !== 90) {
1977
+ break;
1978
+ }
1979
+
1980
+ message.Causation.push(Causation.decode(reader, reader.uint32()));
1981
+ continue;
1982
+ }
1983
+ case 12: {
1984
+ if (tag !== 98) {
1985
+ break;
1986
+ }
1987
+
1988
+ message.CausedBy = Identity.decode(reader, reader.uint32());
1989
+ continue;
1990
+ }
1991
+ case 13: {
1992
+ if (tag !== 104) {
1993
+ break;
1994
+ }
1995
+
1996
+ message.ObservationState = reader.int32() as any;
1997
+ continue;
1998
+ }
1999
+ case 14: {
2000
+ if (tag !== 114) {
2001
+ break;
2002
+ }
2003
+
2004
+ message.Tags.push(reader.string());
2005
+ continue;
2006
+ }
2007
+ case 15: {
2008
+ if (tag !== 122) {
2009
+ break;
2010
+ }
2011
+
2012
+ message.Hash = reader.string();
2013
+ continue;
2014
+ }
2015
+ }
2016
+ if ((tag & 7) === 4 || tag === 0) {
2017
+ break;
2018
+ }
2019
+ reader.skip(tag & 7);
2020
+ }
2021
+ return message;
2022
+ } finally {
2023
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2024
+ }
2025
+ },
2026
+
2027
+ fromJSON(object: any): EventContext {
2028
+ return {
2029
+ EventType: isSet(object.EventType) ? EventType.fromJSON(object.EventType) : undefined,
2030
+ EventSourceType: isSet(object.EventSourceType) ? globalThis.String(object.EventSourceType) : "",
2031
+ EventSourceId: isSet(object.EventSourceId) ? globalThis.String(object.EventSourceId) : "",
2032
+ SequenceNumber: isSet(object.SequenceNumber) ? BigInt(object.SequenceNumber) : 0n,
2033
+ EventStreamType: isSet(object.EventStreamType) ? globalThis.String(object.EventStreamType) : "",
2034
+ EventStreamId: isSet(object.EventStreamId) ? globalThis.String(object.EventStreamId) : "",
2035
+ Occurred: isSet(object.Occurred) ? SerializableDateTimeOffset.fromJSON(object.Occurred) : undefined,
2036
+ EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
2037
+ Namespace: isSet(object.Namespace) ? globalThis.String(object.Namespace) : "",
2038
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
2039
+ Causation: globalThis.Array.isArray(object?.Causation)
2040
+ ? object.Causation.map((e: any) => Causation.fromJSON(e))
2041
+ : [],
2042
+ CausedBy: isSet(object.CausedBy) ? Identity.fromJSON(object.CausedBy) : undefined,
2043
+ ObservationState: isSet(object.ObservationState) ? eventObservationStateFromJSON(object.ObservationState) : 0,
2044
+ Tags: globalThis.Array.isArray(object?.Tags) ? object.Tags.map((e: any) => globalThis.String(e)) : [],
2045
+ Hash: isSet(object.Hash) ? globalThis.String(object.Hash) : "",
2046
+ };
2047
+ },
2048
+
2049
+ toJSON(message: EventContext): unknown {
2050
+ const obj: any = {};
2051
+ if (message.EventType !== undefined) {
2052
+ obj.EventType = EventType.toJSON(message.EventType);
2053
+ }
2054
+ if (message.EventSourceType !== "") {
2055
+ obj.EventSourceType = message.EventSourceType;
2056
+ }
2057
+ if (message.EventSourceId !== "") {
2058
+ obj.EventSourceId = message.EventSourceId;
2059
+ }
2060
+ if (message.SequenceNumber !== 0n) {
2061
+ obj.SequenceNumber = message.SequenceNumber.toString();
2062
+ }
2063
+ if (message.EventStreamType !== "") {
2064
+ obj.EventStreamType = message.EventStreamType;
2065
+ }
2066
+ if (message.EventStreamId !== "") {
2067
+ obj.EventStreamId = message.EventStreamId;
2068
+ }
2069
+ if (message.Occurred !== undefined) {
2070
+ obj.Occurred = SerializableDateTimeOffset.toJSON(message.Occurred);
2071
+ }
2072
+ if (message.EventStore !== "") {
2073
+ obj.EventStore = message.EventStore;
2074
+ }
2075
+ if (message.Namespace !== "") {
2076
+ obj.Namespace = message.Namespace;
2077
+ }
2078
+ if (message.CorrelationId !== undefined) {
2079
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
2080
+ }
2081
+ if (message.Causation?.length) {
2082
+ obj.Causation = message.Causation.map((e) => Causation.toJSON(e));
2083
+ }
2084
+ if (message.CausedBy !== undefined) {
2085
+ obj.CausedBy = Identity.toJSON(message.CausedBy);
2086
+ }
2087
+ if (message.ObservationState !== 0) {
2088
+ obj.ObservationState = eventObservationStateToJSON(message.ObservationState);
2089
+ }
2090
+ if (message.Tags?.length) {
2091
+ obj.Tags = message.Tags;
2092
+ }
2093
+ if (message.Hash !== "") {
2094
+ obj.Hash = message.Hash;
2095
+ }
2096
+ return obj;
2097
+ },
2098
+
2099
+ create(base?: DeepPartial<EventContext>): EventContext {
2100
+ return EventContext.fromPartial(base ?? {});
2101
+ },
2102
+ fromPartial(object: DeepPartial<EventContext>): EventContext {
2103
+ const message = createBaseEventContext();
2104
+ message.EventType = (object.EventType !== undefined && object.EventType !== null)
2105
+ ? EventType.fromPartial(object.EventType)
2106
+ : undefined;
2107
+ message.EventSourceType = object.EventSourceType ?? "";
2108
+ message.EventSourceId = object.EventSourceId ?? "";
2109
+ message.SequenceNumber = (object.SequenceNumber !== undefined && object.SequenceNumber !== null)
2110
+ ? BigInt(object.SequenceNumber)
2111
+ : 0n;
2112
+ message.EventStreamType = object.EventStreamType ?? "";
2113
+ message.EventStreamId = object.EventStreamId ?? "";
2114
+ message.Occurred = (object.Occurred !== undefined && object.Occurred !== null)
2115
+ ? SerializableDateTimeOffset.fromPartial(object.Occurred)
2116
+ : undefined;
2117
+ message.EventStore = object.EventStore ?? "";
2118
+ message.Namespace = object.Namespace ?? "";
2119
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
2120
+ ? Guid.fromPartial(object.CorrelationId)
2121
+ : undefined;
2122
+ message.Causation = object.Causation?.map((e) => Causation.fromPartial(e)) || [];
2123
+ message.CausedBy = (object.CausedBy !== undefined && object.CausedBy !== null)
2124
+ ? Identity.fromPartial(object.CausedBy)
2125
+ : undefined;
2126
+ message.ObservationState = object.ObservationState ?? 0;
2127
+ message.Tags = object.Tags?.map((e) => e) || [];
2128
+ message.Hash = object.Hash ?? "";
2129
+ return message;
2130
+ },
2131
+ };
2132
+
2133
+ function createBaseEventType(): EventType {
2134
+ return { Id: "", Generation: 0, Tombstone: false };
2135
+ }
2136
+
2137
+ export const EventType: MessageFns<EventType> = {
2138
+ encode(message: EventType, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2139
+ if (message.Id !== "") {
2140
+ writer.uint32(10).string(message.Id);
2141
+ }
2142
+ if (message.Generation !== 0) {
2143
+ writer.uint32(16).uint32(message.Generation);
2144
+ }
2145
+ if (message.Tombstone !== false) {
2146
+ writer.uint32(24).bool(message.Tombstone);
2147
+ }
2148
+ return writer;
2149
+ },
2150
+
2151
+ decode(input: BinaryReader | Uint8Array, length?: number): EventType {
2152
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2153
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2154
+ if (previousRecursionDepth >= 100) {
2155
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2156
+ }
2157
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2158
+ try {
2159
+ const end = length === undefined ? reader.len : reader.pos + length;
2160
+ const message = createBaseEventType();
2161
+ while (reader.pos < end) {
2162
+ const tag = reader.uint32();
2163
+ switch (tag >>> 3) {
2164
+ case 1: {
2165
+ if (tag !== 10) {
2166
+ break;
2167
+ }
2168
+
2169
+ message.Id = reader.string();
2170
+ continue;
2171
+ }
2172
+ case 2: {
2173
+ if (tag !== 16) {
2174
+ break;
2175
+ }
2176
+
2177
+ message.Generation = reader.uint32();
2178
+ continue;
2179
+ }
2180
+ case 3: {
2181
+ if (tag !== 24) {
2182
+ break;
2183
+ }
2184
+
2185
+ message.Tombstone = reader.bool();
2186
+ continue;
2187
+ }
2188
+ }
2189
+ if ((tag & 7) === 4 || tag === 0) {
2190
+ break;
2191
+ }
2192
+ reader.skip(tag & 7);
2193
+ }
2194
+ return message;
2195
+ } finally {
2196
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2197
+ }
2198
+ },
2199
+
2200
+ fromJSON(object: any): EventType {
2201
+ return {
2202
+ Id: isSet(object.Id) ? globalThis.String(object.Id) : "",
2203
+ Generation: isSet(object.Generation) ? globalThis.Number(object.Generation) : 0,
2204
+ Tombstone: isSet(object.Tombstone) ? globalThis.Boolean(object.Tombstone) : false,
2205
+ };
2206
+ },
2207
+
2208
+ toJSON(message: EventType): unknown {
2209
+ const obj: any = {};
2210
+ if (message.Id !== "") {
2211
+ obj.Id = message.Id;
2212
+ }
2213
+ if (message.Generation !== 0) {
2214
+ obj.Generation = Math.round(message.Generation);
2215
+ }
2216
+ if (message.Tombstone !== false) {
2217
+ obj.Tombstone = message.Tombstone;
2218
+ }
2219
+ return obj;
2220
+ },
2221
+
2222
+ create(base?: DeepPartial<EventType>): EventType {
2223
+ return EventType.fromPartial(base ?? {});
2224
+ },
2225
+ fromPartial(object: DeepPartial<EventType>): EventType {
2226
+ const message = createBaseEventType();
2227
+ message.Id = object.Id ?? "";
2228
+ message.Generation = object.Generation ?? 0;
2229
+ message.Tombstone = object.Tombstone ?? false;
2230
+ return message;
2231
+ },
2232
+ };
2233
+
2234
+ function createBaseGetCapturesRequest(): GetCapturesRequest {
2235
+ return { EventStore: "" };
2236
+ }
2237
+
2238
+ export const GetCapturesRequest: MessageFns<GetCapturesRequest> = {
2239
+ encode(message: GetCapturesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2240
+ if (message.EventStore !== "") {
2241
+ writer.uint32(10).string(message.EventStore);
2242
+ }
2243
+ return writer;
2244
+ },
2245
+
2246
+ decode(input: BinaryReader | Uint8Array, length?: number): GetCapturesRequest {
2247
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2248
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2249
+ if (previousRecursionDepth >= 100) {
2250
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2251
+ }
2252
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2253
+ try {
2254
+ const end = length === undefined ? reader.len : reader.pos + length;
2255
+ const message = createBaseGetCapturesRequest();
2256
+ while (reader.pos < end) {
2257
+ const tag = reader.uint32();
2258
+ switch (tag >>> 3) {
2259
+ case 1: {
2260
+ if (tag !== 10) {
2261
+ break;
2262
+ }
2263
+
2264
+ message.EventStore = reader.string();
2265
+ continue;
2266
+ }
2267
+ }
2268
+ if ((tag & 7) === 4 || tag === 0) {
2269
+ break;
2270
+ }
2271
+ reader.skip(tag & 7);
2272
+ }
2273
+ return message;
2274
+ } finally {
2275
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2276
+ }
2277
+ },
2278
+
2279
+ fromJSON(object: any): GetCapturesRequest {
2280
+ return { EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "" };
2281
+ },
2282
+
2283
+ toJSON(message: GetCapturesRequest): unknown {
2284
+ const obj: any = {};
2285
+ if (message.EventStore !== "") {
2286
+ obj.EventStore = message.EventStore;
2287
+ }
2288
+ return obj;
2289
+ },
2290
+
2291
+ create(base?: DeepPartial<GetCapturesRequest>): GetCapturesRequest {
2292
+ return GetCapturesRequest.fromPartial(base ?? {});
2293
+ },
2294
+ fromPartial(object: DeepPartial<GetCapturesRequest>): GetCapturesRequest {
2295
+ const message = createBaseGetCapturesRequest();
2296
+ message.EventStore = object.EventStore ?? "";
2297
+ return message;
2298
+ },
2299
+ };
2300
+
2301
+ function createBaseIdentity(): Identity {
2302
+ return { Subject: "", Name: "", UserName: "", OnBehalfOf: undefined };
2303
+ }
2304
+
2305
+ export const Identity: MessageFns<Identity> = {
2306
+ encode(message: Identity, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2307
+ if (message.Subject !== "") {
2308
+ writer.uint32(10).string(message.Subject);
2309
+ }
2310
+ if (message.Name !== "") {
2311
+ writer.uint32(18).string(message.Name);
2312
+ }
2313
+ if (message.UserName !== "") {
2314
+ writer.uint32(26).string(message.UserName);
2315
+ }
2316
+ if (message.OnBehalfOf !== undefined) {
2317
+ Identity.encode(message.OnBehalfOf, writer.uint32(34).fork()).join();
2318
+ }
2319
+ return writer;
2320
+ },
2321
+
2322
+ decode(input: BinaryReader | Uint8Array, length?: number): Identity {
2323
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2324
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2325
+ if (previousRecursionDepth >= 100) {
2326
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2327
+ }
2328
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2329
+ try {
2330
+ const end = length === undefined ? reader.len : reader.pos + length;
2331
+ const message = createBaseIdentity();
2332
+ while (reader.pos < end) {
2333
+ const tag = reader.uint32();
2334
+ switch (tag >>> 3) {
2335
+ case 1: {
2336
+ if (tag !== 10) {
2337
+ break;
2338
+ }
2339
+
2340
+ message.Subject = reader.string();
2341
+ continue;
2342
+ }
2343
+ case 2: {
2344
+ if (tag !== 18) {
2345
+ break;
2346
+ }
2347
+
2348
+ message.Name = reader.string();
2349
+ continue;
2350
+ }
2351
+ case 3: {
2352
+ if (tag !== 26) {
2353
+ break;
2354
+ }
2355
+
2356
+ message.UserName = reader.string();
2357
+ continue;
2358
+ }
2359
+ case 4: {
2360
+ if (tag !== 34) {
2361
+ break;
2362
+ }
2363
+
2364
+ message.OnBehalfOf = Identity.decode(reader, reader.uint32());
2365
+ continue;
2366
+ }
2367
+ }
2368
+ if ((tag & 7) === 4 || tag === 0) {
2369
+ break;
2370
+ }
2371
+ reader.skip(tag & 7);
2372
+ }
2373
+ return message;
2374
+ } finally {
2375
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2376
+ }
2377
+ },
2378
+
2379
+ fromJSON(object: any): Identity {
2380
+ return {
2381
+ Subject: isSet(object.Subject) ? globalThis.String(object.Subject) : "",
2382
+ Name: isSet(object.Name) ? globalThis.String(object.Name) : "",
2383
+ UserName: isSet(object.UserName) ? globalThis.String(object.UserName) : "",
2384
+ OnBehalfOf: isSet(object.OnBehalfOf) ? Identity.fromJSON(object.OnBehalfOf) : undefined,
2385
+ };
2386
+ },
2387
+
2388
+ toJSON(message: Identity): unknown {
2389
+ const obj: any = {};
2390
+ if (message.Subject !== "") {
2391
+ obj.Subject = message.Subject;
2392
+ }
2393
+ if (message.Name !== "") {
2394
+ obj.Name = message.Name;
2395
+ }
2396
+ if (message.UserName !== "") {
2397
+ obj.UserName = message.UserName;
2398
+ }
2399
+ if (message.OnBehalfOf !== undefined) {
2400
+ obj.OnBehalfOf = Identity.toJSON(message.OnBehalfOf);
2401
+ }
2402
+ return obj;
2403
+ },
2404
+
2405
+ create(base?: DeepPartial<Identity>): Identity {
2406
+ return Identity.fromPartial(base ?? {});
2407
+ },
2408
+ fromPartial(object: DeepPartial<Identity>): Identity {
2409
+ const message = createBaseIdentity();
2410
+ message.Subject = object.Subject ?? "";
2411
+ message.Name = object.Name ?? "";
2412
+ message.UserName = object.UserName ?? "";
2413
+ message.OnBehalfOf = (object.OnBehalfOf !== undefined && object.OnBehalfOf !== null)
2414
+ ? Identity.fromPartial(object.OnBehalfOf)
2415
+ : undefined;
2416
+ return message;
2417
+ },
2418
+ };
2419
+
2420
+ function createBaseObserveCapturesRequest(): ObserveCapturesRequest {
2421
+ return { EventStore: "" };
2422
+ }
2423
+
2424
+ export const ObserveCapturesRequest: MessageFns<ObserveCapturesRequest> = {
2425
+ encode(message: ObserveCapturesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2426
+ if (message.EventStore !== "") {
2427
+ writer.uint32(10).string(message.EventStore);
2428
+ }
2429
+ return writer;
2430
+ },
2431
+
2432
+ decode(input: BinaryReader | Uint8Array, length?: number): ObserveCapturesRequest {
2433
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2434
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2435
+ if (previousRecursionDepth >= 100) {
2436
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2437
+ }
2438
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2439
+ try {
2440
+ const end = length === undefined ? reader.len : reader.pos + length;
2441
+ const message = createBaseObserveCapturesRequest();
2442
+ while (reader.pos < end) {
2443
+ const tag = reader.uint32();
2444
+ switch (tag >>> 3) {
2445
+ case 1: {
2446
+ if (tag !== 10) {
2447
+ break;
2448
+ }
2449
+
2450
+ message.EventStore = reader.string();
2451
+ continue;
2452
+ }
2453
+ }
2454
+ if ((tag & 7) === 4 || tag === 0) {
2455
+ break;
2456
+ }
2457
+ reader.skip(tag & 7);
2458
+ }
2459
+ return message;
2460
+ } finally {
2461
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
2462
+ }
2463
+ },
2464
+
2465
+ fromJSON(object: any): ObserveCapturesRequest {
2466
+ return { EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "" };
2467
+ },
2468
+
2469
+ toJSON(message: ObserveCapturesRequest): unknown {
2470
+ const obj: any = {};
2471
+ if (message.EventStore !== "") {
2472
+ obj.EventStore = message.EventStore;
2473
+ }
2474
+ return obj;
2475
+ },
2476
+
2477
+ create(base?: DeepPartial<ObserveCapturesRequest>): ObserveCapturesRequest {
2478
+ return ObserveCapturesRequest.fromPartial(base ?? {});
2479
+ },
2480
+ fromPartial(object: DeepPartial<ObserveCapturesRequest>): ObserveCapturesRequest {
2481
+ const message = createBaseObserveCapturesRequest();
2482
+ message.EventStore = object.EventStore ?? "";
2483
+ return message;
2484
+ },
2485
+ };
2486
+
2487
+ function createBaseQueryResultIEnumerableCaptureDetailsResponse(): QueryResultIEnumerableCaptureDetailsResponse {
2488
+ return {
2489
+ CorrelationId: undefined,
2490
+ IsAuthorized: false,
2491
+ ValidationResults: [],
2492
+ ExceptionMessages: [],
2493
+ ExceptionStackTrace: "",
2494
+ Data: [],
2495
+ };
2496
+ }
2497
+
2498
+ export const QueryResultIEnumerableCaptureDetailsResponse: MessageFns<QueryResultIEnumerableCaptureDetailsResponse> = {
2499
+ encode(
2500
+ message: QueryResultIEnumerableCaptureDetailsResponse,
2501
+ writer: BinaryWriter = new BinaryWriter(),
2502
+ ): BinaryWriter {
2503
+ if (message.CorrelationId !== undefined) {
2504
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
2505
+ }
2506
+ if (message.IsAuthorized !== false) {
2507
+ writer.uint32(16).bool(message.IsAuthorized);
2508
+ }
2509
+ for (const v of message.ValidationResults) {
2510
+ ValidationResult.encode(v!, writer.uint32(26).fork()).join();
2511
+ }
2512
+ for (const v of message.ExceptionMessages) {
2513
+ writer.uint32(34).string(v!);
2514
+ }
2515
+ if (message.ExceptionStackTrace !== "") {
2516
+ writer.uint32(42).string(message.ExceptionStackTrace);
2517
+ }
2518
+ for (const v of message.Data) {
2519
+ CaptureDetailsResponse.encode(v!, writer.uint32(50).fork()).join();
2520
+ }
2521
+ return writer;
2522
+ },
2523
+
2524
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryResultIEnumerableCaptureDetailsResponse {
2525
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2526
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
2527
+ if (previousRecursionDepth >= 100) {
2528
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2529
+ }
2530
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
2531
+ try {
2532
+ const end = length === undefined ? reader.len : reader.pos + length;
2533
+ const message = createBaseQueryResultIEnumerableCaptureDetailsResponse();
432
2534
  while (reader.pos < end) {
433
2535
  const tag = reader.uint32();
434
2536
  switch (tag >>> 3) {
@@ -437,7 +2539,47 @@ export const GetCapturesRequest: MessageFns<GetCapturesRequest> = {
437
2539
  break;
438
2540
  }
439
2541
 
440
- message.EventStore = reader.string();
2542
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
2543
+ continue;
2544
+ }
2545
+ case 2: {
2546
+ if (tag !== 16) {
2547
+ break;
2548
+ }
2549
+
2550
+ message.IsAuthorized = reader.bool();
2551
+ continue;
2552
+ }
2553
+ case 3: {
2554
+ if (tag !== 26) {
2555
+ break;
2556
+ }
2557
+
2558
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
2559
+ continue;
2560
+ }
2561
+ case 4: {
2562
+ if (tag !== 34) {
2563
+ break;
2564
+ }
2565
+
2566
+ message.ExceptionMessages.push(reader.string());
2567
+ continue;
2568
+ }
2569
+ case 5: {
2570
+ if (tag !== 42) {
2571
+ break;
2572
+ }
2573
+
2574
+ message.ExceptionStackTrace = reader.string();
2575
+ continue;
2576
+ }
2577
+ case 6: {
2578
+ if (tag !== 50) {
2579
+ break;
2580
+ }
2581
+
2582
+ message.Data.push(CaptureDetailsResponse.decode(reader, reader.uint32()));
441
2583
  continue;
442
2584
  }
443
2585
  }
@@ -452,41 +2594,105 @@ export const GetCapturesRequest: MessageFns<GetCapturesRequest> = {
452
2594
  }
453
2595
  },
454
2596
 
455
- fromJSON(object: any): GetCapturesRequest {
456
- return { EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "" };
2597
+ fromJSON(object: any): QueryResultIEnumerableCaptureDetailsResponse {
2598
+ return {
2599
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
2600
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
2601
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
2602
+ ? object.ValidationResults.map((e: any) => ValidationResult.fromJSON(e))
2603
+ : [],
2604
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
2605
+ ? object.ExceptionMessages.map((e: any) => globalThis.String(e))
2606
+ : [],
2607
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
2608
+ Data: globalThis.Array.isArray(object?.Data)
2609
+ ? object.Data.map((e: any) => CaptureDetailsResponse.fromJSON(e))
2610
+ : [],
2611
+ };
457
2612
  },
458
2613
 
459
- toJSON(message: GetCapturesRequest): unknown {
2614
+ toJSON(message: QueryResultIEnumerableCaptureDetailsResponse): unknown {
460
2615
  const obj: any = {};
461
- if (message.EventStore !== "") {
462
- obj.EventStore = message.EventStore;
2616
+ if (message.CorrelationId !== undefined) {
2617
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
2618
+ }
2619
+ if (message.IsAuthorized !== false) {
2620
+ obj.IsAuthorized = message.IsAuthorized;
2621
+ }
2622
+ if (message.ValidationResults?.length) {
2623
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
2624
+ }
2625
+ if (message.ExceptionMessages?.length) {
2626
+ obj.ExceptionMessages = message.ExceptionMessages;
2627
+ }
2628
+ if (message.ExceptionStackTrace !== "") {
2629
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
2630
+ }
2631
+ if (message.Data?.length) {
2632
+ obj.Data = message.Data.map((e) => CaptureDetailsResponse.toJSON(e));
463
2633
  }
464
2634
  return obj;
465
2635
  },
466
2636
 
467
- create(base?: DeepPartial<GetCapturesRequest>): GetCapturesRequest {
468
- return GetCapturesRequest.fromPartial(base ?? {});
2637
+ create(
2638
+ base?: DeepPartial<QueryResultIEnumerableCaptureDetailsResponse>,
2639
+ ): QueryResultIEnumerableCaptureDetailsResponse {
2640
+ return QueryResultIEnumerableCaptureDetailsResponse.fromPartial(base ?? {});
469
2641
  },
470
- fromPartial(object: DeepPartial<GetCapturesRequest>): GetCapturesRequest {
471
- const message = createBaseGetCapturesRequest();
472
- message.EventStore = object.EventStore ?? "";
2642
+ fromPartial(
2643
+ object: DeepPartial<QueryResultIEnumerableCaptureDetailsResponse>,
2644
+ ): QueryResultIEnumerableCaptureDetailsResponse {
2645
+ const message = createBaseQueryResultIEnumerableCaptureDetailsResponse();
2646
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
2647
+ ? Guid.fromPartial(object.CorrelationId)
2648
+ : undefined;
2649
+ message.IsAuthorized = object.IsAuthorized ?? false;
2650
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
2651
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
2652
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
2653
+ message.Data = object.Data?.map((e) => CaptureDetailsResponse.fromPartial(e)) || [];
473
2654
  return message;
474
2655
  },
475
2656
  };
476
2657
 
477
- function createBaseIEnumerableCapture(): IEnumerableCapture {
478
- return { items: [] };
2658
+ function createBaseQueryResultIEnumerableCapturedEventResponse(): QueryResultIEnumerableCapturedEventResponse {
2659
+ return {
2660
+ CorrelationId: undefined,
2661
+ IsAuthorized: false,
2662
+ ValidationResults: [],
2663
+ ExceptionMessages: [],
2664
+ ExceptionStackTrace: "",
2665
+ Data: [],
2666
+ };
479
2667
  }
480
2668
 
481
- export const IEnumerableCapture: MessageFns<IEnumerableCapture> = {
482
- encode(message: IEnumerableCapture, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
483
- for (const v of message.items) {
484
- Capture.encode(v!, writer.uint32(10).fork()).join();
2669
+ export const QueryResultIEnumerableCapturedEventResponse: MessageFns<QueryResultIEnumerableCapturedEventResponse> = {
2670
+ encode(
2671
+ message: QueryResultIEnumerableCapturedEventResponse,
2672
+ writer: BinaryWriter = new BinaryWriter(),
2673
+ ): BinaryWriter {
2674
+ if (message.CorrelationId !== undefined) {
2675
+ Guid.encode(message.CorrelationId, writer.uint32(10).fork()).join();
2676
+ }
2677
+ if (message.IsAuthorized !== false) {
2678
+ writer.uint32(16).bool(message.IsAuthorized);
2679
+ }
2680
+ for (const v of message.ValidationResults) {
2681
+ ValidationResult.encode(v!, writer.uint32(26).fork()).join();
2682
+ }
2683
+ for (const v of message.ExceptionMessages) {
2684
+ writer.uint32(34).string(v!);
2685
+ }
2686
+ if (message.ExceptionStackTrace !== "") {
2687
+ writer.uint32(42).string(message.ExceptionStackTrace);
2688
+ }
2689
+ for (const v of message.Data) {
2690
+ CapturedEventResponse.encode(v!, writer.uint32(50).fork()).join();
485
2691
  }
486
2692
  return writer;
487
2693
  },
488
2694
 
489
- decode(input: BinaryReader | Uint8Array, length?: number): IEnumerableCapture {
2695
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryResultIEnumerableCapturedEventResponse {
490
2696
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
491
2697
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
492
2698
  if (previousRecursionDepth >= 100) {
@@ -495,7 +2701,7 @@ export const IEnumerableCapture: MessageFns<IEnumerableCapture> = {
495
2701
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
496
2702
  try {
497
2703
  const end = length === undefined ? reader.len : reader.pos + length;
498
- const message = createBaseIEnumerableCapture();
2704
+ const message = createBaseQueryResultIEnumerableCapturedEventResponse();
499
2705
  while (reader.pos < end) {
500
2706
  const tag = reader.uint32();
501
2707
  switch (tag >>> 3) {
@@ -504,7 +2710,47 @@ export const IEnumerableCapture: MessageFns<IEnumerableCapture> = {
504
2710
  break;
505
2711
  }
506
2712
 
507
- message.items.push(Capture.decode(reader, reader.uint32()));
2713
+ message.CorrelationId = Guid.decode(reader, reader.uint32());
2714
+ continue;
2715
+ }
2716
+ case 2: {
2717
+ if (tag !== 16) {
2718
+ break;
2719
+ }
2720
+
2721
+ message.IsAuthorized = reader.bool();
2722
+ continue;
2723
+ }
2724
+ case 3: {
2725
+ if (tag !== 26) {
2726
+ break;
2727
+ }
2728
+
2729
+ message.ValidationResults.push(ValidationResult.decode(reader, reader.uint32()));
2730
+ continue;
2731
+ }
2732
+ case 4: {
2733
+ if (tag !== 34) {
2734
+ break;
2735
+ }
2736
+
2737
+ message.ExceptionMessages.push(reader.string());
2738
+ continue;
2739
+ }
2740
+ case 5: {
2741
+ if (tag !== 42) {
2742
+ break;
2743
+ }
2744
+
2745
+ message.ExceptionStackTrace = reader.string();
2746
+ continue;
2747
+ }
2748
+ case 6: {
2749
+ if (tag !== 50) {
2750
+ break;
2751
+ }
2752
+
2753
+ message.Data.push(CapturedEventResponse.decode(reader, reader.uint32()));
508
2754
  continue;
509
2755
  }
510
2756
  }
@@ -519,39 +2765,76 @@ export const IEnumerableCapture: MessageFns<IEnumerableCapture> = {
519
2765
  }
520
2766
  },
521
2767
 
522
- fromJSON(object: any): IEnumerableCapture {
523
- return { items: globalThis.Array.isArray(object?.items) ? object.items.map((e: any) => Capture.fromJSON(e)) : [] };
2768
+ fromJSON(object: any): QueryResultIEnumerableCapturedEventResponse {
2769
+ return {
2770
+ CorrelationId: isSet(object.CorrelationId) ? Guid.fromJSON(object.CorrelationId) : undefined,
2771
+ IsAuthorized: isSet(object.IsAuthorized) ? globalThis.Boolean(object.IsAuthorized) : false,
2772
+ ValidationResults: globalThis.Array.isArray(object?.ValidationResults)
2773
+ ? object.ValidationResults.map((e: any) => ValidationResult.fromJSON(e))
2774
+ : [],
2775
+ ExceptionMessages: globalThis.Array.isArray(object?.ExceptionMessages)
2776
+ ? object.ExceptionMessages.map((e: any) => globalThis.String(e))
2777
+ : [],
2778
+ ExceptionStackTrace: isSet(object.ExceptionStackTrace) ? globalThis.String(object.ExceptionStackTrace) : "",
2779
+ Data: globalThis.Array.isArray(object?.Data)
2780
+ ? object.Data.map((e: any) => CapturedEventResponse.fromJSON(e))
2781
+ : [],
2782
+ };
524
2783
  },
525
2784
 
526
- toJSON(message: IEnumerableCapture): unknown {
2785
+ toJSON(message: QueryResultIEnumerableCapturedEventResponse): unknown {
527
2786
  const obj: any = {};
528
- if (message.items?.length) {
529
- obj.items = message.items.map((e) => Capture.toJSON(e));
2787
+ if (message.CorrelationId !== undefined) {
2788
+ obj.CorrelationId = Guid.toJSON(message.CorrelationId);
2789
+ }
2790
+ if (message.IsAuthorized !== false) {
2791
+ obj.IsAuthorized = message.IsAuthorized;
2792
+ }
2793
+ if (message.ValidationResults?.length) {
2794
+ obj.ValidationResults = message.ValidationResults.map((e) => ValidationResult.toJSON(e));
2795
+ }
2796
+ if (message.ExceptionMessages?.length) {
2797
+ obj.ExceptionMessages = message.ExceptionMessages;
2798
+ }
2799
+ if (message.ExceptionStackTrace !== "") {
2800
+ obj.ExceptionStackTrace = message.ExceptionStackTrace;
2801
+ }
2802
+ if (message.Data?.length) {
2803
+ obj.Data = message.Data.map((e) => CapturedEventResponse.toJSON(e));
530
2804
  }
531
2805
  return obj;
532
2806
  },
533
2807
 
534
- create(base?: DeepPartial<IEnumerableCapture>): IEnumerableCapture {
535
- return IEnumerableCapture.fromPartial(base ?? {});
2808
+ create(base?: DeepPartial<QueryResultIEnumerableCapturedEventResponse>): QueryResultIEnumerableCapturedEventResponse {
2809
+ return QueryResultIEnumerableCapturedEventResponse.fromPartial(base ?? {});
536
2810
  },
537
- fromPartial(object: DeepPartial<IEnumerableCapture>): IEnumerableCapture {
538
- const message = createBaseIEnumerableCapture();
539
- message.items = object.items?.map((e) => Capture.fromPartial(e)) || [];
2811
+ fromPartial(
2812
+ object: DeepPartial<QueryResultIEnumerableCapturedEventResponse>,
2813
+ ): QueryResultIEnumerableCapturedEventResponse {
2814
+ const message = createBaseQueryResultIEnumerableCapturedEventResponse();
2815
+ message.CorrelationId = (object.CorrelationId !== undefined && object.CorrelationId !== null)
2816
+ ? Guid.fromPartial(object.CorrelationId)
2817
+ : undefined;
2818
+ message.IsAuthorized = object.IsAuthorized ?? false;
2819
+ message.ValidationResults = object.ValidationResults?.map((e) => ValidationResult.fromPartial(e)) || [];
2820
+ message.ExceptionMessages = object.ExceptionMessages?.map((e) => e) || [];
2821
+ message.ExceptionStackTrace = object.ExceptionStackTrace ?? "";
2822
+ message.Data = object.Data?.map((e) => CapturedEventResponse.fromPartial(e)) || [];
540
2823
  return message;
541
2824
  },
542
2825
  };
543
2826
 
544
- function createBaseSaveCapture(): SaveCapture {
545
- return { EventStore: "", Id: "", Declaration: "" };
2827
+ function createBaseSaveCaptureRequest(): SaveCaptureRequest {
2828
+ return { EventStore: "", Id: undefined, Declaration: "" };
546
2829
  }
547
2830
 
548
- export const SaveCapture: MessageFns<SaveCapture> = {
549
- encode(message: SaveCapture, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2831
+ export const SaveCaptureRequest: MessageFns<SaveCaptureRequest> = {
2832
+ encode(message: SaveCaptureRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
550
2833
  if (message.EventStore !== "") {
551
2834
  writer.uint32(10).string(message.EventStore);
552
2835
  }
553
- if (message.Id !== "") {
554
- writer.uint32(18).string(message.Id);
2836
+ if (message.Id !== undefined) {
2837
+ Guid.encode(message.Id, writer.uint32(18).fork()).join();
555
2838
  }
556
2839
  if (message.Declaration !== "") {
557
2840
  writer.uint32(26).string(message.Declaration);
@@ -559,7 +2842,7 @@ export const SaveCapture: MessageFns<SaveCapture> = {
559
2842
  return writer;
560
2843
  },
561
2844
 
562
- decode(input: BinaryReader | Uint8Array, length?: number): SaveCapture {
2845
+ decode(input: BinaryReader | Uint8Array, length?: number): SaveCaptureRequest {
563
2846
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
564
2847
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
565
2848
  if (previousRecursionDepth >= 100) {
@@ -568,7 +2851,7 @@ export const SaveCapture: MessageFns<SaveCapture> = {
568
2851
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
569
2852
  try {
570
2853
  const end = length === undefined ? reader.len : reader.pos + length;
571
- const message = createBaseSaveCapture();
2854
+ const message = createBaseSaveCaptureRequest();
572
2855
  while (reader.pos < end) {
573
2856
  const tag = reader.uint32();
574
2857
  switch (tag >>> 3) {
@@ -585,7 +2868,7 @@ export const SaveCapture: MessageFns<SaveCapture> = {
585
2868
  break;
586
2869
  }
587
2870
 
588
- message.Id = reader.string();
2871
+ message.Id = Guid.decode(reader, reader.uint32());
589
2872
  continue;
590
2873
  }
591
2874
  case 3: {
@@ -608,21 +2891,21 @@ export const SaveCapture: MessageFns<SaveCapture> = {
608
2891
  }
609
2892
  },
610
2893
 
611
- fromJSON(object: any): SaveCapture {
2894
+ fromJSON(object: any): SaveCaptureRequest {
612
2895
  return {
613
2896
  EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
614
- Id: isSet(object.Id) ? globalThis.String(object.Id) : "",
2897
+ Id: isSet(object.Id) ? Guid.fromJSON(object.Id) : undefined,
615
2898
  Declaration: isSet(object.Declaration) ? globalThis.String(object.Declaration) : "",
616
2899
  };
617
2900
  },
618
2901
 
619
- toJSON(message: SaveCapture): unknown {
2902
+ toJSON(message: SaveCaptureRequest): unknown {
620
2903
  const obj: any = {};
621
2904
  if (message.EventStore !== "") {
622
2905
  obj.EventStore = message.EventStore;
623
2906
  }
624
- if (message.Id !== "") {
625
- obj.Id = message.Id;
2907
+ if (message.Id !== undefined) {
2908
+ obj.Id = Guid.toJSON(message.Id);
626
2909
  }
627
2910
  if (message.Declaration !== "") {
628
2911
  obj.Declaration = message.Declaration;
@@ -630,13 +2913,13 @@ export const SaveCapture: MessageFns<SaveCapture> = {
630
2913
  return obj;
631
2914
  },
632
2915
 
633
- create(base?: DeepPartial<SaveCapture>): SaveCapture {
634
- return SaveCapture.fromPartial(base ?? {});
2916
+ create(base?: DeepPartial<SaveCaptureRequest>): SaveCaptureRequest {
2917
+ return SaveCaptureRequest.fromPartial(base ?? {});
635
2918
  },
636
- fromPartial(object: DeepPartial<SaveCapture>): SaveCapture {
637
- const message = createBaseSaveCapture();
2919
+ fromPartial(object: DeepPartial<SaveCaptureRequest>): SaveCaptureRequest {
2920
+ const message = createBaseSaveCaptureRequest();
638
2921
  message.EventStore = object.EventStore ?? "";
639
- message.Id = object.Id ?? "";
2922
+ message.Id = (object.Id !== undefined && object.Id !== null) ? Guid.fromPartial(object.Id) : undefined;
640
2923
  message.Declaration = object.Declaration ?? "";
641
2924
  return message;
642
2925
  },
@@ -649,7 +2932,7 @@ function createBaseSaveCaptureResponse(): SaveCaptureResponse {
649
2932
  export const SaveCaptureResponse: MessageFns<SaveCaptureResponse> = {
650
2933
  encode(message: SaveCaptureResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
651
2934
  if (message.Capture !== undefined) {
652
- Capture.encode(message.Capture, writer.uint32(10).fork()).join();
2935
+ CaptureDetailsResponse.encode(message.Capture, writer.uint32(10).fork()).join();
653
2936
  }
654
2937
  for (const v of message.Messages) {
655
2938
  CaptureValidationMessage.encode(v!, writer.uint32(18).fork()).join();
@@ -675,7 +2958,7 @@ export const SaveCaptureResponse: MessageFns<SaveCaptureResponse> = {
675
2958
  break;
676
2959
  }
677
2960
 
678
- message.Capture = Capture.decode(reader, reader.uint32());
2961
+ message.Capture = CaptureDetailsResponse.decode(reader, reader.uint32());
679
2962
  continue;
680
2963
  }
681
2964
  case 2: {
@@ -700,7 +2983,7 @@ export const SaveCaptureResponse: MessageFns<SaveCaptureResponse> = {
700
2983
 
701
2984
  fromJSON(object: any): SaveCaptureResponse {
702
2985
  return {
703
- Capture: isSet(object.Capture) ? Capture.fromJSON(object.Capture) : undefined,
2986
+ Capture: isSet(object.Capture) ? CaptureDetailsResponse.fromJSON(object.Capture) : undefined,
704
2987
  Messages: globalThis.Array.isArray(object?.Messages)
705
2988
  ? object.Messages.map((e: any) => CaptureValidationMessage.fromJSON(e))
706
2989
  : [],
@@ -710,7 +2993,7 @@ export const SaveCaptureResponse: MessageFns<SaveCaptureResponse> = {
710
2993
  toJSON(message: SaveCaptureResponse): unknown {
711
2994
  const obj: any = {};
712
2995
  if (message.Capture !== undefined) {
713
- obj.Capture = Capture.toJSON(message.Capture);
2996
+ obj.Capture = CaptureDetailsResponse.toJSON(message.Capture);
714
2997
  }
715
2998
  if (message.Messages?.length) {
716
2999
  obj.Messages = message.Messages.map((e) => CaptureValidationMessage.toJSON(e));
@@ -724,29 +3007,96 @@ export const SaveCaptureResponse: MessageFns<SaveCaptureResponse> = {
724
3007
  fromPartial(object: DeepPartial<SaveCaptureResponse>): SaveCaptureResponse {
725
3008
  const message = createBaseSaveCaptureResponse();
726
3009
  message.Capture = (object.Capture !== undefined && object.Capture !== null)
727
- ? Capture.fromPartial(object.Capture)
3010
+ ? CaptureDetailsResponse.fromPartial(object.Capture)
728
3011
  : undefined;
729
3012
  message.Messages = object.Messages?.map((e) => CaptureValidationMessage.fromPartial(e)) || [];
730
3013
  return message;
731
3014
  },
732
3015
  };
733
3016
 
734
- function createBaseStartCapture(): StartCapture {
735
- return { EventStore: "", Id: "" };
3017
+ function createBaseSerializableDateTimeOffset(): SerializableDateTimeOffset {
3018
+ return { Value: "" };
3019
+ }
3020
+
3021
+ export const SerializableDateTimeOffset: MessageFns<SerializableDateTimeOffset> = {
3022
+ encode(message: SerializableDateTimeOffset, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3023
+ if (message.Value !== "") {
3024
+ writer.uint32(10).string(message.Value);
3025
+ }
3026
+ return writer;
3027
+ },
3028
+
3029
+ decode(input: BinaryReader | Uint8Array, length?: number): SerializableDateTimeOffset {
3030
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3031
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3032
+ if (previousRecursionDepth >= 100) {
3033
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3034
+ }
3035
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3036
+ try {
3037
+ const end = length === undefined ? reader.len : reader.pos + length;
3038
+ const message = createBaseSerializableDateTimeOffset();
3039
+ while (reader.pos < end) {
3040
+ const tag = reader.uint32();
3041
+ switch (tag >>> 3) {
3042
+ case 1: {
3043
+ if (tag !== 10) {
3044
+ break;
3045
+ }
3046
+
3047
+ message.Value = reader.string();
3048
+ continue;
3049
+ }
3050
+ }
3051
+ if ((tag & 7) === 4 || tag === 0) {
3052
+ break;
3053
+ }
3054
+ reader.skip(tag & 7);
3055
+ }
3056
+ return message;
3057
+ } finally {
3058
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3059
+ }
3060
+ },
3061
+
3062
+ fromJSON(object: any): SerializableDateTimeOffset {
3063
+ return { Value: isSet(object.Value) ? globalThis.String(object.Value) : "" };
3064
+ },
3065
+
3066
+ toJSON(message: SerializableDateTimeOffset): unknown {
3067
+ const obj: any = {};
3068
+ if (message.Value !== "") {
3069
+ obj.Value = message.Value;
3070
+ }
3071
+ return obj;
3072
+ },
3073
+
3074
+ create(base?: DeepPartial<SerializableDateTimeOffset>): SerializableDateTimeOffset {
3075
+ return SerializableDateTimeOffset.fromPartial(base ?? {});
3076
+ },
3077
+ fromPartial(object: DeepPartial<SerializableDateTimeOffset>): SerializableDateTimeOffset {
3078
+ const message = createBaseSerializableDateTimeOffset();
3079
+ message.Value = object.Value ?? "";
3080
+ return message;
3081
+ },
3082
+ };
3083
+
3084
+ function createBaseStartCaptureRequest(): StartCaptureRequest {
3085
+ return { EventStore: "", CaptureId: undefined };
736
3086
  }
737
3087
 
738
- export const StartCapture: MessageFns<StartCapture> = {
739
- encode(message: StartCapture, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3088
+ export const StartCaptureRequest: MessageFns<StartCaptureRequest> = {
3089
+ encode(message: StartCaptureRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
740
3090
  if (message.EventStore !== "") {
741
3091
  writer.uint32(10).string(message.EventStore);
742
3092
  }
743
- if (message.Id !== "") {
744
- writer.uint32(18).string(message.Id);
3093
+ if (message.CaptureId !== undefined) {
3094
+ Guid.encode(message.CaptureId, writer.uint32(18).fork()).join();
745
3095
  }
746
3096
  return writer;
747
3097
  },
748
3098
 
749
- decode(input: BinaryReader | Uint8Array, length?: number): StartCapture {
3099
+ decode(input: BinaryReader | Uint8Array, length?: number): StartCaptureRequest {
750
3100
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
751
3101
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
752
3102
  if (previousRecursionDepth >= 100) {
@@ -755,7 +3105,7 @@ export const StartCapture: MessageFns<StartCapture> = {
755
3105
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
756
3106
  try {
757
3107
  const end = length === undefined ? reader.len : reader.pos + length;
758
- const message = createBaseStartCapture();
3108
+ const message = createBaseStartCaptureRequest();
759
3109
  while (reader.pos < end) {
760
3110
  const tag = reader.uint32();
761
3111
  switch (tag >>> 3) {
@@ -772,7 +3122,7 @@ export const StartCapture: MessageFns<StartCapture> = {
772
3122
  break;
773
3123
  }
774
3124
 
775
- message.Id = reader.string();
3125
+ message.CaptureId = Guid.decode(reader, reader.uint32());
776
3126
  continue;
777
3127
  }
778
3128
  }
@@ -787,31 +3137,33 @@ export const StartCapture: MessageFns<StartCapture> = {
787
3137
  }
788
3138
  },
789
3139
 
790
- fromJSON(object: any): StartCapture {
3140
+ fromJSON(object: any): StartCaptureRequest {
791
3141
  return {
792
3142
  EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
793
- Id: isSet(object.Id) ? globalThis.String(object.Id) : "",
3143
+ CaptureId: isSet(object.CaptureId) ? Guid.fromJSON(object.CaptureId) : undefined,
794
3144
  };
795
3145
  },
796
3146
 
797
- toJSON(message: StartCapture): unknown {
3147
+ toJSON(message: StartCaptureRequest): unknown {
798
3148
  const obj: any = {};
799
3149
  if (message.EventStore !== "") {
800
3150
  obj.EventStore = message.EventStore;
801
3151
  }
802
- if (message.Id !== "") {
803
- obj.Id = message.Id;
3152
+ if (message.CaptureId !== undefined) {
3153
+ obj.CaptureId = Guid.toJSON(message.CaptureId);
804
3154
  }
805
3155
  return obj;
806
3156
  },
807
3157
 
808
- create(base?: DeepPartial<StartCapture>): StartCapture {
809
- return StartCapture.fromPartial(base ?? {});
3158
+ create(base?: DeepPartial<StartCaptureRequest>): StartCaptureRequest {
3159
+ return StartCaptureRequest.fromPartial(base ?? {});
810
3160
  },
811
- fromPartial(object: DeepPartial<StartCapture>): StartCapture {
812
- const message = createBaseStartCapture();
3161
+ fromPartial(object: DeepPartial<StartCaptureRequest>): StartCaptureRequest {
3162
+ const message = createBaseStartCaptureRequest();
813
3163
  message.EventStore = object.EventStore ?? "";
814
- message.Id = object.Id ?? "";
3164
+ message.CaptureId = (object.CaptureId !== undefined && object.CaptureId !== null)
3165
+ ? Guid.fromPartial(object.CaptureId)
3166
+ : undefined;
815
3167
  return message;
816
3168
  },
817
3169
  };
@@ -887,22 +3239,22 @@ export const StartCaptureResponse: MessageFns<StartCaptureResponse> = {
887
3239
  },
888
3240
  };
889
3241
 
890
- function createBaseStopCapture(): StopCapture {
891
- return { EventStore: "", Id: "" };
3242
+ function createBaseStopCaptureRequest(): StopCaptureRequest {
3243
+ return { EventStore: "", CaptureId: undefined };
892
3244
  }
893
3245
 
894
- export const StopCapture: MessageFns<StopCapture> = {
895
- encode(message: StopCapture, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3246
+ export const StopCaptureRequest: MessageFns<StopCaptureRequest> = {
3247
+ encode(message: StopCaptureRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
896
3248
  if (message.EventStore !== "") {
897
3249
  writer.uint32(10).string(message.EventStore);
898
3250
  }
899
- if (message.Id !== "") {
900
- writer.uint32(18).string(message.Id);
3251
+ if (message.CaptureId !== undefined) {
3252
+ Guid.encode(message.CaptureId, writer.uint32(18).fork()).join();
901
3253
  }
902
3254
  return writer;
903
3255
  },
904
3256
 
905
- decode(input: BinaryReader | Uint8Array, length?: number): StopCapture {
3257
+ decode(input: BinaryReader | Uint8Array, length?: number): StopCaptureRequest {
906
3258
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
907
3259
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
908
3260
  if (previousRecursionDepth >= 100) {
@@ -911,7 +3263,7 @@ export const StopCapture: MessageFns<StopCapture> = {
911
3263
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
912
3264
  try {
913
3265
  const end = length === undefined ? reader.len : reader.pos + length;
914
- const message = createBaseStopCapture();
3266
+ const message = createBaseStopCaptureRequest();
915
3267
  while (reader.pos < end) {
916
3268
  const tag = reader.uint32();
917
3269
  switch (tag >>> 3) {
@@ -928,7 +3280,7 @@ export const StopCapture: MessageFns<StopCapture> = {
928
3280
  break;
929
3281
  }
930
3282
 
931
- message.Id = reader.string();
3283
+ message.CaptureId = Guid.decode(reader, reader.uint32());
932
3284
  continue;
933
3285
  }
934
3286
  }
@@ -943,41 +3295,43 @@ export const StopCapture: MessageFns<StopCapture> = {
943
3295
  }
944
3296
  },
945
3297
 
946
- fromJSON(object: any): StopCapture {
3298
+ fromJSON(object: any): StopCaptureRequest {
947
3299
  return {
948
3300
  EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
949
- Id: isSet(object.Id) ? globalThis.String(object.Id) : "",
3301
+ CaptureId: isSet(object.CaptureId) ? Guid.fromJSON(object.CaptureId) : undefined,
950
3302
  };
951
3303
  },
952
3304
 
953
- toJSON(message: StopCapture): unknown {
3305
+ toJSON(message: StopCaptureRequest): unknown {
954
3306
  const obj: any = {};
955
3307
  if (message.EventStore !== "") {
956
3308
  obj.EventStore = message.EventStore;
957
3309
  }
958
- if (message.Id !== "") {
959
- obj.Id = message.Id;
3310
+ if (message.CaptureId !== undefined) {
3311
+ obj.CaptureId = Guid.toJSON(message.CaptureId);
960
3312
  }
961
3313
  return obj;
962
3314
  },
963
3315
 
964
- create(base?: DeepPartial<StopCapture>): StopCapture {
965
- return StopCapture.fromPartial(base ?? {});
3316
+ create(base?: DeepPartial<StopCaptureRequest>): StopCaptureRequest {
3317
+ return StopCaptureRequest.fromPartial(base ?? {});
966
3318
  },
967
- fromPartial(object: DeepPartial<StopCapture>): StopCapture {
968
- const message = createBaseStopCapture();
3319
+ fromPartial(object: DeepPartial<StopCaptureRequest>): StopCaptureRequest {
3320
+ const message = createBaseStopCaptureRequest();
969
3321
  message.EventStore = object.EventStore ?? "";
970
- message.Id = object.Id ?? "";
3322
+ message.CaptureId = (object.CaptureId !== undefined && object.CaptureId !== null)
3323
+ ? Guid.fromPartial(object.CaptureId)
3324
+ : undefined;
971
3325
  return message;
972
3326
  },
973
3327
  };
974
3328
 
975
- function createBaseValidateCaptureDeclaration(): ValidateCaptureDeclaration {
3329
+ function createBaseValidateCaptureDeclarationRequest(): ValidateCaptureDeclarationRequest {
976
3330
  return { EventStore: "", Declaration: "" };
977
3331
  }
978
3332
 
979
- export const ValidateCaptureDeclaration: MessageFns<ValidateCaptureDeclaration> = {
980
- encode(message: ValidateCaptureDeclaration, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3333
+ export const ValidateCaptureDeclarationRequest: MessageFns<ValidateCaptureDeclarationRequest> = {
3334
+ encode(message: ValidateCaptureDeclarationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
981
3335
  if (message.EventStore !== "") {
982
3336
  writer.uint32(10).string(message.EventStore);
983
3337
  }
@@ -987,7 +3341,7 @@ export const ValidateCaptureDeclaration: MessageFns<ValidateCaptureDeclaration>
987
3341
  return writer;
988
3342
  },
989
3343
 
990
- decode(input: BinaryReader | Uint8Array, length?: number): ValidateCaptureDeclaration {
3344
+ decode(input: BinaryReader | Uint8Array, length?: number): ValidateCaptureDeclarationRequest {
991
3345
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
992
3346
  const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
993
3347
  if (previousRecursionDepth >= 100) {
@@ -996,7 +3350,7 @@ export const ValidateCaptureDeclaration: MessageFns<ValidateCaptureDeclaration>
996
3350
  (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
997
3351
  try {
998
3352
  const end = length === undefined ? reader.len : reader.pos + length;
999
- const message = createBaseValidateCaptureDeclaration();
3353
+ const message = createBaseValidateCaptureDeclarationRequest();
1000
3354
  while (reader.pos < end) {
1001
3355
  const tag = reader.uint32();
1002
3356
  switch (tag >>> 3) {
@@ -1028,14 +3382,14 @@ export const ValidateCaptureDeclaration: MessageFns<ValidateCaptureDeclaration>
1028
3382
  }
1029
3383
  },
1030
3384
 
1031
- fromJSON(object: any): ValidateCaptureDeclaration {
3385
+ fromJSON(object: any): ValidateCaptureDeclarationRequest {
1032
3386
  return {
1033
3387
  EventStore: isSet(object.EventStore) ? globalThis.String(object.EventStore) : "",
1034
3388
  Declaration: isSet(object.Declaration) ? globalThis.String(object.Declaration) : "",
1035
3389
  };
1036
3390
  },
1037
3391
 
1038
- toJSON(message: ValidateCaptureDeclaration): unknown {
3392
+ toJSON(message: ValidateCaptureDeclarationRequest): unknown {
1039
3393
  const obj: any = {};
1040
3394
  if (message.EventStore !== "") {
1041
3395
  obj.EventStore = message.EventStore;
@@ -1046,11 +3400,11 @@ export const ValidateCaptureDeclaration: MessageFns<ValidateCaptureDeclaration>
1046
3400
  return obj;
1047
3401
  },
1048
3402
 
1049
- create(base?: DeepPartial<ValidateCaptureDeclaration>): ValidateCaptureDeclaration {
1050
- return ValidateCaptureDeclaration.fromPartial(base ?? {});
3403
+ create(base?: DeepPartial<ValidateCaptureDeclarationRequest>): ValidateCaptureDeclarationRequest {
3404
+ return ValidateCaptureDeclarationRequest.fromPartial(base ?? {});
1051
3405
  },
1052
- fromPartial(object: DeepPartial<ValidateCaptureDeclaration>): ValidateCaptureDeclaration {
1053
- const message = createBaseValidateCaptureDeclaration();
3406
+ fromPartial(object: DeepPartial<ValidateCaptureDeclarationRequest>): ValidateCaptureDeclarationRequest {
3407
+ const message = createBaseValidateCaptureDeclarationRequest();
1054
3408
  message.EventStore = object.EventStore ?? "";
1055
3409
  message.Declaration = object.Declaration ?? "";
1056
3410
  return message;
@@ -1128,16 +3482,125 @@ export const ValidateCaptureDeclarationResponse: MessageFns<ValidateCaptureDecla
1128
3482
  },
1129
3483
  };
1130
3484
 
3485
+ function createBaseValidationResult(): ValidationResult {
3486
+ return { Severity: 0, Message: "", Members: [] };
3487
+ }
3488
+
3489
+ export const ValidationResult: MessageFns<ValidationResult> = {
3490
+ encode(message: ValidationResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3491
+ if (message.Severity !== 0) {
3492
+ writer.uint32(8).int32(message.Severity);
3493
+ }
3494
+ if (message.Message !== "") {
3495
+ writer.uint32(18).string(message.Message);
3496
+ }
3497
+ for (const v of message.Members) {
3498
+ writer.uint32(26).string(v!);
3499
+ }
3500
+ return writer;
3501
+ },
3502
+
3503
+ decode(input: BinaryReader | Uint8Array, length?: number): ValidationResult {
3504
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3505
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
3506
+ if (previousRecursionDepth >= 100) {
3507
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3508
+ }
3509
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
3510
+ try {
3511
+ const end = length === undefined ? reader.len : reader.pos + length;
3512
+ const message = createBaseValidationResult();
3513
+ while (reader.pos < end) {
3514
+ const tag = reader.uint32();
3515
+ switch (tag >>> 3) {
3516
+ case 1: {
3517
+ if (tag !== 8) {
3518
+ break;
3519
+ }
3520
+
3521
+ message.Severity = reader.int32() as any;
3522
+ continue;
3523
+ }
3524
+ case 2: {
3525
+ if (tag !== 18) {
3526
+ break;
3527
+ }
3528
+
3529
+ message.Message = reader.string();
3530
+ continue;
3531
+ }
3532
+ case 3: {
3533
+ if (tag !== 26) {
3534
+ break;
3535
+ }
3536
+
3537
+ message.Members.push(reader.string());
3538
+ continue;
3539
+ }
3540
+ }
3541
+ if ((tag & 7) === 4 || tag === 0) {
3542
+ break;
3543
+ }
3544
+ reader.skip(tag & 7);
3545
+ }
3546
+ return message;
3547
+ } finally {
3548
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
3549
+ }
3550
+ },
3551
+
3552
+ fromJSON(object: any): ValidationResult {
3553
+ return {
3554
+ Severity: isSet(object.Severity) ? validationResultSeverityFromJSON(object.Severity) : 0,
3555
+ Message: isSet(object.Message) ? globalThis.String(object.Message) : "",
3556
+ Members: globalThis.Array.isArray(object?.Members) ? object.Members.map((e: any) => globalThis.String(e)) : [],
3557
+ };
3558
+ },
3559
+
3560
+ toJSON(message: ValidationResult): unknown {
3561
+ const obj: any = {};
3562
+ if (message.Severity !== 0) {
3563
+ obj.Severity = validationResultSeverityToJSON(message.Severity);
3564
+ }
3565
+ if (message.Message !== "") {
3566
+ obj.Message = message.Message;
3567
+ }
3568
+ if (message.Members?.length) {
3569
+ obj.Members = message.Members;
3570
+ }
3571
+ return obj;
3572
+ },
3573
+
3574
+ create(base?: DeepPartial<ValidationResult>): ValidationResult {
3575
+ return ValidationResult.fromPartial(base ?? {});
3576
+ },
3577
+ fromPartial(object: DeepPartial<ValidationResult>): ValidationResult {
3578
+ const message = createBaseValidationResult();
3579
+ message.Severity = object.Severity ?? 0;
3580
+ message.Message = object.Message ?? "";
3581
+ message.Members = object.Members?.map((e) => e) || [];
3582
+ return message;
3583
+ },
3584
+ };
3585
+
1131
3586
  export type CapturesDefinition = typeof CapturesDefinition;
1132
3587
  export const CapturesDefinition = {
1133
3588
  name: "Captures",
1134
3589
  fullName: "Cratis.Chronicle.Contracts.Captures.Captures",
1135
3590
  methods: {
1136
- delete: {
1137
- name: "Delete",
1138
- requestType: DeleteCapture as typeof DeleteCapture,
3591
+ capturedEvents: {
3592
+ name: "CapturedEvents",
3593
+ requestType: CapturedEventsRequest as typeof CapturedEventsRequest,
3594
+ requestStream: false,
3595
+ responseType: QueryResultIEnumerableCapturedEventResponse as typeof QueryResultIEnumerableCapturedEventResponse,
3596
+ responseStream: false,
3597
+ options: {},
3598
+ },
3599
+ deleteCapture: {
3600
+ name: "DeleteCapture",
3601
+ requestType: DeleteCaptureRequest as typeof DeleteCaptureRequest,
1139
3602
  requestStream: false,
1140
- responseType: Empty as typeof Empty,
3603
+ responseType: CommandResult as typeof CommandResult,
1141
3604
  responseStream: false,
1142
3605
  options: {},
1143
3606
  },
@@ -1145,47 +3608,48 @@ export const CapturesDefinition = {
1145
3608
  name: "GetCaptures",
1146
3609
  requestType: GetCapturesRequest as typeof GetCapturesRequest,
1147
3610
  requestStream: false,
1148
- responseType: IEnumerableCapture as typeof IEnumerableCapture,
3611
+ responseType: QueryResultIEnumerableCaptureDetailsResponse as typeof QueryResultIEnumerableCaptureDetailsResponse,
1149
3612
  responseStream: false,
1150
3613
  options: {},
1151
3614
  },
1152
3615
  observeCaptures: {
1153
3616
  name: "ObserveCaptures",
1154
- requestType: GetCapturesRequest as typeof GetCapturesRequest,
3617
+ requestType: ObserveCapturesRequest as typeof ObserveCapturesRequest,
1155
3618
  requestStream: false,
1156
- responseType: IEnumerableCapture as typeof IEnumerableCapture,
3619
+ responseType: QueryResultIEnumerableCaptureDetailsResponse as typeof QueryResultIEnumerableCaptureDetailsResponse,
1157
3620
  responseStream: true,
1158
3621
  options: {},
1159
3622
  },
1160
- save: {
1161
- name: "Save",
1162
- requestType: SaveCapture as typeof SaveCapture,
3623
+ saveCapture: {
3624
+ name: "SaveCapture",
3625
+ requestType: SaveCaptureRequest as typeof SaveCaptureRequest,
1163
3626
  requestStream: false,
1164
- responseType: SaveCaptureResponse as typeof SaveCaptureResponse,
3627
+ responseType: CommandResultSaveCaptureResponse as typeof CommandResultSaveCaptureResponse,
1165
3628
  responseStream: false,
1166
3629
  options: {},
1167
3630
  },
1168
- start: {
1169
- name: "Start",
1170
- requestType: StartCapture as typeof StartCapture,
3631
+ startCapture: {
3632
+ name: "StartCapture",
3633
+ requestType: StartCaptureRequest as typeof StartCaptureRequest,
1171
3634
  requestStream: false,
1172
- responseType: StartCaptureResponse as typeof StartCaptureResponse,
3635
+ responseType: CommandResultStartCaptureResponse as typeof CommandResultStartCaptureResponse,
1173
3636
  responseStream: false,
1174
3637
  options: {},
1175
3638
  },
1176
- stop: {
1177
- name: "Stop",
1178
- requestType: StopCapture as typeof StopCapture,
3639
+ stopCapture: {
3640
+ name: "StopCapture",
3641
+ requestType: StopCaptureRequest as typeof StopCaptureRequest,
1179
3642
  requestStream: false,
1180
- responseType: Empty as typeof Empty,
3643
+ responseType: CommandResult as typeof CommandResult,
1181
3644
  responseStream: false,
1182
3645
  options: {},
1183
3646
  },
1184
- validateDeclaration: {
1185
- name: "ValidateDeclaration",
1186
- requestType: ValidateCaptureDeclaration as typeof ValidateCaptureDeclaration,
3647
+ validateCaptureDeclaration: {
3648
+ name: "ValidateCaptureDeclaration",
3649
+ requestType: ValidateCaptureDeclarationRequest as typeof ValidateCaptureDeclarationRequest,
1187
3650
  requestStream: false,
1188
- responseType: ValidateCaptureDeclarationResponse as typeof ValidateCaptureDeclarationResponse,
3651
+ responseType:
3652
+ CommandResultValidateCaptureDeclarationResponse as typeof CommandResultValidateCaptureDeclarationResponse,
1189
3653
  responseStream: false,
1190
3654
  options: {},
1191
3655
  },
@@ -1193,41 +3657,67 @@ export const CapturesDefinition = {
1193
3657
  } as const;
1194
3658
 
1195
3659
  export interface CapturesServiceImplementation<CallContextExt = {}> {
1196
- delete(request: DeleteCapture, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;
3660
+ capturedEvents(
3661
+ request: CapturedEventsRequest,
3662
+ context: CallContext & CallContextExt,
3663
+ ): Promise<DeepPartial<QueryResultIEnumerableCapturedEventResponse>>;
3664
+ deleteCapture(
3665
+ request: DeleteCaptureRequest,
3666
+ context: CallContext & CallContextExt,
3667
+ ): Promise<DeepPartial<CommandResult>>;
1197
3668
  getCaptures(
1198
3669
  request: GetCapturesRequest,
1199
3670
  context: CallContext & CallContextExt,
1200
- ): Promise<DeepPartial<IEnumerableCapture>>;
3671
+ ): Promise<DeepPartial<QueryResultIEnumerableCaptureDetailsResponse>>;
1201
3672
  observeCaptures(
1202
- request: GetCapturesRequest,
3673
+ request: ObserveCapturesRequest,
3674
+ context: CallContext & CallContextExt,
3675
+ ): ServerStreamingMethodResult<DeepPartial<QueryResultIEnumerableCaptureDetailsResponse>>;
3676
+ saveCapture(
3677
+ request: SaveCaptureRequest,
1203
3678
  context: CallContext & CallContextExt,
1204
- ): ServerStreamingMethodResult<DeepPartial<IEnumerableCapture>>;
1205
- save(request: SaveCapture, context: CallContext & CallContextExt): Promise<DeepPartial<SaveCaptureResponse>>;
1206
- start(request: StartCapture, context: CallContext & CallContextExt): Promise<DeepPartial<StartCaptureResponse>>;
1207
- stop(request: StopCapture, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;
1208
- validateDeclaration(
1209
- request: ValidateCaptureDeclaration,
3679
+ ): Promise<DeepPartial<CommandResultSaveCaptureResponse>>;
3680
+ startCapture(
3681
+ request: StartCaptureRequest,
1210
3682
  context: CallContext & CallContextExt,
1211
- ): Promise<DeepPartial<ValidateCaptureDeclarationResponse>>;
3683
+ ): Promise<DeepPartial<CommandResultStartCaptureResponse>>;
3684
+ stopCapture(request: StopCaptureRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CommandResult>>;
3685
+ validateCaptureDeclaration(
3686
+ request: ValidateCaptureDeclarationRequest,
3687
+ context: CallContext & CallContextExt,
3688
+ ): Promise<DeepPartial<CommandResultValidateCaptureDeclarationResponse>>;
1212
3689
  }
1213
3690
 
1214
3691
  export interface CapturesClient<CallOptionsExt = {}> {
1215
- delete(request: DeepPartial<DeleteCapture>, options?: CallOptions & CallOptionsExt): Promise<Empty>;
3692
+ capturedEvents(
3693
+ request: DeepPartial<CapturedEventsRequest>,
3694
+ options?: CallOptions & CallOptionsExt,
3695
+ ): Promise<QueryResultIEnumerableCapturedEventResponse>;
3696
+ deleteCapture(
3697
+ request: DeepPartial<DeleteCaptureRequest>,
3698
+ options?: CallOptions & CallOptionsExt,
3699
+ ): Promise<CommandResult>;
1216
3700
  getCaptures(
1217
3701
  request: DeepPartial<GetCapturesRequest>,
1218
3702
  options?: CallOptions & CallOptionsExt,
1219
- ): Promise<IEnumerableCapture>;
3703
+ ): Promise<QueryResultIEnumerableCaptureDetailsResponse>;
1220
3704
  observeCaptures(
1221
- request: DeepPartial<GetCapturesRequest>,
3705
+ request: DeepPartial<ObserveCapturesRequest>,
1222
3706
  options?: CallOptions & CallOptionsExt,
1223
- ): AsyncIterable<IEnumerableCapture>;
1224
- save(request: DeepPartial<SaveCapture>, options?: CallOptions & CallOptionsExt): Promise<SaveCaptureResponse>;
1225
- start(request: DeepPartial<StartCapture>, options?: CallOptions & CallOptionsExt): Promise<StartCaptureResponse>;
1226
- stop(request: DeepPartial<StopCapture>, options?: CallOptions & CallOptionsExt): Promise<Empty>;
1227
- validateDeclaration(
1228
- request: DeepPartial<ValidateCaptureDeclaration>,
3707
+ ): AsyncIterable<QueryResultIEnumerableCaptureDetailsResponse>;
3708
+ saveCapture(
3709
+ request: DeepPartial<SaveCaptureRequest>,
1229
3710
  options?: CallOptions & CallOptionsExt,
1230
- ): Promise<ValidateCaptureDeclarationResponse>;
3711
+ ): Promise<CommandResultSaveCaptureResponse>;
3712
+ startCapture(
3713
+ request: DeepPartial<StartCaptureRequest>,
3714
+ options?: CallOptions & CallOptionsExt,
3715
+ ): Promise<CommandResultStartCaptureResponse>;
3716
+ stopCapture(request: DeepPartial<StopCaptureRequest>, options?: CallOptions & CallOptionsExt): Promise<CommandResult>;
3717
+ validateCaptureDeclaration(
3718
+ request: DeepPartial<ValidateCaptureDeclarationRequest>,
3719
+ options?: CallOptions & CallOptionsExt,
3720
+ ): Promise<CommandResultValidateCaptureDeclarationResponse>;
1231
3721
  }
1232
3722
 
1233
3723
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
@@ -1238,6 +3728,10 @@ export type DeepPartial<T> = T extends bigint ? string | number | bigint
1238
3728
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1239
3729
  : Partial<T>;
1240
3730
 
3731
+ function isObject(value: any): boolean {
3732
+ return typeof value === "object" && value !== null;
3733
+ }
3734
+
1241
3735
  function isSet(value: any): boolean {
1242
3736
  return value !== null && value !== undefined;
1243
3737
  }