@contrail/entity-types 1.5.1 → 1.5.3-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.
@@ -0,0 +1,48 @@
1
+ import { OrgManagedEntity } from './org-managed-entity';
2
+ export interface AssortmentPublishChangeDetail extends OrgManagedEntity {
3
+ id: string;
4
+ createdOn?: Date;
5
+ updatedOn?: Date;
6
+ createdById?: string;
7
+ updatedById?: string;
8
+ createdBy?: any;
9
+ updatedBy?: any;
10
+ orgId?: string;
11
+ assortmentId?: string;
12
+ adds?: any[];
13
+ updates?: any[];
14
+ deletes?: any[];
15
+ familyItemsRemoved?: any[];
16
+ addsDownloadURL?: string;
17
+ updatesDownloadURL?: string;
18
+ deletesDownloadURL?: string;
19
+ familyItemsRemovedDownloadURL?: string;
20
+ unchanged?: any[];
21
+ errors?: any[];
22
+ versionComments?: string;
23
+ versionName?: string;
24
+ }
25
+ export interface AssortmentPublishChange extends OrgManagedEntity {
26
+ id: string;
27
+ createdOn?: Date;
28
+ updatedOn?: Date;
29
+ createdById?: string;
30
+ updatedById?: string;
31
+ createdBy?: any;
32
+ updatedBy?: any;
33
+ orgId?: string;
34
+ assortmentId?: string;
35
+ adds?: number;
36
+ updates?: number;
37
+ deletes?: number;
38
+ unchanged?: number;
39
+ errors?: number;
40
+ detailDownloadLink?: string;
41
+ detail?: AssortmentPublishChangeDetail;
42
+ assortmentBaselineDownloadLink?: string;
43
+ deleteDataDownloadLink?: string;
44
+ hydratedDetailDownloadLink?: string;
45
+ versionComments?: string;
46
+ versionName?: string;
47
+ summary?: any;
48
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/lib/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './app-version';
10
10
  export * from './asset';
11
11
  export * from './assortment';
12
12
  export * from './assortment-item';
13
+ export * from './assortment-publish-change';
13
14
  export * from './assortment-summary';
14
15
  export * from './base-managed-entity';
15
16
  export * from './batch-fetch-response';
package/lib/index.js CHANGED
@@ -26,6 +26,7 @@ __exportStar(require("./app-version"), exports);
26
26
  __exportStar(require("./asset"), exports);
27
27
  __exportStar(require("./assortment"), exports);
28
28
  __exportStar(require("./assortment-item"), exports);
29
+ __exportStar(require("./assortment-publish-change"), exports);
29
30
  __exportStar(require("./assortment-summary"), exports);
30
31
  __exportStar(require("./base-managed-entity"), exports);
31
32
  __exportStar(require("./batch-fetch-response"), exports);
package/lib/loader.d.ts CHANGED
@@ -28,6 +28,7 @@ export interface LoaderConfiguration extends OrgManagedEntity {
28
28
  assortmentSplit?: AssortmentSplit;
29
29
  workspaceIdentifier?: string;
30
30
  propertiesToRemove?: string[];
31
+ skipStaleUpdatesUsing?: string;
31
32
  }
32
33
  export declare enum LoadStatus {
33
34
  ACTIVE = "ACTIVE",
@@ -62,6 +63,11 @@ export interface RowLoadError {
62
63
  data: any;
63
64
  error: any;
64
65
  }
66
+ export interface SkippedStaleRow {
67
+ federatedId: string;
68
+ incomingTimestamp: string;
69
+ existingTimestamp: string;
70
+ }
65
71
  export interface LoaderNumbersSummary {
66
72
  numberFamiliesLoaded: number;
67
73
  numberOptionsLoaded: number;
@@ -99,6 +105,7 @@ export interface EntityLoadResult {
99
105
  failedUpdate: RowLoadError[];
100
106
  failedDelete: RowLoadError[];
101
107
  failed: boolean;
108
+ skippedStale?: SkippedStaleRow[];
102
109
  }
103
110
  export interface PreprocessingStepStoredResultSummary {
104
111
  preprocessingStepName: string;
@@ -180,3 +187,39 @@ export declare enum EntityType {
180
187
  PROJECT_ITEM = "project-item",
181
188
  ASSORTMENT = "assortment-item"
182
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.1",
3
+ "version": "1.5.3-alpha.0",
4
4
  "description": "A types library for Vibeiq entities.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",