Files
devicemanager/ts/index.ts

169 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-01-09 07:14:39 +00:00
/**
* @push.rocks/devicemanager
* A comprehensive device manager for discovering and communicating with network devices
* Supports: Scanners, Printers, SNMP devices, UPS, DLNA, Sonos, AirPlay, Chromecast
2026-01-09 07:14:39 +00:00
*/
2026-01-09 06:00:42 +00:00
// Main exports from DeviceManager
2026-01-09 07:14:39 +00:00
export {
DeviceManager,
MdnsDiscovery,
NetworkScanner,
SsdpDiscovery,
2026-01-09 07:14:39 +00:00
Scanner,
Printer,
SnmpDevice,
UpsDevice,
DlnaRenderer,
DlnaServer,
Speaker,
SonosSpeaker,
AirPlaySpeaker,
ChromecastSpeaker,
2026-01-09 07:14:39 +00:00
SERVICE_TYPES,
SSDP_SERVICE_TYPES,
2026-01-09 07:14:39 +00:00
} from './devicemanager.classes.devicemanager.js';
// Abstract/base classes
export { Device } from './abstract/device.abstract.js';
// Universal Device & Features (new architecture)
export { UniversalDevice } from './device/device.classes.device.js';
export {
Feature,
ScanFeature,
PrintFeature,
PlaybackFeature,
VolumeFeature,
PowerFeature,
SnmpFeature,
type TDeviceReference,
type IScanFeatureOptions,
type IPrintFeatureOptions,
type IPlaybackFeatureOptions,
type IVolumeFeatureOptions,
type IVolumeController,
type IPowerFeatureOptions,
type ISnmpFeatureOptions,
} from './features/index.js';
// Scanner protocol implementations
export { EsclProtocol } from './scanner/scanner.classes.esclprotocol.js';
export { SaneProtocol } from './scanner/scanner.classes.saneprotocol.js';
// Printer protocol
export { IppProtocol } from './printer/printer.classes.ippprotocol.js';
// SNMP protocol
export { SnmpProtocol, SNMP_OIDS } from './snmp/snmp.classes.snmpprotocol.js';
// UPS protocols
export { NutProtocol, NUT_COMMANDS, NUT_VARIABLES } from './ups/ups.classes.nutprotocol.js';
export { UpsSnmpHandler, UPS_SNMP_OIDS } from './ups/ups.classes.upssnmp.js';
// DLNA/UPnP protocol
export {
UpnpSoapClient,
UPNP_SERVICE_TYPES,
UPNP_DEVICE_TYPES,
} from './dlna/dlna.classes.upnp.js';
// Chromecast app IDs
export { CHROMECAST_APPS } from './speaker/speaker.classes.chromecast.js';
// AirPlay features
export { AIRPLAY_FEATURES } from './speaker/speaker.classes.airplay.js';
2026-01-09 07:14:39 +00:00
// Helpers
export { withRetry, createRetryable, defaultRetryOptions } from './helpers/helpers.retry.js';
export {
isValidIp,
ipToNumber,
numberToIp,
ipRangeToIps,
cidrToIps,
getLocalSubnet,
countIpsInCidr,
} from './helpers/helpers.iprange.js';
// All interfaces and types
export * from './interfaces/index.js';
// SNMP types
export type {
ISnmpOptions,
ISnmpVarbind,
TSnmpValueType,
} from './snmp/snmp.classes.snmpprotocol.js';
export type { ISnmpDeviceInfo } from './snmp/snmp.classes.snmpdevice.js';
// UPS types
export type {
TNutStatusFlag,
INutUpsInfo,
INutVariable,
} from './ups/ups.classes.nutprotocol.js';
export type {
TUpsBatteryStatus,
TUpsOutputSource,
IUpsSnmpStatus,
} from './ups/ups.classes.upssnmp.js';
export type {
TUpsStatus,
TUpsProtocol,
IUpsDeviceInfo,
IUpsBatteryInfo,
IUpsPowerInfo,
IUpsFullStatus,
} from './ups/ups.classes.upsdevice.js';
// DLNA types
export type {
TDlnaTransportState,
TDlnaTransportStatus,
IDlnaPositionInfo,
IDlnaTransportInfo,
IDlnaMediaInfo,
IDlnaContentItem,
IDlnaBrowseResult,
} from './dlna/dlna.classes.upnp.js';
export type {
IDlnaRendererInfo,
IDlnaPlaybackState,
} from './dlna/dlna.classes.renderer.js';
export type {
IDlnaServerInfo,
IDlnaServerStats,
} from './dlna/dlna.classes.server.js';
// SSDP types
export type {
ISsdpDevice,
ISsdpDeviceDescription,
ISsdpService,
ISsdpIcon,
} from './discovery/discovery.classes.ssdp.js';
// Speaker types
export type {
TSpeakerProtocol,
TPlaybackState,
ITrackInfo,
IPlaybackStatus,
ISpeakerInfo,
} from './speaker/speaker.classes.speaker.js';
export type {
ISonosZoneInfo,
ISonosSpeakerInfo,
} from './speaker/speaker.classes.sonos.js';
export type {
IAirPlaySpeakerInfo,
IAirPlayPlaybackInfo,
} from './speaker/speaker.classes.airplay.js';
export type {
TChromecastType,
IChromecastSpeakerInfo,
IChromecastMediaMetadata,
IChromecastMediaStatus,
} from './speaker/speaker.classes.chromecast.js';