): [boolean, Reservation | undefined] {
const foundReservation = this.getReservationBy(
ReservationFilterKey.RESERVATION_ID,
- reservation.id!,
+ reservation.reservationId!,
);
return isUndefined(foundReservation) ? [false, undefined] : [true, foundReservation];
}
ReservationFilterKey.CONNECTOR_ID,
reservedOnConnectorZero ? 0 : transactionConnectorId,
)!;
- startTransactionPayload.reservationId = reservation.id;
+ startTransactionPayload.reservationId = reservation.reservationId;
await chargingStation.removeReservation(
reservation,
ReservationTerminationReason.TRANSACTION_STARTED,
WebSocketCloseEventStatusCode,
WebSocketCloseEventStatusString,
} from './WebSocket';
-export { ReservationFilterKey, ReservationTerminationReason } from './ocpp/1.6/Reservation';
-export { type Reservation } from './ocpp/Reservation';
+export {
+ type Reservation,
+ ReservationFilterKey,
+ ReservationTerminationReason,
+} from './ocpp/Reservation';
+++ /dev/null
-export interface OCPP16Reservation {
- id: number;
- connectorId: number;
- expiryDate: Date;
- idTag: string;
- parentIdTag?: string;
-}
-
-export enum ReservationTerminationReason {
- EXPIRED = 'Expired',
- TRANSACTION_STARTED = 'TransactionStarted',
- CONNECTOR_STATE_CHANGED = 'ConnectorStateChanged',
- RESERVATION_CANCELED = 'ReservationCanceled',
- REPLACE_EXISTING = 'ReplaceExisting',
-}
-
-export enum ReservationFilterKey {
- RESERVATION_ID = 'id',
- ID_TAG = 'idTag',
- PARENT_ID_TAG = 'parentIdTag',
- CONNECTOR_ID = 'connectorId',
- EVSE_ID = 'evseId',
-}
-import { type OCPP16Reservation } from './1.6/Reservation';
+import type { OCPP16ReserveNowRequest } from './1.6/Requests';
-export type Reservation = OCPP16Reservation;
+export type Reservation = OCPP16ReserveNowRequest;
+
+export enum ReservationTerminationReason {
+ EXPIRED = 'Expired',
+ TRANSACTION_STARTED = 'TransactionStarted',
+ CONNECTOR_STATE_CHANGED = 'ConnectorStateChanged',
+ RESERVATION_CANCELED = 'ReservationCanceled',
+ REPLACE_EXISTING = 'ReplaceExisting',
+}
+
+export enum ReservationFilterKey {
+ RESERVATION_ID = 'reservationId',
+ ID_TAG = 'idTag',
+ PARENT_ID_TAG = 'parentIdTag',
+ CONNECTOR_ID = 'connectorId',
+ EVSE_ID = 'evseId',
+}