@citrineos/data
Version:
The OCPP data module which includes all persistence layer implementation.
24 lines • 862 B
JavaScript
;
// Copyright (c) 2023 S44, LLC
// Copyright Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache 2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.BootMapper = void 0;
const base_1 = require("@citrineos/base");
class BootMapper {
static toRegistrationStatusEnumType(status) {
switch (status) {
case 'Accepted':
return base_1.OCPP1_6.BootNotificationResponseStatus.Accepted;
case 'Pending':
return base_1.OCPP1_6.BootNotificationResponseStatus.Pending;
case 'Rejected':
return base_1.OCPP1_6.BootNotificationResponseStatus.Rejected;
default:
throw new Error(`Invalid status: ${status}`);
}
}
}
exports.BootMapper = BootMapper;
//# sourceMappingURL=BootMapper.js.map