import _Ajv, { type ValidateFunction } from 'ajv'
import _ajvFormats from 'ajv-formats'
-import { OCPPServiceUtils } from './OCPPServiceUtils.js'
import type { ChargingStation } from '../../charging-station/index.js'
import { OCPPError } from '../../exception/index.js'
import type {
RequestCommand
} from '../../types/index.js'
import { Constants, logger } from '../../utils/index.js'
+import { ajvErrorsToErrorType } from './OCPPServiceUtils.js'
type Ajv = _Ajv.default
// eslint-disable-next-line @typescript-eslint/no-redeclare
const Ajv = _Ajv.default
validate?.errors
)
throw new OCPPError(
- OCPPServiceUtils.ajvErrorsToErrorType(validate?.errors),
+ ajvErrorsToErrorType(validate?.errors),
'Response PDU is invalid',
commandName,
JSON.stringify(validate?.errors, undefined, 2)