import { z } from 'zod';
export function createAcpConfiguredBackendV1Schema(zod) {
    return zod.object({
        v: zod.literal(1),
        updatedAt: zod.number().finite(),
        backendId: zod.string().min(1),
        title: zod.string().min(1),
    }).passthrough();
}
export const AcpConfiguredBackendV1Schema = createAcpConfiguredBackendV1Schema(z);
export function buildAcpConfiguredBackendV1(params) {
    return {
        v: 1,
        updatedAt: params.updatedAt,
        backendId: params.backendId,
        title: params.title,
    };
}
export function readAcpConfiguredBackendV1FromMetadata(metadata) {
    if (!metadata || typeof metadata !== 'object' || Array.isArray(metadata))
        return null;
    const raw = metadata.acpConfiguredBackendV1;
    const parsed = AcpConfiguredBackendV1Schema.safeParse(raw);
    return parsed.success ? parsed.data : null;
}
//# sourceMappingURL=acpConfiguredBackendV1.js.map