@contrail/flexplm 1.1.18 → 1.1.20
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.
|
@@ -21,6 +21,7 @@ export declare abstract class BaseEntityProcessor {
|
|
|
21
21
|
getTransformedData(event: any): Promise<any>;
|
|
22
22
|
getUpdatesForEntity(entity: any, inboundData: any): Promise<object>;
|
|
23
23
|
getVibeOwningKeys(entity: any): Promise<any[]>;
|
|
24
|
+
getVibeOwningKeysFromInbound(entity: any): Promise<any[]>;
|
|
24
25
|
createEntity(entityName: any, changes: any): Promise<any>;
|
|
25
26
|
updateEntity(entityName: any, entity: any, diffs: any): Promise<any>;
|
|
26
27
|
protected abstract getIncomingEntity(event: any, inboundData: any): Promise<IncomingEntityResponse>;
|
|
@@ -95,6 +95,16 @@ class BaseEntityProcessor {
|
|
|
95
95
|
console.debug('vibeOwningKeys: ' + vibeOwningKeys);
|
|
96
96
|
return vibeOwningKeys;
|
|
97
97
|
}
|
|
98
|
+
async getVibeOwningKeysFromInbound(entity) {
|
|
99
|
+
let vibeOwningKeys = [];
|
|
100
|
+
if (this.transformMapFile && entity) {
|
|
101
|
+
const mapKey = await type_conversion_utils_1.TypeConversionUtils.getMapKeyFromObject(this.transformMapFile, this.mapFileUtil, entity, type_conversion_utils_1.TypeConversionUtils.FLEX2VIBE_DIRECTION);
|
|
102
|
+
const mapSection = await map_utils_1.MapUtil.getFullMapSection(this.transformMapFile, this.mapFileUtil, mapKey);
|
|
103
|
+
vibeOwningKeys = mapSection?.vibeOwningKeys || [];
|
|
104
|
+
}
|
|
105
|
+
console.debug('vibeOwningKeys: ' + vibeOwningKeys);
|
|
106
|
+
return vibeOwningKeys;
|
|
107
|
+
}
|
|
98
108
|
async createEntity(entityName, changes) {
|
|
99
109
|
const options = {
|
|
100
110
|
entityName: entityName,
|
|
@@ -139,7 +139,7 @@ class TypeDefaults {
|
|
|
139
139
|
else if (['LCSSeason', 'SeasonGroup'].includes(objectClass)) {
|
|
140
140
|
entityClass = 'assortment';
|
|
141
141
|
}
|
|
142
|
-
else if (['LCSRevisableEntity', 'LCSLifecycleManaged'].includes(objectClass)) {
|
|
142
|
+
else if (['LCSRevisableEntity', 'LCSLifecycleManaged', 'LCSLast', 'LCSMaterial'].includes(objectClass)) {
|
|
143
143
|
entityClass = 'custom-entity';
|
|
144
144
|
}
|
|
145
145
|
return entityClass;
|
|
@@ -177,6 +177,8 @@ class TypeDefaults {
|
|
|
177
177
|
case 'LCSColor':
|
|
178
178
|
case 'LCSRevisableEntity':
|
|
179
179
|
case 'LCSLifecycleManaged':
|
|
180
|
+
case 'LCSLast':
|
|
181
|
+
case 'LCSMaterial':
|
|
180
182
|
identifierProps.push('name');
|
|
181
183
|
break;
|
|
182
184
|
}
|
package/package.json
CHANGED
|
@@ -125,6 +125,18 @@ export abstract class BaseEntityProcessor {
|
|
|
125
125
|
return vibeOwningKeys;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
async getVibeOwningKeysFromInbound(entity) {
|
|
129
|
+
let vibeOwningKeys = [];
|
|
130
|
+
if (this.transformMapFile && entity) {
|
|
131
|
+
const mapKey = await TypeConversionUtils.getMapKeyFromObject(this.transformMapFile, this.mapFileUtil, entity, TypeConversionUtils.FLEX2VIBE_DIRECTION);
|
|
132
|
+
|
|
133
|
+
const mapSection = await MapUtil.getFullMapSection(this.transformMapFile, this.mapFileUtil, mapKey);
|
|
134
|
+
vibeOwningKeys = mapSection?.vibeOwningKeys || [];
|
|
135
|
+
}
|
|
136
|
+
console.debug('vibeOwningKeys: ' + vibeOwningKeys);
|
|
137
|
+
return vibeOwningKeys;
|
|
138
|
+
}
|
|
139
|
+
|
|
128
140
|
async createEntity(entityName, changes) {
|
|
129
141
|
const options = {
|
|
130
142
|
entityName: entityName,
|
|
@@ -175,7 +175,7 @@ export class TypeDefaults {
|
|
|
175
175
|
entityClass = 'color';
|
|
176
176
|
} else if(['LCSSeason', 'SeasonGroup'].includes(objectClass)) {
|
|
177
177
|
entityClass = 'assortment';
|
|
178
|
-
} else if(['LCSRevisableEntity', 'LCSLifecycleManaged'].includes(objectClass)) {
|
|
178
|
+
} else if(['LCSRevisableEntity', 'LCSLifecycleManaged', 'LCSLast', 'LCSMaterial'].includes(objectClass)) {
|
|
179
179
|
entityClass = 'custom-entity';
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -232,6 +232,8 @@ export class TypeDefaults {
|
|
|
232
232
|
case 'LCSColor':
|
|
233
233
|
case 'LCSRevisableEntity':
|
|
234
234
|
case 'LCSLifecycleManaged':
|
|
235
|
+
case 'LCSLast':
|
|
236
|
+
case 'LCSMaterial':
|
|
235
237
|
identifierProps.push('name');
|
|
236
238
|
break;
|
|
237
239
|
}
|