feat(unifi): implement comprehensive UniFi API client with controllers, protect, access, account, managers, resources, HTTP client, interfaces, logging, plugins, and tests
This commit is contained in:
78
ts/interfaces/sitemanager.ts
Normal file
78
ts/interfaces/sitemanager.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* Site Manager (Cloud) API interfaces
|
||||
* Base URL: https://api.ui.com/v1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Site from Site Manager API
|
||||
*/
|
||||
export interface IUnifiSite {
|
||||
/** Unique site ID */
|
||||
siteId: string;
|
||||
/** Site name */
|
||||
name: string;
|
||||
/** Site description */
|
||||
description?: string;
|
||||
/** Whether this is the default site */
|
||||
isDefault?: boolean;
|
||||
/** Timezone for the site */
|
||||
timezone?: string;
|
||||
/** Site meta info */
|
||||
meta?: {
|
||||
/** Site type */
|
||||
type?: string;
|
||||
/** Site address */
|
||||
address?: string;
|
||||
};
|
||||
/** Creation timestamp */
|
||||
createdAt?: string;
|
||||
/** Last modified timestamp */
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Host device from Site Manager API
|
||||
*/
|
||||
export interface IUnifiHost {
|
||||
/** Unique host ID */
|
||||
id: string;
|
||||
/** Hardware UUID */
|
||||
hardwareId?: string;
|
||||
/** Host name */
|
||||
name?: string;
|
||||
/** Host type (e.g., 'udm-pro', 'cloud-key-gen2-plus') */
|
||||
type?: string;
|
||||
/** Firmware version */
|
||||
firmwareVersion?: string;
|
||||
/** Whether the host is online */
|
||||
isOnline?: boolean;
|
||||
/** IP address */
|
||||
ipAddress?: string;
|
||||
/** MAC address */
|
||||
macAddress?: string;
|
||||
/** Associated site ID */
|
||||
siteId?: string;
|
||||
/** Host status info */
|
||||
status?: {
|
||||
/** Connection state */
|
||||
state?: string;
|
||||
/** Last seen timestamp */
|
||||
lastSeen?: string;
|
||||
};
|
||||
/** Features/applications running */
|
||||
features?: string[];
|
||||
/** Reported state from host */
|
||||
reportedState?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Site Manager API list response
|
||||
*/
|
||||
export interface ISiteManagerListResponse<T> {
|
||||
data: T[];
|
||||
meta?: {
|
||||
total?: number;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user