namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;

// Schema-library authoring commands. The reusable named JSON-Schema
// library (the SharedSchema entity + ISharedSchemaRepository) gains its CRUD
// surface here. These records travel the same HTTP management
// boundary as every other *Command and are auto-discovered by reflection in
// ManagementCommandRegistry (no manual registry entry needed).
//
// Gating mirrors the SharedScript / DataConnection idiom: list/get are read-only
// (any authenticated user), create/update/delete are Designer-gated. Name is unique;
// SchemaJson must parse as a JSON Schema (validated server-side in the handler).

public record ListSharedSchemasCommand;
public record GetSharedSchemaCommand(int SharedSchemaId);
public record CreateSharedSchemaCommand(string Name, string? Scope, string SchemaJson);
public record UpdateSharedSchemaCommand(int SharedSchemaId, string Name, string? Scope, string SchemaJson);
public record DeleteSharedSchemaCommand(int SharedSchemaId);
