UNPKG

@citrineos/data

Version:

The OCPP data module which includes all persistence layer implementation.

21 lines (20 loc) 1.25 kB
import type { BootConfig, BootstrapConfig } from '@citrineos/base'; import { CrudRepository, OCPP2_0_1 } from '@citrineos/base'; import type { IBootRepository } from '../../../interfaces/index.js'; import { Boot } from '../model/Boot.js'; import { VariableAttribute } from '../model/index.js'; import { SequelizeRepository } from '../index.js'; import type { ILogObj } from 'tslog'; import { Logger } from 'tslog'; import { Sequelize } from 'sequelize-typescript'; export declare class SequelizeBootRepository extends SequelizeRepository<Boot> implements IBootRepository { variableAttributes: CrudRepository<VariableAttribute>; constructor(config: BootstrapConfig, logger?: Logger<ILogObj>, sequelizeInstance?: Sequelize, variableAttributes?: CrudRepository<VariableAttribute>); createOrUpdateByKey(tenantId: number, value: BootConfig, key: string): Promise<Boot | undefined>; updateStatusByKey(tenantId: number, status: OCPP2_0_1.RegistrationStatusEnumType, statusInfo: OCPP2_0_1.StatusInfoType | undefined, key: string): Promise<Boot | undefined>; updateLastBootTimeByKey(tenantId: number, lastBootTime: string, key: string): Promise<Boot | undefined>; /** * Private Methods */ private manageSetVariables; }