Files
adam-acs/app/protocol/cwmp-1-4.ts
T
Kevin L'Hereec f9e56c78b1 refactor: migrate all internal imports to package.json subpath aliases
- Add #domain, #protocol, #utils aliases to package.json imports map
- Replace all relative imports (./, ../, ../..) in app/ and
  database/mongo_migrations/ with the corresponding #alias imports,
  eliminating relative path traversal across the codebase
- Remove dead code: ConfigurationVersionModel.findByConfigurationIdentifier
  (unused, superseded by paginateVersions) and unused exception classes
  (NotFoundException, UnprocessableEntityException, DatabaseException)
  from app/exceptions/index.ts, keeping only BadRequestException
- Fix pre-existing syntax error in configuration_version.ts (mismatched
  parenthesis) that broke tsc
- Fix eqeqeq violation in configuration_service.ts and isNaN ->
  Number.isNaN in configuration_engine.ts / cwmp-1-0.ts / exchange_controller.ts
- Fix no-shadow violation in cwmp-1-0.ts EventStruct constructor
- Prettier formatting pass on touched files

Validated: tsc --noEmit clean, eslint app/ clean, full test suite green.
2026-07-22 11:45:14 +02:00

74 lines
2.3 KiB
TypeScript

// @ts-nocheck — fichier copié de cwmp-connector (papaye)
import { Cwmp_1_3 } from '#protocol/cwmp-1-3'
/**
* CWMP Version 1.4 Protocol Classes
*
* Extends CWMP 1.3 with:
* - New ACS Fault Code 8006 (handled at validation level, not needed here)
* - New Event Code: 13 WAKEUP
* - New SOAP Header elements: SupportedCWMPVersions, UseCWMPVersion
*/
export class Cwmp_1_4 extends Cwmp_1_3 {
public '@class' = '.Cwmp_1_4'
public 'SupportedCWMPVersions'?: SupportedCWMPVersions
public 'UseCWMPVersion'?: UseCWMPVersion
'constructor'(props: any = {}) {
super(props)
this.SupportedCWMPVersions = props.SupportedCWMPVersions
? new SupportedCWMPVersions(props.SupportedCWMPVersions)
: undefined
this.UseCWMPVersion = props.UseCWMPVersion
? new UseCWMPVersion(props.UseCWMPVersion)
: undefined
}
}
export enum EventCode_1_4 {
BOOTSTRAP = '0 BOOTSTRAP',
BOOT = '1 BOOT',
PERIODIC = '2 PERIODIC',
SCHEDULED = '3 SCHEDULED',
VALUE_CHANGE = '4 VALUE CHANGE',
KICKED = '5 KICKED',
CONNECTION_REQUEST = '6 CONNECTION REQUEST',
TRANSFER_COMPLETE = '7 TRANSFER COMPLETE',
DIAGNOSTICS_COMPLETE = '8 DIAGNOSTICS COMPLETE',
REQUEST_DOWNLOAD = '9 REQUEST DOWNLOAD',
AUTONOMOUS_TRANSFER_COMPLETE = '10 AUTONOMOUS TRANSFER COMPLETE',
DU_STATE_CHANGE_COMPLETE = '11 DU STATE CHANGE COMPLETE',
AUTONOMOUS_DU_STATE_CHANGE_COMPLETE = '12 AUTONOMOUS DU STATE CHANGE COMPLETE',
WAKEUP = '13 WAKEUP',
REBOOT = 'M Reboot',
SCHEDULE_INFORM = 'M ScheduleInform',
DOWNLOAD = 'M Download',
SCHEDULE_DOWNLOAD = 'M ScheduleDownload',
UPLOAD = 'M Upload',
CHANGE_DU_STATE = 'M ChangeDUState',
X_METHOD = 'M X_',
X_PATTERN = 'X [0-9A-F]{6} .*',
}
export class SupportedCWMPVersions {
public '@class' = '.SupportedCWMPVersions'
public 'MustUnderstand'?: string // should be 0 per spec, optional due to SOAP 1.1 quirks
public '_': string // space or comma separated list per implementation
'constructor'(props: any = {}) {
this.MustUnderstand = props.MustUnderstand ?? '0'
this._ = props._ || ''
}
}
export class UseCWMPVersion {
public '@class' = '.UseCWMPVersion'
public 'MustUnderstand': string = '1'
public '_': string
'constructor'(props: any = {}) {
this.MustUnderstand = props.MustUnderstand ?? '1'
this._ = props._ || ''
}
}