@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.
27 lines • 1.13 kB
JavaScript
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache-2.0
import { z } from 'zod';
import { BaseSchema } from './types/base.dto.js';
import { CertificateUseEnumSchema, HashAlgorithmEnumSchema } from './types/enums.js';
export const InstalledCertificateSchema = BaseSchema.extend({
id: z.number().int().optional(),
ocppConnectionName: z.string().max(36),
hashAlgorithm: HashAlgorithmEnumSchema,
issuerNameHash: z.string().nullable().optional(),
issuerKeyHash: z.string().nullable().optional(),
serialNumber: z.string().nullable().optional(),
certificateType: CertificateUseEnumSchema,
});
export const InstalledCertificateProps = InstalledCertificateSchema.keyof().enum;
export const InstalledCertificateCreateSchema = InstalledCertificateSchema.omit({
id: true,
tenant: true,
updatedAt: true,
createdAt: true,
});
export const installedCertificateSchemas = {
InstalledCertificate: InstalledCertificateSchema,
InstalledCertificateCreate: InstalledCertificateCreateSchema,
};
//# sourceMappingURL=installed.certificate.dto.js.map