Files
adam-acs/app/domain/configuration/configuration.ts
T
Kevin L'HereecandCopilot d1c65dbf1e chore: initial commit — AdonisJS v7 TR-069 ACS
- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim)
- AdonisJS v7 app with Inertia.js + Vue 3
- MongoDB integration
- CWMP/TR-069 state machine engine
- Configuration engine with compliance tracking
- Branding: ADAM ACS (favicon, navbar, locales)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 16:46:37 +02:00

59 lines
1.8 KiB
TypeScript

export enum PolicyType {
ONCE = 'once',
MAINTAIN = 'maintain',
}
export interface ParameterCriteria {
name: string // TR-069 path, e.g. "InternetGatewayDevice.Time.Enable"
value: string | number | boolean // expected value (compared as string)
}
export interface ConfigurationCriteria {
manufacturer?: string // exact or glob pattern
oui?: string // exact or glob pattern
productClass?: string // exact or glob pattern
serialNumber?: string // exact or glob pattern
parameterCriteria?: ParameterCriteria[] // match on known device parameter values
}
export interface InventoryPath {
path: string // TR-069 path, e.g. "InternetGatewayDevice.DeviceInfo." or full param name
}
export interface DesiredParameter {
name: string // Full TR-069 path
value: string | number | boolean // Target value
type: ParameterValueType // 'string' | 'int' | 'unsignedInt' | 'boolean' | 'dateTime'
}
export type ParameterValueType = 'string' | 'int' | 'unsignedInt' | 'boolean' | 'dateTime'
export interface ScheduleWindow {
daysOfWeek: number[] // 0=Sunday, 1=Monday, ..., 6=Saturday (at least one required)
startHour: number // 0-23
endHour: number // 0-23, must differ from startHour; if endHour < startHour, spans midnight
timezone: string // IANA timezone, e.g. "Europe/Paris"
}
export interface FirmwareTarget {
productClass: string
targetVersion: string
}
export interface Configuration {
identifier: string
name: string
version: string // semver, e.g. "1.0.0"
priority: number // positive integer, higher wins
policy: PolicyType
enabled: boolean
tags: string[]
criteria: ConfigurationCriteria
inventory: InventoryPath[]
desiredParameters: DesiredParameter[]
firmwareTarget?: FirmwareTarget
schedule?: ScheduleWindow
createdAt: Date
updatedAt: Date
}