@contrail/entity-types 1.5.4 → 1.5.5-alpha.1

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