@configura/web-api 1.3.0-alpha.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +1 -1
  3. package/dist/CatalogueAPI.d.ts +502 -448
  4. package/dist/CatalogueAPI.js +206 -206
  5. package/dist/CfgMeasure.d.ts +33 -0
  6. package/dist/CfgMeasure.js +30 -0
  7. package/dist/CfgProduct.d.ts +217 -116
  8. package/dist/CfgProduct.js +634 -588
  9. package/dist/index.d.ts +16 -15
  10. package/dist/index.js +16 -15
  11. package/dist/material/CfgMaterialMapping.d.ts +7 -7
  12. package/dist/material/CfgMaterialMapping.js +181 -176
  13. package/dist/material/CfgMtrlApplication.d.ts +18 -18
  14. package/dist/material/CfgMtrlApplication.js +43 -43
  15. package/dist/material/CfgMtrlApplicationSource.d.ts +7 -7
  16. package/dist/material/CfgMtrlApplicationSource.js +8 -8
  17. package/dist/material/CfgMtrlSource.d.ts +19 -19
  18. package/dist/material/CfgMtrlSource.js +40 -40
  19. package/dist/material/CfgMtrlSourceWithMetaData.d.ts +7 -7
  20. package/dist/material/CfgMtrlSourceWithMetaData.js +1 -1
  21. package/dist/productConfiguration/CfgFeature.d.ts +160 -134
  22. package/dist/productConfiguration/CfgFeature.js +593 -483
  23. package/dist/productConfiguration/CfgOption.d.ts +128 -112
  24. package/dist/productConfiguration/CfgOption.js +394 -293
  25. package/dist/productConfiguration/CfgProductConfiguration.d.ts +120 -50
  26. package/dist/productConfiguration/CfgProductConfiguration.js +307 -198
  27. package/dist/productConfiguration/filters.d.ts +7 -7
  28. package/dist/productConfiguration/filters.js +29 -29
  29. package/dist/productConfiguration/productParamsGenerator.d.ts +15 -15
  30. package/dist/productConfiguration/productParamsGenerator.js +51 -51
  31. package/dist/productConfiguration/utilitiesProductConfiguration.d.ts +17 -9
  32. package/dist/productConfiguration/utilitiesProductConfiguration.js +80 -61
  33. package/dist/productLoader.d.ts +33 -11
  34. package/dist/productLoader.js +49 -41
  35. package/dist/tests/testData/collectorForTest.d.ts +73 -73
  36. package/dist/tests/testData/collectorForTest.js +195 -195
  37. package/dist/tests/testData/dummyProductForTest.d.ts +4 -4
  38. package/dist/tests/testData/dummyProductForTest.js +36 -35
  39. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.d.ts +32 -32
  40. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.js +381 -368
  41. package/dist/tests/testData/testDataCachedGetProduct.d.ts +5 -5
  42. package/dist/tests/testData/testDataCachedGetProduct.js +205 -199
  43. package/dist/tests/testData/testDataCachedPostValidate.d.ts +7 -7
  44. package/dist/tests/testData/testDataCachedPostValidate.js +195 -189
  45. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.d.ts +3 -3
  46. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.js +1119 -1117
  47. package/dist/tests/testData/testDataProductAggregatedPrice.d.ts +28 -28
  48. package/dist/tests/testData/testDataProductAggregatedPrice.js +210 -205
  49. package/dist/tests/testData/testDataUpcharge.d.ts +29 -29
  50. package/dist/tests/testData/testDataUpcharge.js +163 -159
  51. package/dist/utilitiesCatalogueData.d.ts +22 -20
  52. package/dist/utilitiesCatalogueData.js +64 -64
  53. package/dist/utilitiesCataloguePermission.d.ts +39 -39
  54. package/dist/utilitiesCataloguePermission.js +84 -84
  55. package/dist/utilitiesNumericValues.d.ts +25 -0
  56. package/dist/utilitiesNumericValues.js +109 -0
  57. package/package.json +3 -3
@@ -1,368 +1,381 @@
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";
11
- import { Collector } from "./collectorForTest";
12
- import { dummyCatId } from "./dummyProductForTest";
13
- const A = () => ({
14
- uuid: "A",
15
- features: [
16
- {
17
- code: "featureA",
18
- description: "",
19
- options: [
20
- {
21
- code: "optionA",
22
- description: "",
23
- additionalProductRefs: [
24
- { refKey: "C_0", catId: dummyCatId, partNumber: "C" },
25
- { refKey: "B_0", catId: dummyCatId, partNumber: "B" },
26
- ],
27
- },
28
- {
29
- code: "optionB",
30
- description: "",
31
- },
32
- {
33
- code: "optionC",
34
- description: "",
35
- additionalProductRefs: [{ refKey: "D", catId: dummyCatId, partNumber: "D" }],
36
- },
37
- ],
38
- },
39
- {
40
- code: "featureX",
41
- description: "",
42
- options: [
43
- {
44
- code: "optionA",
45
- description: "",
46
- },
47
- {
48
- code: "optionB",
49
- description: "",
50
- },
51
- {
52
- code: "optionC",
53
- description: "",
54
- },
55
- ],
56
- },
57
- {
58
- code: "featureNotUsed",
59
- description: "",
60
- options: [
61
- {
62
- code: "optionA",
63
- description: "",
64
- },
65
- {
66
- code: "optionB",
67
- description: "",
68
- },
69
- ],
70
- },
71
- {
72
- code: "featureOptionCSelectedAtStart",
73
- description: "",
74
- options: [
75
- {
76
- code: "optionA",
77
- description: "",
78
- },
79
- {
80
- code: "optionB",
81
- description: "",
82
- },
83
- {
84
- code: "optionC",
85
- description: "",
86
- },
87
- ],
88
- },
89
- {
90
- code: "featureSelectMany",
91
- description: "",
92
- options: [
93
- {
94
- code: "optionA",
95
- description: "",
96
- },
97
- {
98
- code: "optionB",
99
- description: "",
100
- },
101
- {
102
- code: "optionC",
103
- description: "",
104
- },
105
- ],
106
- },
107
- ],
108
- productData: {
109
- sku: "A",
110
- partsData: {
111
- basePrice: 0,
112
- currency: "",
113
- listPrice: 0,
114
- pkgCount: 0,
115
- styleNr: "",
116
- selOptions: [
117
- {
118
- code: "!~!",
119
- feature: "featureA",
120
- featDesc: "",
121
- next: {
122
- optionA: {
123
- code: "optionA",
124
- feature: "featureA",
125
- featDesc: "",
126
- },
127
- },
128
- },
129
- {
130
- code: "!~!",
131
- feature: "featureX",
132
- featDesc: "",
133
- next: {
134
- optionB: {
135
- code: "optionB",
136
- feature: "featureX",
137
- featDesc: "",
138
- },
139
- },
140
- },
141
- {
142
- code: "!~!",
143
- feature: "featureOptionCSelectedAtStart",
144
- featDesc: "",
145
- next: {
146
- optionC: {
147
- code: "optionC",
148
- feature: "featureOptionCSelectedAtStart",
149
- featDesc: "",
150
- },
151
- },
152
- },
153
- ],
154
- },
155
- additionalProductRefs: [
156
- { refKey: "B_1", catId: dummyCatId, partNumber: "B", optional: true },
157
- ],
158
- },
159
- rootFeatureRefs: [
160
- { code: "featureA" },
161
- { code: "featureX" },
162
- { code: "featureOptionCSelectedAtStart" },
163
- ],
164
- });
165
- const B = () => ({
166
- uuid: "B",
167
- features: [
168
- {
169
- code: "featureI",
170
- description: "",
171
- options: [
172
- { code: "optionI0", description: "" },
173
- { code: "optionI1", description: "", featureRefs: [{ code: "featureII" }] },
174
- ],
175
- },
176
- {
177
- code: "featureII",
178
- description: "",
179
- options: [
180
- { code: "optionII0", description: "" },
181
- { code: "optionII1", description: "", featureRefs: [{ code: "featureIII" }] },
182
- ],
183
- },
184
- {
185
- code: "featureIII",
186
- description: "",
187
- options: [
188
- { code: "optionIII0", description: "" },
189
- { code: "optionIII1", description: "" },
190
- ],
191
- },
192
- ],
193
- productData: {
194
- sku: "B",
195
- partsData: {
196
- basePrice: 0,
197
- currency: "",
198
- listPrice: 0,
199
- pkgCount: 0,
200
- selOptions: [
201
- {
202
- code: "!~!",
203
- feature: "featureI",
204
- featDesc: "",
205
- next: {
206
- optionI0: {
207
- code: "optionI0",
208
- feature: "featureI",
209
- featDesc: "",
210
- },
211
- },
212
- },
213
- ],
214
- styleNr: "",
215
- },
216
- additionalProductRefs: [{ refKey: "C_0", catId: dummyCatId, partNumber: "C" }],
217
- },
218
- rootFeatureRefs: [{ code: "featureI" }],
219
- });
220
- const C = () => ({
221
- uuid: "C",
222
- features: [
223
- {
224
- code: "featureC",
225
- description: "",
226
- options: [
227
- {
228
- code: "optionA",
229
- description: "",
230
- },
231
- {
232
- code: "optionB",
233
- description: "",
234
- },
235
- {
236
- code: "optionC",
237
- description: "",
238
- },
239
- ],
240
- },
241
- ],
242
- productData: {
243
- sku: "C",
244
- partsData: {
245
- basePrice: 0,
246
- currency: "",
247
- listPrice: 0,
248
- pkgCount: 0,
249
- selOptions: [
250
- {
251
- code: "!~!",
252
- feature: "featureC",
253
- featDesc: "",
254
- next: {
255
- optionA: {
256
- code: "optionA",
257
- feature: "featureC",
258
- featDesc: "",
259
- },
260
- },
261
- },
262
- ],
263
- styleNr: "",
264
- },
265
- },
266
- rootFeatureRefs: [{ code: "featureC" }],
267
- });
268
- const D = () => ({
269
- uuid: "D",
270
- features: [],
271
- productData: {
272
- sku: "D",
273
- partsData: {
274
- basePrice: 0,
275
- currency: "",
276
- listPrice: 0,
277
- pkgCount: 0,
278
- selOptions: [],
279
- styleNr: "",
280
- },
281
- },
282
- rootFeatureRefs: [],
283
- });
284
- export const getTestProduct = (params) => __awaiter(void 0, void 0, void 0, function* () {
285
- const partNumber = params.partNumber;
286
- switch (partNumber) {
287
- case "A":
288
- return A();
289
- case "B":
290
- return B();
291
- case "C":
292
- return C();
293
- case "D":
294
- return D();
295
- }
296
- throw new Error("No such part");
297
- });
298
- export const cfgProductTest = (testFunc, prepFunc) => __awaiter(void 0, void 0, void 0, function* () {
299
- const product = yield CfgProduct.make({
300
- getProduct: getTestProduct,
301
- postValidate: (params, _body) => __awaiter(void 0, void 0, void 0, function* () {
302
- const productData = (yield getTestProduct(params)).productData;
303
- const feat = productData.partsData.selOptions[0].feature;
304
- productData.partsData.selOptions = [
305
- {
306
- code: "!~!",
307
- feature: feat,
308
- featDesc: "",
309
- next: {
310
- optionC: {
311
- code: "optionC",
312
- feature: feat,
313
- featDesc: "",
314
- },
315
- },
316
- },
317
- ];
318
- if (params.partNumber === "A") {
319
- productData.partsData.selOptions.push({
320
- code: "!~!",
321
- feature: "featureX",
322
- featDesc: "",
323
- next: {
324
- optionC: {
325
- code: "optionC",
326
- feature: "featureX",
327
- featDesc: "",
328
- },
329
- },
330
- });
331
- productData.partsData.selOptions.push({
332
- code: "!~!",
333
- feature: "featureOptionCSelectedAtStart",
334
- featDesc: "",
335
- next: {
336
- optionC: {
337
- code: "optionC",
338
- feature: "featureOptionCSelectedAtStart",
339
- featDesc: "",
340
- },
341
- },
342
- });
343
- }
344
- const validateResponse = {
345
- uuid: "",
346
- validated: true,
347
- productData,
348
- };
349
- collect.pushNotification(`Validate ${params.enterprise} ${params.prdCat} ${params.prdCatVersion} ${params.priceList} ${params.vendor} ${params.partNumber}`);
350
- return validateResponse;
351
- }),
352
- }, "lang", dummyCatId, "A");
353
- if (prepFunc !== undefined) {
354
- yield prepFunc(product);
355
- }
356
- const collect = new Collector(product);
357
- const beforeSnapshot = collect.takeSnapshot();
358
- yield testFunc(product);
359
- const afterSnapshot = collect.takeSnapshot();
360
- const diff = collect.compareSnapshot(beforeSnapshot, afterSnapshot);
361
- const notifications = collect.notifications;
362
- return {
363
- beforeSnapshot: Collector.stripRefsForWrapper(beforeSnapshot),
364
- afterSnapshot: Collector.stripRefsForWrapper(afterSnapshot),
365
- diff,
366
- notifications,
367
- };
368
- });
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";
11
+ import { Collector } from "./collectorForTest";
12
+ import { dummyCatId } from "./dummyProductForTest";
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
+ feature: "featureA",
126
+ featDesc: "",
127
+ next: {
128
+ optionA: {
129
+ code: "optionA",
130
+ feature: "featureA",
131
+ featDesc: "",
132
+ },
133
+ },
134
+ },
135
+ {
136
+ code: "!~!",
137
+ feature: "featureX",
138
+ featDesc: "",
139
+ next: {
140
+ optionB: {
141
+ code: "optionB",
142
+ feature: "featureX",
143
+ featDesc: "",
144
+ },
145
+ },
146
+ },
147
+ {
148
+ code: "!~!",
149
+ feature: "featureOptionCSelectedAtStart",
150
+ featDesc: "",
151
+ next: {
152
+ optionC: {
153
+ code: "optionC",
154
+ feature: "featureOptionCSelectedAtStart",
155
+ featDesc: "",
156
+ },
157
+ },
158
+ },
159
+ ],
160
+ },
161
+ additionalProductRefs: [
162
+ { refKey: "B_1", catId: dummyCatId, partNumber: "B", optional: true },
163
+ ],
164
+ },
165
+ rootFeatureRefs: [
166
+ { code: "featureA" },
167
+ { code: "featureX" },
168
+ { code: "featureOptionCSelectedAtStart" },
169
+ ],
170
+ });
171
+ const B = () => ({
172
+ uuid: "B",
173
+ unit: "m",
174
+ features: [
175
+ {
176
+ code: "featureI",
177
+ description: "",
178
+ numericOrder: false,
179
+ options: [
180
+ { code: "optionI0", description: "" },
181
+ { code: "optionI1", description: "", featureRefs: [{ code: "featureII" }] },
182
+ ],
183
+ },
184
+ {
185
+ code: "featureII",
186
+ description: "",
187
+ numericOrder: false,
188
+ options: [
189
+ { code: "optionII0", description: "" },
190
+ { code: "optionII1", description: "", featureRefs: [{ code: "featureIII" }] },
191
+ ],
192
+ },
193
+ {
194
+ code: "featureIII",
195
+ description: "",
196
+ numericOrder: false,
197
+ options: [
198
+ { code: "optionIII0", description: "" },
199
+ { code: "optionIII1", description: "" },
200
+ ],
201
+ },
202
+ ],
203
+ productData: {
204
+ sku: "B",
205
+ partsData: {
206
+ basePrice: 0,
207
+ currency: "",
208
+ listPrice: 0,
209
+ pkgCount: 0,
210
+ selOptions: [
211
+ {
212
+ code: "!~!",
213
+ feature: "featureI",
214
+ featDesc: "",
215
+ next: {
216
+ optionI0: {
217
+ code: "optionI0",
218
+ feature: "featureI",
219
+ featDesc: "",
220
+ },
221
+ },
222
+ },
223
+ ],
224
+ styleNr: "",
225
+ },
226
+ additionalProductRefs: [{ refKey: "C_0", catId: dummyCatId, partNumber: "C" }],
227
+ },
228
+ rootFeatureRefs: [{ code: "featureI" }],
229
+ });
230
+ const C = () => ({
231
+ uuid: "C",
232
+ unit: "m",
233
+ features: [
234
+ {
235
+ code: "featureC",
236
+ description: "",
237
+ numericOrder: false,
238
+ options: [
239
+ {
240
+ code: "optionA",
241
+ description: "",
242
+ },
243
+ {
244
+ code: "optionB",
245
+ description: "",
246
+ },
247
+ {
248
+ code: "optionC",
249
+ description: "",
250
+ },
251
+ ],
252
+ },
253
+ ],
254
+ productData: {
255
+ sku: "C",
256
+ partsData: {
257
+ basePrice: 0,
258
+ currency: "",
259
+ listPrice: 0,
260
+ pkgCount: 0,
261
+ selOptions: [
262
+ {
263
+ code: "!~!",
264
+ feature: "featureC",
265
+ featDesc: "",
266
+ next: {
267
+ optionA: {
268
+ code: "optionA",
269
+ feature: "featureC",
270
+ featDesc: "",
271
+ },
272
+ },
273
+ },
274
+ ],
275
+ styleNr: "",
276
+ },
277
+ },
278
+ rootFeatureRefs: [{ code: "featureC" }],
279
+ });
280
+ const D = () => ({
281
+ uuid: "D",
282
+ unit: "m",
283
+ features: [],
284
+ productData: {
285
+ sku: "D",
286
+ partsData: {
287
+ basePrice: 0,
288
+ currency: "",
289
+ listPrice: 0,
290
+ pkgCount: 0,
291
+ selOptions: [],
292
+ styleNr: "",
293
+ },
294
+ },
295
+ rootFeatureRefs: [],
296
+ });
297
+ export const getTestProduct = (params) => __awaiter(void 0, void 0, void 0, function* () {
298
+ const partNumber = params.partNumber;
299
+ switch (partNumber) {
300
+ case "A":
301
+ return A();
302
+ case "B":
303
+ return B();
304
+ case "C":
305
+ return C();
306
+ case "D":
307
+ return D();
308
+ }
309
+ throw new Error("No such part");
310
+ });
311
+ export const cfgProductTest = (testFunc, prepFunc) => __awaiter(void 0, void 0, void 0, function* () {
312
+ const product = yield CfgProduct.make({
313
+ getProduct: getTestProduct,
314
+ postValidate: (params, _body) => __awaiter(void 0, void 0, void 0, function* () {
315
+ const productData = (yield getTestProduct(params)).productData;
316
+ const feat = productData.partsData.selOptions[0].feature;
317
+ productData.partsData.selOptions = [
318
+ {
319
+ code: "!~!",
320
+ feature: feat,
321
+ featDesc: "",
322
+ next: {
323
+ optionC: {
324
+ code: "optionC",
325
+ feature: feat,
326
+ featDesc: "",
327
+ },
328
+ },
329
+ },
330
+ ];
331
+ if (params.partNumber === "A") {
332
+ productData.partsData.selOptions.push({
333
+ code: "!~!",
334
+ feature: "featureX",
335
+ featDesc: "",
336
+ next: {
337
+ optionC: {
338
+ code: "optionC",
339
+ feature: "featureX",
340
+ featDesc: "",
341
+ },
342
+ },
343
+ });
344
+ productData.partsData.selOptions.push({
345
+ code: "!~!",
346
+ feature: "featureOptionCSelectedAtStart",
347
+ featDesc: "",
348
+ next: {
349
+ optionC: {
350
+ code: "optionC",
351
+ feature: "featureOptionCSelectedAtStart",
352
+ featDesc: "",
353
+ },
354
+ },
355
+ });
356
+ }
357
+ const validateResponse = {
358
+ uuid: "",
359
+ validated: true,
360
+ productData,
361
+ };
362
+ collect.pushNotification(`Validate ${params.enterprise} ${params.prdCat} ${params.prdCatVersion} ${params.priceList} ${params.vendor} ${params.partNumber}`);
363
+ return validateResponse;
364
+ }),
365
+ }, "lang", dummyCatId, "A");
366
+ if (prepFunc !== undefined) {
367
+ yield prepFunc(product);
368
+ }
369
+ const collect = new Collector(product);
370
+ const beforeSnapshot = collect.takeSnapshot();
371
+ yield testFunc(product);
372
+ const afterSnapshot = collect.takeSnapshot();
373
+ const diff = collect.compareSnapshot(beforeSnapshot, afterSnapshot);
374
+ const notifications = collect.notifications;
375
+ return {
376
+ beforeSnapshot: Collector.stripRefsForWrapper(beforeSnapshot),
377
+ afterSnapshot: Collector.stripRefsForWrapper(afterSnapshot),
378
+ diff,
379
+ notifications,
380
+ };
381
+ });