@contrail/flexplm 1.3.0 → 1.3.1-alpha.3507ab6
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/cli/commands/compile.d.ts +1 -0
- package/lib/cli/commands/compile.js +71 -0
- package/lib/cli/commands/compile.spec.d.ts +1 -0
- package/lib/cli/commands/compile.spec.js +80 -0
- package/lib/cli/commands/create.d.ts +1 -0
- package/lib/cli/commands/create.js +75 -0
- package/lib/cli/commands/create.spec.d.ts +1 -0
- package/lib/cli/commands/create.spec.js +78 -0
- package/lib/cli/commands/upload.d.ts +10 -0
- package/lib/cli/commands/upload.js +228 -0
- package/lib/cli/commands/upload.spec.d.ts +1 -0
- package/lib/cli/commands/upload.spec.js +88 -0
- package/lib/cli/index.d.ts +2 -0
- package/lib/cli/index.js +64 -0
- package/lib/cli/index.spec.d.ts +1 -0
- package/lib/cli/index.spec.js +79 -0
- package/lib/cli/template/mapping-template.ts.template +62 -0
- package/lib/entity-processor/base-entity-processor.d.ts +89 -42
- package/lib/entity-processor/base-entity-processor.js +438 -385
- package/lib/entity-processor/base-entity-processor.spec.d.ts +1 -1
- package/lib/entity-processor/base-entity-processor.spec.js +398 -397
- package/lib/flexplm-request.d.ts +3 -3
- package/lib/flexplm-request.js +34 -34
- package/lib/flexplm-utils.d.ts +5 -5
- package/lib/flexplm-utils.js +33 -33
- package/lib/flexplm-utils.spec.d.ts +1 -1
- package/lib/flexplm-utils.spec.js +26 -26
- package/lib/index.d.ts +23 -22
- package/lib/index.js +39 -38
- package/lib/interfaces/interfaces.d.ts +105 -105
- package/lib/interfaces/interfaces.js +2 -2
- package/lib/interfaces/item-family-changes.d.ts +20 -20
- package/lib/interfaces/item-family-changes.js +56 -56
- package/lib/interfaces/mapping-file.d.ts +460 -0
- package/lib/interfaces/mapping-file.js +2 -0
- package/lib/interfaces/publish-change-data.d.ts +19 -19
- package/lib/interfaces/publish-change-data.js +32 -32
- package/lib/publish/base-process-publish-assortment-callback.d.ts +9 -9
- package/lib/publish/base-process-publish-assortment-callback.js +38 -38
- package/lib/publish/base-process-publish-assortment.d.ts +118 -93
- package/lib/publish/base-process-publish-assortment.js +998 -944
- package/lib/publish/base-process-publish-assortment.spec.d.ts +1 -1
- package/lib/publish/base-process-publish-assortment.spec.js +1688 -1670
- package/lib/publish/mockData.d.ts +1389 -1389
- package/lib/publish/mockData.js +4524 -4519
- package/lib/transform/identifier-conversion-spec-mockData.js +472 -444
- package/lib/transform/identifier-conversion.d.ts +51 -15
- package/lib/transform/identifier-conversion.js +248 -212
- package/lib/transform/identifier-conversion.spec.d.ts +1 -1
- package/lib/transform/identifier-conversion.spec.js +343 -339
- package/lib/util/config-defaults.d.ts +8 -8
- package/lib/util/config-defaults.js +88 -85
- package/lib/util/config-defaults.spec.d.ts +1 -1
- package/lib/util/config-defaults.spec.js +302 -293
- package/lib/util/data-converter-spec-mockData.js +219 -205
- package/lib/util/data-converter.d.ts +136 -39
- package/lib/util/data-converter.js +718 -592
- package/lib/util/data-converter.spec.d.ts +1 -1
- package/lib/util/data-converter.spec.js +906 -904
- package/lib/util/error-response-object.d.ts +9 -4
- package/lib/util/error-response-object.js +54 -47
- package/lib/util/error-response-object.spec.d.ts +1 -1
- package/lib/util/error-response-object.spec.js +99 -99
- package/lib/util/event-short-message-status.d.ts +19 -19
- package/lib/util/event-short-message-status.js +24 -23
- package/lib/util/federation.d.ts +15 -15
- package/lib/util/federation.js +157 -149
- package/lib/util/flexplm-connect.d.ts +29 -22
- package/lib/util/flexplm-connect.js +190 -176
- package/lib/util/flexplm-connect.spec.d.ts +1 -1
- package/lib/util/flexplm-connect.spec.js +88 -88
- package/lib/util/logger-config.d.ts +1 -1
- package/lib/util/logger-config.js +27 -26
- package/lib/util/map-util-spec-mockData.js +219 -205
- package/lib/util/map-utils.d.ts +33 -6
- package/lib/util/map-utils.js +42 -15
- package/lib/util/map-utils.spec.d.ts +1 -1
- package/lib/util/map-utils.spec.js +89 -89
- package/lib/util/mockData.d.ts +80 -80
- package/lib/util/mockData.js +103 -103
- package/lib/util/thumbnail-util.d.ts +55 -34
- package/lib/util/thumbnail-util.js +242 -215
- package/lib/util/thumbnail-util.spec.d.ts +1 -1
- package/lib/util/thumbnail-util.spec.js +440 -434
- package/lib/util/type-conversion-utils-spec-mockData.js +259 -259
- package/lib/util/type-conversion-utils.d.ts +163 -23
- package/lib/util/type-conversion-utils.js +408 -265
- package/lib/util/type-conversion-utils.spec.d.ts +1 -1
- package/lib/util/type-conversion-utils.spec.js +868 -868
- package/lib/util/type-defaults.d.ts +74 -16
- package/lib/util/type-defaults.js +279 -221
- package/lib/util/type-defaults.spec.d.ts +1 -1
- package/lib/util/type-defaults.spec.js +516 -516
- package/lib/util/type-utils.d.ts +34 -13
- package/lib/util/type-utils.js +137 -114
- package/lib/util/type-utils.spec.d.ts +1 -1
- package/lib/util/type-utils.spec.js +192 -190
- package/package.json +21 -6
- package/scripts/copy-template.js +10 -0
- package/.claude/settings.local.json +0 -8
- package/.github/pull_request_template.md +0 -31
- package/.github/workflows/flexplm-lib.yml +0 -27
- package/.github/workflows/publish-to-npm.yml +0 -124
- package/CHANGELOG.md +0 -32
- package/publish.bat +0 -5
- package/publish.sh +0 -5
- package/src/entity-processor/base-entity-processor.spec.ts +0 -460
- package/src/entity-processor/base-entity-processor.ts +0 -515
- package/src/flexplm-request.ts +0 -28
- package/src/flexplm-utils.spec.ts +0 -27
- package/src/flexplm-utils.ts +0 -29
- package/src/index.ts +0 -22
- package/src/interfaces/interfaces.ts +0 -122
- package/src/interfaces/item-family-changes.ts +0 -67
- package/src/interfaces/publish-change-data.ts +0 -43
- package/src/publish/base-process-publish-assortment-callback.ts +0 -50
- package/src/publish/base-process-publish-assortment.spec.ts +0 -1992
- package/src/publish/base-process-publish-assortment.ts +0 -1134
- package/src/publish/mockData.ts +0 -4561
- package/src/transform/identifier-conversion-spec-mockData.ts +0 -496
- package/src/transform/identifier-conversion.spec.ts +0 -354
- package/src/transform/identifier-conversion.ts +0 -282
- package/src/util/config-defaults.spec.ts +0 -350
- package/src/util/config-defaults.ts +0 -93
- package/src/util/data-converter-spec-mockData.ts +0 -231
- package/src/util/data-converter.spec.ts +0 -1041
- package/src/util/data-converter.ts +0 -762
- package/src/util/error-response-object.spec.ts +0 -116
- package/src/util/error-response-object.ts +0 -50
- package/src/util/event-short-message-status.ts +0 -22
- package/src/util/federation.ts +0 -172
- package/src/util/flexplm-connect.spec.ts +0 -132
- package/src/util/flexplm-connect.ts +0 -208
- package/src/util/logger-config.ts +0 -20
- package/src/util/map-util-spec-mockData.ts +0 -231
- package/src/util/map-utils.spec.ts +0 -103
- package/src/util/map-utils.ts +0 -41
- package/src/util/mockData.ts +0 -101
- package/src/util/thumbnail-util.spec.ts +0 -508
- package/src/util/thumbnail-util.ts +0 -272
- package/src/util/type-conversion-utils-spec-mockData.ts +0 -271
- package/src/util/type-conversion-utils.spec.ts +0 -968
- package/src/util/type-conversion-utils.ts +0 -460
- package/src/util/type-defaults.spec.ts +0 -669
- package/src/util/type-defaults.ts +0 -281
- package/src/util/type-utils.spec.ts +0 -227
- package/src/util/type-utils.ts +0 -144
- package/tsconfig.json +0 -29
- package/tslint.json +0 -57
|
@@ -1,205 +1,219 @@
|
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
rekey:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
getClass: () => 'custom-entity',
|
|
166
|
-
getSoftType: () => 'custom-entity:
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
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
|
+
// LCSRevisableEntity: {
|
|
36
|
+
// getMapKey: (object) =>{ return object;}
|
|
37
|
+
// },
|
|
38
|
+
// LCSLast: {
|
|
39
|
+
// getMapKey: (object) => {return object;}
|
|
40
|
+
// },
|
|
41
|
+
// LCSMaterial: {
|
|
42
|
+
// getMapKey: (object) =>{ return object;}
|
|
43
|
+
// },
|
|
44
|
+
// LCSBusinessObject: {
|
|
45
|
+
// getMapKey: (object) => {return object;}
|
|
46
|
+
// }
|
|
47
|
+
// },
|
|
48
|
+
},
|
|
49
|
+
LCSProduct: {
|
|
50
|
+
vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
|
|
51
|
+
vibe2flex: {
|
|
52
|
+
getClass: () => 'LCSProduct',
|
|
53
|
+
getSoftType: (entity /*, dependencies*/) => {
|
|
54
|
+
const prodType = entity['prodType'];
|
|
55
|
+
let val = '';
|
|
56
|
+
switch (prodType) {
|
|
57
|
+
case 'acc':
|
|
58
|
+
val = 'Product\\Accesories';
|
|
59
|
+
break;
|
|
60
|
+
case 'app':
|
|
61
|
+
val = 'Product\\Apparel';
|
|
62
|
+
break;
|
|
63
|
+
case 'eqp':
|
|
64
|
+
val = 'Product\\Equipment';
|
|
65
|
+
break;
|
|
66
|
+
case 'foot':
|
|
67
|
+
val = 'Product\\Footwear';
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
return val;
|
|
71
|
+
},
|
|
72
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }, { processor: 'VALUE_TRANSFORM', functionTransformersKey: 'valueTransform' }],
|
|
73
|
+
rekey: {
|
|
74
|
+
productName: 'name',
|
|
75
|
+
vibeIQIdentifier: 'itemNumber'
|
|
76
|
+
},
|
|
77
|
+
valueTransform: {
|
|
78
|
+
transformEx: (row /*, dependencies*/) => {
|
|
79
|
+
return row['otherProp'] + 'xxx';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
flex2vibe: {
|
|
84
|
+
getClass: () => 'item',
|
|
85
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
86
|
+
rekey: {
|
|
87
|
+
itemNumber: 'vibeIQIdentifier',
|
|
88
|
+
name: 'productName',
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
LCSSKU: {
|
|
93
|
+
vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
|
|
94
|
+
vibe2flex: {
|
|
95
|
+
getClass: () => 'LCSSKU',
|
|
96
|
+
getSoftType: (entity /*, dependencies*/) => {
|
|
97
|
+
const prodType = entity['prodType'];
|
|
98
|
+
let val = '';
|
|
99
|
+
switch (prodType) {
|
|
100
|
+
case 'acc':
|
|
101
|
+
val = 'Product\\Accesories';
|
|
102
|
+
break;
|
|
103
|
+
case 'app':
|
|
104
|
+
val = 'Product\\Apparel';
|
|
105
|
+
break;
|
|
106
|
+
case 'eqp':
|
|
107
|
+
val = 'Product\\Equipment';
|
|
108
|
+
break;
|
|
109
|
+
case 'foot':
|
|
110
|
+
val = 'Product\\Footwear';
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
return val;
|
|
114
|
+
},
|
|
115
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
116
|
+
rekey: {
|
|
117
|
+
skuName: 'optionName',
|
|
118
|
+
vibeIQIdentifier: 'itemNumber'
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
flex2vibe: {
|
|
122
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
123
|
+
rekey: {
|
|
124
|
+
itemNumber: 'vibeIQIdentifier',
|
|
125
|
+
optionName: 'skuName',
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
packaging: {
|
|
130
|
+
vibe2flex: {
|
|
131
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
132
|
+
rekey: {
|
|
133
|
+
retailPackType: 'packType',
|
|
134
|
+
retailIntroDate: 'introDate'
|
|
135
|
+
},
|
|
136
|
+
getSoftType: () => 'Revisable Entity\\packaging',
|
|
137
|
+
getClass: () => 'LCSRevisableEntity'
|
|
138
|
+
},
|
|
139
|
+
flex2vibe: {
|
|
140
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
141
|
+
rekey: {
|
|
142
|
+
packType: 'retailPackType',
|
|
143
|
+
introDate: 'retailIntroDate'
|
|
144
|
+
},
|
|
145
|
+
getClass: () => 'custom-entity',
|
|
146
|
+
getSoftType: () => 'custom-entity:pack',
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
prefix: {
|
|
150
|
+
vibe2flex: {
|
|
151
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
152
|
+
rekey: {
|
|
153
|
+
retailOwner: 'owner',
|
|
154
|
+
retailIntroDate: 'introDate'
|
|
155
|
+
},
|
|
156
|
+
getSoftType: () => 'Revisable Entity\\prefix',
|
|
157
|
+
getClass: () => 'LCSRevisableEntity'
|
|
158
|
+
},
|
|
159
|
+
flex2vibe: {
|
|
160
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
161
|
+
rekey: {
|
|
162
|
+
owner: 'retailOwner',
|
|
163
|
+
introDate: 'retailIntroDate'
|
|
164
|
+
},
|
|
165
|
+
getClass: () => 'custom-entity',
|
|
166
|
+
getSoftType: () => 'custom-entity:prefix',
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
catName: {
|
|
170
|
+
getIdentifierProperties: () => ['catName', 'catNumber'],
|
|
171
|
+
getInformationalProperties: () => ['longName'],
|
|
172
|
+
vibe2flex: {
|
|
173
|
+
transformOrder: [],
|
|
174
|
+
getSoftType: () => 'Last\\catName',
|
|
175
|
+
getClass: () => 'LCSLast'
|
|
176
|
+
},
|
|
177
|
+
flex2vibe: {
|
|
178
|
+
transformOrder: [],
|
|
179
|
+
getClass: () => 'custom-entity',
|
|
180
|
+
getSoftType: () => 'custom-entity:catName',
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
partnerOrg: {
|
|
184
|
+
vibe2flex: {
|
|
185
|
+
transformOrder: [],
|
|
186
|
+
getSoftType: () => 'Business Object\\partnerOrg',
|
|
187
|
+
getClass: () => 'LCSLifecycleManaged'
|
|
188
|
+
},
|
|
189
|
+
flex2vibe: {
|
|
190
|
+
transformOrder: [],
|
|
191
|
+
getClass: () => 'custom-entity',
|
|
192
|
+
getSoftType: () => 'custom-entity:partnerOrg',
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
catFamily: {
|
|
196
|
+
vibe2flex: {
|
|
197
|
+
transformOrder: [],
|
|
198
|
+
getSoftType: () => 'Revisable Entity\\catFamily',
|
|
199
|
+
getClass: () => 'LCSRevisableEntity'
|
|
200
|
+
},
|
|
201
|
+
flex2vibe: {
|
|
202
|
+
transformOrder: [],
|
|
203
|
+
getClass: () => 'custom-entity',
|
|
204
|
+
getSoftType: () => 'custom-entity:catFamily',
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
formName: {
|
|
208
|
+
vibe2flex: {
|
|
209
|
+
transformOrder: [],
|
|
210
|
+
getSoftType: () => 'Material\\form',
|
|
211
|
+
getClass: () => 'LCSMaterial'
|
|
212
|
+
},
|
|
213
|
+
flex2vibe: {
|
|
214
|
+
transformOrder: [],
|
|
215
|
+
getClass: () => 'custom-entity',
|
|
216
|
+
getSoftType: () => 'custom-entity:formName',
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
};
|
|
@@ -1,39 +1,136 @@
|
|
|
1
|
-
import { FCConfig } from '../interfaces/interfaces';
|
|
2
|
-
import { MapFileUtil } from '@contrail/transform-data';
|
|
3
|
-
export declare class DataConverter {
|
|
4
|
-
private config;
|
|
5
|
-
private mapFileUtil;
|
|
6
|
-
private typeUtils;
|
|
7
|
-
private transformMapFile;
|
|
8
|
-
private useDisplayForEnumerationMatching;
|
|
9
|
-
private verboseDebug;
|
|
10
|
-
private objRefCache;
|
|
11
|
-
private userRefCache;
|
|
12
|
-
static staticUserCache: {};
|
|
13
|
-
static clearStaticUserCache(): void;
|
|
14
|
-
static getFromStaticCache(id: string): any;
|
|
15
|
-
static setToStaticCache(id: string, value: any): void;
|
|
16
|
-
constructor(config: FCConfig, mapFileUtil: MapFileUtil);
|
|
17
|
-
setVerboseDebug(val?: boolean): void;
|
|
18
|
-
isVerboseDebugOn(): boolean;
|
|
19
|
-
getFlexPLMObjectDataFromEvent(event: any, dataToSkip: string[]): Promise<{}>;
|
|
20
|
-
getFlexPLMObjectData(newData: any, dataToSkip: string[], inflateObjRef: boolean): Promise<{}>;
|
|
21
|
-
getFlexPLMValue(prop: any, newData: any, inflateObjRef: boolean): Promise<any>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { FCConfig } from '../interfaces/interfaces';
|
|
2
|
+
import { MapFileUtil } from '@contrail/transform-data';
|
|
3
|
+
export declare class DataConverter {
|
|
4
|
+
private config;
|
|
5
|
+
private mapFileUtil;
|
|
6
|
+
private typeUtils;
|
|
7
|
+
private transformMapFile;
|
|
8
|
+
private useDisplayForEnumerationMatching;
|
|
9
|
+
private verboseDebug;
|
|
10
|
+
private objRefCache;
|
|
11
|
+
private userRefCache;
|
|
12
|
+
static staticUserCache: {};
|
|
13
|
+
static clearStaticUserCache(): void;
|
|
14
|
+
static getFromStaticCache(id: string): any;
|
|
15
|
+
static setToStaticCache(id: string, value: any): void;
|
|
16
|
+
constructor(config: FCConfig, mapFileUtil: MapFileUtil);
|
|
17
|
+
setVerboseDebug(val?: boolean): void;
|
|
18
|
+
isVerboseDebugOn(): boolean;
|
|
19
|
+
getFlexPLMObjectDataFromEvent(event: any, dataToSkip: string[]): Promise<{}>;
|
|
20
|
+
getFlexPLMObjectData(newData: any, dataToSkip: string[], inflateObjRef: boolean): Promise<{}>;
|
|
21
|
+
getFlexPLMValue(prop: any, newData: any, inflateObjRef: boolean): Promise<any>;
|
|
22
|
+
/** Returns the display values for list properties (choice & multi_select)
|
|
23
|
+
*
|
|
24
|
+
* @param prop
|
|
25
|
+
* @param newData
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
getEnumerationValue(prop: any, nd: any): any;
|
|
29
|
+
getObjectReferenceValue(prop: any, newData: any, inflateObjRef?: boolean): Promise<any>;
|
|
30
|
+
/** (Deprecated) Use TypeConversionUtils.getMapKey()
|
|
31
|
+
* Will return the class to use to get mapping.
|
|
32
|
+
* This is needed because mappings will be different for different sub types
|
|
33
|
+
* of custom-entity
|
|
34
|
+
*
|
|
35
|
+
* @param obj: Entity being checked
|
|
36
|
+
* @param mapping: The whole mapping file
|
|
37
|
+
*/
|
|
38
|
+
getMappingClass(entity: object, mapping: any): string;
|
|
39
|
+
/** Sets entity values from FlexPLM data passed in
|
|
40
|
+
* Assumes the entity has a VibeIQ typeId and 'roles' value to filter if necessary.
|
|
41
|
+
* @param entity the entity to update
|
|
42
|
+
* @param data the FlexPLM data
|
|
43
|
+
* @param keysToSkip properties to skip
|
|
44
|
+
* @returns the modified entity with VibeIQ values
|
|
45
|
+
*/
|
|
46
|
+
setEntityValues(entity: any, data: any, keysToSkip?: string[]): Promise<any>;
|
|
47
|
+
/** Gets the entity values from FlexPLM data
|
|
48
|
+
* Assumes there isn't a VibeIQ typeId, so uses FlexPLM data to determine type
|
|
49
|
+
* @param objectClass FlexPLM object class
|
|
50
|
+
* @param data object data
|
|
51
|
+
* @param keysToSkip type properties to not process
|
|
52
|
+
* @returns object with VibeIQ values
|
|
53
|
+
*/
|
|
54
|
+
getEntityValues(objectClass: string, data: any, keysToSkip?: string[]): Promise<{}>;
|
|
55
|
+
/** Gets the VibeIQ value for the property from data
|
|
56
|
+
*
|
|
57
|
+
* @param prop the VibeIQ property
|
|
58
|
+
* @param data the FlexPLM data
|
|
59
|
+
* @returns value to be set in VibeIQ
|
|
60
|
+
*/
|
|
61
|
+
getEntityValue(prop: any, data: any): Promise<any>;
|
|
62
|
+
setEnumerationKeys(prop: any, nd: any, matchByDisplay: any): any;
|
|
63
|
+
/** Compares the potential changes to the entity and returns only the actual differences.
|
|
64
|
+
*
|
|
65
|
+
* @param entity the full entity
|
|
66
|
+
* @param changes the potential changes
|
|
67
|
+
* @returns only the change values that are different from the entity's value
|
|
68
|
+
*/
|
|
69
|
+
getPersistableChanges(entity: object, changes: object): object;
|
|
70
|
+
/** Sets object reference value from FlexPLM data passed in
|
|
71
|
+
*
|
|
72
|
+
* @param prop the VibeIQ property
|
|
73
|
+
* @param nd the VibeIQ data
|
|
74
|
+
* @returns the object reference id from VibeIQ
|
|
75
|
+
*/
|
|
76
|
+
setObjectReferenceValue(prop: any, nd: any): Promise<any>;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves all object references of a specified entity type based on the provided criteria.
|
|
79
|
+
* This function handles pagination and asynchronously fetches object references until there are no more pages.
|
|
80
|
+
* @param {string} entityType - The type of entity for which object references are to be retrieved.
|
|
81
|
+
* @param {object} rootTypeCriteria - The criteria used to filter object references.
|
|
82
|
+
* @returns {Promise<Array>} A Promise that resolves to an array containing all object references.
|
|
83
|
+
*/
|
|
84
|
+
getAllObjectReferences(entityType: string, rootTypeCriteria: any, postProcessCriteria?: any): Promise<any[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Checks if all keys and values of a given object are present in an array of objects.
|
|
87
|
+
* @param {Object} criteria - The object whose keys and values are to be checked in the array of objects.
|
|
88
|
+
* @param {Array<Object>} arrayOfObjects - The array of objects to be searched for matching keys and values.
|
|
89
|
+
* @param {string} entityTypePath - The type / subtype for the property; objects must be this type or a sub type of it.
|
|
90
|
+
* @returns {(Object|boolean)} Returns the array of objects that matches all keys and values of the provided object.
|
|
91
|
+
* If no match is found, returns empty array.
|
|
92
|
+
*/
|
|
93
|
+
checkKeysAndValues(criteria: any, arrayOfObjects: any, entityTypePath: any): any[];
|
|
94
|
+
/** Filters out archived and trashed entities from the provided array of entities.
|
|
95
|
+
*
|
|
96
|
+
* @param entities
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
filterOutArchivedAndTrashedEntities(entities: any[]): any[];
|
|
100
|
+
/** Sets userListId value from FlexPLM data passed in
|
|
101
|
+
*
|
|
102
|
+
* @param prop the VibeIQ property
|
|
103
|
+
* @param nd the VibeIQ data
|
|
104
|
+
* @returns the modified entity with FlexPLM values
|
|
105
|
+
*/
|
|
106
|
+
setUserListValue(prop: any, nd: any): Promise<any>;
|
|
107
|
+
/** Makes batch calls of 1000 of user-org entities until
|
|
108
|
+
* it find one with userEmail of passed in nd.email.
|
|
109
|
+
* Maxes out after querying for 15,000 user-org entities
|
|
110
|
+
*
|
|
111
|
+
* @param nd
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
getUserByEmail(nd: any): Promise<any>;
|
|
115
|
+
/** Shows warning if user email address not present in group associated to property
|
|
116
|
+
*
|
|
117
|
+
* @param prop the VibeIQ property
|
|
118
|
+
* @param userEmail user email address
|
|
119
|
+
*/
|
|
120
|
+
processGroupMemberCheck(prop: any, userEmail: any): Promise<void>;
|
|
121
|
+
/** Gets the VibeIQ value for the userList property from data
|
|
122
|
+
*
|
|
123
|
+
* @param prop the VibeIQ property
|
|
124
|
+
* @param newData the FlexPLM data
|
|
125
|
+
* @returns value to be set in VibeIQ
|
|
126
|
+
*/
|
|
127
|
+
getUserListValue(prop: any, newData: any): Promise<any>;
|
|
128
|
+
/** Makes batch calls of 1000 of user-org entities until
|
|
129
|
+
* it find one with user.id of passed in userId.
|
|
130
|
+
* Maxes out after querying for 15,000 user-org entities
|
|
131
|
+
*
|
|
132
|
+
* @param userId
|
|
133
|
+
* @returns
|
|
134
|
+
*/
|
|
135
|
+
getUserById(userId: any): Promise<any>;
|
|
136
|
+
}
|