@bytebrand/export-cars 1.26.11 → 1.26.12
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/package.json
CHANGED
|
@@ -61,9 +61,8 @@ export class FacebookShopTransformer {
|
|
|
61
61
|
car: DataSchemes.Car;
|
|
62
62
|
images: ImboImageResponseInterface[];
|
|
63
63
|
}): Promise<FacebookShopItem[]> {
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
// car rather than fall back to a placeholder.
|
|
64
|
+
// Only the Meta AIA financing image exists so far (per ticket) — no eligible image => exclude
|
|
65
|
+
// the car rather than fall back to a placeholder.
|
|
67
66
|
const metaAiaImage = await this.imageService.getMetaAiaImage(car._id, images, META_AIA_MODE_FINANCING);
|
|
68
67
|
if (!metaAiaImage) {
|
|
69
68
|
return [];
|
|
@@ -76,7 +75,10 @@ export class FacebookShopTransformer {
|
|
|
76
75
|
const ownerId = get(car, 'metaData.ownerId', null);
|
|
77
76
|
const customLabel4 = await this.getMetaPushPriority(ownerId);
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
// Only export the financing offer for now — lease/cash items would show the SAME financing
|
|
79
|
+
// image (mismatched/misleading) since leasing/cash Meta AIA variants don't exist yet. Re-add
|
|
80
|
+
// once image-generator renders those modes too (see getMetaAiaImage's mode param).
|
|
81
|
+
const offers = this.buildOffers(car, { make, model, price }).filter(offer => offer.offerType === OfferType.financing);
|
|
80
82
|
if (!offers.length) {
|
|
81
83
|
return [];
|
|
82
84
|
}
|