@scayle/storefront-core 8.16.0 → 8.17.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @scayle/storefront-core
2
2
 
3
+ ## 8.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Fix return type of `RpcMethodCall` to reflect that it returns a `Promise<TResult>` instead of `TResult`. This change emphasizes that `callRpc` in `RpcContext` is indeed an asynchronous operation.
8
+
9
+ ### Patch Changes
10
+
11
+ - Ensure that `pricePromotionKey` set in the right place when calling the deletion wishlist item operation of SAPI.
12
+
3
13
  ## 8.16.0
4
14
 
5
15
  ## 8.15.1
package/dist/index.d.ts CHANGED
@@ -67,5 +67,5 @@ export type RpcMethodParameters<N extends RpcMethodName> = Parameters<RpcMethod<
67
67
  * @template N The name of the RPC method.
68
68
  */
69
69
  export type RpcMethodReturnType<N extends RpcMethodName> = ReturnType<RpcMethod<N>>;
70
- export type RpcMethodCall = <N extends RpcMethodName, P extends RpcMethodParameters<N>, TResult extends Exclude<Awaited<RpcMethodReturnType<N>>, Response>>(...args: P extends RpcContext ? [N] : [N, P]) => TResult;
70
+ export type RpcMethodCall = <N extends RpcMethodName, P extends RpcMethodParameters<N>, TResult extends Exclude<Awaited<RpcMethodReturnType<N>>, Response>>(...args: P extends RpcContext ? [N] : [N, P]) => Promise<TResult>;
71
71
  export { ExistingItemHandling, AddToBasketFailureKind, UpdateBasketItemFailureKind, AddToWishlistFailureKind, PromotionEffectType, FilterTypes, APISortOption, APISortOrder, type ProductSortConfig, } from '@scayle/storefront-api';
@@ -36,7 +36,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
36
36
  carrier,
37
37
  basketId: context.basketKey,
38
38
  campaignKey
39
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.16.0"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
39
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.17.0"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
40
40
  return {
41
41
  accessToken: refreshedAccessToken,
42
42
  checkoutJwt
@@ -20,13 +20,15 @@ export const getWishlist = async function getWishlist2(options, context) {
20
20
  }
21
21
  const { sapiClient, wishlistKey } = context;
22
22
  const campaignKey = await context.callRpc?.("getCampaignKey");
23
- const resolvedWith = getWithParams({ with: options }, context);
23
+ const { pricePromotionKey, ...resolvedWith } = getWithParams({
24
+ with: options
25
+ }, context);
24
26
  return await mapSAPIFetchErrorToResponse(sapiClient.wishlist.get)(
25
27
  wishlistKey,
26
28
  {
27
29
  with: resolvedWith,
28
30
  campaignKey,
29
- pricePromotionKey: resolvedWith?.pricePromotionKey ?? ""
31
+ pricePromotionKey: pricePromotionKey ?? ""
30
32
  }
31
33
  );
32
34
  };
@@ -41,8 +43,7 @@ export const addItemToWishlist = async function addItemToWishlist2(options, cont
41
43
  const { sapiClient, wishlistKey } = context;
42
44
  const campaignKey = await context.callRpc?.("getCampaignKey");
43
45
  const { productId, variantId } = options;
44
- const resolvedWith = getWithParams(options, context);
45
- const pricePromotionKey = resolvedWith?.pricePromotionKey ?? "";
46
+ const { pricePromotionKey, ...resolvedWith } = getWithParams(options, context);
46
47
  if (!productId && !variantId) {
47
48
  return new ErrorResponse(
48
49
  HttpStatusCode.BAD_REQUEST,
@@ -56,7 +57,7 @@ export const addItemToWishlist = async function addItemToWishlist2(options, cont
56
57
  {
57
58
  with: resolvedWith,
58
59
  campaignKey,
59
- pricePromotionKey
60
+ pricePromotionKey: pricePromotionKey ?? ""
60
61
  }
61
62
  );
62
63
  if (result.type === "success") {
@@ -77,13 +78,14 @@ export const removeItemFromWishlist = async function removeItemFromWishlist2(opt
77
78
  }
78
79
  const { sapiClient, wishlistKey } = context;
79
80
  const campaignKey = await context.callRpc?.("getCampaignKey");
80
- const resolvedWith = getWithParams(options, context);
81
+ const { pricePromotionKey, ...resolvedWith } = getWithParams(options, context);
81
82
  return await mapSAPIFetchErrorToResponse(sapiClient.wishlist.deleteItem)(
82
83
  wishlistKey,
83
84
  options.itemKey,
84
85
  {
85
86
  with: resolvedWith,
86
- campaignKey
87
+ campaignKey,
88
+ pricePromotionKey: pricePromotionKey ?? ""
87
89
  }
88
90
  );
89
91
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "8.16.0",
3
+ "version": "8.17.0",
4
4
  "description": "Collection of essential utilities to work with the Storefront API",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -1,415 +0,0 @@
1
- export declare const product: {
2
- id: number;
3
- isActive: boolean;
4
- isSoldOut: boolean;
5
- isNew: boolean;
6
- createdAt: string;
7
- updatedAt: string;
8
- masterKey: string;
9
- referenceKey: string;
10
- firstLiveAt: string;
11
- attributes: {
12
- color: {
13
- id: number;
14
- key: string;
15
- label: string;
16
- type: string;
17
- multiSelect: boolean;
18
- values: {
19
- id: number;
20
- label: string;
21
- value: string;
22
- };
23
- };
24
- brand: {
25
- id: number;
26
- key: string;
27
- label: string;
28
- type: string;
29
- multiSelect: boolean;
30
- values: {
31
- id: number;
32
- label: string;
33
- value: string;
34
- };
35
- };
36
- name: {
37
- id: number;
38
- key: string;
39
- label: string;
40
- type: null;
41
- multiSelect: boolean;
42
- values: {
43
- label: string;
44
- };
45
- };
46
- };
47
- lowestPriorPrice: {
48
- withTax: null;
49
- relativeDifferenceToPrice: null;
50
- };
51
- images: {
52
- hash: string;
53
- attributes: {};
54
- }[];
55
- variants: {
56
- id: number;
57
- referenceKey: string;
58
- firstLiveAt: string;
59
- createdAt: string;
60
- updatedAt: string;
61
- price: {
62
- currencyCode: string;
63
- withTax: number;
64
- withoutTax: number;
65
- appliedReductions: never[];
66
- recommendedRetailPrice: null;
67
- tax: {
68
- vat: {
69
- amount: number;
70
- rate: number;
71
- };
72
- };
73
- };
74
- stock: {
75
- supplierId: number;
76
- warehouseId: number;
77
- quantity: number;
78
- isSellableWithoutStock: boolean;
79
- };
80
- attributes: {
81
- shopSize: {
82
- id: number;
83
- key: string;
84
- label: string;
85
- type: string;
86
- multiSelect: boolean;
87
- values: {
88
- id: number;
89
- label: string;
90
- value: string;
91
- };
92
- };
93
- };
94
- }[];
95
- siblings: never[];
96
- priceRange: {
97
- min: {
98
- currencyCode: string;
99
- withTax: number;
100
- withoutTax: number;
101
- appliedReductions: never[];
102
- recommendedRetailPrice: null;
103
- tax: {
104
- vat: {
105
- amount: number;
106
- rate: number;
107
- };
108
- };
109
- };
110
- max: {
111
- currencyCode: string;
112
- withTax: number;
113
- withoutTax: number;
114
- appliedReductions: never[];
115
- recommendedRetailPrice: null;
116
- tax: {
117
- vat: {
118
- amount: number;
119
- rate: number;
120
- };
121
- };
122
- };
123
- };
124
- categories: {
125
- categoryId: number;
126
- categoryName: string;
127
- categorySlug: string;
128
- categoryUrl: string;
129
- categoryHidden: boolean;
130
- categoryProperties: never[];
131
- }[][];
132
- };
133
- export declare const productFromEDT: {
134
- id: number;
135
- isActive: boolean;
136
- isSoldOut: boolean;
137
- isNew: boolean;
138
- createdAt: string;
139
- updatedAt: string;
140
- masterKey: string;
141
- referenceKey: string;
142
- firstLiveAt: string;
143
- attributes: {
144
- brand: {
145
- id: number;
146
- key: string;
147
- label: string;
148
- type: string;
149
- multiSelect: boolean;
150
- values: {
151
- id: number;
152
- label: string;
153
- value: string;
154
- };
155
- };
156
- colorDetail: {
157
- id: number;
158
- key: string;
159
- label: string;
160
- type: string;
161
- multiSelect: boolean;
162
- values: {
163
- id: number;
164
- label: string;
165
- value: string;
166
- }[];
167
- };
168
- name: {
169
- id: number;
170
- key: string;
171
- label: string;
172
- type: string;
173
- multiSelect: boolean;
174
- values: {
175
- id: number;
176
- label: string;
177
- value: string;
178
- };
179
- };
180
- };
181
- lowestPriorPrice: {
182
- withTax: null;
183
- relativeDifferenceToPrice: null;
184
- };
185
- images: ({
186
- hash: string;
187
- attributes: {
188
- imageBackground: {
189
- id: number;
190
- key: string;
191
- label: string;
192
- type: string;
193
- multiSelect: boolean;
194
- values: {
195
- id: number;
196
- label: string;
197
- value: string;
198
- };
199
- };
200
- imageKind: {
201
- id: number;
202
- key: string;
203
- label: string;
204
- type: string;
205
- multiSelect: boolean;
206
- values: {
207
- id: number;
208
- label: string;
209
- value: string;
210
- };
211
- };
212
- imageView: {
213
- id: number;
214
- key: string;
215
- label: string;
216
- type: string;
217
- multiSelect: boolean;
218
- values: {
219
- id: number;
220
- label: string;
221
- value: string;
222
- };
223
- };
224
- imageType: {
225
- id: number;
226
- key: string;
227
- label: string;
228
- type: string;
229
- multiSelect: boolean;
230
- values: {
231
- id: number;
232
- label: string;
233
- value: string;
234
- };
235
- };
236
- };
237
- } | {
238
- hash: string;
239
- attributes: {
240
- imageBackground: {
241
- id: number;
242
- key: string;
243
- label: string;
244
- type: string;
245
- multiSelect: boolean;
246
- values: {
247
- id: number;
248
- label: string;
249
- value: string;
250
- };
251
- };
252
- imageKind: {
253
- id: number;
254
- key: string;
255
- label: string;
256
- type: string;
257
- multiSelect: boolean;
258
- values: {
259
- id: number;
260
- label: string;
261
- value: string;
262
- };
263
- };
264
- imageType: {
265
- id: number;
266
- key: string;
267
- label: string;
268
- type: string;
269
- multiSelect: boolean;
270
- values: {
271
- id: number;
272
- label: string;
273
- value: string;
274
- };
275
- };
276
- imageView?: undefined;
277
- };
278
- })[];
279
- variants: {
280
- id: number;
281
- referenceKey: string;
282
- firstLiveAt: string;
283
- createdAt: string;
284
- updatedAt: string;
285
- price: {
286
- currencyCode: string;
287
- withTax: number;
288
- withoutTax: number;
289
- appliedReductions: {
290
- category: string;
291
- type: string;
292
- amount: {
293
- relative: number;
294
- absoluteWithTax: number;
295
- };
296
- }[];
297
- recommendedRetailPrice: null;
298
- tax: {
299
- vat: {
300
- amount: number;
301
- rate: number;
302
- };
303
- };
304
- };
305
- stock: {
306
- supplierId: number;
307
- warehouseId: number;
308
- quantity: number;
309
- isSellableWithoutStock: boolean;
310
- };
311
- attributes: {};
312
- advancedAttributes: {
313
- variantCrosssellings: {
314
- id: number;
315
- key: string;
316
- label: string;
317
- type: string;
318
- values: {
319
- fieldSet: {
320
- value: string;
321
- }[][];
322
- groupSet: never[];
323
- }[];
324
- };
325
- };
326
- lowestPriorPrice: {
327
- withTax: null;
328
- relativeDifferenceToPrice: null;
329
- };
330
- }[];
331
- siblings: never[];
332
- priceRange: {
333
- min: {
334
- currencyCode: string;
335
- withTax: number;
336
- withoutTax: number;
337
- appliedReductions: {
338
- category: string;
339
- type: string;
340
- amount: {
341
- relative: number;
342
- absoluteWithTax: number;
343
- };
344
- }[];
345
- recommendedRetailPrice: null;
346
- tax: {
347
- vat: {
348
- amount: number;
349
- rate: number;
350
- };
351
- };
352
- };
353
- max: {
354
- currencyCode: string;
355
- withTax: number;
356
- withoutTax: number;
357
- appliedReductions: {
358
- category: string;
359
- type: string;
360
- amount: {
361
- relative: number;
362
- absoluteWithTax: number;
363
- };
364
- }[];
365
- recommendedRetailPrice: null;
366
- tax: {
367
- vat: {
368
- amount: number;
369
- rate: number;
370
- };
371
- };
372
- };
373
- };
374
- categories: {
375
- categoryId: number;
376
- categoryName: string;
377
- categorySlug: string;
378
- categoryUrl: string;
379
- categoryHidden: boolean;
380
- categoryProperties: never[];
381
- }[][];
382
- };
383
- export declare const priceFixture: {
384
- currencyCode: string;
385
- withTax: number;
386
- withoutTax: number;
387
- appliedReductions: never[];
388
- recommendedRetailPrice: null;
389
- tax: {
390
- vat: {
391
- amount: number;
392
- rate: number;
393
- };
394
- };
395
- };
396
- export declare const priceFixtureWithReductions: {
397
- currencyCode: string;
398
- withTax: number;
399
- withoutTax: number;
400
- appliedReductions: {
401
- category: string;
402
- type: string;
403
- amount: {
404
- relative: number;
405
- absoluteWithTax: number;
406
- };
407
- }[];
408
- recommendedRetailPrice: null;
409
- tax: {
410
- vat: {
411
- amount: number;
412
- rate: number;
413
- };
414
- };
415
- };
@@ -1,838 +0,0 @@
1
- const BILD_HINTERGRUND_LABEL = "Bild Hintergrund";
2
- const CREATED_AT = "2022-04-26T15:04:56+00:00";
3
- const WOMEN_CLOTHING_CATEGORY_URL = "/women/kleidung";
4
- export const product = {
5
- id: 6,
6
- isActive: true,
7
- isSoldOut: false,
8
- isNew: false,
9
- createdAt: CREATED_AT,
10
- updatedAt: "2022-06-21T20:02:33+00:00",
11
- masterKey: "HGO3464001000001",
12
- referenceKey: "1",
13
- firstLiveAt: "2022-04-28T14:13:07+00:00",
14
- attributes: {
15
- color: {
16
- id: 1001,
17
- key: "color",
18
- label: "Color",
19
- type: "",
20
- multiSelect: false,
21
- values: {
22
- id: 6,
23
- label: "Wei\xDF",
24
- value: "weiss"
25
- }
26
- },
27
- brand: {
28
- id: 550,
29
- key: "brand",
30
- label: "Marke",
31
- type: "",
32
- multiSelect: false,
33
- values: {
34
- id: 63,
35
- label: "HUGO",
36
- value: "hugo"
37
- }
38
- },
39
- name: {
40
- id: 20005,
41
- key: "name",
42
- label: "Name",
43
- type: null,
44
- multiSelect: false,
45
- values: {
46
- label: "HUGO Sweatshirt 'Dakimara'"
47
- }
48
- }
49
- },
50
- lowestPriorPrice: {
51
- withTax: null,
52
- relativeDifferenceToPrice: null
53
- },
54
- images: [
55
- {
56
- hash: "images/fe8ee645c772b98de23b00e4f600a613.png",
57
- attributes: {}
58
- }
59
- ],
60
- variants: [
61
- {
62
- id: 12,
63
- referenceKey: "1",
64
- firstLiveAt: "2022-04-28T14:13:07+00:00",
65
- createdAt: CREATED_AT,
66
- updatedAt: "2022-05-05T15:05:35+00:00",
67
- price: {
68
- currencyCode: "EUR",
69
- withTax: 8990,
70
- withoutTax: 7555,
71
- appliedReductions: [],
72
- recommendedRetailPrice: null,
73
- tax: {
74
- vat: {
75
- amount: 1435,
76
- rate: 0.19
77
- }
78
- }
79
- },
80
- stock: {
81
- supplierId: 1,
82
- warehouseId: 1,
83
- quantity: 999,
84
- isSellableWithoutStock: false
85
- },
86
- attributes: {
87
- shopSize: {
88
- id: 2,
89
- key: "shopSize",
90
- label: "Gr\xF6\xDFe",
91
- type: "",
92
- multiSelect: false,
93
- values: {
94
- id: 25472,
95
- label: "34",
96
- value: "34"
97
- }
98
- }
99
- }
100
- },
101
- {
102
- id: 13,
103
- referenceKey: "2",
104
- firstLiveAt: "2022-04-28T14:13:27+00:00",
105
- createdAt: CREATED_AT,
106
- updatedAt: "2022-05-05T15:05:35+00:00",
107
- price: {
108
- currencyCode: "EUR",
109
- withTax: 8990,
110
- withoutTax: 7555,
111
- appliedReductions: [],
112
- recommendedRetailPrice: null,
113
- tax: {
114
- vat: {
115
- amount: 1435,
116
- rate: 0.19
117
- }
118
- }
119
- },
120
- stock: {
121
- supplierId: 1,
122
- warehouseId: 1,
123
- quantity: 492,
124
- isSellableWithoutStock: false
125
- },
126
- attributes: {
127
- shopSize: {
128
- id: 2,
129
- key: "shopSize",
130
- label: "Gr\xF6\xDFe",
131
- type: "",
132
- multiSelect: false,
133
- values: {
134
- id: 25482,
135
- label: "36",
136
- value: "36"
137
- }
138
- }
139
- }
140
- }
141
- ],
142
- siblings: [],
143
- priceRange: {
144
- min: {
145
- currencyCode: "EUR",
146
- withTax: 8990,
147
- withoutTax: 7555,
148
- appliedReductions: [],
149
- recommendedRetailPrice: null,
150
- tax: {
151
- vat: {
152
- amount: 1435,
153
- rate: 0.19
154
- }
155
- }
156
- },
157
- max: {
158
- currencyCode: "EUR",
159
- withTax: 8990,
160
- withoutTax: 7555,
161
- appliedReductions: [],
162
- recommendedRetailPrice: null,
163
- tax: {
164
- vat: {
165
- amount: 1435,
166
- rate: 0.19
167
- }
168
- }
169
- }
170
- },
171
- categories: [
172
- [
173
- {
174
- categoryId: 2045,
175
- categoryName: "Women",
176
- categorySlug: "women",
177
- categoryUrl: "/women",
178
- categoryHidden: false,
179
- categoryProperties: []
180
- }
181
- ]
182
- ]
183
- };
184
- export const productFromEDT = {
185
- id: 5703863,
186
- isActive: true,
187
- isSoldOut: false,
188
- isNew: false,
189
- createdAt: "2021-02-02T10:39:10+00:00",
190
- updatedAt: "2022-07-02T00:45:20+00:00",
191
- masterKey: "EDT3759-130",
192
- referenceKey: "EDT3759001",
193
- firstLiveAt: "2021-04-07T09:29:34+00:00",
194
- attributes: {
195
- brand: {
196
- id: 550,
197
- key: "brand",
198
- label: "Marke",
199
- type: "",
200
- multiSelect: false,
201
- values: {
202
- id: 4517,
203
- label: "EDITED",
204
- value: "edited_the_label"
205
- }
206
- },
207
- colorDetail: {
208
- id: 210,
209
- key: "colorDetail",
210
- label: "Detailfarbe",
211
- type: "",
212
- multiSelect: true,
213
- values: [
214
- {
215
- id: 38905,
216
- label: "schwarz",
217
- value: "schwarz"
218
- }
219
- ]
220
- },
221
- name: {
222
- id: 20005,
223
- key: "name",
224
- label: "Name",
225
- type: "",
226
- multiSelect: false,
227
- values: {
228
- id: 20005,
229
- label: "Rock 'Cara'",
230
- value: "name"
231
- }
232
- }
233
- },
234
- lowestPriorPrice: {
235
- withTax: null,
236
- relativeDifferenceToPrice: null
237
- },
238
- images: [
239
- {
240
- hash: "images/14e40f72fae877ccf3a210943974fbd1.png",
241
- attributes: {
242
- imageBackground: {
243
- id: 1258,
244
- key: "imageBackground",
245
- label: BILD_HINTERGRUND_LABEL,
246
- type: "",
247
- multiSelect: false,
248
- values: {
249
- id: 66507,
250
- label: "transparent",
251
- value: "transparent"
252
- }
253
- },
254
- imageKind: {
255
- id: 1534,
256
- key: "imageKind",
257
- label: "Bild Art",
258
- type: "",
259
- multiSelect: false,
260
- values: {
261
- id: 73860,
262
- label: "Bust Image",
263
- value: "bust_image"
264
- }
265
- },
266
- imageView: {
267
- id: 1254,
268
- key: "imageView",
269
- label: "Bild Ansicht",
270
- type: "",
271
- multiSelect: false,
272
- values: {
273
- id: 66486,
274
- label: "Frontalansicht",
275
- value: "front"
276
- }
277
- },
278
- imageType: {
279
- id: 1252,
280
- key: "imageType",
281
- label: "Bild Typ",
282
- type: "",
283
- multiSelect: false,
284
- values: {
285
- id: 66480,
286
- label: "B\xFCste",
287
- value: "bust"
288
- }
289
- }
290
- }
291
- },
292
- {
293
- hash: "images/2ad7fdef5654e9f4204156a9c9f8c127.jpg",
294
- attributes: {
295
- imageBackground: {
296
- id: 1258,
297
- key: "imageBackground",
298
- label: BILD_HINTERGRUND_LABEL,
299
- type: "",
300
- multiSelect: false,
301
- values: {
302
- id: 66506,
303
- label: "grau",
304
- value: "grey"
305
- }
306
- },
307
- imageKind: {
308
- id: 1534,
309
- key: "imageKind",
310
- label: "Bild Art",
311
- type: "",
312
- multiSelect: false,
313
- values: {
314
- id: 73861,
315
- label: "Model Image",
316
- value: "model_image"
317
- }
318
- },
319
- imageView: {
320
- id: 1254,
321
- key: "imageView",
322
- label: "Bild Ansicht",
323
- type: "",
324
- multiSelect: false,
325
- values: {
326
- id: 66486,
327
- label: "Frontalansicht",
328
- value: "front"
329
- }
330
- },
331
- imageType: {
332
- id: 1252,
333
- key: "imageType",
334
- label: "Bild Typ",
335
- type: "",
336
- multiSelect: false,
337
- values: {
338
- id: 66481,
339
- label: "Model",
340
- value: "model"
341
- }
342
- }
343
- }
344
- },
345
- {
346
- hash: "images/30a9e84e2d22dbb2ae6b195109a79382.jpg",
347
- attributes: {
348
- imageBackground: {
349
- id: 1258,
350
- key: "imageBackground",
351
- label: BILD_HINTERGRUND_LABEL,
352
- type: "",
353
- multiSelect: false,
354
- values: {
355
- id: 66506,
356
- label: "grau",
357
- value: "grey"
358
- }
359
- },
360
- imageKind: {
361
- id: 1534,
362
- key: "imageKind",
363
- label: "Bild Art",
364
- type: "",
365
- multiSelect: false,
366
- values: {
367
- id: 73861,
368
- label: "Model Image",
369
- value: "model_image"
370
- }
371
- },
372
- imageType: {
373
- id: 1252,
374
- key: "imageType",
375
- label: "Bild Typ",
376
- type: "",
377
- multiSelect: false,
378
- values: {
379
- id: 66481,
380
- label: "Model",
381
- value: "model"
382
- }
383
- }
384
- }
385
- },
386
- {
387
- hash: "images/43998efe919bd825b71d2ef1ff159353.jpg",
388
- attributes: {
389
- imageBackground: {
390
- id: 1258,
391
- key: "imageBackground",
392
- label: BILD_HINTERGRUND_LABEL,
393
- type: "",
394
- multiSelect: false,
395
- values: {
396
- id: 66506,
397
- label: "grau",
398
- value: "grey"
399
- }
400
- },
401
- imageKind: {
402
- id: 1534,
403
- key: "imageKind",
404
- label: "Bild Art",
405
- type: "",
406
- multiSelect: false,
407
- values: {
408
- id: 73859,
409
- label: "Model-Outfit Image",
410
- value: "modeloutfit_image"
411
- }
412
- },
413
- imageType: {
414
- id: 1252,
415
- key: "imageType",
416
- label: "Bild Typ",
417
- type: "",
418
- multiSelect: false,
419
- values: {
420
- id: 66481,
421
- label: "Model",
422
- value: "model"
423
- }
424
- }
425
- }
426
- },
427
- {
428
- hash: "images/b953361cab23976305778c556282ef0b.jpg",
429
- attributes: {
430
- imageBackground: {
431
- id: 1258,
432
- key: "imageBackground",
433
- label: BILD_HINTERGRUND_LABEL,
434
- type: "",
435
- multiSelect: false,
436
- values: {
437
- id: 66506,
438
- label: "grau",
439
- value: "grey"
440
- }
441
- },
442
- imageKind: {
443
- id: 1534,
444
- key: "imageKind",
445
- label: "Bild Art",
446
- type: "",
447
- multiSelect: false,
448
- values: {
449
- id: 73858,
450
- label: "Detail Image",
451
- value: "detail_image"
452
- }
453
- },
454
- imageType: {
455
- id: 1252,
456
- key: "imageType",
457
- label: "Bild Typ",
458
- type: "",
459
- multiSelect: false,
460
- values: {
461
- id: 66480,
462
- label: "B\xFCste",
463
- value: "bust"
464
- }
465
- }
466
- }
467
- },
468
- {
469
- hash: "images/a735bfeefc11d14d703f697133958bd6.jpg",
470
- attributes: {
471
- imageBackground: {
472
- id: 1258,
473
- key: "imageBackground",
474
- label: BILD_HINTERGRUND_LABEL,
475
- type: "",
476
- multiSelect: false,
477
- values: {
478
- id: 66506,
479
- label: "grau",
480
- value: "grey"
481
- }
482
- },
483
- imageKind: {
484
- id: 1534,
485
- key: "imageKind",
486
- label: "Bild Art",
487
- type: "",
488
- multiSelect: false,
489
- values: {
490
- id: 73858,
491
- label: "Detail Image",
492
- value: "detail_image"
493
- }
494
- },
495
- imageType: {
496
- id: 1252,
497
- key: "imageType",
498
- label: "Bild Typ",
499
- type: "",
500
- multiSelect: false,
501
- values: {
502
- id: 66480,
503
- label: "B\xFCste",
504
- value: "bust"
505
- }
506
- }
507
- }
508
- }
509
- ],
510
- variants: [
511
- {
512
- id: 43239673,
513
- referenceKey: "EDT3759001000001",
514
- firstLiveAt: "2021-04-07T09:30:06+00:00",
515
- createdAt: "2021-02-02T10:39:10+00:00",
516
- updatedAt: "2022-07-30T08:38:55+00:00",
517
- price: {
518
- currencyCode: "EUR",
519
- withTax: 16500,
520
- withoutTax: 13866,
521
- appliedReductions: [
522
- {
523
- category: "sale",
524
- type: "relative",
525
- amount: {
526
- relative: 0.21,
527
- absoluteWithTax: 4400
528
- }
529
- },
530
- {
531
- category: "campaign",
532
- type: "relative",
533
- amount: {
534
- relative: 0.5,
535
- absoluteWithTax: 2200
536
- }
537
- }
538
- ],
539
- recommendedRetailPrice: null,
540
- tax: {
541
- vat: {
542
- amount: 2634,
543
- rate: 0.19
544
- }
545
- }
546
- },
547
- stock: {
548
- supplierId: 130,
549
- warehouseId: 115,
550
- quantity: 0,
551
- isSellableWithoutStock: false
552
- },
553
- attributes: {},
554
- advancedAttributes: {
555
- variantCrosssellings: {
556
- id: 1430,
557
- key: "variantCrosssellings",
558
- label: "Crosssellings",
559
- type: "",
560
- values: [
561
- {
562
- fieldSet: [
563
- [
564
- {
565
- value: "4063582377638"
566
- }
567
- ],
568
- [
569
- {
570
- value: "4063582448338"
571
- }
572
- ]
573
- ],
574
- groupSet: []
575
- }
576
- ]
577
- }
578
- },
579
- lowestPriorPrice: {
580
- withTax: null,
581
- relativeDifferenceToPrice: null
582
- }
583
- }
584
- ],
585
- siblings: [],
586
- priceRange: {
587
- min: {
588
- currencyCode: "EUR",
589
- withTax: 16500,
590
- withoutTax: 13866,
591
- appliedReductions: [
592
- {
593
- category: "sale",
594
- type: "relative",
595
- amount: {
596
- relative: 0.21,
597
- absoluteWithTax: 4400
598
- }
599
- }
600
- ],
601
- recommendedRetailPrice: null,
602
- tax: {
603
- vat: {
604
- amount: 2634,
605
- rate: 0.19
606
- }
607
- }
608
- },
609
- max: {
610
- currencyCode: "EUR",
611
- withTax: 16500,
612
- withoutTax: 13866,
613
- appliedReductions: [
614
- {
615
- category: "sale",
616
- type: "relative",
617
- amount: {
618
- relative: 0.21,
619
- absoluteWithTax: 4400
620
- }
621
- }
622
- ],
623
- recommendedRetailPrice: null,
624
- tax: {
625
- vat: {
626
- amount: 2634,
627
- rate: 0.19
628
- }
629
- }
630
- }
631
- },
632
- categories: [
633
- [
634
- {
635
- categoryId: 607403,
636
- categoryName: "Women",
637
- categorySlug: "women",
638
- categoryUrl: "/women",
639
- categoryHidden: false,
640
- categoryProperties: []
641
- }
642
- ],
643
- [
644
- {
645
- categoryId: 607403,
646
- categoryName: "Women",
647
- categorySlug: "women",
648
- categoryUrl: "/women",
649
- categoryHidden: false,
650
- categoryProperties: []
651
- },
652
- {
653
- categoryId: 608453,
654
- categoryName: "Kleidung",
655
- categorySlug: "kleidung",
656
- categoryUrl: WOMEN_CLOTHING_CATEGORY_URL,
657
- categoryHidden: false,
658
- categoryProperties: []
659
- },
660
- {
661
- categoryId: 607404,
662
- categoryName: "Sale",
663
- categorySlug: "sale",
664
- categoryUrl: `${WOMEN_CLOTHING_CATEGORY_URL}/sale`,
665
- categoryHidden: false,
666
- categoryProperties: []
667
- }
668
- ],
669
- [
670
- {
671
- categoryId: 607403,
672
- categoryName: "Women",
673
- categorySlug: "women",
674
- categoryUrl: "/women",
675
- categoryHidden: false,
676
- categoryProperties: []
677
- },
678
- {
679
- categoryId: 608453,
680
- categoryName: "Kleidung",
681
- categorySlug: "kleidung",
682
- categoryUrl: WOMEN_CLOTHING_CATEGORY_URL,
683
- categoryHidden: false,
684
- categoryProperties: []
685
- },
686
- {
687
- categoryId: 607404,
688
- categoryName: "Sale",
689
- categorySlug: "sale",
690
- categoryUrl: `${WOMEN_CLOTHING_CATEGORY_URL}/sale`,
691
- categoryHidden: false,
692
- categoryProperties: []
693
- },
694
- {
695
- categoryId: 607405,
696
- categoryName: "Kleidung",
697
- categorySlug: "kleidung",
698
- categoryUrl: `${WOMEN_CLOTHING_CATEGORY_URL}/sale/kleidung`,
699
- categoryHidden: false,
700
- categoryProperties: []
701
- }
702
- ],
703
- [
704
- {
705
- categoryId: 607403,
706
- categoryName: "Women",
707
- categorySlug: "women",
708
- categoryUrl: "/women",
709
- categoryHidden: false,
710
- categoryProperties: []
711
- },
712
- {
713
- categoryId: 608453,
714
- categoryName: "Kleidung",
715
- categorySlug: "kleidung",
716
- categoryUrl: WOMEN_CLOTHING_CATEGORY_URL,
717
- categoryHidden: false,
718
- categoryProperties: []
719
- },
720
- {
721
- categoryId: 607404,
722
- categoryName: "Sale",
723
- categorySlug: "sale",
724
- categoryUrl: `${WOMEN_CLOTHING_CATEGORY_URL}/sale`,
725
- categoryHidden: false,
726
- categoryProperties: []
727
- },
728
- {
729
- categoryId: 607405,
730
- categoryName: "Kleidung",
731
- categorySlug: "kleidung",
732
- categoryUrl: `${WOMEN_CLOTHING_CATEGORY_URL}/sale/kleidung`,
733
- categoryHidden: false,
734
- categoryProperties: []
735
- },
736
- {
737
- categoryId: 607409,
738
- categoryName: "R\xF6cke",
739
- categorySlug: "roecke",
740
- categoryUrl: `${WOMEN_CLOTHING_CATEGORY_URL}/sale/kleidung/roecke`,
741
- categoryHidden: false,
742
- categoryProperties: []
743
- }
744
- ],
745
- [
746
- {
747
- categoryId: 607403,
748
- categoryName: "Women",
749
- categorySlug: "women",
750
- categoryUrl: "/women",
751
- categoryHidden: false,
752
- categoryProperties: []
753
- },
754
- {
755
- categoryId: 608453,
756
- categoryName: "Kleidung",
757
- categorySlug: "kleidung",
758
- categoryUrl: WOMEN_CLOTHING_CATEGORY_URL,
759
- categoryHidden: false,
760
- categoryProperties: []
761
- },
762
- {
763
- categoryId: 607443,
764
- categoryName: "R\xF6cke",
765
- categorySlug: "roecke",
766
- categoryUrl: `${WOMEN_CLOTHING_CATEGORY_URL}/roecke`,
767
- categoryHidden: false,
768
- categoryProperties: []
769
- }
770
- ],
771
- [
772
- {
773
- categoryId: 607497,
774
- categoryName: "Looks",
775
- categorySlug: "looks",
776
- categoryUrl: "/looks",
777
- categoryHidden: false,
778
- categoryProperties: []
779
- }
780
- ],
781
- [
782
- {
783
- categoryId: 607497,
784
- categoryName: "Looks",
785
- categorySlug: "looks",
786
- categoryUrl: "/looks",
787
- categoryHidden: false,
788
- categoryProperties: []
789
- },
790
- {
791
- categoryId: 607707,
792
- categoryName: "Black Mania",
793
- categorySlug: "black-mania",
794
- categoryUrl: "/looks/black-mania",
795
- categoryHidden: false,
796
- categoryProperties: []
797
- }
798
- ],
799
- [
800
- {
801
- categoryId: 607497,
802
- categoryName: "Looks",
803
- categorySlug: "looks",
804
- categoryUrl: "/looks",
805
- categoryHidden: false,
806
- categoryProperties: []
807
- },
808
- {
809
- categoryId: 607791,
810
- categoryName: "Best of Basics",
811
- categorySlug: "best-of-basics",
812
- categoryUrl: "/looks/best-of-basics",
813
- categoryHidden: false,
814
- categoryProperties: []
815
- }
816
- ],
817
- [
818
- {
819
- categoryId: 607403,
820
- categoryName: "Women",
821
- categorySlug: "women",
822
- categoryUrl: "/women",
823
- categoryHidden: false,
824
- categoryProperties: []
825
- },
826
- {
827
- categoryId: 608453,
828
- categoryName: "Kleidung",
829
- categorySlug: "kleidung",
830
- categoryUrl: WOMEN_CLOTHING_CATEGORY_URL,
831
- categoryHidden: false,
832
- categoryProperties: []
833
- }
834
- ]
835
- ]
836
- };
837
- export const priceFixture = product.variants[0].price;
838
- export const priceFixtureWithReductions = productFromEDT.variants[0].price;