@plyaz/types 1.7.19 → 1.7.21

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.
@@ -2,8 +2,11 @@
2
2
  * API Client Types
3
3
  * Defines the client interface and options
4
4
  */
5
+ import type { ApiHandlerMethods } from 'fetchff';
5
6
  import type { ApiConfig } from '../config';
6
7
  import type { ConfigUpdateStrategy, HandlerStrategy } from '../events';
8
+ import type { EndpointTypes } from '../endpoints';
9
+ import type { UnknownRecord } from 'type-fest';
7
10
  /**
8
11
  * Options for creating an API client
9
12
  * Endpoints are automatically included from src/api/endpoints
@@ -23,14 +26,14 @@ import type { ConfigUpdateStrategy, HandlerStrategy } from '../events';
23
26
  *
24
27
  * Note: ApiConfig is imported from config/types, not defined here to avoid circular dependencies
25
28
  */
26
- export type ApiClientOptions = Record<string, unknown>;
29
+ export type ApiClientOptions = ApiConfig;
27
30
  /**
28
31
  * API client instance with full TypeScript support
29
32
  * The client IS the fetchff instance with all endpoint methods
30
33
  *
31
34
  * Note: Full type definition requires EndpointTypes and endpoints from api package
32
35
  */
33
- export type ApiClientInstance = Record<string, unknown>;
36
+ export type ApiClientInstance<EndpointsList = UnknownRecord> = ApiHandlerMethods<EndpointTypes, EndpointsList>;
34
37
  /**
35
38
  * Event handler registration options
36
39
  */
@@ -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?: CacheConfig;
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 { DEBUG_EVENTS, NetworkConfigOverrideEvent, NetworkQualityEvent } from '../events';
6
- import type { ConfigSource } from '..';
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
262
+ source: DebuggerConfigSource;
299
263
  changes?: Array<{
300
264
  property: string;
301
265
  oldValue: unknown;
302
266
  newValue: unknown;
303
- source: ConfigSource;
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: ConfigSource;
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 ConfigUpdateStrategy {
328
+ export interface DebuggerConfigUpdateStrategy {
365
329
  strategy?: 'merge' | 'replace' | 'temporary';
366
330
  preserveFields?: string[];
367
331
  trackUpdate?: boolean;
@@ -1,5 +1,12 @@
1
+ import type { CampaignEndpointTypes } from './campaigns';
2
+ import type { PollingEndpointTypes } from './health';
1
3
  /**
2
4
  * Query parameters type - matches fetchff's flexible param handling
3
5
  * Supports objects, URLSearchParams, and arrays of name-value pairs
4
6
  */
5
7
  export type QueryParams = Record<string, string | number | boolean | string[] | number[]> | URLSearchParams | Array<[string, string]>;
8
+ /**
9
+ * All endpoint types combined
10
+ */
11
+ export interface EndpointTypes extends CampaignEndpointTypes, PollingEndpointTypes {
12
+ }
@@ -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 CONFIG_SOURCES: {
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 '../types';
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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 { ConfigSource } from '../../types';
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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 { ConfigSource, HEADER_EVENTS } from '../..';
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: ConfigSource;
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: ConfigSource;
58
+ source: DebuggerConfigSource;
59
59
  value: string;
60
60
  priority: number;
61
61
  }>;
62
62
  resolution: {
63
- source: ConfigSource;
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: ConfigSource;
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?: ConfigSource;
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: ConfigSource;
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: ConfigSource;
187
+ source: DebuggerConfigSource;
188
188
  value: string;
189
189
  priority: number;
190
190
  }>;
191
191
  resolution: {
192
- source: ConfigSource;
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: ConfigSource;
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?: ConfigSource;
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 { ConfigSource, NETWORK_EVENTS } from '../..';
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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, ConfigSource, PerformancePresetName, RetryStrategyName, CacheStrategyName, RevalidationStrategyName } from '..';
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
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: ConfigSource;
409
+ source: DebuggerConfigSource;
410
410
  value: string;
411
411
  priority: number;
412
412
  } | null;
@@ -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: ConfigSource;
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?: (response: T) => boolean | Promise<boolean>;
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, ConfigSource } from '..';
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?: ConfigSource;
99
+ configSource?: DebuggerConfigSource;
100
100
  updateStrategy?: ConfigUpdateStrategy;
101
101
  data: {
102
102
  eventData: TEventData;
103
103
  metadata?: {
104
104
  correlationId?: string;
105
- source: ConfigSource;
105
+ source: DebuggerConfigSource;
106
106
  timestamp: number;
107
107
  retryAttempt?: number;
108
108
  };
@@ -1,10 +1,4 @@
1
- import type { WithUuid, WithExpiration, WithAuthTokens } from '../common/types';
2
- /**
3
- * Represents a simplified user model.
4
- * @description Typically used for identification purposes within auth or session logic.
5
- */
6
- export interface User extends WithUuid {
7
- }
1
+ import type { WithExpiration, WithAuthTokens } from '../common/types';
8
2
  /**
9
3
  * AuthToken Interface.
10
4
  * @description Represents an authentication token set returned after a successful login or refresh.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.7.19",
3
+ "version": "1.7.21",
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.",