@contrail/flexplm 1.2.0-alpha.0 → 1.3.0-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.
- package/package.json +1 -1
- package/scripts/output.png +0 -0
- package/scripts/test-get-request.ts +35 -0
- package/src/util/flexplm-connect.spec.ts +132 -0
- package/src/util/flexplm-connect.ts +14 -5
- package/src/util/type-conversion-utils-spec-mockData.ts +18 -0
- package/src/util/type-conversion-utils.spec.ts +184 -0
- package/src/util/type-conversion-utils.ts +74 -0
- package/lib/entity-processor/base-entity-processor.d.ts +0 -42
- package/lib/entity-processor/base-entity-processor.js +0 -363
- package/lib/entity-processor/base-entity-processor.spec.d.ts +0 -1
- package/lib/entity-processor/base-entity-processor.spec.js +0 -302
- package/lib/flexplm-request.d.ts +0 -3
- package/lib/flexplm-request.js +0 -34
- package/lib/flexplm-utils.d.ts +0 -5
- package/lib/flexplm-utils.js +0 -33
- package/lib/flexplm-utils.spec.d.ts +0 -1
- package/lib/flexplm-utils.spec.js +0 -26
- package/lib/index.d.ts +0 -22
- package/lib/index.js +0 -38
- package/lib/interfaces/interfaces.d.ts +0 -105
- package/lib/interfaces/interfaces.js +0 -2
- package/lib/interfaces/item-family-changes.d.ts +0 -20
- package/lib/interfaces/item-family-changes.js +0 -56
- package/lib/interfaces/publish-change-data.d.ts +0 -19
- package/lib/interfaces/publish-change-data.js +0 -32
- package/lib/publish/base-process-publish-assortment-callback.d.ts +0 -9
- package/lib/publish/base-process-publish-assortment-callback.js +0 -38
- package/lib/publish/base-process-publish-assortment.d.ts +0 -93
- package/lib/publish/base-process-publish-assortment.js +0 -944
- package/lib/publish/base-process-publish-assortment.spec.d.ts +0 -1
- package/lib/publish/base-process-publish-assortment.spec.js +0 -1670
- package/lib/publish/mockData.d.ts +0 -1389
- package/lib/publish/mockData.js +0 -4519
- package/lib/transform/identifier-conversion-spec-mockData.d.ts +0 -0
- package/lib/transform/identifier-conversion-spec-mockData.js +0 -444
- package/lib/transform/identifier-conversion.d.ts +0 -15
- package/lib/transform/identifier-conversion.js +0 -212
- package/lib/transform/identifier-conversion.spec.d.ts +0 -1
- package/lib/transform/identifier-conversion.spec.js +0 -339
- package/lib/util/config-defaults.d.ts +0 -8
- package/lib/util/config-defaults.js +0 -85
- package/lib/util/config-defaults.spec.d.ts +0 -1
- package/lib/util/config-defaults.spec.js +0 -293
- package/lib/util/data-converter-spec-mockData.d.ts +0 -0
- package/lib/util/data-converter-spec-mockData.js +0 -205
- package/lib/util/data-converter.d.ts +0 -39
- package/lib/util/data-converter.js +0 -592
- package/lib/util/data-converter.spec.d.ts +0 -1
- package/lib/util/data-converter.spec.js +0 -904
- package/lib/util/error-response-object.d.ts +0 -4
- package/lib/util/error-response-object.js +0 -47
- package/lib/util/error-response-object.spec.d.ts +0 -1
- package/lib/util/error-response-object.spec.js +0 -99
- package/lib/util/event-short-message-status.d.ts +0 -18
- package/lib/util/event-short-message-status.js +0 -22
- package/lib/util/federation.d.ts +0 -15
- package/lib/util/federation.js +0 -149
- package/lib/util/flexplm-connect.d.ts +0 -18
- package/lib/util/flexplm-connect.js +0 -171
- package/lib/util/logger-config.d.ts +0 -1
- package/lib/util/logger-config.js +0 -26
- package/lib/util/map-util-spec-mockData.d.ts +0 -0
- package/lib/util/map-util-spec-mockData.js +0 -205
- package/lib/util/map-utils.d.ts +0 -6
- package/lib/util/map-utils.js +0 -15
- package/lib/util/map-utils.spec.d.ts +0 -1
- package/lib/util/map-utils.spec.js +0 -89
- package/lib/util/mockData.d.ts +0 -79
- package/lib/util/mockData.js +0 -99
- package/lib/util/thumbnail-util.d.ts +0 -19
- package/lib/util/thumbnail-util.js +0 -114
- package/lib/util/thumbnail-util.spec.d.ts +0 -1
- package/lib/util/thumbnail-util.spec.js +0 -242
- package/lib/util/type-conversion-utils-spec-mockData.d.ts +0 -0
- package/lib/util/type-conversion-utils-spec-mockData.js +0 -241
- package/lib/util/type-conversion-utils.d.ts +0 -21
- package/lib/util/type-conversion-utils.js +0 -223
- package/lib/util/type-conversion-utils.spec.d.ts +0 -1
- package/lib/util/type-conversion-utils.spec.js +0 -708
- package/lib/util/type-defaults.d.ts +0 -16
- package/lib/util/type-defaults.js +0 -221
- package/lib/util/type-defaults.spec.d.ts +0 -1
- package/lib/util/type-defaults.spec.js +0 -516
- package/lib/util/type-utils.d.ts +0 -13
- package/lib/util/type-utils.js +0 -114
- package/lib/util/type-utils.spec.d.ts +0 -1
- package/lib/util/type-utils.spec.js +0 -190
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const thumbnail_util_1 = require("./thumbnail-util");
|
|
4
|
-
const mockData_1 = require("./mockData");
|
|
5
|
-
describe('ThumbnailUtil Tests', () => {
|
|
6
|
-
const config = {};
|
|
7
|
-
describe('setOutboundThumbnail()', () => {
|
|
8
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config);
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
jest.clearAllMocks();
|
|
11
|
-
});
|
|
12
|
-
it('no data', async () => {
|
|
13
|
-
const data = {};
|
|
14
|
-
const event = {};
|
|
15
|
-
const results = await tu.setOutboundThumbnail(data, event);
|
|
16
|
-
const keys = Object.keys(results);
|
|
17
|
-
expect(results).toEqual(data);
|
|
18
|
-
expect(keys.length).toEqual(0);
|
|
19
|
-
});
|
|
20
|
-
it('remove thumbnail', async () => {
|
|
21
|
-
const data = {};
|
|
22
|
-
const event = {
|
|
23
|
-
propertyDiffs: {
|
|
24
|
-
largeViewableDownloadUrl: {
|
|
25
|
-
oldValue: '123',
|
|
26
|
-
newValue: null
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const results = await tu.setOutboundThumbnail(data, event);
|
|
31
|
-
const keys = Object.keys(results);
|
|
32
|
-
expect(keys.length).toEqual(1);
|
|
33
|
-
expect(keys[0]).toEqual(thumbnail_util_1.ThumbnailUtil.NEW_THUMBNAIL_ID);
|
|
34
|
-
expect(results[thumbnail_util_1.ThumbnailUtil.NEW_THUMBNAIL_ID]).toEqual(thumbnail_util_1.ThumbnailUtil.REMOVE_THUMBNAIL);
|
|
35
|
-
});
|
|
36
|
-
it('calling getFileId - new thumbnail', async () => {
|
|
37
|
-
const data = {};
|
|
38
|
-
const newDownloadUrl = 'https://api.vibeiq.com/dev/api/files/downloadUrl/w3ckfeGAD8ViOZj-%2Fcontent:E1iBQuWbr74lcdcw%2F9e30ds9o-d34b-451e-ae59-b4km36018d5a.png';
|
|
39
|
-
const oldDownloadUrl = 'xxx';
|
|
40
|
-
const thumbnailId = 'Eey3ZOiqdrUA84F8';
|
|
41
|
-
const event = {
|
|
42
|
-
newData: {
|
|
43
|
-
primaryViewableId: 'm5bJa4RtTLUtKBP5',
|
|
44
|
-
largeViewableDownloadUrl: newDownloadUrl
|
|
45
|
-
},
|
|
46
|
-
propertyDiffs: {
|
|
47
|
-
largeViewableDownloadUrl: {
|
|
48
|
-
newValue: newDownloadUrl,
|
|
49
|
-
oldValue: oldDownloadUrl
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const spyCustomSizes = jest.spyOn(tu, 'getCustomSizes');
|
|
54
|
-
spyCustomSizes.mockReturnValue(Promise.resolve(mockData_1.empty_custom_sizes));
|
|
55
|
-
const spyGetFileId = jest.spyOn(tu, 'getFileId');
|
|
56
|
-
spyGetFileId.mockReturnValue(Promise.resolve(thumbnailId));
|
|
57
|
-
const results = await tu.setOutboundThumbnail(data, event);
|
|
58
|
-
const keys = Object.keys(results);
|
|
59
|
-
expect(keys.length).toEqual(1);
|
|
60
|
-
expect(keys[0]).toEqual(thumbnail_util_1.ThumbnailUtil.NEW_THUMBNAIL_ID);
|
|
61
|
-
const thumbnailValue = results[thumbnail_util_1.ThumbnailUtil.NEW_THUMBNAIL_ID];
|
|
62
|
-
expect(thumbnailValue).toEqual(thumbnailId);
|
|
63
|
-
});
|
|
64
|
-
it('calling getFileId - existing thumbnail', async () => {
|
|
65
|
-
const data = {};
|
|
66
|
-
const newDownloadUrl = 'https://api.vibeiq.com/dev/api/files/downloadUrl/w3ckfeGAD8ViOZj-%2Fcontent:E1iBQuWbr74lcdcw%2F9e30ds9o-d34b-451e-ae59-b4km36018d5a.png';
|
|
67
|
-
const thumbnailId = 'Eey3ZOiqdrUA84F8';
|
|
68
|
-
const event = {
|
|
69
|
-
newData: {
|
|
70
|
-
primaryViewableId: 'm5bJa4RtTLUtKBP5',
|
|
71
|
-
largeViewableDownloadUrl: newDownloadUrl
|
|
72
|
-
},
|
|
73
|
-
propertyDiffs: {}
|
|
74
|
-
};
|
|
75
|
-
const spyCustomSizes = jest.spyOn(tu, 'getCustomSizes');
|
|
76
|
-
spyCustomSizes.mockReturnValue(Promise.resolve(mockData_1.empty_custom_sizes));
|
|
77
|
-
const spyGetFileId = jest.spyOn(tu, 'getFileId');
|
|
78
|
-
spyGetFileId.mockReturnValue(Promise.resolve(thumbnailId));
|
|
79
|
-
const results = await tu.setOutboundThumbnail(data, event);
|
|
80
|
-
const keys = Object.keys(results);
|
|
81
|
-
expect(keys.length).toEqual(1);
|
|
82
|
-
expect(keys[0]).toEqual(thumbnail_util_1.ThumbnailUtil.EXISTING_THUMBNAIL_ID);
|
|
83
|
-
const thumbnailValue = results[thumbnail_util_1.ThumbnailUtil.EXISTING_THUMBNAIL_ID];
|
|
84
|
-
expect(thumbnailValue).toEqual(thumbnailId);
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
describe('getFileId', () => {
|
|
88
|
-
const primaryFileId = 'yn2d5oHD4rXHRzyB';
|
|
89
|
-
beforeEach(() => {
|
|
90
|
-
jest.clearAllMocks();
|
|
91
|
-
});
|
|
92
|
-
it('no custom sizes, default max_thumbnail_size - result large', async () => {
|
|
93
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config);
|
|
94
|
-
const spyCustomSizes = jest.spyOn(tu, 'getCustomSizes');
|
|
95
|
-
spyCustomSizes.mockReturnValue(Promise.resolve(mockData_1.empty_custom_sizes));
|
|
96
|
-
const spyContentEntity = jest.spyOn(tu, 'getContentEntity');
|
|
97
|
-
const content = JSON.parse(JSON.stringify(mockData_1.thumbnail_content_entity));
|
|
98
|
-
spyContentEntity.mockReturnValue(Promise.resolve(content));
|
|
99
|
-
const results = await tu.getFileId(primaryFileId);
|
|
100
|
-
expect(results).toEqual('vo4N4mCd-tFrw101');
|
|
101
|
-
});
|
|
102
|
-
it('no custom sizes, 750 * 1_024 max_thumbnail_size - result medium', async () => {
|
|
103
|
-
const config1 = {
|
|
104
|
-
max_thumbnail_size: 750 * 1024
|
|
105
|
-
};
|
|
106
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config1);
|
|
107
|
-
const spyCustomSizes = jest.spyOn(tu, 'getCustomSizes');
|
|
108
|
-
spyCustomSizes.mockReturnValue(Promise.resolve(mockData_1.empty_custom_sizes));
|
|
109
|
-
const spyContentEntity = jest.spyOn(tu, 'getContentEntity');
|
|
110
|
-
const content = mockData_1.thumbnail_content_entity;
|
|
111
|
-
spyContentEntity.mockReturnValue(Promise.resolve(content));
|
|
112
|
-
const results = await tu.getFileId(primaryFileId);
|
|
113
|
-
expect(results).toEqual('AsRvJenpeqxksUNW');
|
|
114
|
-
});
|
|
115
|
-
it('custom sizes, 750 * 1_024 max_thumbnail_size - result CS_500Id', async () => {
|
|
116
|
-
const config1 = {
|
|
117
|
-
max_thumbnail_size: 750 * 1024
|
|
118
|
-
};
|
|
119
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config1);
|
|
120
|
-
const spyCustomSizes = jest.spyOn(tu, 'getCustomSizes');
|
|
121
|
-
spyCustomSizes.mockReturnValue(Promise.resolve(mockData_1.four_custom_sizes));
|
|
122
|
-
const spyContentEntity = jest.spyOn(tu, 'getContentEntity');
|
|
123
|
-
const content = mockData_1.thumbnail_content_entity;
|
|
124
|
-
spyContentEntity.mockReturnValue(Promise.resolve(content));
|
|
125
|
-
const results = await tu.getFileId(primaryFileId);
|
|
126
|
-
expect(results).toEqual('rBaHc1J2xdOWdbhI');
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
describe('Test isThumbnailNew', () => {
|
|
130
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config);
|
|
131
|
-
it('no propertyDiffs', () => {
|
|
132
|
-
const event = {
|
|
133
|
-
newData: {
|
|
134
|
-
name: 'Test'
|
|
135
|
-
},
|
|
136
|
-
oldData: {
|
|
137
|
-
name: 'Test'
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
const results = tu.isThumbnailNew(event, undefined);
|
|
141
|
-
expect(results).toBeFalsy();
|
|
142
|
-
});
|
|
143
|
-
it('empty propertyDiffs', () => {
|
|
144
|
-
const event = {
|
|
145
|
-
newData: {
|
|
146
|
-
name: 'Test'
|
|
147
|
-
},
|
|
148
|
-
oldData: {
|
|
149
|
-
name: 'Test'
|
|
150
|
-
},
|
|
151
|
-
propertyDiffs: {}
|
|
152
|
-
};
|
|
153
|
-
const results = tu.isThumbnailNew(event, undefined);
|
|
154
|
-
expect(results).toBeFalsy();
|
|
155
|
-
});
|
|
156
|
-
it('propertyDiffs diff property', () => {
|
|
157
|
-
const event = {
|
|
158
|
-
newData: {
|
|
159
|
-
name: 'Test1'
|
|
160
|
-
},
|
|
161
|
-
oldData: {
|
|
162
|
-
name: 'Test'
|
|
163
|
-
},
|
|
164
|
-
propertyDiffs: {
|
|
165
|
-
name: {
|
|
166
|
-
propertyName: 'name',
|
|
167
|
-
oldValue: 'Test',
|
|
168
|
-
newValue: 'Test1'
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const results = tu.isThumbnailNew(event, undefined);
|
|
173
|
-
expect(results).toBeFalsy();
|
|
174
|
-
});
|
|
175
|
-
it('propertyDiffs OOB property', () => {
|
|
176
|
-
const event = {
|
|
177
|
-
newData: {
|
|
178
|
-
name: 'Test1'
|
|
179
|
-
},
|
|
180
|
-
oldData: {
|
|
181
|
-
name: 'Test'
|
|
182
|
-
},
|
|
183
|
-
propertyDiffs: {
|
|
184
|
-
mediumLargeViewableDownloadUrl: {
|
|
185
|
-
propertyName: 'mediumLargeViewableDownloadUrl',
|
|
186
|
-
oldValue: '',
|
|
187
|
-
newValue: 'Test1'
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
const results = tu.isThumbnailNew(event, undefined);
|
|
192
|
-
expect(results).toBeTruthy();
|
|
193
|
-
});
|
|
194
|
-
it('propertyDiffs custom property', () => {
|
|
195
|
-
const event = {
|
|
196
|
-
newData: {
|
|
197
|
-
name: 'Test1'
|
|
198
|
-
},
|
|
199
|
-
oldData: {
|
|
200
|
-
name: 'Test'
|
|
201
|
-
},
|
|
202
|
-
propertyDiffs: {
|
|
203
|
-
RL_1000Url: {
|
|
204
|
-
propertyName: 'RL_1000Url',
|
|
205
|
-
oldValue: '',
|
|
206
|
-
newValue: 'Test1'
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
const results = tu.isThumbnailNew(event, [{ slug: 'RL_1000' }]);
|
|
211
|
-
expect(results).toBeTruthy();
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
describe('logContentResults', () => {
|
|
215
|
-
it('no content - doesnt error', () => {
|
|
216
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config);
|
|
217
|
-
const content = undefined;
|
|
218
|
-
const relations = [];
|
|
219
|
-
tu.logContentResults(content, relations);
|
|
220
|
-
});
|
|
221
|
-
it('no relations - doesnt error', () => {
|
|
222
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config);
|
|
223
|
-
const content = undefined;
|
|
224
|
-
const relations = undefined;
|
|
225
|
-
tu.logContentResults(content, relations);
|
|
226
|
-
});
|
|
227
|
-
it('content and relations - logs', () => {
|
|
228
|
-
const tu = new thumbnail_util_1.ThumbnailUtil(config);
|
|
229
|
-
const content = {
|
|
230
|
-
id: '123',
|
|
231
|
-
name: 'Test',
|
|
232
|
-
primaryFile: { id: 'file123' }
|
|
233
|
-
};
|
|
234
|
-
const relations = ['primaryFile'];
|
|
235
|
-
tu.logContentResults(content, relations);
|
|
236
|
-
expect(Object.keys(content)).toHaveLength(3);
|
|
237
|
-
expect(content).toHaveProperty('primaryFile');
|
|
238
|
-
expect(content.primaryFile).toHaveProperty('id');
|
|
239
|
-
expect(content.primaryFile.id).toEqual('file123');
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
});
|
|
File without changes
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
exports.mapping = {
|
|
4
|
-
typeConversion: {
|
|
5
|
-
vibe2flex: {
|
|
6
|
-
'custom-entity': {
|
|
7
|
-
getMapKey: (entity) => {
|
|
8
|
-
const typePath = entity['typePath'];
|
|
9
|
-
let mapKey = '';
|
|
10
|
-
switch (typePath) {
|
|
11
|
-
case 'custom-entity:pack':
|
|
12
|
-
mapKey = 'packaging';
|
|
13
|
-
break;
|
|
14
|
-
case 'custom-entity:prefix':
|
|
15
|
-
mapKey = 'prefix';
|
|
16
|
-
break;
|
|
17
|
-
case 'custom-entity:catName':
|
|
18
|
-
mapKey = 'catName';
|
|
19
|
-
break;
|
|
20
|
-
case 'custom-entity:partnerOrg':
|
|
21
|
-
mapKey = 'partnerOrg';
|
|
22
|
-
break;
|
|
23
|
-
case 'custom-entity:catFamily':
|
|
24
|
-
mapKey = 'catFamily';
|
|
25
|
-
break;
|
|
26
|
-
case 'custom-entity:formName':
|
|
27
|
-
mapKey = 'formName';
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
return mapKey;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
flex2vibe: {
|
|
35
|
-
LCSLast: {
|
|
36
|
-
getMapKey: (object) => { return 'catName'; }
|
|
37
|
-
},
|
|
38
|
-
LCSRevisableEntity: {
|
|
39
|
-
getMapKey: (object) => {
|
|
40
|
-
const typePath = object['flexPLMTypePath'];
|
|
41
|
-
let mapKey = '';
|
|
42
|
-
switch (typePath) {
|
|
43
|
-
case 'Revisable Entity\\packaging':
|
|
44
|
-
mapKey = 'packaging';
|
|
45
|
-
break;
|
|
46
|
-
case 'Revisable Entity\\prefix':
|
|
47
|
-
mapKey = 'prefix';
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
;
|
|
51
|
-
return mapKey;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
LCSProduct: {
|
|
57
|
-
vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
|
|
58
|
-
vibe2flex: {
|
|
59
|
-
getClass: () => 'LCSProduct',
|
|
60
|
-
getSoftType: (entity) => {
|
|
61
|
-
const prodType = entity['prodType'];
|
|
62
|
-
let val = '';
|
|
63
|
-
switch (prodType) {
|
|
64
|
-
case 'acc':
|
|
65
|
-
val = 'Product\\Accesories';
|
|
66
|
-
break;
|
|
67
|
-
case 'app':
|
|
68
|
-
val = 'Product\\Apparel';
|
|
69
|
-
break;
|
|
70
|
-
case 'eqp':
|
|
71
|
-
val = 'Product\\Equipment';
|
|
72
|
-
break;
|
|
73
|
-
case 'foot':
|
|
74
|
-
val = 'Product\\Footwear';
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
return val;
|
|
78
|
-
},
|
|
79
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }, { processor: 'VALUE_TRANSFORM', functionTransformersKey: 'valueTransform' }],
|
|
80
|
-
rekey: {
|
|
81
|
-
productName: 'name',
|
|
82
|
-
vibeIQIdentifier: 'itemNumber'
|
|
83
|
-
},
|
|
84
|
-
valueTransform: {
|
|
85
|
-
transformEx: (row) => {
|
|
86
|
-
return row['otherProp'] + 'xxx';
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
flex2vibe: {
|
|
91
|
-
getClass: () => 'item',
|
|
92
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
93
|
-
rekey: {
|
|
94
|
-
itemNumber: 'vibeIQIdentifier',
|
|
95
|
-
name: 'productName',
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
LCSSKU: {
|
|
100
|
-
vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
|
|
101
|
-
vibe2flex: {
|
|
102
|
-
getClass: () => 'LCSSKU',
|
|
103
|
-
getSoftType: (entity) => {
|
|
104
|
-
const prodType = entity['prodType'];
|
|
105
|
-
let val = '';
|
|
106
|
-
switch (prodType) {
|
|
107
|
-
case 'acc':
|
|
108
|
-
val = 'Product\\Accesories';
|
|
109
|
-
break;
|
|
110
|
-
case 'app':
|
|
111
|
-
val = 'Product\\Apparel';
|
|
112
|
-
break;
|
|
113
|
-
case 'eqp':
|
|
114
|
-
val = 'Product\\Equipment';
|
|
115
|
-
break;
|
|
116
|
-
case 'foot':
|
|
117
|
-
val = 'Product\\Footwear';
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
return val;
|
|
121
|
-
},
|
|
122
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
123
|
-
rekey: {
|
|
124
|
-
skuName: 'optionName',
|
|
125
|
-
vibeIQIdentifier: 'itemNumber'
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
flex2vibe: {
|
|
129
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
130
|
-
rekey: {
|
|
131
|
-
itemNumber: 'vibeIQIdentifier',
|
|
132
|
-
optionName: 'skuName',
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
packaging: {
|
|
137
|
-
isOutboundCreatable: (entity, context) => {
|
|
138
|
-
return false;
|
|
139
|
-
},
|
|
140
|
-
vibe2flex: {
|
|
141
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
142
|
-
rekey: {
|
|
143
|
-
retailPackType: 'packType',
|
|
144
|
-
retailIntroDate: 'introDate'
|
|
145
|
-
},
|
|
146
|
-
getSoftType: () => 'Revisable Entity\\packaging',
|
|
147
|
-
getClass: () => 'LCSRevisableEntity'
|
|
148
|
-
},
|
|
149
|
-
flex2vibe: {
|
|
150
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
151
|
-
rekey: {
|
|
152
|
-
packType: 'retailPackType',
|
|
153
|
-
introDate: 'retailIntroDate'
|
|
154
|
-
},
|
|
155
|
-
getClass: () => 'custom-entity',
|
|
156
|
-
getSoftType: () => 'custom-entity:pack',
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
prefix: {
|
|
160
|
-
isInboundCreatable: (object, context) => {
|
|
161
|
-
if (context && context.skipPrefix) {
|
|
162
|
-
return false;
|
|
163
|
-
}
|
|
164
|
-
return true;
|
|
165
|
-
},
|
|
166
|
-
isOutboundCreatable: (entity, context) => {
|
|
167
|
-
if (context && context.skipPrefix) {
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
170
|
-
return true;
|
|
171
|
-
},
|
|
172
|
-
vibe2flex: {
|
|
173
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
174
|
-
rekey: {
|
|
175
|
-
retailOwner: 'owner',
|
|
176
|
-
retailIntroDate: 'introDate'
|
|
177
|
-
},
|
|
178
|
-
getSoftType: () => 'Revisable Entity\\prefix',
|
|
179
|
-
getClass: () => 'LCSRevisableEntity'
|
|
180
|
-
},
|
|
181
|
-
flex2vibe: {
|
|
182
|
-
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
183
|
-
rekey: {
|
|
184
|
-
owner: 'retailOwner',
|
|
185
|
-
introDate: 'retailIntroDate'
|
|
186
|
-
},
|
|
187
|
-
getClass: () => 'custom-entity',
|
|
188
|
-
getSoftType: () => 'custom-entity:prefix',
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
catName: {
|
|
192
|
-
getIdentifierProperties: () => ['catName', 'catNumber'],
|
|
193
|
-
getInformationalProperties: () => ['longName'],
|
|
194
|
-
vibe2flex: {
|
|
195
|
-
transformOrder: [],
|
|
196
|
-
getSoftType: () => 'Last\\catName',
|
|
197
|
-
getClass: () => 'LCSLast'
|
|
198
|
-
},
|
|
199
|
-
flex2vibe: {
|
|
200
|
-
transformOrder: [],
|
|
201
|
-
getClass: () => 'custom-entity',
|
|
202
|
-
getSoftType: () => 'custom-entity:catName',
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
partnerOrg: {
|
|
206
|
-
vibe2flex: {
|
|
207
|
-
transformOrder: [],
|
|
208
|
-
getSoftType: () => 'Business Object\\partnerOrg',
|
|
209
|
-
getClass: () => 'LCSLifecycleManaged'
|
|
210
|
-
},
|
|
211
|
-
flex2vibe: {
|
|
212
|
-
transformOrder: [],
|
|
213
|
-
getClass: () => 'custom-entity',
|
|
214
|
-
getSoftType: () => 'custom-entity:partnerOrg',
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
catFamily: {
|
|
218
|
-
vibe2flex: {
|
|
219
|
-
transformOrder: [],
|
|
220
|
-
getSoftType: () => 'Revisable Entity\\catFamily',
|
|
221
|
-
getClass: () => 'LCSRevisableEntity'
|
|
222
|
-
},
|
|
223
|
-
flex2vibe: {
|
|
224
|
-
transformOrder: [],
|
|
225
|
-
getClass: () => 'custom-entity',
|
|
226
|
-
getSoftType: () => 'custom-entity:catFamily',
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
formName: {
|
|
230
|
-
vibe2flex: {
|
|
231
|
-
transformOrder: [],
|
|
232
|
-
getSoftType: () => 'Material\\form',
|
|
233
|
-
getClass: () => 'LCSMaterial'
|
|
234
|
-
},
|
|
235
|
-
flex2vibe: {
|
|
236
|
-
transformOrder: [],
|
|
237
|
-
getClass: () => 'custom-entity',
|
|
238
|
-
getSoftType: () => 'custom-entity:formName',
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MapFileUtil } from '@contrail/transform-data';
|
|
2
|
-
export declare class TypeConversionUtils {
|
|
3
|
-
static NO_ENTITY_TYPE: string;
|
|
4
|
-
static VIBE2FLEX_DIRECTION: string;
|
|
5
|
-
static FLEX2VIBE_DIRECTION: string;
|
|
6
|
-
constructor();
|
|
7
|
-
static getObjectClass(transformMapFile: any, mapFileUtil: any, entity: any): Promise<string>;
|
|
8
|
-
static getObjectTypePath(transformMapFile: any, mapFileUtil: any, entity: any): Promise<string>;
|
|
9
|
-
static getIdentifierProperties(transformMapFile: any, mapFileUtil: any, entity: any): Promise<string[]>;
|
|
10
|
-
static getInformationalProperties(transformMapFile: any, mapFileUtil: any, entity: any): Promise<string[]>;
|
|
11
|
-
static getMapKey(transformMapFile: any, mapFileUtil: MapFileUtil, entity: any, direction: string): Promise<string>;
|
|
12
|
-
static getEntityType(entity: any): any;
|
|
13
|
-
static getEntityClassFromObject(fileId: any, mapFileUtil: any, object: any): Promise<string>;
|
|
14
|
-
static getEntityTypePathFromOjbect(fileId: any, mapFileUtil: any, object: any): Promise<string>;
|
|
15
|
-
static getIdentifierPropertiesFromObject(fileId: any, mapFileUtil: MapFileUtil, object: any): Promise<string[]>;
|
|
16
|
-
static getInformationalPropertiesFromObject(fileId: any, mapFileUtil: MapFileUtil, object: any): Promise<string[]>;
|
|
17
|
-
static getMapKeyFromObject(fileId: any, mapFileUtil: MapFileUtil, object: any, direction: string): Promise<string>;
|
|
18
|
-
static isInboundCreatableFromObject(fileId: string, mapFileUtil: MapFileUtil, object: any, context?: any): Promise<boolean>;
|
|
19
|
-
static isOutboundCreatableFromEntity(fileId: string, mapFileUtil: MapFileUtil, entity: any, context?: any): Promise<boolean>;
|
|
20
|
-
static getObjectType(object: any): any;
|
|
21
|
-
}
|