@loadstrike/loadstrike-sdk 1.0.26901 → 1.0.27301
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/README.md +3 -3
- package/dist/cjs/index.js +31 -2
- package/dist/cjs/local.js +74 -2
- package/dist/cjs/runtime.js +422 -2
- package/dist/cjs/sinks.js +262 -1
- package/dist/cjs/transports.js +659 -12
- package/dist/esm/index.js +3 -3
- package/dist/esm/local.js +74 -2
- package/dist/esm/runtime.js +414 -1
- package/dist/esm/sinks.js +249 -0
- package/dist/esm/transports.js +652 -11
- package/dist/types/contracts.d.ts +30 -0
- package/dist/types/index.d.ts +7 -7
- package/dist/types/runtime.d.ts +120 -0
- package/dist/types/sinks.d.ts +136 -0
- package/dist/types/transports.d.ts +194 -2
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ export type LoadStrikeDateValue = string | Date;
|
|
|
3
3
|
export interface LoadStrikeRunRequest {
|
|
4
4
|
Context?: LoadStrikeRunContext | Record<string, unknown>;
|
|
5
5
|
Scenarios?: Array<LoadStrikeScenarioSpec | Record<string, unknown>>;
|
|
6
|
+
ScenarioSourceAnalysis?: Array<LoadStrikeScenarioSourceAnalysisSpec | Record<string, unknown>>;
|
|
6
7
|
RunArgs?: string[];
|
|
7
8
|
}
|
|
8
9
|
export interface LoadStrikeRunContext {
|
|
@@ -45,6 +46,17 @@ export interface LoadStrikeScenarioSpec {
|
|
|
45
46
|
LoadSimulations?: LoadStrikeLoadSimulationSpec[];
|
|
46
47
|
Thresholds?: Array<LoadStrikeThresholdSpec | Record<string, unknown>>;
|
|
47
48
|
Tracking?: LoadStrikeTrackingConfigurationSpec | Record<string, unknown>;
|
|
49
|
+
ScenarioSourceAnalysis?: LoadStrikeScenarioSourceAnalysisSpec | Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
export interface LoadStrikeScenarioSourceAnalysisSpec {
|
|
52
|
+
ScenarioName: string;
|
|
53
|
+
Language: string;
|
|
54
|
+
AnalyzerVersion: string;
|
|
55
|
+
ScenarioBlockLineCount: number;
|
|
56
|
+
LocalMethodLineCount: number;
|
|
57
|
+
TotalCountedLineCount: number;
|
|
58
|
+
IgnoredExternalCallCount: number;
|
|
59
|
+
Warnings?: string[];
|
|
48
60
|
}
|
|
49
61
|
export interface LoadStrikeLoadSimulationSpec {
|
|
50
62
|
Kind: string;
|
|
@@ -111,6 +123,8 @@ export interface LoadStrikeEndpointSpec {
|
|
|
111
123
|
Sqs?: LoadStrikeSqsEndpointOptions;
|
|
112
124
|
DelegateStream?: LoadStrikeDelegateEndpointOptions;
|
|
113
125
|
PushDiffusion?: LoadStrikePushDiffusionEndpointOptions;
|
|
126
|
+
Grpc?: LoadStrikeGrpcEndpointOptions;
|
|
127
|
+
WebSocket?: LoadStrikeWebSocketEndpointOptions;
|
|
114
128
|
}
|
|
115
129
|
export interface LoadStrikeHttpEndpointOptions {
|
|
116
130
|
Url?: string;
|
|
@@ -230,6 +244,22 @@ export interface LoadStrikePushDiffusionEndpointOptions {
|
|
|
230
244
|
PublishCallbackUrl?: string;
|
|
231
245
|
SubscribeCallbackUrl?: string;
|
|
232
246
|
}
|
|
247
|
+
export interface LoadStrikeGrpcEndpointOptions {
|
|
248
|
+
Target?: string;
|
|
249
|
+
ServiceName?: string;
|
|
250
|
+
MethodName?: string;
|
|
251
|
+
MethodType?: string;
|
|
252
|
+
DeadlineSeconds?: number;
|
|
253
|
+
Metadata?: Record<string, string>;
|
|
254
|
+
ConnectionMetadata?: Record<string, string>;
|
|
255
|
+
}
|
|
256
|
+
export interface LoadStrikeWebSocketEndpointOptions {
|
|
257
|
+
Url?: string;
|
|
258
|
+
Subprotocols?: string[];
|
|
259
|
+
ConnectTimeoutSeconds?: number;
|
|
260
|
+
CloseTimeoutSeconds?: number;
|
|
261
|
+
ConnectionMetadata?: Record<string, string>;
|
|
262
|
+
}
|
|
233
263
|
export interface LoadStrikeReportingSinkSpec {
|
|
234
264
|
Kind: string;
|
|
235
265
|
InfluxDb?: LoadStrikeInfluxDbSinkOptions;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export type { LoadStrikeDateValue, LoadStrikeObject, LoadStrikeRunContext as LoadStrikeContractRunContext, LoadStrikeScenarioSpec, LoadStrikeLoadSimulationSpec, LoadStrikeThresholdSpec, LoadStrikeTrackingConfigurationSpec, LoadStrikeCorrelationStoreSpec, LoadStrikeRedisCorrelationStoreSpec, LoadStrikeEndpointSpec, LoadStrikeHttpEndpointOptions, LoadStrikeHttpAuthOptions, LoadStrikeHttpOAuth2ClientCredentialsOptions, LoadStrikeKafkaEndpointOptions, LoadStrikeKafkaSaslOptions, LoadStrikeRabbitMqEndpointOptions, LoadStrikeNatsEndpointOptions, LoadStrikeRedisStreamsEndpointOptions, LoadStrikeAzureEventHubsEndpointOptions, LoadStrikeSqsEndpointOptions, LoadStrikeDelegateEndpointOptions, LoadStrikePushDiffusionEndpointOptions, LoadStrikeReportingSinkSpec, LoadStrikeInfluxDbSinkOptions, LoadStrikeTimescaleDbSinkOptions, LoadStrikeGrafanaLokiSinkOptions, LoadStrikeDatadogSinkOptions, LoadStrikeSplunkSinkOptions, LoadStrikeOtelCollectorSinkOptions, LoadStrikeWorkerPluginSpec, LoadStrikeRunRequest, LoadStrikeRunResponse, LoadStrikeNodeStatsDto, LoadStrikeNodeInfoDto, LoadStrikeTestInfoDto, LoadStrikeScenarioStatsDto, LoadStrikeStepStatsDto, LoadStrikeMeasurementStatsDto, LoadStrikeRequestStatsDto, LoadStrikeLatencyStatsDto, LoadStrikeDataTransferStatsDto, LoadStrikeStatusCodeStatsDto, LoadStrikeMetricStatsDto, LoadStrikeCounterStatsDto, LoadStrikeGaugeStatsDto, LoadStrikeThresholdResultDto, LoadStrikePluginDataDto, LoadStrikePluginDataTableDto, LoadStrikePayloadDto, LoadStrikeProducedMessageRequestDto, LoadStrikeProducedMessageResultDto, LoadStrikeConsumedMessageDto } from "./contracts.js";
|
|
1
|
+
export type { LoadStrikeDateValue, LoadStrikeObject, LoadStrikeRunContext as LoadStrikeContractRunContext, LoadStrikeScenarioSpec, LoadStrikeLoadSimulationSpec, LoadStrikeThresholdSpec, LoadStrikeTrackingConfigurationSpec, LoadStrikeCorrelationStoreSpec, LoadStrikeRedisCorrelationStoreSpec, LoadStrikeEndpointSpec, LoadStrikeHttpEndpointOptions, LoadStrikeHttpAuthOptions, LoadStrikeHttpOAuth2ClientCredentialsOptions, LoadStrikeKafkaEndpointOptions, LoadStrikeKafkaSaslOptions, LoadStrikeRabbitMqEndpointOptions, LoadStrikeNatsEndpointOptions, LoadStrikeRedisStreamsEndpointOptions, LoadStrikeAzureEventHubsEndpointOptions, LoadStrikeSqsEndpointOptions, LoadStrikeDelegateEndpointOptions, LoadStrikePushDiffusionEndpointOptions, LoadStrikeGrpcEndpointOptions, LoadStrikeWebSocketEndpointOptions, LoadStrikeReportingSinkSpec, LoadStrikeInfluxDbSinkOptions, LoadStrikeTimescaleDbSinkOptions, LoadStrikeGrafanaLokiSinkOptions, LoadStrikeDatadogSinkOptions, LoadStrikeSplunkSinkOptions, LoadStrikeOtelCollectorSinkOptions, LoadStrikeWorkerPluginSpec, LoadStrikeRunRequest, LoadStrikeRunResponse, LoadStrikeNodeStatsDto, LoadStrikeNodeInfoDto, LoadStrikeTestInfoDto, LoadStrikeScenarioStatsDto, LoadStrikeStepStatsDto, LoadStrikeMeasurementStatsDto, LoadStrikeRequestStatsDto, LoadStrikeLatencyStatsDto, LoadStrikeDataTransferStatsDto, LoadStrikeStatusCodeStatsDto, LoadStrikeMetricStatsDto, LoadStrikeCounterStatsDto, LoadStrikeGaugeStatsDto, LoadStrikeThresholdResultDto, LoadStrikePluginDataDto, LoadStrikePluginDataTableDto, LoadStrikePayloadDto, LoadStrikeProducedMessageRequestDto, LoadStrikeProducedMessageResultDto, LoadStrikeConsumedMessageDto } from "./contracts.js";
|
|
2
2
|
export { LoadStrikeAutopilot, LoadStrikeAutopilotResult } from "./autopilot.js";
|
|
3
3
|
export type { LoadStrikeAutopilotEndpoint, LoadStrikeAutopilotEndpointBinding, LoadStrikeAutopilotLoadSimulationSuggestion, LoadStrikeAutopilotMessageSample, LoadStrikeAutopilotOptions, LoadStrikeAutopilotPlan, LoadStrikeAutopilotPreviewReport, LoadStrikeAutopilotReadinessFailure, LoadStrikeAutopilotRedaction, LoadStrikeAutopilotRequest, LoadStrikeAutopilotResultShape, LoadStrikeAutopilotScenarioPlan, LoadStrikeAutopilotSecretBinding, LoadStrikeAutopilotThresholdSuggestion, LoadStrikeAutopilotTrackingSelectorSuggestion } from "./autopilot-contracts.js";
|
|
4
4
|
export { LoadStrikeAutopilotReadiness } from "./autopilot-contracts.js";
|
|
5
|
-
export { CrossPlatformScenarioConfigurator, ScenarioTrackingExtensions, LoadStrikeContext, LoadStrikePluginData, LoadStrikePluginDataTable, LoadStrikeNodeType, LoadStrikeReportFormat, LoadStrikeResponse, LoadStrikeLogLevel, LoadStrikeScenarioOperation, LoadStrikeOperationType, LoadStrikeRunner, LoadStrikeScenario, LoadStrikeScenarioShare, LoadStrikeSimulation, LoadStrikeTrafficMix, CrossPlatformTrackingConfiguration, LoadStrikeMetric, LoadStrikeCounter, LoadStrikeGauge, LoadStrikeStep, LoadStrikeThreshold } from "./runtime.js";
|
|
6
|
-
export type { ILoadStrikeReportingSink, ILoadStrikeWorkerPlugin, LoadStrikeRunResult, LoadStrikeReportingSink, LoadStrikeRuntimePolicy, LoadStrikeRunnerOptions, LoadStrikeRunContext as LoadStrikeRuntimeContext, LoadStrikeRunContext, LoadStrikeBaseContext, LoadStrikeCounterStats, LoadStrikeDataTransferStats, LoadStrikeGaugeStats, LoadStrikeLogger, LoadStrikeLoadSimulationStats, LoadStrikeMeasurementStats, LoadStrikeMetricStats, LoadStrikeNodeInfo, LoadStrikeMetricValue, LoadStrikeRandom, LoadStrikeReply, LoadStrikeLatencyCount, LoadStrikeLatencyStats, LoadStrikeLoadSimulation, LoadStrikeScenarioInfo, LoadStrikeScenarioInitContext, LoadStrikeScenarioPartition, LoadStrikeScenarioStartInfo, LoadStrikeScenarioContext, LoadStrikeScenarioStats, LoadStrikeTestInfo, LoadStrikeScenarioRuntime, LoadStrikeSessionStartInfo, LoadStrikeSinkSession, LoadStrikeSinkError, LoadStrikeStatusCodeStats, LoadStrikeThresholdResult, LoadStrikeThresholdPredicateContext, LoadStrikeStepReply, LoadStrikeStepStats, LoadStrikeStepRuntime, LoadStrikeThresholdOptions, LoadStrikeRequestStats, LoadStrikeWorkerPlugin } from "./runtime.js";
|
|
5
|
+
export { CrossPlatformScenarioConfigurator, ScenarioTrackingExtensions, LoadStrikeContext, LoadStrikeAccessibility, LoadStrikeAccessibilityAdapters, LoadStrikeAccessibilityBaseline, LoadStrikeAccessibilityCiGate, LoadStrikeAccessibilityScanner, LoadStrikeBrowserWebVitals, LoadStrikeBrowserWebVitalsCollector, LoadStrikePluginData, LoadStrikePluginDataTable, LoadStrikeNodeType, LoadStrikeReportFormat, LoadStrikeResponse, LoadStrikeLogLevel, LoadStrikeScenarioOperation, LoadStrikeOperationType, LoadStrikeRunner, LoadStrikeScenario, LoadStrikeScenarioShare, LoadStrikeSimulation, LoadStrikeTrafficMix, CrossPlatformTrackingConfiguration, LoadStrikeMetric, LoadStrikeCounter, LoadStrikeGauge, LoadStrikeStep, LoadStrikeThreshold } from "./runtime.js";
|
|
6
|
+
export type { ILoadStrikeReportingSink, ILoadStrikeWorkerPlugin, LoadStrikeRunResult, LoadStrikeReportingSink, LoadStrikeRuntimePolicy, LoadStrikeRunnerOptions, LoadStrikeRunContext as LoadStrikeRuntimeContext, LoadStrikeRunContext, LoadStrikeAccessibilityOptions, LoadStrikeAccessibilityBaselineOutcome, LoadStrikeAccessibilityCiGateOutcome, LoadStrikeAccessibilityViolation, LoadStrikeKeyboardFocusResult, LoadStrikeAccessibilityResult, LoadStrikeAccessibilityCheckContext, LoadStrikeBrowserWebVitalsOptions, LoadStrikeBrowserWebVitalsResult, LoadStrikeBrowserWebVitalsContext, LoadStrikeBaseContext, LoadStrikeCounterStats, LoadStrikeDataTransferStats, LoadStrikeGaugeStats, LoadStrikeLogger, LoadStrikeLoadSimulationStats, LoadStrikeMeasurementStats, LoadStrikeMetricStats, LoadStrikeNodeInfo, LoadStrikeMetricValue, LoadStrikeRandom, LoadStrikeReply, LoadStrikeLatencyCount, LoadStrikeLatencyStats, LoadStrikeLoadSimulation, LoadStrikeScenarioInfo, LoadStrikeScenarioInitContext, LoadStrikeScenarioPartition, LoadStrikeScenarioStartInfo, LoadStrikeScenarioContext, LoadStrikeScenarioStats, LoadStrikeTestInfo, LoadStrikeScenarioRuntime, LoadStrikeSessionStartInfo, LoadStrikeSinkSession, LoadStrikeSinkError, LoadStrikeStatusCodeStats, LoadStrikeThresholdResult, LoadStrikeThresholdPredicateContext, LoadStrikeStepReply, LoadStrikeStepStats, LoadStrikeStepRuntime, LoadStrikeThresholdOptions, LoadStrikeRequestStats, LoadStrikeWorkerPlugin } from "./runtime.js";
|
|
7
7
|
export { CorrelationStoreConfiguration, CrossPlatformTrackingRuntime, InMemoryCorrelationStore, RedisCorrelationStoreOptions, RedisCorrelationStore, TrackingPayloadBuilder, TrackingFieldSelector } from "./correlation.js";
|
|
8
8
|
export type { CorrelationEntry, DestinationConsumeResult, GatheredRow, CorrelationStoreKind, CorrelationRuntimeOptions, CorrelationRuntimePlugin, CorrelationRuntimeStats, CorrelationStore, SourceProduceResult, TrackingFieldLocation, TrackingPayload } from "./correlation.js";
|
|
9
|
-
export { LOADSTRIKE_TRACE_ID_HEADER, LOADSTRIKE_TRACE_ID_TRACKING_FIELD, TrafficEndpointDefinition, HttpEndpointDefinition, KafkaEndpointDefinition, KafkaSaslOptions, RabbitMqEndpointDefinition, NatsEndpointDefinition, RedisStreamsEndpointDefinition, AzureEventHubsEndpointDefinition, SqsEndpointDefinition, DelegateStreamEndpointDefinition, PushDiffusionEndpointDefinition, HttpOAuth2ClientCredentialsOptions, HttpAuthOptions } from "./transports.js";
|
|
10
|
-
export type { EndpointAdapter, EndpointDefinition, EndpointDefinitionInput, EndpointKind, EndpointMode, DotNetDelegateEndpointOptions, DotNetEndpointDefinition, DotNetHttpAuthOptions, DotNetHttpEndpointOptions, DotNetHttpOAuth2ClientCredentialsOptions, HttpAuthMode, HttpAuthType, HttpRequestBodyType, HttpResponseSource, HttpTrackingPayloadSource, KafkaSaslMechanismType, KafkaSecurityProtocolType, HttpEndpointOptions, KafkaEndpointOptions, RabbitMqEndpointOptions, NatsEndpointOptions, RedisStreamsEndpointOptions, AzureEventHubsEndpointOptions, SqsEndpointOptions, PushDiffusionEndpointOptions, TrackingFieldSelectorInput, TrackingRunMode, TrafficEndpointKind, TrafficEndpointMode, ProducedMessageRequest, ProducedMessageResult, ConsumedMessage, DelegateConsumeAsync, DelegateConsumeStreamHandler, DelegateEndpointOptions } from "./transports.js";
|
|
11
|
-
export { DatadogReportingSink, DatadogReportingSinkOptions, GrafanaLokiReportingSink, GrafanaLokiReportingSinkOptions, InfluxDbReportingSink, InfluxDbReportingSinkOptions, OtelCollectorReportingSink, OtelCollectorReportingSinkOptions, PortalReportingSink, SplunkReportingSink, SplunkReportingSinkOptions, TimescaleDbReportingSink, TimescaleDbReportingSinkOptions } from "./sinks.js";
|
|
12
|
-
export type { DatadogSinkOptions, GrafanaLokiSinkOptions, InfluxDbSinkOptions, OtelCollectorSinkOptions, PortalReportingSinkOptionsInput, SplunkSinkOptions, TimescaleDbSinkOptions } from "./sinks.js";
|
|
9
|
+
export { LOADSTRIKE_TRACE_ID_HEADER, LOADSTRIKE_TRACE_ID_TRACKING_FIELD, TrafficEndpointDefinition, HttpEndpointDefinition, KafkaEndpointDefinition, KafkaSaslOptions, RabbitMqEndpointDefinition, NatsEndpointDefinition, RedisStreamsEndpointDefinition, AzureEventHubsEndpointDefinition, SqsEndpointDefinition, DelegateStreamEndpointDefinition, PushDiffusionEndpointDefinition, GrpcEndpointDefinition, GrpcMethodTypes, GrpcNativeClientOptions, GrpcStatusMapper, ProtocolMetricSnapshot, WebSocketEndpointDefinition, WebSocketExpectedMessage, WebSocketMessageSpec, WebSocketNativeClientOptions, WebSocketReconnectPolicy, HttpOAuth2ClientCredentialsOptions, HttpAuthOptions } from "./transports.js";
|
|
10
|
+
export type { EndpointAdapter, EndpointDefinition, EndpointDefinitionInput, EndpointKind, EndpointMode, DotNetDelegateEndpointOptions, DotNetEndpointDefinition, DotNetHttpAuthOptions, DotNetHttpEndpointOptions, DotNetHttpOAuth2ClientCredentialsOptions, HttpAuthMode, HttpAuthType, HttpRequestBodyType, HttpResponseSource, HttpTrackingPayloadSource, KafkaSaslMechanismType, KafkaSecurityProtocolType, HttpEndpointOptions, KafkaEndpointOptions, RabbitMqEndpointOptions, NatsEndpointOptions, RedisStreamsEndpointOptions, AzureEventHubsEndpointOptions, SqsEndpointOptions, PushDiffusionEndpointOptions, GrpcEndpointOptions, WebSocketEndpointOptions, GrpcEndpointDefinition as GrpcEndpointDefinitionShape, WebSocketEndpointDefinition as WebSocketEndpointDefinitionShape, TrackingFieldSelectorInput, TrackingRunMode, TrafficEndpointKind, TrafficEndpointMode, ProducedMessageRequest, ProducedMessageResult, ConsumedMessage, DelegateConsumeAsync, DelegateConsumeStreamHandler, DelegateEndpointOptions } from "./transports.js";
|
|
11
|
+
export { DatadogReportingSink, DatadogReportingSinkOptions, DogStatsDReportingSink, CloudWatchReportingSink, DynatraceReportingSink, ElasticsearchReportingSink, GrafanaLokiReportingSink, GrafanaLokiReportingSinkOptions, GenericWebhookReportingSink, InfluxDbReportingSink, InfluxDbReportingSinkOptions, JsonlFileReportingSink, KafkaReportingSink, NetdataStatsDReportingSink, NewRelicReportingSink, OtelCollectorReportingSink, OtelCollectorReportingSinkOptions, OpenSearchReportingSink, PortalReportingSink, PrometheusRemoteWriteReportingSink, SplunkReportingSink, SplunkReportingSinkOptions, StatsDReportingSink, TimescaleDbReportingSink, TimescaleDbReportingSinkOptions } from "./sinks.js";
|
|
12
|
+
export type { DatadogSinkOptions, ExpandedSinkOptionsInput, GrafanaLokiSinkOptions, InfluxDbSinkOptions, JsonlFileReportingSinkOptionsInput, KafkaReportingSinkOptionsInput, OtelCollectorSinkOptions, PortalReportingSinkOptionsInput, SplunkSinkOptions, StatsDReportingSinkOptionsInput, TimescaleDbSinkOptions } from "./sinks.js";
|
package/dist/types/runtime.d.ts
CHANGED
|
@@ -677,6 +677,63 @@ export interface LoadStrikeThresholdOptions {
|
|
|
677
677
|
abortWhenErrorCount?: number;
|
|
678
678
|
startCheckAfterSeconds?: number;
|
|
679
679
|
}
|
|
680
|
+
export interface LoadStrikeAccessibilityOptions {
|
|
681
|
+
url: string;
|
|
682
|
+
standard?: string;
|
|
683
|
+
maxViolations?: number;
|
|
684
|
+
maxCriticalViolations?: number;
|
|
685
|
+
maxSeriousViolations?: number;
|
|
686
|
+
tags?: string[];
|
|
687
|
+
includeSelectors?: string[];
|
|
688
|
+
excludeSelectors?: string[];
|
|
689
|
+
}
|
|
690
|
+
export interface LoadStrikeAccessibilityViolation {
|
|
691
|
+
ruleId?: string;
|
|
692
|
+
impact?: string;
|
|
693
|
+
description?: string;
|
|
694
|
+
helpUrl?: string;
|
|
695
|
+
targets?: string[];
|
|
696
|
+
}
|
|
697
|
+
export interface LoadStrikeAccessibilityResult {
|
|
698
|
+
url?: string;
|
|
699
|
+
violations?: LoadStrikeAccessibilityViolation[];
|
|
700
|
+
keyboardFocus?: LoadStrikeKeyboardFocusResult;
|
|
701
|
+
totalViolations?: number;
|
|
702
|
+
criticalViolations?: number;
|
|
703
|
+
seriousViolations?: number;
|
|
704
|
+
moderateViolations?: number;
|
|
705
|
+
minorViolations?: number;
|
|
706
|
+
}
|
|
707
|
+
export interface LoadStrikeKeyboardFocusResult {
|
|
708
|
+
tabbableElementCount?: number;
|
|
709
|
+
visibleFocusFailures?: number;
|
|
710
|
+
missingSkipLinkCount?: number;
|
|
711
|
+
focusOrder?: string[];
|
|
712
|
+
}
|
|
713
|
+
export interface LoadStrikeAccessibilityCheckContext {
|
|
714
|
+
options: LoadStrikeAccessibilityOptions;
|
|
715
|
+
scenarioContext: LoadStrikeScenarioContext;
|
|
716
|
+
}
|
|
717
|
+
export interface LoadStrikeBrowserWebVitalsOptions {
|
|
718
|
+
url: string;
|
|
719
|
+
maxLargestContentfulPaintMs?: number;
|
|
720
|
+
maxInteractionToNextPaintMs?: number;
|
|
721
|
+
maxCumulativeLayoutShift?: number;
|
|
722
|
+
maxFirstContentfulPaintMs?: number;
|
|
723
|
+
maxTimeToFirstByteMs?: number;
|
|
724
|
+
}
|
|
725
|
+
export interface LoadStrikeBrowserWebVitalsResult {
|
|
726
|
+
url?: string;
|
|
727
|
+
largestContentfulPaintMs?: number;
|
|
728
|
+
interactionToNextPaintMs?: number;
|
|
729
|
+
cumulativeLayoutShift?: number;
|
|
730
|
+
firstContentfulPaintMs?: number;
|
|
731
|
+
timeToFirstByteMs?: number;
|
|
732
|
+
}
|
|
733
|
+
export interface LoadStrikeBrowserWebVitalsContext {
|
|
734
|
+
options: LoadStrikeBrowserWebVitalsOptions;
|
|
735
|
+
scenarioContext: LoadStrikeScenarioContext;
|
|
736
|
+
}
|
|
680
737
|
export interface LoadStrikeThresholdPredicateContext {
|
|
681
738
|
scenarioName: string;
|
|
682
739
|
scope: "scenario" | "step" | "metric";
|
|
@@ -1478,6 +1535,68 @@ export declare class LoadStrikeContext {
|
|
|
1478
1535
|
*/
|
|
1479
1536
|
withRegisteredScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeContext;
|
|
1480
1537
|
}
|
|
1538
|
+
export declare class LoadStrikeAccessibilityBaseline {
|
|
1539
|
+
readonly allowedRuleIds: string[];
|
|
1540
|
+
readonly AllowedRuleIds: string[];
|
|
1541
|
+
readonly maxNewViolations: number;
|
|
1542
|
+
readonly MaxNewViolations: number;
|
|
1543
|
+
constructor(initial?: Record<string, unknown>);
|
|
1544
|
+
compare(result: LoadStrikeAccessibilityResult): LoadStrikeAccessibilityBaselineOutcome;
|
|
1545
|
+
Compare(result: LoadStrikeAccessibilityResult): LoadStrikeAccessibilityBaselineOutcome;
|
|
1546
|
+
}
|
|
1547
|
+
export interface LoadStrikeAccessibilityBaselineOutcome {
|
|
1548
|
+
passed: boolean;
|
|
1549
|
+
Passed: boolean;
|
|
1550
|
+
newViolationCount: number;
|
|
1551
|
+
NewViolationCount: number;
|
|
1552
|
+
newRuleIds: string[];
|
|
1553
|
+
NewRuleIds: string[];
|
|
1554
|
+
}
|
|
1555
|
+
export declare class LoadStrikeAccessibilityCiGate {
|
|
1556
|
+
readonly maxViolations?: number;
|
|
1557
|
+
readonly MaxViolations?: number;
|
|
1558
|
+
readonly maxCriticalViolations?: number;
|
|
1559
|
+
readonly MaxCriticalViolations?: number;
|
|
1560
|
+
readonly maxSeriousViolations?: number;
|
|
1561
|
+
readonly MaxSeriousViolations?: number;
|
|
1562
|
+
readonly baseline?: LoadStrikeAccessibilityBaseline;
|
|
1563
|
+
readonly Baseline?: LoadStrikeAccessibilityBaseline;
|
|
1564
|
+
constructor(initial?: Record<string, unknown>);
|
|
1565
|
+
evaluate(result: LoadStrikeAccessibilityResult): LoadStrikeAccessibilityCiGateOutcome;
|
|
1566
|
+
Evaluate(result: LoadStrikeAccessibilityResult): LoadStrikeAccessibilityCiGateOutcome;
|
|
1567
|
+
}
|
|
1568
|
+
export interface LoadStrikeAccessibilityCiGateOutcome {
|
|
1569
|
+
passed: boolean;
|
|
1570
|
+
Passed: boolean;
|
|
1571
|
+
reasons: string[];
|
|
1572
|
+
Reasons: string[];
|
|
1573
|
+
}
|
|
1574
|
+
export declare class LoadStrikeAccessibilityScanner {
|
|
1575
|
+
static scanHtml(options: LoadStrikeAccessibilityOptions, html: string): LoadStrikeAccessibilityResult;
|
|
1576
|
+
static ScanHtml(options: LoadStrikeAccessibilityOptions, html: string): LoadStrikeAccessibilityResult;
|
|
1577
|
+
}
|
|
1578
|
+
export declare class LoadStrikeAccessibilityAdapters {
|
|
1579
|
+
static fromPlaywrightPageAsync(options: LoadStrikeAccessibilityOptions, page: unknown): Promise<LoadStrikeAccessibilityResult>;
|
|
1580
|
+
static FromPlaywrightPageAsync(options: LoadStrikeAccessibilityOptions, page: unknown): Promise<LoadStrikeAccessibilityResult>;
|
|
1581
|
+
static fromSeleniumDriver(options: LoadStrikeAccessibilityOptions, driver: unknown): LoadStrikeAccessibilityResult;
|
|
1582
|
+
static FromSeleniumDriver(options: LoadStrikeAccessibilityOptions, driver: unknown): LoadStrikeAccessibilityResult;
|
|
1583
|
+
}
|
|
1584
|
+
export declare class LoadStrikeBrowserWebVitalsCollector {
|
|
1585
|
+
static fromPerformanceSnapshot(options: LoadStrikeBrowserWebVitalsOptions, snapshot: unknown): LoadStrikeBrowserWebVitalsResult;
|
|
1586
|
+
static FromPerformanceSnapshot(options: LoadStrikeBrowserWebVitalsOptions, snapshot: unknown): LoadStrikeBrowserWebVitalsResult;
|
|
1587
|
+
static fromPlaywrightPageAsync(options: LoadStrikeBrowserWebVitalsOptions, page: unknown): Promise<LoadStrikeBrowserWebVitalsResult>;
|
|
1588
|
+
static FromPlaywrightPageAsync(options: LoadStrikeBrowserWebVitalsOptions, page: unknown): Promise<LoadStrikeBrowserWebVitalsResult>;
|
|
1589
|
+
static fromSeleniumDriver(options: LoadStrikeBrowserWebVitalsOptions, driver: unknown): LoadStrikeBrowserWebVitalsResult;
|
|
1590
|
+
static FromSeleniumDriver(options: LoadStrikeBrowserWebVitalsOptions, driver: unknown): LoadStrikeBrowserWebVitalsResult;
|
|
1591
|
+
}
|
|
1592
|
+
export declare class LoadStrikeAccessibility {
|
|
1593
|
+
static createScenario(name: string, options: LoadStrikeAccessibilityOptions, check: (context: LoadStrikeAccessibilityCheckContext) => Promise<LoadStrikeAccessibilityResult> | LoadStrikeAccessibilityResult): LoadStrikeScenario;
|
|
1594
|
+
static CreateScenario(name: string, options: LoadStrikeAccessibilityOptions, check: (context: LoadStrikeAccessibilityCheckContext) => Promise<LoadStrikeAccessibilityResult> | LoadStrikeAccessibilityResult): LoadStrikeScenario;
|
|
1595
|
+
}
|
|
1596
|
+
export declare class LoadStrikeBrowserWebVitals {
|
|
1597
|
+
static createScenario(name: string, options: LoadStrikeBrowserWebVitalsOptions, measure: (context: LoadStrikeBrowserWebVitalsContext) => Promise<LoadStrikeBrowserWebVitalsResult> | LoadStrikeBrowserWebVitalsResult): LoadStrikeScenario;
|
|
1598
|
+
static CreateScenario(name: string, options: LoadStrikeBrowserWebVitalsOptions, measure: (context: LoadStrikeBrowserWebVitalsContext) => Promise<LoadStrikeBrowserWebVitalsResult> | LoadStrikeBrowserWebVitalsResult): LoadStrikeScenario;
|
|
1599
|
+
}
|
|
1481
1600
|
export declare class LoadStrikeScenario {
|
|
1482
1601
|
readonly name: string;
|
|
1483
1602
|
private readonly runHandler;
|
|
@@ -1609,6 +1728,7 @@ export declare class LoadStrikeScenario {
|
|
|
1609
1728
|
*/
|
|
1610
1729
|
shouldRestartIterationOnFail(): boolean;
|
|
1611
1730
|
__loadStrikeInternalLicenseFeatures(): string[];
|
|
1731
|
+
__loadStrikeScenarioSourceAnalysis(): Record<string, unknown>;
|
|
1612
1732
|
__loadStrikeWithInternalLicenseFeatures(...features: string[]): LoadStrikeScenario;
|
|
1613
1733
|
invokeInit(context: LoadStrikeScenarioInitContext): Promise<void>;
|
|
1614
1734
|
invokeClean(context: LoadStrikeScenarioInitContext): Promise<void>;
|
package/dist/types/sinks.d.ts
CHANGED
|
@@ -642,6 +642,142 @@ export declare class OtelCollectorReportingSink implements LoadStrikeReportingSi
|
|
|
642
642
|
private getSession;
|
|
643
643
|
private persistEvents;
|
|
644
644
|
}
|
|
645
|
+
export interface ExpandedSinkOptionsInput {
|
|
646
|
+
BaseUrl?: string;
|
|
647
|
+
baseUrl?: string;
|
|
648
|
+
EndpointPath?: string;
|
|
649
|
+
endpointPath?: string;
|
|
650
|
+
Headers?: Record<string, string>;
|
|
651
|
+
headers?: Record<string, string>;
|
|
652
|
+
StaticTags?: Record<string, string>;
|
|
653
|
+
staticTags?: Record<string, string>;
|
|
654
|
+
TimeoutSeconds?: number;
|
|
655
|
+
timeoutSeconds?: number;
|
|
656
|
+
TimeoutMs?: number;
|
|
657
|
+
timeoutMs?: number;
|
|
658
|
+
FetchImpl?: SinkFetch;
|
|
659
|
+
fetchImpl?: SinkFetch;
|
|
660
|
+
}
|
|
661
|
+
declare abstract class ExpandedEventReportingSink implements LoadStrikeReportingSink {
|
|
662
|
+
readonly SinkName: string;
|
|
663
|
+
readonly sinkName: string;
|
|
664
|
+
readonly LicenseFeature: string;
|
|
665
|
+
readonly licenseFeature: string;
|
|
666
|
+
protected baseContext: LoadStrikeBaseContext | null;
|
|
667
|
+
protected session: SinkSessionMetadata | null;
|
|
668
|
+
protected constructor(sinkName: string, licenseFeature: string);
|
|
669
|
+
init(context: LoadStrikeBaseContext, _infraConfig: Record<string, unknown>): void;
|
|
670
|
+
Init(context: LoadStrikeBaseContext, infraConfig: Record<string, unknown>): void;
|
|
671
|
+
start(session: LoadStrikeSessionStartInfo): void;
|
|
672
|
+
Start(session: LoadStrikeSessionStartInfo): void;
|
|
673
|
+
saveRealtimeStats(scenarioStats: LoadStrikeScenarioStats[]): Promise<void>;
|
|
674
|
+
SaveRealtimeStats(scenarioStats: LoadStrikeScenarioStats[]): Promise<void>;
|
|
675
|
+
saveRealtimeMetrics(metrics: LoadStrikeMetricStats): Promise<void>;
|
|
676
|
+
SaveRealtimeMetrics(metrics: LoadStrikeMetricStats): Promise<void>;
|
|
677
|
+
saveRunResult(result: LoadStrikeRunResult): Promise<void>;
|
|
678
|
+
SaveRunResult(result: LoadStrikeRunResult): Promise<void>;
|
|
679
|
+
stop(): void;
|
|
680
|
+
Stop(): void;
|
|
681
|
+
Dispose(): void;
|
|
682
|
+
protected getBaseContext(): LoadStrikeBaseContext;
|
|
683
|
+
protected getSession(): SinkSessionMetadata;
|
|
684
|
+
protected buildPayload(events: ReportingSinkEvent[], staticTags?: Record<string, string>): Record<string, unknown>;
|
|
685
|
+
protected abstract persistEvents(events: ReportingSinkEvent[]): Promise<void>;
|
|
686
|
+
}
|
|
687
|
+
declare class ExpandedHttpJsonReportingSink extends ExpandedEventReportingSink {
|
|
688
|
+
private readonly fetchImpl;
|
|
689
|
+
private readonly baseUrl;
|
|
690
|
+
private readonly endpointPath;
|
|
691
|
+
private readonly headers;
|
|
692
|
+
private readonly staticTags;
|
|
693
|
+
private readonly timeoutMs;
|
|
694
|
+
constructor(sinkName: string, licenseFeature: string, defaultEndpointPath: string, options?: ExpandedSinkOptionsInput);
|
|
695
|
+
init(context: LoadStrikeBaseContext, infraConfig: Record<string, unknown>): void;
|
|
696
|
+
protected persistEvents(events: ReportingSinkEvent[]): Promise<void>;
|
|
697
|
+
}
|
|
698
|
+
export declare class PrometheusRemoteWriteReportingSink extends ExpandedHttpJsonReportingSink {
|
|
699
|
+
constructor(options?: ExpandedSinkOptionsInput);
|
|
700
|
+
}
|
|
701
|
+
export declare class CloudWatchReportingSink extends ExpandedHttpJsonReportingSink {
|
|
702
|
+
constructor(options?: ExpandedSinkOptionsInput);
|
|
703
|
+
}
|
|
704
|
+
export declare class DynatraceReportingSink extends ExpandedHttpJsonReportingSink {
|
|
705
|
+
constructor(options?: ExpandedSinkOptionsInput);
|
|
706
|
+
}
|
|
707
|
+
export declare class ElasticsearchReportingSink extends ExpandedHttpJsonReportingSink {
|
|
708
|
+
constructor(options?: ExpandedSinkOptionsInput);
|
|
709
|
+
}
|
|
710
|
+
export declare class OpenSearchReportingSink extends ExpandedHttpJsonReportingSink {
|
|
711
|
+
constructor(options?: ExpandedSinkOptionsInput);
|
|
712
|
+
}
|
|
713
|
+
export declare class NewRelicReportingSink extends ExpandedHttpJsonReportingSink {
|
|
714
|
+
constructor(options?: ExpandedSinkOptionsInput);
|
|
715
|
+
}
|
|
716
|
+
export declare class GenericWebhookReportingSink extends ExpandedHttpJsonReportingSink {
|
|
717
|
+
constructor(options?: ExpandedSinkOptionsInput);
|
|
718
|
+
}
|
|
719
|
+
export interface KafkaReportingSinkOptionsInput {
|
|
720
|
+
Topic?: string;
|
|
721
|
+
topic?: string;
|
|
722
|
+
BootstrapServers?: string;
|
|
723
|
+
bootstrapServers?: string;
|
|
724
|
+
StaticTags?: Record<string, string>;
|
|
725
|
+
staticTags?: Record<string, string>;
|
|
726
|
+
PublishAsync?: (topic: string, payload: string) => Promise<void> | void;
|
|
727
|
+
publishAsync?: (topic: string, payload: string) => Promise<void> | void;
|
|
728
|
+
}
|
|
729
|
+
export declare class KafkaReportingSink extends ExpandedEventReportingSink {
|
|
730
|
+
private readonly topic;
|
|
731
|
+
private readonly staticTags;
|
|
732
|
+
private readonly publishAsync?;
|
|
733
|
+
constructor(options?: KafkaReportingSinkOptionsInput);
|
|
734
|
+
protected persistEvents(events: ReportingSinkEvent[]): Promise<void>;
|
|
735
|
+
}
|
|
736
|
+
export interface StatsDReportingSinkOptionsInput {
|
|
737
|
+
Prefix?: string;
|
|
738
|
+
prefix?: string;
|
|
739
|
+
Host?: string;
|
|
740
|
+
host?: string;
|
|
741
|
+
Port?: number;
|
|
742
|
+
port?: number;
|
|
743
|
+
Tags?: Record<string, string>;
|
|
744
|
+
tags?: Record<string, string>;
|
|
745
|
+
SendLineAsync?: (line: string) => Promise<void> | void;
|
|
746
|
+
sendLineAsync?: (line: string) => Promise<void> | void;
|
|
747
|
+
}
|
|
748
|
+
declare class StatsDReportingSinkBase extends ExpandedEventReportingSink {
|
|
749
|
+
private readonly prefix;
|
|
750
|
+
private readonly host;
|
|
751
|
+
private readonly port;
|
|
752
|
+
private readonly tags;
|
|
753
|
+
private readonly sendLineAsync?;
|
|
754
|
+
private readonly dogStatsD;
|
|
755
|
+
constructor(sinkName: string, licenseFeature: string, options?: StatsDReportingSinkOptionsInput, dogStatsD?: boolean);
|
|
756
|
+
protected persistEvents(events: ReportingSinkEvent[]): Promise<void>;
|
|
757
|
+
private formatPoint;
|
|
758
|
+
private sendLine;
|
|
759
|
+
}
|
|
760
|
+
export declare class StatsDReportingSink extends StatsDReportingSinkBase {
|
|
761
|
+
constructor(options?: StatsDReportingSinkOptionsInput);
|
|
762
|
+
}
|
|
763
|
+
export declare class DogStatsDReportingSink extends StatsDReportingSinkBase {
|
|
764
|
+
constructor(options?: StatsDReportingSinkOptionsInput);
|
|
765
|
+
}
|
|
766
|
+
export declare class NetdataStatsDReportingSink extends StatsDReportingSinkBase {
|
|
767
|
+
constructor(options?: StatsDReportingSinkOptionsInput);
|
|
768
|
+
}
|
|
769
|
+
export interface JsonlFileReportingSinkOptionsInput {
|
|
770
|
+
FilePath?: string;
|
|
771
|
+
filePath?: string;
|
|
772
|
+
StaticTags?: Record<string, string>;
|
|
773
|
+
staticTags?: Record<string, string>;
|
|
774
|
+
}
|
|
775
|
+
export declare class JsonlFileReportingSink extends ExpandedEventReportingSink {
|
|
776
|
+
private readonly filePath;
|
|
777
|
+
private readonly staticTags;
|
|
778
|
+
constructor(options?: JsonlFileReportingSinkOptionsInput);
|
|
779
|
+
protected persistEvents(events: ReportingSinkEvent[]): Promise<void>;
|
|
780
|
+
}
|
|
645
781
|
declare function createRealtimeStatsEvents(session: SinkSessionMetadata, scenarios: LoadStrikeScenarioStats[]): ReportingSinkEvent[];
|
|
646
782
|
declare function createFinalStatsEvents(session: SinkSessionMetadata, stats: LoadStrikeNodeStats): ReportingSinkEvent[];
|
|
647
783
|
declare function createRunResultEvents(session: SinkSessionMetadata, result: LoadStrikeRunResult): ReportingSinkEvent[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TrackingFieldSelector, type TrackingPayload } from "./correlation.js";
|
|
2
2
|
export declare const LOADSTRIKE_TRACE_ID_HEADER = "loadstrike-trace-id";
|
|
3
3
|
export declare const LOADSTRIKE_TRACE_ID_TRACKING_FIELD = "header:loadstrike-trace-id";
|
|
4
|
-
export type EndpointKind = "Http" | "Kafka" | "RabbitMq" | "Nats" | "RedisStreams" | "AzureEventHubs" | "Sqs" | "PushDiffusion" | "DelegateStream";
|
|
4
|
+
export type EndpointKind = "Http" | "Kafka" | "RabbitMq" | "Nats" | "RedisStreams" | "AzureEventHubs" | "Sqs" | "PushDiffusion" | "DelegateStream" | "Grpc" | "WebSocket";
|
|
5
5
|
export type EndpointMode = "Produce" | "Consume";
|
|
6
6
|
export type HttpAuthMode = "None" | "Basic" | "Bearer" | "OAuth2ClientCredentials";
|
|
7
7
|
export type HttpAuthType = HttpAuthMode;
|
|
@@ -352,6 +352,10 @@ export interface EndpointDefinition {
|
|
|
352
352
|
Delegate?: DelegateEndpointOptions;
|
|
353
353
|
DelegateStream?: DelegateEndpointOptions;
|
|
354
354
|
delegate?: DelegateEndpointOptions;
|
|
355
|
+
Grpc?: GrpcEndpointOptions;
|
|
356
|
+
grpc?: GrpcEndpointOptions;
|
|
357
|
+
WebSocket?: WebSocketEndpointOptions;
|
|
358
|
+
webSocket?: WebSocketEndpointOptions;
|
|
355
359
|
}
|
|
356
360
|
export interface DotNetHttpOAuth2ClientCredentialsOptions {
|
|
357
361
|
TokenEndpoint?: string;
|
|
@@ -423,6 +427,8 @@ export interface DotNetEndpointDefinition {
|
|
|
423
427
|
PushDiffusion?: PushDiffusionEndpointOptions;
|
|
424
428
|
Delegate?: DotNetDelegateEndpointOptions;
|
|
425
429
|
DelegateStream?: DotNetDelegateEndpointOptions;
|
|
430
|
+
Grpc?: GrpcEndpointOptions;
|
|
431
|
+
WebSocket?: WebSocketEndpointOptions;
|
|
426
432
|
}
|
|
427
433
|
export interface HttpEndpointDefinition extends TrafficEndpointDefinition {
|
|
428
434
|
Kind?: "Http";
|
|
@@ -610,6 +616,48 @@ export interface PushDiffusionEndpointDefinition extends TrafficEndpointDefiniti
|
|
|
610
616
|
SubscribeAsync?: DelegateConsumeAsync;
|
|
611
617
|
subscribeAsync?: DelegateConsumeAsync;
|
|
612
618
|
}
|
|
619
|
+
export interface GrpcEndpointOptions extends DelegateEndpointOptions {
|
|
620
|
+
Target?: string;
|
|
621
|
+
target?: string;
|
|
622
|
+
ServiceName?: string;
|
|
623
|
+
serviceName?: string;
|
|
624
|
+
MethodName?: string;
|
|
625
|
+
methodName?: string;
|
|
626
|
+
MethodType?: string;
|
|
627
|
+
methodType?: string;
|
|
628
|
+
DeadlineSeconds?: number;
|
|
629
|
+
deadlineSeconds?: number;
|
|
630
|
+
DeadlineMs?: number;
|
|
631
|
+
deadlineMs?: number;
|
|
632
|
+
Metadata?: Record<string, string>;
|
|
633
|
+
metadata?: Record<string, string>;
|
|
634
|
+
NativeClient?: GrpcNativeClientOptions;
|
|
635
|
+
nativeClient?: GrpcNativeClientOptions | Record<string, unknown>;
|
|
636
|
+
}
|
|
637
|
+
export interface GrpcEndpointDefinition extends TrafficEndpointDefinition, GrpcEndpointOptions {
|
|
638
|
+
Kind?: "Grpc";
|
|
639
|
+
kind?: "Grpc";
|
|
640
|
+
}
|
|
641
|
+
export interface WebSocketEndpointOptions extends DelegateEndpointOptions {
|
|
642
|
+
Url?: string;
|
|
643
|
+
url?: string;
|
|
644
|
+
Subprotocols?: string[];
|
|
645
|
+
subprotocols?: string[];
|
|
646
|
+
ConnectTimeoutSeconds?: number;
|
|
647
|
+
connectTimeoutSeconds?: number;
|
|
648
|
+
ConnectTimeoutMs?: number;
|
|
649
|
+
connectTimeoutMs?: number;
|
|
650
|
+
CloseTimeoutSeconds?: number;
|
|
651
|
+
closeTimeoutSeconds?: number;
|
|
652
|
+
CloseTimeoutMs?: number;
|
|
653
|
+
closeTimeoutMs?: number;
|
|
654
|
+
NativeClient?: WebSocketNativeClientOptions;
|
|
655
|
+
nativeClient?: WebSocketNativeClientOptions | Record<string, unknown>;
|
|
656
|
+
}
|
|
657
|
+
export interface WebSocketEndpointDefinition extends TrafficEndpointDefinition, WebSocketEndpointOptions {
|
|
658
|
+
Kind?: "WebSocket";
|
|
659
|
+
kind?: "WebSocket";
|
|
660
|
+
}
|
|
613
661
|
type HttpOAuth2ClientCredentialsOptionsInit = Partial<DotNetHttpOAuth2ClientCredentialsOptions & HttpOAuth2ClientCredentialsOptions>;
|
|
614
662
|
type HttpAuthOptionsInit = Partial<DotNetHttpAuthOptions & HttpAuthOptions>;
|
|
615
663
|
type KafkaSaslOptionsInit = Partial<KafkaSaslOptions>;
|
|
@@ -623,6 +671,8 @@ type AzureEventHubsEndpointDefinitionInit = Partial<AzureEventHubsEndpointDefini
|
|
|
623
671
|
type SqsEndpointDefinitionInit = Partial<SqsEndpointDefinition>;
|
|
624
672
|
type DelegateStreamEndpointDefinitionInit = Partial<DelegateStreamEndpointDefinition>;
|
|
625
673
|
type PushDiffusionEndpointDefinitionInit = Partial<PushDiffusionEndpointDefinition>;
|
|
674
|
+
type GrpcEndpointDefinitionInit = Partial<GrpcEndpointDefinition>;
|
|
675
|
+
type WebSocketEndpointDefinitionInit = Partial<WebSocketEndpointDefinition>;
|
|
626
676
|
declare abstract class TrafficEndpointDefinitionModel {
|
|
627
677
|
abstract readonly Kind: EndpointKind;
|
|
628
678
|
Mode: EndpointMode;
|
|
@@ -799,6 +849,146 @@ declare class PushDiffusionEndpointDefinitionModel extends TrafficEndpointDefini
|
|
|
799
849
|
constructor(initial?: PushDiffusionEndpointDefinitionInit);
|
|
800
850
|
Validate(): void;
|
|
801
851
|
}
|
|
852
|
+
export declare const GrpcMethodTypes: {
|
|
853
|
+
readonly Unary: "Unary";
|
|
854
|
+
readonly ServerStreaming: "ServerStreaming";
|
|
855
|
+
readonly ClientStreaming: "ClientStreaming";
|
|
856
|
+
readonly BidirectionalStreaming: "BidirectionalStreaming";
|
|
857
|
+
};
|
|
858
|
+
export type GrpcMethodTypes = typeof GrpcMethodTypes[keyof typeof GrpcMethodTypes];
|
|
859
|
+
export declare class GrpcNativeClientOptions {
|
|
860
|
+
ProtoFilePath?: string;
|
|
861
|
+
DescriptorSetPath?: string;
|
|
862
|
+
UseReflection: boolean;
|
|
863
|
+
UseTls: boolean;
|
|
864
|
+
AllowUntrustedCertificates: boolean;
|
|
865
|
+
DeadlineSeconds: number;
|
|
866
|
+
Metadata: Record<string, string>;
|
|
867
|
+
RequestPayloadJson?: string;
|
|
868
|
+
RequestPayloadJsonStream: string[];
|
|
869
|
+
constructor(initial?: Record<string, unknown>);
|
|
870
|
+
Validate(): void;
|
|
871
|
+
validate(): void;
|
|
872
|
+
}
|
|
873
|
+
export interface GrpcStatusMapping {
|
|
874
|
+
statusCode: number;
|
|
875
|
+
StatusCode: number;
|
|
876
|
+
statusName: string;
|
|
877
|
+
StatusName: string;
|
|
878
|
+
isSuccess: boolean;
|
|
879
|
+
IsSuccess: boolean;
|
|
880
|
+
}
|
|
881
|
+
export declare const GrpcStatusMapper: {
|
|
882
|
+
readonly fromStatusCode: (statusCode: number) => GrpcStatusMapping;
|
|
883
|
+
readonly FromStatusCode: (statusCode: number) => GrpcStatusMapping;
|
|
884
|
+
};
|
|
885
|
+
export declare class ProtocolMetricSnapshot {
|
|
886
|
+
protocol: string;
|
|
887
|
+
Protocol: string;
|
|
888
|
+
requests: number;
|
|
889
|
+
Requests: number;
|
|
890
|
+
messagesSent: number;
|
|
891
|
+
MessagesSent: number;
|
|
892
|
+
messagesReceived: number;
|
|
893
|
+
MessagesReceived: number;
|
|
894
|
+
latencyMs: number;
|
|
895
|
+
LatencyMs: number;
|
|
896
|
+
streamDurationMs: number;
|
|
897
|
+
StreamDurationMs: number;
|
|
898
|
+
bytesSent: number;
|
|
899
|
+
BytesSent: number;
|
|
900
|
+
bytesReceived: number;
|
|
901
|
+
BytesReceived: number;
|
|
902
|
+
reconnects: number;
|
|
903
|
+
Reconnects: number;
|
|
904
|
+
errors: number;
|
|
905
|
+
Errors: number;
|
|
906
|
+
status: string;
|
|
907
|
+
Status: string;
|
|
908
|
+
constructor(initial?: Record<string, unknown>);
|
|
909
|
+
}
|
|
910
|
+
declare class GrpcEndpointDefinitionModel extends TrafficEndpointDefinitionModel {
|
|
911
|
+
readonly Kind: "Grpc";
|
|
912
|
+
Target: string;
|
|
913
|
+
ServiceName: string;
|
|
914
|
+
MethodName: string;
|
|
915
|
+
MethodType: string;
|
|
916
|
+
DeadlineSeconds: number;
|
|
917
|
+
Produce?: (payload: TrackingPayload) => Promise<TrackingPayload | null> | TrackingPayload | null;
|
|
918
|
+
Consume?: () => Promise<TrackingPayload | null> | TrackingPayload | null;
|
|
919
|
+
ProduceAsync?: (request: ProducedMessageRequest) => Promise<ProducedMessageResult | TrackingPayload | null> | ProducedMessageResult | TrackingPayload | null;
|
|
920
|
+
ConsumeAsync?: DelegateConsumeAsync;
|
|
921
|
+
ConnectionMetadata: Record<string, string>;
|
|
922
|
+
Metadata: Record<string, string>;
|
|
923
|
+
NativeClient?: GrpcNativeClientOptions;
|
|
924
|
+
constructor(initial?: GrpcEndpointDefinitionInit);
|
|
925
|
+
Validate(): void;
|
|
926
|
+
}
|
|
927
|
+
export declare class WebSocketReconnectPolicy {
|
|
928
|
+
MaxAttempts: number;
|
|
929
|
+
maxAttempts: number;
|
|
930
|
+
DelaySeconds: number;
|
|
931
|
+
delaySeconds: number;
|
|
932
|
+
constructor(initial?: Record<string, unknown>);
|
|
933
|
+
Validate(): void;
|
|
934
|
+
validate(): void;
|
|
935
|
+
}
|
|
936
|
+
export declare class WebSocketMessageSpec {
|
|
937
|
+
Kind: string;
|
|
938
|
+
kind: string;
|
|
939
|
+
TextPayload?: string;
|
|
940
|
+
textPayload?: string;
|
|
941
|
+
BinaryPayload?: Uint8Array;
|
|
942
|
+
binaryPayload?: Uint8Array;
|
|
943
|
+
constructor(initial?: Record<string, unknown>);
|
|
944
|
+
static Text(payload: string): WebSocketMessageSpec;
|
|
945
|
+
static Binary(payload: Uint8Array | number[]): WebSocketMessageSpec;
|
|
946
|
+
Validate(): void;
|
|
947
|
+
validate(): void;
|
|
948
|
+
}
|
|
949
|
+
export declare class WebSocketExpectedMessage {
|
|
950
|
+
ContainsText?: string;
|
|
951
|
+
containsText?: string;
|
|
952
|
+
ContainsBytes?: Uint8Array;
|
|
953
|
+
containsBytes?: Uint8Array;
|
|
954
|
+
TimeoutSeconds: number;
|
|
955
|
+
timeoutSeconds: number;
|
|
956
|
+
constructor(initial?: Record<string, unknown>);
|
|
957
|
+
Validate(): void;
|
|
958
|
+
validate(): void;
|
|
959
|
+
}
|
|
960
|
+
export declare class WebSocketNativeClientOptions {
|
|
961
|
+
Headers: Record<string, string>;
|
|
962
|
+
headers: Record<string, string>;
|
|
963
|
+
Cookies: string[];
|
|
964
|
+
cookies: string[];
|
|
965
|
+
PingIntervalSeconds?: number;
|
|
966
|
+
pingIntervalSeconds?: number;
|
|
967
|
+
Reconnect: WebSocketReconnectPolicy;
|
|
968
|
+
reconnect: WebSocketReconnectPolicy;
|
|
969
|
+
Messages: WebSocketMessageSpec[];
|
|
970
|
+
messages: WebSocketMessageSpec[];
|
|
971
|
+
ExpectedMessages: WebSocketExpectedMessage[];
|
|
972
|
+
expectedMessages: WebSocketExpectedMessage[];
|
|
973
|
+
constructor(initial?: Record<string, unknown>);
|
|
974
|
+
Validate(): void;
|
|
975
|
+
validate(): void;
|
|
976
|
+
}
|
|
977
|
+
declare class WebSocketEndpointDefinitionModel extends TrafficEndpointDefinitionModel {
|
|
978
|
+
readonly Kind: "WebSocket";
|
|
979
|
+
Url: string;
|
|
980
|
+
Subprotocols: string[];
|
|
981
|
+
ConnectTimeoutSeconds: number;
|
|
982
|
+
CloseTimeoutSeconds: number;
|
|
983
|
+
Produce?: (payload: TrackingPayload) => Promise<TrackingPayload | null> | TrackingPayload | null;
|
|
984
|
+
Consume?: () => Promise<TrackingPayload | null> | TrackingPayload | null;
|
|
985
|
+
ProduceAsync?: (request: ProducedMessageRequest) => Promise<ProducedMessageResult | TrackingPayload | null> | ProducedMessageResult | TrackingPayload | null;
|
|
986
|
+
ConsumeAsync?: DelegateConsumeAsync;
|
|
987
|
+
ConnectionMetadata: Record<string, string>;
|
|
988
|
+
NativeClient?: WebSocketNativeClientOptions;
|
|
989
|
+
constructor(initial?: WebSocketEndpointDefinitionInit);
|
|
990
|
+
Validate(): void;
|
|
991
|
+
}
|
|
802
992
|
export declare const TrafficEndpointDefinition: typeof TrafficEndpointDefinitionModel;
|
|
803
993
|
export declare const HttpEndpointDefinition: typeof HttpEndpointDefinitionModel;
|
|
804
994
|
export declare const KafkaEndpointDefinition: typeof KafkaEndpointDefinitionModel;
|
|
@@ -809,10 +999,12 @@ export declare const AzureEventHubsEndpointDefinition: typeof AzureEventHubsEndp
|
|
|
809
999
|
export declare const SqsEndpointDefinition: typeof SqsEndpointDefinitionModel;
|
|
810
1000
|
export declare const DelegateStreamEndpointDefinition: typeof DelegateStreamEndpointDefinitionModel;
|
|
811
1001
|
export declare const PushDiffusionEndpointDefinition: typeof PushDiffusionEndpointDefinitionModel;
|
|
1002
|
+
export declare const GrpcEndpointDefinition: typeof GrpcEndpointDefinitionModel;
|
|
1003
|
+
export declare const WebSocketEndpointDefinition: typeof WebSocketEndpointDefinitionModel;
|
|
812
1004
|
export declare const HttpOAuth2ClientCredentialsOptions: typeof HttpOAuth2ClientCredentialsOptionsModel;
|
|
813
1005
|
export declare const HttpAuthOptions: typeof HttpAuthOptionsModel;
|
|
814
1006
|
export declare const KafkaSaslOptions: typeof KafkaSaslOptionsModel;
|
|
815
|
-
export type EndpointDefinitionInput = EndpointDefinition | DotNetEndpointDefinition | HttpEndpointDefinition | KafkaEndpointDefinition | RabbitMqEndpointDefinition | NatsEndpointDefinition | RedisStreamsEndpointDefinition | AzureEventHubsEndpointDefinition | SqsEndpointDefinition | DelegateStreamEndpointDefinition | PushDiffusionEndpointDefinition;
|
|
1007
|
+
export type EndpointDefinitionInput = EndpointDefinition | DotNetEndpointDefinition | HttpEndpointDefinition | KafkaEndpointDefinition | RabbitMqEndpointDefinition | NatsEndpointDefinition | RedisStreamsEndpointDefinition | AzureEventHubsEndpointDefinition | SqsEndpointDefinition | DelegateStreamEndpointDefinition | PushDiffusionEndpointDefinition | GrpcEndpointDefinition | WebSocketEndpointDefinition;
|
|
816
1008
|
export interface EndpointAdapter {
|
|
817
1009
|
initialize?(): Promise<void>;
|
|
818
1010
|
produce(payload?: TrackingPayload): Promise<TrackingPayload | null>;
|
package/package.json
CHANGED