@plyaz/types 1.7.19 → 1.7.20
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/api/config/types.d.ts +1 -2
- package/dist/api/debugger/enums.d.ts +1 -0
- package/dist/api/debugger/types.d.ts +10 -46
- package/dist/api/events/enum.d.ts +2 -1
- package/dist/api/events/factories/config/types.d.ts +6 -8
- package/dist/api/events/factories/debug/types.d.ts +8 -7
- package/dist/api/events/factories/headers/types.d.ts +11 -11
- package/dist/api/events/factories/network/types.d.ts +4 -4
- package/dist/api/events/types.d.ts +0 -4
- package/dist/api/headers/types.d.ts +5 -5
- package/dist/api/index.d.ts +1 -0
- package/dist/api/network/types.d.ts +2 -3
- package/dist/api/polling/types.d.ts +5 -3
- package/dist/api/queue/types.d.ts +3 -3
- package/package.json +1 -1
|
@@ -15,7 +15,6 @@ import type { ConfigUpdateStrategy, HandlerStrategy, EventScopeWithTemporary } f
|
|
|
15
15
|
import type { NETWORK_QUALITY } from '../network';
|
|
16
16
|
import type { HeaderEventHandlers, NetworkEventHandlers, ConfigEventHandlers, ClientEventHandlers, CacheEventHandlers, PerformanceEventHandlers } from '../events';
|
|
17
17
|
import type { ApiClientOptions } from '../client';
|
|
18
|
-
import type { CacheConfig } from '../../features';
|
|
19
18
|
import type { DebugEventsConfig } from '../debugger';
|
|
20
19
|
/**
|
|
21
20
|
* HTTP Methods - extend from fetchff but uppercase
|
|
@@ -83,7 +82,7 @@ export interface ApiConfig extends Partial<Omit<FetchffRequestConfig, 'retry' |
|
|
|
83
82
|
/** Retry configuration with better naming */
|
|
84
83
|
retry?: RetryConfig | false;
|
|
85
84
|
/** Cache configuration with better naming */
|
|
86
|
-
cache?:
|
|
85
|
+
cache?: ApiCacheConfig;
|
|
87
86
|
/**
|
|
88
87
|
* Polling configuration
|
|
89
88
|
* Can be:
|
|
@@ -150,3 +150,4 @@ export declare const UNIFIED_OPERATIONS: {
|
|
|
150
150
|
readonly HANDLER_UNREGISTERED: "handler_unregistered";
|
|
151
151
|
readonly SCOPE_LISTENERS_CLEARED: "scope_listeners_cleared";
|
|
152
152
|
};
|
|
153
|
+
export type DebuggerConfigSource = (typeof DEBUGGER_CONFIG_SOURCES)[keyof typeof DEBUGGER_CONFIG_SOURCES];
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Debug Event Types
|
|
3
3
|
* Type definitions for all debug-related events and data structures
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { ConfigChangeEvent, HeadersTrackedEvent, NetworkConfigOverrideEvent, NetworkOverrideEvent, NetworkQualityEvent } from '../events';
|
|
6
|
+
import type { DebuggerConfigSource } from '..';
|
|
7
7
|
import type { ApiConfig } from '../config';
|
|
8
8
|
import type { EventTrackingAnalysis } from './factories';
|
|
9
9
|
import type { NETWORK_QUALITY, NetworkClientHints, NetworkInfo } from '../network';
|
|
@@ -96,7 +96,7 @@ export interface ConfigHistoryEntry {
|
|
|
96
96
|
property: string;
|
|
97
97
|
previousValue: unknown;
|
|
98
98
|
newValue: unknown;
|
|
99
|
-
source:
|
|
99
|
+
source: DebuggerConfigSource;
|
|
100
100
|
}>;
|
|
101
101
|
networkConditions?: {
|
|
102
102
|
quality: NETWORK_QUALITY;
|
|
@@ -217,45 +217,9 @@ export type EventOperationType = 'on' | 'once' | 'off' | 'emit' | 'emit_across_s
|
|
|
217
217
|
* Combined operation types for unified tracking
|
|
218
218
|
*/
|
|
219
219
|
export type UnifiedOperationType = FactoryOperationType | EventOperationType;
|
|
220
|
-
/**
|
|
221
|
-
* Debug event types
|
|
222
|
-
*/
|
|
223
|
-
export interface DebugEvent {
|
|
224
|
-
type: string;
|
|
225
|
-
data: unknown;
|
|
226
|
-
timestamp: string;
|
|
227
|
-
}
|
|
228
|
-
export interface ConfigConflictEvent extends DebugEvent {
|
|
229
|
-
type: typeof DEBUG_EVENTS.CONFIG_CONFLICT;
|
|
230
|
-
data: ConfigConflict;
|
|
231
|
-
}
|
|
232
|
-
export interface ConfigChangeEvent extends DebugEvent {
|
|
233
|
-
type: typeof DEBUG_EVENTS.CONFIG_CHANGE;
|
|
234
|
-
data: {
|
|
235
|
-
property: string;
|
|
236
|
-
oldValue: unknown;
|
|
237
|
-
newValue: unknown;
|
|
238
|
-
source: ConfigSource;
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
export interface HeadersTrackedEvent extends DebugEvent {
|
|
242
|
-
type: typeof DEBUG_EVENTS.HEADERS_TRACKED;
|
|
243
|
-
data: {
|
|
244
|
-
headers: Record<string, string>;
|
|
245
|
-
source: ConfigSource;
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
export interface NetworkOverrideEvent extends DebugEvent {
|
|
249
|
-
type: typeof DEBUG_EVENTS.NETWORK_OVERRIDE;
|
|
250
|
-
data: {
|
|
251
|
-
overrides: ActiveOverride[];
|
|
252
|
-
reason: string;
|
|
253
|
-
temporary?: boolean;
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
220
|
export interface TrackedValue {
|
|
257
221
|
value: unknown;
|
|
258
|
-
source:
|
|
222
|
+
source: DebuggerConfigSource;
|
|
259
223
|
timestamp: number;
|
|
260
224
|
metadata?: Record<string, unknown>;
|
|
261
225
|
}
|
|
@@ -270,7 +234,7 @@ export interface HeaderChanges {
|
|
|
270
234
|
export interface HeaderTransformation {
|
|
271
235
|
stage: HeaderStage;
|
|
272
236
|
headers: Record<string, string>;
|
|
273
|
-
source:
|
|
237
|
+
source: DebuggerConfigSource;
|
|
274
238
|
timestamp: number;
|
|
275
239
|
changes?: HeaderChanges;
|
|
276
240
|
metadata?: Record<string, unknown>;
|
|
@@ -284,7 +248,7 @@ export interface NetworkOverrideParams {
|
|
|
284
248
|
property: string;
|
|
285
249
|
originalValue: unknown;
|
|
286
250
|
overrideValue: unknown;
|
|
287
|
-
source:
|
|
251
|
+
source: DebuggerConfigSource;
|
|
288
252
|
reason: string;
|
|
289
253
|
networkInfo?: NetworkInfo;
|
|
290
254
|
networkQuality?: NETWORK_QUALITY;
|
|
@@ -295,12 +259,12 @@ export interface NetworkOverrideParams {
|
|
|
295
259
|
export interface DebugHistoryEntry {
|
|
296
260
|
type: 'config' | 'header' | 'network' | 'performance' | 'event' | 'event_operation';
|
|
297
261
|
timestamp: number;
|
|
298
|
-
source:
|
|
262
|
+
source: DebuggerConfigSource;
|
|
299
263
|
changes?: Array<{
|
|
300
264
|
property: string;
|
|
301
265
|
oldValue: unknown;
|
|
302
266
|
newValue: unknown;
|
|
303
|
-
source:
|
|
267
|
+
source: DebuggerConfigSource;
|
|
304
268
|
timestamp: number;
|
|
305
269
|
}>;
|
|
306
270
|
conflicts?: ConfigConflict[];
|
|
@@ -313,7 +277,7 @@ export interface TrackingResult {
|
|
|
313
277
|
property: string;
|
|
314
278
|
oldValue: unknown;
|
|
315
279
|
newValue: unknown;
|
|
316
|
-
source:
|
|
280
|
+
source: DebuggerConfigSource;
|
|
317
281
|
timestamp: number;
|
|
318
282
|
}>;
|
|
319
283
|
conflicts: ConfigConflict[];
|
|
@@ -361,7 +325,7 @@ export interface DebugReport {
|
|
|
361
325
|
complianceReport: ComplianceReport;
|
|
362
326
|
recommendations: string[];
|
|
363
327
|
}
|
|
364
|
-
export interface
|
|
328
|
+
export interface DebuggerConfigUpdateStrategy {
|
|
365
329
|
strategy?: 'merge' | 'replace' | 'temporary';
|
|
366
330
|
preserveFields?: string[];
|
|
367
331
|
trackUpdate?: boolean;
|
|
@@ -138,7 +138,7 @@ export declare const DEBUG_EVENTS: {
|
|
|
138
138
|
/**
|
|
139
139
|
* Configuration sources - where config updates originate from
|
|
140
140
|
*/
|
|
141
|
-
export declare const
|
|
141
|
+
export declare const EVENTS_CONFIG_SOURCES: {
|
|
142
142
|
readonly GLOBAL: "global";
|
|
143
143
|
readonly CREATE_API_CLIENT: "createApiClient";
|
|
144
144
|
readonly UPDATE_CONFIG: "updateConfig";
|
|
@@ -259,3 +259,4 @@ export declare const ALL_EVENTS: {
|
|
|
259
259
|
readonly CACHE_HIT: "headers:cache:hit";
|
|
260
260
|
readonly CACHE_MISS: "headers:cache:miss";
|
|
261
261
|
};
|
|
262
|
+
export type EventsConfigSource = (typeof EVENTS_CONFIG_SOURCES)[keyof typeof EVENTS_CONFIG_SOURCES];
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Config Event Factory
|
|
3
3
|
* Factory for creating and emitting configuration-related events
|
|
4
4
|
*/
|
|
5
|
-
import type { EventOptions } from '
|
|
6
|
-
import type { CONFIG_EVENTS, ConfigSource } from '../../../events';
|
|
7
|
-
import type { ApiConfig } from '../../../config';
|
|
5
|
+
import type { DebuggerConfigSource, CONFIG_EVENTS, EventOptions, ApiConfig } from '../../..';
|
|
8
6
|
/**
|
|
9
7
|
* Configuration updated event
|
|
10
8
|
*/
|
|
@@ -14,7 +12,7 @@ export interface ConfigGlobalUpdatedEvent {
|
|
|
14
12
|
data: {
|
|
15
13
|
previous: ApiConfig;
|
|
16
14
|
current: ApiConfig;
|
|
17
|
-
source:
|
|
15
|
+
source: DebuggerConfigSource;
|
|
18
16
|
changes: string[];
|
|
19
17
|
};
|
|
20
18
|
}
|
|
@@ -27,7 +25,7 @@ export interface ConfigGlobalResetEvent {
|
|
|
27
25
|
data: {
|
|
28
26
|
previous: ApiConfig;
|
|
29
27
|
defaults: ApiConfig;
|
|
30
|
-
source:
|
|
28
|
+
source: DebuggerConfigSource;
|
|
31
29
|
};
|
|
32
30
|
}
|
|
33
31
|
/**
|
|
@@ -39,7 +37,7 @@ export interface ConfigEnvironmentEvent {
|
|
|
39
37
|
data: {
|
|
40
38
|
environment: string;
|
|
41
39
|
config: ApiConfig;
|
|
42
|
-
source:
|
|
40
|
+
source: DebuggerConfigSource;
|
|
43
41
|
};
|
|
44
42
|
}
|
|
45
43
|
/**
|
|
@@ -51,7 +49,7 @@ export interface ConfigPresetAppliedEvent {
|
|
|
51
49
|
data: {
|
|
52
50
|
presetName: string;
|
|
53
51
|
config: ApiConfig;
|
|
54
|
-
source:
|
|
52
|
+
source: DebuggerConfigSource;
|
|
55
53
|
};
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
@@ -64,7 +62,7 @@ export type ConfigEventData = ConfigGlobalUpdatedEvent | ConfigGlobalResetEvent
|
|
|
64
62
|
export interface EmitGlobalUpdatedOptions extends EventOptions {
|
|
65
63
|
previous: ApiConfig;
|
|
66
64
|
current: ApiConfig;
|
|
67
|
-
source:
|
|
65
|
+
source: DebuggerConfigSource;
|
|
68
66
|
changes: string[];
|
|
69
67
|
}
|
|
70
68
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type BaseEvent, type EventOptions } from '..';
|
|
6
6
|
import type { DEBUG_EVENTS } from '../..';
|
|
7
7
|
import type { ConfigConflict, DebugInfo, ActiveOverride, PerformanceImpact, MonitoringAlert } from '../../../debugger';
|
|
8
|
-
import type {
|
|
8
|
+
import type { DebuggerConfigSource } from '../../..';
|
|
9
9
|
/**
|
|
10
10
|
* Base structure for debug events
|
|
11
11
|
*/
|
|
@@ -29,7 +29,7 @@ export interface ConfigChangeEvent extends BaseEvent {
|
|
|
29
29
|
property: string;
|
|
30
30
|
oldValue: unknown;
|
|
31
31
|
newValue: unknown;
|
|
32
|
-
source:
|
|
32
|
+
source: DebuggerConfigSource;
|
|
33
33
|
reason?: string;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -40,7 +40,7 @@ export interface HeadersTrackedEvent extends BaseEvent {
|
|
|
40
40
|
type: typeof DEBUG_EVENTS.HEADERS_TRACKED;
|
|
41
41
|
data: {
|
|
42
42
|
headers: Record<string, string>;
|
|
43
|
-
source:
|
|
43
|
+
source: DebuggerConfigSource;
|
|
44
44
|
metadata?: {
|
|
45
45
|
phase: 'config' | 'request' | 'response';
|
|
46
46
|
reason?: string;
|
|
@@ -55,6 +55,7 @@ export interface NetworkOverrideEvent extends BaseEvent {
|
|
|
55
55
|
data: {
|
|
56
56
|
overrides: ActiveOverride[];
|
|
57
57
|
reason: string;
|
|
58
|
+
temporary?: boolean;
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
@@ -91,7 +92,7 @@ export interface ConfigTrackingEvent extends BaseEvent {
|
|
|
91
92
|
type: typeof DEBUG_EVENTS.CONFIG_TRACKED;
|
|
92
93
|
data: {
|
|
93
94
|
config: Record<string, unknown>;
|
|
94
|
-
source:
|
|
95
|
+
source: DebuggerConfigSource;
|
|
95
96
|
phase: 'initialization' | 'runtime' | 'update';
|
|
96
97
|
metadata?: Record<string, unknown>;
|
|
97
98
|
};
|
|
@@ -103,7 +104,7 @@ export interface EmitConfigChangeOptions extends EventOptions {
|
|
|
103
104
|
property: string;
|
|
104
105
|
oldValue: unknown;
|
|
105
106
|
newValue: unknown;
|
|
106
|
-
source:
|
|
107
|
+
source: DebuggerConfigSource;
|
|
107
108
|
reason?: string;
|
|
108
109
|
}
|
|
109
110
|
/**
|
|
@@ -111,7 +112,7 @@ export interface EmitConfigChangeOptions extends EventOptions {
|
|
|
111
112
|
*/
|
|
112
113
|
export interface EmitHeadersTrackedOptions extends EventOptions {
|
|
113
114
|
headers: Record<string, string>;
|
|
114
|
-
source:
|
|
115
|
+
source: DebuggerConfigSource;
|
|
115
116
|
phase?: 'config' | 'request' | 'response';
|
|
116
117
|
reason?: string;
|
|
117
118
|
}
|
|
@@ -120,7 +121,7 @@ export interface EmitHeadersTrackedOptions extends EventOptions {
|
|
|
120
121
|
*/
|
|
121
122
|
export interface EmitConfigTrackedOptions extends EventOptions {
|
|
122
123
|
config: Record<string, unknown>;
|
|
123
|
-
source:
|
|
124
|
+
source: DebuggerConfigSource;
|
|
124
125
|
phase?: 'initialization' | 'runtime' | 'update';
|
|
125
126
|
metadata?: Record<string, unknown>;
|
|
126
127
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type BaseEvent, type EventOptions } from '..';
|
|
6
6
|
import type { ApiHeaders } from '../../../headers';
|
|
7
|
-
import type {
|
|
7
|
+
import type { DebuggerConfigSource, HEADER_EVENTS } from '../../..';
|
|
8
8
|
/**
|
|
9
9
|
* Base structure for header events
|
|
10
10
|
*/
|
|
@@ -25,7 +25,7 @@ export interface HeadersChangedEvent extends HeaderEvent {
|
|
|
25
25
|
modified: ApiHeaders;
|
|
26
26
|
removed: string[];
|
|
27
27
|
};
|
|
28
|
-
source:
|
|
28
|
+
source: DebuggerConfigSource;
|
|
29
29
|
reason?: string;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -55,12 +55,12 @@ export interface HeadersConflictEvent extends HeaderEvent {
|
|
|
55
55
|
data: {
|
|
56
56
|
header: string;
|
|
57
57
|
conflicts: Array<{
|
|
58
|
-
source:
|
|
58
|
+
source: DebuggerConfigSource;
|
|
59
59
|
value: string;
|
|
60
60
|
priority: number;
|
|
61
61
|
}>;
|
|
62
62
|
resolution: {
|
|
63
|
-
source:
|
|
63
|
+
source: DebuggerConfigSource;
|
|
64
64
|
value: string;
|
|
65
65
|
reason: string;
|
|
66
66
|
};
|
|
@@ -76,7 +76,7 @@ export interface HeadersOverrideEvent extends HeaderEvent {
|
|
|
76
76
|
header: string;
|
|
77
77
|
previousValue: string | undefined;
|
|
78
78
|
newValue: string;
|
|
79
|
-
source:
|
|
79
|
+
source: DebuggerConfigSource;
|
|
80
80
|
reason: string;
|
|
81
81
|
temporary?: boolean;
|
|
82
82
|
};
|
|
@@ -103,7 +103,7 @@ export interface HeadersFilteredEvent extends HeaderEvent {
|
|
|
103
103
|
filtered: ApiHeaders;
|
|
104
104
|
removedHeaders: string[];
|
|
105
105
|
reason: string;
|
|
106
|
-
source?:
|
|
106
|
+
source?: DebuggerConfigSource;
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
@@ -166,7 +166,7 @@ export interface HeadersCacheMissEvent extends HeaderEvent {
|
|
|
166
166
|
export interface EmitChangedOptions extends EventOptions {
|
|
167
167
|
previous: ApiHeaders;
|
|
168
168
|
current: ApiHeaders;
|
|
169
|
-
source:
|
|
169
|
+
source: DebuggerConfigSource;
|
|
170
170
|
reason?: string;
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
@@ -184,12 +184,12 @@ export interface EmitEnrichedOptions extends EventOptions {
|
|
|
184
184
|
export interface EmitConflictOptions extends EventOptions {
|
|
185
185
|
header: string;
|
|
186
186
|
conflicts: Array<{
|
|
187
|
-
source:
|
|
187
|
+
source: DebuggerConfigSource;
|
|
188
188
|
value: string;
|
|
189
189
|
priority: number;
|
|
190
190
|
}>;
|
|
191
191
|
resolution: {
|
|
192
|
-
source:
|
|
192
|
+
source: DebuggerConfigSource;
|
|
193
193
|
value: string;
|
|
194
194
|
reason: string;
|
|
195
195
|
};
|
|
@@ -202,7 +202,7 @@ export interface EmitOverrideOptions extends EventOptions {
|
|
|
202
202
|
header: string;
|
|
203
203
|
previousValue: string | undefined;
|
|
204
204
|
newValue: string;
|
|
205
|
-
source:
|
|
205
|
+
source: DebuggerConfigSource;
|
|
206
206
|
reason: string;
|
|
207
207
|
temporary?: boolean;
|
|
208
208
|
}
|
|
@@ -222,7 +222,7 @@ export interface EmitFilteredOptions extends EventOptions {
|
|
|
222
222
|
original: ApiHeaders;
|
|
223
223
|
filtered: ApiHeaders;
|
|
224
224
|
reason: string;
|
|
225
|
-
source?:
|
|
225
|
+
source?: DebuggerConfigSource;
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Options for emitCached method
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type BaseEvent, type EventOptions } from '..';
|
|
6
6
|
import type { NetworkClientHints as NetworkHints, NETWORK_QUALITY, NetworkInfo } from '../../../network';
|
|
7
|
-
import type {
|
|
7
|
+
import type { DebuggerConfigSource, NETWORK_EVENTS } from '../../..';
|
|
8
8
|
/**
|
|
9
9
|
* Base structure for network events
|
|
10
10
|
*/
|
|
@@ -57,7 +57,7 @@ export interface NetworkConfigOverrideEvent extends NetworkEvent {
|
|
|
57
57
|
property: string;
|
|
58
58
|
previousValue: unknown;
|
|
59
59
|
newValue: unknown;
|
|
60
|
-
source:
|
|
60
|
+
source: DebuggerConfigSource;
|
|
61
61
|
overrideReason: string;
|
|
62
62
|
temporaryOverride?: boolean;
|
|
63
63
|
duration?: number;
|
|
@@ -127,7 +127,7 @@ export interface EmitConfigOverrideOptions extends EventOptions {
|
|
|
127
127
|
property: string;
|
|
128
128
|
previousValue: unknown;
|
|
129
129
|
newValue: unknown;
|
|
130
|
-
source:
|
|
130
|
+
source: DebuggerConfigSource;
|
|
131
131
|
overrideReason: string;
|
|
132
132
|
temporaryOverride?: boolean;
|
|
133
133
|
duration?: number;
|
|
@@ -139,7 +139,7 @@ export interface EmitConfigRestoredOptions extends EventOptions {
|
|
|
139
139
|
property: string;
|
|
140
140
|
previousValue: unknown;
|
|
141
141
|
newValue: unknown;
|
|
142
|
-
source:
|
|
142
|
+
source: DebuggerConfigSource;
|
|
143
143
|
reason: string;
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
@@ -12,10 +12,6 @@ export type EventScope = 'global' | 'config' | 'client' | 'request';
|
|
|
12
12
|
* Type for event scopes including 'temporary'
|
|
13
13
|
*/
|
|
14
14
|
export type EventScopeWithTemporary = EventScope | 'temporary';
|
|
15
|
-
/**
|
|
16
|
-
* Configuration source type
|
|
17
|
-
*/
|
|
18
|
-
export type ConfigSource = 'global' | 'createApiClient' | 'updateConfig' | 'manual' | 'environment' | 'preset' | 'networkAware' | 'adaptive';
|
|
19
15
|
/**
|
|
20
16
|
* Configuration update strategy - controls WHERE configuration is applied
|
|
21
17
|
* - 'merge': Merges with existing config at CLIENT scope
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Header Management Type Definitions
|
|
3
3
|
* Comprehensive types for HTTP headers, following TASK-016 specification
|
|
4
4
|
*/
|
|
5
|
-
import type { ApiClientInstance,
|
|
5
|
+
import type { ApiClientInstance, DebuggerConfigSource, PerformancePresetName, RetryStrategyName, CacheStrategyName, RevalidationStrategyName } from '..';
|
|
6
6
|
/**
|
|
7
7
|
* Headers that affect cache key generation (based on fetchff behavior)
|
|
8
8
|
* These headers will be included in cache key computation
|
|
@@ -195,7 +195,7 @@ export interface HeaderMergeResult {
|
|
|
195
195
|
conflicts: Array<{
|
|
196
196
|
header: string;
|
|
197
197
|
sources: Array<{
|
|
198
|
-
source:
|
|
198
|
+
source: DebuggerConfigSource;
|
|
199
199
|
value: string;
|
|
200
200
|
priority: number;
|
|
201
201
|
}>;
|
|
@@ -367,7 +367,7 @@ export interface ProcessSingleHeaderResult {
|
|
|
367
367
|
conflict?: {
|
|
368
368
|
header: string;
|
|
369
369
|
sources: Array<{
|
|
370
|
-
source:
|
|
370
|
+
source: DebuggerConfigSource;
|
|
371
371
|
value: string;
|
|
372
372
|
priority: number;
|
|
373
373
|
}>;
|
|
@@ -393,7 +393,7 @@ export interface ConflictTrackingParams {
|
|
|
393
393
|
conflicts: Record<string, {
|
|
394
394
|
header: string;
|
|
395
395
|
sources: Array<{
|
|
396
|
-
source:
|
|
396
|
+
source: DebuggerConfigSource;
|
|
397
397
|
value: string;
|
|
398
398
|
priority: number;
|
|
399
399
|
}>;
|
|
@@ -406,7 +406,7 @@ export interface ConflictTrackingParams {
|
|
|
406
406
|
priority: number;
|
|
407
407
|
/** Original source information */
|
|
408
408
|
originalSource: {
|
|
409
|
-
source:
|
|
409
|
+
source: DebuggerConfigSource;
|
|
410
410
|
value: string;
|
|
411
411
|
priority: number;
|
|
412
412
|
} | null;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type * from './queue';
|
|
|
8
8
|
export type * from './headers';
|
|
9
9
|
export type * from './network';
|
|
10
10
|
export type * from './endpoints';
|
|
11
|
+
export type * from './debugger';
|
|
11
12
|
export type * from './cache';
|
|
12
13
|
export type * from './retry';
|
|
13
14
|
export type * from './polling';
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* Network Information API types
|
|
3
3
|
* Properly typed definitions for browser and Node.js navigator
|
|
4
4
|
*/
|
|
5
|
-
import type { NETWORK_QUALITY } from '
|
|
6
|
-
import type { ConfigSource, NetworkEvent } from '../events';
|
|
5
|
+
import type { DebuggerConfigSource, NetworkEvent, NETWORK_QUALITY } from '../../..';
|
|
7
6
|
/**
|
|
8
7
|
* Network Information interface (partial for what we use)
|
|
9
8
|
*/
|
|
@@ -316,7 +315,7 @@ export interface TemporaryOverride {
|
|
|
316
315
|
/** How long the override should last (in milliseconds) */
|
|
317
316
|
duration?: number;
|
|
318
317
|
/** Source configuration that requested the override */
|
|
319
|
-
source:
|
|
318
|
+
source: DebuggerConfigSource;
|
|
320
319
|
/** Reason for the override */
|
|
321
320
|
reason: string;
|
|
322
321
|
/** Function to restore original value */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Polling Configuration Types
|
|
3
3
|
* Provides type definitions for polling functionality
|
|
4
4
|
*/
|
|
5
|
+
import type { FetchResponse, PollingFunction } from 'fetchff';
|
|
5
6
|
/**
|
|
6
7
|
* Polling configuration for repeated requests
|
|
7
8
|
* Uses generic types to work with any response data
|
|
@@ -28,8 +29,9 @@ export interface PollingConfig<T = unknown> {
|
|
|
28
29
|
/**
|
|
29
30
|
* Function to determine if polling should stop
|
|
30
31
|
* Return true to stop, false to continue
|
|
32
|
+
* Uses fetchff's PollingFunction type for compatibility
|
|
31
33
|
*/
|
|
32
|
-
shouldStop?:
|
|
34
|
+
shouldStop?: PollingFunction<T>;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Result of a polling operation
|
|
@@ -62,9 +64,9 @@ export interface ProgressivePollingOptions {
|
|
|
62
64
|
*/
|
|
63
65
|
export interface ConditionalPollingOptions<T = unknown> {
|
|
64
66
|
/** Function to check if polling succeeded */
|
|
65
|
-
successCondition?: (response: T) => boolean;
|
|
67
|
+
successCondition?: (response: FetchResponse<T>) => boolean;
|
|
66
68
|
/** Function to check if polling should error */
|
|
67
|
-
errorCondition?: (response: T) => boolean;
|
|
69
|
+
errorCondition?: (response: FetchResponse<T>) => boolean;
|
|
68
70
|
/** Maximum time to poll in milliseconds */
|
|
69
71
|
timeoutMs?: number;
|
|
70
72
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Queue System Type Definitions
|
|
3
3
|
*/
|
|
4
4
|
import type { PRIORITY_LEVEL } from './enums';
|
|
5
|
-
import type { ConfigUpdateStrategy,
|
|
5
|
+
import type { ConfigUpdateStrategy, DebuggerConfigSource } from '..';
|
|
6
6
|
/**
|
|
7
7
|
* Processing strategy for queue operations
|
|
8
8
|
*/
|
|
@@ -96,13 +96,13 @@ export interface BatchProcessorConfig<T> {
|
|
|
96
96
|
export interface EventQueueOperation<TEventData = unknown> extends QueueOperation {
|
|
97
97
|
eventType: string;
|
|
98
98
|
scope?: 'global' | 'client' | 'request' | 'temporary';
|
|
99
|
-
configSource?:
|
|
99
|
+
configSource?: DebuggerConfigSource;
|
|
100
100
|
updateStrategy?: ConfigUpdateStrategy;
|
|
101
101
|
data: {
|
|
102
102
|
eventData: TEventData;
|
|
103
103
|
metadata?: {
|
|
104
104
|
correlationId?: string;
|
|
105
|
-
source:
|
|
105
|
+
source: DebuggerConfigSource;
|
|
106
106
|
timestamp: number;
|
|
107
107
|
retryAttempt?: number;
|
|
108
108
|
};
|
package/package.json
CHANGED