@contrail/flexplm 1.3.1-alpha.eae3d9f → 1.3.1-alpha.f54fe36

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.
Files changed (111) hide show
  1. package/lib/cli/commands/compile.d.ts +1 -0
  2. package/lib/cli/commands/compile.js +71 -0
  3. package/lib/cli/commands/compile.spec.d.ts +1 -0
  4. package/lib/cli/commands/compile.spec.js +80 -0
  5. package/lib/cli/commands/create.d.ts +1 -0
  6. package/lib/cli/commands/create.js +75 -0
  7. package/lib/cli/commands/create.spec.d.ts +1 -0
  8. package/lib/cli/commands/create.spec.js +78 -0
  9. package/lib/cli/commands/upload.d.ts +10 -0
  10. package/lib/cli/commands/upload.js +219 -0
  11. package/lib/cli/commands/upload.spec.d.ts +1 -0
  12. package/lib/cli/commands/upload.spec.js +88 -0
  13. package/lib/cli/index.d.ts +2 -0
  14. package/lib/cli/index.js +64 -0
  15. package/lib/cli/index.spec.d.ts +1 -0
  16. package/lib/cli/index.spec.js +79 -0
  17. package/lib/cli/template/mapping-template.ts.template +18 -0
  18. package/lib/entity-processor/base-entity-processor.d.ts +47 -0
  19. package/lib/entity-processor/base-entity-processor.js +53 -0
  20. package/lib/entity-processor/base-entity-processor.spec.js +1 -0
  21. package/lib/index.d.ts +1 -0
  22. package/lib/index.js +1 -0
  23. package/lib/interfaces/mapping-file.d.ts +429 -0
  24. package/lib/interfaces/mapping-file.js +2 -0
  25. package/lib/publish/base-process-publish-assortment.d.ts +25 -0
  26. package/lib/publish/base-process-publish-assortment.js +60 -6
  27. package/lib/publish/base-process-publish-assortment.spec.js +22 -4
  28. package/lib/publish/mockData.js +5 -0
  29. package/lib/transform/identifier-conversion-spec-mockData.js +34 -6
  30. package/lib/transform/identifier-conversion.d.ts +36 -0
  31. package/lib/transform/identifier-conversion.js +36 -0
  32. package/lib/transform/identifier-conversion.spec.js +4 -0
  33. package/lib/util/config-defaults.js +3 -0
  34. package/lib/util/config-defaults.spec.js +9 -0
  35. package/lib/util/data-converter-spec-mockData.js +17 -3
  36. package/lib/util/data-converter.d.ts +97 -0
  37. package/lib/util/data-converter.js +127 -1
  38. package/lib/util/data-converter.spec.js +2 -0
  39. package/lib/util/error-response-object.d.ts +5 -0
  40. package/lib/util/error-response-object.js +7 -0
  41. package/lib/util/event-short-message-status.js +1 -0
  42. package/lib/util/federation.js +8 -0
  43. package/lib/util/flexplm-connect.d.ts +7 -0
  44. package/lib/util/flexplm-connect.js +14 -0
  45. package/lib/util/logger-config.js +1 -0
  46. package/lib/util/map-util-spec-mockData.js +17 -3
  47. package/lib/util/map-utils.d.ts +27 -0
  48. package/lib/util/map-utils.js +27 -0
  49. package/lib/util/thumbnail-util.d.ts +21 -0
  50. package/lib/util/thumbnail-util.js +28 -1
  51. package/lib/util/thumbnail-util.spec.js +6 -0
  52. package/lib/util/type-conversion-utils-spec-mockData.js +3 -3
  53. package/lib/util/type-conversion-utils.d.ts +140 -0
  54. package/lib/util/type-conversion-utils.js +143 -0
  55. package/lib/util/type-defaults.d.ts +58 -0
  56. package/lib/util/type-defaults.js +58 -0
  57. package/lib/util/type-defaults.spec.js +5 -5
  58. package/lib/util/type-utils.d.ts +21 -0
  59. package/lib/util/type-utils.js +23 -0
  60. package/lib/util/type-utils.spec.js +2 -0
  61. package/package.json +21 -6
  62. package/scripts/copy-template.js +10 -0
  63. package/.github/pull_request_template.md +0 -31
  64. package/.github/workflows/flexplm-lib.yml +0 -27
  65. package/.github/workflows/publish-to-npm.yml +0 -121
  66. package/CHANGELOG.md +0 -32
  67. package/publish.bat +0 -5
  68. package/publish.sh +0 -5
  69. package/src/entity-processor/base-entity-processor.spec.ts +0 -460
  70. package/src/entity-processor/base-entity-processor.ts +0 -515
  71. package/src/flexplm-request.ts +0 -28
  72. package/src/flexplm-utils.spec.ts +0 -27
  73. package/src/flexplm-utils.ts +0 -29
  74. package/src/index.ts +0 -22
  75. package/src/interfaces/interfaces.ts +0 -122
  76. package/src/interfaces/item-family-changes.ts +0 -67
  77. package/src/interfaces/publish-change-data.ts +0 -43
  78. package/src/publish/base-process-publish-assortment-callback.ts +0 -50
  79. package/src/publish/base-process-publish-assortment.spec.ts +0 -1992
  80. package/src/publish/base-process-publish-assortment.ts +0 -1134
  81. package/src/publish/mockData.ts +0 -4561
  82. package/src/transform/identifier-conversion-spec-mockData.ts +0 -496
  83. package/src/transform/identifier-conversion.spec.ts +0 -354
  84. package/src/transform/identifier-conversion.ts +0 -282
  85. package/src/util/config-defaults.spec.ts +0 -350
  86. package/src/util/config-defaults.ts +0 -93
  87. package/src/util/data-converter-spec-mockData.ts +0 -231
  88. package/src/util/data-converter.spec.ts +0 -1041
  89. package/src/util/data-converter.ts +0 -762
  90. package/src/util/error-response-object.spec.ts +0 -116
  91. package/src/util/error-response-object.ts +0 -50
  92. package/src/util/event-short-message-status.ts +0 -22
  93. package/src/util/federation.ts +0 -172
  94. package/src/util/flexplm-connect.spec.ts +0 -132
  95. package/src/util/flexplm-connect.ts +0 -208
  96. package/src/util/logger-config.ts +0 -20
  97. package/src/util/map-util-spec-mockData.ts +0 -231
  98. package/src/util/map-utils.spec.ts +0 -103
  99. package/src/util/map-utils.ts +0 -41
  100. package/src/util/mockData.ts +0 -101
  101. package/src/util/thumbnail-util.spec.ts +0 -508
  102. package/src/util/thumbnail-util.ts +0 -272
  103. package/src/util/type-conversion-utils-spec-mockData.ts +0 -271
  104. package/src/util/type-conversion-utils.spec.ts +0 -968
  105. package/src/util/type-conversion-utils.ts +0 -460
  106. package/src/util/type-defaults.spec.ts +0 -669
  107. package/src/util/type-defaults.ts +0 -281
  108. package/src/util/type-utils.spec.ts +0 -227
  109. package/src/util/type-utils.ts +0 -144
  110. package/tsconfig.json +0 -24
  111. package/tslint.json +0 -57
@@ -1,272 +0,0 @@
1
- import { Logger } from '@contrail/app-framework';
2
- import { Content, Entities } from '@contrail/sdk';
3
- import { FCConfig } from '../interfaces/interfaces';
4
- import { FlexPLMConnect } from './flexplm-connect';
5
-
6
- interface ContentCustomSize {
7
- id: string;
8
- slug: string;
9
- name: string;
10
- };
11
- export class ThumbnailUtil {
12
- /** The max_thumbnail_size is for limiting the size of the thumbnail being sent to FlexPLM. It is used when checking the size of the auto generated thumbnails (smallViewable, tinyViewable, etc.). */
13
- private max_thumbnail_size = 5 * 1_024 * 1_024;
14
- private entities: Entities;
15
- static NEW_THUMBNAIL_ID = 'NEW_THUMBNAIL_ID';
16
- static EXISTING_THUMBNAIL_ID = 'EXISTING_THUMBNAIL_ID';
17
- static REMOVE_THUMBNAIL = 'REMOVE_THUMBNAIL';
18
- static OOB_SIZES = [{ slug: 'largeViewable' }, { slug: 'mediumLargeViewable' }, { slug: 'mediumViewable' }, { slug: 'smallViewable' }, { slug: 'tinyViewable' }]
19
- constructor(private config: FCConfig){
20
- this.entities = new Entities();
21
- if(this.config['max_thumbnail_size']){
22
- this.max_thumbnail_size = this.config['max_thumbnail_size'];
23
- }
24
- }
25
- async setOutboundThumbnail(data, event){
26
- if(event?.newData?.primaryViewableId && event?.newData?.largeViewableDownloadUrl){
27
- const primaryViewableId = event.newData.primaryViewableId;
28
-
29
- //get custom sizes
30
- const fileId = await this.getFileId(primaryViewableId);
31
-
32
- if(fileId){
33
- const customSizes = await this.getCustomSizes();
34
- const key = (this.isThumbnailNew(event, customSizes))
35
- ? ThumbnailUtil.NEW_THUMBNAIL_ID
36
- : ThumbnailUtil.EXISTING_THUMBNAIL_ID;
37
- data[key] = fileId;
38
- }
39
- } else if(event?.propertyDiffs?.largeViewableDownloadUrl?.oldValue && !event?.propertyDiffs?.largeViewableDownloadUrl?.newValue){
40
- data[ThumbnailUtil.NEW_THUMBNAIL_ID] = ThumbnailUtil.REMOVE_THUMBNAIL;
41
-
42
- }
43
- return data;
44
- }
45
- /** Determines if a new image has been generated. If any viewable is new, there might be a better
46
- * sized image. So send the fileId as new.
47
- */
48
- public isThumbnailNew(event, customSizes: any[]): boolean {
49
- const propertyDiffs = event?.propertyDiffs;
50
- if(propertyDiffs){
51
- const diffKeys = Object.keys(propertyDiffs);
52
- const sizeKeys = ThumbnailUtil.OOB_SIZES.map( s => s.slug + 'DownloadUrl');
53
- if(customSizes){
54
- sizeKeys.push(...customSizes.map(s => s.slug+ 'Url'));
55
- }
56
- sizeKeys.push('primaryFileUrl');
57
- console.info('diffKeys: ' + JSON.stringify(diffKeys));
58
- console.info('sizeKeys: ' + JSON.stringify(sizeKeys));
59
- return diffKeys.some(s => sizeKeys.includes(s));
60
- }
61
- return false;
62
- }
63
-
64
- public async getFileId(primaryViewableId: string): Promise<string | undefined> {
65
- console.info('ThumbnailUtil.getFileId()-' + primaryViewableId);
66
- const sizes = await this.getCustomSizes();
67
-
68
- const OOBSizes = JSON.parse(JSON.stringify(ThumbnailUtil.OOB_SIZES));
69
- sizes.push(...OOBSizes);
70
- console.info('sizes: ' + JSON.stringify(sizes));
71
-
72
- //get Content
73
- const content = await this.getContentEntity(primaryViewableId, sizes);
74
- if (!content) {
75
- return undefined;
76
- }
77
-
78
- const contentKeys = Object.getOwnPropertyNames(content);
79
- const isDebugOn = Logger.isDebugOn();
80
-
81
- let fileId = undefined;
82
- let tempFileSize = 0;
83
-
84
- for(const size of sizes){
85
- const slug = size?.slug;
86
- if(contentKeys.includes(slug)){
87
- const file = content[slug];
88
- if(isDebugOn){
89
- console.debug('size: ' + slug);
90
- console.debug('fileId: ' + file['id']);
91
- }
92
- if(file && file['size'] > tempFileSize && file['size'] < this.max_thumbnail_size){
93
- tempFileSize = file['size'];
94
- fileId = file['id'];
95
- if(isDebugOn){
96
- console.debug('fileId: ' + fileId);
97
- }
98
- }
99
- }
100
- }
101
- console.info('ThumbnailUtil.getFileId(): returning-' + fileId);
102
- return fileId;
103
- }
104
-
105
- async getCustomSizes(): Promise<ContentCustomSize[]> {
106
- const customSizes = await this.entities.get({
107
- entityName: 'content-custom-size'
108
- });
109
- const sizes: ContentCustomSize[] = [];
110
- sizes.push(...customSizes);
111
- return sizes;
112
- }
113
-
114
- async getContentEntity(primaryViewableId: any, sizes: ContentCustomSize[]) {
115
- const relations = sizes.map(s => s.slug);
116
- relations.push('primaryFile');
117
- const content = await this.entities.get({
118
- entityName: 'content',
119
- id: primaryViewableId,
120
- relations
121
- });
122
- this.logContentResults(content, relations);
123
- return content;
124
- }
125
-
126
- /** This outputs the content entity, without the inflated file entities.
127
- * To help debugging issues with sending the thumbnail info.
128
- * The inflated entities are removed, because are large and cause
129
- * problems with log file size limits.
130
- *
131
- * @param content: the content with inflated objects
132
- * @param relations: string[] of the slugs for inflated objects
133
- */
134
- logContentResults(content: any, relations: string[]) {
135
- if(Logger.isDebugOn() && content && relations){
136
- const contentCopy = JSON.parse(JSON.stringify(content));
137
- relations.forEach(r => {
138
- delete contentCopy[r];
139
- });
140
- console.debug('content: ' + JSON.stringify(contentCopy));
141
- }
142
- }
143
-
144
- /** Syncs the thumbnail from FlexPLM to VibeIQ. Handles creating, replacing, or removing
145
- * the primary viewable content and persists the updates directly to the entity.
146
- *
147
- * @param entityId - The ID of the entity to update with thumbnail properties.
148
- * @param primaryViewableId - The existing primary viewable content ID, if any.
149
- * @param event - The inbound event containing thumbnail data (NEW_THUMBNAIL_ID / EXISTING_THUMBNAIL_ID).
150
- * @param entityName - The entity type name (e.g. 'item', 'color') used for API calls.
151
- * @returns The updated entity, or undefined if no thumbnail changes were needed.
152
- */
153
- async syncThumbnailToVibeIQ({ entityId, primaryViewableId, event, entityName }: { entityId: string; primaryViewableId?: string; event: any; entityName: string }): Promise<any> {
154
- console.debug(`syncThumbnailToVibeIQ: entityId=${entityId}, primaryViewableId=${primaryViewableId}, entityName=${entityName}`);
155
- const eventData = event.data || {};
156
- const newThumbnailId = eventData[ThumbnailUtil.NEW_THUMBNAIL_ID];
157
- const existingThumbnailId = eventData[ThumbnailUtil.EXISTING_THUMBNAIL_ID];
158
- const thumbnailUrl = newThumbnailId || existingThumbnailId;
159
-
160
- // Case 1: REMOVE_THUMBNAIL
161
- if (newThumbnailId === ThumbnailUtil.REMOVE_THUMBNAIL) {
162
- if (primaryViewableId) {
163
- await this.entities.delete({ entityName: 'content', id: primaryViewableId });
164
- }
165
- const clearUpdates = await this.getClearPrimaryViewableUpdates();
166
- const updatedEntity = await this.entities.update({ entityName, id: entityId, object: clearUpdates });
167
- console.debug(`syncThumbnailToVibeIQ: applied clear updates for entityId=${entityId}`);
168
- return updatedEntity;
169
- }
170
-
171
- // Early return if no thumbnail URL
172
- if (!thumbnailUrl) {
173
- console.debug(`syncThumbnailToVibeIQ: no thumbnail URL for entityId=${entityId}`);
174
- return undefined;
175
- }
176
-
177
- // Case 2: No existing primaryViewableId — create new content
178
- if (!primaryViewableId) {
179
- const content = await this.createContentFromFlexPLM(thumbnailUrl, entityId, entityName);
180
- await this.entities.update({ entityName: 'content', id: content.id, object: { flexplmThumbnailUrl: thumbnailUrl } });
181
- const primaryUpdates = await this.getPrimaryViewableUpdates(content);
182
- const updatedEntity = await this.entities.update({ entityName, id: entityId, object: primaryUpdates });
183
- console.debug(`syncThumbnailToVibeIQ: created new content ${content.id} for entityId=${entityId}`);
184
- return updatedEntity;
185
- }
186
-
187
- // Case 3: Has primaryViewableId — check if thumbnail changed
188
- const primaryViewable = await this.entities.get({ entityName: 'content', id: primaryViewableId });
189
- if (primaryViewable?.flexplmThumbnailUrl === thumbnailUrl) {
190
- console.debug(`syncThumbnailToVibeIQ: thumbnail already synced for entityId=${entityId}`);
191
- return undefined; // Already synced
192
- }
193
-
194
- const content = await this.createContentFromFlexPLM(thumbnailUrl, entityId, entityName);
195
- await this.entities.update({ entityName: 'content', id: content.id, object: { flexplmThumbnailUrl: thumbnailUrl } });
196
- const primaryUpdates = await this.getPrimaryViewableUpdates(content);
197
- const updatedEntity = await this.entities.update({ entityName, id: entityId, object: primaryUpdates });
198
- await this.entities.delete({ entityName: 'content', id: primaryViewableId });
199
- console.debug(`syncThumbnailToVibeIQ: replaced content ${primaryViewableId} with ${content.id} for entityId=${entityId}`);
200
- return updatedEntity;
201
- }
202
-
203
- private async createContentFromFlexPLM(thumbnailUrl: string, entityId: string, entityName: string): Promise<any> {
204
- const urlParts = thumbnailUrl.split('/');
205
- const fileName = urlParts[urlParts.length - 1] || 'thumbnail';
206
-
207
- const encodedUrl = urlParts.map(part => encodeURIComponent(part)).join('/');
208
- const flexPLMConnect = new FlexPLMConnect(this.config);
209
- const response = await flexPLMConnect.getRequest({
210
- urlPath: encodedUrl,
211
- includeUrlContext: false,
212
- returnFullResponse: true,
213
- }) as Response;
214
-
215
- const fileBuffer = await response.arrayBuffer();
216
- const buffer = Buffer.from(fileBuffer);
217
- const contentTypeHeader = response.headers.get('content-type');
218
- const contentType = contentTypeHeader ? contentTypeHeader.split(';')[0] : 'application/octet-stream';
219
-
220
- const contentHolderReference = `${entityName}:${entityId}`;
221
- const content = await new Content().create({
222
- fileBuffer: buffer,
223
- fileName,
224
- contentType,
225
- contentHolderReference,
226
- });
227
- return content;
228
- }
229
-
230
- private async getPrimaryViewableUpdates(content: any): Promise<any> {
231
- const updates: any = {
232
- primaryViewableId: content.id,
233
- contentType: content.contentType,
234
- fileName: content.fileName,
235
- primaryFileUrl: content.primaryFileUrl,
236
- largeViewableDownloadUrl: content.largeViewableUrl || content.primaryFileUrl,
237
- mediumLargeViewableDownloadUrl: content.mediumLargeViewableUrl || content.primaryFileUrl,
238
- mediumViewableDownloadUrl: content.mediumViewableUrl || content.primaryFileUrl,
239
- smallViewableDownloadUrl: content.smallViewableUrl || content.primaryFileUrl,
240
- tinyViewableDownloadUrl: content.tinyViewableUrl || content.primaryFileUrl,
241
- };
242
-
243
- const customSizes = await this.getCustomSizes();
244
- for (const size of customSizes) {
245
- updates[`${size.slug}DownloadUrl`] = content[`${size.slug}Url`] || content.primaryFileUrl;
246
- }
247
-
248
- return updates;
249
- }
250
-
251
- private async getClearPrimaryViewableUpdates(): Promise<any> {
252
- const updates: any = {
253
- primaryViewableId: null,
254
- contentType: null,
255
- fileName: null,
256
- primaryFileUrl: null,
257
- largeViewableDownloadUrl: null,
258
- mediumLargeViewableDownloadUrl: null,
259
- mediumViewableDownloadUrl: null,
260
- smallViewableDownloadUrl: null,
261
- tinyViewableDownloadUrl: null,
262
- };
263
-
264
- const customSizes = await this.getCustomSizes();
265
- for (const size of customSizes) {
266
- updates[`${size.slug}DownloadUrl`] = null;
267
- }
268
-
269
- return updates;
270
- }
271
-
272
- }
@@ -1,271 +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
-
31
- return mapKey;
32
- }
33
- }
34
- },
35
- flex2vibe: {
36
- LCSLast: {
37
- getMapKey: (object) =>{ return 'catName';}
38
- },
39
- LCSRevisableEntity : {
40
- getMapKey: (object) =>{
41
- const typePath = object['flexPLMTypePath'];
42
- let mapKey = '';
43
- switch (typePath) {
44
- case 'Revisable Entity\\packaging':
45
- mapKey = 'packaging';
46
- break
47
- case 'Revisable Entity\\prefix':
48
- mapKey = 'prefix';
49
- break
50
- };
51
- return mapKey;
52
- }
53
- }
54
- }
55
-
56
- },
57
- LCSProduct: {
58
- vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
59
- vibe2flex: {
60
- getClass: () => 'LCSProduct',
61
- getSoftType: (entity /*, dependencies*/) =>{
62
- const prodType = entity['prodType'];
63
- let val = '';
64
- switch (prodType) {
65
- case 'acc':
66
- val = 'Product\\Accesories';
67
- break;
68
- case 'app':
69
- val = 'Product\\Apparel';
70
- break;
71
- case 'eqp':
72
- val = 'Product\\Equipment';
73
- break;
74
- case 'foot':
75
- val = 'Product\\Footwear';
76
- break;
77
- }
78
-
79
- return val;
80
- },
81
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }, { processor: 'VALUE_TRANSFORM', functionTransformersKey: 'valueTransform' }],
82
- rekey: {
83
- productName: 'name',
84
- vibeIQIdentifier: 'itemNumber'
85
- },
86
- valueTransform: {
87
- transformEx: (row/*, dependencies*/) => {
88
- return row['otherProp'] + 'xxx';
89
- }
90
- }
91
-
92
- },
93
- flex2vibe: {
94
- getClass: () => 'item',
95
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
96
- rekey: {
97
- itemNumber: 'vibeIQIdentifier',
98
- name: 'productName',
99
- }
100
- }
101
- },
102
- LCSSKU: {
103
- vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
104
- vibe2flex: {
105
- getClass: () => 'LCSSKU',
106
- getSoftType: (entity /*, dependencies*/) =>{
107
- const prodType = entity['prodType'];
108
- let val = '';
109
- switch (prodType) {
110
- case 'acc':
111
- val = 'Product\\Accesories';
112
- break;
113
- case 'app':
114
- val = 'Product\\Apparel';
115
- break;
116
- case 'eqp':
117
- val = 'Product\\Equipment';
118
- break;
119
- case 'foot':
120
- val = 'Product\\Footwear';
121
- break;
122
- }
123
-
124
- return val;
125
- },
126
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
127
- rekey: {
128
- skuName: 'optionName',
129
- vibeIQIdentifier: 'itemNumber'
130
- }
131
- },
132
- flex2vibe: {
133
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
134
- rekey: {
135
- itemNumber: 'vibeIQIdentifier',
136
- optionName: 'skuName',
137
- }
138
- }
139
- },
140
-
141
- packaging: {
142
- isOutboundCreatable: (entity, context) => {
143
- return false;
144
- },
145
- syncInboundImages: (entity, context) => {
146
- return true;
147
- },
148
- syncOutboundImages: (entity, context) => {
149
- return false;
150
- },
151
- vibe2flex: {
152
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
153
- rekey: {
154
- retailPackType: 'packType',
155
- retailIntroDate: 'introDate'
156
- },
157
- getSoftType: () => 'Revisable Entity\\packaging',
158
- getClass: () => 'LCSRevisableEntity'
159
- },
160
- flex2vibe: {
161
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
162
- rekey: {
163
- packType: 'retailPackType',
164
- introDate: 'retailIntroDate'
165
- },
166
- getClass: () => 'custom-entity',
167
- getSoftType: () => 'custom-entity:pack',
168
-
169
- }
170
- },
171
- prefix: {
172
- isInboundCreatable: (object, context) => {
173
- if (context && context.skipPrefix) {
174
- return false;
175
- }
176
- return true;
177
- },
178
- isOutboundCreatable: (entity, context) => {
179
- if (context && context.skipPrefix) {
180
- return false;
181
- }
182
- return true;
183
- },
184
- syncInboundImages: (entity, context) => {
185
- if (context && context.skipImages) {
186
- return false;
187
- }
188
- return true;
189
- },
190
- syncOutboundImages: (entity, context) => {
191
- if (context && context.skipImages) {
192
- return false;
193
- }
194
- return true;
195
- },
196
- vibe2flex: {
197
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
198
- rekey: {
199
- retailOwner: 'owner',
200
- retailIntroDate: 'introDate'
201
- },
202
- getSoftType: () => 'Revisable Entity\\prefix',
203
- getClass: () => 'LCSRevisableEntity'
204
- },
205
- flex2vibe: {
206
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
207
- rekey: {
208
- owner: 'retailOwner',
209
- introDate: 'retailIntroDate'
210
- },
211
- getClass: () => 'custom-entity',
212
- getSoftType: () => 'custom-entity:prefix',
213
-
214
- }
215
- },
216
- catName: {
217
- getIdentifierProperties: () => ['catName', 'catNumber'],
218
- getInformationalProperties: () => ['longName'],
219
- vibe2flex: {
220
- transformOrder: [],
221
- getSoftType: () => 'Last\\catName',
222
- getClass: () => 'LCSLast'
223
- },
224
- flex2vibe: {
225
- transformOrder: [],
226
- getClass: () => 'custom-entity',
227
- getSoftType: () => 'custom-entity:catName',
228
-
229
- }
230
- },
231
- partnerOrg: {
232
- vibe2flex: {
233
- transformOrder: [],
234
- getSoftType: () => 'Business Object\\partnerOrg',
235
- getClass: () => 'LCSLifecycleManaged'
236
- },
237
- flex2vibe: {
238
- transformOrder: [],
239
- getClass: () => 'custom-entity',
240
- getSoftType: () => 'custom-entity:partnerOrg',
241
-
242
- }
243
- },
244
- catFamily: {
245
- vibe2flex: {
246
- transformOrder: [],
247
- getSoftType: () => 'Revisable Entity\\catFamily',
248
- getClass: () => 'LCSRevisableEntity'
249
- },
250
- flex2vibe: {
251
- transformOrder: [],
252
- getClass: () => 'custom-entity',
253
- getSoftType: () => 'custom-entity:catFamily',
254
-
255
- }
256
- },
257
- formName: {
258
- vibe2flex: {
259
- transformOrder: [],
260
- getSoftType: () => 'Material\\form',
261
- getClass: () => 'LCSMaterial'
262
- },
263
- flex2vibe: {
264
- transformOrder: [],
265
- getClass: () => 'custom-entity',
266
- getSoftType: () => 'custom-entity:formName',
267
-
268
- }
269
- },
270
-
271
- };