UNPKG

@citrineos/data

Version:

The OCPP data module which includes all persistence layer implementation.

25 lines (24 loc) 2.22 kB
import { CrudRepository, OCPP2_0_1, SystemConfig } from '@citrineos/base'; import { SequelizeRepository } from './Base'; import { IChargingProfileRepository } from '../../../interfaces'; import { Evse } from '../model/DeviceModel'; import { Sequelize } from 'sequelize-typescript'; import { Logger, ILogObj } from 'tslog'; import { ChargingNeeds, ChargingProfile, ChargingSchedule, CompositeSchedule, SalesTariff } from '../model/ChargingProfile'; import { Transaction } from '../model/TransactionEvent'; export declare class SequelizeChargingProfileRepository extends SequelizeRepository<ChargingProfile> implements IChargingProfileRepository { chargingNeeds: CrudRepository<ChargingNeeds>; chargingSchedule: CrudRepository<ChargingSchedule>; salesTariff: CrudRepository<SalesTariff>; transaction: CrudRepository<Transaction>; evse: CrudRepository<Evse>; compositeSchedule: CrudRepository<CompositeSchedule>; constructor(config: SystemConfig, logger?: Logger<ILogObj>, sequelizeInstance?: Sequelize, chargingNeeds?: CrudRepository<ChargingNeeds>, chargingSchedule?: CrudRepository<ChargingSchedule>, salesTariff?: CrudRepository<SalesTariff>, transaction?: CrudRepository<Transaction>, evse?: CrudRepository<Evse>, compositeSchedule?: CrudRepository<CompositeSchedule>); createOrUpdateChargingProfile(chargingProfile: OCPP2_0_1.ChargingProfileType, stationId: string, evseId?: number | null, chargingLimitSource?: OCPP2_0_1.ChargingLimitSourceEnumType, isActive?: boolean): Promise<ChargingProfile>; createChargingNeeds(chargingNeedsReq: OCPP2_0_1.NotifyEVChargingNeedsRequest, stationId: string): Promise<ChargingNeeds>; findChargingNeedsByEvseDBIdAndTransactionDBId(evseDBId: number, transactionDataBaseId: number | null): Promise<ChargingNeeds | undefined>; createCompositeSchedule(compositeSchedule: OCPP2_0_1.CompositeScheduleType, stationId: string): Promise<CompositeSchedule>; getNextChargingScheduleId(stationId: string): Promise<number>; getNextChargingProfileId(stationId: string): Promise<number>; getNextStackLevel(stationId: string, transactionDatabaseId: number | null, profilePurpose: OCPP2_0_1.ChargingProfilePurposeEnumType): Promise<number>; }