@cratis/arc 20.54.5 → 20.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Globals.js +21 -8
- package/dist/cjs/Globals.js.map +1 -1
- package/dist/cjs/UrlHelpers.js +46 -13
- package/dist/cjs/UrlHelpers.js.map +1 -1
- package/dist/cjs/commands/Command.js +50 -38
- package/dist/cjs/commands/Command.js.map +1 -1
- package/dist/cjs/commands/CommandResult.js +58 -36
- package/dist/cjs/commands/CommandResult.js.map +1 -1
- package/dist/cjs/commands/CommandResults.js +24 -22
- package/dist/cjs/commands/CommandResults.js.map +1 -1
- package/dist/cjs/commands/CommandValidator.js +10 -2
- package/dist/cjs/commands/CommandValidator.js.map +1 -1
- package/dist/cjs/commands/index.js +2 -2
- package/dist/cjs/commands/index.js.map +1 -1
- package/dist/cjs/deepEqual.js +9 -9
- package/dist/cjs/deepEqual.js.map +1 -1
- package/dist/cjs/identity/IIdentityProvider.js +5 -1
- package/dist/cjs/identity/IIdentityProvider.js.map +1 -1
- package/dist/cjs/identity/IdentityProvider.js +44 -22
- package/dist/cjs/identity/IdentityProvider.js.map +1 -1
- package/dist/cjs/identity/index.js +2 -1
- package/dist/cjs/identity/index.js.map +1 -1
- package/dist/cjs/index.js +1 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/joinPaths.js +2 -0
- package/dist/cjs/joinPaths.js.map +1 -1
- package/dist/cjs/messaging/IMessenger.js +5 -1
- package/dist/cjs/messaging/IMessenger.js.map +1 -1
- package/dist/cjs/messaging/Message.js +10 -2
- package/dist/cjs/messaging/Message.js.map +1 -1
- package/dist/cjs/messaging/Messenger.js +15 -10
- package/dist/cjs/messaging/Messenger.js.map +1 -1
- package/dist/cjs/messaging/index.js +2 -1
- package/dist/cjs/messaging/index.js.map +1 -1
- package/dist/cjs/queries/HubConnectionKeepAlive.js +41 -6
- package/dist/cjs/queries/HubConnectionKeepAlive.js.map +1 -1
- package/dist/cjs/queries/IQueryProvider.js +5 -1
- package/dist/cjs/queries/IQueryProvider.js.map +1 -1
- package/dist/cjs/queries/NullObservableQueryConnection.js +13 -7
- package/dist/cjs/queries/NullObservableQueryConnection.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnection.js +43 -31
- package/dist/cjs/queries/ObservableQueryConnection.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnectionFactory.js +36 -14
- package/dist/cjs/queries/ObservableQueryConnectionFactory.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnectionPool.js +37 -6
- package/dist/cjs/queries/ObservableQueryConnectionPool.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryDiagnostics.js +29 -14
- package/dist/cjs/queries/ObservableQueryDiagnostics.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryFor.js +57 -31
- package/dist/cjs/queries/ObservableQueryFor.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryMultiplexer.js +109 -51
- package/dist/cjs/queries/ObservableQueryMultiplexer.js.map +1 -1
- package/dist/cjs/queries/ObservableQuerySubscription.js +12 -3
- package/dist/cjs/queries/ObservableQuerySubscription.js.map +1 -1
- package/dist/cjs/queries/Paging.js +20 -6
- package/dist/cjs/queries/Paging.js.map +1 -1
- package/dist/cjs/queries/PagingInfo.js +23 -7
- package/dist/cjs/queries/PagingInfo.js.map +1 -1
- package/dist/cjs/queries/QueryFor.js +42 -24
- package/dist/cjs/queries/QueryFor.js.map +1 -1
- package/dist/cjs/queries/QueryInstanceCache.js +149 -37
- package/dist/cjs/queries/QueryInstanceCache.js.map +1 -1
- package/dist/cjs/queries/QueryProvider.js +13 -3
- package/dist/cjs/queries/QueryProvider.js.map +1 -1
- package/dist/cjs/queries/QueryResult.js +39 -33
- package/dist/cjs/queries/QueryResult.js.map +1 -1
- package/dist/cjs/queries/QueryResultWithState.js +26 -4
- package/dist/cjs/queries/QueryResultWithState.js.map +1 -1
- package/dist/cjs/queries/QueryTransportMethod.js +15 -5
- package/dist/cjs/queries/QueryTransportMethod.js.map +1 -1
- package/dist/cjs/queries/QueryValidator.js +10 -2
- package/dist/cjs/queries/QueryValidator.js.map +1 -1
- package/dist/cjs/queries/ReconnectPolicy.js +27 -6
- package/dist/cjs/queries/ReconnectPolicy.js.map +1 -1
- package/dist/cjs/queries/ServerSentEventHubConnection.js +107 -61
- package/dist/cjs/queries/ServerSentEventHubConnection.js.map +1 -1
- package/dist/cjs/queries/ServerSentEventQueryConnection.js +31 -23
- package/dist/cjs/queries/ServerSentEventQueryConnection.js.map +1 -1
- package/dist/cjs/queries/SortDirection.js +18 -6
- package/dist/cjs/queries/SortDirection.js.map +1 -1
- package/dist/cjs/queries/Sorting.js +16 -4
- package/dist/cjs/queries/Sorting.js.map +1 -1
- package/dist/cjs/queries/SortingActions.js +15 -4
- package/dist/cjs/queries/SortingActions.js.map +1 -1
- package/dist/cjs/queries/SortingActionsForObservableQuery.js +16 -4
- package/dist/cjs/queries/SortingActionsForObservableQuery.js.map +1 -1
- package/dist/cjs/queries/SortingActionsForQuery.js +16 -4
- package/dist/cjs/queries/SortingActionsForQuery.js.map +1 -1
- package/dist/cjs/queries/ValidateRequestArguments.js +13 -9
- package/dist/cjs/queries/ValidateRequestArguments.js.map +1 -1
- package/dist/cjs/queries/WebSocketHubConnection.js +98 -52
- package/dist/cjs/queries/WebSocketHubConnection.js.map +1 -1
- package/dist/cjs/queries/WebSocketMessage.js +18 -6
- package/dist/cjs/queries/WebSocketMessage.js.map +1 -1
- package/dist/cjs/queries/index.js +6 -18
- package/dist/cjs/queries/index.js.map +1 -1
- package/dist/cjs/reflection/ParameterDescriptor.js +11 -2
- package/dist/cjs/reflection/ParameterDescriptor.js.map +1 -1
- package/dist/cjs/reflection/ParametersHelper.js +11 -3
- package/dist/cjs/reflection/ParametersHelper.js.map +1 -1
- package/dist/cjs/reflection/PropertyDescriptor.js +11 -2
- package/dist/cjs/reflection/PropertyDescriptor.js.map +1 -1
- package/dist/cjs/reflection/index.js +2 -1
- package/dist/cjs/reflection/index.js.map +1 -1
- package/dist/cjs/validation/PropertyRule.js +23 -5
- package/dist/cjs/validation/PropertyRule.js.map +1 -1
- package/dist/cjs/validation/PropertyValidator.js +25 -6
- package/dist/cjs/validation/PropertyValidator.js.map +1 -1
- package/dist/cjs/validation/RuleBuilder.js +22 -4
- package/dist/cjs/validation/RuleBuilder.js.map +1 -1
- package/dist/cjs/validation/RuleBuilderExtensions.js +95 -13
- package/dist/cjs/validation/RuleBuilderExtensions.js.map +1 -1
- package/dist/cjs/validation/ValidationResult.js +6 -2
- package/dist/cjs/validation/ValidationResult.js.map +1 -1
- package/dist/cjs/validation/ValidationResultSeverity.js +21 -7
- package/dist/cjs/validation/ValidationResultSeverity.js.map +1 -1
- package/dist/cjs/validation/Validator.js +32 -9
- package/dist/cjs/validation/Validator.js.map +1 -1
- package/dist/cjs/validation/index.js +3 -5
- package/dist/cjs/validation/index.js.map +1 -1
- package/dist/cjs/validation/rules/ComparisonRules.js +46 -20
- package/dist/cjs/validation/rules/ComparisonRules.js.map +1 -1
- package/dist/cjs/validation/rules/EmailRule.js +12 -4
- package/dist/cjs/validation/rules/EmailRule.js.map +1 -1
- package/dist/cjs/validation/rules/LengthRules.js +39 -19
- package/dist/cjs/validation/rules/LengthRules.js.map +1 -1
- package/dist/cjs/validation/rules/NotEmptyRule.js +20 -6
- package/dist/cjs/validation/rules/NotEmptyRule.js.map +1 -1
- package/dist/cjs/validation/rules/PhoneRule.js +12 -4
- package/dist/cjs/validation/rules/PhoneRule.js.map +1 -1
- package/dist/cjs/validation/rules/RegexRule.js +15 -6
- package/dist/cjs/validation/rules/RegexRule.js.map +1 -1
- package/dist/cjs/validation/rules/UrlRule.js +12 -4
- package/dist/cjs/validation/rules/UrlRule.js.map +1 -1
- package/dist/esm/Globals.js +20 -8
- package/dist/esm/Globals.js.map +1 -1
- package/dist/esm/UrlHelpers.d.ts.map +1 -1
- package/dist/esm/UrlHelpers.js +46 -13
- package/dist/esm/UrlHelpers.js.map +1 -1
- package/dist/esm/commands/Command.d.ts.map +1 -1
- package/dist/esm/commands/Command.js +50 -38
- package/dist/esm/commands/Command.js.map +1 -1
- package/dist/esm/commands/CommandResult.d.ts.map +1 -1
- package/dist/esm/commands/CommandResult.js +58 -36
- package/dist/esm/commands/CommandResult.js.map +1 -1
- package/dist/esm/commands/CommandResults.d.ts.map +1 -1
- package/dist/esm/commands/CommandResults.js +24 -22
- package/dist/esm/commands/CommandResults.js.map +1 -1
- package/dist/esm/commands/CommandValidator.d.ts.map +1 -1
- package/dist/esm/commands/CommandValidator.js +10 -2
- package/dist/esm/commands/CommandValidator.js.map +1 -1
- package/dist/esm/commands/for_Command/CommandWithRouteParams.d.ts.map +1 -1
- package/dist/esm/commands/for_Command/SomeCommand.d.ts.map +1 -1
- package/dist/esm/commands/for_Command/given/a_command.d.ts.map +1 -1
- package/dist/esm/commands/for_Command/given/a_command_with_validator.d.ts.map +1 -1
- package/dist/esm/commands/index.js +3 -1
- package/dist/esm/commands/index.js.map +1 -1
- package/dist/esm/deepEqual.d.ts.map +1 -1
- package/dist/esm/deepEqual.js +9 -9
- package/dist/esm/deepEqual.js.map +1 -1
- package/dist/esm/given.d.ts.map +1 -1
- package/dist/esm/helpers/fetchHelper.d.ts.map +1 -1
- package/dist/esm/identity/IIdentityProvider.d.ts.map +1 -1
- package/dist/esm/identity/IIdentityProvider.js +5 -1
- package/dist/esm/identity/IIdentityProvider.js.map +1 -1
- package/dist/esm/identity/IdentityProvider.d.ts.map +1 -1
- package/dist/esm/identity/IdentityProvider.js +44 -22
- package/dist/esm/identity/IdentityProvider.js.map +1 -1
- package/dist/esm/identity/for_IdentityProvider/given/an_identity_provider.d.ts.map +1 -1
- package/dist/esm/identity/index.js +3 -0
- package/dist/esm/identity/index.js.map +1 -1
- package/dist/esm/joinPaths.js +2 -0
- package/dist/esm/joinPaths.js.map +1 -1
- package/dist/esm/messaging/IMessenger.d.ts.map +1 -1
- package/dist/esm/messaging/IMessenger.js +5 -1
- package/dist/esm/messaging/IMessenger.js.map +1 -1
- package/dist/esm/messaging/Message.d.ts.map +1 -1
- package/dist/esm/messaging/Message.js +10 -2
- package/dist/esm/messaging/Message.js.map +1 -1
- package/dist/esm/messaging/Messenger.d.ts.map +1 -1
- package/dist/esm/messaging/Messenger.js +15 -10
- package/dist/esm/messaging/Messenger.js.map +1 -1
- package/dist/esm/messaging/for_Messenger/when_scoping_messages.js.map +1 -1
- package/dist/esm/messaging/index.js +3 -0
- package/dist/esm/messaging/index.js.map +1 -1
- package/dist/esm/queries/HubConnectionKeepAlive.d.ts.map +1 -1
- package/dist/esm/queries/HubConnectionKeepAlive.js +41 -6
- package/dist/esm/queries/HubConnectionKeepAlive.js.map +1 -1
- package/dist/esm/queries/IQueryProvider.d.ts.map +1 -1
- package/dist/esm/queries/IQueryProvider.js +5 -1
- package/dist/esm/queries/IQueryProvider.js.map +1 -1
- package/dist/esm/queries/NullObservableQueryConnection.d.ts.map +1 -1
- package/dist/esm/queries/NullObservableQueryConnection.js +13 -7
- package/dist/esm/queries/NullObservableQueryConnection.js.map +1 -1
- package/dist/esm/queries/ObservableQueryConnection.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryConnection.js +43 -31
- package/dist/esm/queries/ObservableQueryConnection.js.map +1 -1
- package/dist/esm/queries/ObservableQueryConnectionFactory.js +36 -14
- package/dist/esm/queries/ObservableQueryConnectionFactory.js.map +1 -1
- package/dist/esm/queries/ObservableQueryConnectionPool.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryConnectionPool.js +37 -6
- package/dist/esm/queries/ObservableQueryConnectionPool.js.map +1 -1
- package/dist/esm/queries/ObservableQueryDiagnostics.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryDiagnostics.js +29 -14
- package/dist/esm/queries/ObservableQueryDiagnostics.js.map +1 -1
- package/dist/esm/queries/ObservableQueryFor.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryFor.js +57 -31
- package/dist/esm/queries/ObservableQueryFor.js.map +1 -1
- package/dist/esm/queries/ObservableQueryMultiplexer.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryMultiplexer.js +109 -51
- package/dist/esm/queries/ObservableQueryMultiplexer.js.map +1 -1
- package/dist/esm/queries/ObservableQuerySubscription.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQuerySubscription.js +12 -3
- package/dist/esm/queries/ObservableQuerySubscription.js.map +1 -1
- package/dist/esm/queries/Paging.d.ts.map +1 -1
- package/dist/esm/queries/Paging.js +20 -6
- package/dist/esm/queries/Paging.js.map +1 -1
- package/dist/esm/queries/PagingInfo.d.ts.map +1 -1
- package/dist/esm/queries/PagingInfo.js +23 -7
- package/dist/esm/queries/PagingInfo.js.map +1 -1
- package/dist/esm/queries/QueryFor.d.ts.map +1 -1
- package/dist/esm/queries/QueryFor.js +42 -24
- package/dist/esm/queries/QueryFor.js.map +1 -1
- package/dist/esm/queries/QueryInstanceCache.d.ts.map +1 -1
- package/dist/esm/queries/QueryInstanceCache.js +149 -37
- package/dist/esm/queries/QueryInstanceCache.js.map +1 -1
- package/dist/esm/queries/QueryProvider.d.ts.map +1 -1
- package/dist/esm/queries/QueryProvider.js +13 -3
- package/dist/esm/queries/QueryProvider.js.map +1 -1
- package/dist/esm/queries/QueryResult.d.ts.map +1 -1
- package/dist/esm/queries/QueryResult.js +39 -33
- package/dist/esm/queries/QueryResult.js.map +1 -1
- package/dist/esm/queries/QueryResultWithState.d.ts.map +1 -1
- package/dist/esm/queries/QueryResultWithState.js +26 -4
- package/dist/esm/queries/QueryResultWithState.js.map +1 -1
- package/dist/esm/queries/QueryTransportMethod.js +13 -5
- package/dist/esm/queries/QueryTransportMethod.js.map +1 -1
- package/dist/esm/queries/QueryValidator.d.ts.map +1 -1
- package/dist/esm/queries/QueryValidator.js +10 -2
- package/dist/esm/queries/QueryValidator.js.map +1 -1
- package/dist/esm/queries/ReconnectPolicy.d.ts.map +1 -1
- package/dist/esm/queries/ReconnectPolicy.js +27 -6
- package/dist/esm/queries/ReconnectPolicy.js.map +1 -1
- package/dist/esm/queries/ServerSentEventHubConnection.d.ts.map +1 -1
- package/dist/esm/queries/ServerSentEventHubConnection.js +107 -61
- package/dist/esm/queries/ServerSentEventHubConnection.js.map +1 -1
- package/dist/esm/queries/ServerSentEventQueryConnection.d.ts.map +1 -1
- package/dist/esm/queries/ServerSentEventQueryConnection.js +31 -23
- package/dist/esm/queries/ServerSentEventQueryConnection.js.map +1 -1
- package/dist/esm/queries/SortDirection.js +16 -6
- package/dist/esm/queries/SortDirection.js.map +1 -1
- package/dist/esm/queries/Sorting.d.ts.map +1 -1
- package/dist/esm/queries/Sorting.js +16 -4
- package/dist/esm/queries/Sorting.js.map +1 -1
- package/dist/esm/queries/SortingActions.d.ts.map +1 -1
- package/dist/esm/queries/SortingActions.js +15 -4
- package/dist/esm/queries/SortingActions.js.map +1 -1
- package/dist/esm/queries/SortingActionsForObservableQuery.d.ts.map +1 -1
- package/dist/esm/queries/SortingActionsForObservableQuery.js +16 -4
- package/dist/esm/queries/SortingActionsForObservableQuery.js.map +1 -1
- package/dist/esm/queries/SortingActionsForQuery.d.ts.map +1 -1
- package/dist/esm/queries/SortingActionsForQuery.js +16 -4
- package/dist/esm/queries/SortingActionsForQuery.js.map +1 -1
- package/dist/esm/queries/ValidateRequestArguments.js +13 -9
- package/dist/esm/queries/ValidateRequestArguments.js.map +1 -1
- package/dist/esm/queries/WebSocketHubConnection.d.ts.map +1 -1
- package/dist/esm/queries/WebSocketHubConnection.js +97 -52
- package/dist/esm/queries/WebSocketHubConnection.js.map +1 -1
- package/dist/esm/queries/WebSocketMessage.js +16 -6
- package/dist/esm/queries/WebSocketMessage.js.map +1 -1
- package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryFor/given/TestQueries.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts.map +1 -1
- package/dist/esm/queries/for_QueryFor/given/TestQueries.d.ts.map +1 -1
- package/dist/esm/queries/for_QueryFor/given/a_query_for.d.ts.map +1 -1
- package/dist/esm/queries/for_QueryFor/given/a_query_with_validator.d.ts.map +1 -1
- package/dist/esm/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +1 -1
- package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +1 -1
- package/dist/esm/queries/index.js +3 -1
- package/dist/esm/queries/index.js.map +1 -1
- package/dist/esm/reflection/ParameterDescriptor.d.ts.map +1 -1
- package/dist/esm/reflection/ParameterDescriptor.js +11 -2
- package/dist/esm/reflection/ParameterDescriptor.js.map +1 -1
- package/dist/esm/reflection/ParametersHelper.d.ts.map +1 -1
- package/dist/esm/reflection/ParametersHelper.js +11 -3
- package/dist/esm/reflection/ParametersHelper.js.map +1 -1
- package/dist/esm/reflection/PropertyDescriptor.d.ts.map +1 -1
- package/dist/esm/reflection/PropertyDescriptor.js +11 -2
- package/dist/esm/reflection/PropertyDescriptor.js.map +1 -1
- package/dist/esm/reflection/index.js +3 -0
- package/dist/esm/reflection/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/validation/PropertyRule.d.ts.map +1 -1
- package/dist/esm/validation/PropertyRule.js +23 -5
- package/dist/esm/validation/PropertyRule.js.map +1 -1
- package/dist/esm/validation/PropertyValidator.d.ts.map +1 -1
- package/dist/esm/validation/PropertyValidator.js +25 -6
- package/dist/esm/validation/PropertyValidator.js.map +1 -1
- package/dist/esm/validation/RuleBuilder.d.ts.map +1 -1
- package/dist/esm/validation/RuleBuilder.js +22 -4
- package/dist/esm/validation/RuleBuilder.js.map +1 -1
- package/dist/esm/validation/RuleBuilderExtensions.js +95 -13
- package/dist/esm/validation/RuleBuilderExtensions.js.map +1 -1
- package/dist/esm/validation/ValidationResult.d.ts.map +1 -1
- package/dist/esm/validation/ValidationResult.js +6 -2
- package/dist/esm/validation/ValidationResult.js.map +1 -1
- package/dist/esm/validation/ValidationResultSeverity.js +19 -7
- package/dist/esm/validation/ValidationResultSeverity.js.map +1 -1
- package/dist/esm/validation/Validator.d.ts.map +1 -1
- package/dist/esm/validation/Validator.js +32 -9
- package/dist/esm/validation/Validator.js.map +1 -1
- package/dist/esm/validation/index.js +3 -0
- package/dist/esm/validation/index.js.map +1 -1
- package/dist/esm/validation/rules/ComparisonRules.d.ts.map +1 -1
- package/dist/esm/validation/rules/ComparisonRules.js +46 -20
- package/dist/esm/validation/rules/ComparisonRules.js.map +1 -1
- package/dist/esm/validation/rules/EmailRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/EmailRule.js +12 -4
- package/dist/esm/validation/rules/EmailRule.js.map +1 -1
- package/dist/esm/validation/rules/LengthRules.d.ts.map +1 -1
- package/dist/esm/validation/rules/LengthRules.js +39 -19
- package/dist/esm/validation/rules/LengthRules.js.map +1 -1
- package/dist/esm/validation/rules/NotEmptyRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/NotEmptyRule.js +20 -6
- package/dist/esm/validation/rules/NotEmptyRule.js.map +1 -1
- package/dist/esm/validation/rules/PhoneRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/PhoneRule.js +12 -4
- package/dist/esm/validation/rules/PhoneRule.js.map +1 -1
- package/dist/esm/validation/rules/RegexRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/RegexRule.js +15 -6
- package/dist/esm/validation/rules/RegexRule.js.map +1 -1
- package/dist/esm/validation/rules/UrlRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/UrlRule.js +12 -4
- package/dist/esm/validation/rules/UrlRule.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/GetHttpHeaders.d.ts +0 -2
- package/dist/cjs/GetHttpHeaders.d.ts.map +0 -1
- package/dist/cjs/Globals.d.ts +0 -21
- package/dist/cjs/Globals.d.ts.map +0 -1
- package/dist/cjs/ICanBeConfigured.d.ts +0 -8
- package/dist/cjs/ICanBeConfigured.d.ts.map +0 -1
- package/dist/cjs/UrlHelpers.d.ts +0 -9
- package/dist/cjs/UrlHelpers.d.ts.map +0 -1
- package/dist/cjs/commands/Command.d.ts +0 -45
- package/dist/cjs/commands/Command.d.ts.map +0 -1
- package/dist/cjs/commands/CommandResult.d.ts +0 -49
- package/dist/cjs/commands/CommandResult.d.ts.map +0 -1
- package/dist/cjs/commands/CommandResults.d.ts +0 -23
- package/dist/cjs/commands/CommandResults.d.ts.map +0 -1
- package/dist/cjs/commands/CommandValidator.d.ts +0 -6
- package/dist/cjs/commands/CommandValidator.d.ts.map +0 -1
- package/dist/cjs/commands/ICommand.d.ts +0 -21
- package/dist/cjs/commands/ICommand.d.ts.map +0 -1
- package/dist/cjs/commands/ICommandResult.d.ts +0 -15
- package/dist/cjs/commands/ICommandResult.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/CommandWithRouteParams.d.ts +0 -16
- package/dist/cjs/commands/for_Command/CommandWithRouteParams.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/SomeCommand.d.ts +0 -14
- package/dist/cjs/commands/for_Command/SomeCommand.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/given/a_command.d.ts +0 -12
- package/dist/cjs/commands/for_Command/given/a_command.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/given/a_command_with_validator.d.ts +0 -33
- package/dist/cjs/commands/for_Command/given/a_command_with_validator.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_clearing_the_command.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_clearing_the_command.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_constructing_command.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_constructing_command.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_origin.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_origin.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/and_command_route_not_found.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/and_command_route_not_found.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/and_fetch_throws_exception.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/and_fetch_throws_exception.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_allowed_severity_warning.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_allowed_severity_warning.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failure_and_custom_message.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failure_and_custom_message.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_command_properties.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_command_properties.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_custom_http_headers.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_custom_http_headers.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_empty_required_string_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_empty_required_string_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_microservice_header.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_microservice_header.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_missing_required_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_missing_required_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_null_required_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_null_required_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_origin_and_api_base_path.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_origin_and_api_base_path.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_route_parameters.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_route_parameters.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_successful_response.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_successful_response.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_different_from_initial_value.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_different_from_initial_value.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_same_as_initial_value.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_same_as_initial_value.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changes_and_initial_value_is_undefined.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changes_and_initial_value_is_undefined.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changes_and_there_is_a_callback.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changes_and_there_is_a_callback.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_has_changed_and_we_revert.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_has_changed_and_we_revert.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_setting_initial_values_after_property_changed.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_setting_initial_values_after_property_changed.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/and_fetch_throws_exception.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/and_fetch_throws_exception.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/and_validation_endpoint_not_found.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/and_validation_endpoint_not_found.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/does_not_update_initial_values.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/does_not_update_initial_values.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_failure.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_failure.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_empty_required_string_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_empty_required_string_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_null_required_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_null_required_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_required_property_missing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_required_property_missing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_route_parameters.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_route_parameters.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_successful_response.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_successful_response.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_validation_errors.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_validation_errors.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_failure.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_failure.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_required_property_missing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_required_property_missing.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_has_exceptions.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_has_exceptions.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_invalid.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_invalid.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_successful.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_successful.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_unauthorized.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_unauthorized.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_constructing_with_primitive_response.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_constructing_with_primitive_response.d.ts.map +0 -1
- package/dist/cjs/commands/index.d.ts +0 -8
- package/dist/cjs/commands/index.d.ts.map +0 -1
- package/dist/cjs/deepEqual.d.ts +0 -2
- package/dist/cjs/deepEqual.d.ts.map +0 -1
- package/dist/cjs/given.d.ts +0 -5
- package/dist/cjs/given.d.ts.map +0 -1
- package/dist/cjs/helpers/fetchHelper.d.ts +0 -7
- package/dist/cjs/helpers/fetchHelper.d.ts.map +0 -1
- package/dist/cjs/identity/IIdentity.d.ts +0 -10
- package/dist/cjs/identity/IIdentity.d.ts.map +0 -1
- package/dist/cjs/identity/IIdentityProvider.d.ts +0 -6
- package/dist/cjs/identity/IIdentityProvider.d.ts.map +0 -1
- package/dist/cjs/identity/IdentityProvider.d.ts +0 -20
- package/dist/cjs/identity/IdentityProvider.d.ts.map +0 -1
- package/dist/cjs/identity/IdentityProviderResult.d.ts +0 -7
- package/dist/cjs/identity/IdentityProviderResult.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/given/an_identity_provider.d.ts +0 -12
- package/dist/cjs/identity/for_IdentityProvider/given/an_identity_provider.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_roles.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_roles.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_type_safe_details.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_type_safe_details.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/without_roles.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/without_roles.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_api_base_path_set.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_api_base_path_set.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_origin_set.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_origin_set.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_type_safe_details.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_type_safe_details.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_unauthorized_response.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_unauthorized_response.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/without_api_base_path.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/without_api_base_path.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_setting_api_base_path.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_setting_api_base_path.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_setting_origin.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_setting_origin.d.ts.map +0 -1
- package/dist/cjs/identity/index.d.ts +0 -5
- package/dist/cjs/identity/index.d.ts.map +0 -1
- package/dist/cjs/index.d.ts +0 -14
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/joinPaths.d.ts +0 -2
- package/dist/cjs/joinPaths.d.ts.map +0 -1
- package/dist/cjs/messaging/IMessenger.d.ts +0 -10
- package/dist/cjs/messaging/IMessenger.d.ts.map +0 -1
- package/dist/cjs/messaging/Message.d.ts +0 -7
- package/dist/cjs/messaging/Message.d.ts.map +0 -1
- package/dist/cjs/messaging/Messenger.d.ts +0 -20
- package/dist/cjs/messaging/Messenger.d.ts.map +0 -1
- package/dist/cjs/messaging/for_Messenger/when_scoping_messages.d.ts +0 -2
- package/dist/cjs/messaging/for_Messenger/when_scoping_messages.d.ts.map +0 -1
- package/dist/cjs/messaging/index.d.ts +0 -4
- package/dist/cjs/messaging/index.d.ts.map +0 -1
- package/dist/cjs/queries/ChangeSet.d.ts +0 -6
- package/dist/cjs/queries/ChangeSet.d.ts.map +0 -1
- package/dist/cjs/queries/HubConnectionKeepAlive.d.ts +0 -12
- package/dist/cjs/queries/HubConnectionKeepAlive.d.ts.map +0 -1
- package/dist/cjs/queries/IChangeStreamFor.d.ts +0 -4
- package/dist/cjs/queries/IChangeStreamFor.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryConnection.d.ts +0 -8
- package/dist/cjs/queries/IObservableQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryDiagnostics.d.ts +0 -9
- package/dist/cjs/queries/IObservableQueryDiagnostics.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryFor.d.ts +0 -14
- package/dist/cjs/queries/IObservableQueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryHubConnection.d.ts +0 -12
- package/dist/cjs/queries/IObservableQueryHubConnection.d.ts.map +0 -1
- package/dist/cjs/queries/IQuery.d.ts +0 -10
- package/dist/cjs/queries/IQuery.d.ts.map +0 -1
- package/dist/cjs/queries/IQueryFor.d.ts +0 -13
- package/dist/cjs/queries/IQueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/IQueryProvider.d.ts +0 -6
- package/dist/cjs/queries/IQueryProvider.d.ts.map +0 -1
- package/dist/cjs/queries/IQueryResult.d.ts +0 -17
- package/dist/cjs/queries/IQueryResult.d.ts.map +0 -1
- package/dist/cjs/queries/IReconnectPolicy.d.ts +0 -8
- package/dist/cjs/queries/IReconnectPolicy.d.ts.map +0 -1
- package/dist/cjs/queries/NullObservableQueryConnection.d.ts +0 -11
- package/dist/cjs/queries/NullObservableQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryConnection.d.ts +0 -29
- package/dist/cjs/queries/ObservableQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts +0 -13
- package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts +0 -9
- package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryDiagnostics.d.ts +0 -21
- package/dist/cjs/queries/ObservableQueryDiagnostics.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryDiagnosticsSnapshot.d.ts +0 -48
- package/dist/cjs/queries/ObservableQueryDiagnosticsSnapshot.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryFor.d.ts +0 -37
- package/dist/cjs/queries/ObservableQueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts +0 -33
- package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQuerySubscription.d.ts +0 -7
- package/dist/cjs/queries/ObservableQuerySubscription.d.ts.map +0 -1
- package/dist/cjs/queries/Paging.d.ts +0 -8
- package/dist/cjs/queries/Paging.d.ts.map +0 -1
- package/dist/cjs/queries/PagingInfo.d.ts +0 -9
- package/dist/cjs/queries/PagingInfo.d.ts.map +0 -1
- package/dist/cjs/queries/QueryFor.d.ts +0 -34
- package/dist/cjs/queries/QueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/QueryInstanceCache.d.ts +0 -39
- package/dist/cjs/queries/QueryInstanceCache.d.ts.map +0 -1
- package/dist/cjs/queries/QueryProvider.d.ts +0 -13
- package/dist/cjs/queries/QueryProvider.d.ts.map +0 -1
- package/dist/cjs/queries/QueryResult.d.ts +0 -53
- package/dist/cjs/queries/QueryResult.d.ts.map +0 -1
- package/dist/cjs/queries/QueryResultWithState.d.ts +0 -24
- package/dist/cjs/queries/QueryResultWithState.d.ts.map +0 -1
- package/dist/cjs/queries/QueryTransportMethod.d.ts +0 -5
- package/dist/cjs/queries/QueryTransportMethod.d.ts.map +0 -1
- package/dist/cjs/queries/QueryValidator.d.ts +0 -6
- package/dist/cjs/queries/QueryValidator.d.ts.map +0 -1
- package/dist/cjs/queries/ReconnectPolicy.d.ts +0 -15
- package/dist/cjs/queries/ReconnectPolicy.d.ts.map +0 -1
- package/dist/cjs/queries/ServerSentEventHubConnection.d.ts +0 -41
- package/dist/cjs/queries/ServerSentEventHubConnection.d.ts.map +0 -1
- package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts +0 -14
- package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/SortDirection.d.ts +0 -6
- package/dist/cjs/queries/SortDirection.d.ts.map +0 -1
- package/dist/cjs/queries/Sorting.d.ts +0 -9
- package/dist/cjs/queries/Sorting.d.ts.map +0 -1
- package/dist/cjs/queries/SortingActions.d.ts +0 -10
- package/dist/cjs/queries/SortingActions.d.ts.map +0 -1
- package/dist/cjs/queries/SortingActionsForObservableQuery.d.ts +0 -10
- package/dist/cjs/queries/SortingActionsForObservableQuery.d.ts.map +0 -1
- package/dist/cjs/queries/SortingActionsForQuery.d.ts +0 -10
- package/dist/cjs/queries/SortingActionsForQuery.d.ts.map +0 -1
- package/dist/cjs/queries/ValidateRequestArguments.d.ts +0 -2
- package/dist/cjs/queries/ValidateRequestArguments.d.ts.map +0 -1
- package/dist/cjs/queries/WebSocketHubConnection.d.ts +0 -58
- package/dist/cjs/queries/WebSocketHubConnection.d.ts.map +0 -1
- package/dist/cjs/queries/WebSocketMessage.d.ts +0 -11
- package/dist/cjs/queries/WebSocketMessage.d.ts.map +0 -1
- package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts +0 -2
- package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts.map +0 -1
- package/dist/cjs/queries/for_HubConnectionKeepAlive/when_started_with_custom_idle_threshold/respects_threshold.d.ts +0 -2
- package/dist/cjs/queries/for_HubConnectionKeepAlive/when_started_with_custom_idle_threshold/respects_threshold.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts +0 -9
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts +0 -21
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/when_constructing.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnection/when_constructing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_data_message_with_type.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_data_message_with_type.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_legacy_data_message.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_legacy_data_message.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts +0 -9
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_exceeding_safe_limit.d.ts +0 -2
- 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
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_within_safe_limit.d.ts +0 -2
- 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
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport_and_high_connection_count.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport_and_high_connection_count.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryDiagnostics/when_tracking_owners.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryDiagnostics/when_tracking_owners.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/given/TestQueries.d.ts +0 -53
- package/dist/cjs/queries/for_ObservableQueryFor/given/TestQueries.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts +0 -10
- package/dist/cjs/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_origin.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_disposing.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_disposing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_enumerable_query.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_enumerable_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_invalid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_invalid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_paging.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_paging.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partially_missing_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partially_missing_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_sorting.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_sorting.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_valid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_valid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_microservice.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_microservice.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_origin.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_enumerable_query.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_enumerable_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_multiple_required_route_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_multiple_required_route_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_null_or_undefined_args.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_null_or_undefined_args.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_route_and_query_args.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_route_and_query_args.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_stale_descriptor_backed_instance_property.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_stale_descriptor_backed_instance_property.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_invalid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_invalid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_paging.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_paging.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_sorting.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_sorting.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_valid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_valid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_changed_cache_key.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_changed_cache_key.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_new_cache_key.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_new_cache_key.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_an_explicit_size.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_an_explicit_size.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_the_same_cache_key.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_the_same_cache_key.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/given/TestQueries.d.ts +0 -57
- package/dist/cjs/queries/for_QueryFor/given/TestQueries.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/given/a_query_for.d.ts +0 -11
- package/dist/cjs/queries/for_QueryFor/given/a_query_for.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/given/a_query_with_validator.d.ts +0 -35
- package/dist/cjs/queries/for_QueryFor/given/a_query_with_validator.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_origin.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_abort_controller.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_abort_controller.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failing.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failing.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failure_and_custom_message.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failure_and_custom_message.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_query.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_fetch_error.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_fetch_error.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_invalid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_invalid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_json_parse_error.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_json_parse_error.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_paging.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_paging.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partially_missing_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partially_missing_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_query_without_required_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_query_without_required_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_sorting.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_sorting.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_valid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_valid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_setting_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_setting_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_setting_microservice.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_setting_microservice.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_setting_origin.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_setting_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_acquiring/after_release.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_acquiring/after_release.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/with_cancellation_before_timeout.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/with_cancellation_before_timeout.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/without_cancellation.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/without_cancellation.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/an_empty_cache.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/an_empty_cache.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_active_subscriptions.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_active_subscriptions.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_pending_deferred_cleanup.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_pending_deferred_cleanup.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/after_timeout_elapses.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/after_timeout_elapses.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/before_timeout_elapses.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/before_timeout_elapses.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_changed_data.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_changed_data.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_identical_data_as_previous_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_identical_data_as_previous_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/without_previous_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/without_previous_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_active_subscriptions.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_active_subscriptions.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_no_subscriptions.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_no_subscriptions.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_pending_deferred_cleanup.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_pending_deferred_cleanup.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_an_array_with_items.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_an_array_with_items.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_defined_instance.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_defined_instance.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_empty_array.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_empty_array.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_non_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_non_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_undefined.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_undefined.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_data_is_single_item_for_enumerable/and_it_is_an_array.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_data_is_single_item_for_enumerable/and_it_is_an_array.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_null_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_null_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_undefined_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_undefined_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_null_data.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_null_data.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_undefined_data.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_undefined_data.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_null_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_null_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_undefined_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_undefined_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_valid_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_valid_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_rescheduled_before_first_fires/cancels_previous_timer.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_rescheduled_before_first_fires/cancels_previous_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts +0 -21
- package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/and_subscribe_post_fails.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/and_subscribe_post_fails.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/nulls_event_source_handlers_before_closing.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/nulls_event_source_handlers_before_closing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_empty_string_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_empty_string_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_missing_property.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_missing_property.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_no_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_no_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_null_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_null_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_numeric_zero_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_numeric_zero_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_undefined_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_undefined_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_valid_string_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_valid_string_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/without_arguments_object.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/without_arguments_object.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts +0 -23
- package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/nulls_socket_handlers_before_closing.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/nulls_socket_handlers_before_closing.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketMessage/when_creating_messages.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketMessage/when_creating_messages.d.ts.map +0 -1
- package/dist/cjs/queries/index.d.ts +0 -39
- package/dist/cjs/queries/index.d.ts.map +0 -1
- package/dist/cjs/reflection/IHaveParameters.d.ts +0 -5
- package/dist/cjs/reflection/IHaveParameters.d.ts.map +0 -1
- package/dist/cjs/reflection/ParameterDescriptor.d.ts +0 -8
- package/dist/cjs/reflection/ParameterDescriptor.d.ts.map +0 -1
- package/dist/cjs/reflection/ParametersHelper.d.ts +0 -5
- package/dist/cjs/reflection/ParametersHelper.d.ts.map +0 -1
- package/dist/cjs/reflection/PropertyDescriptor.d.ts +0 -8
- package/dist/cjs/reflection/PropertyDescriptor.d.ts.map +0 -1
- package/dist/cjs/reflection/index.d.ts +0 -5
- package/dist/cjs/reflection/index.d.ts.map +0 -1
- package/dist/cjs/validation/IValidationRule.d.ts +0 -5
- package/dist/cjs/validation/IValidationRule.d.ts.map +0 -1
- package/dist/cjs/validation/PropertyRule.d.ts +0 -11
- package/dist/cjs/validation/PropertyRule.d.ts.map +0 -1
- package/dist/cjs/validation/PropertyValidator.d.ts +0 -11
- package/dist/cjs/validation/PropertyValidator.d.ts.map +0 -1
- package/dist/cjs/validation/RuleBuilder.d.ts +0 -11
- package/dist/cjs/validation/RuleBuilder.d.ts.map +0 -1
- package/dist/cjs/validation/RuleBuilderExtensions.d.ts +0 -32
- package/dist/cjs/validation/RuleBuilderExtensions.d.ts.map +0 -1
- package/dist/cjs/validation/ValidationResult.d.ts +0 -9
- package/dist/cjs/validation/ValidationResult.d.ts.map +0 -1
- package/dist/cjs/validation/ValidationResultSeverity.d.ts +0 -7
- package/dist/cjs/validation/ValidationResultSeverity.d.ts.map +0 -1
- package/dist/cjs/validation/Validator.d.ts +0 -11
- package/dist/cjs/validation/Validator.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_defining_multiple_rules_for_same_property.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_defining_multiple_rules_for_same_property.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_using_custom_error_message.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_using_custom_error_message.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_validating/with_all_rules_passing.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_validating/with_all_rules_passing.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_validating/with_multiple_rules_failing.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_validating/with_multiple_rules_failing.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_validating/with_one_rule_failing.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_validating/with_one_rule_failing.d.ts.map +0 -1
- package/dist/cjs/validation/index.d.ts +0 -14
- package/dist/cjs/validation/index.d.ts.map +0 -1
- package/dist/cjs/validation/rules/ComparisonRules.d.ts +0 -22
- package/dist/cjs/validation/rules/ComparisonRules.d.ts.map +0 -1
- package/dist/cjs/validation/rules/EmailRule.d.ts +0 -7
- package/dist/cjs/validation/rules/EmailRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/LengthRules.d.ts +0 -18
- package/dist/cjs/validation/rules/LengthRules.d.ts.map +0 -1
- package/dist/cjs/validation/rules/NotEmptyRule.d.ts +0 -10
- package/dist/cjs/validation/rules/NotEmptyRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/PhoneRule.d.ts +0 -7
- package/dist/cjs/validation/rules/PhoneRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/RegexRule.d.ts +0 -7
- package/dist/cjs/validation/rules/RegexRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/UrlRule.d.ts +0 -7
- package/dist/cjs/validation/rules/UrlRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_empty_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_empty_string.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_invalid_email.d.ts +0 -2
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_invalid_email.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_valid_email.d.ts +0 -2
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_valid_email.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanOrEqualRule/when_validating/with_value_equal_to_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanOrEqualRule/when_validating/with_value_equal_to_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_equal_to_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_equal_to_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_greater_than_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_greater_than_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_less_than_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_less_than_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_longer_than_maximum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_longer_than_maximum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_shorter_than_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_shorter_than_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_within_range.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_within_range.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LessThanRule/when_validating/with_value_less_than_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LessThanRule/when_validating/with_value_less_than_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_equal_to_maximum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_equal_to_maximum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_longer_than_maximum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_longer_than_maximum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_equal_to_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_equal_to_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_longer_than_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_longer_than_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_shorter_than_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_shorter_than_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_setting_custom_message.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_setting_custom_message.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_array.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_array.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_string.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_non_empty_array.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_non_empty_array.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_null_value.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_null_value.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_undefined_value.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_undefined_value.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_valid_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_valid_string.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_whitespace_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_whitespace_string.d.ts.map +0 -1
|
@@ -4,7 +4,19 @@ import { ReconnectPolicy } from './ReconnectPolicy.js';
|
|
|
4
4
|
import { QueryResult } from './QueryResult.js';
|
|
5
5
|
import { HubMessageType } from './WebSocketHubConnection.js';
|
|
6
6
|
|
|
7
|
-
|
|
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
|
+
* A multiplexed SSE hub connection that uses EventSource for server→client streaming
|
|
11
|
+
* and fetch POST requests for client→server subscribe/unsubscribe commands.
|
|
12
|
+
*
|
|
13
|
+
* Protocol:
|
|
14
|
+
* 1. Open EventSource to the SSE hub endpoint.
|
|
15
|
+
* 2. Server sends a {@link HubMessageType.Connected} message with the connection identifier.
|
|
16
|
+
* 3. Client sends POST to subscribe/unsubscribe endpoints using the connection identifier.
|
|
17
|
+
* 4. Server streams {@link HubMessageType.QueryResult} messages tagged with queryId.
|
|
18
|
+
* 5. When EventSource closes, server cleans up all subscriptions for this connection.
|
|
19
|
+
*/ class ServerSentEventHubConnection {
|
|
8
20
|
_sseUrl;
|
|
9
21
|
_subscribeUrl;
|
|
10
22
|
_unsubscribeUrl;
|
|
@@ -20,47 +32,69 @@ class ServerSentEventHubConnection {
|
|
|
20
32
|
_latencySamples = [];
|
|
21
33
|
_connectTimeoutTimer;
|
|
22
34
|
_keepAlive;
|
|
23
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Initializes a new instance of {@link ServerSentEventHubConnection}.
|
|
37
|
+
* @param {string} _sseUrl The SSE hub endpoint URL (e.g. `http://localhost:5000/.cratis/queries/sse`).
|
|
38
|
+
* @param {string} _subscribeUrl The subscribe POST endpoint URL.
|
|
39
|
+
* @param {string} _unsubscribeUrl The unsubscribe POST endpoint URL.
|
|
40
|
+
* @param {string} _microservice The microservice name to pass as a query argument.
|
|
41
|
+
* @param {number} keepAliveIntervalMs How long without any server message before the connection
|
|
42
|
+
* is considered stale and a reconnect is forced (default: 30 000 ms).
|
|
43
|
+
* @param {number} connectTimeoutMs How long to wait for the {@link HubMessageType.Connected}
|
|
44
|
+
* message after the HTTP connection opens before giving up and retrying (default: 15 000 ms).
|
|
45
|
+
* @param {IReconnectPolicy} _policy The reconnect policy to use (default: {@link ReconnectPolicy}).
|
|
46
|
+
*/ constructor(_sseUrl, _subscribeUrl, _unsubscribeUrl, _microservice, keepAliveIntervalMs = 30000, _connectTimeoutMs = 15000, _policy = new ReconnectPolicy()){
|
|
24
47
|
this._sseUrl = _sseUrl;
|
|
25
48
|
this._subscribeUrl = _subscribeUrl;
|
|
26
49
|
this._unsubscribeUrl = _unsubscribeUrl;
|
|
27
50
|
this._microservice = _microservice;
|
|
28
51
|
this._connectTimeoutMs = _connectTimeoutMs;
|
|
29
52
|
this._policy = _policy;
|
|
53
|
+
// SSE is server→client only: the client cannot send pings. Instead we watch for
|
|
54
|
+
// inactivity — if the server stops sending messages (including its own keep-alive
|
|
55
|
+
// pings) for the entire idle threshold, the connection is stale and we reconnect.
|
|
56
|
+
//
|
|
57
|
+
// The idle threshold is set to 1.5× the check interval so the server's keep-alive
|
|
58
|
+
// ping (which fires on the same cadence) has time to arrive over the network before
|
|
59
|
+
// the client declares the connection dead. Without this tolerance the client's timer
|
|
60
|
+
// and the server's timer race — the client often fires first and reconnects
|
|
61
|
+
// unnecessarily.
|
|
30
62
|
const idleThresholdMs = Math.round(keepAliveIntervalMs * 1.5);
|
|
31
|
-
this._keepAlive = new HubConnectionKeepAlive(keepAliveIntervalMs, ()
|
|
63
|
+
this._keepAlive = new HubConnectionKeepAlive(keepAliveIntervalMs, ()=>{
|
|
32
64
|
if (!this._disconnected && this._subscriptions.size > 0) {
|
|
33
65
|
console.warn(`SSE hub: no messages received for ${idleThresholdMs}ms, reconnecting '${this._sseUrl}'`);
|
|
34
66
|
this.reconnect();
|
|
35
67
|
}
|
|
36
68
|
}, idleThresholdMs);
|
|
37
69
|
}
|
|
38
|
-
get queryCount() {
|
|
70
|
+
/** @inheritdoc */ get queryCount() {
|
|
39
71
|
return this._subscriptions.size;
|
|
40
72
|
}
|
|
41
|
-
get isConnected() {
|
|
73
|
+
/** @inheritdoc */ get isConnected() {
|
|
42
74
|
return this._connectionId !== undefined && this._eventSource?.readyState === EventSource.OPEN;
|
|
43
75
|
}
|
|
44
|
-
get lastPingLatency() {
|
|
76
|
+
/** @inheritdoc */ get lastPingLatency() {
|
|
45
77
|
return this._lastPongLatency;
|
|
46
78
|
}
|
|
47
|
-
get averageLatency() {
|
|
48
|
-
if (this._latencySamples.length === 0)
|
|
49
|
-
|
|
50
|
-
return this._latencySamples.reduce((a, b) => a + b, 0) / this._latencySamples.length;
|
|
79
|
+
/** @inheritdoc */ get averageLatency() {
|
|
80
|
+
if (this._latencySamples.length === 0) return 0;
|
|
81
|
+
return this._latencySamples.reduce((a, b)=>a + b, 0) / this._latencySamples.length;
|
|
51
82
|
}
|
|
52
|
-
subscribe(queryId, request, callback) {
|
|
53
|
-
const sub = {
|
|
83
|
+
/** @inheritdoc */ subscribe(queryId, request, callback) {
|
|
84
|
+
const sub = {
|
|
85
|
+
request,
|
|
86
|
+
callback
|
|
87
|
+
};
|
|
54
88
|
this._subscriptions.set(queryId, sub);
|
|
55
89
|
this.ensureConnected();
|
|
56
90
|
if (this._connectionId) {
|
|
57
91
|
this.sendSubscribe(queryId, request);
|
|
58
|
-
}
|
|
59
|
-
|
|
92
|
+
} else {
|
|
93
|
+
// Not yet connected, queue for when Connected message arrives.
|
|
60
94
|
this._pendingSubscriptions.set(queryId, sub);
|
|
61
95
|
}
|
|
62
96
|
}
|
|
63
|
-
unsubscribe(queryId) {
|
|
97
|
+
/** @inheritdoc */ unsubscribe(queryId) {
|
|
64
98
|
this._subscriptions.delete(queryId);
|
|
65
99
|
this._pendingSubscriptions.delete(queryId);
|
|
66
100
|
if (this._connectionId) {
|
|
@@ -70,7 +104,7 @@ class ServerSentEventHubConnection {
|
|
|
70
104
|
this.close();
|
|
71
105
|
}
|
|
72
106
|
}
|
|
73
|
-
dispose() {
|
|
107
|
+
/** @inheritdoc */ dispose() {
|
|
74
108
|
this._disconnected = true;
|
|
75
109
|
this._subscriptions.clear();
|
|
76
110
|
this._pendingSubscriptions.clear();
|
|
@@ -96,6 +130,10 @@ class ServerSentEventHubConnection {
|
|
|
96
130
|
this._keepAlive.stop();
|
|
97
131
|
this.clearConnectTimeout();
|
|
98
132
|
if (this._eventSource) {
|
|
133
|
+
// Detach all handlers BEFORE closing so that the async onerror / onmessage
|
|
134
|
+
// events that fire after close() cannot observe the new _disconnected=false
|
|
135
|
+
// state set by an immediately following ensureConnected() call. Without this,
|
|
136
|
+
// a stale onerror triggers an unintended reconnect with exponential back-off.
|
|
99
137
|
this._eventSource.onopen = null;
|
|
100
138
|
this._eventSource.onmessage = null;
|
|
101
139
|
this._eventSource.onerror = null;
|
|
@@ -112,29 +150,28 @@ class ServerSentEventHubConnection {
|
|
|
112
150
|
}
|
|
113
151
|
this._connectionId = undefined;
|
|
114
152
|
this._eventSource = new EventSource(url);
|
|
115
|
-
this._eventSource.onopen = ()
|
|
116
|
-
if (this._disconnected)
|
|
117
|
-
return;
|
|
153
|
+
this._eventSource.onopen = ()=>{
|
|
154
|
+
if (this._disconnected) return;
|
|
118
155
|
console.log(`SSE hub connection established: '${url}'`);
|
|
119
156
|
this._policy.reset();
|
|
120
157
|
this._keepAlive.start();
|
|
158
|
+
// If the server does not send a Connected message within the timeout, the
|
|
159
|
+
// connection is broken. Close and retry via the reconnect policy.
|
|
121
160
|
this.clearConnectTimeout();
|
|
122
|
-
this._connectTimeoutTimer = setTimeout(()
|
|
161
|
+
this._connectTimeoutTimer = setTimeout(()=>{
|
|
123
162
|
if (!this._disconnected && !this._connectionId) {
|
|
124
163
|
console.warn(`SSE hub: no Connected message within ${this._connectTimeoutMs}ms, retrying '${url}'`);
|
|
125
164
|
this.reconnect();
|
|
126
165
|
}
|
|
127
166
|
}, this._connectTimeoutMs);
|
|
128
167
|
};
|
|
129
|
-
this._eventSource.onmessage = (event)
|
|
130
|
-
if (this._disconnected)
|
|
131
|
-
return;
|
|
168
|
+
this._eventSource.onmessage = (event)=>{
|
|
169
|
+
if (this._disconnected) return;
|
|
132
170
|
this._keepAlive.recordActivity();
|
|
133
171
|
this.handleMessage(event.data);
|
|
134
172
|
};
|
|
135
|
-
this._eventSource.onerror = ()
|
|
136
|
-
if (this._disconnected)
|
|
137
|
-
return;
|
|
173
|
+
this._eventSource.onerror = ()=>{
|
|
174
|
+
if (this._disconnected) return;
|
|
138
175
|
console.warn(`SSE hub connection error: '${url}'`);
|
|
139
176
|
this.reconnect();
|
|
140
177
|
};
|
|
@@ -142,15 +179,17 @@ class ServerSentEventHubConnection {
|
|
|
142
179
|
reconnect() {
|
|
143
180
|
this._keepAlive.stop();
|
|
144
181
|
this.clearConnectTimeout();
|
|
182
|
+
// Close the EventSource so the reconnect policy manages the schedule.
|
|
145
183
|
this._eventSource?.close();
|
|
146
184
|
this._eventSource = undefined;
|
|
147
185
|
this._connectionId = undefined;
|
|
148
|
-
|
|
186
|
+
// Move all active subscriptions to pending so they re-subscribe when
|
|
187
|
+
// the next Connected message arrives after the managed reconnect.
|
|
188
|
+
for (const [queryId, sub] of this._subscriptions){
|
|
149
189
|
this._pendingSubscriptions.set(queryId, sub);
|
|
150
190
|
}
|
|
151
|
-
if (this._subscriptions.size === 0)
|
|
152
|
-
|
|
153
|
-
this._policy.schedule(() => {
|
|
191
|
+
if (this._subscriptions.size === 0) return;
|
|
192
|
+
this._policy.schedule(()=>{
|
|
154
193
|
if (!this._disconnected && this._subscriptions.size > 0) {
|
|
155
194
|
this.openEventSource();
|
|
156
195
|
}
|
|
@@ -165,7 +204,7 @@ class ServerSentEventHubConnection {
|
|
|
165
204
|
handleMessage(rawData) {
|
|
166
205
|
try {
|
|
167
206
|
const message = JSON.parse(rawData);
|
|
168
|
-
switch
|
|
207
|
+
switch(message.type){
|
|
169
208
|
case HubMessageType.Connected:
|
|
170
209
|
this.handleConnected(message);
|
|
171
210
|
break;
|
|
@@ -182,88 +221,95 @@ class ServerSentEventHubConnection {
|
|
|
182
221
|
console.error(`SSE hub: query '${message.queryId}' error:`, message.payload);
|
|
183
222
|
break;
|
|
184
223
|
}
|
|
185
|
-
}
|
|
186
|
-
catch (error) {
|
|
224
|
+
} catch (error) {
|
|
187
225
|
console.error('SSE hub: error parsing message', error);
|
|
188
226
|
}
|
|
189
227
|
}
|
|
190
228
|
handleConnected(message) {
|
|
191
229
|
this._connectionId = message.payload;
|
|
192
230
|
console.log(`SSE hub: connected with id '${this._connectionId}'`);
|
|
231
|
+
// Connected message arrived — cancel the connect timeout.
|
|
193
232
|
this.clearConnectTimeout();
|
|
194
|
-
|
|
233
|
+
// Send all pending subscriptions now that we have a connection ID.
|
|
234
|
+
for (const [queryId, sub] of this._pendingSubscriptions){
|
|
195
235
|
this.sendSubscribe(queryId, sub.request);
|
|
196
236
|
}
|
|
197
237
|
this._pendingSubscriptions.clear();
|
|
198
238
|
}
|
|
199
239
|
handleQueryResult(message) {
|
|
200
|
-
if (!message.queryId)
|
|
201
|
-
return;
|
|
240
|
+
if (!message.queryId) return;
|
|
202
241
|
const sub = this._subscriptions.get(message.queryId);
|
|
203
|
-
if (!sub)
|
|
204
|
-
return;
|
|
242
|
+
if (!sub) return;
|
|
205
243
|
const result = message.payload;
|
|
206
244
|
sub.callback(result);
|
|
207
245
|
}
|
|
208
246
|
handleUnauthorized(message) {
|
|
209
|
-
if (!message.queryId)
|
|
210
|
-
return;
|
|
247
|
+
if (!message.queryId) return;
|
|
211
248
|
const sub = this._subscriptions.get(message.queryId);
|
|
212
|
-
if (!sub)
|
|
213
|
-
return;
|
|
249
|
+
if (!sub) return;
|
|
214
250
|
this._subscriptions.delete(message.queryId);
|
|
215
251
|
this._pendingSubscriptions.delete(message.queryId);
|
|
216
252
|
sub.callback(QueryResult.unauthorized());
|
|
217
253
|
}
|
|
218
254
|
sendSubscribe(queryId, request, attempt = 0) {
|
|
219
|
-
if (!this._connectionId || this._disconnected)
|
|
220
|
-
|
|
255
|
+
if (!this._connectionId || this._disconnected) return;
|
|
256
|
+
// Capture the connection ID so retries can detect if a reconnect has already fired
|
|
257
|
+
// for a different reason and made this retry obsolete.
|
|
221
258
|
const connectionId = this._connectionId;
|
|
222
259
|
const body = {
|
|
223
260
|
connectionId,
|
|
224
261
|
queryId,
|
|
225
|
-
request
|
|
262
|
+
request
|
|
226
263
|
};
|
|
227
264
|
const customHeaders = Globals.httpHeadersCallback?.() ?? {};
|
|
265
|
+
// Maximum number of subscribe retries before falling back to a full SSE reconnect.
|
|
266
|
+
// In a round-robin load-balanced deployment the subscribe POST may land on a different
|
|
267
|
+
// backend instance than the one holding the SSE connection. Retrying gives the load
|
|
268
|
+
// balancer the chance to route a subsequent attempt to the correct instance without
|
|
269
|
+
// tearing down the SSE connection unnecessarily. With N backend instances at most
|
|
270
|
+
// N-1 retries are needed, so 3 retries covers deployments with up to 4 replicas.
|
|
228
271
|
const maxRetries = 3;
|
|
229
272
|
const retryDelayMs = 200;
|
|
230
273
|
fetch(this._subscribeUrl, {
|
|
231
274
|
method: 'POST',
|
|
232
|
-
headers: {
|
|
233
|
-
|
|
234
|
-
|
|
275
|
+
headers: {
|
|
276
|
+
'Content-Type': 'application/json',
|
|
277
|
+
...customHeaders
|
|
278
|
+
},
|
|
279
|
+
body: JSON.stringify(body)
|
|
280
|
+
}).then((response)=>{
|
|
235
281
|
if (!response.ok) {
|
|
236
282
|
if (attempt < maxRetries && this._connectionId === connectionId && !this._disconnected) {
|
|
237
|
-
setTimeout(()
|
|
238
|
-
}
|
|
239
|
-
else if (this._connectionId === connectionId && !this._disconnected) {
|
|
283
|
+
setTimeout(()=>this.sendSubscribe(queryId, request, attempt + 1), retryDelayMs * (attempt + 1));
|
|
284
|
+
} else if (this._connectionId === connectionId && !this._disconnected) {
|
|
240
285
|
console.warn(`SSE hub: subscribe POST for '${queryId}' returned ${response.status} after ${attempt + 1} attempt(s), reconnecting`);
|
|
241
286
|
this.reconnect();
|
|
242
287
|
}
|
|
243
288
|
}
|
|
244
|
-
}).catch(error
|
|
289
|
+
}).catch((error)=>{
|
|
245
290
|
if (attempt < maxRetries && this._connectionId === connectionId && !this._disconnected) {
|
|
246
|
-
setTimeout(()
|
|
247
|
-
}
|
|
248
|
-
else if (this._connectionId === connectionId && !this._disconnected) {
|
|
291
|
+
setTimeout(()=>this.sendSubscribe(queryId, request, attempt + 1), retryDelayMs * (attempt + 1));
|
|
292
|
+
} else if (this._connectionId === connectionId && !this._disconnected) {
|
|
249
293
|
console.error(`SSE hub: subscribe POST failed for '${queryId}' after ${attempt + 1} attempt(s), reconnecting`, error);
|
|
250
294
|
this.reconnect();
|
|
251
295
|
}
|
|
252
296
|
});
|
|
253
297
|
}
|
|
254
298
|
sendUnsubscribe(queryId) {
|
|
255
|
-
if (!this._connectionId)
|
|
256
|
-
return;
|
|
299
|
+
if (!this._connectionId) return;
|
|
257
300
|
const body = {
|
|
258
301
|
connectionId: this._connectionId,
|
|
259
|
-
queryId
|
|
302
|
+
queryId
|
|
260
303
|
};
|
|
261
304
|
const customHeaders = Globals.httpHeadersCallback?.() ?? {};
|
|
262
305
|
fetch(this._unsubscribeUrl, {
|
|
263
306
|
method: 'POST',
|
|
264
|
-
headers: {
|
|
265
|
-
|
|
266
|
-
|
|
307
|
+
headers: {
|
|
308
|
+
'Content-Type': 'application/json',
|
|
309
|
+
...customHeaders
|
|
310
|
+
},
|
|
311
|
+
body: JSON.stringify(body)
|
|
312
|
+
}).catch((error)=>{
|
|
267
313
|
console.error(`SSE hub: unsubscribe POST failed for '${queryId}'`, error);
|
|
268
314
|
});
|
|
269
315
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerSentEventHubConnection.js","sources":["../../../queries/ServerSentEventHubConnection.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 { Globals } from '../Globals';\nimport { IObservableQueryHubConnection } from './IObservableQueryHubConnection';\nimport { DataReceived } from './ObservableQueryConnection';\nimport { HubConnectionKeepAlive } from './HubConnectionKeepAlive';\nimport { IReconnectPolicy } from './IReconnectPolicy';\nimport { ReconnectPolicy } from './ReconnectPolicy';\nimport { QueryResult } from './QueryResult';\nimport { HubMessage, HubMessageType, SubscriptionRequest } from './WebSocketHubConnection';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\ninterface ActiveSubscription {\n request: SubscriptionRequest;\n callback: DataReceived<any>;\n}\n\n/**\n * A multiplexed SSE hub connection that uses EventSource for server→client streaming\n * and fetch POST requests for client→server subscribe/unsubscribe commands.\n *\n * Protocol:\n * 1. Open EventSource to the SSE hub endpoint.\n * 2. Server sends a {@link HubMessageType.Connected} message with the connection identifier.\n * 3. Client sends POST to subscribe/unsubscribe endpoints using the connection identifier.\n * 4. Server streams {@link HubMessageType.QueryResult} messages tagged with queryId.\n * 5. When EventSource closes, server cleans up all subscriptions for this connection.\n */\nexport class ServerSentEventHubConnection implements IObservableQueryHubConnection {\n private _eventSource?: EventSource;\n private _connectionId?: string;\n private _disconnected = false;\n private _subscriptions: Map<string, ActiveSubscription> = new Map();\n private _pendingSubscriptions: Map<string, ActiveSubscription> = new Map();\n private _lastPongLatency: number = 0;\n private _latencySamples: number[] = [];\n private _connectTimeoutTimer?: ReturnType<typeof setTimeout>;\n private readonly _keepAlive: HubConnectionKeepAlive;\n\n /**\n * Initializes a new instance of {@link ServerSentEventHubConnection}.\n * @param {string} _sseUrl The SSE hub endpoint URL (e.g. `http://localhost:5000/.cratis/queries/sse`).\n * @param {string} _subscribeUrl The subscribe POST endpoint URL.\n * @param {string} _unsubscribeUrl The unsubscribe POST endpoint URL.\n * @param {string} _microservice The microservice name to pass as a query argument.\n * @param {number} keepAliveIntervalMs How long without any server message before the connection\n * is considered stale and a reconnect is forced (default: 30 000 ms).\n * @param {number} connectTimeoutMs How long to wait for the {@link HubMessageType.Connected}\n * message after the HTTP connection opens before giving up and retrying (default: 15 000 ms).\n * @param {IReconnectPolicy} _policy The reconnect policy to use (default: {@link ReconnectPolicy}).\n */\n constructor(\n private readonly _sseUrl: string,\n private readonly _subscribeUrl: string,\n private readonly _unsubscribeUrl: string,\n private readonly _microservice: string,\n keepAliveIntervalMs: number = 30000,\n private readonly _connectTimeoutMs: number = 15000,\n private readonly _policy: IReconnectPolicy = new ReconnectPolicy()\n ) {\n // SSE is server→client only: the client cannot send pings. Instead we watch for\n // inactivity — if the server stops sending messages (including its own keep-alive\n // pings) for the entire idle threshold, the connection is stale and we reconnect.\n //\n // The idle threshold is set to 1.5× the check interval so the server's keep-alive\n // ping (which fires on the same cadence) has time to arrive over the network before\n // the client declares the connection dead. Without this tolerance the client's timer\n // and the server's timer race — the client often fires first and reconnects\n // unnecessarily.\n const idleThresholdMs = Math.round(keepAliveIntervalMs * 1.5);\n this._keepAlive = new HubConnectionKeepAlive(keepAliveIntervalMs, () => {\n if (!this._disconnected && this._subscriptions.size > 0) {\n console.warn(`SSE hub: no messages received for ${idleThresholdMs}ms, reconnecting '${this._sseUrl}'`);\n this.reconnect();\n }\n }, idleThresholdMs);\n }\n\n /** @inheritdoc */\n get queryCount(): number {\n return this._subscriptions.size;\n }\n\n /** @inheritdoc */\n get isConnected(): boolean {\n return this._connectionId !== undefined && this._eventSource?.readyState === EventSource.OPEN;\n }\n\n /** @inheritdoc */\n get lastPingLatency(): number {\n return this._lastPongLatency;\n }\n\n /** @inheritdoc */\n get averageLatency(): number {\n if (this._latencySamples.length === 0) return 0;\n return this._latencySamples.reduce((a, b) => a + b, 0) / this._latencySamples.length;\n }\n\n /** @inheritdoc */\n subscribe(queryId: string, request: SubscriptionRequest, callback: DataReceived<any>): void {\n const sub: ActiveSubscription = { request, callback };\n this._subscriptions.set(queryId, sub);\n\n this.ensureConnected();\n\n if (this._connectionId) {\n this.sendSubscribe(queryId, request);\n } else {\n // Not yet connected, queue for when Connected message arrives.\n this._pendingSubscriptions.set(queryId, sub);\n }\n }\n\n /** @inheritdoc */\n unsubscribe(queryId: string): void {\n this._subscriptions.delete(queryId);\n this._pendingSubscriptions.delete(queryId);\n\n if (this._connectionId) {\n this.sendUnsubscribe(queryId);\n }\n\n if (this._subscriptions.size === 0) {\n this.close();\n }\n }\n\n /** @inheritdoc */\n dispose(): void {\n this._disconnected = true;\n this._subscriptions.clear();\n this._pendingSubscriptions.clear();\n this._policy.cancel();\n this._keepAlive.stop();\n this.clearConnectTimeout();\n this._eventSource?.close();\n this._eventSource = undefined;\n this._connectionId = undefined;\n }\n\n private ensureConnected(): void {\n if (this._disconnected) {\n this._disconnected = false;\n }\n\n if (this._eventSource && this._eventSource.readyState !== EventSource.CLOSED) {\n return;\n }\n\n this.openEventSource();\n }\n\n private close(): void {\n this._disconnected = true;\n this._policy.cancel();\n this._keepAlive.stop();\n this.clearConnectTimeout();\n if (this._eventSource) {\n // Detach all handlers BEFORE closing so that the async onerror / onmessage\n // events that fire after close() cannot observe the new _disconnected=false\n // state set by an immediately following ensureConnected() call. Without this,\n // a stale onerror triggers an unintended reconnect with exponential back-off.\n this._eventSource.onopen = null;\n this._eventSource.onmessage = null;\n this._eventSource.onerror = null;\n this._eventSource.close();\n }\n this._eventSource = undefined;\n this._connectionId = undefined;\n }\n\n private openEventSource(): void {\n let url = this._sseUrl;\n if (this._microservice?.length > 0) {\n const param = `${Globals.microserviceWSQueryArgument}=${encodeURIComponent(this._microservice)}`;\n url += (url.includes('?') ? '&' : '?') + param;\n }\n\n this._connectionId = undefined;\n this._eventSource = new EventSource(url);\n\n this._eventSource.onopen = () => {\n if (this._disconnected) return;\n console.log(`SSE hub connection established: '${url}'`);\n this._policy.reset();\n this._keepAlive.start();\n\n // If the server does not send a Connected message within the timeout, the\n // connection is broken. Close and retry via the reconnect policy.\n this.clearConnectTimeout();\n this._connectTimeoutTimer = setTimeout(() => {\n if (!this._disconnected && !this._connectionId) {\n console.warn(`SSE hub: no Connected message within ${this._connectTimeoutMs}ms, retrying '${url}'`);\n this.reconnect();\n }\n }, this._connectTimeoutMs);\n };\n\n this._eventSource.onmessage = (event: MessageEvent) => {\n if (this._disconnected) return;\n this._keepAlive.recordActivity();\n this.handleMessage(event.data as string);\n };\n\n this._eventSource.onerror = () => {\n if (this._disconnected) return;\n console.warn(`SSE hub connection error: '${url}'`);\n this.reconnect();\n };\n }\n\n private reconnect(): void {\n this._keepAlive.stop();\n this.clearConnectTimeout();\n\n // Close the EventSource so the reconnect policy manages the schedule.\n this._eventSource?.close();\n this._eventSource = undefined;\n this._connectionId = undefined;\n\n // Move all active subscriptions to pending so they re-subscribe when\n // the next Connected message arrives after the managed reconnect.\n for (const [queryId, sub] of this._subscriptions) {\n this._pendingSubscriptions.set(queryId, sub);\n }\n\n if (this._subscriptions.size === 0) return;\n\n this._policy.schedule(() => {\n if (!this._disconnected && this._subscriptions.size > 0) {\n this.openEventSource();\n }\n }, this._sseUrl);\n }\n\n private clearConnectTimeout(): void {\n if (this._connectTimeoutTimer !== undefined) {\n clearTimeout(this._connectTimeoutTimer);\n this._connectTimeoutTimer = undefined;\n }\n }\n\n private handleMessage(rawData: string): void {\n try {\n const message = JSON.parse(rawData) as HubMessage;\n\n switch (message.type) {\n case HubMessageType.Connected:\n this.handleConnected(message);\n break;\n case HubMessageType.QueryResult:\n this.handleQueryResult(message);\n break;\n case HubMessageType.Ping:\n // Server-sent keep-alive ping — activity already recorded in onmessage.\n break;\n case HubMessageType.Unauthorized:\n console.warn(`SSE hub: query '${message.queryId}' unauthorized`);\n this.handleUnauthorized(message);\n break;\n case HubMessageType.Error:\n console.error(`SSE hub: query '${message.queryId}' error:`, message.payload);\n break;\n }\n } catch (error) {\n console.error('SSE hub: error parsing message', error);\n }\n }\n\n private handleConnected(message: HubMessage): void {\n this._connectionId = message.payload as string;\n console.log(`SSE hub: connected with id '${this._connectionId}'`);\n\n // Connected message arrived — cancel the connect timeout.\n this.clearConnectTimeout();\n\n // Send all pending subscriptions now that we have a connection ID.\n for (const [queryId, sub] of this._pendingSubscriptions) {\n this.sendSubscribe(queryId, sub.request);\n }\n this._pendingSubscriptions.clear();\n }\n\n private handleQueryResult(message: HubMessage): void {\n if (!message.queryId) return;\n\n const sub = this._subscriptions.get(message.queryId);\n if (!sub) return;\n\n const result = message.payload as QueryResult<any>;\n sub.callback(result);\n }\n\n private handleUnauthorized(message: HubMessage): void {\n if (!message.queryId) return;\n\n const sub = this._subscriptions.get(message.queryId);\n if (!sub) return;\n\n this._subscriptions.delete(message.queryId);\n this._pendingSubscriptions.delete(message.queryId);\n sub.callback(QueryResult.unauthorized());\n }\n\n private sendSubscribe(queryId: string, request: SubscriptionRequest, attempt: number = 0): void {\n if (!this._connectionId || this._disconnected) return;\n\n // Capture the connection ID so retries can detect if a reconnect has already fired\n // for a different reason and made this retry obsolete.\n const connectionId = this._connectionId;\n\n const body = {\n connectionId,\n queryId,\n request,\n };\n\n const customHeaders = Globals.httpHeadersCallback?.() ?? {};\n\n // Maximum number of subscribe retries before falling back to a full SSE reconnect.\n // In a round-robin load-balanced deployment the subscribe POST may land on a different\n // backend instance than the one holding the SSE connection. Retrying gives the load\n // balancer the chance to route a subsequent attempt to the correct instance without\n // tearing down the SSE connection unnecessarily. With N backend instances at most\n // N-1 retries are needed, so 3 retries covers deployments with up to 4 replicas.\n const maxRetries = 3;\n const retryDelayMs = 200;\n\n fetch(this._subscribeUrl, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...customHeaders },\n body: JSON.stringify(body),\n }).then(response => {\n if (!response.ok) {\n if (attempt < maxRetries && this._connectionId === connectionId && !this._disconnected) {\n setTimeout(() => this.sendSubscribe(queryId, request, attempt + 1), retryDelayMs * (attempt + 1));\n } else if (this._connectionId === connectionId && !this._disconnected) {\n console.warn(`SSE hub: subscribe POST for '${queryId}' returned ${response.status} after ${attempt + 1} attempt(s), reconnecting`);\n this.reconnect();\n }\n }\n }).catch(error => {\n if (attempt < maxRetries && this._connectionId === connectionId && !this._disconnected) {\n setTimeout(() => this.sendSubscribe(queryId, request, attempt + 1), retryDelayMs * (attempt + 1));\n } else if (this._connectionId === connectionId && !this._disconnected) {\n console.error(`SSE hub: subscribe POST failed for '${queryId}' after ${attempt + 1} attempt(s), reconnecting`, error);\n this.reconnect();\n }\n });\n }\n\n private sendUnsubscribe(queryId: string): void {\n if (!this._connectionId) return;\n\n const body = {\n connectionId: this._connectionId,\n queryId,\n };\n\n const customHeaders = Globals.httpHeadersCallback?.() ?? {};\n\n fetch(this._unsubscribeUrl, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...customHeaders },\n body: JSON.stringify(body),\n }).catch(error => {\n console.error(`SSE hub: unsubscribe POST failed for '${queryId}'`, error);\n });\n }\n}\n"],"names":[],"mappings":";;;;;;MA8Ba,4BAA4B,CAAA;AAwBhB,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,eAAA;AACA,IAAA,aAAA;AAEA,IAAA,iBAAA;AACA,IAAA,OAAA;AA7Bb,IAAA,YAAY;AACZ,IAAA,aAAa;IACb,aAAa,GAAG,KAAK;AACrB,IAAA,cAAc,GAAoC,IAAI,GAAG,EAAE;AAC3D,IAAA,qBAAqB,GAAoC,IAAI,GAAG,EAAE;IAClE,gBAAgB,GAAW,CAAC;IAC5B,eAAe,GAAa,EAAE;AAC9B,IAAA,oBAAoB;AACX,IAAA,UAAU;AAc3B,IAAA,WAAA,CACqB,OAAe,EACf,aAAqB,EACrB,eAAuB,EACvB,aAAqB,EACtC,mBAAA,GAA8B,KAAK,EAClB,iBAAA,GAA4B,KAAK,EACjC,OAAA,GAA4B,IAAI,eAAe,EAAE,EAAA;QANjD,IAAA,CAAA,OAAO,GAAP,OAAO;QACP,IAAA,CAAA,aAAa,GAAb,aAAa;QACb,IAAA,CAAA,eAAe,GAAf,eAAe;QACf,IAAA,CAAA,aAAa,GAAb,aAAa;QAEb,IAAA,CAAA,iBAAiB,GAAjB,iBAAiB;QACjB,IAAA,CAAA,OAAO,GAAP,OAAO;QAWxB,MAAM,eAAe,GAAG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AAC;IACN;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"ServerSentEventHubConnection.js","sources":["../../../queries/ServerSentEventHubConnection.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 { Globals } from '../Globals';\nimport { IObservableQueryHubConnection } from './IObservableQueryHubConnection';\nimport { DataReceived } from './ObservableQueryConnection';\nimport { HubConnectionKeepAlive } from './HubConnectionKeepAlive';\nimport { IReconnectPolicy } from './IReconnectPolicy';\nimport { ReconnectPolicy } from './ReconnectPolicy';\nimport { QueryResult } from './QueryResult';\nimport { HubMessage, HubMessageType, SubscriptionRequest } from './WebSocketHubConnection';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\ninterface ActiveSubscription {\n request: SubscriptionRequest;\n callback: DataReceived<any>;\n}\n\n/**\n * A multiplexed SSE hub connection that uses EventSource for server→client streaming\n * and fetch POST requests for client→server subscribe/unsubscribe commands.\n *\n * Protocol:\n * 1. Open EventSource to the SSE hub endpoint.\n * 2. Server sends a {@link HubMessageType.Connected} message with the connection identifier.\n * 3. Client sends POST to subscribe/unsubscribe endpoints using the connection identifier.\n * 4. Server streams {@link HubMessageType.QueryResult} messages tagged with queryId.\n * 5. When EventSource closes, server cleans up all subscriptions for this connection.\n */\nexport class ServerSentEventHubConnection implements IObservableQueryHubConnection {\n private _eventSource?: EventSource;\n private _connectionId?: string;\n private _disconnected = false;\n private _subscriptions: Map<string, ActiveSubscription> = new Map();\n private _pendingSubscriptions: Map<string, ActiveSubscription> = new Map();\n private _lastPongLatency: number = 0;\n private _latencySamples: number[] = [];\n private _connectTimeoutTimer?: ReturnType<typeof setTimeout>;\n private readonly _keepAlive: HubConnectionKeepAlive;\n\n /**\n * Initializes a new instance of {@link ServerSentEventHubConnection}.\n * @param {string} _sseUrl The SSE hub endpoint URL (e.g. `http://localhost:5000/.cratis/queries/sse`).\n * @param {string} _subscribeUrl The subscribe POST endpoint URL.\n * @param {string} _unsubscribeUrl The unsubscribe POST endpoint URL.\n * @param {string} _microservice The microservice name to pass as a query argument.\n * @param {number} keepAliveIntervalMs How long without any server message before the connection\n * is considered stale and a reconnect is forced (default: 30 000 ms).\n * @param {number} connectTimeoutMs How long to wait for the {@link HubMessageType.Connected}\n * message after the HTTP connection opens before giving up and retrying (default: 15 000 ms).\n * @param {IReconnectPolicy} _policy The reconnect policy to use (default: {@link ReconnectPolicy}).\n */\n constructor(\n private readonly _sseUrl: string,\n private readonly _subscribeUrl: string,\n private readonly _unsubscribeUrl: string,\n private readonly _microservice: string,\n keepAliveIntervalMs: number = 30000,\n private readonly _connectTimeoutMs: number = 15000,\n private readonly _policy: IReconnectPolicy = new ReconnectPolicy()\n ) {\n // SSE is server→client only: the client cannot send pings. Instead we watch for\n // inactivity — if the server stops sending messages (including its own keep-alive\n // pings) for the entire idle threshold, the connection is stale and we reconnect.\n //\n // The idle threshold is set to 1.5× the check interval so the server's keep-alive\n // ping (which fires on the same cadence) has time to arrive over the network before\n // the client declares the connection dead. Without this tolerance the client's timer\n // and the server's timer race — the client often fires first and reconnects\n // unnecessarily.\n const idleThresholdMs = Math.round(keepAliveIntervalMs * 1.5);\n this._keepAlive = new HubConnectionKeepAlive(keepAliveIntervalMs, () => {\n if (!this._disconnected && this._subscriptions.size > 0) {\n console.warn(`SSE hub: no messages received for ${idleThresholdMs}ms, reconnecting '${this._sseUrl}'`);\n this.reconnect();\n }\n }, idleThresholdMs);\n }\n\n /** @inheritdoc */\n get queryCount(): number {\n return this._subscriptions.size;\n }\n\n /** @inheritdoc */\n get isConnected(): boolean {\n return this._connectionId !== undefined && this._eventSource?.readyState === EventSource.OPEN;\n }\n\n /** @inheritdoc */\n get lastPingLatency(): number {\n return this._lastPongLatency;\n }\n\n /** @inheritdoc */\n get averageLatency(): number {\n if (this._latencySamples.length === 0) return 0;\n return this._latencySamples.reduce((a, b) => a + b, 0) / this._latencySamples.length;\n }\n\n /** @inheritdoc */\n subscribe(queryId: string, request: SubscriptionRequest, callback: DataReceived<any>): void {\n const sub: ActiveSubscription = { request, callback };\n this._subscriptions.set(queryId, sub);\n\n this.ensureConnected();\n\n if (this._connectionId) {\n this.sendSubscribe(queryId, request);\n } else {\n // Not yet connected, queue for when Connected message arrives.\n this._pendingSubscriptions.set(queryId, sub);\n }\n }\n\n /** @inheritdoc */\n unsubscribe(queryId: string): void {\n this._subscriptions.delete(queryId);\n this._pendingSubscriptions.delete(queryId);\n\n if (this._connectionId) {\n this.sendUnsubscribe(queryId);\n }\n\n if (this._subscriptions.size === 0) {\n this.close();\n }\n }\n\n /** @inheritdoc */\n dispose(): void {\n this._disconnected = true;\n this._subscriptions.clear();\n this._pendingSubscriptions.clear();\n this._policy.cancel();\n this._keepAlive.stop();\n this.clearConnectTimeout();\n this._eventSource?.close();\n this._eventSource = undefined;\n this._connectionId = undefined;\n }\n\n private ensureConnected(): void {\n if (this._disconnected) {\n this._disconnected = false;\n }\n\n if (this._eventSource && this._eventSource.readyState !== EventSource.CLOSED) {\n return;\n }\n\n this.openEventSource();\n }\n\n private close(): void {\n this._disconnected = true;\n this._policy.cancel();\n this._keepAlive.stop();\n this.clearConnectTimeout();\n if (this._eventSource) {\n // Detach all handlers BEFORE closing so that the async onerror / onmessage\n // events that fire after close() cannot observe the new _disconnected=false\n // state set by an immediately following ensureConnected() call. Without this,\n // a stale onerror triggers an unintended reconnect with exponential back-off.\n this._eventSource.onopen = null;\n this._eventSource.onmessage = null;\n this._eventSource.onerror = null;\n this._eventSource.close();\n }\n this._eventSource = undefined;\n this._connectionId = undefined;\n }\n\n private openEventSource(): void {\n let url = this._sseUrl;\n if (this._microservice?.length > 0) {\n const param = `${Globals.microserviceWSQueryArgument}=${encodeURIComponent(this._microservice)}`;\n url += (url.includes('?') ? '&' : '?') + param;\n }\n\n this._connectionId = undefined;\n this._eventSource = new EventSource(url);\n\n this._eventSource.onopen = () => {\n if (this._disconnected) return;\n console.log(`SSE hub connection established: '${url}'`);\n this._policy.reset();\n this._keepAlive.start();\n\n // If the server does not send a Connected message within the timeout, the\n // connection is broken. Close and retry via the reconnect policy.\n this.clearConnectTimeout();\n this._connectTimeoutTimer = setTimeout(() => {\n if (!this._disconnected && !this._connectionId) {\n console.warn(`SSE hub: no Connected message within ${this._connectTimeoutMs}ms, retrying '${url}'`);\n this.reconnect();\n }\n }, this._connectTimeoutMs);\n };\n\n this._eventSource.onmessage = (event: MessageEvent) => {\n if (this._disconnected) return;\n this._keepAlive.recordActivity();\n this.handleMessage(event.data as string);\n };\n\n this._eventSource.onerror = () => {\n if (this._disconnected) return;\n console.warn(`SSE hub connection error: '${url}'`);\n this.reconnect();\n };\n }\n\n private reconnect(): void {\n this._keepAlive.stop();\n this.clearConnectTimeout();\n\n // Close the EventSource so the reconnect policy manages the schedule.\n this._eventSource?.close();\n this._eventSource = undefined;\n this._connectionId = undefined;\n\n // Move all active subscriptions to pending so they re-subscribe when\n // the next Connected message arrives after the managed reconnect.\n for (const [queryId, sub] of this._subscriptions) {\n this._pendingSubscriptions.set(queryId, sub);\n }\n\n if (this._subscriptions.size === 0) return;\n\n this._policy.schedule(() => {\n if (!this._disconnected && this._subscriptions.size > 0) {\n this.openEventSource();\n }\n }, this._sseUrl);\n }\n\n private clearConnectTimeout(): void {\n if (this._connectTimeoutTimer !== undefined) {\n clearTimeout(this._connectTimeoutTimer);\n this._connectTimeoutTimer = undefined;\n }\n }\n\n private handleMessage(rawData: string): void {\n try {\n const message = JSON.parse(rawData) as HubMessage;\n\n switch (message.type) {\n case HubMessageType.Connected:\n this.handleConnected(message);\n break;\n case HubMessageType.QueryResult:\n this.handleQueryResult(message);\n break;\n case HubMessageType.Ping:\n // Server-sent keep-alive ping — activity already recorded in onmessage.\n break;\n case HubMessageType.Unauthorized:\n console.warn(`SSE hub: query '${message.queryId}' unauthorized`);\n this.handleUnauthorized(message);\n break;\n case HubMessageType.Error:\n console.error(`SSE hub: query '${message.queryId}' error:`, message.payload);\n break;\n }\n } catch (error) {\n console.error('SSE hub: error parsing message', error);\n }\n }\n\n private handleConnected(message: HubMessage): void {\n this._connectionId = message.payload as string;\n console.log(`SSE hub: connected with id '${this._connectionId}'`);\n\n // Connected message arrived — cancel the connect timeout.\n this.clearConnectTimeout();\n\n // Send all pending subscriptions now that we have a connection ID.\n for (const [queryId, sub] of this._pendingSubscriptions) {\n this.sendSubscribe(queryId, sub.request);\n }\n this._pendingSubscriptions.clear();\n }\n\n private handleQueryResult(message: HubMessage): void {\n if (!message.queryId) return;\n\n const sub = this._subscriptions.get(message.queryId);\n if (!sub) return;\n\n const result = message.payload as QueryResult<any>;\n sub.callback(result);\n }\n\n private handleUnauthorized(message: HubMessage): void {\n if (!message.queryId) return;\n\n const sub = this._subscriptions.get(message.queryId);\n if (!sub) return;\n\n this._subscriptions.delete(message.queryId);\n this._pendingSubscriptions.delete(message.queryId);\n sub.callback(QueryResult.unauthorized());\n }\n\n private sendSubscribe(queryId: string, request: SubscriptionRequest, attempt: number = 0): void {\n if (!this._connectionId || this._disconnected) return;\n\n // Capture the connection ID so retries can detect if a reconnect has already fired\n // for a different reason and made this retry obsolete.\n const connectionId = this._connectionId;\n\n const body = {\n connectionId,\n queryId,\n request,\n };\n\n const customHeaders = Globals.httpHeadersCallback?.() ?? {};\n\n // Maximum number of subscribe retries before falling back to a full SSE reconnect.\n // In a round-robin load-balanced deployment the subscribe POST may land on a different\n // backend instance than the one holding the SSE connection. Retrying gives the load\n // balancer the chance to route a subsequent attempt to the correct instance without\n // tearing down the SSE connection unnecessarily. With N backend instances at most\n // N-1 retries are needed, so 3 retries covers deployments with up to 4 replicas.\n const maxRetries = 3;\n const retryDelayMs = 200;\n\n fetch(this._subscribeUrl, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...customHeaders },\n body: JSON.stringify(body),\n }).then(response => {\n if (!response.ok) {\n if (attempt < maxRetries && this._connectionId === connectionId && !this._disconnected) {\n setTimeout(() => this.sendSubscribe(queryId, request, attempt + 1), retryDelayMs * (attempt + 1));\n } else if (this._connectionId === connectionId && !this._disconnected) {\n console.warn(`SSE hub: subscribe POST for '${queryId}' returned ${response.status} after ${attempt + 1} attempt(s), reconnecting`);\n this.reconnect();\n }\n }\n }).catch(error => {\n if (attempt < maxRetries && this._connectionId === connectionId && !this._disconnected) {\n setTimeout(() => this.sendSubscribe(queryId, request, attempt + 1), retryDelayMs * (attempt + 1));\n } else if (this._connectionId === connectionId && !this._disconnected) {\n console.error(`SSE hub: subscribe POST failed for '${queryId}' after ${attempt + 1} attempt(s), reconnecting`, error);\n this.reconnect();\n }\n });\n }\n\n private sendUnsubscribe(queryId: string): void {\n if (!this._connectionId) return;\n\n const body = {\n connectionId: this._connectionId,\n queryId,\n };\n\n const customHeaders = Globals.httpHeadersCallback?.() ?? {};\n\n fetch(this._unsubscribeUrl, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...customHeaders },\n body: JSON.stringify(body),\n }).catch(error => {\n console.error(`SSE hub: unsubscribe POST failed for '${queryId}'`, error);\n });\n }\n}\n"],"names":["ServerSentEventHubConnection","_eventSource","_connectionId","_disconnected","_subscriptions","Map","_pendingSubscriptions","_lastPongLatency","_latencySamples","_connectTimeoutTimer","_keepAlive","_subscribeUrl","_unsubscribeUrl","keepAliveIntervalMs","_connectTimeoutMs","_policy","ReconnectPolicy","_sseUrl","_microservice","idleThresholdMs","Math","round","HubConnectionKeepAlive","size","console","warn","reconnect","queryCount","isConnected","undefined","readyState","EventSource","OPEN","lastPingLatency","averageLatency","length","reduce","a","b","subscribe","queryId","request","callback","sub","set","ensureConnected","sendSubscribe","unsubscribe","delete","sendUnsubscribe","close","dispose","clear","cancel","stop","clearConnectTimeout","CLOSED","openEventSource","onopen","onmessage","onerror","url","param","Globals","microserviceWSQueryArgument","encodeURIComponent","includes","log","reset","start","setTimeout","event","recordActivity","handleMessage","data","schedule","clearTimeout","rawData","message","JSON","parse","type","HubMessageType","Connected","handleConnected","QueryResult","handleQueryResult","Ping","Unauthorized","handleUnauthorized","Error","error","payload","get","result","unauthorized","attempt","connectionId","body","customHeaders","httpHeadersCallback","maxRetries","retryDelayMs","fetch","method","headers","stringify","then","response","ok","status","catch"],"mappings":";;;;;;AAAA;AACA;AAkBA;;;;;;;;;;AAUC,IACM,MAAMA,4BAAAA,CAAAA;;;;;;;IACDC,YAAAA;IACAC,aAAAA;AACAC,IAAAA,aAAAA,GAAgB,KAAA;AAChBC,IAAAA,cAAAA,GAAkD,IAAIC,GAAAA,EAAAA;AACtDC,IAAAA,qBAAAA,GAAyD,IAAID,GAAAA,EAAAA;AAC7DE,IAAAA,gBAAAA,GAA2B,CAAA;AAC3BC,IAAAA,eAAAA,GAA4B,EAAE;IAC9BC,oBAAAA;IACSC,UAAAA;AAEjB;;;;;;;;;;;QAYA,WAAA,CACI,OAAgC,EACfC,aAAqB,EACrBC,eAAuB,EACxC,aAAsC,EACtCC,mBAAAA,GAA8B,KAAK,EAClBC,iBAAAA,GAA4B,KAAK,EAClD,OAAiBC,GAA4B,IAAIC,eAAAA,EAAiB,CACpE;aAPmBC,OAAAA,GAAAA,OAAAA;aACAN,aAAAA,GAAAA,aAAAA;aACAC,eAAAA,GAAAA,eAAAA;aACAM,aAAAA,GAAAA,aAAAA;aAEAJ,iBAAAA,GAAAA,iBAAAA;aACAC,OAAAA,GAAAA,OAAAA;;;;;;;;;;AAWjB,QAAA,MAAMI,eAAAA,GAAkBC,IAAAA,CAAKC,KAAK,CAACR,mBAAAA,GAAsB,GAAA,CAAA;AACzD,QAAA,IAAI,CAACH,UAAU,GAAG,IAAIY,uBAAuBT,mBAAAA,EAAqB,IAAA;YAC9D,IAAI,CAAC,IAAI,CAACV,aAAa,IAAI,IAAI,CAACC,cAAc,CAACmB,IAAI,GAAG,CAAA,EAAG;AACrDC,gBAAAA,OAAAA,CAAQC,IAAI,CAAC,CAAC,kCAAkC,EAAEN,eAAAA,CAAgB,kBAAkB,EAAE,IAAI,CAACF,OAAO,CAAC,CAAC,CAAC,CAAA;AACrG,gBAAA,IAAI,CAACS,SAA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AAI,CAAC,IAAI,CAACtC,aAAa,EAAE;AAEzB,QAAA,MAAMgG,IAAAA,GAAO;YACTD,YAAAA,EAAc,IAAI,CAAC/F,aAAa;AAChCsC,YAAAA;AACJ,SAAA;AAEA,QAAA,MAAM2D,aAAAA,GAAgBpC,OAAAA,CAAQqC,mBAAmB,IAAA,IAAQ,EAAC;QAE1DG,KAAAA,CAAM,IAAI,CAAC3F,eAAe,EAAE;YACxB4F,MAAAA,EAAQ,MAAA;YACRC,OAAAA,EAAS;gBAAE,cAAA,EAAgB,kBAAA;AAAoB,gBAAA,GAAGN;AAAc,aAAA;YAChED,IAAAA,EAAMnB,IAAAA,CAAK2B,SAAS,CAACR,IAAAA;SACzB,CAAA,CAAGa,KAAK,CAACpB,CAAAA,KAAAA,GAAAA;YACLnE,OAAAA,CAAQmE,KAAK,CAAC,CAAC,sCAAsC,EAAEnD,OAAAA,CAAQ,CAAC,CAAC,EAAEmD,KAAAA,CAAAA;AACvE,QAAA,CAAA,CAAA;AACJ,IAAA;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerSentEventQueryConnection.d.ts","sourceRoot":"","sources":["../../../queries/ServerSentEventQueryConnection.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAM3D,eAAO,MAAM,aAAa,yBAAyB,CAAC;AAWpD,qBAAa,8BAA8B,CAAC,SAAS,CAAE,YAAW,0BAA0B,CAAC,SAAS,CAAC;IAcvF,OAAO,CAAC,QAAQ,CAAC,IAAI;IAbjC,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,aAAa,CAAS;IAG9B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAK;IAGrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAK;
|
|
1
|
+
{"version":3,"file":"ServerSentEventQueryConnection.d.ts","sourceRoot":"","sources":["../../../queries/ServerSentEventQueryConnection.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAM3D,eAAO,MAAM,aAAa,yBAAyB,CAAC;AAWpD,qBAAa,8BAA8B,CAAC,SAAS,CAAE,YAAW,0BAA0B,CAAC,SAAS,CAAC;IAcvF,OAAO,CAAC,QAAQ,CAAC,IAAI;IAbjC,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,aAAa,CAAS;IAG9B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAK;IAGrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAK;IAMpC,YAA6B,IAAI,EAAE,GAAG,EAAI;IAG1C,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAoC5E;IAGD,UAAU,IAAI,IAAI,CAKjB;CACJ"}
|
|
@@ -1,51 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* The SSE demultiplexer route used when connecting through the multiplexed observable query endpoint.
|
|
5
|
+
*/ const SSE_HUB_ROUTE = '/.cratis/queries/sse';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a direct Server-Sent Events (SSE) connection for a single observable query.
|
|
8
|
+
*
|
|
9
|
+
* In direct mode the URL points to the per-query endpoint (e.g. `/api/queries/latest`).
|
|
10
|
+
* The backend detects the `Accept: text/event-stream` header and streams results directly.
|
|
11
|
+
*
|
|
12
|
+
* The caller (typically {@link createObservableQueryConnection}) decides which URL to use;
|
|
13
|
+
* this class is transport-agnostic beyond being SSE.
|
|
14
|
+
*/ class ServerSentEventQueryConnection {
|
|
3
15
|
_url;
|
|
4
16
|
_eventSource;
|
|
5
17
|
_disconnected = false;
|
|
6
|
-
lastPingLatency = 0;
|
|
7
|
-
averageLatency = 0;
|
|
8
|
-
|
|
18
|
+
/** @inheritdoc */ lastPingLatency = 0;
|
|
19
|
+
/** @inheritdoc */ averageLatency = 0;
|
|
20
|
+
/**
|
|
21
|
+
* Initializes a new instance of {@link ServerSentEventQueryConnection}.
|
|
22
|
+
* @param {URL} url The fully qualified URL of the SSE endpoint (including query parameters).
|
|
23
|
+
*/ constructor(_url){
|
|
9
24
|
this._url = _url;
|
|
10
25
|
}
|
|
11
|
-
connect(dataReceived, queryArguments) {
|
|
12
|
-
if (this._disconnected)
|
|
13
|
-
|
|
26
|
+
/** @inheritdoc */ connect(dataReceived, queryArguments) {
|
|
27
|
+
if (this._disconnected) return;
|
|
28
|
+
// Guard against environments where EventSource is not available (e.g. Node.js, SSR).
|
|
14
29
|
if (typeof EventSource === 'undefined') {
|
|
15
30
|
return;
|
|
16
31
|
}
|
|
17
32
|
let url = this._url.toString();
|
|
18
33
|
if (queryArguments) {
|
|
19
34
|
const separator = url.includes('?') ? '&' : '?';
|
|
20
|
-
const query = Object.entries(queryArguments)
|
|
21
|
-
.filter(([, value]) => value !== undefined && value !== null)
|
|
22
|
-
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`)
|
|
23
|
-
.join('&');
|
|
35
|
+
const query = Object.entries(queryArguments).filter(([, value])=>value !== undefined && value !== null).map(([key, value])=>`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`).join('&');
|
|
24
36
|
if (query) {
|
|
25
37
|
url = `${url}${separator}${query}`;
|
|
26
38
|
}
|
|
27
39
|
}
|
|
28
40
|
this._eventSource = new EventSource(url);
|
|
29
|
-
this._eventSource.onmessage = (event)
|
|
30
|
-
if (this._disconnected)
|
|
31
|
-
return;
|
|
41
|
+
this._eventSource.onmessage = (event)=>{
|
|
42
|
+
if (this._disconnected) return;
|
|
32
43
|
try {
|
|
33
44
|
const result = JSON.parse(event.data);
|
|
34
45
|
dataReceived(result);
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
46
|
+
} catch (error) {
|
|
37
47
|
console.error('SSE: error parsing message', error);
|
|
38
48
|
}
|
|
39
49
|
};
|
|
40
|
-
this._eventSource.onerror = ()
|
|
41
|
-
if (this._disconnected)
|
|
42
|
-
return;
|
|
50
|
+
this._eventSource.onerror = ()=>{
|
|
51
|
+
if (this._disconnected) return;
|
|
43
52
|
console.warn(`SSE: connection error for '${url}', EventSource will retry automatically.`);
|
|
44
53
|
};
|
|
45
54
|
}
|
|
46
|
-
disconnect() {
|
|
47
|
-
if (this._disconnected)
|
|
48
|
-
return;
|
|
55
|
+
/** @inheritdoc */ disconnect() {
|
|
56
|
+
if (this._disconnected) return;
|
|
49
57
|
this._disconnected = true;
|
|
50
58
|
this._eventSource?.close();
|
|
51
59
|
this._eventSource = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerSentEventQueryConnection.js","sources":["../../../queries/ServerSentEventQueryConnection.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 { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { DataReceived } from './ObservableQueryConnection';\nimport { QueryResult } from './QueryResult';\n\n/**\n * The SSE demultiplexer route used when connecting through the multiplexed observable query endpoint.\n */\nexport const SSE_HUB_ROUTE = '/.cratis/queries/sse';\n\n/**\n * Represents a direct Server-Sent Events (SSE) connection for a single observable query.\n *\n * In direct mode the URL points to the per-query endpoint (e.g. `/api/queries/latest`).\n * The backend detects the `Accept: text/event-stream` header and streams results directly.\n *\n * The caller (typically {@link createObservableQueryConnection}) decides which URL to use;\n * this class is transport-agnostic beyond being SSE.\n */\nexport class ServerSentEventQueryConnection<TDataType> implements IObservableQueryConnection<TDataType> {\n private _eventSource?: EventSource;\n private _disconnected = false;\n\n /** @inheritdoc */\n readonly lastPingLatency: number = 0;\n\n /** @inheritdoc */\n readonly averageLatency: number = 0;\n\n /**\n * Initializes a new instance of {@link ServerSentEventQueryConnection}.\n * @param {URL} url The fully qualified URL of the SSE endpoint (including query parameters).\n */\n constructor(private readonly _url: URL) {}\n\n /** @inheritdoc */\n connect(dataReceived: DataReceived<TDataType>, queryArguments?: object): void {\n if (this._disconnected) return;\n\n // Guard against environments where EventSource is not available (e.g. Node.js, SSR).\n if (typeof EventSource === 'undefined') {\n return;\n }\n\n let url = this._url.toString();\n if (queryArguments) {\n const separator = url.includes('?') ? '&' : '?';\n const query = Object.entries(queryArguments)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`)\n .join('&');\n if (query) {\n url = `${url}${separator}${query}`;\n }\n }\n\n this._eventSource = new EventSource(url);\n\n this._eventSource.onmessage = (event: MessageEvent) => {\n if (this._disconnected) return;\n try {\n const result = JSON.parse(event.data as string) as QueryResult<TDataType>;\n dataReceived(result);\n } catch (error) {\n console.error('SSE: error parsing message', error);\n }\n };\n\n this._eventSource.onerror = () => {\n if (this._disconnected) return;\n console.warn(`SSE: connection error for '${url}', EventSource will retry automatically.`);\n };\n }\n\n /** @inheritdoc */\n disconnect(): void {\n if (this._disconnected) return;\n this._disconnected = true;\n this._eventSource?.close();\n this._eventSource = undefined;\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerSentEventQueryConnection.js","sources":["../../../queries/ServerSentEventQueryConnection.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 { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { DataReceived } from './ObservableQueryConnection';\nimport { QueryResult } from './QueryResult';\n\n/**\n * The SSE demultiplexer route used when connecting through the multiplexed observable query endpoint.\n */\nexport const SSE_HUB_ROUTE = '/.cratis/queries/sse';\n\n/**\n * Represents a direct Server-Sent Events (SSE) connection for a single observable query.\n *\n * In direct mode the URL points to the per-query endpoint (e.g. `/api/queries/latest`).\n * The backend detects the `Accept: text/event-stream` header and streams results directly.\n *\n * The caller (typically {@link createObservableQueryConnection}) decides which URL to use;\n * this class is transport-agnostic beyond being SSE.\n */\nexport class ServerSentEventQueryConnection<TDataType> implements IObservableQueryConnection<TDataType> {\n private _eventSource?: EventSource;\n private _disconnected = false;\n\n /** @inheritdoc */\n readonly lastPingLatency: number = 0;\n\n /** @inheritdoc */\n readonly averageLatency: number = 0;\n\n /**\n * Initializes a new instance of {@link ServerSentEventQueryConnection}.\n * @param {URL} url The fully qualified URL of the SSE endpoint (including query parameters).\n */\n constructor(private readonly _url: URL) {}\n\n /** @inheritdoc */\n connect(dataReceived: DataReceived<TDataType>, queryArguments?: object): void {\n if (this._disconnected) return;\n\n // Guard against environments where EventSource is not available (e.g. Node.js, SSR).\n if (typeof EventSource === 'undefined') {\n return;\n }\n\n let url = this._url.toString();\n if (queryArguments) {\n const separator = url.includes('?') ? '&' : '?';\n const query = Object.entries(queryArguments)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`)\n .join('&');\n if (query) {\n url = `${url}${separator}${query}`;\n }\n }\n\n this._eventSource = new EventSource(url);\n\n this._eventSource.onmessage = (event: MessageEvent) => {\n if (this._disconnected) return;\n try {\n const result = JSON.parse(event.data as string) as QueryResult<TDataType>;\n dataReceived(result);\n } catch (error) {\n console.error('SSE: error parsing message', error);\n }\n };\n\n this._eventSource.onerror = () => {\n if (this._disconnected) return;\n console.warn(`SSE: connection error for '${url}', EventSource will retry automatically.`);\n };\n }\n\n /** @inheritdoc */\n disconnect(): void {\n if (this._disconnected) return;\n this._disconnected = true;\n this._eventSource?.close();\n this._eventSource = undefined;\n }\n}\n"],"names":["SSE_HUB_ROUTE","ServerSentEventQueryConnection","_eventSource","_disconnected","lastPingLatency","averageLatency","_url","connect","dataReceived","queryArguments","EventSource","url","toString","separator","includes","query","Object","entries","filter","value","undefined","map","key","encodeURIComponent","String","join","onmessage","event","result","JSON","parse","data","error","console","onerror","warn","disconnect","close"],"mappings":"AAAA;AACA;AAMA;;IAGO,MAAMA,aAAAA,GAAgB;AAE7B;;;;;;;;AAQC,IACM,MAAMC,8BAAAA,CAAAA;;IACDC,YAAAA;AACAC,IAAAA,aAAAA,GAAgB,KAAA;uBAGxB,eAASC,GAA0B,CAAA;uBAGnC,cAASC,GAAyB,CAAA;AAElC;;;QAIA,WAAA,CAAY,IAA0B,CAAE;aAAXC,IAAAA,GAAAA,IAAAA;AAAY,IAAA;AAEzC,uBACAC,OAAAA,CAAQC,YAAqC,EAAEC,cAAuB,EAAQ;QAC1E,IAAI,IAAI,CAACN,aAAa,EAAE;;QAGxB,IAAI,OAAOO,gBAAgB,WAAA,EAAa;AACpC,YAAA;AACJ,QAAA;AAEA,QAAA,IAAIC,GAAAA,GAAM,IAAI,CAACL,IAAI,CAACM,QAAQ,EAAA;AAC5B,QAAA,IAAIH,cAAAA,EAAgB;AAChB,YAAA,MAAMI,SAAAA,GAAYF,GAAAA,CAAIG,QAAQ,CAAC,OAAO,GAAA,GAAM,GAAA;AAC5C,YAAA,MAAMC,KAAAA,GAAQC,MAAAA,CAAOC,OAAO,CAACR,gBACxBS,MAAM,CAAC,CAAC,GAAGC,KAAAA,CAAM,GAAKA,KAAAA,KAAUC,SAAAA,IAAaD,UAAU,IAAA,CAAA,CACvDE,GAAG,CAAC,CAAC,CAACC,GAAAA,EAAKH,KAAAA,CAAM,GAAK,GAAGI,kBAAAA,CAAmBD,GAAAA,CAAAA,CAAK,CAAC,EAAEC,kBAAAA,CAAmBC,MAAAA,CAAOL,KAAAA,CAAAA,CAAAA,CAAAA,CAAS,CAAA,CACvFM,IAAI,CAAC,GAAA,CAAA;AACV,YAAA,IAAIV,KAAAA,EAAO;gBACPJ,GAAAA,GAAM,CAAA,EAAGA,GAAAA,CAAAA,EAAME,SAAAA,CAAAA,EAAYE,KAAAA,CAAAA,CAAO;AACtC,YAAA;AACJ,QAAA;AAEA,QAAA,IAAI,CAACb,YAAY,GAAG,IAAIQ,WAAAA,CAAYC,GAAAA,CAAAA;AAEpC,QAAA,IAAI,CAACT,YAAY,CAACwB,SAAS,GAAG,CAACC,KAAAA,GAAAA;YAC3B,IAAI,IAAI,CAACxB,aAAa,EAAE;YACxB,IAAI;AACA,gBAAA,MAAMyB,MAAAA,GAASC,IAAAA,CAAKC,KAAK,CAACH,MAAMI,IAAI,CAAA;gBACpCvB,YAAAA,CAAaoB,MAAAA,CAAAA;AACjB,YAAA,CAAA,CAAE,OAAOI,KAAAA,EAAO;gBACZC,OAAAA,CAAQD,KAAK,CAAC,4BAAA,EAA8BA,KAAAA,CAAAA;AAChD,YAAA;AACJ,QAAA,CAAA;AAEA,QAAA,IAAI,CAAC9B,YAAY,CAACgC,OAAO,GAAG,IAAA;YACxB,IAAI,IAAI,CAAC/B,aAAa,EAAE;AACxB8B,YAAAA,OAAAA,CAAQE,IAAI,CAAC,CAAC,2BAA2B,EAAExB,GAAAA,CAAI,wCAAwC,CAAC,CAAA;AAC5F,QAAA,CAAA;AACJ,IAAA;AAEA,uBACAyB,UAAAA,GAAmB;QACf,IAAI,IAAI,CAACjC,aAAa,EAAE;QACxB,IAAI,CAACA,aAAa,GAAG,IAAA;QACrB,IAAI,CAACD,YAAY,EAAEmC,KAAAA,EAAAA;QACnB,IAAI,CAACnC,YAAY,GAAGkB,SAAAA;AACxB,IAAA;AACJ;;;;"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* Defines the direction of sorting.
|
|
5
|
+
*/ var SortDirection = /*#__PURE__*/ function(SortDirection) {
|
|
6
|
+
/**
|
|
7
|
+
* Unspecified sort direction.
|
|
8
|
+
*/ SortDirection[SortDirection["unspecified"] = 0] = "unspecified";
|
|
9
|
+
/**
|
|
10
|
+
* Sort in ascending order.
|
|
11
|
+
*/ SortDirection[SortDirection["ascending"] = 1] = "ascending";
|
|
12
|
+
/**
|
|
13
|
+
* Sort in descending order.
|
|
14
|
+
*/ SortDirection[SortDirection["descending"] = 2] = "descending";
|
|
15
|
+
return SortDirection;
|
|
16
|
+
}({});
|
|
7
17
|
|
|
8
18
|
export { SortDirection };
|
|
9
19
|
//# sourceMappingURL=SortDirection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortDirection.js","sources":["../../../queries/SortDirection.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 direction of sorting.\n */\nexport enum SortDirection {\n /**\n * Unspecified sort direction.\n */\n unspecified = 0,\n\n /**\n * Sort in ascending order.\n */\n ascending = 1,\n\n /**\n * Sort in descending order.\n */\n descending = 2,\n}"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SortDirection.js","sources":["../../../queries/SortDirection.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 direction of sorting.\n */\nexport enum SortDirection {\n /**\n * Unspecified sort direction.\n */\n unspecified = 0,\n\n /**\n * Sort in ascending order.\n */\n ascending = 1,\n\n /**\n * Sort in descending order.\n */\n descending = 2,\n}"],"names":["SortDirection"],"mappings":"AAAA;AACA;AAEA;;IAGO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;AACR;;AAEC,QAAA,aAAA,CAAA,aAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAA;AAGD;;AAEC,QAAA,aAAA,CAAA,aAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAA;AAGD;;AAEC,QAAA,aAAA,CAAA,aAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAA;AAbOA,IAAAA,OAAAA,aAAAA;AAeX,CAAA,CAAA,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sorting.d.ts","sourceRoot":"","sources":["../../../queries/Sorting.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,qBAAa,OAAO;IAYJ,QAAQ,CAAC,KAAK,EAAE,MAAM;IAAE,QAAQ,CAAC,SAAS,EAAE,aAAa;IAPrE,MAAM,CAAC,IAAI,EAAE,OAAO,CAA4C;
|
|
1
|
+
{"version":3,"file":"Sorting.d.ts","sourceRoot":"","sources":["../../../queries/Sorting.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,qBAAa,OAAO;IAYJ,QAAQ,CAAC,KAAK,EAAE,MAAM;IAAE,QAAQ,CAAC,SAAS,EAAE,aAAa;IAPrE,MAAM,CAAC,IAAI,EAAE,OAAO,CAA4C;IAOhE,YAAqB,KAAK,EAAE,MAAM,EAAW,SAAS,EAAE,aAAa,EACpE;IAKD,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ"}
|