UNPKG

@citrineos/configuration

Version:

The configuration module for OCPP v2.0.1. This module is not intended to be used directly, but rather as a dependency for other modules.

53 lines (52 loc) 2.7 kB
import type { FastifyInstance, FastifyRequest } from 'fastify'; import type { ILogObj } from 'tslog'; import { Logger } from 'tslog'; import type { IConfigurationModuleApi } from './interface.js'; import { ConfigurationModule } from './module.js'; import type { BootConfig, IMessageConfirmation, UpdateChargingStationPasswordRequest } from '@citrineos/base'; import { AbstractModuleApi, Namespace, OCPP1_6_Namespace, OCPP2_0_1, OCPP2_0_1_Namespace } from '@citrineos/base'; import type { ChargingStationKeyQuerystring, NetworkProfileDeleteQuerystring, NetworkProfileQuerystring, UpdateChargingStationPasswordQueryString } from '@citrineos/data'; import { Boot, ChargingStationNetworkProfile } from '@citrineos/data'; /** * Server API for the Configuration component. */ export declare class ConfigurationDataApi extends AbstractModuleApi<ConfigurationModule> implements IConfigurationModuleApi { /** * Constructor for the class. * * @param {ConfigurationModule} ConfigurationComponent - The Configuration component. * @param {FastifyInstance} server - The server instance. * @param {Logger<ILogObj>} [logger] - Optional logger instance. */ constructor(ConfigurationComponent: ConfigurationModule, server: FastifyInstance, logger?: Logger<ILogObj>); putBootConfig(request: FastifyRequest<{ Body: OCPP2_0_1.BootNotificationResponse; Querystring: ChargingStationKeyQuerystring; }>): Promise<BootConfig | undefined>; getBootConfig(request: FastifyRequest<{ Querystring: ChargingStationKeyQuerystring; }>): Promise<Boot | undefined>; deleteBootConfig(request: FastifyRequest<{ Querystring: ChargingStationKeyQuerystring; }>): Promise<Boot | undefined>; updatePassword(request: FastifyRequest<{ Body: UpdateChargingStationPasswordRequest; Querystring: UpdateChargingStationPasswordQueryString; }>): Promise<IMessageConfirmation>; getNetworkProfiles(request: FastifyRequest<{ Querystring: NetworkProfileQuerystring; }>): Promise<ChargingStationNetworkProfile[]>; deleteNetworkProfiles(request: FastifyRequest<{ Querystring: NetworkProfileDeleteQuerystring; }>): Promise<IMessageConfirmation>; /** * Overrides superclass method to generate the URL path based on the input {@link Namespace} * and the module's endpoint prefix configuration. * * @param {Namespace} input - The input {@link Namespace}. * @return {string} - The generated URL path. */ protected _toDataPath(input: OCPP2_0_1_Namespace | OCPP1_6_Namespace | Namespace): string; private updatePasswordOnStation; private updatePasswordForStation; }