@plyaz/types 1.36.1 → 1.37.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.
@@ -136,3 +136,44 @@ export interface DDTraceModule {
136
136
  default: DDTracer;
137
137
  tracer: DDTracer;
138
138
  }
139
+ /**
140
+ * Datadog API client interface.
141
+ * Used when SDK packages are not available.
142
+ */
143
+ export interface DatadogApiClient {
144
+ submitMetrics(metrics: DatadogMetricPayload[]): Promise<void>;
145
+ submitLogs(logs: DatadogLogPayload[]): Promise<void>;
146
+ submitEvent(event: DatadogEventPayload): Promise<void>;
147
+ isHealthy?(): Promise<boolean>;
148
+ }
149
+ /**
150
+ * Datadog metric payload for HTTP API
151
+ */
152
+ export interface DatadogMetricPayload {
153
+ metric: string;
154
+ type: 'count' | 'gauge' | 'rate';
155
+ points: Array<[number, number]>;
156
+ tags?: string[];
157
+ }
158
+ /**
159
+ * Datadog log payload for HTTP API
160
+ */
161
+ export interface DatadogLogPayload {
162
+ ddsource?: string;
163
+ ddtags?: string;
164
+ service?: string;
165
+ message: string;
166
+ status: string;
167
+ [key: string]: unknown;
168
+ }
169
+ /**
170
+ * Datadog event payload for HTTP API
171
+ */
172
+ export interface DatadogEventPayload {
173
+ title: string;
174
+ text: string;
175
+ tags?: string[];
176
+ date_happened?: number;
177
+ priority?: 'normal' | 'low';
178
+ alert_type?: 'error' | 'warning' | 'info' | 'success';
179
+ }
@@ -7,4 +7,4 @@
7
7
  export type { MonitoringObservabilityProvider, MonitoringMetricType, MonitoringSpanStatus, MonitoringLogLevel, MonitoringMetricOptions, MonitoringCounterMetric, MonitoringGaugeMetric, MonitoringHistogramMetric, MonitoringSummaryMetric, MonitoringMetric, MonitoringSpanContext, MonitoringSpanAttributes, MonitoringSpanEvent, MonitoringSpanOptions, MonitoringSpan, MonitoringLogEntry, MonitoringObservabilityEvent, MonitoringObservabilityAdapter, MonitoringObservabilityAdapterConfig, MonitoringDatadogAdapterConfig, MonitoringOpenTelemetryAdapterConfig, MonitoringGrafanaAdapterConfig, MonitoringConsoleAdapterConfig, MonitoringCompositeMode, MonitoringCompositeAdapterConfig, MonitoringOperationContext, MonitoringOperationResult, MonitoringAdapterWithPriority, MonitoringAdapterEntry, MonitoringObservabilityServiceConfig, MonitoringObservabilityServiceInterface, } from './types';
8
8
  export { OBSERVABILITY_METRICS, OBSERVABILITY_SPANS } from './types';
9
9
  export type { MonitoringObservabilityProvider as ObservabilityProvider, MonitoringMetricType as MetricType, MonitoringSpanStatus as SpanStatus, MonitoringMetricOptions as MetricOptions, MonitoringCounterMetric as CounterMetric, MonitoringGaugeMetric as GaugeMetric, MonitoringHistogramMetric as HistogramMetric, MonitoringSummaryMetric as SummaryMetric, MonitoringMetric as Metric, MonitoringSpanContext as SpanContext, MonitoringSpanAttributes as SpanAttributes, MonitoringSpanEvent as SpanEvent, MonitoringSpanOptions as SpanOptions, MonitoringSpan as Span, MonitoringLogEntry as LogEntry, MonitoringObservabilityEvent as ObservabilityEvent, MonitoringObservabilityAdapter as ObservabilityAdapter, MonitoringObservabilityAdapterConfig as ObservabilityAdapterConfig, MonitoringDatadogAdapterConfig as DatadogAdapterConfig, MonitoringOpenTelemetryAdapterConfig as OpenTelemetryAdapterConfig, MonitoringGrafanaAdapterConfig as GrafanaAdapterConfig, MonitoringConsoleAdapterConfig as ConsoleAdapterConfig, MonitoringCompositeMode as CompositeMode, MonitoringCompositeAdapterConfig as CompositeAdapterConfig, MonitoringOperationContext as OperationContext, MonitoringAdapterWithPriority as AdapterWithPriority, MonitoringAdapterEntry as AdapterEntry, MonitoringObservabilityServiceConfig as ObservabilityServiceConfig, MonitoringObservabilityServiceInterface as ObservabilityServiceInterface, } from './types';
10
- export type { HotShotsConfig, HotShotsClient, DDTraceConfig, DDSpanContext, DDSpan, DDSpanOptions, DDScope, DDTracer, DDTraceModule, } from './datadog-sdk';
10
+ export type { HotShotsConfig, HotShotsClient, DDTraceConfig, DDSpanContext, DDSpan, DDSpanOptions, DDScope, DDTracer, DDTraceModule, DatadogApiClient, DatadogMetricPayload, DatadogLogPayload, DatadogEventPayload, } from './datadog-sdk';
@@ -11,7 +11,6 @@
11
11
  * Domain stores (like files) use selectors to filter messages from this store
12
12
  * by type, subtype, scope, transport, etc.
13
13
  */
14
- import type { PackageErrorLike } from '../../errors';
15
14
  import type { StreamMessage, StreamMessageType, StreamMessageSubtype, StreamMessageScope, StreamTransportType } from '../../core/events/streaming';
16
15
  /**
17
16
  * Stream message handler function.
@@ -75,8 +74,6 @@ export interface StreamMessageFilter {
75
74
  export interface StreamStoreState {
76
75
  /** Whether SSE/WebSocket connection is established */
77
76
  connected: boolean;
78
- /** Connection error (if any) - also added to global errors store */
79
- connectionError: PackageErrorLike | null;
80
77
  /** Connection ID (from server) */
81
78
  connectionId: string | null;
82
79
  /** Transport type in use */
@@ -112,11 +109,6 @@ export interface StreamStoreState {
112
109
  export interface StreamStoreActions {
113
110
  /** Set connection state */
114
111
  setConnected(connected: boolean): void;
115
- /**
116
- * Set connection error.
117
- * NOTE: This also adds the error to the GLOBAL errors store.
118
- */
119
- setConnectionError(error: PackageErrorLike | null): void;
120
112
  /** Set connection ID */
121
113
  setConnectionId(id: string | null): void;
122
114
  /** Set transport type */
@@ -280,7 +272,6 @@ export interface StreamSliceConfig {
280
272
  /**
281
273
  * Callback to add errors to the global errors store.
282
274
  * Called when:
283
- * - setConnectionError is called with an error
284
275
  * - handleMessage receives an 'error' event
285
276
  * - A registered handler throws an error
286
277
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.36.1",
3
+ "version": "1.37.0",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",