@contrail/flexplm 1.3.0 → 1.3.1-alpha.585afc1

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 (149) 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 +89 -42
  19. package/lib/entity-processor/base-entity-processor.js +438 -385
  20. package/lib/entity-processor/base-entity-processor.spec.d.ts +1 -1
  21. package/lib/entity-processor/base-entity-processor.spec.js +398 -397
  22. package/lib/flexplm-request.d.ts +3 -3
  23. package/lib/flexplm-request.js +34 -34
  24. package/lib/flexplm-utils.d.ts +5 -5
  25. package/lib/flexplm-utils.js +33 -33
  26. package/lib/flexplm-utils.spec.d.ts +1 -1
  27. package/lib/flexplm-utils.spec.js +26 -26
  28. package/lib/index.d.ts +23 -22
  29. package/lib/index.js +39 -38
  30. package/lib/interfaces/interfaces.d.ts +105 -105
  31. package/lib/interfaces/interfaces.js +2 -2
  32. package/lib/interfaces/item-family-changes.d.ts +20 -20
  33. package/lib/interfaces/item-family-changes.js +56 -56
  34. package/lib/interfaces/mapping-file.d.ts +429 -0
  35. package/lib/interfaces/mapping-file.js +2 -0
  36. package/lib/interfaces/publish-change-data.d.ts +19 -19
  37. package/lib/interfaces/publish-change-data.js +32 -32
  38. package/lib/publish/base-process-publish-assortment-callback.d.ts +9 -9
  39. package/lib/publish/base-process-publish-assortment-callback.js +38 -38
  40. package/lib/publish/base-process-publish-assortment.d.ts +118 -93
  41. package/lib/publish/base-process-publish-assortment.js +998 -944
  42. package/lib/publish/base-process-publish-assortment.spec.d.ts +1 -1
  43. package/lib/publish/base-process-publish-assortment.spec.js +1688 -1670
  44. package/lib/publish/mockData.d.ts +1389 -1389
  45. package/lib/publish/mockData.js +4524 -4519
  46. package/lib/transform/identifier-conversion-spec-mockData.js +472 -444
  47. package/lib/transform/identifier-conversion.d.ts +51 -15
  48. package/lib/transform/identifier-conversion.js +248 -212
  49. package/lib/transform/identifier-conversion.spec.d.ts +1 -1
  50. package/lib/transform/identifier-conversion.spec.js +343 -339
  51. package/lib/util/config-defaults.d.ts +8 -8
  52. package/lib/util/config-defaults.js +88 -85
  53. package/lib/util/config-defaults.spec.d.ts +1 -1
  54. package/lib/util/config-defaults.spec.js +302 -293
  55. package/lib/util/data-converter-spec-mockData.js +219 -205
  56. package/lib/util/data-converter.d.ts +136 -39
  57. package/lib/util/data-converter.js +718 -592
  58. package/lib/util/data-converter.spec.d.ts +1 -1
  59. package/lib/util/data-converter.spec.js +906 -904
  60. package/lib/util/error-response-object.d.ts +9 -4
  61. package/lib/util/error-response-object.js +54 -47
  62. package/lib/util/error-response-object.spec.d.ts +1 -1
  63. package/lib/util/error-response-object.spec.js +99 -99
  64. package/lib/util/event-short-message-status.d.ts +19 -19
  65. package/lib/util/event-short-message-status.js +24 -23
  66. package/lib/util/federation.d.ts +15 -15
  67. package/lib/util/federation.js +157 -149
  68. package/lib/util/flexplm-connect.d.ts +29 -22
  69. package/lib/util/flexplm-connect.js +190 -176
  70. package/lib/util/flexplm-connect.spec.d.ts +1 -1
  71. package/lib/util/flexplm-connect.spec.js +88 -88
  72. package/lib/util/logger-config.d.ts +1 -1
  73. package/lib/util/logger-config.js +27 -26
  74. package/lib/util/map-util-spec-mockData.js +219 -205
  75. package/lib/util/map-utils.d.ts +33 -6
  76. package/lib/util/map-utils.js +42 -15
  77. package/lib/util/map-utils.spec.d.ts +1 -1
  78. package/lib/util/map-utils.spec.js +89 -89
  79. package/lib/util/mockData.d.ts +80 -80
  80. package/lib/util/mockData.js +103 -103
  81. package/lib/util/thumbnail-util.d.ts +55 -34
  82. package/lib/util/thumbnail-util.js +242 -215
  83. package/lib/util/thumbnail-util.spec.d.ts +1 -1
  84. package/lib/util/thumbnail-util.spec.js +440 -434
  85. package/lib/util/type-conversion-utils-spec-mockData.js +259 -259
  86. package/lib/util/type-conversion-utils.d.ts +163 -23
  87. package/lib/util/type-conversion-utils.js +408 -265
  88. package/lib/util/type-conversion-utils.spec.d.ts +1 -1
  89. package/lib/util/type-conversion-utils.spec.js +868 -868
  90. package/lib/util/type-defaults.d.ts +74 -16
  91. package/lib/util/type-defaults.js +279 -221
  92. package/lib/util/type-defaults.spec.d.ts +1 -1
  93. package/lib/util/type-defaults.spec.js +516 -516
  94. package/lib/util/type-utils.d.ts +34 -13
  95. package/lib/util/type-utils.js +137 -114
  96. package/lib/util/type-utils.spec.d.ts +1 -1
  97. package/lib/util/type-utils.spec.js +192 -190
  98. package/package.json +21 -6
  99. package/scripts/copy-template.js +10 -0
  100. package/.claude/settings.local.json +0 -8
  101. package/.github/pull_request_template.md +0 -31
  102. package/.github/workflows/flexplm-lib.yml +0 -27
  103. package/.github/workflows/publish-to-npm.yml +0 -124
  104. package/CHANGELOG.md +0 -32
  105. package/publish.bat +0 -5
  106. package/publish.sh +0 -5
  107. package/src/entity-processor/base-entity-processor.spec.ts +0 -460
  108. package/src/entity-processor/base-entity-processor.ts +0 -515
  109. package/src/flexplm-request.ts +0 -28
  110. package/src/flexplm-utils.spec.ts +0 -27
  111. package/src/flexplm-utils.ts +0 -29
  112. package/src/index.ts +0 -22
  113. package/src/interfaces/interfaces.ts +0 -122
  114. package/src/interfaces/item-family-changes.ts +0 -67
  115. package/src/interfaces/publish-change-data.ts +0 -43
  116. package/src/publish/base-process-publish-assortment-callback.ts +0 -50
  117. package/src/publish/base-process-publish-assortment.spec.ts +0 -1992
  118. package/src/publish/base-process-publish-assortment.ts +0 -1134
  119. package/src/publish/mockData.ts +0 -4561
  120. package/src/transform/identifier-conversion-spec-mockData.ts +0 -496
  121. package/src/transform/identifier-conversion.spec.ts +0 -354
  122. package/src/transform/identifier-conversion.ts +0 -282
  123. package/src/util/config-defaults.spec.ts +0 -350
  124. package/src/util/config-defaults.ts +0 -93
  125. package/src/util/data-converter-spec-mockData.ts +0 -231
  126. package/src/util/data-converter.spec.ts +0 -1041
  127. package/src/util/data-converter.ts +0 -762
  128. package/src/util/error-response-object.spec.ts +0 -116
  129. package/src/util/error-response-object.ts +0 -50
  130. package/src/util/event-short-message-status.ts +0 -22
  131. package/src/util/federation.ts +0 -172
  132. package/src/util/flexplm-connect.spec.ts +0 -132
  133. package/src/util/flexplm-connect.ts +0 -208
  134. package/src/util/logger-config.ts +0 -20
  135. package/src/util/map-util-spec-mockData.ts +0 -231
  136. package/src/util/map-utils.spec.ts +0 -103
  137. package/src/util/map-utils.ts +0 -41
  138. package/src/util/mockData.ts +0 -101
  139. package/src/util/thumbnail-util.spec.ts +0 -508
  140. package/src/util/thumbnail-util.ts +0 -272
  141. package/src/util/type-conversion-utils-spec-mockData.ts +0 -271
  142. package/src/util/type-conversion-utils.spec.ts +0 -968
  143. package/src/util/type-conversion-utils.ts +0 -460
  144. package/src/util/type-defaults.spec.ts +0 -669
  145. package/src/util/type-defaults.ts +0 -281
  146. package/src/util/type-utils.spec.ts +0 -227
  147. package/src/util/type-utils.ts +0 -144
  148. package/tsconfig.json +0 -29
  149. 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
- LCSProduct: {
36
- vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
37
- vibe2flex: {
38
- getClass: () => 'LCSProduct',
39
- getSoftType: (entity) => {
40
- const prodType = entity['prodType'];
41
- let val = '';
42
- switch (prodType) {
43
- case 'acc':
44
- val = 'Product\\Accesories';
45
- break;
46
- case 'app':
47
- val = 'Product\\Apparel';
48
- break;
49
- case 'eqp':
50
- val = 'Product\\Equipment';
51
- break;
52
- case 'foot':
53
- val = 'Product\\Footwear';
54
- break;
55
- }
56
- return val;
57
- },
58
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }, { processor: 'VALUE_TRANSFORM', functionTransformersKey: 'valueTransform' }],
59
- rekey: {
60
- productName: 'name',
61
- vibeIQIdentifier: 'itemNumber'
62
- },
63
- valueTransform: {
64
- transformEx: (row) => {
65
- return row['otherProp'] + 'xxx';
66
- }
67
- }
68
- },
69
- flex2vibe: {
70
- getClass: () => 'item',
71
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
72
- rekey: {
73
- itemNumber: 'vibeIQIdentifier',
74
- name: 'productName',
75
- }
76
- }
77
- },
78
- LCSSKU: {
79
- vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
80
- vibe2flex: {
81
- getClass: () => 'LCSSKU',
82
- getSoftType: (entity) => {
83
- const prodType = entity['prodType'];
84
- let val = '';
85
- switch (prodType) {
86
- case 'acc':
87
- val = 'Product\\Accesories';
88
- break;
89
- case 'app':
90
- val = 'Product\\Apparel';
91
- break;
92
- case 'eqp':
93
- val = 'Product\\Equipment';
94
- break;
95
- case 'foot':
96
- val = 'Product\\Footwear';
97
- break;
98
- }
99
- return val;
100
- },
101
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
102
- rekey: {
103
- skuName: 'optionName',
104
- vibeIQIdentifier: 'itemNumber'
105
- }
106
- },
107
- flex2vibe: {
108
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
109
- rekey: {
110
- itemNumber: 'vibeIQIdentifier',
111
- optionName: 'skuName',
112
- }
113
- }
114
- },
115
- packaging: {
116
- vibe2flex: {
117
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
118
- rekey: {
119
- retailPackType: 'packType',
120
- retailIntroDate: 'introDate'
121
- },
122
- getSoftType: () => 'Revisable Entity\\packaging',
123
- getClass: () => 'LCSRevisableEntity'
124
- },
125
- flex2vibe: {
126
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
127
- rekey: {
128
- packType: 'retailPackType',
129
- introDate: 'retailIntroDate'
130
- },
131
- getClass: () => 'custom-entity',
132
- getSoftType: () => 'custom-entity:pack',
133
- }
134
- },
135
- prefix: {
136
- vibe2flex: {
137
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
138
- rekey: {
139
- retailOwner: 'owner',
140
- retailIntroDate: 'introDate'
141
- },
142
- getSoftType: () => 'Revisable Entity\\prefix',
143
- getClass: () => 'LCSRevisableEntity'
144
- },
145
- flex2vibe: {
146
- transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
147
- rekey: {
148
- owner: 'retailOwner',
149
- introDate: 'retailIntroDate'
150
- },
151
- getClass: () => 'custom-entity',
152
- getSoftType: () => 'custom-entity:prefix',
153
- }
154
- },
155
- catName: {
156
- getIdentifierProperties: () => ['catName', 'catNumber'],
157
- getInformationalProperties: () => ['longName'],
158
- vibe2flex: {
159
- transformOrder: [],
160
- getSoftType: () => 'Revisable Entity\\catName',
161
- getClass: () => 'LCSLast'
162
- },
163
- flex2vibe: {
164
- transformOrder: [],
165
- getClass: () => 'custom-entity',
166
- getSoftType: () => 'custom-entity:catName',
167
- }
168
- },
169
- partnerOrg: {
170
- vibe2flex: {
171
- transformOrder: [],
172
- getSoftType: () => 'Business Object\\partnerOrg',
173
- getClass: () => 'LCSLifecycleManaged'
174
- },
175
- flex2vibe: {
176
- transformOrder: [],
177
- getClass: () => 'custom-entity',
178
- getSoftType: () => 'custom-entity:partnerOrg',
179
- }
180
- },
181
- catFamily: {
182
- vibe2flex: {
183
- transformOrder: [],
184
- getSoftType: () => 'Revisable Entity\\catFamily',
185
- getClass: () => 'LCSRevisableEntity'
186
- },
187
- flex2vibe: {
188
- transformOrder: [],
189
- getClass: () => 'custom-entity',
190
- getSoftType: () => 'custom-entity:catFamily',
191
- }
192
- },
193
- formName: {
194
- vibe2flex: {
195
- transformOrder: [],
196
- getSoftType: () => 'Material\\form',
197
- getClass: () => 'LCSMaterial'
198
- },
199
- flex2vibe: {
200
- transformOrder: [],
201
- getClass: () => 'custom-entity',
202
- getSoftType: () => 'custom-entity:formName',
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: () => 'Revisable Entity\\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,6 +1,33 @@
1
- import { MapFileUtil } from '@contrail/transform-data';
2
- export declare class MapUtil {
3
- static applyTransformMap(transformMapFile: any, mapFileUtil: any, data: any, mapSectionKey: string, direction: string, transformTaskOrderKey?: string): Promise<any>;
4
- static getMapKey(transformMapFile: any, mapFileUtil: MapFileUtil, data: any, type: string, direction: string): Promise<string>;
5
- static getFullMapSection(transformMapFile: string, mapFileUtil: MapFileUtil, mapSectionKey: string): Promise<any>;
6
- }
1
+ import { MapFileUtil } from '@contrail/transform-data';
2
+ export declare class MapUtil {
3
+ /** Transforms the data, assumes mapSectionKey has been correctly determined.
4
+ *
5
+ * @param transformMapFile id of map file
6
+ * @param mapFileUtil
7
+ * @param data
8
+ * @param mapSectionKey key for section of map file
9
+ * @param direction vibe2flex or flex2vibe
10
+ * @param transformTaskOrderKey key for the list of tasks to be processed. default is 'transformOrder'
11
+ * @returns The converted data
12
+ */
13
+ static applyTransformMap(transformMapFile: any, mapFileUtil: any, data: any, mapSectionKey: string, direction: string, transformTaskOrderKey?: string): Promise<any>;
14
+ /** Returns the mapKey based on the 'typeConversion' section of the map file.
15
+ * If the map file doesn't have a section for the type in question, 'undefined' is returned.
16
+ *
17
+ * @param fileId
18
+ * @param mapFileUtil
19
+ * @param data The full object
20
+ * @param type The entity or object class of the object. The functions are keyed based on this.
21
+ * @param direction
22
+ * @returns
23
+ */
24
+ static getMapKey(transformMapFile: any, mapFileUtil: MapFileUtil, data: any, type: string, direction: string): Promise<string>;
25
+ /** Returns the full map section with both directions; identifier and informational properties; etc.
26
+ *
27
+ * @param transformMapFile id if map file
28
+ * @param mapFileUtil
29
+ * @param mapSectionKey key of the map section
30
+ * @returns
31
+ */
32
+ static getFullMapSection(transformMapFile: string, mapFileUtil: MapFileUtil, mapSectionKey: string): Promise<any>;
33
+ }
@@ -1,15 +1,42 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MapUtil = void 0;
4
- class MapUtil {
5
- static async applyTransformMap(transformMapFile, mapFileUtil, data, mapSectionKey, direction, transformTaskOrderKey = 'transformOrder') {
6
- return await mapFileUtil.applyTransformMap(transformMapFile, data, mapSectionKey, direction, transformTaskOrderKey);
7
- }
8
- static async getMapKey(transformMapFile, mapFileUtil, data, type, direction) {
9
- return await mapFileUtil.getMapKey(transformMapFile, data, type, direction);
10
- }
11
- static async getFullMapSection(transformMapFile, mapFileUtil, mapSectionKey) {
12
- return await mapFileUtil.getFullMapSection(transformMapFile, mapSectionKey);
13
- }
14
- }
15
- exports.MapUtil = MapUtil;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MapUtil = void 0;
4
+ class MapUtil {
5
+ /** Transforms the data, assumes mapSectionKey has been correctly determined.
6
+ *
7
+ * @param transformMapFile id of map file
8
+ * @param mapFileUtil
9
+ * @param data
10
+ * @param mapSectionKey key for section of map file
11
+ * @param direction vibe2flex or flex2vibe
12
+ * @param transformTaskOrderKey key for the list of tasks to be processed. default is 'transformOrder'
13
+ * @returns The converted data
14
+ */
15
+ static async applyTransformMap(transformMapFile, mapFileUtil, data, mapSectionKey, direction, transformTaskOrderKey = 'transformOrder') {
16
+ return await mapFileUtil.applyTransformMap(transformMapFile, data, mapSectionKey, direction, transformTaskOrderKey);
17
+ }
18
+ /** Returns the mapKey based on the 'typeConversion' section of the map file.
19
+ * If the map file doesn't have a section for the type in question, 'undefined' is returned.
20
+ *
21
+ * @param fileId
22
+ * @param mapFileUtil
23
+ * @param data The full object
24
+ * @param type The entity or object class of the object. The functions are keyed based on this.
25
+ * @param direction
26
+ * @returns
27
+ */
28
+ static async getMapKey(transformMapFile, mapFileUtil, data, type, direction) {
29
+ return await mapFileUtil.getMapKey(transformMapFile, data, type, direction);
30
+ }
31
+ /** Returns the full map section with both directions; identifier and informational properties; etc.
32
+ *
33
+ * @param transformMapFile id if map file
34
+ * @param mapFileUtil
35
+ * @param mapSectionKey key of the map section
36
+ * @returns
37
+ */
38
+ static async getFullMapSection(transformMapFile, mapFileUtil, mapSectionKey) {
39
+ return await mapFileUtil.getFullMapSection(transformMapFile, mapSectionKey);
40
+ }
41
+ }
42
+ exports.MapUtil = MapUtil;
@@ -1 +1 @@
1
- export {};
1
+ export {};