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.

35 lines (34 loc) 2.38 kB
import type { FastifyInstance } from 'fastify'; import type { ILogObj } from 'tslog'; import { Logger } from 'tslog'; import type { IConfigurationModuleApi } from '../interface.js'; import { ConfigurationModule } from '../module.js'; import type { CallAction, IMessageConfirmation } from '@citrineos/base'; import { AbstractModuleApi, OCPP1_6 } from '@citrineos/base'; /** * Server API for the Configuration component. */ export declare class ConfigurationOcpp16Api 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>); triggerMessage(identifier: string[], request: OCPP1_6.TriggerMessageRequest, callbackUrl?: string, tenantId?: number): Promise<IMessageConfirmation[]>; changeConfiguration(identifier: string[], request: OCPP1_6.ChangeConfigurationRequest, callbackUrl?: string, tenantId?: number): Promise<IMessageConfirmation[]>; getConfiguration(identifier: string[], request: OCPP1_6.GetConfigurationRequest, callbackUrl?: string, tenantId?: number): Promise<IMessageConfirmation[]>; reset(identifier: string[], request: OCPP1_6.ResetRequest, callbackUrl?: string, tenantId?: number): Promise<IMessageConfirmation[]>; changeAvailability(identifier: string[], request: OCPP1_6.ChangeAvailabilityRequest, callbackUrl?: string, tenantId?: number): Promise<IMessageConfirmation[]>; updateFirmware(identifier: string[], request: OCPP1_6.UpdateFirmwareRequest, callbackUrl?: string, tenantId?: number): Promise<IMessageConfirmation[]>; dataTransfer(identifier: string[], request: OCPP1_6.DataTransferRequest, callbackUrl?: string, tenantId?: number): Promise<IMessageConfirmation[]>; /** * Overrides superclass method to generate the URL path based on the input {@link CallAction} and the module's endpoint prefix configuration. * * @param {CallAction} input - The input {@link CallAction}. * @return {string} - The generated URL path. */ protected _toMessagePath(input: CallAction): string; }