@contrail/entity-types 1.1.46 → 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 +2 -1
- package/lib/index.js +2 -1
- 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/lib/shared-links.d.ts +46 -0
- package/lib/shared-links.js +11 -0
- package/lib/user.d.ts +2 -1
- package/lib/user.js +1 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -12,13 +12,14 @@ export * from './content';
|
|
|
12
12
|
export * from './contentholder-content';
|
|
13
13
|
export * from './file';
|
|
14
14
|
export * from './item';
|
|
15
|
+
export * from './loader';
|
|
15
16
|
export * from './org';
|
|
16
17
|
export * from './project-item';
|
|
17
18
|
export * from './project';
|
|
18
19
|
export * from './property-type';
|
|
19
20
|
export * from './org-managed-entity';
|
|
20
21
|
export * from './subscription';
|
|
21
|
-
export * from './
|
|
22
|
+
export * from './shared-links';
|
|
22
23
|
export * from './type-managed-entity';
|
|
23
24
|
export * from './user';
|
|
24
25
|
export * from './workspace-managed-entity';
|
package/lib/index.js
CHANGED
|
@@ -28,13 +28,14 @@ __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);
|
|
34
35
|
__exportStar(require("./property-type"), exports);
|
|
35
36
|
__exportStar(require("./org-managed-entity"), exports);
|
|
36
37
|
__exportStar(require("./subscription"), exports);
|
|
37
|
-
__exportStar(require("./
|
|
38
|
+
__exportStar(require("./shared-links"), exports);
|
|
38
39
|
__exportStar(require("./type-managed-entity"), exports);
|
|
39
40
|
__exportStar(require("./user"), exports);
|
|
40
41
|
__exportStar(require("./workspace-managed-entity"), 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 = {}));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { OrgManagedEntity } from "./org-managed-entity";
|
|
2
|
+
import { Group, User } from "./user";
|
|
3
|
+
export declare enum SharedLinkAccessLevel {
|
|
4
|
+
RESTRICTED = "RESTRICTED",
|
|
5
|
+
VIEW = "VIEW",
|
|
6
|
+
COMMENT = "COMMENT",
|
|
7
|
+
EDIT = "EDIT",
|
|
8
|
+
MANAGE = "MANAGE"
|
|
9
|
+
}
|
|
10
|
+
export interface SharedLinkPrincipal extends OrgManagedEntity {
|
|
11
|
+
id: string;
|
|
12
|
+
createdOn?: Date;
|
|
13
|
+
updatedOn?: Date;
|
|
14
|
+
createdBy?: string;
|
|
15
|
+
updatedBy?: string;
|
|
16
|
+
createdById?: string;
|
|
17
|
+
updatedById?: string;
|
|
18
|
+
orgId?: string;
|
|
19
|
+
orgSlug?: string;
|
|
20
|
+
userEmail?: string;
|
|
21
|
+
principalReference: string;
|
|
22
|
+
principal?: User | Group;
|
|
23
|
+
sharedLinkId: string;
|
|
24
|
+
expiresOn?: string;
|
|
25
|
+
accessLevel?: SharedLinkAccessLevel;
|
|
26
|
+
}
|
|
27
|
+
export interface SharedLink extends OrgManagedEntity {
|
|
28
|
+
id: string;
|
|
29
|
+
createdOn?: Date;
|
|
30
|
+
updatedOn?: Date;
|
|
31
|
+
createdBy?: string;
|
|
32
|
+
updatedBy?: string;
|
|
33
|
+
createdById?: string;
|
|
34
|
+
updatedById?: string;
|
|
35
|
+
orgId?: string;
|
|
36
|
+
orgSlug?: string;
|
|
37
|
+
shareType?: string;
|
|
38
|
+
contextType: string;
|
|
39
|
+
contextId: string;
|
|
40
|
+
contextReference?: string;
|
|
41
|
+
expiresOn?: Date;
|
|
42
|
+
deactivated?: boolean;
|
|
43
|
+
accessLevel?: SharedLinkAccessLevel;
|
|
44
|
+
sharedLinkPrincipals?: SharedLinkPrincipal[];
|
|
45
|
+
currentUserAccessLevel?: SharedLinkAccessLevel;
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SharedLinkAccessLevel = void 0;
|
|
4
|
+
var SharedLinkAccessLevel;
|
|
5
|
+
(function (SharedLinkAccessLevel) {
|
|
6
|
+
SharedLinkAccessLevel["RESTRICTED"] = "RESTRICTED";
|
|
7
|
+
SharedLinkAccessLevel["VIEW"] = "VIEW";
|
|
8
|
+
SharedLinkAccessLevel["COMMENT"] = "COMMENT";
|
|
9
|
+
SharedLinkAccessLevel["EDIT"] = "EDIT";
|
|
10
|
+
SharedLinkAccessLevel["MANAGE"] = "MANAGE";
|
|
11
|
+
})(SharedLinkAccessLevel = exports.SharedLinkAccessLevel || (exports.SharedLinkAccessLevel = {}));
|
package/lib/user.d.ts
CHANGED
package/lib/user.js
CHANGED
|
@@ -6,6 +6,7 @@ var UserOrgRole;
|
|
|
6
6
|
UserOrgRole["admin"] = "ADMIN";
|
|
7
7
|
UserOrgRole["member"] = "MEMBER";
|
|
8
8
|
UserOrgRole["guest"] = "GUEST";
|
|
9
|
+
UserOrgRole["viewer"] = "VIEWER";
|
|
9
10
|
})(UserOrgRole = exports.UserOrgRole || (exports.UserOrgRole = {}));
|
|
10
11
|
var SystemRole;
|
|
11
12
|
(function (SystemRole) {
|