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.

36 lines 1.5 kB
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project // // SPDX-License-Identifier: Apache-2.0 import { z } from 'zod'; import { ServerNetworkProfileSchema } from './server.network.profile.dto.js'; import { BaseSchema } from './types/base.dto.js'; import { OCPPInterfaceEnumSchema, OCPPTransportEnumSchema, OCPPVersionEnumSchema, } from './types/enums.js'; export const SetNetworkProfileSchema = BaseSchema.extend({ id: z.number().int().optional(), ocppConnectionName: z.string(), correlationId: z.string(), websocketServerConfigId: z.string().optional(), websocketServerConfig: ServerNetworkProfileSchema.optional(), configurationSlot: z.number().int(), ocppVersion: OCPPVersionEnumSchema, ocppTransport: OCPPTransportEnumSchema, ocppCsmsUrl: z.string(), messageTimeout: z.number().int(), securityProfile: z.number().int(), ocppInterface: OCPPInterfaceEnumSchema, apn: z.string().optional(), // Stringified JSON vpn: z.string().optional(), // Stringified JSON }); export const SetNetworkProfileProps = SetNetworkProfileSchema.keyof().enum; export const SetNetworkProfileCreateSchema = SetNetworkProfileSchema.omit({ id: true, tenant: true, websocketServerConfig: true, updatedAt: true, createdAt: true, }); export const setNetworkProfileSchemas = { SetNetworkProfile: SetNetworkProfileSchema, SetNetworkProfileCreate: SetNetworkProfileCreateSchema, }; //# sourceMappingURL=set.network.profile.dto.js.map