@cratis/arc 20.54.4 → 20.54.7

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 (1021) hide show
  1. package/dist/cjs/Globals.js +21 -8
  2. package/dist/cjs/Globals.js.map +1 -1
  3. package/dist/cjs/UrlHelpers.js +46 -13
  4. package/dist/cjs/UrlHelpers.js.map +1 -1
  5. package/dist/cjs/commands/Command.js +50 -38
  6. package/dist/cjs/commands/Command.js.map +1 -1
  7. package/dist/cjs/commands/CommandResult.js +58 -36
  8. package/dist/cjs/commands/CommandResult.js.map +1 -1
  9. package/dist/cjs/commands/CommandResults.js +24 -22
  10. package/dist/cjs/commands/CommandResults.js.map +1 -1
  11. package/dist/cjs/commands/CommandValidator.js +10 -2
  12. package/dist/cjs/commands/CommandValidator.js.map +1 -1
  13. package/dist/cjs/commands/index.js +2 -2
  14. package/dist/cjs/commands/index.js.map +1 -1
  15. package/dist/cjs/deepEqual.js +9 -9
  16. package/dist/cjs/deepEqual.js.map +1 -1
  17. package/dist/cjs/identity/IIdentityProvider.js +5 -1
  18. package/dist/cjs/identity/IIdentityProvider.js.map +1 -1
  19. package/dist/cjs/identity/IdentityProvider.js +44 -22
  20. package/dist/cjs/identity/IdentityProvider.js.map +1 -1
  21. package/dist/cjs/identity/index.js +2 -1
  22. package/dist/cjs/identity/index.js.map +1 -1
  23. package/dist/cjs/index.js +1 -4
  24. package/dist/cjs/index.js.map +1 -1
  25. package/dist/cjs/joinPaths.js +2 -0
  26. package/dist/cjs/joinPaths.js.map +1 -1
  27. package/dist/cjs/messaging/IMessenger.js +5 -1
  28. package/dist/cjs/messaging/IMessenger.js.map +1 -1
  29. package/dist/cjs/messaging/Message.js +10 -2
  30. package/dist/cjs/messaging/Message.js.map +1 -1
  31. package/dist/cjs/messaging/Messenger.js +15 -10
  32. package/dist/cjs/messaging/Messenger.js.map +1 -1
  33. package/dist/cjs/messaging/index.js +2 -1
  34. package/dist/cjs/messaging/index.js.map +1 -1
  35. package/dist/cjs/queries/HubConnectionKeepAlive.js +41 -6
  36. package/dist/cjs/queries/HubConnectionKeepAlive.js.map +1 -1
  37. package/dist/cjs/queries/IQueryProvider.js +5 -1
  38. package/dist/cjs/queries/IQueryProvider.js.map +1 -1
  39. package/dist/cjs/queries/NullObservableQueryConnection.js +13 -7
  40. package/dist/cjs/queries/NullObservableQueryConnection.js.map +1 -1
  41. package/dist/cjs/queries/ObservableQueryConnection.js +43 -31
  42. package/dist/cjs/queries/ObservableQueryConnection.js.map +1 -1
  43. package/dist/cjs/queries/ObservableQueryConnectionFactory.js +36 -14
  44. package/dist/cjs/queries/ObservableQueryConnectionFactory.js.map +1 -1
  45. package/dist/cjs/queries/ObservableQueryConnectionPool.js +37 -6
  46. package/dist/cjs/queries/ObservableQueryConnectionPool.js.map +1 -1
  47. package/dist/cjs/queries/ObservableQueryDiagnostics.js +29 -14
  48. package/dist/cjs/queries/ObservableQueryDiagnostics.js.map +1 -1
  49. package/dist/cjs/queries/ObservableQueryFor.js +57 -31
  50. package/dist/cjs/queries/ObservableQueryFor.js.map +1 -1
  51. package/dist/cjs/queries/ObservableQueryMultiplexer.js +109 -51
  52. package/dist/cjs/queries/ObservableQueryMultiplexer.js.map +1 -1
  53. package/dist/cjs/queries/ObservableQuerySubscription.js +12 -3
  54. package/dist/cjs/queries/ObservableQuerySubscription.js.map +1 -1
  55. package/dist/cjs/queries/Paging.js +20 -6
  56. package/dist/cjs/queries/Paging.js.map +1 -1
  57. package/dist/cjs/queries/PagingInfo.js +23 -7
  58. package/dist/cjs/queries/PagingInfo.js.map +1 -1
  59. package/dist/cjs/queries/QueryFor.js +42 -24
  60. package/dist/cjs/queries/QueryFor.js.map +1 -1
  61. package/dist/cjs/queries/QueryInstanceCache.js +149 -37
  62. package/dist/cjs/queries/QueryInstanceCache.js.map +1 -1
  63. package/dist/cjs/queries/QueryProvider.js +13 -3
  64. package/dist/cjs/queries/QueryProvider.js.map +1 -1
  65. package/dist/cjs/queries/QueryResult.js +39 -33
  66. package/dist/cjs/queries/QueryResult.js.map +1 -1
  67. package/dist/cjs/queries/QueryResultWithState.js +26 -4
  68. package/dist/cjs/queries/QueryResultWithState.js.map +1 -1
  69. package/dist/cjs/queries/QueryTransportMethod.js +15 -5
  70. package/dist/cjs/queries/QueryTransportMethod.js.map +1 -1
  71. package/dist/cjs/queries/QueryValidator.js +10 -2
  72. package/dist/cjs/queries/QueryValidator.js.map +1 -1
  73. package/dist/cjs/queries/ReconnectPolicy.js +27 -6
  74. package/dist/cjs/queries/ReconnectPolicy.js.map +1 -1
  75. package/dist/cjs/queries/ServerSentEventHubConnection.js +107 -61
  76. package/dist/cjs/queries/ServerSentEventHubConnection.js.map +1 -1
  77. package/dist/cjs/queries/ServerSentEventQueryConnection.js +31 -23
  78. package/dist/cjs/queries/ServerSentEventQueryConnection.js.map +1 -1
  79. package/dist/cjs/queries/SortDirection.js +18 -6
  80. package/dist/cjs/queries/SortDirection.js.map +1 -1
  81. package/dist/cjs/queries/Sorting.js +16 -4
  82. package/dist/cjs/queries/Sorting.js.map +1 -1
  83. package/dist/cjs/queries/SortingActions.js +15 -4
  84. package/dist/cjs/queries/SortingActions.js.map +1 -1
  85. package/dist/cjs/queries/SortingActionsForObservableQuery.js +16 -4
  86. package/dist/cjs/queries/SortingActionsForObservableQuery.js.map +1 -1
  87. package/dist/cjs/queries/SortingActionsForQuery.js +16 -4
  88. package/dist/cjs/queries/SortingActionsForQuery.js.map +1 -1
  89. package/dist/cjs/queries/ValidateRequestArguments.js +13 -9
  90. package/dist/cjs/queries/ValidateRequestArguments.js.map +1 -1
  91. package/dist/cjs/queries/WebSocketHubConnection.js +98 -52
  92. package/dist/cjs/queries/WebSocketHubConnection.js.map +1 -1
  93. package/dist/cjs/queries/WebSocketMessage.js +18 -6
  94. package/dist/cjs/queries/WebSocketMessage.js.map +1 -1
  95. package/dist/cjs/queries/index.js +6 -18
  96. package/dist/cjs/queries/index.js.map +1 -1
  97. package/dist/cjs/reflection/ParameterDescriptor.js +11 -2
  98. package/dist/cjs/reflection/ParameterDescriptor.js.map +1 -1
  99. package/dist/cjs/reflection/ParametersHelper.js +11 -3
  100. package/dist/cjs/reflection/ParametersHelper.js.map +1 -1
  101. package/dist/cjs/reflection/PropertyDescriptor.js +11 -2
  102. package/dist/cjs/reflection/PropertyDescriptor.js.map +1 -1
  103. package/dist/cjs/reflection/index.js +2 -1
  104. package/dist/cjs/reflection/index.js.map +1 -1
  105. package/dist/cjs/validation/PropertyRule.js +23 -5
  106. package/dist/cjs/validation/PropertyRule.js.map +1 -1
  107. package/dist/cjs/validation/PropertyValidator.js +25 -6
  108. package/dist/cjs/validation/PropertyValidator.js.map +1 -1
  109. package/dist/cjs/validation/RuleBuilder.js +22 -4
  110. package/dist/cjs/validation/RuleBuilder.js.map +1 -1
  111. package/dist/cjs/validation/RuleBuilderExtensions.js +95 -13
  112. package/dist/cjs/validation/RuleBuilderExtensions.js.map +1 -1
  113. package/dist/cjs/validation/ValidationResult.js +6 -2
  114. package/dist/cjs/validation/ValidationResult.js.map +1 -1
  115. package/dist/cjs/validation/ValidationResultSeverity.js +21 -7
  116. package/dist/cjs/validation/ValidationResultSeverity.js.map +1 -1
  117. package/dist/cjs/validation/Validator.js +32 -9
  118. package/dist/cjs/validation/Validator.js.map +1 -1
  119. package/dist/cjs/validation/index.js +3 -5
  120. package/dist/cjs/validation/index.js.map +1 -1
  121. package/dist/cjs/validation/rules/ComparisonRules.js +46 -20
  122. package/dist/cjs/validation/rules/ComparisonRules.js.map +1 -1
  123. package/dist/cjs/validation/rules/EmailRule.js +12 -4
  124. package/dist/cjs/validation/rules/EmailRule.js.map +1 -1
  125. package/dist/cjs/validation/rules/LengthRules.js +39 -19
  126. package/dist/cjs/validation/rules/LengthRules.js.map +1 -1
  127. package/dist/cjs/validation/rules/NotEmptyRule.js +20 -6
  128. package/dist/cjs/validation/rules/NotEmptyRule.js.map +1 -1
  129. package/dist/cjs/validation/rules/PhoneRule.js +12 -4
  130. package/dist/cjs/validation/rules/PhoneRule.js.map +1 -1
  131. package/dist/cjs/validation/rules/RegexRule.js +15 -6
  132. package/dist/cjs/validation/rules/RegexRule.js.map +1 -1
  133. package/dist/cjs/validation/rules/UrlRule.js +12 -4
  134. package/dist/cjs/validation/rules/UrlRule.js.map +1 -1
  135. package/dist/esm/Globals.js +20 -8
  136. package/dist/esm/Globals.js.map +1 -1
  137. package/dist/esm/UrlHelpers.d.ts.map +1 -1
  138. package/dist/esm/UrlHelpers.js +46 -13
  139. package/dist/esm/UrlHelpers.js.map +1 -1
  140. package/dist/esm/commands/Command.d.ts.map +1 -1
  141. package/dist/esm/commands/Command.js +50 -38
  142. package/dist/esm/commands/Command.js.map +1 -1
  143. package/dist/esm/commands/CommandResult.d.ts.map +1 -1
  144. package/dist/esm/commands/CommandResult.js +58 -36
  145. package/dist/esm/commands/CommandResult.js.map +1 -1
  146. package/dist/esm/commands/CommandResults.d.ts.map +1 -1
  147. package/dist/esm/commands/CommandResults.js +24 -22
  148. package/dist/esm/commands/CommandResults.js.map +1 -1
  149. package/dist/esm/commands/CommandValidator.d.ts.map +1 -1
  150. package/dist/esm/commands/CommandValidator.js +10 -2
  151. package/dist/esm/commands/CommandValidator.js.map +1 -1
  152. package/dist/esm/commands/for_Command/CommandWithRouteParams.d.ts.map +1 -1
  153. package/dist/esm/commands/for_Command/SomeCommand.d.ts.map +1 -1
  154. package/dist/esm/commands/for_Command/given/a_command.d.ts.map +1 -1
  155. package/dist/esm/commands/for_Command/given/a_command_with_validator.d.ts.map +1 -1
  156. package/dist/esm/commands/index.js +3 -1
  157. package/dist/esm/commands/index.js.map +1 -1
  158. package/dist/esm/deepEqual.d.ts.map +1 -1
  159. package/dist/esm/deepEqual.js +9 -9
  160. package/dist/esm/deepEqual.js.map +1 -1
  161. package/dist/esm/given.d.ts.map +1 -1
  162. package/dist/esm/helpers/fetchHelper.d.ts.map +1 -1
  163. package/dist/esm/identity/IIdentityProvider.d.ts.map +1 -1
  164. package/dist/esm/identity/IIdentityProvider.js +5 -1
  165. package/dist/esm/identity/IIdentityProvider.js.map +1 -1
  166. package/dist/esm/identity/IdentityProvider.d.ts.map +1 -1
  167. package/dist/esm/identity/IdentityProvider.js +44 -22
  168. package/dist/esm/identity/IdentityProvider.js.map +1 -1
  169. package/dist/esm/identity/for_IdentityProvider/given/an_identity_provider.d.ts.map +1 -1
  170. package/dist/esm/identity/index.js +3 -0
  171. package/dist/esm/identity/index.js.map +1 -1
  172. package/dist/esm/joinPaths.js +2 -0
  173. package/dist/esm/joinPaths.js.map +1 -1
  174. package/dist/esm/messaging/IMessenger.d.ts.map +1 -1
  175. package/dist/esm/messaging/IMessenger.js +5 -1
  176. package/dist/esm/messaging/IMessenger.js.map +1 -1
  177. package/dist/esm/messaging/Message.d.ts.map +1 -1
  178. package/dist/esm/messaging/Message.js +10 -2
  179. package/dist/esm/messaging/Message.js.map +1 -1
  180. package/dist/esm/messaging/Messenger.d.ts.map +1 -1
  181. package/dist/esm/messaging/Messenger.js +15 -10
  182. package/dist/esm/messaging/Messenger.js.map +1 -1
  183. package/dist/esm/messaging/for_Messenger/when_scoping_messages.js.map +1 -1
  184. package/dist/esm/messaging/index.js +3 -0
  185. package/dist/esm/messaging/index.js.map +1 -1
  186. package/dist/esm/queries/HubConnectionKeepAlive.d.ts.map +1 -1
  187. package/dist/esm/queries/HubConnectionKeepAlive.js +41 -6
  188. package/dist/esm/queries/HubConnectionKeepAlive.js.map +1 -1
  189. package/dist/esm/queries/IQueryProvider.d.ts.map +1 -1
  190. package/dist/esm/queries/IQueryProvider.js +5 -1
  191. package/dist/esm/queries/IQueryProvider.js.map +1 -1
  192. package/dist/esm/queries/NullObservableQueryConnection.d.ts.map +1 -1
  193. package/dist/esm/queries/NullObservableQueryConnection.js +13 -7
  194. package/dist/esm/queries/NullObservableQueryConnection.js.map +1 -1
  195. package/dist/esm/queries/ObservableQueryConnection.d.ts.map +1 -1
  196. package/dist/esm/queries/ObservableQueryConnection.js +43 -31
  197. package/dist/esm/queries/ObservableQueryConnection.js.map +1 -1
  198. package/dist/esm/queries/ObservableQueryConnectionFactory.js +36 -14
  199. package/dist/esm/queries/ObservableQueryConnectionFactory.js.map +1 -1
  200. package/dist/esm/queries/ObservableQueryConnectionPool.d.ts.map +1 -1
  201. package/dist/esm/queries/ObservableQueryConnectionPool.js +37 -6
  202. package/dist/esm/queries/ObservableQueryConnectionPool.js.map +1 -1
  203. package/dist/esm/queries/ObservableQueryDiagnostics.d.ts.map +1 -1
  204. package/dist/esm/queries/ObservableQueryDiagnostics.js +29 -14
  205. package/dist/esm/queries/ObservableQueryDiagnostics.js.map +1 -1
  206. package/dist/esm/queries/ObservableQueryFor.d.ts.map +1 -1
  207. package/dist/esm/queries/ObservableQueryFor.js +57 -31
  208. package/dist/esm/queries/ObservableQueryFor.js.map +1 -1
  209. package/dist/esm/queries/ObservableQueryMultiplexer.d.ts.map +1 -1
  210. package/dist/esm/queries/ObservableQueryMultiplexer.js +109 -51
  211. package/dist/esm/queries/ObservableQueryMultiplexer.js.map +1 -1
  212. package/dist/esm/queries/ObservableQuerySubscription.d.ts.map +1 -1
  213. package/dist/esm/queries/ObservableQuerySubscription.js +12 -3
  214. package/dist/esm/queries/ObservableQuerySubscription.js.map +1 -1
  215. package/dist/esm/queries/Paging.d.ts.map +1 -1
  216. package/dist/esm/queries/Paging.js +20 -6
  217. package/dist/esm/queries/Paging.js.map +1 -1
  218. package/dist/esm/queries/PagingInfo.d.ts.map +1 -1
  219. package/dist/esm/queries/PagingInfo.js +23 -7
  220. package/dist/esm/queries/PagingInfo.js.map +1 -1
  221. package/dist/esm/queries/QueryFor.d.ts.map +1 -1
  222. package/dist/esm/queries/QueryFor.js +42 -24
  223. package/dist/esm/queries/QueryFor.js.map +1 -1
  224. package/dist/esm/queries/QueryInstanceCache.d.ts.map +1 -1
  225. package/dist/esm/queries/QueryInstanceCache.js +149 -37
  226. package/dist/esm/queries/QueryInstanceCache.js.map +1 -1
  227. package/dist/esm/queries/QueryProvider.d.ts.map +1 -1
  228. package/dist/esm/queries/QueryProvider.js +13 -3
  229. package/dist/esm/queries/QueryProvider.js.map +1 -1
  230. package/dist/esm/queries/QueryResult.d.ts.map +1 -1
  231. package/dist/esm/queries/QueryResult.js +39 -33
  232. package/dist/esm/queries/QueryResult.js.map +1 -1
  233. package/dist/esm/queries/QueryResultWithState.d.ts.map +1 -1
  234. package/dist/esm/queries/QueryResultWithState.js +26 -4
  235. package/dist/esm/queries/QueryResultWithState.js.map +1 -1
  236. package/dist/esm/queries/QueryTransportMethod.js +13 -5
  237. package/dist/esm/queries/QueryTransportMethod.js.map +1 -1
  238. package/dist/esm/queries/QueryValidator.d.ts.map +1 -1
  239. package/dist/esm/queries/QueryValidator.js +10 -2
  240. package/dist/esm/queries/QueryValidator.js.map +1 -1
  241. package/dist/esm/queries/ReconnectPolicy.d.ts.map +1 -1
  242. package/dist/esm/queries/ReconnectPolicy.js +27 -6
  243. package/dist/esm/queries/ReconnectPolicy.js.map +1 -1
  244. package/dist/esm/queries/ServerSentEventHubConnection.d.ts.map +1 -1
  245. package/dist/esm/queries/ServerSentEventHubConnection.js +107 -61
  246. package/dist/esm/queries/ServerSentEventHubConnection.js.map +1 -1
  247. package/dist/esm/queries/ServerSentEventQueryConnection.d.ts.map +1 -1
  248. package/dist/esm/queries/ServerSentEventQueryConnection.js +31 -23
  249. package/dist/esm/queries/ServerSentEventQueryConnection.js.map +1 -1
  250. package/dist/esm/queries/SortDirection.js +16 -6
  251. package/dist/esm/queries/SortDirection.js.map +1 -1
  252. package/dist/esm/queries/Sorting.d.ts.map +1 -1
  253. package/dist/esm/queries/Sorting.js +16 -4
  254. package/dist/esm/queries/Sorting.js.map +1 -1
  255. package/dist/esm/queries/SortingActions.d.ts.map +1 -1
  256. package/dist/esm/queries/SortingActions.js +15 -4
  257. package/dist/esm/queries/SortingActions.js.map +1 -1
  258. package/dist/esm/queries/SortingActionsForObservableQuery.d.ts.map +1 -1
  259. package/dist/esm/queries/SortingActionsForObservableQuery.js +16 -4
  260. package/dist/esm/queries/SortingActionsForObservableQuery.js.map +1 -1
  261. package/dist/esm/queries/SortingActionsForQuery.d.ts.map +1 -1
  262. package/dist/esm/queries/SortingActionsForQuery.js +16 -4
  263. package/dist/esm/queries/SortingActionsForQuery.js.map +1 -1
  264. package/dist/esm/queries/ValidateRequestArguments.js +13 -9
  265. package/dist/esm/queries/ValidateRequestArguments.js.map +1 -1
  266. package/dist/esm/queries/WebSocketHubConnection.d.ts.map +1 -1
  267. package/dist/esm/queries/WebSocketHubConnection.js +97 -52
  268. package/dist/esm/queries/WebSocketHubConnection.js.map +1 -1
  269. package/dist/esm/queries/WebSocketMessage.js +16 -6
  270. package/dist/esm/queries/WebSocketMessage.js.map +1 -1
  271. package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts.map +1 -1
  272. package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts.map +1 -1
  273. package/dist/esm/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +1 -1
  274. package/dist/esm/queries/for_ObservableQueryFor/given/TestQueries.d.ts.map +1 -1
  275. package/dist/esm/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts.map +1 -1
  276. package/dist/esm/queries/for_QueryFor/given/TestQueries.d.ts.map +1 -1
  277. package/dist/esm/queries/for_QueryFor/given/a_query_for.d.ts.map +1 -1
  278. package/dist/esm/queries/for_QueryFor/given/a_query_with_validator.d.ts.map +1 -1
  279. package/dist/esm/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +1 -1
  280. package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +1 -1
  281. package/dist/esm/queries/index.js +3 -1
  282. package/dist/esm/queries/index.js.map +1 -1
  283. package/dist/esm/reflection/ParameterDescriptor.d.ts.map +1 -1
  284. package/dist/esm/reflection/ParameterDescriptor.js +11 -2
  285. package/dist/esm/reflection/ParameterDescriptor.js.map +1 -1
  286. package/dist/esm/reflection/ParametersHelper.d.ts.map +1 -1
  287. package/dist/esm/reflection/ParametersHelper.js +11 -3
  288. package/dist/esm/reflection/ParametersHelper.js.map +1 -1
  289. package/dist/esm/reflection/PropertyDescriptor.d.ts.map +1 -1
  290. package/dist/esm/reflection/PropertyDescriptor.js +11 -2
  291. package/dist/esm/reflection/PropertyDescriptor.js.map +1 -1
  292. package/dist/esm/reflection/index.js +3 -0
  293. package/dist/esm/reflection/index.js.map +1 -1
  294. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  295. package/dist/esm/validation/PropertyRule.d.ts.map +1 -1
  296. package/dist/esm/validation/PropertyRule.js +23 -5
  297. package/dist/esm/validation/PropertyRule.js.map +1 -1
  298. package/dist/esm/validation/PropertyValidator.d.ts.map +1 -1
  299. package/dist/esm/validation/PropertyValidator.js +25 -6
  300. package/dist/esm/validation/PropertyValidator.js.map +1 -1
  301. package/dist/esm/validation/RuleBuilder.d.ts.map +1 -1
  302. package/dist/esm/validation/RuleBuilder.js +22 -4
  303. package/dist/esm/validation/RuleBuilder.js.map +1 -1
  304. package/dist/esm/validation/RuleBuilderExtensions.js +95 -13
  305. package/dist/esm/validation/RuleBuilderExtensions.js.map +1 -1
  306. package/dist/esm/validation/ValidationResult.d.ts.map +1 -1
  307. package/dist/esm/validation/ValidationResult.js +6 -2
  308. package/dist/esm/validation/ValidationResult.js.map +1 -1
  309. package/dist/esm/validation/ValidationResultSeverity.js +19 -7
  310. package/dist/esm/validation/ValidationResultSeverity.js.map +1 -1
  311. package/dist/esm/validation/Validator.d.ts.map +1 -1
  312. package/dist/esm/validation/Validator.js +32 -9
  313. package/dist/esm/validation/Validator.js.map +1 -1
  314. package/dist/esm/validation/index.js +3 -0
  315. package/dist/esm/validation/index.js.map +1 -1
  316. package/dist/esm/validation/rules/ComparisonRules.d.ts.map +1 -1
  317. package/dist/esm/validation/rules/ComparisonRules.js +46 -20
  318. package/dist/esm/validation/rules/ComparisonRules.js.map +1 -1
  319. package/dist/esm/validation/rules/EmailRule.d.ts.map +1 -1
  320. package/dist/esm/validation/rules/EmailRule.js +12 -4
  321. package/dist/esm/validation/rules/EmailRule.js.map +1 -1
  322. package/dist/esm/validation/rules/LengthRules.d.ts.map +1 -1
  323. package/dist/esm/validation/rules/LengthRules.js +39 -19
  324. package/dist/esm/validation/rules/LengthRules.js.map +1 -1
  325. package/dist/esm/validation/rules/NotEmptyRule.d.ts.map +1 -1
  326. package/dist/esm/validation/rules/NotEmptyRule.js +20 -6
  327. package/dist/esm/validation/rules/NotEmptyRule.js.map +1 -1
  328. package/dist/esm/validation/rules/PhoneRule.d.ts.map +1 -1
  329. package/dist/esm/validation/rules/PhoneRule.js +12 -4
  330. package/dist/esm/validation/rules/PhoneRule.js.map +1 -1
  331. package/dist/esm/validation/rules/RegexRule.d.ts.map +1 -1
  332. package/dist/esm/validation/rules/RegexRule.js +15 -6
  333. package/dist/esm/validation/rules/RegexRule.js.map +1 -1
  334. package/dist/esm/validation/rules/UrlRule.d.ts.map +1 -1
  335. package/dist/esm/validation/rules/UrlRule.js +12 -4
  336. package/dist/esm/validation/rules/UrlRule.js.map +1 -1
  337. package/package.json +1 -1
  338. package/dist/cjs/GetHttpHeaders.d.ts +0 -2
  339. package/dist/cjs/GetHttpHeaders.d.ts.map +0 -1
  340. package/dist/cjs/Globals.d.ts +0 -21
  341. package/dist/cjs/Globals.d.ts.map +0 -1
  342. package/dist/cjs/ICanBeConfigured.d.ts +0 -8
  343. package/dist/cjs/ICanBeConfigured.d.ts.map +0 -1
  344. package/dist/cjs/UrlHelpers.d.ts +0 -9
  345. package/dist/cjs/UrlHelpers.d.ts.map +0 -1
  346. package/dist/cjs/commands/Command.d.ts +0 -45
  347. package/dist/cjs/commands/Command.d.ts.map +0 -1
  348. package/dist/cjs/commands/CommandResult.d.ts +0 -49
  349. package/dist/cjs/commands/CommandResult.d.ts.map +0 -1
  350. package/dist/cjs/commands/CommandResults.d.ts +0 -23
  351. package/dist/cjs/commands/CommandResults.d.ts.map +0 -1
  352. package/dist/cjs/commands/CommandValidator.d.ts +0 -6
  353. package/dist/cjs/commands/CommandValidator.d.ts.map +0 -1
  354. package/dist/cjs/commands/ICommand.d.ts +0 -21
  355. package/dist/cjs/commands/ICommand.d.ts.map +0 -1
  356. package/dist/cjs/commands/ICommandResult.d.ts +0 -15
  357. package/dist/cjs/commands/ICommandResult.d.ts.map +0 -1
  358. package/dist/cjs/commands/for_Command/CommandWithRouteParams.d.ts +0 -16
  359. package/dist/cjs/commands/for_Command/CommandWithRouteParams.d.ts.map +0 -1
  360. package/dist/cjs/commands/for_Command/SomeCommand.d.ts +0 -14
  361. package/dist/cjs/commands/for_Command/SomeCommand.d.ts.map +0 -1
  362. package/dist/cjs/commands/for_Command/given/a_command.d.ts +0 -12
  363. package/dist/cjs/commands/for_Command/given/a_command.d.ts.map +0 -1
  364. package/dist/cjs/commands/for_Command/given/a_command_with_validator.d.ts +0 -33
  365. package/dist/cjs/commands/for_Command/given/a_command_with_validator.d.ts.map +0 -1
  366. package/dist/cjs/commands/for_Command/when_clearing_the_command.d.ts +0 -2
  367. package/dist/cjs/commands/for_Command/when_clearing_the_command.d.ts.map +0 -1
  368. package/dist/cjs/commands/for_Command/when_constructing_command.d.ts +0 -2
  369. package/dist/cjs/commands/for_Command/when_constructing_command.d.ts.map +0 -1
  370. package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_api_base_path.d.ts +0 -2
  371. package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_api_base_path.d.ts.map +0 -1
  372. package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_origin.d.ts +0 -2
  373. package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_origin.d.ts.map +0 -1
  374. package/dist/cjs/commands/for_Command/when_executing/and_command_route_not_found.d.ts +0 -2
  375. package/dist/cjs/commands/for_Command/when_executing/and_command_route_not_found.d.ts.map +0 -1
  376. package/dist/cjs/commands/for_Command/when_executing/and_fetch_throws_exception.d.ts +0 -2
  377. package/dist/cjs/commands/for_Command/when_executing/and_fetch_throws_exception.d.ts.map +0 -1
  378. package/dist/cjs/commands/for_Command/when_executing/with_allowed_severity_warning.d.ts +0 -2
  379. package/dist/cjs/commands/for_Command/when_executing/with_allowed_severity_warning.d.ts.map +0 -1
  380. package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failing.d.ts +0 -2
  381. package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failing.d.ts.map +0 -1
  382. package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failure_and_custom_message.d.ts +0 -2
  383. package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failure_and_custom_message.d.ts.map +0 -1
  384. package/dist/cjs/commands/for_Command/when_executing/with_client_validation_passing.d.ts +0 -2
  385. package/dist/cjs/commands/for_Command/when_executing/with_client_validation_passing.d.ts.map +0 -1
  386. package/dist/cjs/commands/for_Command/when_executing/with_command_properties.d.ts +0 -2
  387. package/dist/cjs/commands/for_Command/when_executing/with_command_properties.d.ts.map +0 -1
  388. package/dist/cjs/commands/for_Command/when_executing/with_custom_http_headers.d.ts +0 -2
  389. package/dist/cjs/commands/for_Command/when_executing/with_custom_http_headers.d.ts.map +0 -1
  390. package/dist/cjs/commands/for_Command/when_executing/with_empty_required_string_property.d.ts +0 -2
  391. package/dist/cjs/commands/for_Command/when_executing/with_empty_required_string_property.d.ts.map +0 -1
  392. package/dist/cjs/commands/for_Command/when_executing/with_microservice_header.d.ts +0 -2
  393. package/dist/cjs/commands/for_Command/when_executing/with_microservice_header.d.ts.map +0 -1
  394. package/dist/cjs/commands/for_Command/when_executing/with_missing_required_property.d.ts +0 -2
  395. package/dist/cjs/commands/for_Command/when_executing/with_missing_required_property.d.ts.map +0 -1
  396. package/dist/cjs/commands/for_Command/when_executing/with_null_required_property.d.ts +0 -2
  397. package/dist/cjs/commands/for_Command/when_executing/with_null_required_property.d.ts.map +0 -1
  398. package/dist/cjs/commands/for_Command/when_executing/with_origin_and_api_base_path.d.ts +0 -2
  399. package/dist/cjs/commands/for_Command/when_executing/with_origin_and_api_base_path.d.ts.map +0 -1
  400. package/dist/cjs/commands/for_Command/when_executing/with_route_parameters.d.ts +0 -2
  401. package/dist/cjs/commands/for_Command/when_executing/with_route_parameters.d.ts.map +0 -1
  402. package/dist/cjs/commands/for_Command/when_executing/with_successful_response.d.ts +0 -2
  403. package/dist/cjs/commands/for_Command/when_executing/with_successful_response.d.ts.map +0 -1
  404. package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_different_from_initial_value.d.ts +0 -2
  405. package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_different_from_initial_value.d.ts.map +0 -1
  406. package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_same_as_initial_value.d.ts +0 -2
  407. package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_same_as_initial_value.d.ts.map +0 -1
  408. package/dist/cjs/commands/for_Command/when_property_changes_and_initial_value_is_undefined.d.ts +0 -2
  409. package/dist/cjs/commands/for_Command/when_property_changes_and_initial_value_is_undefined.d.ts.map +0 -1
  410. package/dist/cjs/commands/for_Command/when_property_changes_and_there_is_a_callback.d.ts +0 -2
  411. package/dist/cjs/commands/for_Command/when_property_changes_and_there_is_a_callback.d.ts.map +0 -1
  412. package/dist/cjs/commands/for_Command/when_property_has_changed_and_we_revert.d.ts +0 -2
  413. package/dist/cjs/commands/for_Command/when_property_has_changed_and_we_revert.d.ts.map +0 -1
  414. package/dist/cjs/commands/for_Command/when_setting_initial_values_after_property_changed.d.ts +0 -2
  415. package/dist/cjs/commands/for_Command/when_setting_initial_values_after_property_changed.d.ts.map +0 -1
  416. package/dist/cjs/commands/for_Command/when_validating/and_fetch_throws_exception.d.ts +0 -2
  417. package/dist/cjs/commands/for_Command/when_validating/and_fetch_throws_exception.d.ts.map +0 -1
  418. package/dist/cjs/commands/for_Command/when_validating/and_validation_endpoint_not_found.d.ts +0 -2
  419. package/dist/cjs/commands/for_Command/when_validating/and_validation_endpoint_not_found.d.ts.map +0 -1
  420. package/dist/cjs/commands/for_Command/when_validating/does_not_update_initial_values.d.ts +0 -2
  421. package/dist/cjs/commands/for_Command/when_validating/does_not_update_initial_values.d.ts.map +0 -1
  422. package/dist/cjs/commands/for_Command/when_validating/with_client_validation_failure.d.ts +0 -2
  423. package/dist/cjs/commands/for_Command/when_validating/with_client_validation_failure.d.ts.map +0 -1
  424. package/dist/cjs/commands/for_Command/when_validating/with_client_validation_passing.d.ts +0 -2
  425. package/dist/cjs/commands/for_Command/when_validating/with_client_validation_passing.d.ts.map +0 -1
  426. package/dist/cjs/commands/for_Command/when_validating/with_empty_required_string_property.d.ts +0 -2
  427. package/dist/cjs/commands/for_Command/when_validating/with_empty_required_string_property.d.ts.map +0 -1
  428. package/dist/cjs/commands/for_Command/when_validating/with_null_required_property.d.ts +0 -2
  429. package/dist/cjs/commands/for_Command/when_validating/with_null_required_property.d.ts.map +0 -1
  430. package/dist/cjs/commands/for_Command/when_validating/with_required_property_missing.d.ts +0 -2
  431. package/dist/cjs/commands/for_Command/when_validating/with_required_property_missing.d.ts.map +0 -1
  432. package/dist/cjs/commands/for_Command/when_validating/with_route_parameters.d.ts +0 -2
  433. package/dist/cjs/commands/for_Command/when_validating/with_route_parameters.d.ts.map +0 -1
  434. package/dist/cjs/commands/for_Command/when_validating/with_successful_response.d.ts +0 -2
  435. package/dist/cjs/commands/for_Command/when_validating/with_successful_response.d.ts.map +0 -1
  436. package/dist/cjs/commands/for_Command/when_validating/with_validation_errors.d.ts +0 -2
  437. package/dist/cjs/commands/for_Command/when_validating/with_validation_errors.d.ts.map +0 -1
  438. package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_failure.d.ts +0 -2
  439. package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_failure.d.ts.map +0 -1
  440. package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_passing.d.ts +0 -2
  441. package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_passing.d.ts.map +0 -1
  442. package/dist/cjs/commands/for_Command/when_validating_client_side/with_required_property_missing.d.ts +0 -2
  443. package/dist/cjs/commands/for_Command/when_validating_client_side/with_required_property_missing.d.ts.map +0 -1
  444. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_has_exceptions.d.ts +0 -2
  445. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_has_exceptions.d.ts.map +0 -1
  446. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_invalid.d.ts +0 -2
  447. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_invalid.d.ts.map +0 -1
  448. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_successful.d.ts +0 -2
  449. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_successful.d.ts.map +0 -1
  450. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_unauthorized.d.ts +0 -2
  451. package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_unauthorized.d.ts.map +0 -1
  452. package/dist/cjs/commands/for_CommandResult/when_constructing_with_primitive_response.d.ts +0 -2
  453. package/dist/cjs/commands/for_CommandResult/when_constructing_with_primitive_response.d.ts.map +0 -1
  454. package/dist/cjs/commands/index.d.ts +0 -8
  455. package/dist/cjs/commands/index.d.ts.map +0 -1
  456. package/dist/cjs/deepEqual.d.ts +0 -2
  457. package/dist/cjs/deepEqual.d.ts.map +0 -1
  458. package/dist/cjs/given.d.ts +0 -5
  459. package/dist/cjs/given.d.ts.map +0 -1
  460. package/dist/cjs/helpers/fetchHelper.d.ts +0 -7
  461. package/dist/cjs/helpers/fetchHelper.d.ts.map +0 -1
  462. package/dist/cjs/identity/IIdentity.d.ts +0 -10
  463. package/dist/cjs/identity/IIdentity.d.ts.map +0 -1
  464. package/dist/cjs/identity/IIdentityProvider.d.ts +0 -6
  465. package/dist/cjs/identity/IIdentityProvider.d.ts.map +0 -1
  466. package/dist/cjs/identity/IdentityProvider.d.ts +0 -20
  467. package/dist/cjs/identity/IdentityProvider.d.ts.map +0 -1
  468. package/dist/cjs/identity/IdentityProviderResult.d.ts +0 -7
  469. package/dist/cjs/identity/IdentityProviderResult.d.ts.map +0 -1
  470. package/dist/cjs/identity/for_IdentityProvider/given/an_identity_provider.d.ts +0 -12
  471. package/dist/cjs/identity/for_IdentityProvider/given/an_identity_provider.d.ts.map +0 -1
  472. package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_roles.d.ts +0 -2
  473. package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_roles.d.ts.map +0 -1
  474. package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_type_safe_details.d.ts +0 -2
  475. package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_type_safe_details.d.ts.map +0 -1
  476. package/dist/cjs/identity/for_IdentityProvider/when_getting_current/without_roles.d.ts +0 -2
  477. package/dist/cjs/identity/for_IdentityProvider/when_getting_current/without_roles.d.ts.map +0 -1
  478. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_api_base_path_set.d.ts +0 -2
  479. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_api_base_path_set.d.ts.map +0 -1
  480. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_globals_api_base_path.d.ts +0 -2
  481. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_globals_api_base_path.d.ts.map +0 -1
  482. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_origin_set.d.ts +0 -2
  483. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_origin_set.d.ts.map +0 -1
  484. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_type_safe_details.d.ts +0 -2
  485. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_type_safe_details.d.ts.map +0 -1
  486. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_unauthorized_response.d.ts +0 -2
  487. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_unauthorized_response.d.ts.map +0 -1
  488. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/without_api_base_path.d.ts +0 -2
  489. package/dist/cjs/identity/for_IdentityProvider/when_refreshing/without_api_base_path.d.ts.map +0 -1
  490. package/dist/cjs/identity/for_IdentityProvider/when_setting_api_base_path.d.ts +0 -2
  491. package/dist/cjs/identity/for_IdentityProvider/when_setting_api_base_path.d.ts.map +0 -1
  492. package/dist/cjs/identity/for_IdentityProvider/when_setting_origin.d.ts +0 -2
  493. package/dist/cjs/identity/for_IdentityProvider/when_setting_origin.d.ts.map +0 -1
  494. package/dist/cjs/identity/index.d.ts +0 -5
  495. package/dist/cjs/identity/index.d.ts.map +0 -1
  496. package/dist/cjs/index.d.ts +0 -14
  497. package/dist/cjs/index.d.ts.map +0 -1
  498. package/dist/cjs/joinPaths.d.ts +0 -2
  499. package/dist/cjs/joinPaths.d.ts.map +0 -1
  500. package/dist/cjs/messaging/IMessenger.d.ts +0 -10
  501. package/dist/cjs/messaging/IMessenger.d.ts.map +0 -1
  502. package/dist/cjs/messaging/Message.d.ts +0 -7
  503. package/dist/cjs/messaging/Message.d.ts.map +0 -1
  504. package/dist/cjs/messaging/Messenger.d.ts +0 -20
  505. package/dist/cjs/messaging/Messenger.d.ts.map +0 -1
  506. package/dist/cjs/messaging/for_Messenger/when_scoping_messages.d.ts +0 -2
  507. package/dist/cjs/messaging/for_Messenger/when_scoping_messages.d.ts.map +0 -1
  508. package/dist/cjs/messaging/index.d.ts +0 -4
  509. package/dist/cjs/messaging/index.d.ts.map +0 -1
  510. package/dist/cjs/queries/ChangeSet.d.ts +0 -6
  511. package/dist/cjs/queries/ChangeSet.d.ts.map +0 -1
  512. package/dist/cjs/queries/HubConnectionKeepAlive.d.ts +0 -12
  513. package/dist/cjs/queries/HubConnectionKeepAlive.d.ts.map +0 -1
  514. package/dist/cjs/queries/IChangeStreamFor.d.ts +0 -4
  515. package/dist/cjs/queries/IChangeStreamFor.d.ts.map +0 -1
  516. package/dist/cjs/queries/IObservableQueryConnection.d.ts +0 -8
  517. package/dist/cjs/queries/IObservableQueryConnection.d.ts.map +0 -1
  518. package/dist/cjs/queries/IObservableQueryDiagnostics.d.ts +0 -9
  519. package/dist/cjs/queries/IObservableQueryDiagnostics.d.ts.map +0 -1
  520. package/dist/cjs/queries/IObservableQueryFor.d.ts +0 -14
  521. package/dist/cjs/queries/IObservableQueryFor.d.ts.map +0 -1
  522. package/dist/cjs/queries/IObservableQueryHubConnection.d.ts +0 -12
  523. package/dist/cjs/queries/IObservableQueryHubConnection.d.ts.map +0 -1
  524. package/dist/cjs/queries/IQuery.d.ts +0 -10
  525. package/dist/cjs/queries/IQuery.d.ts.map +0 -1
  526. package/dist/cjs/queries/IQueryFor.d.ts +0 -13
  527. package/dist/cjs/queries/IQueryFor.d.ts.map +0 -1
  528. package/dist/cjs/queries/IQueryProvider.d.ts +0 -6
  529. package/dist/cjs/queries/IQueryProvider.d.ts.map +0 -1
  530. package/dist/cjs/queries/IQueryResult.d.ts +0 -17
  531. package/dist/cjs/queries/IQueryResult.d.ts.map +0 -1
  532. package/dist/cjs/queries/IReconnectPolicy.d.ts +0 -8
  533. package/dist/cjs/queries/IReconnectPolicy.d.ts.map +0 -1
  534. package/dist/cjs/queries/NullObservableQueryConnection.d.ts +0 -11
  535. package/dist/cjs/queries/NullObservableQueryConnection.d.ts.map +0 -1
  536. package/dist/cjs/queries/ObservableQueryConnection.d.ts +0 -29
  537. package/dist/cjs/queries/ObservableQueryConnection.d.ts.map +0 -1
  538. package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts +0 -13
  539. package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts.map +0 -1
  540. package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts +0 -9
  541. package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts.map +0 -1
  542. package/dist/cjs/queries/ObservableQueryDiagnostics.d.ts +0 -21
  543. package/dist/cjs/queries/ObservableQueryDiagnostics.d.ts.map +0 -1
  544. package/dist/cjs/queries/ObservableQueryDiagnosticsSnapshot.d.ts +0 -48
  545. package/dist/cjs/queries/ObservableQueryDiagnosticsSnapshot.d.ts.map +0 -1
  546. package/dist/cjs/queries/ObservableQueryFor.d.ts +0 -37
  547. package/dist/cjs/queries/ObservableQueryFor.d.ts.map +0 -1
  548. package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts +0 -33
  549. package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts.map +0 -1
  550. package/dist/cjs/queries/ObservableQuerySubscription.d.ts +0 -7
  551. package/dist/cjs/queries/ObservableQuerySubscription.d.ts.map +0 -1
  552. package/dist/cjs/queries/Paging.d.ts +0 -8
  553. package/dist/cjs/queries/Paging.d.ts.map +0 -1
  554. package/dist/cjs/queries/PagingInfo.d.ts +0 -9
  555. package/dist/cjs/queries/PagingInfo.d.ts.map +0 -1
  556. package/dist/cjs/queries/QueryFor.d.ts +0 -34
  557. package/dist/cjs/queries/QueryFor.d.ts.map +0 -1
  558. package/dist/cjs/queries/QueryInstanceCache.d.ts +0 -39
  559. package/dist/cjs/queries/QueryInstanceCache.d.ts.map +0 -1
  560. package/dist/cjs/queries/QueryProvider.d.ts +0 -13
  561. package/dist/cjs/queries/QueryProvider.d.ts.map +0 -1
  562. package/dist/cjs/queries/QueryResult.d.ts +0 -53
  563. package/dist/cjs/queries/QueryResult.d.ts.map +0 -1
  564. package/dist/cjs/queries/QueryResultWithState.d.ts +0 -24
  565. package/dist/cjs/queries/QueryResultWithState.d.ts.map +0 -1
  566. package/dist/cjs/queries/QueryTransportMethod.d.ts +0 -5
  567. package/dist/cjs/queries/QueryTransportMethod.d.ts.map +0 -1
  568. package/dist/cjs/queries/QueryValidator.d.ts +0 -6
  569. package/dist/cjs/queries/QueryValidator.d.ts.map +0 -1
  570. package/dist/cjs/queries/ReconnectPolicy.d.ts +0 -15
  571. package/dist/cjs/queries/ReconnectPolicy.d.ts.map +0 -1
  572. package/dist/cjs/queries/ServerSentEventHubConnection.d.ts +0 -41
  573. package/dist/cjs/queries/ServerSentEventHubConnection.d.ts.map +0 -1
  574. package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts +0 -14
  575. package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts.map +0 -1
  576. package/dist/cjs/queries/SortDirection.d.ts +0 -6
  577. package/dist/cjs/queries/SortDirection.d.ts.map +0 -1
  578. package/dist/cjs/queries/Sorting.d.ts +0 -9
  579. package/dist/cjs/queries/Sorting.d.ts.map +0 -1
  580. package/dist/cjs/queries/SortingActions.d.ts +0 -10
  581. package/dist/cjs/queries/SortingActions.d.ts.map +0 -1
  582. package/dist/cjs/queries/SortingActionsForObservableQuery.d.ts +0 -10
  583. package/dist/cjs/queries/SortingActionsForObservableQuery.d.ts.map +0 -1
  584. package/dist/cjs/queries/SortingActionsForQuery.d.ts +0 -10
  585. package/dist/cjs/queries/SortingActionsForQuery.d.ts.map +0 -1
  586. package/dist/cjs/queries/ValidateRequestArguments.d.ts +0 -2
  587. package/dist/cjs/queries/ValidateRequestArguments.d.ts.map +0 -1
  588. package/dist/cjs/queries/WebSocketHubConnection.d.ts +0 -58
  589. package/dist/cjs/queries/WebSocketHubConnection.d.ts.map +0 -1
  590. package/dist/cjs/queries/WebSocketMessage.d.ts +0 -11
  591. package/dist/cjs/queries/WebSocketMessage.d.ts.map +0 -1
  592. package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts +0 -2
  593. package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts.map +0 -1
  594. package/dist/cjs/queries/for_HubConnectionKeepAlive/when_started_with_custom_idle_threshold/respects_threshold.d.ts +0 -2
  595. package/dist/cjs/queries/for_HubConnectionKeepAlive/when_started_with_custom_idle_threshold/respects_threshold.d.ts.map +0 -1
  596. package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts +0 -9
  597. package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts.map +0 -1
  598. package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts +0 -21
  599. package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts.map +0 -1
  600. package/dist/cjs/queries/for_ObservableQueryConnection/when_constructing.d.ts +0 -2
  601. package/dist/cjs/queries/for_ObservableQueryConnection/when_constructing.d.ts.map +0 -1
  602. package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_data_message_with_type.d.ts +0 -2
  603. package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_data_message_with_type.d.ts.map +0 -1
  604. package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_legacy_data_message.d.ts +0 -2
  605. package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_legacy_data_message.d.ts.map +0 -1
  606. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts +0 -9
  607. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +0 -1
  608. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts +0 -2
  609. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts.map +0 -1
  610. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts +0 -2
  611. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts.map +0 -1
  612. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts +0 -2
  613. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts.map +0 -1
  614. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_exceeding_safe_limit.d.ts +0 -2
  615. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_exceeding_safe_limit.d.ts.map +0 -1
  616. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_within_safe_limit.d.ts +0 -2
  617. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_within_safe_limit.d.ts.map +0 -1
  618. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts +0 -2
  619. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts.map +0 -1
  620. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport_and_high_connection_count.d.ts +0 -2
  621. package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport_and_high_connection_count.d.ts.map +0 -1
  622. package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts +0 -2
  623. package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts.map +0 -1
  624. package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts +0 -2
  625. package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts.map +0 -1
  626. package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts +0 -2
  627. package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts.map +0 -1
  628. package/dist/cjs/queries/for_ObservableQueryDiagnostics/when_tracking_owners.d.ts +0 -2
  629. package/dist/cjs/queries/for_ObservableQueryDiagnostics/when_tracking_owners.d.ts.map +0 -1
  630. package/dist/cjs/queries/for_ObservableQueryFor/given/TestQueries.d.ts +0 -53
  631. package/dist/cjs/queries/for_ObservableQueryFor/given/TestQueries.d.ts.map +0 -1
  632. package/dist/cjs/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts +0 -10
  633. package/dist/cjs/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts.map +0 -1
  634. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing.d.ts +0 -2
  635. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing.d.ts.map +0 -1
  636. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_enumerable.d.ts +0 -2
  637. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_enumerable.d.ts.map +0 -1
  638. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_api_base_path.d.ts +0 -2
  639. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_api_base_path.d.ts.map +0 -1
  640. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_origin.d.ts +0 -2
  641. package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_origin.d.ts.map +0 -1
  642. package/dist/cjs/queries/for_ObservableQueryFor/when_disposing.d.ts +0 -2
  643. package/dist/cjs/queries/for_ObservableQueryFor/when_disposing.d.ts.map +0 -1
  644. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_enumerable_query.d.ts +0 -2
  645. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_enumerable_query.d.ts.map +0 -1
  646. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_invalid_arguments.d.ts +0 -2
  647. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_invalid_arguments.d.ts.map +0 -1
  648. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_paging.d.ts +0 -2
  649. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_paging.d.ts.map +0 -1
  650. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_parameter_descriptor_values.d.ts +0 -2
  651. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_parameter_descriptor_values.d.ts.map +0 -1
  652. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts +0 -2
  653. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts.map +0 -1
  654. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partially_missing_required_arguments.d.ts +0 -2
  655. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partially_missing_required_arguments.d.ts.map +0 -1
  656. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts +0 -2
  657. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts.map +0 -1
  658. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_sorting.d.ts +0 -2
  659. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_sorting.d.ts.map +0 -1
  660. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_valid_arguments.d.ts +0 -2
  661. package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_valid_arguments.d.ts.map +0 -1
  662. package/dist/cjs/queries/for_ObservableQueryFor/when_setting_api_base_path.d.ts +0 -2
  663. package/dist/cjs/queries/for_ObservableQueryFor/when_setting_api_base_path.d.ts.map +0 -1
  664. package/dist/cjs/queries/for_ObservableQueryFor/when_setting_microservice.d.ts +0 -2
  665. package/dist/cjs/queries/for_ObservableQueryFor/when_setting_microservice.d.ts.map +0 -1
  666. package/dist/cjs/queries/for_ObservableQueryFor/when_setting_origin.d.ts +0 -2
  667. package/dist/cjs/queries/for_ObservableQueryFor/when_setting_origin.d.ts.map +0 -1
  668. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts +0 -2
  669. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts.map +0 -1
  670. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts +0 -2
  671. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts.map +0 -1
  672. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts +0 -2
  673. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts.map +0 -1
  674. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_enumerable_query.d.ts +0 -2
  675. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_enumerable_query.d.ts.map +0 -1
  676. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_multiple_required_route_parameters.d.ts +0 -2
  677. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_multiple_required_route_parameters.d.ts.map +0 -1
  678. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_null_or_undefined_args.d.ts +0 -2
  679. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_null_or_undefined_args.d.ts.map +0 -1
  680. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_route_and_query_args.d.ts +0 -2
  681. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_route_and_query_args.d.ts.map +0 -1
  682. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_stale_descriptor_backed_instance_property.d.ts +0 -2
  683. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_stale_descriptor_backed_instance_property.d.ts.map +0 -1
  684. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_invalid_arguments.d.ts +0 -2
  685. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_invalid_arguments.d.ts.map +0 -1
  686. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_paging.d.ts +0 -2
  687. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_paging.d.ts.map +0 -1
  688. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.d.ts +0 -2
  689. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.d.ts.map +0 -1
  690. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.d.ts +0 -2
  691. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.d.ts.map +0 -1
  692. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_sorting.d.ts +0 -2
  693. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_sorting.d.ts.map +0 -1
  694. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_valid_arguments.d.ts +0 -2
  695. package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_valid_arguments.d.ts.map +0 -1
  696. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_changed_cache_key.d.ts +0 -2
  697. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_changed_cache_key.d.ts.map +0 -1
  698. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_new_cache_key.d.ts +0 -2
  699. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_new_cache_key.d.ts.map +0 -1
  700. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_an_explicit_size.d.ts +0 -2
  701. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_an_explicit_size.d.ts.map +0 -1
  702. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_the_same_cache_key.d.ts +0 -2
  703. package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_the_same_cache_key.d.ts.map +0 -1
  704. package/dist/cjs/queries/for_QueryFor/given/TestQueries.d.ts +0 -57
  705. package/dist/cjs/queries/for_QueryFor/given/TestQueries.d.ts.map +0 -1
  706. package/dist/cjs/queries/for_QueryFor/given/a_query_for.d.ts +0 -11
  707. package/dist/cjs/queries/for_QueryFor/given/a_query_for.d.ts.map +0 -1
  708. package/dist/cjs/queries/for_QueryFor/given/a_query_with_validator.d.ts +0 -35
  709. package/dist/cjs/queries/for_QueryFor/given/a_query_with_validator.d.ts.map +0 -1
  710. package/dist/cjs/queries/for_QueryFor/when_constructing.d.ts +0 -2
  711. package/dist/cjs/queries/for_QueryFor/when_constructing.d.ts.map +0 -1
  712. package/dist/cjs/queries/for_QueryFor/when_constructing_enumerable.d.ts +0 -2
  713. package/dist/cjs/queries/for_QueryFor/when_constructing_enumerable.d.ts.map +0 -1
  714. package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_api_base_path.d.ts +0 -2
  715. package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_api_base_path.d.ts.map +0 -1
  716. package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_origin.d.ts +0 -2
  717. package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_origin.d.ts.map +0 -1
  718. package/dist/cjs/queries/for_QueryFor/when_performing/with_abort_controller.d.ts +0 -2
  719. package/dist/cjs/queries/for_QueryFor/when_performing/with_abort_controller.d.ts.map +0 -1
  720. package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failing.d.ts +0 -2
  721. package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failing.d.ts.map +0 -1
  722. package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failure_and_custom_message.d.ts +0 -2
  723. package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failure_and_custom_message.d.ts.map +0 -1
  724. package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_passing.d.ts +0 -2
  725. package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_passing.d.ts.map +0 -1
  726. package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_parameter_descriptor_values.d.ts +0 -2
  727. package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_parameter_descriptor_values.d.ts.map +0 -1
  728. package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_query.d.ts +0 -2
  729. package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_query.d.ts.map +0 -1
  730. package/dist/cjs/queries/for_QueryFor/when_performing/with_fetch_error.d.ts +0 -2
  731. package/dist/cjs/queries/for_QueryFor/when_performing/with_fetch_error.d.ts.map +0 -1
  732. package/dist/cjs/queries/for_QueryFor/when_performing/with_invalid_arguments.d.ts +0 -2
  733. package/dist/cjs/queries/for_QueryFor/when_performing/with_invalid_arguments.d.ts.map +0 -1
  734. package/dist/cjs/queries/for_QueryFor/when_performing/with_json_parse_error.d.ts +0 -2
  735. package/dist/cjs/queries/for_QueryFor/when_performing/with_json_parse_error.d.ts.map +0 -1
  736. package/dist/cjs/queries/for_QueryFor/when_performing/with_paging.d.ts +0 -2
  737. package/dist/cjs/queries/for_QueryFor/when_performing/with_paging.d.ts.map +0 -1
  738. package/dist/cjs/queries/for_QueryFor/when_performing/with_parameter_descriptor_values.d.ts +0 -2
  739. package/dist/cjs/queries/for_QueryFor/when_performing/with_parameter_descriptor_values.d.ts.map +0 -1
  740. package/dist/cjs/queries/for_QueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts +0 -2
  741. package/dist/cjs/queries/for_QueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts.map +0 -1
  742. package/dist/cjs/queries/for_QueryFor/when_performing/with_partially_missing_required_arguments.d.ts +0 -2
  743. package/dist/cjs/queries/for_QueryFor/when_performing/with_partially_missing_required_arguments.d.ts.map +0 -1
  744. package/dist/cjs/queries/for_QueryFor/when_performing/with_query_without_required_parameters.d.ts +0 -2
  745. package/dist/cjs/queries/for_QueryFor/when_performing/with_query_without_required_parameters.d.ts.map +0 -1
  746. package/dist/cjs/queries/for_QueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts +0 -2
  747. package/dist/cjs/queries/for_QueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts.map +0 -1
  748. package/dist/cjs/queries/for_QueryFor/when_performing/with_sorting.d.ts +0 -2
  749. package/dist/cjs/queries/for_QueryFor/when_performing/with_sorting.d.ts.map +0 -1
  750. package/dist/cjs/queries/for_QueryFor/when_performing/with_valid_arguments.d.ts +0 -2
  751. package/dist/cjs/queries/for_QueryFor/when_performing/with_valid_arguments.d.ts.map +0 -1
  752. package/dist/cjs/queries/for_QueryFor/when_setting_api_base_path.d.ts +0 -2
  753. package/dist/cjs/queries/for_QueryFor/when_setting_api_base_path.d.ts.map +0 -1
  754. package/dist/cjs/queries/for_QueryFor/when_setting_microservice.d.ts +0 -2
  755. package/dist/cjs/queries/for_QueryFor/when_setting_microservice.d.ts.map +0 -1
  756. package/dist/cjs/queries/for_QueryFor/when_setting_origin.d.ts +0 -2
  757. package/dist/cjs/queries/for_QueryFor/when_setting_origin.d.ts.map +0 -1
  758. package/dist/cjs/queries/for_QueryInstanceCache/when_acquiring/after_release.d.ts +0 -2
  759. package/dist/cjs/queries/for_QueryInstanceCache/when_acquiring/after_release.d.ts.map +0 -1
  760. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts +0 -2
  761. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts.map +0 -1
  762. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts +0 -2
  763. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts.map +0 -1
  764. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts +0 -2
  765. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts.map +0 -1
  766. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts +0 -2
  767. package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts.map +0 -1
  768. package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/with_cancellation_before_timeout.d.ts +0 -2
  769. package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/with_cancellation_before_timeout.d.ts.map +0 -1
  770. package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/without_cancellation.d.ts +0 -2
  771. package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/without_cancellation.d.ts.map +0 -1
  772. package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/an_empty_cache.d.ts +0 -2
  773. package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/an_empty_cache.d.ts.map +0 -1
  774. package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_active_subscriptions.d.ts +0 -2
  775. package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_active_subscriptions.d.ts.map +0 -1
  776. package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_pending_deferred_cleanup.d.ts +0 -2
  777. package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_pending_deferred_cleanup.d.ts.map +0 -1
  778. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts +0 -2
  779. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts.map +0 -1
  780. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts +0 -2
  781. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts.map +0 -1
  782. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts +0 -2
  783. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts.map +0 -1
  784. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts +0 -2
  785. package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts.map +0 -1
  786. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts +0 -2
  787. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts.map +0 -1
  788. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts +0 -2
  789. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts.map +0 -1
  790. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts +0 -2
  791. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts.map +0 -1
  792. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/after_timeout_elapses.d.ts +0 -2
  793. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/after_timeout_elapses.d.ts.map +0 -1
  794. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/before_timeout_elapses.d.ts +0 -2
  795. package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/before_timeout_elapses.d.ts.map +0 -1
  796. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts +0 -2
  797. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts.map +0 -1
  798. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_changed_data.d.ts +0 -2
  799. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_changed_data.d.ts.map +0 -1
  800. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_identical_data_as_previous_result.d.ts +0 -2
  801. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_identical_data_as_previous_result.d.ts.map +0 -1
  802. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/without_previous_result.d.ts +0 -2
  803. package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/without_previous_result.d.ts.map +0 -1
  804. package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_active_subscriptions.d.ts +0 -2
  805. package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_active_subscriptions.d.ts.map +0 -1
  806. package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_no_subscriptions.d.ts +0 -2
  807. package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_no_subscriptions.d.ts.map +0 -1
  808. package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_pending_deferred_cleanup.d.ts +0 -2
  809. package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_pending_deferred_cleanup.d.ts.map +0 -1
  810. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_an_array_with_items.d.ts +0 -2
  811. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_an_array_with_items.d.ts.map +0 -1
  812. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_defined_instance.d.ts +0 -2
  813. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_defined_instance.d.ts.map +0 -1
  814. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_empty_array.d.ts +0 -2
  815. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_empty_array.d.ts.map +0 -1
  816. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_enumerable.d.ts +0 -2
  817. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_enumerable.d.ts.map +0 -1
  818. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_non_enumerable.d.ts +0 -2
  819. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_non_enumerable.d.ts.map +0 -1
  820. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_undefined.d.ts +0 -2
  821. package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_undefined.d.ts.map +0 -1
  822. package/dist/cjs/queries/for_QueryResult/when_data_is_single_item_for_enumerable/and_it_is_an_array.d.ts +0 -2
  823. package/dist/cjs/queries/for_QueryResult/when_data_is_single_item_for_enumerable/and_it_is_an_array.d.ts.map +0 -1
  824. package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_null_default_value.d.ts +0 -2
  825. package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_null_default_value.d.ts.map +0 -1
  826. package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_undefined_default_value.d.ts +0 -2
  827. package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_undefined_default_value.d.ts.map +0 -1
  828. package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_null_data.d.ts +0 -2
  829. package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_null_data.d.ts.map +0 -1
  830. package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_undefined_data.d.ts +0 -2
  831. package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_undefined_data.d.ts.map +0 -1
  832. package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_null_default_value.d.ts +0 -2
  833. package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_null_default_value.d.ts.map +0 -1
  834. package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_undefined_default_value.d.ts +0 -2
  835. package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_undefined_default_value.d.ts.map +0 -1
  836. package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_valid_default_value.d.ts +0 -2
  837. package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_valid_default_value.d.ts.map +0 -1
  838. package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts +0 -2
  839. package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts.map +0 -1
  840. package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts +0 -2
  841. package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts.map +0 -1
  842. package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts +0 -2
  843. package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts.map +0 -1
  844. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts +0 -2
  845. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts.map +0 -1
  846. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts +0 -2
  847. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts.map +0 -1
  848. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts +0 -2
  849. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts.map +0 -1
  850. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_rescheduled_before_first_fires/cancels_previous_timer.d.ts +0 -2
  851. package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_rescheduled_before_first_fires/cancels_previous_timer.d.ts.map +0 -1
  852. package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts +0 -21
  853. package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +0 -1
  854. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts +0 -2
  855. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts.map +0 -1
  856. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts +0 -2
  857. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts.map +0 -1
  858. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts +0 -2
  859. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts.map +0 -1
  860. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts +0 -2
  861. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts.map +0 -1
  862. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts +0 -2
  863. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts.map +0 -1
  864. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/and_subscribe_post_fails.d.ts +0 -2
  865. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/and_subscribe_post_fails.d.ts.map +0 -1
  866. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts +0 -2
  867. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts.map +0 -1
  868. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts +0 -2
  869. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts.map +0 -1
  870. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/nulls_event_source_handlers_before_closing.d.ts +0 -2
  871. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/nulls_event_source_handlers_before_closing.d.ts.map +0 -1
  872. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts +0 -2
  873. package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts.map +0 -1
  874. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts +0 -2
  875. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts.map +0 -1
  876. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts +0 -2
  877. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts.map +0 -1
  878. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts +0 -2
  879. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts.map +0 -1
  880. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts +0 -2
  881. package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts.map +0 -1
  882. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_empty_string_value.d.ts +0 -2
  883. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_empty_string_value.d.ts.map +0 -1
  884. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_missing_property.d.ts +0 -2
  885. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_missing_property.d.ts.map +0 -1
  886. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_no_required_arguments.d.ts +0 -2
  887. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_no_required_arguments.d.ts.map +0 -1
  888. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_null_value.d.ts +0 -2
  889. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_null_value.d.ts.map +0 -1
  890. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_numeric_zero_value.d.ts +0 -2
  891. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_numeric_zero_value.d.ts.map +0 -1
  892. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_undefined_value.d.ts +0 -2
  893. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_undefined_value.d.ts.map +0 -1
  894. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_valid_string_value.d.ts +0 -2
  895. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_valid_string_value.d.ts.map +0 -1
  896. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/without_arguments_object.d.ts +0 -2
  897. package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/without_arguments_object.d.ts.map +0 -1
  898. package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts +0 -23
  899. package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +0 -1
  900. package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts +0 -2
  901. package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts.map +0 -1
  902. package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts +0 -2
  903. package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts.map +0 -1
  904. package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts +0 -2
  905. package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts.map +0 -1
  906. package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts +0 -2
  907. package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts.map +0 -1
  908. package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts +0 -2
  909. package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts.map +0 -1
  910. package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts +0 -2
  911. package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts.map +0 -1
  912. package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts +0 -2
  913. package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts.map +0 -1
  914. package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/nulls_socket_handlers_before_closing.d.ts +0 -2
  915. package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/nulls_socket_handlers_before_closing.d.ts.map +0 -1
  916. package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts +0 -2
  917. package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts.map +0 -1
  918. package/dist/cjs/queries/for_WebSocketMessage/when_creating_messages.d.ts +0 -2
  919. package/dist/cjs/queries/for_WebSocketMessage/when_creating_messages.d.ts.map +0 -1
  920. package/dist/cjs/queries/index.d.ts +0 -39
  921. package/dist/cjs/queries/index.d.ts.map +0 -1
  922. package/dist/cjs/reflection/IHaveParameters.d.ts +0 -5
  923. package/dist/cjs/reflection/IHaveParameters.d.ts.map +0 -1
  924. package/dist/cjs/reflection/ParameterDescriptor.d.ts +0 -8
  925. package/dist/cjs/reflection/ParameterDescriptor.d.ts.map +0 -1
  926. package/dist/cjs/reflection/ParametersHelper.d.ts +0 -5
  927. package/dist/cjs/reflection/ParametersHelper.d.ts.map +0 -1
  928. package/dist/cjs/reflection/PropertyDescriptor.d.ts +0 -8
  929. package/dist/cjs/reflection/PropertyDescriptor.d.ts.map +0 -1
  930. package/dist/cjs/reflection/index.d.ts +0 -5
  931. package/dist/cjs/reflection/index.d.ts.map +0 -1
  932. package/dist/cjs/validation/IValidationRule.d.ts +0 -5
  933. package/dist/cjs/validation/IValidationRule.d.ts.map +0 -1
  934. package/dist/cjs/validation/PropertyRule.d.ts +0 -11
  935. package/dist/cjs/validation/PropertyRule.d.ts.map +0 -1
  936. package/dist/cjs/validation/PropertyValidator.d.ts +0 -11
  937. package/dist/cjs/validation/PropertyValidator.d.ts.map +0 -1
  938. package/dist/cjs/validation/RuleBuilder.d.ts +0 -11
  939. package/dist/cjs/validation/RuleBuilder.d.ts.map +0 -1
  940. package/dist/cjs/validation/RuleBuilderExtensions.d.ts +0 -32
  941. package/dist/cjs/validation/RuleBuilderExtensions.d.ts.map +0 -1
  942. package/dist/cjs/validation/ValidationResult.d.ts +0 -9
  943. package/dist/cjs/validation/ValidationResult.d.ts.map +0 -1
  944. package/dist/cjs/validation/ValidationResultSeverity.d.ts +0 -7
  945. package/dist/cjs/validation/ValidationResultSeverity.d.ts.map +0 -1
  946. package/dist/cjs/validation/Validator.d.ts +0 -11
  947. package/dist/cjs/validation/Validator.d.ts.map +0 -1
  948. package/dist/cjs/validation/for_Validator/when_defining_multiple_rules_for_same_property.d.ts +0 -2
  949. package/dist/cjs/validation/for_Validator/when_defining_multiple_rules_for_same_property.d.ts.map +0 -1
  950. package/dist/cjs/validation/for_Validator/when_using_custom_error_message.d.ts +0 -2
  951. package/dist/cjs/validation/for_Validator/when_using_custom_error_message.d.ts.map +0 -1
  952. package/dist/cjs/validation/for_Validator/when_validating/with_all_rules_passing.d.ts +0 -2
  953. package/dist/cjs/validation/for_Validator/when_validating/with_all_rules_passing.d.ts.map +0 -1
  954. package/dist/cjs/validation/for_Validator/when_validating/with_multiple_rules_failing.d.ts +0 -2
  955. package/dist/cjs/validation/for_Validator/when_validating/with_multiple_rules_failing.d.ts.map +0 -1
  956. package/dist/cjs/validation/for_Validator/when_validating/with_one_rule_failing.d.ts +0 -2
  957. package/dist/cjs/validation/for_Validator/when_validating/with_one_rule_failing.d.ts.map +0 -1
  958. package/dist/cjs/validation/index.d.ts +0 -14
  959. package/dist/cjs/validation/index.d.ts.map +0 -1
  960. package/dist/cjs/validation/rules/ComparisonRules.d.ts +0 -22
  961. package/dist/cjs/validation/rules/ComparisonRules.d.ts.map +0 -1
  962. package/dist/cjs/validation/rules/EmailRule.d.ts +0 -7
  963. package/dist/cjs/validation/rules/EmailRule.d.ts.map +0 -1
  964. package/dist/cjs/validation/rules/LengthRules.d.ts +0 -18
  965. package/dist/cjs/validation/rules/LengthRules.d.ts.map +0 -1
  966. package/dist/cjs/validation/rules/NotEmptyRule.d.ts +0 -10
  967. package/dist/cjs/validation/rules/NotEmptyRule.d.ts.map +0 -1
  968. package/dist/cjs/validation/rules/PhoneRule.d.ts +0 -7
  969. package/dist/cjs/validation/rules/PhoneRule.d.ts.map +0 -1
  970. package/dist/cjs/validation/rules/RegexRule.d.ts +0 -7
  971. package/dist/cjs/validation/rules/RegexRule.d.ts.map +0 -1
  972. package/dist/cjs/validation/rules/UrlRule.d.ts +0 -7
  973. package/dist/cjs/validation/rules/UrlRule.d.ts.map +0 -1
  974. package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_empty_string.d.ts +0 -2
  975. package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_empty_string.d.ts.map +0 -1
  976. package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_invalid_email.d.ts +0 -2
  977. package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_invalid_email.d.ts.map +0 -1
  978. package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_valid_email.d.ts +0 -2
  979. package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_valid_email.d.ts.map +0 -1
  980. package/dist/cjs/validation/rules/for_GreaterThanOrEqualRule/when_validating/with_value_equal_to_threshold.d.ts +0 -2
  981. package/dist/cjs/validation/rules/for_GreaterThanOrEqualRule/when_validating/with_value_equal_to_threshold.d.ts.map +0 -1
  982. package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_equal_to_threshold.d.ts +0 -2
  983. package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_equal_to_threshold.d.ts.map +0 -1
  984. package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_greater_than_threshold.d.ts +0 -2
  985. package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_greater_than_threshold.d.ts.map +0 -1
  986. package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_less_than_threshold.d.ts +0 -2
  987. package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_less_than_threshold.d.ts.map +0 -1
  988. package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_longer_than_maximum.d.ts +0 -2
  989. package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_longer_than_maximum.d.ts.map +0 -1
  990. package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_shorter_than_minimum.d.ts +0 -2
  991. package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_shorter_than_minimum.d.ts.map +0 -1
  992. package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_within_range.d.ts +0 -2
  993. package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_within_range.d.ts.map +0 -1
  994. package/dist/cjs/validation/rules/for_LessThanRule/when_validating/with_value_less_than_threshold.d.ts +0 -2
  995. package/dist/cjs/validation/rules/for_LessThanRule/when_validating/with_value_less_than_threshold.d.ts.map +0 -1
  996. package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_equal_to_maximum.d.ts +0 -2
  997. package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_equal_to_maximum.d.ts.map +0 -1
  998. package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_longer_than_maximum.d.ts +0 -2
  999. package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_longer_than_maximum.d.ts.map +0 -1
  1000. package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_equal_to_minimum.d.ts +0 -2
  1001. package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_equal_to_minimum.d.ts.map +0 -1
  1002. package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_longer_than_minimum.d.ts +0 -2
  1003. package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_longer_than_minimum.d.ts.map +0 -1
  1004. package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_shorter_than_minimum.d.ts +0 -2
  1005. package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_shorter_than_minimum.d.ts.map +0 -1
  1006. package/dist/cjs/validation/rules/for_NotEmptyRule/when_setting_custom_message.d.ts +0 -2
  1007. package/dist/cjs/validation/rules/for_NotEmptyRule/when_setting_custom_message.d.ts.map +0 -1
  1008. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_array.d.ts +0 -2
  1009. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_array.d.ts.map +0 -1
  1010. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_string.d.ts +0 -2
  1011. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_string.d.ts.map +0 -1
  1012. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_non_empty_array.d.ts +0 -2
  1013. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_non_empty_array.d.ts.map +0 -1
  1014. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_null_value.d.ts +0 -2
  1015. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_null_value.d.ts.map +0 -1
  1016. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_undefined_value.d.ts +0 -2
  1017. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_undefined_value.d.ts.map +0 -1
  1018. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_valid_string.d.ts +0 -2
  1019. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_valid_string.d.ts.map +0 -1
  1020. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_whitespace_string.d.ts +0 -2
  1021. package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_whitespace_string.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"QueryInstanceCache.js","sources":["../../../queries/QueryInstanceCache.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { QueryResultWithState } from './QueryResultWithState';\nimport { CacheDiagnostics, CacheEntryDiagnostics } from './ObservableQueryDiagnosticsSnapshot';\n\n/**\n * Represents a key that uniquely identifies a query instance in the cache, based on the query type name and its serialized arguments.\n */\nexport type QueryCacheKey = string;\n\n/**\n * Callback invoked when the cached result for an entry changes.\n */\nexport type QueryCacheListener<TDataType> = (result: QueryResultWithState<TDataType>) => void;\n\n/**\n * Represents a single entry in the {@link QueryInstanceCache}.\n * @template TDataType The type of data returned by the query.\n */\nexport interface QueryCacheEntry<TDataType> {\n /**\n * The cached query instance.\n */\n readonly instance: unknown;\n\n /**\n * The last result received from the query, if any.\n */\n lastResult?: QueryResultWithState<TDataType>;\n\n /**\n * The number of active subscribers holding a reference to this entry.\n */\n subscriberCount: number;\n\n /**\n * Set of listener callbacks that are notified when {@link lastResult} changes.\n */\n readonly listeners: Set<QueryCacheListener<TDataType>>;\n\n /**\n * Cleanup function returned by the first subscriber that starts the query connection.\n * Called when the last subscriber releases the entry.\n */\n teardown?: () => void;\n\n /**\n * Whether an active subscription has been established for this entry.\n */\n subscribed: boolean;\n\n /**\n * Timer handle for deferred cleanup. Allows React StrictMode re-mounts (in any build\n * environment) to cancel the pending teardown so the connection is reused instead of\n * torn down and recreated.\n */\n pendingCleanup?: ReturnType<typeof setTimeout>;\n}\n\n/**\n * Provides a cache for query instances, keyed by query type and serialized arguments.\n *\n * Two callers requesting the same query type with identical arguments receive the same\n * cached instance and immediately see the last known result — without an additional\n * round trip to the server. When the last subscriber releases its reference the entry\n * is evicted.\n */\nexport class QueryInstanceCache {\n private readonly _entries = new Map<QueryCacheKey, QueryCacheEntry<unknown>>();\n private _pendingDispose?: ReturnType<typeof setTimeout>;\n\n /**\n * Initializes a new instance of {@link QueryInstanceCache}.\n * @param retentionMs How long in milliseconds to keep a cache entry alive after the last\n * subscriber releases it before evicting the subscription and cached data. A non-zero\n * value lets users navigate away and back without losing cached data. Defaults to\n * 30 000 ms. Pass 0 for immediate eviction.\n */\n constructor(private readonly _retentionMs: number = 30_000) {\n }\n\n /**\n * Builds the cache key for a query.\n * @param queryTypeName The stable type name for the query. Use the instance's {@link queryName}\n * (a hardcoded fully-qualified string in generated proxies) rather than {@link Function.name},\n * which is unstable under minification.\n * @param args Optional arguments supplied to the query.\n * @returns A stable string key.\n */\n buildKey(queryTypeName: string, args?: object): QueryCacheKey {\n if (!args || Object.keys(args).length === 0) {\n return `${queryTypeName}::`;\n }\n\n const sorted = Object.keys(args)\n .sort()\n .reduce<Record<string, unknown>>((accumulator, key) => {\n accumulator[key] = (args as Record<string, unknown>)[key];\n return accumulator;\n }, {});\n\n return `${queryTypeName}::${JSON.stringify(sorted)}`;\n }\n\n /**\n * Returns a cached instance for the given key, or creates a new one using the provided factory.\n * The subscriber count of the entry is incremented.\n * @template TInstance The type of the query instance.\n * @param key The cache key produced by {@link buildKey}.\n * @param factory A zero-argument factory that creates a fresh query instance when one is not yet cached.\n * @returns The cached (or newly created) instance and whether it was newly created.\n */\n getOrCreate<TInstance>(\n key: QueryCacheKey,\n factory: () => TInstance\n ): { instance: TInstance; isNew: boolean } {\n if (!this._entries.has(key)) {\n const entry: QueryCacheEntry<unknown> = {\n instance: factory(),\n lastResult: undefined,\n subscriberCount: 0,\n listeners: new Set(),\n subscribed: false,\n };\n\n this._entries.set(key, entry);\n return { instance: entry.instance as TInstance, isNew: true };\n }\n\n const entry = this._entries.get(key)!;\n return { instance: entry.instance as TInstance, isNew: false };\n }\n\n /**\n * Increments the active subscriber count for the given key.\n * If a deferred cleanup was pending (from a recent {@link release}),\n * it is cancelled so the existing subscription is reused.\n * Call from `useEffect` setup to pair with {@link release} in the cleanup.\n * @param key The cache key produced by {@link buildKey}.\n */\n acquire(key: QueryCacheKey): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n if (entry.pendingCleanup !== undefined) {\n clearTimeout(entry.pendingCleanup);\n entry.pendingCleanup = undefined;\n }\n\n entry.subscriberCount++;\n }\n }\n\n /**\n * Returns the last cached result for the given key, or `undefined` if no result has been stored yet.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @returns The last {@link QueryResultWithState}, or `undefined`.\n */\n getLastResult<TDataType>(key: QueryCacheKey): QueryResultWithState<TDataType> | undefined {\n return this._entries.get(key)?.lastResult as QueryResultWithState<TDataType> | undefined;\n }\n\n /**\n * Stores the most recent result for the given key and notifies all registered listeners.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @param result The result to store.\n */\n setLastResult<TDataType>(key: QueryCacheKey, result: QueryResultWithState<TDataType>): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n const previousResult = entry.lastResult as QueryResultWithState<TDataType> | undefined;\n entry.lastResult = result as QueryResultWithState<unknown>;\n\n // Suppress re-renders when the server re-sends identical data after a reconnect.\n // We only compare `data` and `isSuccess` — other fields (e.g. changeSet) are\n // ephemeral and do not affect what the user sees.\n if (\n previousResult !== undefined &&\n previousResult.isSuccess === result.isSuccess &&\n JSON.stringify(previousResult.data) === JSON.stringify(result.data)\n ) {\n return;\n }\n\n for (const listener of entry.listeners) {\n (listener as QueryCacheListener<TDataType>)(result);\n }\n }\n }\n\n /**\n * Registers a listener that is invoked whenever the cached result for the given key changes.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @param listener The callback to register.\n */\n addListener<TDataType>(key: QueryCacheKey, listener: QueryCacheListener<TDataType>): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.listeners.add(listener as QueryCacheListener<unknown>);\n }\n }\n\n /**\n * Removes a previously registered listener.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @param listener The callback to remove.\n */\n removeListener<TDataType>(key: QueryCacheKey, listener: QueryCacheListener<TDataType>): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.listeners.delete(listener as QueryCacheListener<unknown>);\n }\n }\n\n /**\n * Stores a teardown function for the given key and marks the entry as subscribed.\n * Called automatically when the last subscriber releases the entry.\n * @param key The cache key produced by {@link buildKey}.\n * @param teardown Cleanup function that disconnects the underlying query subscription.\n */\n setTeardown(key: QueryCacheKey, teardown: () => void): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.teardown = teardown;\n entry.subscribed = true;\n }\n }\n\n /**\n * Returns whether an active subscription exists for the given key.\n * @param key The cache key to check.\n * @returns `true` if a subscription has been established; `false` otherwise.\n */\n isSubscribed(key: QueryCacheKey): boolean {\n return this._entries.get(key)?.subscribed ?? false;\n }\n\n /**\n * Decrements the subscriber count for the given key. When the count reaches zero, both teardown\n * and eviction are deferred by one microtask so that React StrictMode re-mounts — in any build\n * environment — can re-acquire the entry and cancel the cleanup before the timeout fires. This\n * prevents an unnecessary disconnect/reconnect cycle during the synthetic unmount/remount that\n * StrictMode performs.\n * @param key The cache key produced by {@link buildKey}.\n */\n release(key: QueryCacheKey): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.subscriberCount--;\n\n if (entry.subscriberCount <= 0) {\n // Defer both teardown and eviction. React StrictMode re-mounts can cancel by\n // calling acquire() before the timeout fires. A non-zero _retentionMs keeps the\n // entry alive so users navigating back quickly see cached data immediately.\n entry.pendingCleanup = setTimeout(() => {\n const current = this._entries.get(key);\n\n if (current && current.subscriberCount <= 0) {\n current.subscribed = false;\n current.teardown?.();\n current.teardown = undefined;\n current.pendingCleanup = undefined;\n this._entries.delete(key);\n }\n }, this._retentionMs);\n }\n }\n }\n\n /**\n * Returns whether an entry exists for the given key.\n * @param key The cache key to check.\n * @returns `true` if an entry exists; `false` otherwise.\n */\n has(key: QueryCacheKey): boolean {\n return this._entries.has(key);\n }\n\n /**\n * Tears down all active subscriptions and marks every entry as not subscribed,\n * but preserves entries, subscriber counts, and listeners. This allows\n * hooks whose effects re-run afterward to detect that the entry is no longer\n * subscribed and re-establish a fresh connection.\n *\n * Use this when the underlying transport must be replaced (e.g. after an\n * authentication change that requires new WebSocket connections with updated\n * credentials).\n */\n teardownAllSubscriptions(): void {\n for (const [, entry] of this._entries) {\n if (entry.pendingCleanup !== undefined) {\n clearTimeout(entry.pendingCleanup);\n entry.pendingCleanup = undefined;\n }\n\n entry.subscribed = false;\n entry.teardown?.();\n entry.teardown = undefined;\n }\n }\n\n /**\n * Immediately tears down all subscriptions, cancels any pending deferred cleanups,\n * and evicts all entries. Call when the owning component (e.g. the {@link Arc} provider)\n * unmounts permanently so that all query connections are closed synchronously.\n */\n dispose(): void {\n for (const [, entry] of this._entries) {\n if (entry.pendingCleanup !== undefined) {\n clearTimeout(entry.pendingCleanup);\n entry.pendingCleanup = undefined;\n }\n\n entry.subscribed = false;\n entry.teardown?.();\n entry.teardown = undefined;\n }\n\n this._entries.clear();\n }\n\n /**\n * Schedules a deferred {@link dispose} using {@code setTimeout(0)}.\n *\n * This allows React StrictMode re-mounts to call {@link cancelPendingDispose}\n * before the dispose fires, avoiding the destruction of cache entries that child\n * effects are about to re-acquire.\n *\n * If a deferred dispose is already pending, it is replaced.\n */\n deferDispose(): void {\n if (this._pendingDispose !== undefined) {\n clearTimeout(this._pendingDispose);\n }\n\n this._pendingDispose = setTimeout(() => {\n this._pendingDispose = undefined;\n this.dispose();\n }, 0);\n }\n\n /**\n * Cancels a pending deferred dispose scheduled by {@link deferDispose}.\n *\n * Call from the {@code useEffect} setup phase so that a StrictMode re-mount\n * prevents the synthetic unmount's deferred dispose from firing.\n */\n cancelPendingDispose(): void {\n if (this._pendingDispose !== undefined) {\n clearTimeout(this._pendingDispose);\n this._pendingDispose = undefined;\n }\n }\n\n /**\n * Returns a diagnostics snapshot of the current cache state.\n * @returns A {@link CacheDiagnostics} describing all entries.\n */\n getDiagnosticsSnapshot(): CacheDiagnostics {\n const entries: CacheEntryDiagnostics[] = [];\n let totalBytes = 0;\n let unhealthyCount = 0;\n\n for (const [key, entry] of this._entries) {\n const colonIndex = key.indexOf('::');\n const queryName = colonIndex >= 0 ? key.substring(0, colonIndex) : key;\n\n let estimatedBytes = 0;\n try {\n if (entry.lastResult !== undefined) {\n estimatedBytes = JSON.stringify(entry.lastResult).length;\n }\n } catch {\n // Ignore serialization errors\n }\n\n if (entry.subscriberCount > 0 && !entry.subscribed) {\n unhealthyCount++;\n }\n\n totalBytes += estimatedBytes;\n entries.push({\n key,\n queryName,\n subscriberCount: entry.subscriberCount,\n listenerCount: entry.listeners.size,\n subscribed: entry.subscribed,\n hasResult: entry.lastResult !== undefined,\n estimatedBytes,\n });\n }\n\n return {\n healthy: unhealthyCount === 0,\n entryCount: this._entries.size,\n estimatedBytes: totalBytes,\n entries,\n };\n }\n}\n"],"names":[],"mappings":";;MAoEa,kBAAkB,CAAA;AAWE,IAAA,YAAA;AAVZ,IAAA,QAAQ,GAAG,IAAI,GAAG,EAA2C;AACtE,IAAA,eAAe;AASvB,IAAA,WAAA,CAA6B,eAAuB,MAAM,EAAA;QAA7B,IAAA,CAAA,YAAY,GAAZ,YAAY;IACzC;IAUA,QAAQ,CAAC,aAAqB,EAAE,IAAa,EAAA;AACzC,QAAA,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YACzC,OAAO,CAAA,EAAG,aAAa,CAAA,EAAA,CAAI;QAC/B;AAEA,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI;AAC1B,aAAA,IAAI;AACJ,aAAA,MAAM,CAA0B,CAAC,WAAW,EAAE,GAAG,KAAI;YAClD,WAAW,CAAC,GAAG,CAAC,GAAI,IAAgC,CAAC,GAAG,CAAC;AACzD,YAAA,OAAO,WAAW;QACtB,CAAC,EAAE,EAAE,CAAC;Q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UAAU,IAAI,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,GAAG;YAEtE,IAAI,cAAc,GAAG,CAAC;AACtB,YAAA,IAAI;AACA,gBAAA,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE;oBAChC,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM;gBAC5D;YACJ;AAAE,YAAA,MAAM;YAER;YAEA,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;AAChD,gBAAA,cAAc,EAAE;YACpB;YAEA,UAAU,IAAI,cAAc;YAC5B,OAAO,CAAC,IAAI,CAAC;gBACT,GAAG;gBACH,SAAS;gBACT,eAAe,EAAE,KAAK,CAAC,eAAe;AACtC,gBAAA,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;gBACnC,UAAU,EAAE,KAAK,CAAC,UAAU;AAC5B,gBAAA,SAAS,EAAE,KAAK,CAAC,UAAU,KAAK,SAAS;gBACzC,cAAc;AACjB,aAAA,CAAC;QACN;QAEA,OAAO;YACH,OAAO,EAAE,cAAc,KAAK,CAAC;AAC7B,YAAA,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI;AAC9B,YAAA,cAAc,EAAE,UAAU;YAC1B,OAAO;SACV;IACL;AACH;;;;"}
1
+ {"version":3,"file":"QueryInstanceCache.js","sources":["../../../queries/QueryInstanceCache.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { QueryResultWithState } from './QueryResultWithState';\nimport { CacheDiagnostics, CacheEntryDiagnostics } from './ObservableQueryDiagnosticsSnapshot';\n\n/**\n * Represents a key that uniquely identifies a query instance in the cache, based on the query type name and its serialized arguments.\n */\nexport type QueryCacheKey = string;\n\n/**\n * Callback invoked when the cached result for an entry changes.\n */\nexport type QueryCacheListener<TDataType> = (result: QueryResultWithState<TDataType>) => void;\n\n/**\n * Represents a single entry in the {@link QueryInstanceCache}.\n * @template TDataType The type of data returned by the query.\n */\nexport interface QueryCacheEntry<TDataType> {\n /**\n * The cached query instance.\n */\n readonly instance: unknown;\n\n /**\n * The last result received from the query, if any.\n */\n lastResult?: QueryResultWithState<TDataType>;\n\n /**\n * The number of active subscribers holding a reference to this entry.\n */\n subscriberCount: number;\n\n /**\n * Set of listener callbacks that are notified when {@link lastResult} changes.\n */\n readonly listeners: Set<QueryCacheListener<TDataType>>;\n\n /**\n * Cleanup function returned by the first subscriber that starts the query connection.\n * Called when the last subscriber releases the entry.\n */\n teardown?: () => void;\n\n /**\n * Whether an active subscription has been established for this entry.\n */\n subscribed: boolean;\n\n /**\n * Timer handle for deferred cleanup. Allows React StrictMode re-mounts (in any build\n * environment) to cancel the pending teardown so the connection is reused instead of\n * torn down and recreated.\n */\n pendingCleanup?: ReturnType<typeof setTimeout>;\n}\n\n/**\n * Provides a cache for query instances, keyed by query type and serialized arguments.\n *\n * Two callers requesting the same query type with identical arguments receive the same\n * cached instance and immediately see the last known result — without an additional\n * round trip to the server. When the last subscriber releases its reference the entry\n * is evicted.\n */\nexport class QueryInstanceCache {\n private readonly _entries = new Map<QueryCacheKey, QueryCacheEntry<unknown>>();\n private _pendingDispose?: ReturnType<typeof setTimeout>;\n\n /**\n * Initializes a new instance of {@link QueryInstanceCache}.\n * @param retentionMs How long in milliseconds to keep a cache entry alive after the last\n * subscriber releases it before evicting the subscription and cached data. A non-zero\n * value lets users navigate away and back without losing cached data. Defaults to\n * 30 000 ms. Pass 0 for immediate eviction.\n */\n constructor(private readonly _retentionMs: number = 30_000) {\n }\n\n /**\n * Builds the cache key for a query.\n * @param queryTypeName The stable type name for the query. Use the instance's {@link queryName}\n * (a hardcoded fully-qualified string in generated proxies) rather than {@link Function.name},\n * which is unstable under minification.\n * @param args Optional arguments supplied to the query.\n * @returns A stable string key.\n */\n buildKey(queryTypeName: string, args?: object): QueryCacheKey {\n if (!args || Object.keys(args).length === 0) {\n return `${queryTypeName}::`;\n }\n\n const sorted = Object.keys(args)\n .sort()\n .reduce<Record<string, unknown>>((accumulator, key) => {\n accumulator[key] = (args as Record<string, unknown>)[key];\n return accumulator;\n }, {});\n\n return `${queryTypeName}::${JSON.stringify(sorted)}`;\n }\n\n /**\n * Returns a cached instance for the given key, or creates a new one using the provided factory.\n * The subscriber count of the entry is incremented.\n * @template TInstance The type of the query instance.\n * @param key The cache key produced by {@link buildKey}.\n * @param factory A zero-argument factory that creates a fresh query instance when one is not yet cached.\n * @returns The cached (or newly created) instance and whether it was newly created.\n */\n getOrCreate<TInstance>(\n key: QueryCacheKey,\n factory: () => TInstance\n ): { instance: TInstance; isNew: boolean } {\n if (!this._entries.has(key)) {\n const entry: QueryCacheEntry<unknown> = {\n instance: factory(),\n lastResult: undefined,\n subscriberCount: 0,\n listeners: new Set(),\n subscribed: false,\n };\n\n this._entries.set(key, entry);\n return { instance: entry.instance as TInstance, isNew: true };\n }\n\n const entry = this._entries.get(key)!;\n return { instance: entry.instance as TInstance, isNew: false };\n }\n\n /**\n * Increments the active subscriber count for the given key.\n * If a deferred cleanup was pending (from a recent {@link release}),\n * it is cancelled so the existing subscription is reused.\n * Call from `useEffect` setup to pair with {@link release} in the cleanup.\n * @param key The cache key produced by {@link buildKey}.\n */\n acquire(key: QueryCacheKey): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n if (entry.pendingCleanup !== undefined) {\n clearTimeout(entry.pendingCleanup);\n entry.pendingCleanup = undefined;\n }\n\n entry.subscriberCount++;\n }\n }\n\n /**\n * Returns the last cached result for the given key, or `undefined` if no result has been stored yet.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @returns The last {@link QueryResultWithState}, or `undefined`.\n */\n getLastResult<TDataType>(key: QueryCacheKey): QueryResultWithState<TDataType> | undefined {\n return this._entries.get(key)?.lastResult as QueryResultWithState<TDataType> | undefined;\n }\n\n /**\n * Stores the most recent result for the given key and notifies all registered listeners.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @param result The result to store.\n */\n setLastResult<TDataType>(key: QueryCacheKey, result: QueryResultWithState<TDataType>): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n const previousResult = entry.lastResult as QueryResultWithState<TDataType> | undefined;\n entry.lastResult = result as QueryResultWithState<unknown>;\n\n // Suppress re-renders when the server re-sends identical data after a reconnect.\n // We only compare `data` and `isSuccess` — other fields (e.g. changeSet) are\n // ephemeral and do not affect what the user sees.\n if (\n previousResult !== undefined &&\n previousResult.isSuccess === result.isSuccess &&\n JSON.stringify(previousResult.data) === JSON.stringify(result.data)\n ) {\n return;\n }\n\n for (const listener of entry.listeners) {\n (listener as QueryCacheListener<TDataType>)(result);\n }\n }\n }\n\n /**\n * Registers a listener that is invoked whenever the cached result for the given key changes.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @param listener The callback to register.\n */\n addListener<TDataType>(key: QueryCacheKey, listener: QueryCacheListener<TDataType>): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.listeners.add(listener as QueryCacheListener<unknown>);\n }\n }\n\n /**\n * Removes a previously registered listener.\n * @template TDataType The type of data returned by the query.\n * @param key The cache key produced by {@link buildKey}.\n * @param listener The callback to remove.\n */\n removeListener<TDataType>(key: QueryCacheKey, listener: QueryCacheListener<TDataType>): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.listeners.delete(listener as QueryCacheListener<unknown>);\n }\n }\n\n /**\n * Stores a teardown function for the given key and marks the entry as subscribed.\n * Called automatically when the last subscriber releases the entry.\n * @param key The cache key produced by {@link buildKey}.\n * @param teardown Cleanup function that disconnects the underlying query subscription.\n */\n setTeardown(key: QueryCacheKey, teardown: () => void): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.teardown = teardown;\n entry.subscribed = true;\n }\n }\n\n /**\n * Returns whether an active subscription exists for the given key.\n * @param key The cache key to check.\n * @returns `true` if a subscription has been established; `false` otherwise.\n */\n isSubscribed(key: QueryCacheKey): boolean {\n return this._entries.get(key)?.subscribed ?? false;\n }\n\n /**\n * Decrements the subscriber count for the given key. When the count reaches zero, both teardown\n * and eviction are deferred by one microtask so that React StrictMode re-mounts — in any build\n * environment — can re-acquire the entry and cancel the cleanup before the timeout fires. This\n * prevents an unnecessary disconnect/reconnect cycle during the synthetic unmount/remount that\n * StrictMode performs.\n * @param key The cache key produced by {@link buildKey}.\n */\n release(key: QueryCacheKey): void {\n const entry = this._entries.get(key);\n\n if (entry) {\n entry.subscriberCount--;\n\n if (entry.subscriberCount <= 0) {\n // Defer both teardown and eviction. React StrictMode re-mounts can cancel by\n // calling acquire() before the timeout fires. A non-zero _retentionMs keeps the\n // entry alive so users navigating back quickly see cached data immediately.\n entry.pendingCleanup = setTimeout(() => {\n const current = this._entries.get(key);\n\n if (current && current.subscriberCount <= 0) {\n current.subscribed = false;\n current.teardown?.();\n current.teardown = undefined;\n current.pendingCleanup = undefined;\n this._entries.delete(key);\n }\n }, this._retentionMs);\n }\n }\n }\n\n /**\n * Returns whether an entry exists for the given key.\n * @param key The cache key to check.\n * @returns `true` if an entry exists; `false` otherwise.\n */\n has(key: QueryCacheKey): boolean {\n return this._entries.has(key);\n }\n\n /**\n * Tears down all active subscriptions and marks every entry as not subscribed,\n * but preserves entries, subscriber counts, and listeners. This allows\n * hooks whose effects re-run afterward to detect that the entry is no longer\n * subscribed and re-establish a fresh connection.\n *\n * Use this when the underlying transport must be replaced (e.g. after an\n * authentication change that requires new WebSocket connections with updated\n * credentials).\n */\n teardownAllSubscriptions(): void {\n for (const [, entry] of this._entries) {\n if (entry.pendingCleanup !== undefined) {\n clearTimeout(entry.pendingCleanup);\n entry.pendingCleanup = undefined;\n }\n\n entry.subscribed = false;\n entry.teardown?.();\n entry.teardown = undefined;\n }\n }\n\n /**\n * Immediately tears down all subscriptions, cancels any pending deferred cleanups,\n * and evicts all entries. Call when the owning component (e.g. the {@link Arc} provider)\n * unmounts permanently so that all query connections are closed synchronously.\n */\n dispose(): void {\n for (const [, entry] of this._entries) {\n if (entry.pendingCleanup !== undefined) {\n clearTimeout(entry.pendingCleanup);\n entry.pendingCleanup = undefined;\n }\n\n entry.subscribed = false;\n entry.teardown?.();\n entry.teardown = undefined;\n }\n\n this._entries.clear();\n }\n\n /**\n * Schedules a deferred {@link dispose} using {@code setTimeout(0)}.\n *\n * This allows React StrictMode re-mounts to call {@link cancelPendingDispose}\n * before the dispose fires, avoiding the destruction of cache entries that child\n * effects are about to re-acquire.\n *\n * If a deferred dispose is already pending, it is replaced.\n */\n deferDispose(): void {\n if (this._pendingDispose !== undefined) {\n clearTimeout(this._pendingDispose);\n }\n\n this._pendingDispose = setTimeout(() => {\n this._pendingDispose = undefined;\n this.dispose();\n }, 0);\n }\n\n /**\n * Cancels a pending deferred dispose scheduled by {@link deferDispose}.\n *\n * Call from the {@code useEffect} setup phase so that a StrictMode re-mount\n * prevents the synthetic unmount's deferred dispose from firing.\n */\n cancelPendingDispose(): void {\n if (this._pendingDispose !== undefined) {\n clearTimeout(this._pendingDispose);\n this._pendingDispose = undefined;\n }\n }\n\n /**\n * Returns a diagnostics snapshot of the current cache state.\n * @returns A {@link CacheDiagnostics} describing all entries.\n */\n getDiagnosticsSnapshot(): CacheDiagnostics {\n const entries: CacheEntryDiagnostics[] = [];\n let totalBytes = 0;\n let unhealthyCount = 0;\n\n for (const [key, entry] of this._entries) {\n const colonIndex = key.indexOf('::');\n const queryName = colonIndex >= 0 ? key.substring(0, colonIndex) : key;\n\n let estimatedBytes = 0;\n try {\n if (entry.lastResult !== undefined) {\n estimatedBytes = JSON.stringify(entry.lastResult).length;\n }\n } catch {\n // Ignore serialization errors\n }\n\n if (entry.subscriberCount > 0 && !entry.subscribed) {\n unhealthyCount++;\n }\n\n totalBytes += estimatedBytes;\n entries.push({\n key,\n queryName,\n subscriberCount: entry.subscriberCount,\n listenerCount: entry.listeners.size,\n subscribed: entry.subscribed,\n hasResult: entry.lastResult !== undefined,\n estimatedBytes,\n });\n }\n\n return {\n healthy: unhealthyCount === 0,\n entryCount: this._entries.size,\n estimatedBytes: totalBytes,\n entries,\n };\n }\n}\n"],"names":["QueryInstanceCache","_entries","Map","_pendingDispose","_retentionMs","buildKey","queryTypeName","args","Object","keys","length","sorted","sort","reduce","accumulator","key","JSON","stringify","getOrCreate","factory","has","entry","instance","lastResult","undefined","subscriberCount","listeners","Set","subscribed","set","isNew","get","acquire","pendingCleanup","clearTimeout","getLastResult","setLastResult","result","previousResult","isSuccess","data","listener","addListener","add","removeListener","delete","setTeardown","teardown","isSubscribed","release","setTimeout","current","teardownAllSubscriptions","dispose","clear","deferDispose","cancelPendingDispose","getDiagnosticsSnapshot","entries","totalBytes","unhealthyCount","colonIndex","indexOf","queryName","substring","estimatedBytes","push","listenerCount","size","hasResult","healthy","entryCount"],"mappings":";;AAAA;AACA;AA2DA;;;;;;;AAOC,IACM,MAAMA,kBAAAA,CAAAA;;AACQC,IAAAA,QAAAA,GAAW,IAAIC,GAAAA,EAAAA;IACxBC,eAAAA;AAER;;;;;;AAMC,QACD,WAAA,CAA6BC,YAAAA,GAAuB,MAAM,CAAE;aAA/BA,YAAAA,GAAAA,YAAAA;AAC7B,IAAA;AAEA;;;;;;;AAOC,QACDC,QAAAA,CAASC,aAAqB,EAAEC,IAAa,EAAiB;QAC1D,IAAI,CAACA,QAAQC,MAAAA,CAAOC,IAAI,CAACF,IAAAA,CAAAA,CAAMG,MAAM,KAAK,CAAA,EAAG;YACzC,OAAO,CAAA,EAAGJ,aAAAA,CAAc,EAAE,CAAC;AAC/B,QAAA;QAEA,MAAMK,MAAAA,GAASH,MAAAA,CAAOC,IAAI,CAACF,IAAAA,CAAAA,CACtBK,IAAI,EAAA,CACJC,MAAM,CAA0B,CAACC,WAAAA,EAAaC,GAAAA,GAAAA;AAC3CD,YAAAA,WAAW,CAACC,GAAAA,CAAI,GAAG,IAAiC,CAACA,GAAAA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A,GAAiBjD,KAAKC,SAAS,CAACI,KAAAA,CAAME,UAAU,EAAEb,MAAM;AAC5D,gBAAA;AACJ,YAAA,CAAA,CAAE,OAAM;;AAER,YAAA;AAEA,YAAA,IAAIW,MAAMI,eAAe,GAAG,KAAK,CAACJ,KAAAA,CAAMO,UAAU,EAAE;AAChDgC,gBAAAA,cAAAA,EAAAA;AACJ,YAAA;YAEAD,UAAAA,IAAcM,cAAAA;AACdP,YAAAA,OAAAA,CAAQQ,IAAI,CAAC;AACTnD,gBAAAA,GAAAA;AACAgD,gBAAAA,SAAAA;AACAtC,gBAAAA,eAAAA,EAAiBJ,MAAMI,eAAe;gBACtC0C,aAAAA,EAAe9C,KAAAA,CAAMK,SAAS,CAAC0C,IAAI;AACnCxC,gBAAAA,UAAAA,EAAYP,MAAMO,UAAU;gBAC5ByC,SAAAA,EAAWhD,KAAAA,CAAME,UAAU,KAAKC,SAAAA;AAChCyC,gBAAAA;AACJ,aAAA,CAAA;AACJ,QAAA;QAEA,OAAO;AACHK,YAAAA,OAAAA,EAASV,cAAAA,KAAmB,CAAA;AAC5BW,YAAAA,UAAAA,EAAY,IAAI,CAACtE,QAAQ,CAACmE,IAAI;YAC9BH,cAAAA,EAAgBN,UAAAA;AAChBD,YAAAA;AACJ,SAAA;AACJ,IAAA;AACJ;;;;"}
@@ -1,17 +1,27 @@
1
1
  'use strict';
2
2
 
3
- class QueryProvider {
3
+ // Copyright (c) Cratis. All rights reserved.
4
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
+ /**
6
+ * Represents an implementation of {@link IQueryProvider}
7
+ */ class QueryProvider {
4
8
  _microservice;
5
9
  _apiBasePath;
6
10
  _origin;
7
11
  _httpHeadersCallback;
8
- constructor(_microservice, _apiBasePath, _origin, _httpHeadersCallback) {
12
+ /**
13
+ * Initializes a new instance of {@link QueryProvider}
14
+ * @param _microservice Name of the microservice to provide queries for.
15
+ * @param _apiBasePath Base path for the API to use for the query.
16
+ * @param _origin Origin to use for the query.
17
+ * @param _httpHeadersCallback Callback to get HTTP headers for the query.
18
+ */ constructor(_microservice, _apiBasePath, _origin, _httpHeadersCallback){
9
19
  this._microservice = _microservice;
10
20
  this._apiBasePath = _apiBasePath;
11
21
  this._origin = _origin;
12
22
  this._httpHeadersCallback = _httpHeadersCallback;
13
23
  }
14
- get(queryType) {
24
+ /** @inheritdoc */ get(queryType) {
15
25
  const query = new queryType();
16
26
  query.setMicroservice(this._microservice);
17
27
  query.setApiBasePath(this._apiBasePath);
@@ -1 +1 @@
1
- {"version":3,"file":"QueryProvider.js","sources":["../../../queries/QueryProvider.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Constructor } from '@cratis/fundamentals';\nimport { IQueryProvider } from './IQueryProvider';\nimport { IQuery } from './IQuery';\nimport { GetHttpHeaders } from '../GetHttpHeaders';\n\n/**\n * Represents an implementation of {@link IQueryProvider}\n */\nexport class QueryProvider implements IQueryProvider {\n\n /**\n * Initializes a new instance of {@link QueryProvider}\n * @param _microservice Name of the microservice to provide queries for.\n * @param _apiBasePath Base path for the API to use for the query.\n * @param _origin Origin to use for the query.\n * @param _httpHeadersCallback Callback to get HTTP headers for the query.\n */\n constructor(\n private readonly _microservice: string,\n private readonly _apiBasePath: string,\n private readonly _origin: string,\n private readonly _httpHeadersCallback: GetHttpHeaders) { }\n\n /** @inheritdoc */\n get<T extends IQuery>(queryType: Constructor<T>): T {\n const query = new queryType();\n query.setMicroservice(this._microservice);\n query.setApiBasePath(this._apiBasePath);\n query.setOrigin(this._origin);\n query.setHttpHeadersCallback(this._httpHeadersCallback);\n return query;\n }\n}"],"names":[],"mappings":";;MAWa,aAAa,CAAA;AAUD,IAAA,aAAA;AACA,IAAA,YAAA;AACA,IAAA,OAAA;AACA,IAAA,oBAAA;AAJrB,IAAA,WAAA,CACqB,aAAqB,EACrB,YAAoB,EACpB,OAAe,EACf,oBAAoC,EAAA;QAHpC,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,OAAO,GAAP,OAAO;QACP,IAAA,CAAA,oBAAoB,GAApB,oBAAoB;IAAoB;AAG7D,IAAA,GAAG,CAAmB,SAAyB,EAAA;AAC3C,QAAA,MAAM,KAAK,GAAG,IAAI,SAAS,EAAE;AAC7B,QAAA,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC;AACzC,QAAA,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC;AACvC,QAAA,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;AAC7B,QAAA,KAAK,CAAC,sBAAsB,CAAC,IAAI,CAAC,oBAAoB,CAAC;AACvD,QAAA,OAAO,KAAK;IAChB;AACH;;;;"}
1
+ {"version":3,"file":"QueryProvider.js","sources":["../../../queries/QueryProvider.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Constructor } from '@cratis/fundamentals';\nimport { IQueryProvider } from './IQueryProvider';\nimport { IQuery } from './IQuery';\nimport { GetHttpHeaders } from '../GetHttpHeaders';\n\n/**\n * Represents an implementation of {@link IQueryProvider}\n */\nexport class QueryProvider implements IQueryProvider {\n\n /**\n * Initializes a new instance of {@link QueryProvider}\n * @param _microservice Name of the microservice to provide queries for.\n * @param _apiBasePath Base path for the API to use for the query.\n * @param _origin Origin to use for the query.\n * @param _httpHeadersCallback Callback to get HTTP headers for the query.\n */\n constructor(\n private readonly _microservice: string,\n private readonly _apiBasePath: string,\n private readonly _origin: string,\n private readonly _httpHeadersCallback: GetHttpHeaders) { }\n\n /** @inheritdoc */\n get<T extends IQuery>(queryType: Constructor<T>): T {\n const query = new queryType();\n query.setMicroservice(this._microservice);\n query.setApiBasePath(this._apiBasePath);\n query.setOrigin(this._origin);\n query.setHttpHeadersCallback(this._httpHeadersCallback);\n return query;\n }\n}"],"names":["QueryProvider","_microservice","_origin","_apiBasePath","_httpHeadersCallback","get","queryType","query","setMicroservice","setApiBasePath","setOrigin","setHttpHeadersCallback"],"mappings":";;AAAA;AACA;AAOA;;AAEC,IACM,MAAMA,aAAAA,CAAAA;;;;;AAET;;;;;;AAMC,QACD,WAAA,CACqBC,aAAqB,EACtC,YAAqC,EACpBC,OAAe,EAChC,oBAAqD,CAAE;aAHtCD,aAAAA,GAAAA,aAAAA;aACAE,YAAAA,GAAAA,YAAAA;aACAD,OAAAA,GAAAA,OAAAA;aACAE,oBAAAA,GAAAA,oBAAAA;AAAwC,IAAA;uBAG7DC,GAAAA,CAAsBC,SAAyB,EAAK;AAChD,QAAA,MAAMC,QAAQ,IAAID,SAAAA,EAAAA;AAClBC,QAAAA,KAAAA,CAAMC,eAAe,CAAC,IAAI,CAACP,aAAa,CAAA;AACxCM,QAAAA,KAAAA,CAAME,cAAc,CAAC,IAAI,CAACN,YAAY,CAAA;AACtCI,QAAAA,KAAAA,CAAMG,SAAS,CAAC,IAAI,CAACR,OAAO,CAAA;AAC5BK,QAAAA,KAAAA,CAAMI,sBAAsB,CAAC,IAAI,CAACP,oBAAoB,CAAA;QACtD,OAAOG,KAAAA;AACX,IAAA;AACJ;;;;"}
@@ -4,7 +4,12 @@ var fundamentals = require('@cratis/fundamentals');
4
4
  var ValidationResult = require('../validation/ValidationResult.js');
5
5
  var PagingInfo = require('./PagingInfo.js');
6
6
 
7
- class QueryResult {
7
+ // Copyright (c) Cratis. All rights reserved.
8
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
9
+ /**
10
+ * Represents the result from executing a {@link IQueryFor}.
11
+ * @template TDataType The data type.
12
+ */ class QueryResult {
8
13
  static empty(defaultValue) {
9
14
  return new QueryResult({
10
15
  data: defaultValue,
@@ -57,12 +62,17 @@ class QueryResult {
57
62
  size: 0
58
63
  }
59
64
  }, Object, false);
60
- constructor(result, instanceType, enumerable) {
65
+ /**
66
+ * Creates an instance of query result.
67
+ * @param {*} result The raw result from the backend.
68
+ * @param {Constructor} instanceType The type of instance to deserialize.
69
+ * @param {boolean} enumerable Whether or not the result is supposed be an enumerable or not.
70
+ */ constructor(result, instanceType, enumerable){
61
71
  this.isSuccess = result.isSuccess;
62
72
  this.isAuthorized = result.isAuthorized;
63
73
  this.isValid = result.isValid;
64
74
  this.hasExceptions = result.hasExceptions;
65
- this.validationResults = result.validationResults.map(_ => new ValidationResult.ValidationResult(_.severity, _.message, _.members, _.state));
75
+ this.validationResults = result.validationResults.map((_)=>new ValidationResult.ValidationResult(_.severity, _.message, _.members, _.state));
66
76
  this.exceptionMessages = result.exceptionMessages;
67
77
  this.exceptionStackTrace = result.exceptionStackTrace;
68
78
  this.paging = new PagingInfo.PagingInfo();
@@ -75,48 +85,44 @@ class QueryResult {
75
85
  const isPrimitive = instanceType === String || instanceType === Number || instanceType === Boolean;
76
86
  if (enumerable) {
77
87
  if (Array.isArray(result.data)) {
78
- data = isPrimitive
79
- ? Array.from(result.data)
80
- : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, data);
81
- }
82
- else {
88
+ data = isPrimitive ? Array.from(result.data) : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, data);
89
+ } else {
83
90
  data = [];
84
91
  }
85
- }
86
- else {
92
+ } else {
87
93
  data = isPrimitive ? data : fundamentals.JsonSerializer.deserializeFromInstance(instanceType, data);
88
94
  }
89
95
  this.data = data;
90
- }
91
- else {
92
- this.data = (enumerable ? [] : null);
96
+ } else {
97
+ this.data = enumerable ? [] : null;
93
98
  }
94
99
  if (enumerable && result.changeSet) {
95
100
  const isPrimitive = instanceType === String || instanceType === Number || instanceType === Boolean;
96
101
  this.changeSet = {
97
- added: isPrimitive
98
- ? Array.from(result.changeSet.added ?? [])
99
- : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.added ?? []),
100
- replaced: isPrimitive
101
- ? Array.from(result.changeSet.replaced ?? [])
102
- : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.replaced ?? []),
103
- removed: isPrimitive
104
- ? Array.from(result.changeSet.removed ?? [])
105
- : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.removed ?? []),
102
+ added: isPrimitive ? Array.from(result.changeSet.added ?? []) : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.added ?? []),
103
+ replaced: isPrimitive ? Array.from(result.changeSet.replaced ?? []) : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.replaced ?? []),
104
+ removed: isPrimitive ? Array.from(result.changeSet.removed ?? []) : fundamentals.JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.removed ?? [])
106
105
  };
107
106
  }
108
107
  }
109
- data;
110
- paging;
111
- isSuccess;
112
- isAuthorized;
113
- isValid;
114
- hasExceptions;
115
- validationResults;
116
- exceptionMessages;
117
- exceptionStackTrace;
118
- changeSet;
119
- get hasData() {
108
+ /** @inheritdoc */ data;
109
+ /** @inheritdoc */ paging;
110
+ /** @inheritdoc */ isSuccess;
111
+ /** @inheritdoc */ isAuthorized;
112
+ /** @inheritdoc */ isValid;
113
+ /** @inheritdoc */ hasExceptions;
114
+ /** @inheritdoc */ validationResults;
115
+ /** @inheritdoc */ exceptionMessages;
116
+ /** @inheritdoc */ exceptionStackTrace;
117
+ /**
118
+ * Gets the optional change set describing what changed since the previous update.
119
+ * Set by the server when the delta transfer mode is active.
120
+ * When present, clients can apply the delta to their local state rather than replacing
121
+ * the full dataset.
122
+ */ changeSet;
123
+ /**
124
+ * Gets whether or not the query has data.
125
+ */ get hasData() {
120
126
  if (this.data) {
121
127
  if (Array.isArray(this.data)) {
122
128
  return this.data.length > 0;
@@ -1 +1 @@
1
- {"version":3,"file":"QueryResult.js","sources":["../../../queries/QueryResult.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Constructor, JsonSerializer } from '@cratis/fundamentals';\nimport { ValidationResult } from '../validation/ValidationResult';\nimport { IQueryResult } from './IQueryResult';\nimport { PagingInfo } from './PagingInfo';\nimport { ChangeSet } from './ChangeSet';\n\ntype ServerQueryResult = {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n data: any;\n /* eslint-enable @typescript-eslint/no-explicit-any */\n isSuccess: boolean;\n isAuthorized: boolean;\n isValid: boolean;\n hasExceptions: boolean;\n validationResults: ServerValidationResult[];\n exceptionMessages: string[];\n exceptionStackTrace: string;\n paging: ServerPagingInfo;\n changeSet?: ServerChangeSet;\n}\n\ntype ServerChangeSet = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n added: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n replaced: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n removed: any[];\n}\n\ntype ServerValidationResult = {\n severity: number;\n message: string;\n members: string[];\n state: object;\n}\n\ntype ServerPagingInfo = {\n page: number;\n size: number; \n totalItems: number;\n totalPages: number;\n}\n\n/**\n * Represents the result from executing a {@link IQueryFor}.\n * @template TDataType The data type.\n */\nexport class QueryResult<TDataType = object> implements IQueryResult<TDataType> {\n\n static empty<TDataType>(defaultValue: TDataType): QueryResult<TDataType> {\n return new QueryResult({\n data: defaultValue as object,\n isSuccess: true,\n isAuthorized: true,\n isValid: true,\n hasExceptions: false,\n validationResults: [],\n exceptionMessages: [],\n exceptionStackTrace: '',\n paging: {\n totalItems: 0,\n totalPages: 0,\n page: 0,\n size: 0\n }\n\n }, Object, false);\n }\n\n static unauthorized<TDataType>(): QueryResult<TDataType> {\n return new QueryResult({\n data: null as unknown as object,\n isSuccess: false,\n isAuthorized: false,\n isValid: true,\n hasExceptions: false,\n validationResults: [],\n exceptionMessages: [],\n exceptionStackTrace: '',\n paging: {\n totalItems: 0,\n totalPages: 0,\n page: 0,\n size: 0\n }\n }, Object, false);\n }\n\n static noSuccess: QueryResult = new QueryResult({\n data: {},\n isSuccess: false,\n isAuthorized: true,\n isValid: true,\n hasExceptions: false,\n validationResults: [],\n exceptionMessages: [],\n exceptionStackTrace: '',\n paging: {\n totalItems: 0,\n totalPages: 0,\n page: 0,\n size: 0\n }\n }, Object, false);\n\n /**\n * Creates an instance of query result.\n * @param {*} result The raw result from the backend.\n * @param {Constructor} instanceType The type of instance to deserialize.\n * @param {boolean} enumerable Whether or not the result is supposed be an enumerable or not.\n */\n constructor(result: ServerQueryResult, instanceType: Constructor, enumerable: boolean) {\n this.isSuccess = result.isSuccess;\n this.isAuthorized = result.isAuthorized;\n this.isValid = result.isValid;\n this.hasExceptions = result.hasExceptions;\n this.validationResults = result.validationResults.map(_ => new ValidationResult(_.severity, _.message, _.members, _.state));\n this.exceptionMessages = result.exceptionMessages;\n this.exceptionStackTrace = result.exceptionStackTrace;\n this.paging = new PagingInfo();\n this.paging.page = result.paging.page;\n this.paging.size = result.paging.size;\n this.paging.totalItems = result.paging.totalItems;\n this.paging.totalPages = result.paging.totalPages;\n\n if (result.data) {\n let data: object = result.data;\n const isPrimitive = instanceType === String || instanceType === Number || instanceType === Boolean;\n if (enumerable) {\n if (Array.isArray(result.data)) {\n data = isPrimitive\n ? Array.from(result.data)\n : JsonSerializer.deserializeArrayFromInstance(instanceType, data);\n } else {\n data = [];\n }\n } else {\n data = isPrimitive ? data : JsonSerializer.deserializeFromInstance(instanceType, data);\n }\n\n this.data = data as TDataType;\n } else {\n this.data = (enumerable ? [] : null) as TDataType;\n }\n\n if (enumerable && result.changeSet) {\n const isPrimitive = instanceType === String || instanceType === Number || instanceType === Boolean;\n this.changeSet = {\n added: isPrimitive\n ? Array.from(result.changeSet.added ?? [])\n : JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.added ?? []),\n replaced: isPrimitive\n ? Array.from(result.changeSet.replaced ?? [])\n : JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.replaced ?? []),\n removed: isPrimitive\n ? Array.from(result.changeSet.removed ?? [])\n : JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.removed ?? []),\n } as ChangeSet<unknown>;\n }\n }\n\n /** @inheritdoc */\n readonly data: TDataType;\n\n /** @inheritdoc */\n readonly paging: PagingInfo;\n\n /** @inheritdoc */\n readonly isSuccess: boolean;\n\n /** @inheritdoc */\n readonly isAuthorized: boolean;\n\n /** @inheritdoc */\n readonly isValid: boolean;\n\n /** @inheritdoc */\n readonly hasExceptions: boolean;\n\n /** @inheritdoc */\n readonly validationResults: ValidationResult[];\n\n /** @inheritdoc */\n readonly exceptionMessages: string[];\n\n /** @inheritdoc */\n readonly exceptionStackTrace: string;\n\n /**\n * Gets the optional change set describing what changed since the previous update.\n * Set by the server when the delta transfer mode is active.\n * When present, clients can apply the delta to their local state rather than replacing\n * the full dataset.\n */\n readonly changeSet?: ChangeSet<unknown>;\n\n /**\n * Gets whether or not the query has data.\n */\n get hasData(): boolean {\n if (this.data) {\n if (Array.isArray(this.data)) {\n return this.data.length > 0;\n }\n return true;\n }\n return false;\n }\n}\n"],"names":["ValidationResult","PagingInfo","JsonSerializer"],"mappings":";;;;;;MAmDa,WAAW,CAAA;IAEpB,OAAO,KAAK,CAAY,YAAuB,EAAA;QAC3C,OAAO,IAAI,WAAW,CAAC;AACnB,YAAA,IAAI,EAAE,YAAsB;AAC5B,YAAA,SAAS,EAAE,IAAI;AACf,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,aAAa,EAAE,KAAK;AACpB,YAAA,iBAAiB,EAAE,EAAE;AACrB,YAAA,iBAAiB,EAAE,EAAE;AACrB,YAAA,mBAAmB,EAAE,EAAE;AACvB,YAAA,MAAM,EAAE;AACJ,gBAAA,UAAU,EAAE,CAAC;AACb,gBAAA,UAAU,EAAE,CAAC;AACb,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE;AACT;AAEJ,SAAA,EAAE,MAAM,EAAE,KAAK,CAAC;IACrB;AAEA,IAAA,OAAO,YAAY,GAAA;QACf,OAAO,IAAI,WAAW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IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAC1B,gBAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;YAC/B;AACA,YAAA,OAAO,IAAI;QACf;AACA,QAAA,OAAO,KAAK;IAChB;;;;;"}
1
+ {"version":3,"file":"QueryResult.js","sources":["../../../queries/QueryResult.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Constructor, JsonSerializer } from '@cratis/fundamentals';\nimport { ValidationResult } from '../validation/ValidationResult';\nimport { IQueryResult } from './IQueryResult';\nimport { PagingInfo } from './PagingInfo';\nimport { ChangeSet } from './ChangeSet';\n\ntype ServerQueryResult = {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n data: any;\n /* eslint-enable @typescript-eslint/no-explicit-any */\n isSuccess: boolean;\n isAuthorized: boolean;\n isValid: boolean;\n hasExceptions: boolean;\n validationResults: ServerValidationResult[];\n exceptionMessages: string[];\n exceptionStackTrace: string;\n paging: ServerPagingInfo;\n changeSet?: ServerChangeSet;\n}\n\ntype ServerChangeSet = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n added: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n replaced: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n removed: any[];\n}\n\ntype ServerValidationResult = {\n severity: number;\n message: string;\n members: string[];\n state: object;\n}\n\ntype ServerPagingInfo = {\n page: number;\n size: number; \n totalItems: number;\n totalPages: number;\n}\n\n/**\n * Represents the result from executing a {@link IQueryFor}.\n * @template TDataType The data type.\n */\nexport class QueryResult<TDataType = object> implements IQueryResult<TDataType> {\n\n static empty<TDataType>(defaultValue: TDataType): QueryResult<TDataType> {\n return new QueryResult({\n data: defaultValue as object,\n isSuccess: true,\n isAuthorized: true,\n isValid: true,\n hasExceptions: false,\n validationResults: [],\n exceptionMessages: [],\n exceptionStackTrace: '',\n paging: {\n totalItems: 0,\n totalPages: 0,\n page: 0,\n size: 0\n }\n\n }, Object, false);\n }\n\n static unauthorized<TDataType>(): QueryResult<TDataType> {\n return new QueryResult({\n data: null as unknown as object,\n isSuccess: false,\n isAuthorized: false,\n isValid: true,\n hasExceptions: false,\n validationResults: [],\n exceptionMessages: [],\n exceptionStackTrace: '',\n paging: {\n totalItems: 0,\n totalPages: 0,\n page: 0,\n size: 0\n }\n }, Object, false);\n }\n\n static noSuccess: QueryResult = new QueryResult({\n data: {},\n isSuccess: false,\n isAuthorized: true,\n isValid: true,\n hasExceptions: false,\n validationResults: [],\n exceptionMessages: [],\n exceptionStackTrace: '',\n paging: {\n totalItems: 0,\n totalPages: 0,\n page: 0,\n size: 0\n }\n }, Object, false);\n\n /**\n * Creates an instance of query result.\n * @param {*} result The raw result from the backend.\n * @param {Constructor} instanceType The type of instance to deserialize.\n * @param {boolean} enumerable Whether or not the result is supposed be an enumerable or not.\n */\n constructor(result: ServerQueryResult, instanceType: Constructor, enumerable: boolean) {\n this.isSuccess = result.isSuccess;\n this.isAuthorized = result.isAuthorized;\n this.isValid = result.isValid;\n this.hasExceptions = result.hasExceptions;\n this.validationResults = result.validationResults.map(_ => new ValidationResult(_.severity, _.message, _.members, _.state));\n this.exceptionMessages = result.exceptionMessages;\n this.exceptionStackTrace = result.exceptionStackTrace;\n this.paging = new PagingInfo();\n this.paging.page = result.paging.page;\n this.paging.size = result.paging.size;\n this.paging.totalItems = result.paging.totalItems;\n this.paging.totalPages = result.paging.totalPages;\n\n if (result.data) {\n let data: object = result.data;\n const isPrimitive = instanceType === String || instanceType === Number || instanceType === Boolean;\n if (enumerable) {\n if (Array.isArray(result.data)) {\n data = isPrimitive\n ? Array.from(result.data)\n : JsonSerializer.deserializeArrayFromInstance(instanceType, data);\n } else {\n data = [];\n }\n } else {\n data = isPrimitive ? data : JsonSerializer.deserializeFromInstance(instanceType, data);\n }\n\n this.data = data as TDataType;\n } else {\n this.data = (enumerable ? [] : null) as TDataType;\n }\n\n if (enumerable && result.changeSet) {\n const isPrimitive = instanceType === String || instanceType === Number || instanceType === Boolean;\n this.changeSet = {\n added: isPrimitive\n ? Array.from(result.changeSet.added ?? [])\n : JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.added ?? []),\n replaced: isPrimitive\n ? Array.from(result.changeSet.replaced ?? [])\n : JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.replaced ?? []),\n removed: isPrimitive\n ? Array.from(result.changeSet.removed ?? [])\n : JsonSerializer.deserializeArrayFromInstance(instanceType, result.changeSet.removed ?? []),\n } as ChangeSet<unknown>;\n }\n }\n\n /** @inheritdoc */\n readonly data: TDataType;\n\n /** @inheritdoc */\n readonly paging: PagingInfo;\n\n /** @inheritdoc */\n readonly isSuccess: boolean;\n\n /** @inheritdoc */\n readonly isAuthorized: boolean;\n\n /** @inheritdoc */\n readonly isValid: boolean;\n\n /** @inheritdoc */\n readonly hasExceptions: boolean;\n\n /** @inheritdoc */\n readonly validationResults: ValidationResult[];\n\n /** @inheritdoc */\n readonly exceptionMessages: string[];\n\n /** @inheritdoc */\n readonly exceptionStackTrace: string;\n\n /**\n * Gets the optional change set describing what changed since the previous update.\n * Set by the server when the delta transfer mode is active.\n * When present, clients can apply the delta to their local state rather than replacing\n * the full dataset.\n */\n readonly changeSet?: ChangeSet<unknown>;\n\n /**\n * Gets whether or not the query has data.\n */\n get hasData(): boolean {\n if (this.data) {\n if (Array.isArray(this.data)) {\n return this.data.length > 0;\n }\n return true;\n }\n return false;\n }\n}\n"],"names":["QueryResult","empty","defaultValue","data","isSuccess","isAuthorized","isValid","hasExceptions","validationResults","exceptionMessages","exceptionStackTrace","paging","totalItems","totalPages","page","size","Object","unauthorized","noSuccess","result","instanceType","enumerable","map","_","ValidationResult","severity","message","members","state","PagingInfo","isPrimitive","String","Number","Boolean","Array","isArray","from","JsonSerializer","deserializeArrayFromInstance","deserializeFromInstance","changeSet","added","replaced","removed","hasData","length"],"mappings":";;;;;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AACC,KAAK,IAAI,EAAE,CAAA;gBAC5FC,QAAAA,EAAUZ,WAAAA,GACJI,MAAME,IAAI,CAACjB,OAAOqB,SAAS,CAACE,QAAQ,IAAI,EAAE,IAC1CL,2BAAAA,CAAeC,4BAA4B,CAAClB,YAAAA,EAAcD,MAAAA,CAAOqB,SAAS,CAACE,QAAQ,IAAI,EAAE,CAAA;gBAC/FC,OAAAA,EAASb,WAAAA,GACHI,MAAME,IAAI,CAACjB,OAAOqB,SAAS,CAACG,OAAO,IAAI,EAAE,IACzCN,2BAAAA,CAAeC,4BAA4B,CAAClB,YAAAA,EAAcD,MAAAA,CAAOqB,SAAS,CAACG,OAAO,IAAI,EAAE;AAClG,aAAA;AACJ,QAAA;AACJ,IAAA;uBAGA,IAASxC;uBAGT,MAASQ;uBAGT,SAASP;uBAGT,YAASC;uBAGT,OAASC;uBAGT,aAASC;uBAGT,iBAASC;uBAGT,iBAASC;uBAGT,mBAASC;AAET;;;;;AAKC,QACD,SAAS8B;AAET;;AAEC,QACD,IAAII,OAAAA,GAAmB;QACnB,IAAI,IAAI,CAACzC,IAAI,EAAE;AACX,YAAA,IAAI+B,MAAMC,OAAO,CAAC,IAAI,CAAChC,IAAI,CAAA,EAAG;AAC1B,gBAAA,OAAO,IAAI,CAACA,IAAI,CAAC0C,MAAM,GAAG,CAAA;AAC9B,YAAA;YACA,OAAO,IAAA;AACX,QAAA;QACA,OAAO,KAAA;AACX,IAAA;AACJ;;;;"}
@@ -2,7 +2,11 @@
2
2
 
3
3
  var PagingInfo = require('./PagingInfo.js');
4
4
 
5
- class QueryResultWithState {
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * Represents a specialized {@link QueryResult<TDataType>} that holds state for its execution
9
+ */ class QueryResultWithState {
6
10
  data;
7
11
  paging;
8
12
  isSuccess;
@@ -20,7 +24,20 @@ class QueryResultWithState {
20
24
  static initial(defaultValue) {
21
25
  return new QueryResultWithState(defaultValue, PagingInfo.PagingInfo.noPaging, true, true, true, [], false, [], '', true);
22
26
  }
23
- constructor(data, paging, isSuccess, isAuthorized, isValid, validationResults, hasExceptions, exceptionMessages, exceptionStackTrace, isPerforming, changeSet) {
27
+ /**
28
+ * Initializes an instance of {@link QueryResultWithState<TDataType>}.
29
+ * @param {TDataType} data The items returned, if any - can be empty.
30
+ * @param {PagingInfo} paging The paging info.
31
+ * @param {boolean} isSuccess Whether or not the query was successful.
32
+ * @param {boolean} isAuthorized Whether or not the query was authorized.
33
+ * @param {boolean} isValid Whether or not it is valid.
34
+ * @param {ValidationResult[]} validationResults Any validation errors.
35
+ * @param {boolean} hasExceptions Whether or not it has exceptions.
36
+ * @param {string[]} exceptionMessages Any exception messages.
37
+ * @param {string} exceptionStackTrace Exception stack trace, if any.
38
+ * @param {boolean} isPerforming Whether or not the query is being performed. True if its performing, false if it is done.
39
+ * @param {ChangeSet<unknown> | undefined} changeSet Optional change set from the server describing the delta since the last update.
40
+ */ constructor(data, paging, isSuccess, isAuthorized, isValid, validationResults, hasExceptions, exceptionMessages, exceptionStackTrace, isPerforming, changeSet){
24
41
  this.data = data;
25
42
  this.paging = paging;
26
43
  this.isSuccess = isSuccess;
@@ -33,13 +50,18 @@ class QueryResultWithState {
33
50
  this.isPerforming = isPerforming;
34
51
  this.changeSet = changeSet;
35
52
  }
36
- get hasData() {
53
+ /** @inheritdoc */ get hasData() {
37
54
  if (Array.isArray(this.data)) {
38
55
  return this.data.length > 0;
39
56
  }
40
57
  return !!this.data;
41
58
  }
42
- static fromQueryResult(queryResult, isPerforming) {
59
+ /**
60
+ * Create a new {@link QueryResultWithState<TDataType>} from {@link QueryResult<TDataType>}.
61
+ * @param queryResult The original query result.
62
+ * @param isPerforming Whether or not the query is performing.
63
+ * @returns A new {@link QueryResultWithState<TDataType>}
64
+ */ static fromQueryResult(queryResult, isPerforming) {
43
65
  return new QueryResultWithState(queryResult.data, queryResult.paging, queryResult.isSuccess, queryResult.isAuthorized, queryResult.isValid, queryResult.validationResults, queryResult.hasExceptions, queryResult.exceptionMessages, queryResult.exceptionStackTrace, isPerforming, queryResult.changeSet);
44
66
  }
45
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"QueryResultWithState.js","sources":["../../../queries/QueryResultWithState.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ValidationResult } from '../validation/ValidationResult';\nimport { IQueryResult } from './IQueryResult';\nimport { PagingInfo } from './PagingInfo';\nimport { QueryResult } from './QueryResult';\nimport { ChangeSet } from './ChangeSet';\n\n/**\n * Represents a specialized {@link QueryResult<TDataType>} that holds state for its execution\n */\nexport class QueryResultWithState<TDataType> implements IQueryResult<TDataType> {\n\n static empty<TDataType>(defaultValue: TDataType): QueryResultWithState<TDataType> {\n return new QueryResultWithState(\n defaultValue,\n PagingInfo.noPaging,\n true,\n true,\n true,\n [],\n false,\n [],\n '',\n false);\n }\n\n static initial<TDataType>(defaultValue: TDataType): QueryResultWithState<TDataType> {\n return new QueryResultWithState(\n defaultValue,\n PagingInfo.noPaging,\n true,\n true,\n true,\n [],\n false,\n [],\n '',\n true);\n }\n\n /**\n * Initializes an instance of {@link QueryResultWithState<TDataType>}.\n * @param {TDataType} data The items returned, if any - can be empty.\n * @param {PagingInfo} paging The paging info.\n * @param {boolean} isSuccess Whether or not the query was successful.\n * @param {boolean} isAuthorized Whether or not the query was authorized.\n * @param {boolean} isValid Whether or not it is valid.\n * @param {ValidationResult[]} validationResults Any validation errors.\n * @param {boolean} hasExceptions Whether or not it has exceptions.\n * @param {string[]} exceptionMessages Any exception messages.\n * @param {string} exceptionStackTrace Exception stack trace, if any.\n * @param {boolean} isPerforming Whether or not the query is being performed. True if its performing, false if it is done.\n * @param {ChangeSet<unknown> | undefined} changeSet Optional change set from the server describing the delta since the last update.\n */\n constructor(\n readonly data: TDataType,\n readonly paging: PagingInfo,\n readonly isSuccess: boolean,\n readonly isAuthorized: boolean,\n readonly isValid: boolean,\n readonly validationResults: ValidationResult[],\n readonly hasExceptions: boolean,\n readonly exceptionMessages: string[],\n readonly exceptionStackTrace: string,\n readonly isPerforming: boolean,\n readonly changeSet?: ChangeSet<unknown>) {\n }\n\n /** @inheritdoc */\n get hasData(): boolean {\n if (Array.isArray(this.data)) {\n return this.data.length > 0;\n }\n return !!this.data;\n }\n\n /**\n * Create a new {@link QueryResultWithState<TDataType>} from {@link QueryResult<TDataType>}.\n * @param queryResult The original query result.\n * @param isPerforming Whether or not the query is performing.\n * @returns A new {@link QueryResultWithState<TDataType>}\n */\n static fromQueryResult<TDataType>(queryResult: QueryResult<TDataType>, isPerforming: boolean) {\n return new QueryResultWithState<TDataType>(\n queryResult.data,\n queryResult.paging,\n queryResult.isSuccess,\n queryResult.isAuthorized,\n queryResult.isValid,\n queryResult.validationResults,\n queryResult.hasExceptions,\n queryResult.exceptionMessages,\n queryResult.exceptionStackTrace,\n isPerforming,\n queryResult.changeSet);\n }\n}\n"],"names":["PagingInfo"],"mappings":";;;;MAYa,oBAAoB,CAAA;AA6ChB,IAAA,IAAA;AACA,IAAA,MAAA;AACA,IAAA,SAAA;AACA,IAAA,YAAA;AACA,IAAA,OAAA;AACA,IAAA,iBAAA;AACA,IAAA,aAAA;AACA,IAAA,iBAAA;AACA,IAAA,mBAAA;AACA,IAAA,YAAA;AACA,IAAA,SAAA;IArDb,OAAO,KAAK,CAAY,YAAuB,EAAA;QAC3C,OAAO,IAAI,oBAAoB,CAC3B,YAAY,EACZA,qBAAU,CAAC,QAAQ,EACnB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,KAAK,EACL,EAAE,EACF,EAAE,EACF,KAAK,CAAC;IACd;IAEA,OAAO,OAAO,CAAY,YAAuB,EAAA;QAC7C,OAAO,IAAI,oBAAoB,CAC3B,YAAY,EACZA,qBAAU,CAAC,QAAQ,EACnB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,KAAK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3,"file":"QueryResultWithState.js","sources":["../../../queries/QueryResultWithState.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ValidationResult } from '../validation/ValidationResult';\nimport { IQueryResult } from './IQueryResult';\nimport { PagingInfo } from './PagingInfo';\nimport { QueryResult } from './QueryResult';\nimport { ChangeSet } from './ChangeSet';\n\n/**\n * Represents a specialized {@link QueryResult<TDataType>} that holds state for its execution\n */\nexport class QueryResultWithState<TDataType> implements IQueryResult<TDataType> {\n\n static empty<TDataType>(defaultValue: TDataType): QueryResultWithState<TDataType> {\n return new QueryResultWithState(\n defaultValue,\n PagingInfo.noPaging,\n true,\n true,\n true,\n [],\n false,\n [],\n '',\n false);\n }\n\n static initial<TDataType>(defaultValue: TDataType): QueryResultWithState<TDataType> {\n return new QueryResultWithState(\n defaultValue,\n PagingInfo.noPaging,\n true,\n true,\n true,\n [],\n false,\n [],\n '',\n true);\n }\n\n /**\n * Initializes an instance of {@link QueryResultWithState<TDataType>}.\n * @param {TDataType} data The items returned, if any - can be empty.\n * @param {PagingInfo} paging The paging info.\n * @param {boolean} isSuccess Whether or not the query was successful.\n * @param {boolean} isAuthorized Whether or not the query was authorized.\n * @param {boolean} isValid Whether or not it is valid.\n * @param {ValidationResult[]} validationResults Any validation errors.\n * @param {boolean} hasExceptions Whether or not it has exceptions.\n * @param {string[]} exceptionMessages Any exception messages.\n * @param {string} exceptionStackTrace Exception stack trace, if any.\n * @param {boolean} isPerforming Whether or not the query is being performed. True if its performing, false if it is done.\n * @param {ChangeSet<unknown> | undefined} changeSet Optional change set from the server describing the delta since the last update.\n */\n constructor(\n readonly data: TDataType,\n readonly paging: PagingInfo,\n readonly isSuccess: boolean,\n readonly isAuthorized: boolean,\n readonly isValid: boolean,\n readonly validationResults: ValidationResult[],\n readonly hasExceptions: boolean,\n readonly exceptionMessages: string[],\n readonly exceptionStackTrace: string,\n readonly isPerforming: boolean,\n readonly changeSet?: ChangeSet<unknown>) {\n }\n\n /** @inheritdoc */\n get hasData(): boolean {\n if (Array.isArray(this.data)) {\n return this.data.length > 0;\n }\n return !!this.data;\n }\n\n /**\n * Create a new {@link QueryResultWithState<TDataType>} from {@link QueryResult<TDataType>}.\n * @param queryResult The original query result.\n * @param isPerforming Whether or not the query is performing.\n * @returns A new {@link QueryResultWithState<TDataType>}\n */\n static fromQueryResult<TDataType>(queryResult: QueryResult<TDataType>, isPerforming: boolean) {\n return new QueryResultWithState<TDataType>(\n queryResult.data,\n queryResult.paging,\n queryResult.isSuccess,\n queryResult.isAuthorized,\n queryResult.isValid,\n queryResult.validationResults,\n queryResult.hasExceptions,\n queryResult.exceptionMessages,\n queryResult.exceptionStackTrace,\n isPerforming,\n queryResult.changeSet);\n }\n}\n"],"names":["QueryResultWithState","empty","defaultValue","PagingInfo","noPaging","initial","data","isAuthorized","hasExceptions","changeSet","paging","isSuccess","isValid","validationResults","exceptionMessages","exceptionStackTrace","isPerforming","hasData","Array","isArray","length","fromQueryResult","queryResult"],"mappings":";;;;AAAA;AACA;AAQA;;AAEC,IACM,MAAMA,oBAAAA,CAAAA;;;;;;;;;;;;IAET,OAAOC,KAAAA,CAAiBC,YAAuB,EAAmC;AAC9E,QAAA,OAAO,IAAIF,oBAAAA,CACPE,YAAAA,EACAC,qBAAAA,CAAWC,QAAQ,EACnB,IAAA,EACA,IAAA,EACA,IAAA,EACA,EAAE,EACF,KAAA,EACA,EAAE,EACF,EAAA,EACA,KAAA,CAAA;AACR,IAAA;IAEA,OAAOC,OAAAA,CAAmBH,YAAuB,EAAmC;AAChF,QAAA,OAAO,IAAIF,oBAAAA,CACPE,YAAAA,EACAC,qBAAAA,CAAWC,QAAQ,EACnB,IAAA,EACA,IAAA,EACA,IAAA,EACA,EAAE,EACF,KAAA,EACA,EAAE,EACF,EAAA,EACA,IAAA,CAAA;AACR,IAAA;AAEA;;;;;;;;;;;;;AAaC,QACD,WAAA,CACaE,IAAe,EACxB,MAA2B,EAC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WebSocket"] = "webSocket";
6
- QueryTransportMethod["ServerSentEvents"] = "serverSentEvents";
7
- })(exports.QueryTransportMethod || (exports.QueryTransportMethod = {}));
3
+ // Copyright (c) Cratis. All rights reserved.
4
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
+ /**
6
+ * Defines the transport method used for observable query connections.
7
+ */ var QueryTransportMethod = /*#__PURE__*/ function(QueryTransportMethod) {
8
+ /**
9
+ * Use WebSocket for real-time data streaming.
10
+ */ QueryTransportMethod["WebSocket"] = "webSocket";
11
+ /**
12
+ * Use Server-Sent Events (SSE) for real-time data streaming.
13
+ */ QueryTransportMethod["ServerSentEvents"] = "serverSentEvents";
14
+ return QueryTransportMethod;
15
+ }({});
16
+
17
+ exports.QueryTransportMethod = QueryTransportMethod;
8
18
  //# sourceMappingURL=QueryTransportMethod.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryTransportMethod.js","sources":["../../../queries/QueryTransportMethod.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Defines the transport method used for observable query connections.\n */\nexport enum QueryTransportMethod {\n /**\n * Use WebSocket for real-time data streaming.\n */\n WebSocket = 'webSocket',\n\n /**\n * Use Server-Sent Events (SSE) for real-time data streaming.\n */\n ServerSentEvents = 'serverSentEvents',\n}\n"],"names":["QueryTransportMethod"],"mappings":";;AAMYA;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAI5B,IAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AAKvB,IAAA,oBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACzC,CAAC,EAVWA,4BAAoB,KAApBA,4BAAoB,GAAA,EAAA,CAAA,CAAA;;"}
1
+ {"version":3,"file":"QueryTransportMethod.js","sources":["../../../queries/QueryTransportMethod.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Defines the transport method used for observable query connections.\n */\nexport enum QueryTransportMethod {\n /**\n * Use WebSocket for real-time data streaming.\n */\n WebSocket = 'webSocket',\n\n /**\n * Use Server-Sent Events (SSE) for real-time data streaming.\n */\n ServerSentEvents = 'serverSentEvents',\n}\n"],"names":["QueryTransportMethod"],"mappings":";;AAAA;AACA;AAEA;;IAGO,IAAKA,oBAAAA,iBAAAA,SAAAA,oBAAAA,EAAAA;AACR;;AAEC,QAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,WAAA;AAGD;;AAEC,QAAA,oBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;AAROA,IAAAA,OAAAA,oBAAAA;AAUX,CAAA,CAAA,EAAA;;;;"}
@@ -2,8 +2,16 @@
2
2
 
3
3
  var Validator = require('../validation/Validator.js');
4
4
 
5
- class QueryValidator extends Validator.Validator {
6
- validate(query) {
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * Represents the query validator
9
+ */ class QueryValidator extends Validator.Validator {
10
+ /**
11
+ * Validate the query parameters.
12
+ * @param query The query to validate.
13
+ * @returns An array of validation results, empty if valid.
14
+ */ validate(query) {
7
15
  return super.validate(query);
8
16
  }
9
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"QueryValidator.js","sources":["../../../queries/QueryValidator.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Validator } from '../validation/Validator';\nimport { ValidationResult } from '../validation/ValidationResult';\n\n/**\n * Represents the query validator\n */\nexport abstract class QueryValidator<T = object> extends Validator<T> {\n /**\n * Validate the query parameters.\n * @param query The query to validate.\n * @returns An array of validation results, empty if valid.\n */\n validate(query: T): ValidationResult[] {\n return super.validate(query);\n }\n}\n"],"names":["Validator"],"mappings":";;;;AASM,MAAgB,cAA2B,SAAQA,mBAAY,CAAA;AAMjE,IAAA,QAAQ,CAAC,KAAQ,EAAA;AACb,QAAA,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAChC;AACH;;;;"}
1
+ {"version":3,"file":"QueryValidator.js","sources":["../../../queries/QueryValidator.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Validator } from '../validation/Validator';\nimport { ValidationResult } from '../validation/ValidationResult';\n\n/**\n * Represents the query validator\n */\nexport abstract class QueryValidator<T = object> extends Validator<T> {\n /**\n * Validate the query parameters.\n * @param query The query to validate.\n * @returns An array of validation results, empty if valid.\n */\n validate(query: T): ValidationResult[] {\n return super.validate(query);\n }\n}\n"],"names":["QueryValidator","Validator","validate","query"],"mappings":";;;;AAAA;AACA;AAKA;;IAGO,MAAeA,cAAAA,SAAmCC,mBAAAA,CAAAA;AACrD;;;;QAKAC,QAAAA,CAASC,KAAQ,EAAsB;QACnC,OAAO,KAAK,CAACD,QAAAA,CAASC,KAAAA,CAAAA;AAC1B,IAAA;AACJ;;;;"}
@@ -1,26 +1,47 @@
1
1
  'use strict';
2
2
 
3
- class ReconnectPolicy {
3
+ // Copyright (c) Cratis. All rights reserved.
4
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
+ /**
6
+ * Default exponential back-off reconnect policy shared by all observable query connections.
7
+ *
8
+ * Delay formula: `Math.min(initialDelayMs + delayStepMs * attempt, maxDelayMs)`
9
+ *
10
+ * With the default parameters:
11
+ * - Attempt 1 → 1 000 ms
12
+ * - Attempt 2 → 1 500 ms
13
+ * - …
14
+ * - Attempt 19+ → 10 000 ms (capped)
15
+ * - After 100 attempts → abandoned (returns `false`)
16
+ */ class ReconnectPolicy {
4
17
  _maxAttempts;
5
18
  _initialDelayMs;
6
19
  _delayStepMs;
7
20
  _maxDelayMs;
8
21
  _attempt = 0;
9
22
  _timer;
10
- constructor(_maxAttempts = 100, _initialDelayMs = 500, _delayStepMs = 500, _maxDelayMs = 10_000) {
23
+ /**
24
+ * Initializes a new instance of {@link ReconnectPolicy}.
25
+ * @param {number} maxAttempts Maximum number of reconnect attempts before giving up (default: 100).
26
+ * @param {number} initialDelayMs Base delay in milliseconds added to every attempt (default: 500).
27
+ * @param {number} delayStepMs Additional delay per attempt in milliseconds (default: 500).
28
+ * @param {number} maxDelayMs Upper bound on the computed delay in milliseconds (default: 10 000).
29
+ */ constructor(_maxAttempts = 100, _initialDelayMs = 500, _delayStepMs = 500, _maxDelayMs = 10_000){
11
30
  this._maxAttempts = _maxAttempts;
12
31
  this._initialDelayMs = _initialDelayMs;
13
32
  this._delayStepMs = _delayStepMs;
14
33
  this._maxDelayMs = _maxDelayMs;
15
34
  }
16
- get attempt() {
35
+ /** @inheritdoc */ get attempt() {
17
36
  return this._attempt;
18
37
  }
19
- schedule(onReconnect, label) {
38
+ /** @inheritdoc */ schedule(onReconnect, label) {
20
39
  if (this._attempt >= this._maxAttempts) {
21
40
  console.log(`Reconnect: abandoned after ${this._maxAttempts} attempts for '${label}'`);
22
41
  return false;
23
42
  }
43
+ // Cancel any pending reconnect timer so we don't fire multiple
44
+ // concurrent reconnect attempts when schedule() is called rapidly.
24
45
  this.cancel();
25
46
  this._attempt++;
26
47
  const delay = Math.min(this._initialDelayMs + this._delayStepMs * this._attempt, this._maxDelayMs);
@@ -28,11 +49,11 @@ class ReconnectPolicy {
28
49
  this._timer = setTimeout(onReconnect, delay);
29
50
  return true;
30
51
  }
31
- reset() {
52
+ /** @inheritdoc */ reset() {
32
53
  this._attempt = 0;
33
54
  this.cancel();
34
55
  }
35
- cancel() {
56
+ /** @inheritdoc */ cancel() {
36
57
  if (this._timer) {
37
58
  clearTimeout(this._timer);
38
59
  this._timer = undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ReconnectPolicy.js","sources":["../../../queries/ReconnectPolicy.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IReconnectPolicy, ReconnectCallback } from './IReconnectPolicy';\n\n/**\n * Default exponential back-off reconnect policy shared by all observable query connections.\n *\n * Delay formula: `Math.min(initialDelayMs + delayStepMs * attempt, maxDelayMs)`\n *\n * With the default parameters:\n * - Attempt 1 → 1 000 ms\n * - Attempt 2 → 1 500 ms\n * - …\n * - Attempt 19+ → 10 000 ms (capped)\n * - After 100 attempts → abandoned (returns `false`)\n */\nexport class ReconnectPolicy implements IReconnectPolicy {\n private _attempt = 0;\n private _timer?: ReturnType<typeof setTimeout>;\n\n /**\n * Initializes a new instance of {@link ReconnectPolicy}.\n * @param {number} maxAttempts Maximum number of reconnect attempts before giving up (default: 100).\n * @param {number} initialDelayMs Base delay in milliseconds added to every attempt (default: 500).\n * @param {number} delayStepMs Additional delay per attempt in milliseconds (default: 500).\n * @param {number} maxDelayMs Upper bound on the computed delay in milliseconds (default: 10 000).\n */\n constructor(\n private readonly _maxAttempts: number = 100,\n private readonly _initialDelayMs: number = 500,\n private readonly _delayStepMs: number = 500,\n private readonly _maxDelayMs: number = 10_000,\n ) {}\n\n /** @inheritdoc */\n get attempt(): number {\n return this._attempt;\n }\n\n /** @inheritdoc */\n schedule(onReconnect: ReconnectCallback, label: string): boolean {\n if (this._attempt >= this._maxAttempts) {\n console.log(`Reconnect: abandoned after ${this._maxAttempts} attempts for '${label}'`);\n return false;\n }\n\n // Cancel any pending reconnect timer so we don't fire multiple\n // concurrent reconnect attempts when schedule() is called rapidly.\n this.cancel();\n\n this._attempt++;\n const delay = Math.min(this._initialDelayMs + this._delayStepMs * this._attempt, this._maxDelayMs);\n console.log(`Reconnect: attempt ${this._attempt} in ${delay}ms for '${label}'`);\n this._timer = setTimeout(onReconnect, delay);\n return true;\n }\n\n /** @inheritdoc */\n reset(): void {\n this._attempt = 0;\n this.cancel();\n }\n\n /** @inheritdoc */\n cancel(): void {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n }\n}\n"],"names":[],"mappings":";;MAiBa,eAAe,CAAA;AAYH,IAAA,YAAA;AACA,IAAA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,MAAM,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;AACzB,YAAA,IAAI,CAAC,MAAM,GAAG,SAAS;QAC3B;IACJ;AACH;;;;"}
1
+ {"version":3,"file":"ReconnectPolicy.js","sources":["../../../queries/ReconnectPolicy.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IReconnectPolicy, ReconnectCallback } from './IReconnectPolicy';\n\n/**\n * Default exponential back-off reconnect policy shared by all observable query connections.\n *\n * Delay formula: `Math.min(initialDelayMs + delayStepMs * attempt, maxDelayMs)`\n *\n * With the default parameters:\n * - Attempt 1 → 1 000 ms\n * - Attempt 2 → 1 500 ms\n * - …\n * - Attempt 19+ → 10 000 ms (capped)\n * - After 100 attempts → abandoned (returns `false`)\n */\nexport class ReconnectPolicy implements IReconnectPolicy {\n private _attempt = 0;\n private _timer?: ReturnType<typeof setTimeout>;\n\n /**\n * Initializes a new instance of {@link ReconnectPolicy}.\n * @param {number} maxAttempts Maximum number of reconnect attempts before giving up (default: 100).\n * @param {number} initialDelayMs Base delay in milliseconds added to every attempt (default: 500).\n * @param {number} delayStepMs Additional delay per attempt in milliseconds (default: 500).\n * @param {number} maxDelayMs Upper bound on the computed delay in milliseconds (default: 10 000).\n */\n constructor(\n private readonly _maxAttempts: number = 100,\n private readonly _initialDelayMs: number = 500,\n private readonly _delayStepMs: number = 500,\n private readonly _maxDelayMs: number = 10_000,\n ) {}\n\n /** @inheritdoc */\n get attempt(): number {\n return this._attempt;\n }\n\n /** @inheritdoc */\n schedule(onReconnect: ReconnectCallback, label: string): boolean {\n if (this._attempt >= this._maxAttempts) {\n console.log(`Reconnect: abandoned after ${this._maxAttempts} attempts for '${label}'`);\n return false;\n }\n\n // Cancel any pending reconnect timer so we don't fire multiple\n // concurrent reconnect attempts when schedule() is called rapidly.\n this.cancel();\n\n this._attempt++;\n const delay = Math.min(this._initialDelayMs + this._delayStepMs * this._attempt, this._maxDelayMs);\n console.log(`Reconnect: attempt ${this._attempt} in ${delay}ms for '${label}'`);\n this._timer = setTimeout(onReconnect, delay);\n return true;\n }\n\n /** @inheritdoc */\n reset(): void {\n this._attempt = 0;\n this.cancel();\n }\n\n /** @inheritdoc */\n cancel(): void {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n }\n}\n"],"names":["ReconnectPolicy","_attempt","_timer","_maxAttempts","_initialDelayMs","_delayStepMs","_maxDelayMs","attempt","schedule","onReconnect","label","console","log","cancel","delay","Math","min","setTimeout","reset","clearTimeout","undefined"],"mappings":";;AAAA;AACA;AAIA;;;;;;;;;;;AAWC,IACM,MAAMA,eAAAA,CAAAA;;;;;AACDC,IAAAA,QAAAA,GAAW,CAAA;IACXC,MAAAA;AAER;;;;;;AAMC,QACD,YACI,YAAiBC,GAAuB,GAAG,EAC3C,eAAiBC,GAA0B,GAAG,EAC7BC,eAAuB,GAAG,EAC3C,WAAiBC,GAAsB,MAAM,CAC/C;aAJmBH,YAAAA,GAAAA,YAAAA;aACAC,eAAAA,GAAAA,eAAAA;aACAC,YAAAA,GAAAA,YAAAA;aACAC,WAAAA,GAAAA,WAAAA;AAClB,IAAA;uBAGH,IAAIC,OAAAA,GAAkB;QAClB,OAAO,IAAI,CAACN,QAAQ;AACxB,IAAA;AAEA,uBACAO,QAAAA,CAASC,WAA8B,EAAEC,KAAa,EAAW;AAC7D,QAAA,IAAI,IAAI,CAACT,QAAQ,IAAI,IAAI,CAACE,YAAY,EAAE;AACpCQ,YAAAA,OAAAA,CAAQC,GAAG,CAAC,CAAC,2BAA2B,EAAE,IAAI,CAACT,YAAY,CAAC,eAAe,EAAEO,KAAAA,CAAM,CAAC,CAAC,CAAA;YACrF,OAAO,KAAA;AACX,QAAA;;;AAIA,QAAA,IAAI,CAACG,MAAM,EAAA;AAEX,QAAA,IAAI,CAACZ,QAAQ,EAAA;AACb,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