UNPKG

@citrineos/base

Version:

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

39 lines 977 B
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project // // SPDX-License-Identifier: Apache-2.0 /** * Result of authorization process */ export class ApiAuthorizationResult { /** * Whether authorization was successful */ isAuthorized = false; /** * Error message if authorization failed */ error; /** * Creates a new successful authorization result * * @returns Authorization result */ static success() { const result = new ApiAuthorizationResult(); result.isAuthorized = true; return result; } /** * Creates a new failed authorization result * * @param error Error message * @returns Authorization result */ static failure(error) { const result = new ApiAuthorizationResult(); result.isAuthorized = false; result.error = error; return result; } } //# sourceMappingURL=ApiAuthorizationResult.js.map