package cloud.nstart.terravault.ordinis.cuod;

import cloud.nstart.terravault.ordinis.domain.DataScope;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.List;

@JsonIgnoreProperties(ignoreUnknown = true)
public record BundleManifest(
    String bundle,
    String displayName,
    String description,
    String version,
    List<String> supportedLocales,
    String defaultLocale,
    List<DictionaryEntry> dictionaries) {

  @JsonIgnoreProperties(ignoreUnknown = true)
  public record DictionaryEntry(
      String name,
      String displayName,
      String description,
      DataScope scope,
      String schemaResource,
      String schemaVersion,
      List<String> supportedLocales,
      String defaultLocale,
      String recordsResource,
      /** Approval Workflow v2 (Phase 3 soak): per-dict opt-in maker-checker. */
      Boolean approvalRequired,
      /** Optional Keycloak role для reviewer'а (D1=A approval policy). */
      String approvalMinRole) {}
}
