@dcupl/common 2.0.0-beta.14 → 2.0.0-beta.16

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.
@@ -101,11 +101,13 @@ export type DcuplInitQualityConfig = {
101
101
  /**
102
102
  * Maximum number of stored error objects per (model, property, errorType)
103
103
  * group. Quality errors are still counted exactly beyond this limit and are
104
- * reachable via `getErrorCounts()`; only the retained error objects (and the
105
- * `$DcuplErrorTrackingErrors` model) are bounded. Default: 1000.
104
+ * reachable via `dcupl.quality.errors.summary()` or the
105
+ * `$DcuplErrorTrackingSummary` model; only the retained error objects (and
106
+ * the `$DcuplErrorTrackingErrors` model) are bounded. Retained records of a
107
+ * capped group carry `truncated: true` and `groupTotal`. Default: 1000.
106
108
  *
107
109
  * Note: for error groups whose true count exceeds `maxErrorsPerGroup`,
108
- * partial-update cleanup may cause `getErrorCounts()` to slightly
110
+ * partial-update cleanup may cause the totals to slightly
109
111
  * over-report, since over-cap occurrences are counted but never stored as
110
112
  * error objects and therefore cannot be decremented on removal.
111
113
  */
@@ -68,6 +68,34 @@ export declare namespace QualityAnalyzer {
68
68
  type: DcuplErrorType;
69
69
  description?: string;
70
70
  meta?: any;
71
+ /**
72
+ * Exact number of occurrences in this error's (model, attribute, errorType)
73
+ * group, stamped when the error set is published (#204). Can exceed the
74
+ * number of stored records when the group hit `maxErrorsPerGroup`.
75
+ */
76
+ groupTotal?: number;
77
+ /** True when this error's group holds fewer stored records than `groupTotal`. */
78
+ truncated?: boolean;
79
+ };
80
+ /**
81
+ * Per-group error totals, independent of the `maxErrorsPerGroup` record cap
82
+ * (#204). Available via `dcupl.quality.errors.summary()` and as the
83
+ * `$DcuplErrorTrackingSummary` model.
84
+ */
85
+ type ErrorGroupSummary = {
86
+ /** `model::attribute::errorType` */
87
+ key: string;
88
+ model?: string;
89
+ attribute?: string;
90
+ errorGroup: string;
91
+ errorType: string;
92
+ type: DcuplErrorType;
93
+ /** Exact occurrence count. */
94
+ totalCount: number;
95
+ /** Records retained in `$DcuplErrorTrackingErrors` (≤ maxErrorsPerGroup). */
96
+ storedCount: number;
97
+ /** `totalCount > storedCount` */
98
+ truncated: boolean;
71
99
  };
72
100
  type InternalModelError = DcuplErrorBase & {
73
101
  type: 'model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcupl/common",
3
- "version": "2.0.0-beta.14",
3
+ "version": "2.0.0-beta.16",
4
4
  "description": "Dcupl Common Code",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.cjs",