@contrail/entity-types 1.1.47 → 1.1.48-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/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/loader.d.ts +149 -0
- package/lib/loader.js +84 -0
- package/lib/log-level.d.ts +8 -0
- package/lib/log-level.js +12 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./content"), exports);
|
|
|
28
28
|
__exportStar(require("./contentholder-content"), exports);
|
|
29
29
|
__exportStar(require("./file"), exports);
|
|
30
30
|
__exportStar(require("./item"), exports);
|
|
31
|
+
__exportStar(require("./loader"), exports);
|
|
31
32
|
__exportStar(require("./org"), exports);
|
|
32
33
|
__exportStar(require("./project-item"), exports);
|
|
33
34
|
__exportStar(require("./project"), exports);
|
package/lib/loader.d.ts
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { LogLevel } from "./log-level";
|
|
2
|
+
import { OrgManagedEntity } from "./org-managed-entity";
|
|
3
|
+
export declare class ColumnDefinition {
|
|
4
|
+
fromProperty?: string;
|
|
5
|
+
toProperty: string;
|
|
6
|
+
conditions?: ConditionalValues[];
|
|
7
|
+
default?: any;
|
|
8
|
+
}
|
|
9
|
+
export declare class ConditionalValues {
|
|
10
|
+
conditional: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class AssortmentSplit {
|
|
14
|
+
partialAssortmentUpdate?: boolean;
|
|
15
|
+
dropField?: string;
|
|
16
|
+
fieldToSplitOn: string;
|
|
17
|
+
values: ValueToAssortment[];
|
|
18
|
+
}
|
|
19
|
+
export declare class ValueToAssortment {
|
|
20
|
+
value: string;
|
|
21
|
+
assortmentId?: string;
|
|
22
|
+
assortmentIdentifier?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LoaderConfiguration extends OrgManagedEntity {
|
|
25
|
+
name?: string;
|
|
26
|
+
federatedMappings?: any;
|
|
27
|
+
conditionalColumns?: ColumnDefinition[];
|
|
28
|
+
assortmentSplit?: AssortmentSplit;
|
|
29
|
+
workspaceIdentifier?: string;
|
|
30
|
+
propertiesToRemove?: string[];
|
|
31
|
+
}
|
|
32
|
+
export declare enum LoadStatus {
|
|
33
|
+
ACTIVE = "ACTIVE",
|
|
34
|
+
PENDING = "PENDING",
|
|
35
|
+
FAILED = "FAILED",
|
|
36
|
+
COMPLETE = "COMPLETE"
|
|
37
|
+
}
|
|
38
|
+
export declare enum LoadType {
|
|
39
|
+
ITEM = "ITEM",
|
|
40
|
+
PROJECT_ITEM = "PROJECT_ITEM",
|
|
41
|
+
ASSORTMENT = "ASSORTMENT",
|
|
42
|
+
COLOR = "COLOR",
|
|
43
|
+
CUSTOM_ENTITY = "CUSTOM_ENTITY",
|
|
44
|
+
SIZE_RANGE_TEMPLATE = "SIZE_RANGE_TEMPLATE"
|
|
45
|
+
}
|
|
46
|
+
export interface LoadResult {
|
|
47
|
+
colorsLoadResult?: ColorLoadResult;
|
|
48
|
+
itemsLoadResult?: ItemsLoadResult;
|
|
49
|
+
projectItemsLoadResult?: ProjectItemsLoadResult;
|
|
50
|
+
assortmentItemsLoadResult?: AssortmentItemsLoadResult;
|
|
51
|
+
transformErrors: any[];
|
|
52
|
+
}
|
|
53
|
+
export interface rowLoadError {
|
|
54
|
+
data: any;
|
|
55
|
+
error: any;
|
|
56
|
+
}
|
|
57
|
+
export interface LoaderNumbersSummary {
|
|
58
|
+
numberFamiliesLoaded: number;
|
|
59
|
+
numberOptionsLoaded: number;
|
|
60
|
+
numberProjectItemsLoaded: number;
|
|
61
|
+
numberAssortmentItemsLoaded: number;
|
|
62
|
+
numberColorsLoaded: number;
|
|
63
|
+
numberImagesLoaded: number;
|
|
64
|
+
numberFamiliesFailed: number;
|
|
65
|
+
numberOptionsFailed: number;
|
|
66
|
+
numberProjectItemsFailed: number;
|
|
67
|
+
numberAssortmentItemsFailed: number;
|
|
68
|
+
numberColorsFailed: number;
|
|
69
|
+
numberImagesFailed: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ColorLoadResult {
|
|
72
|
+
colorsCreated: any[];
|
|
73
|
+
colorsUpdated: any[];
|
|
74
|
+
colorsUnchanged: any[];
|
|
75
|
+
colorsFailedCreate: rowLoadError[];
|
|
76
|
+
colorsFailedUpdate: rowLoadError[];
|
|
77
|
+
failed: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface ItemsLoadResult {
|
|
80
|
+
itemsCreated: any[];
|
|
81
|
+
itemsUpdated: any[];
|
|
82
|
+
itemsUnchanged: any[];
|
|
83
|
+
itemsFailedCreate: rowLoadError[];
|
|
84
|
+
itemsFailedUpdate: rowLoadError[];
|
|
85
|
+
failed: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface ProjectItemsLoadResult {
|
|
88
|
+
projectItemsCreated: any[];
|
|
89
|
+
projectItemsUpdated: any[];
|
|
90
|
+
projectItemsUnchanged: any[];
|
|
91
|
+
projectItemsFailedCreate: rowLoadError[];
|
|
92
|
+
projectItemsFailedUpdate: rowLoadError[];
|
|
93
|
+
failed: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface AssortmentItemsLoadResult {
|
|
96
|
+
assortmentItemsCreated: any[];
|
|
97
|
+
assortmentItemsUpdated: any[];
|
|
98
|
+
assortmentItemsUnchanged: any[];
|
|
99
|
+
assortmentItemsDeleted: any[];
|
|
100
|
+
assortmentItemsFailedCreate: rowLoadError[];
|
|
101
|
+
assortmentItemsFailedUpdate: rowLoadError[];
|
|
102
|
+
assortmentItemsFailedDelete: rowLoadError[];
|
|
103
|
+
failed: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface PreprocessingStepStoredResultSummary {
|
|
106
|
+
preprocessingStepName: string;
|
|
107
|
+
fileId: string;
|
|
108
|
+
numberOfWarnings: number;
|
|
109
|
+
numberOfErrors: number;
|
|
110
|
+
}
|
|
111
|
+
export declare class LoaderProcess implements OrgManagedEntity {
|
|
112
|
+
id: string;
|
|
113
|
+
createdOn?: Date;
|
|
114
|
+
updatedOn?: Date;
|
|
115
|
+
createdById?: string;
|
|
116
|
+
updatedById?: string;
|
|
117
|
+
createdBy?: any;
|
|
118
|
+
updatedBy?: any;
|
|
119
|
+
orgId?: string;
|
|
120
|
+
loaderConfigurationId?: string;
|
|
121
|
+
name?: string;
|
|
122
|
+
endedOn?: Date;
|
|
123
|
+
status: LoadStatus;
|
|
124
|
+
logLevel?: LogLevel;
|
|
125
|
+
processLogs?: string;
|
|
126
|
+
processLogS3File?: string;
|
|
127
|
+
processLogS3FileDownloadLink?: string;
|
|
128
|
+
logsFileId?: string;
|
|
129
|
+
logFileDownloadLink?: string;
|
|
130
|
+
loadProcessResult?: LoadResult;
|
|
131
|
+
loadProcessResultFileId?: string;
|
|
132
|
+
loadProcessResultDownloadLink?: string;
|
|
133
|
+
preprocessingStepResults?: PreprocessingStepStoredResultSummary[];
|
|
134
|
+
processDurationSeconds?: number;
|
|
135
|
+
loadFileId: string;
|
|
136
|
+
loadType: LoadType[];
|
|
137
|
+
federatedMappings?: any;
|
|
138
|
+
conditionalColumns?: ColumnDefinition[];
|
|
139
|
+
assortmentSplit?: AssortmentSplit;
|
|
140
|
+
partialAssortmentUpdate?: boolean;
|
|
141
|
+
assortmentItemDropField?: string;
|
|
142
|
+
workspaceIdentifier?: string;
|
|
143
|
+
propertiesToRemove?: string[];
|
|
144
|
+
badRowsCount?: number;
|
|
145
|
+
uploadErrorCount?: number;
|
|
146
|
+
hasErrors?: boolean;
|
|
147
|
+
parallelWorkerCount?: number;
|
|
148
|
+
messageGroupId?: string;
|
|
149
|
+
}
|
package/lib/loader.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoaderProcess = exports.LoadType = exports.LoadStatus = exports.ValueToAssortment = exports.AssortmentSplit = exports.ConditionalValues = exports.ColumnDefinition = void 0;
|
|
4
|
+
class ColumnDefinition {
|
|
5
|
+
fromProperty;
|
|
6
|
+
toProperty;
|
|
7
|
+
conditions;
|
|
8
|
+
default;
|
|
9
|
+
}
|
|
10
|
+
exports.ColumnDefinition = ColumnDefinition;
|
|
11
|
+
class ConditionalValues {
|
|
12
|
+
conditional;
|
|
13
|
+
value;
|
|
14
|
+
}
|
|
15
|
+
exports.ConditionalValues = ConditionalValues;
|
|
16
|
+
class AssortmentSplit {
|
|
17
|
+
partialAssortmentUpdate;
|
|
18
|
+
dropField;
|
|
19
|
+
fieldToSplitOn;
|
|
20
|
+
values;
|
|
21
|
+
}
|
|
22
|
+
exports.AssortmentSplit = AssortmentSplit;
|
|
23
|
+
class ValueToAssortment {
|
|
24
|
+
value;
|
|
25
|
+
assortmentId;
|
|
26
|
+
assortmentIdentifier;
|
|
27
|
+
}
|
|
28
|
+
exports.ValueToAssortment = ValueToAssortment;
|
|
29
|
+
var LoadStatus;
|
|
30
|
+
(function (LoadStatus) {
|
|
31
|
+
LoadStatus["ACTIVE"] = "ACTIVE";
|
|
32
|
+
LoadStatus["PENDING"] = "PENDING";
|
|
33
|
+
LoadStatus["FAILED"] = "FAILED";
|
|
34
|
+
LoadStatus["COMPLETE"] = "COMPLETE";
|
|
35
|
+
})(LoadStatus = exports.LoadStatus || (exports.LoadStatus = {}));
|
|
36
|
+
var LoadType;
|
|
37
|
+
(function (LoadType) {
|
|
38
|
+
LoadType["ITEM"] = "ITEM";
|
|
39
|
+
LoadType["PROJECT_ITEM"] = "PROJECT_ITEM";
|
|
40
|
+
LoadType["ASSORTMENT"] = "ASSORTMENT";
|
|
41
|
+
LoadType["COLOR"] = "COLOR";
|
|
42
|
+
LoadType["CUSTOM_ENTITY"] = "CUSTOM_ENTITY";
|
|
43
|
+
LoadType["SIZE_RANGE_TEMPLATE"] = "SIZE_RANGE_TEMPLATE";
|
|
44
|
+
})(LoadType = exports.LoadType || (exports.LoadType = {}));
|
|
45
|
+
class LoaderProcess {
|
|
46
|
+
id;
|
|
47
|
+
createdOn;
|
|
48
|
+
updatedOn;
|
|
49
|
+
createdById;
|
|
50
|
+
updatedById;
|
|
51
|
+
createdBy;
|
|
52
|
+
updatedBy;
|
|
53
|
+
orgId;
|
|
54
|
+
loaderConfigurationId;
|
|
55
|
+
name;
|
|
56
|
+
endedOn;
|
|
57
|
+
status;
|
|
58
|
+
logLevel;
|
|
59
|
+
processLogs;
|
|
60
|
+
processLogS3File;
|
|
61
|
+
processLogS3FileDownloadLink;
|
|
62
|
+
logsFileId;
|
|
63
|
+
logFileDownloadLink;
|
|
64
|
+
loadProcessResult;
|
|
65
|
+
loadProcessResultFileId;
|
|
66
|
+
loadProcessResultDownloadLink;
|
|
67
|
+
preprocessingStepResults;
|
|
68
|
+
processDurationSeconds;
|
|
69
|
+
loadFileId;
|
|
70
|
+
loadType;
|
|
71
|
+
federatedMappings;
|
|
72
|
+
conditionalColumns;
|
|
73
|
+
assortmentSplit;
|
|
74
|
+
partialAssortmentUpdate;
|
|
75
|
+
assortmentItemDropField;
|
|
76
|
+
workspaceIdentifier;
|
|
77
|
+
propertiesToRemove;
|
|
78
|
+
badRowsCount;
|
|
79
|
+
uploadErrorCount;
|
|
80
|
+
hasErrors;
|
|
81
|
+
parallelWorkerCount;
|
|
82
|
+
messageGroupId;
|
|
83
|
+
}
|
|
84
|
+
exports.LoaderProcess = LoaderProcess;
|
package/lib/log-level.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevel = void 0;
|
|
4
|
+
var LogLevel;
|
|
5
|
+
(function (LogLevel) {
|
|
6
|
+
LogLevel[LogLevel["FATAL"] = 0] = "FATAL";
|
|
7
|
+
LogLevel[LogLevel["ERROR"] = 1] = "ERROR";
|
|
8
|
+
LogLevel[LogLevel["WARN"] = 2] = "WARN";
|
|
9
|
+
LogLevel[LogLevel["INFO"] = 3] = "INFO";
|
|
10
|
+
LogLevel[LogLevel["LOG"] = 4] = "LOG";
|
|
11
|
+
LogLevel[LogLevel["DEBUG"] = 5] = "DEBUG";
|
|
12
|
+
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
|