Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECWID-146242 - add image external id #429

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ data class FetchedCategory(
val seoTitleTranslated: LocalizedValueMap? = null,
val seoDescription: String? = null,
val seoDescriptionTranslated: LocalizedValueMap? = null,
val alt: FetchedAlt? = null
val alt: FetchedAlt? = null,
val imageExternalId: String? = null,
) : ApiFetchedDTO, ApiResultDTO {

override fun getModifyKind() = ModifyKind.ReadWrite(UpdatedCategory::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ data class AsyncPictureData(
val url: String = "",
val width: Int = 0,
val height: Int = 0,
val alt: PictureAlt? = null
val alt: PictureAlt? = null,
val externalId: String? = null,
)

data class PictureAlt(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ data class FetchedProduct(
val image800pxUrl: String? = null,
val image1500pxUrl: String? = null,
val imageOriginalUrl: String? = null,
val alt: FetchedAlt? = null
val alt: FetchedAlt? = null,
val externalId: String? = null,
)

data class ProductVideo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ data class FetchedVariation(
val customsHsTariffCode: String? = null,
val subscriptionSettings: SubscriptionSettings? = null,
val alt: FetchedAlt? = null,
val imageExternalId: String? = null,
) : ApiFetchedDTO, ApiResultDTO {

data class AttributeValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
Ignored(FetchedProduct.ProductImage::image800pxUrl),
Ignored(FetchedProduct.ProductImage::image1500pxUrl),
Ignored(FetchedProduct.ProductImage::imageOriginalUrl),
ReadOnly(FetchedProduct.ProductImage::externalId),
ReadOnly(FetchedProduct.ProductMedia::videos),
ReadOnly(FetchedProduct.GalleryImage::borderInfo),
Ignored(FetchedProduct::files),
Expand Down Expand Up @@ -140,6 +141,7 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
Ignored(FetchedCategory::productCount),
ReadOnly(FetchedCategory::productCountWithoutSubcategories),
Ignored(FetchedCategory::enabledProductCount),
ReadOnly(FetchedCategory::imageExternalId),

ReadOnly(FetchedCoupon::id),
Ignored(FetchedCoupon::creationDate),
Expand Down Expand Up @@ -305,6 +307,7 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
ReadOnly(FetchedVariation.SubscriptionSettings::oneTimePurchaseMarkupPercentFormatted),
ReadOnly(FetchedVariation.SubscriptionSettings::displayedOneTimePurchaseMarkupPercent),
ReadOnly(FetchedVariation.SubscriptionSettings::displayedOneTimePurchaseMarkupPercentFormatted),
ReadOnly(FetchedVariation::imageExternalId),

ReadOnly(FetchedProduct.RecurringChargeSettings::subscriptionPriceWithSignUpFeeFormatted),
ReadOnly(FetchedProduct.RecurringChargeSettings::signUpFee),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ val fetchedCategoryNullablePropertyRules: List<NullablePropertyRule<*, *>> = lis
AllowNullable(FetchedCategory::alt),
AllowNullable(FetchedAlt::main),
AllowNullable(FetchedAlt::translated),
AllowNullable(FetchedCategory::imageExternalId),
)
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ val fetchedProductNullablePropertyRules: List<NullablePropertyRule<*, *>> = list
IgnoreNullable(FetchedProduct.ProductImage::image800pxUrl),
IgnoreNullable(FetchedProduct.ProductImage::imageOriginalUrl),
AllowNullable(FetchedProduct.ProductImage::alt),
AllowNullable(FetchedProduct.ProductImage::externalId),
AllowNullable(FetchedAlt::main),
AllowNullable(FetchedAlt::translated),
AllowNullable(FetchedProduct.ProductVideo::videoCoverId),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ val fetchedVariationTypeNullablePropertyRules: List<NullablePropertyRule<*, *>>
AllowNullable(FetchedVariation::alt),
AllowNullable(FetchedAlt::main),
AllowNullable(FetchedAlt::translated),
AllowNullable(FetchedVariation::imageExternalId),
)
Loading