@configura/web-api 1.6.1-alpha.7 → 2.0.0-alpha.1

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 (98) hide show
  1. package/.eslintrc.json +18 -0
  2. package/LICENSE +201 -201
  3. package/README.md +1 -1
  4. package/dist/CatalogueAPI.d.ts +551 -512
  5. package/dist/CatalogueAPI.js +293 -277
  6. package/dist/CfgMeasure.d.ts +32 -32
  7. package/dist/CfgMeasure.js +30 -30
  8. package/dist/CfgProduct.d.ts +268 -239
  9. package/dist/CfgProduct.js +778 -668
  10. package/dist/CfgReferencePathHelper.d.ts +14 -0
  11. package/dist/CfgReferencePathHelper.js +13 -0
  12. package/dist/ConfigurationConverter.d.ts +5 -0
  13. package/dist/ConfigurationConverter.js +72 -0
  14. package/dist/index.d.ts +23 -18
  15. package/dist/index.js +23 -18
  16. package/dist/io/CfgHistoryManager.d.ts +51 -0
  17. package/dist/io/CfgHistoryManager.js +82 -0
  18. package/dist/io/CfgHistoryToProdConfConnector.d.ts +21 -0
  19. package/dist/io/CfgHistoryToProdConfConnector.js +56 -0
  20. package/dist/io/CfgIOManager.d.ts +49 -0
  21. package/dist/io/CfgIOManager.js +115 -0
  22. package/dist/io/CfgIOProdConfConnector.d.ts +53 -0
  23. package/dist/io/CfgIOProdConfConnector.js +141 -0
  24. package/dist/io/CfgObservableStateManager.d.ts +22 -0
  25. package/dist/io/CfgObservableStateManager.js +65 -0
  26. package/dist/io/CfgObservableStateToProdConfConnector.d.ts +15 -0
  27. package/dist/io/CfgObservableStateToProdConfConnector.js +16 -0
  28. package/dist/io/CfgWindowEventManager.d.ts +22 -0
  29. package/dist/io/CfgWindowEventManager.js +38 -0
  30. package/dist/io/CfgWindowMessageManager.d.ts +41 -0
  31. package/dist/io/CfgWindowMessageManager.js +84 -0
  32. package/dist/io/CfgWindowMessageToProdConfConnector.d.ts +17 -0
  33. package/dist/io/CfgWindowMessageToProdConfConnector.js +18 -0
  34. package/dist/io/index.d.ts +9 -0
  35. package/dist/io/index.js +8 -0
  36. package/dist/material/CfgMaterialMapping.d.ts +7 -7
  37. package/dist/material/CfgMaterialMapping.js +181 -181
  38. package/dist/material/CfgMtrlApplication.d.ts +18 -18
  39. package/dist/material/CfgMtrlApplication.js +43 -43
  40. package/dist/material/CfgMtrlApplicationSource.d.ts +7 -7
  41. package/dist/material/CfgMtrlApplicationSource.js +8 -8
  42. package/dist/material/CfgMtrlSource.d.ts +19 -19
  43. package/dist/material/CfgMtrlSource.js +40 -40
  44. package/dist/material/CfgMtrlSourceWithMetaData.d.ts +7 -7
  45. package/dist/material/CfgMtrlSourceWithMetaData.js +1 -1
  46. package/dist/productConfiguration/CfgFeature.d.ts +187 -178
  47. package/dist/productConfiguration/CfgFeature.js +645 -611
  48. package/dist/productConfiguration/CfgOption.d.ts +151 -128
  49. package/dist/productConfiguration/CfgOption.js +416 -394
  50. package/dist/productConfiguration/CfgProductConfiguration.d.ts +117 -120
  51. package/dist/productConfiguration/CfgProductConfiguration.js +307 -307
  52. package/dist/productConfiguration/filters.d.ts +15 -15
  53. package/dist/productConfiguration/filters.js +70 -70
  54. package/dist/productConfiguration/productParamsGenerator.d.ts +15 -15
  55. package/dist/productConfiguration/productParamsGenerator.js +51 -51
  56. package/dist/productConfiguration/utilitiesProductConfiguration.d.ts +17 -17
  57. package/dist/productConfiguration/utilitiesProductConfiguration.js +80 -80
  58. package/dist/productLoader.d.ts +33 -33
  59. package/dist/productLoader.js +49 -49
  60. package/dist/syncGroups/SyncGroupsApplyMode.d.ts +21 -0
  61. package/dist/syncGroups/SyncGroupsApplyMode.js +21 -0
  62. package/dist/syncGroups/SyncGroupsHandler.d.ts +41 -0
  63. package/dist/syncGroups/SyncGroupsHandler.js +359 -0
  64. package/dist/syncGroups/SyncGroupsPathHelper.d.ts +27 -0
  65. package/dist/syncGroups/SyncGroupsPathHelper.js +90 -0
  66. package/dist/syncGroups/SyncGroupsState.d.ts +36 -0
  67. package/dist/syncGroups/SyncGroupsState.js +125 -0
  68. package/dist/syncGroups/SyncGroupsTransaction.d.ts +155 -0
  69. package/dist/syncGroups/SyncGroupsTransaction.js +576 -0
  70. package/dist/tasks/TaskHandler.d.ts +77 -78
  71. package/dist/tasks/TaskHandler.js +275 -265
  72. package/dist/tasks/formats.d.ts +4 -4
  73. package/dist/tasks/formats.js +7 -7
  74. package/dist/tests/testData/collectorForTest.d.ts +73 -73
  75. package/dist/tests/testData/collectorForTest.js +194 -195
  76. package/dist/tests/testData/dummyProductForTest.d.ts +4 -4
  77. package/dist/tests/testData/dummyProductForTest.js +32 -36
  78. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.d.ts +11 -32
  79. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.js +277 -348
  80. package/dist/tests/testData/testDataCachedGetProduct.d.ts +5 -5
  81. package/dist/tests/testData/testDataCachedGetProduct.js +185 -196
  82. package/dist/tests/testData/testDataCachedPostValidate.d.ts +7 -7
  83. package/dist/tests/testData/testDataCachedPostValidate.js +183 -183
  84. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.d.ts +3 -3
  85. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.js +1099 -1099
  86. package/dist/tests/testData/testDataOptions.d.ts +13 -0
  87. package/dist/tests/testData/testDataOptions.js +60 -0
  88. package/dist/tests/testData/testDataProductAggregatedPrice.d.ts +6 -6
  89. package/dist/tests/testData/testDataProductAggregatedPrice.js +187 -198
  90. package/dist/tests/testData/testDataUpcharge.d.ts +8 -29
  91. package/dist/tests/testData/testDataUpcharge.js +119 -151
  92. package/dist/utilitiesCatalogueData.d.ts +33 -25
  93. package/dist/utilitiesCatalogueData.js +164 -66
  94. package/dist/utilitiesCataloguePermission.d.ts +32 -39
  95. package/dist/utilitiesCataloguePermission.js +76 -84
  96. package/dist/utilitiesNumericValues.d.ts +24 -24
  97. package/dist/utilitiesNumericValues.js +109 -109
  98. package/package.json +3 -3
@@ -1,348 +1,277 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { CfgProduct } from "../../CfgProduct.js";
11
- import { Collector } from "./collectorForTest.js";
12
- import { dummyCatId } from "./dummyProductForTest.js";
13
- const A = () => ({
14
- uuid: "A",
15
- unit: "m",
16
- features: [
17
- {
18
- code: "featureA",
19
- description: "",
20
- numericOrder: false,
21
- options: [
22
- {
23
- code: "optionA",
24
- description: "",
25
- additionalProductRefs: [
26
- { refKey: "C_0", catId: dummyCatId, partNumber: "C" },
27
- { refKey: "B_0", catId: dummyCatId, partNumber: "B" },
28
- ],
29
- },
30
- {
31
- code: "optionB",
32
- description: "",
33
- },
34
- {
35
- code: "optionC",
36
- description: "",
37
- additionalProductRefs: [{ refKey: "D", catId: dummyCatId, partNumber: "D" }],
38
- },
39
- ],
40
- },
41
- {
42
- code: "featureX",
43
- description: "",
44
- numericOrder: false,
45
- options: [
46
- {
47
- code: "optionA",
48
- description: "",
49
- },
50
- {
51
- code: "optionB",
52
- description: "",
53
- },
54
- {
55
- code: "optionC",
56
- description: "",
57
- },
58
- ],
59
- },
60
- {
61
- code: "featureNotUsed",
62
- description: "",
63
- numericOrder: false,
64
- options: [
65
- {
66
- code: "optionA",
67
- description: "",
68
- },
69
- {
70
- code: "optionB",
71
- description: "",
72
- },
73
- ],
74
- },
75
- {
76
- code: "featureOptionCSelectedAtStart",
77
- description: "",
78
- numericOrder: false,
79
- options: [
80
- {
81
- code: "optionA",
82
- description: "",
83
- },
84
- {
85
- code: "optionB",
86
- description: "",
87
- },
88
- {
89
- code: "optionC",
90
- description: "",
91
- },
92
- ],
93
- },
94
- {
95
- code: "featureSelectMany",
96
- description: "",
97
- numericOrder: false,
98
- options: [
99
- {
100
- code: "optionA",
101
- description: "",
102
- },
103
- {
104
- code: "optionB",
105
- description: "",
106
- },
107
- {
108
- code: "optionC",
109
- description: "",
110
- },
111
- ],
112
- },
113
- ],
114
- productData: {
115
- sku: "A",
116
- partsData: {
117
- basePrice: 0,
118
- currency: "",
119
- listPrice: 0,
120
- pkgCount: 0,
121
- styleNr: "",
122
- selOptions: [
123
- {
124
- code: "!~!",
125
- next: {
126
- optionA: {
127
- code: "optionA",
128
- },
129
- },
130
- },
131
- {
132
- code: "!~!",
133
- next: {
134
- optionB: {
135
- code: "optionB",
136
- },
137
- },
138
- },
139
- {
140
- code: "!~!",
141
- next: {
142
- optionC: {
143
- code: "optionC",
144
- },
145
- },
146
- },
147
- ],
148
- },
149
- additionalProductRefs: [
150
- { refKey: "B_1", catId: dummyCatId, partNumber: "B", optional: true },
151
- ],
152
- },
153
- rootFeatureRefs: [
154
- { code: "featureA" },
155
- { code: "featureX" },
156
- { code: "featureOptionCSelectedAtStart" },
157
- ],
158
- });
159
- const B = () => ({
160
- uuid: "B",
161
- unit: "m",
162
- features: [
163
- {
164
- code: "featureI",
165
- description: "",
166
- numericOrder: false,
167
- options: [
168
- { code: "optionI0", description: "" },
169
- { code: "optionI1", description: "", featureRefs: [{ code: "featureII" }] },
170
- ],
171
- },
172
- {
173
- code: "featureII",
174
- description: "",
175
- numericOrder: false,
176
- options: [
177
- { code: "optionII0", description: "" },
178
- { code: "optionII1", description: "", featureRefs: [{ code: "featureIII" }] },
179
- ],
180
- },
181
- {
182
- code: "featureIII",
183
- description: "",
184
- numericOrder: false,
185
- options: [
186
- { code: "optionIII0", description: "" },
187
- { code: "optionIII1", description: "" },
188
- ],
189
- },
190
- ],
191
- productData: {
192
- sku: "B",
193
- partsData: {
194
- basePrice: 0,
195
- currency: "",
196
- listPrice: 0,
197
- pkgCount: 0,
198
- selOptions: [
199
- {
200
- code: "!~!",
201
- next: {
202
- optionI0: {
203
- code: "optionI0",
204
- },
205
- },
206
- },
207
- ],
208
- styleNr: "",
209
- },
210
- additionalProductRefs: [{ refKey: "C_0", catId: dummyCatId, partNumber: "C" }],
211
- },
212
- rootFeatureRefs: [{ code: "featureI" }],
213
- });
214
- const C = () => ({
215
- uuid: "C",
216
- unit: "m",
217
- features: [
218
- {
219
- code: "featureC",
220
- description: "",
221
- numericOrder: false,
222
- options: [
223
- {
224
- code: "optionA",
225
- description: "",
226
- },
227
- {
228
- code: "optionB",
229
- description: "",
230
- },
231
- {
232
- code: "optionC",
233
- description: "",
234
- },
235
- ],
236
- },
237
- ],
238
- productData: {
239
- sku: "C",
240
- partsData: {
241
- basePrice: 0,
242
- currency: "",
243
- listPrice: 0,
244
- pkgCount: 0,
245
- selOptions: [
246
- {
247
- code: "!~!",
248
- next: {
249
- optionA: {
250
- code: "optionA",
251
- },
252
- },
253
- },
254
- ],
255
- styleNr: "",
256
- },
257
- },
258
- rootFeatureRefs: [{ code: "featureC" }],
259
- });
260
- const D = () => ({
261
- uuid: "D",
262
- unit: "m",
263
- features: [],
264
- productData: {
265
- sku: "D",
266
- partsData: {
267
- basePrice: 0,
268
- currency: "",
269
- listPrice: 0,
270
- pkgCount: 0,
271
- selOptions: [],
272
- styleNr: "",
273
- },
274
- },
275
- rootFeatureRefs: [],
276
- });
277
- export const getTestProduct = (params) => __awaiter(void 0, void 0, void 0, function* () {
278
- const partNumber = params.partNumber;
279
- switch (partNumber) {
280
- case "A":
281
- return A();
282
- case "B":
283
- return B();
284
- case "C":
285
- return C();
286
- case "D":
287
- return D();
288
- }
289
- throw new Error("No such part");
290
- });
291
- export const cfgProductTest = (testFunc, prepFunc) => __awaiter(void 0, void 0, void 0, function* () {
292
- const product = yield CfgProduct.make({
293
- getProduct: getTestProduct,
294
- postValidate: (params, _body) => __awaiter(void 0, void 0, void 0, function* () {
295
- const productData = (yield getTestProduct(params)).productData;
296
- productData.partsData.selOptions = [
297
- {
298
- code: "!~!",
299
- next: {
300
- optionC: {
301
- code: "optionC",
302
- },
303
- },
304
- },
305
- ];
306
- if (params.partNumber === "A") {
307
- productData.partsData.selOptions.push({
308
- code: "!~!",
309
- next: {
310
- optionC: {
311
- code: "optionC",
312
- },
313
- },
314
- });
315
- productData.partsData.selOptions.push({
316
- code: "!~!",
317
- next: {
318
- optionC: {
319
- code: "optionC",
320
- },
321
- },
322
- });
323
- }
324
- const validateResponse = {
325
- uuid: "",
326
- validated: true,
327
- productData,
328
- };
329
- collect.pushNotification(`Validate ${params.enterprise} ${params.prdCat} ${params.prdCatVersion} ${params.priceList} ${params.vendor} ${params.partNumber}`);
330
- return validateResponse;
331
- }),
332
- }, "lang", dummyCatId, "A");
333
- if (prepFunc !== undefined) {
334
- yield prepFunc(product);
335
- }
336
- const collect = new Collector(product);
337
- const beforeSnapshot = collect.takeSnapshot();
338
- yield testFunc(product);
339
- const afterSnapshot = collect.takeSnapshot();
340
- const diff = collect.compareSnapshot(beforeSnapshot, afterSnapshot);
341
- const notifications = collect.notifications;
342
- return {
343
- beforeSnapshot: Collector.stripRefsForWrapper(beforeSnapshot),
344
- afterSnapshot: Collector.stripRefsForWrapper(afterSnapshot),
345
- diff,
346
- notifications,
347
- };
348
- });
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { CfgProduct } from "../../CfgProduct.js";
11
+ import { Collector } from "./collectorForTest.js";
12
+ import { dummyCatId } from "./dummyProductForTest.js";
13
+ import { letterOptionCodeA, letterOptionCodeB, letterOptionCodeC, letterOptions, } from "./testDataOptions.js";
14
+ const A = () => ({
15
+ uuid: "A",
16
+ unit: "m",
17
+ features: [
18
+ {
19
+ code: "featureA",
20
+ description: "",
21
+ numericOrder: false,
22
+ options: [
23
+ Object.assign(Object.assign({}, letterOptions[0]), { additionalProductRefs: [
24
+ { refKey: "C_0", catId: dummyCatId, partNumber: "C" },
25
+ { refKey: "B_0", catId: dummyCatId, partNumber: "B" },
26
+ ] }),
27
+ letterOptions[1],
28
+ Object.assign(Object.assign({}, letterOptions[2]), { additionalProductRefs: [{ refKey: "D", catId: dummyCatId, partNumber: "D" }] }),
29
+ ],
30
+ },
31
+ {
32
+ code: "featureX",
33
+ description: "",
34
+ numericOrder: false,
35
+ options: [...letterOptions],
36
+ },
37
+ {
38
+ code: "featureNotUsed",
39
+ description: "",
40
+ numericOrder: false,
41
+ options: [...letterOptions],
42
+ },
43
+ {
44
+ code: "featureOptionCSelectedAtStart",
45
+ description: "",
46
+ numericOrder: false,
47
+ options: [...letterOptions],
48
+ },
49
+ {
50
+ code: "featureSelectMany",
51
+ description: "",
52
+ numericOrder: false,
53
+ options: [...letterOptions],
54
+ },
55
+ ],
56
+ productData: {
57
+ sku: "A",
58
+ partsData: {
59
+ basePrice: 0,
60
+ currency: "",
61
+ listPrice: 0,
62
+ pkgCount: 0,
63
+ styleNr: "",
64
+ selOptions: [
65
+ {
66
+ code: "!~!",
67
+ next: {
68
+ [letterOptionCodeA]: {
69
+ code: letterOptionCodeA,
70
+ },
71
+ },
72
+ },
73
+ {
74
+ code: "!~!",
75
+ next: {
76
+ [letterOptionCodeB]: {
77
+ code: letterOptionCodeB,
78
+ },
79
+ },
80
+ },
81
+ {
82
+ code: "!~!",
83
+ next: {
84
+ [letterOptionCodeC]: {
85
+ code: letterOptionCodeC,
86
+ },
87
+ },
88
+ },
89
+ ],
90
+ },
91
+ additionalProductRefs: [
92
+ { refKey: "B_1", catId: dummyCatId, partNumber: "B", optional: true },
93
+ ],
94
+ },
95
+ rootFeatureRefs: [
96
+ { code: "featureA" },
97
+ { code: "featureX" },
98
+ { code: "featureOptionCSelectedAtStart" },
99
+ ],
100
+ });
101
+ const B = () => ({
102
+ uuid: "B",
103
+ unit: "m",
104
+ features: [
105
+ {
106
+ code: "featureI",
107
+ description: "",
108
+ numericOrder: false,
109
+ options: [
110
+ { code: "optionI0", description: "" },
111
+ { code: "optionI1", description: "", featureRefs: [{ code: "featureII" }] },
112
+ ],
113
+ },
114
+ {
115
+ code: "featureII",
116
+ description: "",
117
+ numericOrder: false,
118
+ options: [
119
+ { code: "optionII0", description: "" },
120
+ { code: "optionII1", description: "", featureRefs: [{ code: "featureIII" }] },
121
+ ],
122
+ },
123
+ {
124
+ code: "featureIII",
125
+ description: "",
126
+ numericOrder: false,
127
+ options: [
128
+ { code: "optionIII0", description: "" },
129
+ { code: "optionIII1", description: "" },
130
+ ],
131
+ },
132
+ ],
133
+ productData: {
134
+ sku: "B",
135
+ partsData: {
136
+ basePrice: 0,
137
+ currency: "",
138
+ listPrice: 0,
139
+ pkgCount: 0,
140
+ selOptions: [
141
+ {
142
+ code: "!~!",
143
+ next: {
144
+ optionI0: {
145
+ code: "optionI0",
146
+ },
147
+ },
148
+ },
149
+ ],
150
+ styleNr: "",
151
+ },
152
+ additionalProductRefs: [{ refKey: "C_0", catId: dummyCatId, partNumber: "C" }],
153
+ },
154
+ rootFeatureRefs: [{ code: "featureI" }],
155
+ });
156
+ const C = () => ({
157
+ uuid: "C",
158
+ unit: "m",
159
+ features: [
160
+ {
161
+ code: "featureC",
162
+ description: "",
163
+ numericOrder: false,
164
+ options: [...letterOptions],
165
+ },
166
+ ],
167
+ productData: {
168
+ sku: "C",
169
+ partsData: {
170
+ basePrice: 0,
171
+ currency: "",
172
+ listPrice: 0,
173
+ pkgCount: 0,
174
+ selOptions: [
175
+ {
176
+ code: "!~!",
177
+ next: {
178
+ [letterOptionCodeA]: {
179
+ code: letterOptionCodeA,
180
+ },
181
+ },
182
+ },
183
+ ],
184
+ styleNr: "",
185
+ },
186
+ },
187
+ rootFeatureRefs: [{ code: "featureC" }],
188
+ });
189
+ const D = () => ({
190
+ uuid: "D",
191
+ unit: "m",
192
+ features: [],
193
+ productData: {
194
+ sku: "D",
195
+ partsData: {
196
+ basePrice: 0,
197
+ currency: "",
198
+ listPrice: 0,
199
+ pkgCount: 0,
200
+ selOptions: [],
201
+ styleNr: "",
202
+ },
203
+ },
204
+ rootFeatureRefs: [],
205
+ });
206
+ export const getTestProduct = (params) => {
207
+ const partNumber = params.partNumber;
208
+ switch (partNumber) {
209
+ case "A":
210
+ return Promise.resolve(A());
211
+ case "B":
212
+ return Promise.resolve(B());
213
+ case "C":
214
+ return Promise.resolve(C());
215
+ case "D":
216
+ return Promise.resolve(D());
217
+ }
218
+ throw new Error("No such part");
219
+ };
220
+ export const cfgProductTest = (testFunc, prepFunc) => __awaiter(void 0, void 0, void 0, function* () {
221
+ const product = yield CfgProduct.make({
222
+ getProduct: getTestProduct,
223
+ postValidate: (params, _body) => __awaiter(void 0, void 0, void 0, function* () {
224
+ const productData = (yield getTestProduct(params)).productData;
225
+ productData.partsData.selOptions = [
226
+ {
227
+ code: "!~!",
228
+ next: {
229
+ [letterOptionCodeC]: {
230
+ code: letterOptionCodeC,
231
+ },
232
+ },
233
+ },
234
+ ];
235
+ if (params.partNumber === "A") {
236
+ productData.partsData.selOptions.push({
237
+ code: "!~!",
238
+ next: {
239
+ [letterOptionCodeC]: {
240
+ code: letterOptionCodeC,
241
+ },
242
+ },
243
+ });
244
+ productData.partsData.selOptions.push({
245
+ code: "!~!",
246
+ next: {
247
+ [letterOptionCodeC]: {
248
+ code: letterOptionCodeC,
249
+ },
250
+ },
251
+ });
252
+ }
253
+ const validateResponse = {
254
+ uuid: "",
255
+ validated: true,
256
+ productData,
257
+ };
258
+ collect.pushNotification(`Validate ${params.enterprise} ${params.prdCat} ${params.prdCatVersion} ${params.priceList} ${params.vendor} ${params.partNumber}`);
259
+ return validateResponse;
260
+ }),
261
+ }, Object.assign(Object.assign({}, dummyCatId), { partNumber: "A" }));
262
+ if (prepFunc !== undefined) {
263
+ yield prepFunc(product);
264
+ }
265
+ const collect = new Collector(product);
266
+ const beforeSnapshot = collect.takeSnapshot();
267
+ yield testFunc(product);
268
+ const afterSnapshot = collect.takeSnapshot();
269
+ const diff = collect.compareSnapshot(beforeSnapshot, afterSnapshot);
270
+ const notifications = collect.notifications;
271
+ return {
272
+ beforeSnapshot: Collector.stripRefsForWrapper(beforeSnapshot),
273
+ afterSnapshot: Collector.stripRefsForWrapper(afterSnapshot),
274
+ diff,
275
+ notifications,
276
+ };
277
+ });
@@ -1,6 +1,6 @@
1
- import { GetProductParams } from "../../CatalogueAPI.js";
2
- import { CfgProduct } from "../../CfgProduct.js";
3
- import { CfgProductResponse } from "../../utilitiesCatalogueData.js";
4
- export declare const getTestProduct: (params: GetProductParams, validateCall?: Boolean | undefined) => Promise<CfgProductResponse>;
5
- export declare const cachedProductLoaderTest: () => Promise<CfgProduct>;
1
+ import { DtoGetProductParams } from "../../CatalogueAPI.js";
2
+ import { CfgProduct } from "../../CfgProduct.js";
3
+ import { CfgProductResponse } from "../../utilitiesCatalogueData.js";
4
+ export declare const getTestProduct: (params: DtoGetProductParams, validateCall?: boolean | undefined) => Promise<CfgProductResponse>;
5
+ export declare const cachedProductLoaderTest: () => Promise<CfgProduct>;
6
6
  //# sourceMappingURL=testDataCachedGetProduct.d.ts.map