UNPKG

@citrineos/util

Version:

The OCPP util module which supplies helpful utilities like cache and queue connectors, etc.

24 lines (23 loc) 1.26 kB
import { OCPP2_0_1 } from '@citrineos/base'; import { IChargingProfileRepository, IDeviceModelRepository, ITransactionEventRepository } from '@citrineos/data'; import { ILogObj, Logger } from 'tslog'; /** * Validate a language tag is an RFC-5646 tag, see: {@link https://tools.ietf.org/html/rfc5646}, * example: US English is: "en-US" * * @param languageTag * @returns {boolean} true if the languageTag is an RFC-5646 tag */ export declare function validateLanguageTag(languageTag: string): boolean; /** * Validate constraints of ChargingProfileType defined in OCPP 2.0.1 * * @param chargingProfileType ChargingProfileType from the request * @param stationId station id * @param deviceModelRepository deviceModelRepository * @param chargingProfileRepository chargingProfileRepository * @param transactionEventRepository transactionEventRepository * @param logger logger * @param evseId evse id */ export declare function validateChargingProfileType(chargingProfileType: OCPP2_0_1.ChargingProfileType, stationId: string, deviceModelRepository: IDeviceModelRepository, chargingProfileRepository: IChargingProfileRepository, transactionEventRepository: ITransactionEventRepository, logger: Logger<ILogObj>, evseId?: number | null): Promise<void>;