@dcupl/common 2.0.0-beta.6 → 2.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -326,8 +326,19 @@ export type ValueMappingConfig = {
326
326
  };
327
327
  export type ModelAttribute = Property | Reference;
328
328
  export type ModelQualityConfig = {
329
+ /**
330
+ * Master switch for quality checks on this model. Default: true.
331
+ * Checks only run when error tracking is also enabled globally
332
+ * (two-tier enablement).
333
+ */
329
334
  enabled?: boolean;
330
- attributes?: AttributeQualityConfig;
335
+ /**
336
+ * Model-wide defaults for the attribute quality FLAGS
337
+ * (required / nullable / forceStrictDataType / validatorHandling),
338
+ * merged under each attribute's own `quality`.
339
+ * Concrete `validators` are per-attribute only and cannot be set here.
340
+ */
341
+ attributes?: Omit<AttributeQualityConfig, 'validators'>;
331
342
  };
332
343
  export type ValidatorErrorType = 'loose' | 'strict';
333
344
  export type ValidatorConfig = {
@@ -351,6 +362,18 @@ export type AttributeValidatorConfig = {
351
362
  unique?: ValidatorConfig;
352
363
  startsWith?: ValidatorConfig;
353
364
  };
365
+ /**
366
+ * Quality rules for a single property or reference.
367
+ *
368
+ * Defaults: required: true, nullable: false, forceStrictDataType: false,
369
+ * validatorHandling: 'loose'.
370
+ *
371
+ * validatorHandling decides what happens when a validator fails:
372
+ * 'loose' (default) reports an InvalidValidator error and keeps the value;
373
+ * 'strict' reports AND drops the value from the loaded data.
374
+ * forceStrictDataType: true disables type coercion — wrong-typed raw
375
+ * values are reported as WrongDataType and dropped.
376
+ */
354
377
  export type AttributeQualityConfig = {
355
378
  required?: boolean;
356
379
  nullable?: boolean;