@plentymarkets/shop-api 0.152.2 → 0.153.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.
- package/lib/api/__tests__/__fixtures__/ApiChangeUserPasswordFixture.d.ts +1 -1
- package/lib/api/__tests__/__fixtures__/ApiChangeUserPasswordFixture.d.ts.map +1 -1
- package/lib/api/__tests__/__fixtures__/ApiInitFixture.d.ts +0 -3
- package/lib/api/__tests__/__fixtures__/ApiInitFixture.d.ts.map +1 -1
- package/lib/api/__tests__/__fixtures__/ApiRegisterUserFixture.d.ts +1 -1
- package/lib/api/__tests__/__fixtures__/ApiRegisterUserFixture.d.ts.map +1 -1
- package/lib/api/deleteCartItem/index.d.ts.map +1 -1
- package/lib/api/doAddCartItem/index.d.ts.map +1 -1
- package/lib/api/doPlaceOrder/index.d.ts.map +1 -1
- package/lib/api/getActiveShippingCountries/index.d.ts.map +1 -1
- package/lib/api/getCart/index.d.ts.map +1 -1
- package/lib/api/getCategoriesSearch/index.d.ts.map +1 -1
- package/lib/api/getCategoryTree/index.d.ts.map +1 -1
- package/lib/api/getInit/index.d.ts.map +1 -1
- package/lib/api/getOrder/index.d.ts.map +1 -1
- package/lib/api/getProduct/index.d.ts.map +1 -1
- package/lib/api/getReturns/index.d.ts.map +1 -1
- package/lib/api/getSearch/index.d.ts.map +1 -1
- package/lib/api/setCartItemQuantity/index.d.ts.map +1 -1
- package/lib/getters/orderGetters.d.ts +2 -0
- package/lib/getters/orderGetters.d.ts.map +1 -1
- package/lib/helpers/apiTransformations.helper.d.ts +33 -0
- package/lib/helpers/apiTransformations.helper.d.ts.map +1 -0
- package/lib/helpers/header.helper.d.ts.map +1 -1
- package/lib/helpers/index.d.ts +1 -0
- package/lib/helpers/index.d.ts.map +1 -1
- package/lib/hooks/onRequest.d.ts.map +1 -1
- package/lib/index.cjs.js +285 -101
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.es.js +285 -101
- package/lib/index.es.js.map +1 -1
- package/lib/types/api/categoriesSearch.d.ts +1 -0
- package/lib/types/api/categoriesSearch.d.ts.map +1 -1
- package/lib/types/api/user.d.ts +0 -3
- package/lib/types/api/user.d.ts.map +1 -1
- package/package.json +3 -3
- package/server/api/__tests__/__fixtures__/ApiChangeUserPasswordFixture.d.ts +1 -1
- package/server/api/__tests__/__fixtures__/ApiChangeUserPasswordFixture.d.ts.map +1 -1
- package/server/api/__tests__/__fixtures__/ApiInitFixture.d.ts +0 -3
- package/server/api/__tests__/__fixtures__/ApiInitFixture.d.ts.map +1 -1
- package/server/api/__tests__/__fixtures__/ApiRegisterUserFixture.d.ts +1 -1
- package/server/api/__tests__/__fixtures__/ApiRegisterUserFixture.d.ts.map +1 -1
- package/server/api/deleteCartItem/index.d.ts.map +1 -1
- package/server/api/doAddCartItem/index.d.ts.map +1 -1
- package/server/api/doPlaceOrder/index.d.ts.map +1 -1
- package/server/api/getActiveShippingCountries/index.d.ts.map +1 -1
- package/server/api/getCart/index.d.ts.map +1 -1
- package/server/api/getCategoriesSearch/index.d.ts.map +1 -1
- package/server/api/getCategoryTree/index.d.ts.map +1 -1
- package/server/api/getInit/index.d.ts.map +1 -1
- package/server/api/getOrder/index.d.ts.map +1 -1
- package/server/api/getProduct/index.d.ts.map +1 -1
- package/server/api/getReturns/index.d.ts.map +1 -1
- package/server/api/getSearch/index.d.ts.map +1 -1
- package/server/api/setCartItemQuantity/index.d.ts.map +1 -1
- package/server/getters/orderGetters.d.ts +2 -0
- package/server/getters/orderGetters.d.ts.map +1 -1
- package/server/helpers/apiTransformations.helper.d.ts +33 -0
- package/server/helpers/apiTransformations.helper.d.ts.map +1 -0
- package/server/helpers/header.helper.d.ts.map +1 -1
- package/server/helpers/index.d.ts +1 -0
- package/server/helpers/index.d.ts.map +1 -1
- package/server/hooks/onRequest.d.ts.map +1 -1
- package/server/index.js +289 -105
- package/server/index.js.map +1 -1
- package/server/types/api/categoriesSearch.d.ts +1 -0
- package/server/types/api/categoriesSearch.d.ts.map +1 -1
- package/server/types/api/user.d.ts +0 -3
- package/server/types/api/user.d.ts.map +1 -1
package/server/index.js
CHANGED
|
@@ -99,6 +99,245 @@ const getBlocks = async (context, params) => {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
+
function getMappedCartItems(basketItems) {
|
|
103
|
+
return basketItems.map((basketItem) => {
|
|
104
|
+
return {
|
|
105
|
+
...basketItem,
|
|
106
|
+
variation: basketItem.variation.data,
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const convertToNumberOrNull = (value) => {
|
|
112
|
+
if (value === null || value === undefined || value === '')
|
|
113
|
+
return null;
|
|
114
|
+
const parsedNumber = Number(value);
|
|
115
|
+
return isNaN(parsedNumber) ? null : parsedNumber;
|
|
116
|
+
};
|
|
117
|
+
const mapAddressForServer = (address) => {
|
|
118
|
+
return {
|
|
119
|
+
...(address.id && { id: address.id }),
|
|
120
|
+
gender: '',
|
|
121
|
+
countryId: Number(address?.country ?? 0),
|
|
122
|
+
email: address.email,
|
|
123
|
+
name1: address.companyName,
|
|
124
|
+
name2: address.firstName,
|
|
125
|
+
name3: address.lastName,
|
|
126
|
+
vatNumber: address.vatNumber,
|
|
127
|
+
contactPerson: '',
|
|
128
|
+
address1: address.streetName,
|
|
129
|
+
address2: address.apartment,
|
|
130
|
+
address3: address.additionalAddressInformation,
|
|
131
|
+
postalCode: address.zipCode,
|
|
132
|
+
postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
|
|
133
|
+
town: address.city,
|
|
134
|
+
telephone: address.phoneNumber,
|
|
135
|
+
stateId: convertToNumberOrNull(address.state),
|
|
136
|
+
birthday: address.birthday,
|
|
137
|
+
...(address.primary && { isPrimary: true }),
|
|
138
|
+
...(address.id && { pivot: { isPrimary: true } }),
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
const mapAddressForClient = (addressData) => {
|
|
142
|
+
const address = {
|
|
143
|
+
id: addressData.id,
|
|
144
|
+
firstName: addressData.name2,
|
|
145
|
+
lastName: addressData.name3,
|
|
146
|
+
streetName: addressData.address1,
|
|
147
|
+
apartment: addressData.address2,
|
|
148
|
+
additionalAddressInformation: addressData.address3,
|
|
149
|
+
city: addressData.town,
|
|
150
|
+
state: addressData.stateId?.toString(),
|
|
151
|
+
country: addressData.countryId?.toString(),
|
|
152
|
+
zipCode: addressData.postalCode,
|
|
153
|
+
postNumber: '',
|
|
154
|
+
phoneNumber: '',
|
|
155
|
+
email: '',
|
|
156
|
+
primary: Boolean(addressData?.pivot?.isPrimary || 0),
|
|
157
|
+
companyName: addressData.name1 ?? undefined,
|
|
158
|
+
vatNumber: addressData.taxIdNumber,
|
|
159
|
+
birthday: '',
|
|
160
|
+
typeId: addressData.pivot?.typeId ?? undefined,
|
|
161
|
+
};
|
|
162
|
+
addressData.options.forEach((option) => {
|
|
163
|
+
switch (option.typeId) {
|
|
164
|
+
case AddressOptionType.Telephone:
|
|
165
|
+
address.phoneNumber = option.value;
|
|
166
|
+
break;
|
|
167
|
+
case AddressOptionType.Email:
|
|
168
|
+
address.email = option.value;
|
|
169
|
+
break;
|
|
170
|
+
case AddressOptionType.PostNumber:
|
|
171
|
+
address.postNumber = option.value;
|
|
172
|
+
break;
|
|
173
|
+
case AddressOptionType.Birthday:
|
|
174
|
+
address.birthday = option.value;
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
return address;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const logRequest = (request) => {
|
|
182
|
+
consola.consola.log('Request-url:', request.url);
|
|
183
|
+
consola.consola.log('Request-headers:', request.headers);
|
|
184
|
+
consola.consola.log('Request-data:', request.data);
|
|
185
|
+
};
|
|
186
|
+
const logResponse = (response) => {
|
|
187
|
+
consola.consola.log('Response-url:', response.config.url);
|
|
188
|
+
consola.consola.log('Response-headers:', response.headers);
|
|
189
|
+
consola.consola.log('Response-data:', response.data);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const toStringId = (value) => {
|
|
193
|
+
if (value === null || value === undefined)
|
|
194
|
+
return '0';
|
|
195
|
+
if (typeof value === 'string')
|
|
196
|
+
return value;
|
|
197
|
+
return String(value);
|
|
198
|
+
};
|
|
199
|
+
const transformCategoryTreeItemCount = (count) => ({
|
|
200
|
+
...count,
|
|
201
|
+
categoryId: toStringId(count.categoryId),
|
|
202
|
+
webstoreId: toStringId(count.webstoreId),
|
|
203
|
+
count: toStringId(count.count),
|
|
204
|
+
variationCount: toStringId(count.variationCount),
|
|
205
|
+
customerClassId: toStringId(count.customerClassId),
|
|
206
|
+
});
|
|
207
|
+
const transformCategoryTreeItem = (item) => {
|
|
208
|
+
if (!item)
|
|
209
|
+
return item;
|
|
210
|
+
const hasItemCount = item.itemCount?.length;
|
|
211
|
+
const hasChildren = item.children?.length;
|
|
212
|
+
if (!hasItemCount && !hasChildren) {
|
|
213
|
+
return item;
|
|
214
|
+
}
|
|
215
|
+
const transformedItemCount = hasItemCount
|
|
216
|
+
? item.itemCount.map(transformCategoryTreeItemCount)
|
|
217
|
+
: item.itemCount;
|
|
218
|
+
const transformedChildren = hasChildren
|
|
219
|
+
? item.children.map(transformCategoryTreeItem)
|
|
220
|
+
: item.children;
|
|
221
|
+
if (transformedItemCount === item.itemCount &&
|
|
222
|
+
transformedChildren === item.children) {
|
|
223
|
+
return item;
|
|
224
|
+
}
|
|
225
|
+
return {
|
|
226
|
+
...item,
|
|
227
|
+
...(transformedItemCount && { itemCount: transformedItemCount }),
|
|
228
|
+
...(transformedChildren && { children: transformedChildren }),
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
const transformCountryState = (state) => ({
|
|
232
|
+
...state,
|
|
233
|
+
countryId: toStringId(state.countryId),
|
|
234
|
+
});
|
|
235
|
+
const transformCountryName = (name) => ({
|
|
236
|
+
...name,
|
|
237
|
+
country_id: toStringId(name.country_id),
|
|
238
|
+
});
|
|
239
|
+
const transformShippingCountry = (country) => ({
|
|
240
|
+
...country,
|
|
241
|
+
states: country.states?.map(transformCountryState) || [],
|
|
242
|
+
names: country.names?.map(transformCountryName) || [],
|
|
243
|
+
});
|
|
244
|
+
const transformOrderItem = (item) => {
|
|
245
|
+
const transformed = {
|
|
246
|
+
...item,
|
|
247
|
+
position: toStringId(item.position),
|
|
248
|
+
};
|
|
249
|
+
if (item.references && Array.isArray(item.references)) {
|
|
250
|
+
transformed.references =
|
|
251
|
+
item.references.map((ref) => {
|
|
252
|
+
const reference = ref;
|
|
253
|
+
return {
|
|
254
|
+
...ref,
|
|
255
|
+
orderItemId: toStringId(reference.orderItemId),
|
|
256
|
+
referenceOrderItemId: toStringId(reference.referenceOrderItemId),
|
|
257
|
+
};
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
return transformed;
|
|
261
|
+
};
|
|
262
|
+
const transformOrderReference = (ref) => ({
|
|
263
|
+
...ref,
|
|
264
|
+
orderId: toStringId(ref.orderId),
|
|
265
|
+
originOrderId: toStringId(ref.originOrderId),
|
|
266
|
+
referenceOrderId: toStringId(ref.referenceOrderId),
|
|
267
|
+
});
|
|
268
|
+
const transformOrder = (order) => {
|
|
269
|
+
if (!order?.order)
|
|
270
|
+
return order;
|
|
271
|
+
const transformed = {
|
|
272
|
+
...order,
|
|
273
|
+
order: {
|
|
274
|
+
...order.order,
|
|
275
|
+
locationId: toStringId(order.order.locationId),
|
|
276
|
+
ownerId: toStringId(order.order.ownerId),
|
|
277
|
+
orderItems: order.order.orderItems?.map(transformOrderItem) || [],
|
|
278
|
+
orderReferences: order.order.orderReferences?.map(transformOrderReference) || [],
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
if (transformed.variations) {
|
|
282
|
+
const newVariations = {};
|
|
283
|
+
Object.keys(transformed.variations).forEach((key) => {
|
|
284
|
+
const variation = transformed.variations[key];
|
|
285
|
+
if (variation?.item && typeof variation.item === 'object') {
|
|
286
|
+
const item = variation.item;
|
|
287
|
+
if (item.feedbackCount !== undefined && item.feedbackCount !== null) {
|
|
288
|
+
newVariations[key] = {
|
|
289
|
+
...variation,
|
|
290
|
+
item: {
|
|
291
|
+
...item,
|
|
292
|
+
feedbackCount: toStringId(item.feedbackCount),
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
newVariations[key] = variation;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
newVariations[key] = variation;
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
transformed.variations = newVariations;
|
|
305
|
+
}
|
|
306
|
+
return transformed;
|
|
307
|
+
};
|
|
308
|
+
const transformFacetInternal = (facet, skipFeedback = false) => {
|
|
309
|
+
const transformed = { ...facet };
|
|
310
|
+
if (!skipFeedback || facet.id !== 'feedback') {
|
|
311
|
+
if (facet.minHitCount !== undefined && facet.minHitCount !== null) {
|
|
312
|
+
transformed.minHitCount = String(facet.minHitCount);
|
|
313
|
+
}
|
|
314
|
+
if (facet.maxResultCount !== undefined && facet.maxResultCount !== null) {
|
|
315
|
+
transformed.maxResultCount = String(facet.maxResultCount);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
if ('facets' in transformed) {
|
|
319
|
+
delete transformed.facets;
|
|
320
|
+
}
|
|
321
|
+
return transformed;
|
|
322
|
+
};
|
|
323
|
+
const transformSearchFacet = (facet) => {
|
|
324
|
+
return transformFacetInternal(facet, true);
|
|
325
|
+
};
|
|
326
|
+
const transformProductItem = (product) => {
|
|
327
|
+
if (!product)
|
|
328
|
+
return product;
|
|
329
|
+
if (!product.item)
|
|
330
|
+
return product;
|
|
331
|
+
const item = product.item;
|
|
332
|
+
return {
|
|
333
|
+
...product,
|
|
334
|
+
item: {
|
|
335
|
+
...item,
|
|
336
|
+
feedbackCount: toStringId(item.feedbackCount),
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
|
|
102
341
|
/**
|
|
103
342
|
* Method getProduct - Used to get product instance.
|
|
104
343
|
*
|
|
@@ -130,11 +369,13 @@ const getProduct = async (context, params) => {
|
|
|
130
369
|
getBlocks(context, {
|
|
131
370
|
identifier: '0',
|
|
132
371
|
type: 'product',
|
|
133
|
-
})
|
|
372
|
+
}),
|
|
134
373
|
]);
|
|
135
374
|
const data = response.data;
|
|
375
|
+
const productData = data.item.documents[0].data;
|
|
376
|
+
const transformedProduct = transformProductItem(productData);
|
|
136
377
|
const mappedProduct = {
|
|
137
|
-
...
|
|
378
|
+
...transformedProduct,
|
|
138
379
|
variationAttributeMap: {
|
|
139
380
|
variations: data.variations,
|
|
140
381
|
attributes: data.attributes,
|
|
@@ -234,7 +475,15 @@ const getCategoryTree = async (context) => {
|
|
|
234
475
|
const url = new URL('/rest/storefront/categories', context.config.api.url);
|
|
235
476
|
url.searchParams.set('level', '5');
|
|
236
477
|
const { data: response } = await context.client.get(url.href);
|
|
237
|
-
|
|
478
|
+
if (Array.isArray(response.data)) {
|
|
479
|
+
return { data: response.data.map(transformCategoryTreeItem) };
|
|
480
|
+
}
|
|
481
|
+
else if (response.data?.categories !== undefined) {
|
|
482
|
+
return { data: response.data };
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
return { data: [] };
|
|
486
|
+
}
|
|
238
487
|
};
|
|
239
488
|
|
|
240
489
|
/**
|
|
@@ -289,96 +538,6 @@ const doLogin = async (context, params) => {
|
|
|
289
538
|
return { data: response.data };
|
|
290
539
|
};
|
|
291
540
|
|
|
292
|
-
function getMappedCartItems(basketItems) {
|
|
293
|
-
return basketItems.map((basketItem) => {
|
|
294
|
-
return {
|
|
295
|
-
...basketItem,
|
|
296
|
-
variation: basketItem.variation.data,
|
|
297
|
-
};
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
const convertToNumberOrNull = (value) => {
|
|
302
|
-
if (value === null || value === undefined || value === '')
|
|
303
|
-
return null;
|
|
304
|
-
const parsedNumber = Number(value);
|
|
305
|
-
return isNaN(parsedNumber) ? null : parsedNumber;
|
|
306
|
-
};
|
|
307
|
-
const mapAddressForServer = (address) => {
|
|
308
|
-
return {
|
|
309
|
-
...(address.id && { id: address.id }),
|
|
310
|
-
gender: '',
|
|
311
|
-
countryId: Number(address?.country ?? 0),
|
|
312
|
-
email: address.email,
|
|
313
|
-
name1: address.companyName,
|
|
314
|
-
name2: address.firstName,
|
|
315
|
-
name3: address.lastName,
|
|
316
|
-
vatNumber: address.vatNumber,
|
|
317
|
-
contactPerson: '',
|
|
318
|
-
address1: address.streetName,
|
|
319
|
-
address2: address.apartment,
|
|
320
|
-
address3: address.additionalAddressInformation,
|
|
321
|
-
postalCode: address.zipCode,
|
|
322
|
-
postNumber: address.postNumber?.trim() !== '' ? address.postNumber : null,
|
|
323
|
-
town: address.city,
|
|
324
|
-
telephone: address.phoneNumber,
|
|
325
|
-
stateId: convertToNumberOrNull(address.state),
|
|
326
|
-
birthday: address.birthday,
|
|
327
|
-
...(address.primary && { isPrimary: true }),
|
|
328
|
-
...(address.id && { pivot: { isPrimary: true } }),
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
const mapAddressForClient = (addressData) => {
|
|
332
|
-
const address = {
|
|
333
|
-
id: addressData.id,
|
|
334
|
-
firstName: addressData.name2,
|
|
335
|
-
lastName: addressData.name3,
|
|
336
|
-
streetName: addressData.address1,
|
|
337
|
-
apartment: addressData.address2,
|
|
338
|
-
additionalAddressInformation: addressData.address3,
|
|
339
|
-
city: addressData.town,
|
|
340
|
-
state: addressData.stateId?.toString(),
|
|
341
|
-
country: addressData.countryId?.toString(),
|
|
342
|
-
zipCode: addressData.postalCode,
|
|
343
|
-
postNumber: '',
|
|
344
|
-
phoneNumber: '',
|
|
345
|
-
email: '',
|
|
346
|
-
primary: Boolean(addressData?.pivot?.isPrimary || 0),
|
|
347
|
-
companyName: addressData.name1 ?? undefined,
|
|
348
|
-
vatNumber: addressData.taxIdNumber,
|
|
349
|
-
birthday: '',
|
|
350
|
-
typeId: addressData.pivot?.typeId ?? undefined,
|
|
351
|
-
};
|
|
352
|
-
addressData.options.forEach((option) => {
|
|
353
|
-
switch (option.typeId) {
|
|
354
|
-
case AddressOptionType.Telephone:
|
|
355
|
-
address.phoneNumber = option.value;
|
|
356
|
-
break;
|
|
357
|
-
case AddressOptionType.Email:
|
|
358
|
-
address.email = option.value;
|
|
359
|
-
break;
|
|
360
|
-
case AddressOptionType.PostNumber:
|
|
361
|
-
address.postNumber = option.value;
|
|
362
|
-
break;
|
|
363
|
-
case AddressOptionType.Birthday:
|
|
364
|
-
address.birthday = option.value;
|
|
365
|
-
break;
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
return address;
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
const logRequest = (request) => {
|
|
372
|
-
consola.consola.log('Request-url:', request.url);
|
|
373
|
-
consola.consola.log('Request-headers:', request.headers);
|
|
374
|
-
consola.consola.log('Request-data:', request.data);
|
|
375
|
-
};
|
|
376
|
-
const logResponse = (response) => {
|
|
377
|
-
consola.consola.log('Response-url:', response.config.url);
|
|
378
|
-
consola.consola.log('Response-headers:', response.headers);
|
|
379
|
-
consola.consola.log('Response-data:', response.data);
|
|
380
|
-
};
|
|
381
|
-
|
|
382
541
|
/**
|
|
383
542
|
* Method getSession - get client session based on cookie
|
|
384
543
|
*
|
|
@@ -599,7 +758,12 @@ const deleteAddress = async (context, params) => {
|
|
|
599
758
|
const getActiveShippingCountries = async (context) => {
|
|
600
759
|
const url = new URL('/rest/storefront/countries', context.config.api.url);
|
|
601
760
|
const { data: response } = await context.client.get(url.href);
|
|
602
|
-
|
|
761
|
+
const countries = Array.isArray(response.data)
|
|
762
|
+
? response.data
|
|
763
|
+
: Array.isArray(response)
|
|
764
|
+
? response
|
|
765
|
+
: [];
|
|
766
|
+
return { data: countries.map(transformShippingCountry) };
|
|
603
767
|
};
|
|
604
768
|
|
|
605
769
|
/**
|
|
@@ -666,7 +830,11 @@ const getReview = async (context, params) => {
|
|
|
666
830
|
const getCart = async (context) => {
|
|
667
831
|
const url = new URL('/rest/storefront/session/', context.config.api.url);
|
|
668
832
|
const { data } = await context.client.get(url.href);
|
|
669
|
-
const cart = {
|
|
833
|
+
const cart = {
|
|
834
|
+
...data.data.cart,
|
|
835
|
+
basketRebateType: toStringId(data.data.cart.basketRebateType),
|
|
836
|
+
items: getMappedCartItems(data.data.cartItems),
|
|
837
|
+
};
|
|
670
838
|
return { data: cart };
|
|
671
839
|
};
|
|
672
840
|
|
|
@@ -708,6 +876,7 @@ const doAddCartItem = async (context, params) => {
|
|
|
708
876
|
return {
|
|
709
877
|
data: {
|
|
710
878
|
...data.events.AfterBasketChanged.basket,
|
|
879
|
+
basketRebateType: toStringId(data.events.AfterBasketChanged.basket.basketRebateType),
|
|
711
880
|
items: data.events.AfterBasketChanged.basketItems,
|
|
712
881
|
},
|
|
713
882
|
};
|
|
@@ -735,6 +904,7 @@ const deleteCartItem = async (context, params) => {
|
|
|
735
904
|
return {
|
|
736
905
|
data: {
|
|
737
906
|
...data.events.AfterBasketChanged.basket,
|
|
907
|
+
basketRebateType: toStringId(data.events.AfterBasketChanged.basket.basketRebateType),
|
|
738
908
|
items: data.events.AfterBasketChanged.basketItems,
|
|
739
909
|
},
|
|
740
910
|
};
|
|
@@ -771,6 +941,7 @@ const setCartItemQuantity = async (context, params) => {
|
|
|
771
941
|
return {
|
|
772
942
|
data: {
|
|
773
943
|
...data.events.AfterBasketChanged.basket,
|
|
944
|
+
basketRebateType: toStringId(data.events.AfterBasketChanged.basket.basketRebateType),
|
|
774
945
|
items: data.events.AfterBasketChanged.basketItems,
|
|
775
946
|
},
|
|
776
947
|
};
|
|
@@ -939,10 +1110,10 @@ const getSearch = async (context, params) => {
|
|
|
939
1110
|
}
|
|
940
1111
|
const { data: response } = await context.client.get(url.href);
|
|
941
1112
|
const data = response.data;
|
|
942
|
-
const products = data.itemList.documents.map((document) => document.data);
|
|
1113
|
+
const products = data.itemList.documents.map((document) => transformProductItem(document.data));
|
|
943
1114
|
const itemSearchResult = {
|
|
944
1115
|
products: products,
|
|
945
|
-
facets: data.facets,
|
|
1116
|
+
facets: data.facets?.map(transformSearchFacet) || [],
|
|
946
1117
|
languageUrls: data.urls,
|
|
947
1118
|
pagination: {
|
|
948
1119
|
perPageOptions: [20, 40, 100],
|
|
@@ -1134,7 +1305,14 @@ const getReturns = async (context, params) => {
|
|
|
1134
1305
|
url.searchParams.set('page', params?.page?.toString() ?? '1');
|
|
1135
1306
|
url.searchParams.set('items', params?.items?.toString() ?? '5');
|
|
1136
1307
|
const { data: response } = await context.client.get(url.href);
|
|
1137
|
-
|
|
1308
|
+
const responseData = response.data || response;
|
|
1309
|
+
return {
|
|
1310
|
+
data: {
|
|
1311
|
+
...responseData,
|
|
1312
|
+
entries: responseData.entries?.map((entry) => transformOrder(entry)) ||
|
|
1313
|
+
[],
|
|
1314
|
+
},
|
|
1315
|
+
};
|
|
1138
1316
|
};
|
|
1139
1317
|
|
|
1140
1318
|
/**
|
|
@@ -1441,6 +1619,9 @@ const getCategoriesSearch = async (context, params) => {
|
|
|
1441
1619
|
if (params.name) {
|
|
1442
1620
|
url.searchParams.set('name', params.name);
|
|
1443
1621
|
}
|
|
1622
|
+
if (params.pinnedId) {
|
|
1623
|
+
url.searchParams.set('pinnedId', params.pinnedId);
|
|
1624
|
+
}
|
|
1444
1625
|
const { data: response } = await context.client.get(url.href);
|
|
1445
1626
|
return { data: response.data };
|
|
1446
1627
|
};
|
|
@@ -1701,7 +1882,7 @@ const getOrder = async (context, params) => {
|
|
|
1701
1882
|
if (data?.order?.orderItems) {
|
|
1702
1883
|
data.order.orderItems = data.order.orderItems.filter((item) => item.typeId !== shippingCostTypeId);
|
|
1703
1884
|
}
|
|
1704
|
-
return { data: data };
|
|
1885
|
+
return { data: data.order ? transformOrder(data) : data };
|
|
1705
1886
|
};
|
|
1706
1887
|
|
|
1707
1888
|
/**
|
|
@@ -1779,7 +1960,7 @@ const doPreparePayment = async (context) => {
|
|
|
1779
1960
|
const doPlaceOrder = async (context) => {
|
|
1780
1961
|
const url = new URL('/rest/storefront/orders', context.config.api.url);
|
|
1781
1962
|
const { data: response } = await context.client.post(url.href);
|
|
1782
|
-
return { data: response.data };
|
|
1963
|
+
return { data: transformOrder(response.data) };
|
|
1783
1964
|
};
|
|
1784
1965
|
|
|
1785
1966
|
/**
|
|
@@ -2093,12 +2274,10 @@ const getInit = async (context) => {
|
|
|
2093
2274
|
data: {
|
|
2094
2275
|
session: {
|
|
2095
2276
|
user: session.customer ||
|
|
2096
|
-
(session.guest
|
|
2097
|
-
? { guestMail: session.guest }
|
|
2098
|
-
: null),
|
|
2277
|
+
(session.guest ? { guestMail: session.guest } : null),
|
|
2099
2278
|
basket: cart,
|
|
2100
2279
|
},
|
|
2101
|
-
categories,
|
|
2280
|
+
categories: categories.map(transformCategoryTreeItem),
|
|
2102
2281
|
robots,
|
|
2103
2282
|
settings,
|
|
2104
2283
|
customAssets,
|
|
@@ -3960,7 +4139,7 @@ var api = /*#__PURE__*/Object.freeze({
|
|
|
3960
4139
|
|
|
3961
4140
|
const PlentyIdCookie = 'plentyID';
|
|
3962
4141
|
const PwaSessionIdCookie = 'pwa-session-id';
|
|
3963
|
-
const FORWARD_HEADERS_KEYS = ['x-csrf-token', 'set-cookie', 'cookie', 'x-config-id', 'x-pwa-edit-hash', 'locale', 'x-plenty-debug'];
|
|
4142
|
+
const FORWARD_HEADERS_KEYS = ['x-csrf-token', 'set-cookie', 'cookie', 'x-config-id', 'x-pwa-edit-hash', 'locale', 'x-plenty-debug', 'x-plenty-debug-mode'];
|
|
3964
4143
|
const getNumericSuffix = (cookieName, baseName) => {
|
|
3965
4144
|
if (cookieName === baseName)
|
|
3966
4145
|
return '';
|
|
@@ -4095,6 +4274,11 @@ const onRequestWrapper = (request, config) => {
|
|
|
4095
4274
|
}
|
|
4096
4275
|
}
|
|
4097
4276
|
});
|
|
4277
|
+
if (request.headers['x-plenty-debug']) {
|
|
4278
|
+
request.headers['x-plenty-debug-mode'] === 'profile'
|
|
4279
|
+
? url.searchParams.set('XDEBUG_PROFILE', '1')
|
|
4280
|
+
: url.searchParams.set('XDEBUG_SESSION', '1');
|
|
4281
|
+
}
|
|
4098
4282
|
request.url = url.toString();
|
|
4099
4283
|
}
|
|
4100
4284
|
if (config.api?.debug)
|
package/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categoriesSearch.d.ts","sourceRoot":"","sources":["../../../src/types/api/categoriesSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAChE,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"categoriesSearch.d.ts","sourceRoot":"","sources":["../../../src/types/api/categoriesS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Ac,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,EAAE,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;CACpB"}
|
|
@@ -31,14 +31,11 @@ export type User = {
|
|
|
31
31
|
fullName?: string;
|
|
32
32
|
gender?: string | null;
|
|
33
33
|
id?: number;
|
|
34
|
-
inLeadStatusSince?: number;
|
|
35
|
-
isLead?: boolean;
|
|
36
34
|
klarnaPersonalId?: string;
|
|
37
35
|
lang?: string;
|
|
38
36
|
lastLoginAt?: string;
|
|
39
37
|
lastName?: string;
|
|
40
38
|
lastOrderAt?: string | null;
|
|
41
|
-
leadStatusKey?: string;
|
|
42
39
|
marketplacePartner?: string;
|
|
43
40
|
newsletterAllowanceAt?: number | null;
|
|
44
41
|
number?: number | string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/api/user.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,8BAA8B,EAC/B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,IAAI,GAAG;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC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