mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 15:36:58 +00:00
feat: add supplier return to productVariant
Signed-off-by: jrphilo <james.philo@me.com>
This commit is contained in:
parent
d2dda09a13
commit
20b79bd751
@ -62,6 +62,9 @@ const productFragment = /* GraphQL */ `
|
|||||||
mileage: metafield(namespace: "custom", key: "mileage") {
|
mileage: metafield(namespace: "custom", key: "mileage") {
|
||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
supplier: metafield(namespace: "custom", key: "supplier") {
|
||||||
|
value
|
||||||
|
}
|
||||||
condition: metafield(namespace: "custom", key: "condition") {
|
condition: metafield(namespace: "custom", key: "condition") {
|
||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,7 @@ const reshapeVariants = (variants: ShopifyProductVariant[]): ProductVariant[] =>
|
|||||||
coreVariantId: variant.coreVariantId?.value || null,
|
coreVariantId: variant.coreVariantId?.value || null,
|
||||||
coreCharge: parseMetaFieldValue<Money>(variant.coreCharge),
|
coreCharge: parseMetaFieldValue<Money>(variant.coreCharge),
|
||||||
mileage: variant.mileage?.value ?? null,
|
mileage: variant.mileage?.value ?? null,
|
||||||
|
supplier: variant.supplier?.value || null,
|
||||||
estimatedDelivery: variant.estimatedDelivery?.value || null,
|
estimatedDelivery: variant.estimatedDelivery?.value || null,
|
||||||
condition: variant.condition?.value || null,
|
condition: variant.condition?.value || null,
|
||||||
...(addOnProductId
|
...(addOnProductId
|
||||||
|
@ -459,6 +459,7 @@ export type ProductVariant = {
|
|||||||
coreVariantId: string | null;
|
coreVariantId: string | null;
|
||||||
mileage: number | null;
|
mileage: number | null;
|
||||||
estimatedDelivery: string | null;
|
estimatedDelivery: string | null;
|
||||||
|
supplier: string | null;
|
||||||
condition: string | null;
|
condition: string | null;
|
||||||
engineCylinders: string | null;
|
engineCylinders: string | null;
|
||||||
fuelType: string | null;
|
fuelType: string | null;
|
||||||
@ -489,6 +490,7 @@ export type ShopifyProductVariant = Omit<
|
|||||||
| 'coreVariantId'
|
| 'coreVariantId'
|
||||||
| 'mileage'
|
| 'mileage'
|
||||||
| 'estimatedDelivery'
|
| 'estimatedDelivery'
|
||||||
|
| 'supplier'
|
||||||
| 'condition'
|
| 'condition'
|
||||||
| 'addOnProduct'
|
| 'addOnProduct'
|
||||||
> & {
|
> & {
|
||||||
@ -497,6 +499,7 @@ export type ShopifyProductVariant = Omit<
|
|||||||
coreCharge: { value: string } | null;
|
coreCharge: { value: string } | null;
|
||||||
mileage: { value: number } | null;
|
mileage: { value: number } | null;
|
||||||
estimatedDelivery: { value: string } | null;
|
estimatedDelivery: { value: string } | null;
|
||||||
|
supplier: { value: string } | null;
|
||||||
condition: { value: string } | null;
|
condition: { value: string } | null;
|
||||||
addOnProductId: { value: string } | null;
|
addOnProductId: { value: string } | null;
|
||||||
addOnQuantity: { value: string } | null;
|
addOnQuantity: { value: string } | null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user