@contrail/entity-types 1.5.3 → 1.5.5-alpha.0

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.
package/lib/loader.d.ts CHANGED
@@ -187,3 +187,39 @@ export declare enum EntityType {
187
187
  PROJECT_ITEM = "project-item",
188
188
  ASSORTMENT = "assortment-item"
189
189
  }
190
+ export declare enum PreValidationCategory {
191
+ OPTION_SET = "OPTION_SET",
192
+ FORMAT_BOOLEAN = "FORMAT_BOOLEAN",
193
+ FORMAT_MULTI_SELECT = "FORMAT_MULTI_SELECT"
194
+ }
195
+ export declare enum PreValidationSeverity {
196
+ ERROR = "error",
197
+ WARNING = "warning",
198
+ INFO = "info"
199
+ }
200
+ export interface SuggestedFix {
201
+ type: 'add-option-set-values' | 'replace-values' | 'change-separator';
202
+ details: Record<string, any>;
203
+ }
204
+ export interface PreValidationIssue {
205
+ severity: PreValidationSeverity;
206
+ category: PreValidationCategory;
207
+ columnName: string;
208
+ propertySlug: string;
209
+ propertyType: string;
210
+ message: string;
211
+ affectedRows: number[];
212
+ affectedValues: string[];
213
+ suggestedFix?: SuggestedFix;
214
+ }
215
+ export interface PreValidationSummary {
216
+ errorCount: number;
217
+ warningCount: number;
218
+ infoCount: number;
219
+ countsByCategory: Partial<Record<PreValidationCategory, number>>;
220
+ }
221
+ export interface PreValidationResult {
222
+ valid: boolean;
223
+ issues: PreValidationIssue[];
224
+ summary: PreValidationSummary;
225
+ }
package/lib/loader.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EntityType = exports.LoaderFailureArea = exports.IssueType = exports.LoaderProcess = exports.LoadType = exports.LoadStatus = exports.ValueToAssortment = exports.AssortmentSplit = exports.ConditionalValues = exports.ColumnDefinition = void 0;
3
+ exports.PreValidationSeverity = exports.PreValidationCategory = exports.EntityType = exports.LoaderFailureArea = exports.IssueType = exports.LoaderProcess = exports.LoadType = exports.LoadStatus = exports.ValueToAssortment = exports.AssortmentSplit = exports.ConditionalValues = exports.ColumnDefinition = void 0;
4
4
  class ColumnDefinition {
5
5
  fromProperty;
6
6
  toProperty;
@@ -113,3 +113,15 @@ var EntityType;
113
113
  EntityType["PROJECT_ITEM"] = "project-item";
114
114
  EntityType["ASSORTMENT"] = "assortment-item";
115
115
  })(EntityType = exports.EntityType || (exports.EntityType = {}));
116
+ var PreValidationCategory;
117
+ (function (PreValidationCategory) {
118
+ PreValidationCategory["OPTION_SET"] = "OPTION_SET";
119
+ PreValidationCategory["FORMAT_BOOLEAN"] = "FORMAT_BOOLEAN";
120
+ PreValidationCategory["FORMAT_MULTI_SELECT"] = "FORMAT_MULTI_SELECT";
121
+ })(PreValidationCategory = exports.PreValidationCategory || (exports.PreValidationCategory = {}));
122
+ var PreValidationSeverity;
123
+ (function (PreValidationSeverity) {
124
+ PreValidationSeverity["ERROR"] = "error";
125
+ PreValidationSeverity["WARNING"] = "warning";
126
+ PreValidationSeverity["INFO"] = "info";
127
+ })(PreValidationSeverity = exports.PreValidationSeverity || (exports.PreValidationSeverity = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/entity-types",
3
- "version": "1.5.3",
3
+ "version": "1.5.5-alpha.0",
4
4
  "description": "A types library for Vibeiq entities.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",