@signalk/server-api 2.10.1 → 2.20.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.
@@ -0,0 +1,719 @@
1
+ /**
2
+ * Radar API Types
3
+ *
4
+ * Types and interfaces for the Signal K Radar API at
5
+ * /signalk/v2/api/vessels/self/radars
6
+ */
7
+ /** @category Radar API */
8
+ export type RadarStatus = 'off' | 'standby' | 'transmit' | 'warming';
9
+ /** @category Radar API */
10
+ export interface RadarControlValue {
11
+ auto: boolean;
12
+ value: number;
13
+ }
14
+ /** @category Radar API */
15
+ export interface RadarControls {
16
+ gain: RadarControlValue;
17
+ sea?: RadarControlValue;
18
+ rain?: {
19
+ value: number;
20
+ };
21
+ interferenceRejection?: {
22
+ value: number;
23
+ };
24
+ targetExpansion?: {
25
+ value: number;
26
+ };
27
+ targetBoost?: {
28
+ value: number;
29
+ };
30
+ [key: string]: RadarControlValue | {
31
+ value: number;
32
+ } | undefined;
33
+ }
34
+ /** @category Radar API */
35
+ export interface LegendEntry {
36
+ color: string;
37
+ label: string;
38
+ minValue?: number;
39
+ maxValue?: number;
40
+ }
41
+ /**
42
+ * Optional features a radar provider may support.
43
+ *
44
+ * These indicate what API features are implemented by the provider,
45
+ * NOT hardware capabilities (those are in characteristics).
46
+ *
47
+ * @category Radar API
48
+ */
49
+ export type SupportedFeature = 'arpa' | 'guardZones' | 'trails' | 'dualRange';
50
+ /**
51
+ * Hardware characteristics of a radar.
52
+ *
53
+ * @category Radar API
54
+ */
55
+ export interface RadarCharacteristics {
56
+ /** Maximum detection range in meters */
57
+ maxRange: number;
58
+ /** Minimum detection range in meters */
59
+ minRange: number;
60
+ /** Supported discrete range values in meters */
61
+ supportedRanges: number[];
62
+ /** Number of spokes per full rotation */
63
+ spokesPerRevolution: number;
64
+ /** Maximum spoke length in samples */
65
+ maxSpokeLength: number;
66
+ /** Whether the radar supports Doppler/motion detection */
67
+ hasDoppler: boolean;
68
+ /** Whether the radar supports dual-range mode */
69
+ hasDualRange: boolean;
70
+ /** Maximum range for dual-range mode (if supported) */
71
+ maxDualRange?: number;
72
+ /** Number of no-transmit zones supported */
73
+ noTransmitZoneCount: number;
74
+ }
75
+ /**
76
+ * Control definition describing a radar control.
77
+ *
78
+ * @category Radar API
79
+ */
80
+ export interface ControlDefinitionV5 {
81
+ /** Semantic control ID (e.g., "gain", "beamSharpening") */
82
+ id: string;
83
+ /** Human-readable name */
84
+ name: string;
85
+ /** Description for tooltips */
86
+ description: string;
87
+ /** Category: base controls all radars have, extended are model-specific */
88
+ category: 'base' | 'extended';
89
+ /** Control value type */
90
+ type: 'boolean' | 'number' | 'enum' | 'compound';
91
+ /** For type: "number" - value range constraints */
92
+ range?: {
93
+ min: number;
94
+ max: number;
95
+ step?: number;
96
+ unit?: string;
97
+ };
98
+ /** For type: "enum" - allowed values */
99
+ values?: Array<{
100
+ value: string | number;
101
+ label: string;
102
+ description?: string;
103
+ }>;
104
+ /**
105
+ * For type: "compound" - property definitions.
106
+ * Structure varies by control type (radar-specific).
107
+ */
108
+ properties?: Record<string, unknown>;
109
+ /** Supported modes (auto/manual) */
110
+ modes?: ('auto' | 'manual')[];
111
+ /** Default mode */
112
+ defaultMode?: 'auto' | 'manual';
113
+ /** Whether this control is read-only */
114
+ readOnly?: boolean;
115
+ /**
116
+ * Default value for this control.
117
+ * Type depends on the control type (boolean, number, enum value, or compound object).
118
+ */
119
+ default?: boolean | number | string | Record<string, unknown>;
120
+ }
121
+ /**
122
+ * Control constraint describing dependencies between controls.
123
+ *
124
+ * @category Radar API
125
+ */
126
+ export interface ControlConstraint {
127
+ /** Control ID this constraint applies to */
128
+ controlId: string;
129
+ /** Condition that triggers the constraint */
130
+ condition: {
131
+ type: 'disabled_when' | 'read_only_when' | 'restricted_when';
132
+ dependsOn: string;
133
+ operator: '==' | '!=' | '>' | '<' | '>=' | '<=';
134
+ value: string | number | boolean;
135
+ };
136
+ /** Effect when condition is true */
137
+ effect: {
138
+ disabled?: boolean;
139
+ readOnly?: boolean;
140
+ /** Restricted set of allowed values when constraint is active */
141
+ allowedValues?: (string | number | boolean)[];
142
+ reason?: string;
143
+ };
144
+ }
145
+ /**
146
+ * Capability manifest describing what a radar can do.
147
+ * This is cacheable - capabilities rarely change at runtime.
148
+ *
149
+ * @category Radar API
150
+ *
151
+ * @example
152
+ * ```json
153
+ * {
154
+ * "id": "1",
155
+ * "make": "Furuno",
156
+ * "model": "DRS4D-NXT",
157
+ * "characteristics": {
158
+ * "maxRange": 88896,
159
+ * "minRange": 116,
160
+ * "supportedRanges": [116, 231, 463, ...],
161
+ * "hasDoppler": true
162
+ * },
163
+ * "controls": [
164
+ * {"id": "power", "type": "enum", ...},
165
+ * {"id": "gain", "type": "compound", ...}
166
+ * ]
167
+ * }
168
+ * ```
169
+ */
170
+ export interface CapabilityManifest {
171
+ /** Radar ID */
172
+ id: string;
173
+ /** Manufacturer name */
174
+ make: string;
175
+ /** Model name */
176
+ model: string;
177
+ /** Model family (optional) */
178
+ modelFamily?: string;
179
+ /** Serial number (optional) */
180
+ serialNumber?: string;
181
+ /** Firmware version (optional) */
182
+ firmwareVersion?: string;
183
+ /** Hardware characteristics */
184
+ characteristics: RadarCharacteristics;
185
+ /** Available controls with their schemas */
186
+ controls: ControlDefinitionV5[];
187
+ /** Control dependencies/constraints */
188
+ constraints?: ControlConstraint[];
189
+ /**
190
+ * Optional features this provider implements.
191
+ *
192
+ * Indicates which optional API features are available:
193
+ * - 'arpa': ARPA target tracking (GET /targets, POST /targets, etc.)
194
+ * - 'guardZones': Guard zone alerting (GET /guardZones, etc.)
195
+ * - 'trails': Target trails/history (GET /trails)
196
+ * - 'dualRange': Dual-range simultaneous display
197
+ *
198
+ * Note: This declares API capabilities, not hardware. A radar may have
199
+ * hardware Doppler support (characteristics.hasDoppler) but the provider
200
+ * might not implement the trails API endpoint.
201
+ */
202
+ supportedFeatures?: SupportedFeature[];
203
+ }
204
+ /**
205
+ * Current radar state.
206
+ * Contains status and all current control values.
207
+ *
208
+ * @category Radar API
209
+ *
210
+ * @example
211
+ * ```json
212
+ * {
213
+ * "id": "1",
214
+ * "timestamp": "2025-01-15T10:30:00Z",
215
+ * "status": "transmit",
216
+ * "controls": {
217
+ * "power": "transmit",
218
+ * "range": 5556,
219
+ * "gain": {"mode": "auto", "value": 65}
220
+ * }
221
+ * }
222
+ * ```
223
+ */
224
+ export interface RadarState {
225
+ /** Radar ID */
226
+ id: string;
227
+ /** ISO 8601 timestamp of when state was captured */
228
+ timestamp: string;
229
+ /** Current operational status */
230
+ status: RadarStatus;
231
+ /**
232
+ * Current control values keyed by control ID.
233
+ * Value types depend on the control type defined in CapabilityManifest.
234
+ */
235
+ controls: Record<string, unknown>;
236
+ /** Controls that are currently disabled and why */
237
+ disabledControls?: Array<{
238
+ controlId: string;
239
+ reason: string;
240
+ }>;
241
+ }
242
+ /**
243
+ * ARPA target status.
244
+ *
245
+ * @category Radar API
246
+ */
247
+ export type ArpaTargetStatus = 'tracking' | 'lost' | 'acquiring';
248
+ /**
249
+ * ARPA target acquisition method.
250
+ *
251
+ * @category Radar API
252
+ */
253
+ export type ArpaAcquisitionMethod = 'manual' | 'auto';
254
+ /**
255
+ * ARPA target position data.
256
+ *
257
+ * @category Radar API
258
+ */
259
+ export interface ArpaTargetPosition {
260
+ /** Bearing from own ship in degrees (0-360, true north) */
261
+ bearing: number;
262
+ /** Distance from own ship in meters */
263
+ distance: number;
264
+ /** Latitude (if GPS available) */
265
+ latitude?: number;
266
+ /** Longitude (if GPS available) */
267
+ longitude?: number;
268
+ }
269
+ /**
270
+ * ARPA target motion data.
271
+ *
272
+ * @category Radar API
273
+ */
274
+ export interface ArpaTargetMotion {
275
+ /** Course over ground in degrees (0-360, true north) */
276
+ course: number;
277
+ /** Speed over ground in meters per second */
278
+ speed: number;
279
+ }
280
+ /**
281
+ * ARPA target danger assessment.
282
+ *
283
+ * @category Radar API
284
+ */
285
+ export interface ArpaTargetDanger {
286
+ /** Closest Point of Approach in meters */
287
+ cpa: number;
288
+ /** Time to CPA in seconds (negative if target is receding) */
289
+ tcpa: number;
290
+ }
291
+ /**
292
+ * ARPA tracked target.
293
+ *
294
+ * @category Radar API
295
+ *
296
+ * @example
297
+ * ```json
298
+ * {
299
+ * "id": 1,
300
+ * "status": "tracking",
301
+ * "position": {
302
+ * "bearing": 45.2,
303
+ * "distance": 1852,
304
+ * "latitude": 52.1234,
305
+ * "longitude": 4.5678
306
+ * },
307
+ * "motion": {
308
+ * "course": 180.5,
309
+ * "speed": 5.14
310
+ * },
311
+ * "danger": {
312
+ * "cpa": 150,
313
+ * "tcpa": 300
314
+ * },
315
+ * "acquisition": "manual",
316
+ * "firstSeen": "2025-01-15T10:28:00Z",
317
+ * "lastSeen": "2025-01-15T10:30:00Z"
318
+ * }
319
+ * ```
320
+ */
321
+ export interface ArpaTarget {
322
+ /** Unique target identifier (1-99 typically) */
323
+ id: number;
324
+ /** Current tracking status */
325
+ status: ArpaTargetStatus;
326
+ /** Target position relative to own ship */
327
+ position: ArpaTargetPosition;
328
+ /** Target motion (course and speed) */
329
+ motion: ArpaTargetMotion;
330
+ /** Danger assessment (CPA/TCPA) */
331
+ danger: ArpaTargetDanger;
332
+ /** How this target was acquired */
333
+ acquisition: ArpaAcquisitionMethod;
334
+ /** ISO 8601 timestamp when target was first acquired */
335
+ firstSeen: string;
336
+ /** ISO 8601 timestamp of most recent radar return */
337
+ lastSeen: string;
338
+ }
339
+ /**
340
+ * Response from GET /radars/{id}/targets.
341
+ *
342
+ * @category Radar API
343
+ *
344
+ * @example
345
+ * ```json
346
+ * {
347
+ * "radarId": "radar-0",
348
+ * "timestamp": "2025-01-15T10:30:00Z",
349
+ * "targets": [
350
+ * { "id": 1, "status": "tracking", ... },
351
+ * { "id": 2, "status": "lost", ... }
352
+ * ]
353
+ * }
354
+ * ```
355
+ */
356
+ export interface TargetListResponse {
357
+ /** Radar ID */
358
+ radarId: string;
359
+ /** ISO 8601 timestamp */
360
+ timestamp: string;
361
+ /** List of tracked targets */
362
+ targets: ArpaTarget[];
363
+ }
364
+ /**
365
+ * WebSocket message for target streaming.
366
+ *
367
+ * @category Radar API
368
+ */
369
+ export interface TargetStreamMessage {
370
+ /** Message type */
371
+ type: 'target_update' | 'target_lost' | 'target_acquired';
372
+ /** ISO 8601 timestamp */
373
+ timestamp: string;
374
+ /** Updated/lost/acquired target */
375
+ target: ArpaTarget;
376
+ }
377
+ /**
378
+ * ARPA settings for a radar.
379
+ *
380
+ * @category Radar API
381
+ */
382
+ export interface ArpaSettings {
383
+ /** Whether ARPA is enabled */
384
+ enabled: boolean;
385
+ /** Maximum number of targets to track (typically 10-100) */
386
+ maxTargets: number;
387
+ /** CPA threshold for danger alert in meters */
388
+ cpaThreshold: number;
389
+ /** TCPA threshold for danger alert in seconds */
390
+ tcpaThreshold: number;
391
+ /** Seconds before marking a target as lost */
392
+ lostTargetTimeout: number;
393
+ /** Auto-acquisition sensitivity (0=off, 1-3=low/med/high) */
394
+ autoAcquisition: number;
395
+ }
396
+ /**
397
+ * Radar information returned by GET /radars/{id}
398
+ *
399
+ * @category Radar API
400
+ *
401
+ * @example
402
+ * ```json
403
+ * {
404
+ * "id": "radar-0",
405
+ * "name": "Furuno DRS4D-NXT",
406
+ * "brand": "Furuno",
407
+ * "status": "transmit",
408
+ * "spokesPerRevolution": 2048,
409
+ * "maxSpokeLen": 1024,
410
+ * "range": 2000,
411
+ * "controls": {
412
+ * "gain": { "auto": false, "value": 50 },
413
+ * "sea": { "auto": true, "value": 30 }
414
+ * },
415
+ * "streamUrl": "ws://192.168.1.100:3001/v1/api/stream/radar-0"
416
+ * }
417
+ * ```
418
+ */
419
+ export interface RadarInfo {
420
+ /** Unique identifier for this radar */
421
+ id: string;
422
+ /** Display name */
423
+ name: string;
424
+ /** Radar brand/manufacturer */
425
+ brand?: string;
426
+ /** Current operational status */
427
+ status: RadarStatus;
428
+ /** Number of spokes per full rotation */
429
+ spokesPerRevolution: number;
430
+ /** Maximum spoke length in samples */
431
+ maxSpokeLen: number;
432
+ /** Current range in meters */
433
+ range: number;
434
+ /** Current control settings */
435
+ controls: RadarControls;
436
+ /** Color legend for radar display */
437
+ legend?: LegendEntry[];
438
+ /**
439
+ * WebSocket URL for radar spoke streaming.
440
+ *
441
+ * - If **absent**: Clients use the built-in stream endpoint:
442
+ * `ws://server/signalk/v2/api/vessels/self/radars/{id}/stream`
443
+ * or `ws://server/signalk/v2/api/streams/radars/{id}`
444
+ * (WASM plugins emit spokes via `sk_radar_emit_spokes()` FFI binding)
445
+ *
446
+ * - If **present**: Clients connect directly to external URL (backward compat)
447
+ * @example "ws://192.168.1.100:3001/stream" (external mayara-server)
448
+ */
449
+ streamUrl?: string;
450
+ }
451
+ /**
452
+ * Provider interface for plugins that provide radar data.
453
+ *
454
+ * @category Radar API
455
+ *
456
+ * @example
457
+ * ```javascript
458
+ * app.registerRadarProvider({
459
+ * name: 'Furuno Radar Plugin',
460
+ * methods: {
461
+ * getRadars: async () => ['radar-0'],
462
+ * getRadarInfo: async (id) => ({
463
+ * id: 'radar-0',
464
+ * name: 'Furuno DRS4D-NXT',
465
+ * status: 'transmit',
466
+ * spokesPerRevolution: 2048,
467
+ * maxSpokeLen: 1024,
468
+ * range: 2000,
469
+ * controls: { gain: { auto: false, value: 50 } },
470
+ * streamUrl: 'ws://192.168.1.100:3001/stream'
471
+ * }),
472
+ * setPower: async (id, state) => { ... },
473
+ * setRange: async (id, range) => { ... },
474
+ * setGain: async (id, gain) => { ... }
475
+ * }
476
+ * })
477
+ * ```
478
+ */
479
+ export interface RadarProvider {
480
+ /** Display name for this radar provider */
481
+ name: string;
482
+ /** Provider methods */
483
+ methods: RadarProviderMethods;
484
+ }
485
+ /** @category Radar API */
486
+ export interface RadarProviderMethods {
487
+ /** Plugin ID (set automatically on registration) */
488
+ pluginId?: string;
489
+ /**
490
+ * Get list of radar IDs this provider manages.
491
+ * @returns Array of radar IDs
492
+ */
493
+ getRadars: () => Promise<string[]>;
494
+ /**
495
+ * Get detailed info for a specific radar.
496
+ * @param radarId The radar ID
497
+ * @returns Radar info or null if not found
498
+ */
499
+ getRadarInfo: (radarId: string) => Promise<RadarInfo | null>;
500
+ /**
501
+ * Set radar power state.
502
+ * @param radarId The radar ID
503
+ * @param state Target power state
504
+ * @returns true on success
505
+ */
506
+ setPower?: (radarId: string, state: RadarStatus) => Promise<boolean>;
507
+ /**
508
+ * Set radar range in meters.
509
+ * @param radarId The radar ID
510
+ * @param range Range in meters
511
+ * @returns true on success
512
+ */
513
+ setRange?: (radarId: string, range: number) => Promise<boolean>;
514
+ /**
515
+ * Set radar gain.
516
+ * @param radarId The radar ID
517
+ * @param gain Gain settings
518
+ * @returns true on success
519
+ */
520
+ setGain?: (radarId: string, gain: {
521
+ auto: boolean;
522
+ value?: number;
523
+ }) => Promise<boolean>;
524
+ /**
525
+ * Set radar sea clutter.
526
+ * @param radarId The radar ID
527
+ * @param sea Sea clutter settings
528
+ * @returns true on success
529
+ */
530
+ setSea?: (radarId: string, sea: {
531
+ auto: boolean;
532
+ value?: number;
533
+ }) => Promise<boolean>;
534
+ /**
535
+ * Set radar rain clutter.
536
+ * @param radarId The radar ID
537
+ * @param rain Rain clutter settings
538
+ * @returns true on success
539
+ */
540
+ setRain?: (radarId: string, rain: {
541
+ auto: boolean;
542
+ value?: number;
543
+ }) => Promise<boolean>;
544
+ /**
545
+ * Set multiple radar controls at once.
546
+ * @param radarId The radar ID
547
+ * @param controls Partial controls to update
548
+ * @returns true on success
549
+ */
550
+ setControls?: (radarId: string, controls: Partial<RadarControls>) => Promise<boolean>;
551
+ /**
552
+ * Handle WebSocket stream connection (optional).
553
+ * Only needed if provider doesn't expose external streamUrl.
554
+ * @param radarId The radar ID
555
+ * @param ws WebSocket connection to send spoke data to
556
+ */
557
+ handleStreamConnection?: (radarId: string, ws: WebSocket) => void;
558
+ /**
559
+ * Get capability manifest for a radar.
560
+ * Returns detailed capabilities including supported controls, ranges, features.
561
+ * @param radarId The radar ID
562
+ * @returns CapabilityManifest or null if not found
563
+ */
564
+ getCapabilities?: (radarId: string) => Promise<CapabilityManifest | null>;
565
+ /**
566
+ * Get current radar state.
567
+ * Returns status and all current control values.
568
+ * @param radarId The radar ID
569
+ * @returns RadarState or null if not found
570
+ */
571
+ getState?: (radarId: string) => Promise<RadarState | null>;
572
+ /**
573
+ * Get a single control value.
574
+ * @param radarId The radar ID
575
+ * @param controlId The semantic control ID (e.g., "gain", "beamSharpening")
576
+ * @returns Control value or null if not found. Type depends on control definition.
577
+ */
578
+ getControl?: (radarId: string, controlId: string) => Promise<unknown>;
579
+ /**
580
+ * Set a single control value.
581
+ * @param radarId The radar ID
582
+ * @param controlId The semantic control ID (e.g., "gain", "beamSharpening")
583
+ * @param value The value to set. Type depends on control definition.
584
+ * @returns Result with success flag and optional error
585
+ */
586
+ setControl?: (radarId: string, controlId: string, value: unknown) => Promise<{
587
+ success: boolean;
588
+ error?: string;
589
+ }>;
590
+ /**
591
+ * Get all tracked ARPA targets.
592
+ * @param radarId The radar ID
593
+ * @returns Target list response or null if not supported
594
+ */
595
+ getTargets?: (radarId: string) => Promise<TargetListResponse | null>;
596
+ /**
597
+ * Manually acquire a target at the specified position.
598
+ * @param radarId The radar ID
599
+ * @param bearing Bearing in degrees (0-360, true north)
600
+ * @param distance Distance in meters
601
+ * @returns Result with success flag and optional target ID
602
+ */
603
+ acquireTarget?: (radarId: string, bearing: number, distance: number) => Promise<{
604
+ success: boolean;
605
+ targetId?: number;
606
+ error?: string;
607
+ }>;
608
+ /**
609
+ * Cancel tracking of a target.
610
+ * @param radarId The radar ID
611
+ * @param targetId The target ID to cancel
612
+ * @returns true on success
613
+ */
614
+ cancelTarget?: (radarId: string, targetId: number) => Promise<boolean>;
615
+ /**
616
+ * Handle WebSocket target stream connection.
617
+ * Streams target updates in real-time.
618
+ * @param radarId The radar ID
619
+ * @param ws WebSocket connection to send target updates to
620
+ */
621
+ handleTargetStreamConnection?: (radarId: string, ws: WebSocket) => void;
622
+ /**
623
+ * Get ARPA settings.
624
+ * @param radarId The radar ID
625
+ * @returns ARPA settings or null if not supported
626
+ */
627
+ getArpaSettings?: (radarId: string) => Promise<ArpaSettings | null>;
628
+ /**
629
+ * Update ARPA settings.
630
+ * @param radarId The radar ID
631
+ * @param settings Partial settings to update
632
+ * @returns Result with success flag and optional error
633
+ */
634
+ setArpaSettings?: (radarId: string, settings: Partial<ArpaSettings>) => Promise<{
635
+ success: boolean;
636
+ error?: string;
637
+ }>;
638
+ }
639
+ /**
640
+ * Radar API methods available on the server.
641
+ *
642
+ * @category Radar API
643
+ */
644
+ export interface RadarApi {
645
+ /** Register a radar provider plugin */
646
+ register: (pluginId: string, provider: RadarProvider) => void;
647
+ /** Unregister a radar provider plugin */
648
+ unRegister: (pluginId: string) => void;
649
+ /** Get list of all radars from all providers */
650
+ getRadars: () => Promise<RadarInfo[]>;
651
+ /** Get info for a specific radar */
652
+ getRadarInfo: (radarId: string) => Promise<RadarInfo | null>;
653
+ }
654
+ /**
655
+ * Registry interface exposed to plugins via ServerAPI.
656
+ *
657
+ * @category Radar API
658
+ */
659
+ export interface RadarProviderRegistry {
660
+ /**
661
+ * Register a radar provider plugin.
662
+ * See Radar Provider Plugins documentation for details.
663
+ *
664
+ * @category Radar API
665
+ */
666
+ registerRadarProvider: (provider: RadarProvider) => void;
667
+ /**
668
+ * Access the Radar API to get radar info and manage radars.
669
+ *
670
+ * @category Radar API
671
+ */
672
+ radarApi: RadarApi;
673
+ }
674
+ /**
675
+ * Interface for accessing the Radar API from plugins.
676
+ *
677
+ * This provides typed, in-process programmatic access to the Radar API,
678
+ * similar to {@link history!WithHistoryApi | WithHistoryApi} for the History API.
679
+ *
680
+ * @category Radar API
681
+ *
682
+ * @example
683
+ * ```javascript
684
+ * // Check if Radar API is available
685
+ * if (app.getRadarApi) {
686
+ * const radarApi = await app.getRadarApi();
687
+ * const radars = await radarApi.getRadars();
688
+ * app.debug(`Found ${radars.length} radars`);
689
+ * }
690
+ * ```
691
+ */
692
+ export type WithRadarApi = {
693
+ /**
694
+ * Returns a promise for the active Radar API implementation, or rejects if unavailable.
695
+ * The property is optional to support older servers that do not have radar API support.
696
+ *
697
+ * @returns Promise that resolves to a {@link RadarApi} instance if available, or rejects with an error if not.
698
+ */
699
+ getRadarApi?: () => Promise<RadarApi>;
700
+ };
701
+ /**
702
+ * List of registered radar providers (for /_providers endpoint)
703
+ *
704
+ * @hidden visible through API
705
+ * @category Radar API
706
+ */
707
+ export interface RadarProviders {
708
+ [id: string]: {
709
+ name: string;
710
+ isDefault: boolean;
711
+ };
712
+ }
713
+ /**
714
+ * Type guard to validate a RadarProvider object.
715
+ *
716
+ * @category Radar API
717
+ */
718
+ export declare const isRadarProvider: (obj: unknown) => obj is RadarProvider;
719
+ //# sourceMappingURL=radarapi.d.ts.map