Skip to content

Commit

Permalink
Merge pull request #70 from mirumee/drop-deprecated-quantity-fields
Browse files Browse the repository at this point in the history
Drop deprecated quantity fields
  • Loading branch information
maarcingebala authored Dec 15, 2020
2 parents 1a65520 + 888fe78 commit 1f6b2e6
Show file tree
Hide file tree
Showing 32 changed files with 49 additions and 149 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/api/products/__snapshots__/products.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ Object {
"url": "http://localhost:8000/media/products/saleordemoproduct_beer-01_1_v0HTi2S.png",
},
],
"isAvailable": true,
"name": "",
"pricing": Object {
"__typename": "VariantPricingInfo",
Expand Down Expand Up @@ -913,7 +912,6 @@ Object {
"url": "http://localhost:8000/media/products/saleordemoproduct_beer-01_1_v0HTi2S.png",
},
],
"isAvailable": true,
"name": "",
"pricing": Object {
"__typename": "VariantPricingInfo",
Expand Down
2 changes: 0 additions & 2 deletions src/data/ApolloClientManager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ export class ApolloClientManager {
variant: {
attributes: edge.node.attributes,
id: edge.node.id,
isAvailable: edge.node.isAvailable,
name: edge.node.name,
pricing: edge.node.pricing,
product: edge.node.product,
Expand Down Expand Up @@ -1029,7 +1028,6 @@ export class ApolloClientManager {
variant: {
attributes: itemVariant?.attributes,
id: itemVariant!.id,
isAvailable: itemVariant?.isAvailable,
name: itemVariant?.name,
pricing: itemVariant?.pricing,
product: itemVariant?.product,
Expand Down
1 change: 0 additions & 1 deletion src/fragments/checkout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const checkoutProductVariantFragment = gql`
name
sku
quantityAvailable
isAvailable
pricing {
onSale
priceUndiscounted {
Expand Down
4 changes: 0 additions & 4 deletions src/fragments/gqlTypes/Checkout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,6 @@ export interface Checkout_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/fragments/gqlTypes/CheckoutLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,6 @@ export interface CheckoutLine_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/fragments/gqlTypes/OrderDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ export interface OrderDetail_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/fragments/gqlTypes/ProductDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,6 @@ export interface ProductDetails_variants {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* List of images for the product variant.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/fragments/gqlTypes/ProductVariant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ export interface ProductVariant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/fragments/gqlTypes/ProductVariantFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ export interface ProductVariantFields {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* List of images for the product variant.
*/
Expand Down
1 change: 0 additions & 1 deletion src/fragments/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const productVariantFragment = gql`
sku
name
quantityAvailable(countryCode: $countryCode)
isAvailable
images {
id
url
Expand Down
1 change: 1 addition & 0 deletions src/gqlTypes/globalTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export enum AccountErrorCode {
DELETE_SUPERUSER_ACCOUNT = "DELETE_SUPERUSER_ACCOUNT",
DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM",
GRAPHQL_ERROR = "GRAPHQL_ERROR",
INACTIVE = "INACTIVE",
INVALID = "INVALID",
INVALID_CREDENTIALS = "INVALID_CREDENTIALS",
INVALID_PASSWORD = "INVALID_PASSWORD",
Expand Down
1 change: 0 additions & 1 deletion src/helpers/LocalStorageHandler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export interface ICheckoutModelLineVariant {
sku?: string;
pricing?: Checkout_lines_variant_pricing | null;
product?: Checkout_lines_variant_product;
isAvailable?: boolean | null;
attributes?: Checkout_lines_variant_attributes[];
}

Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/AddCheckoutPromoCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ export interface AddCheckoutPromoCode_checkoutAddPromoCode_checkout_lines_varian
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/CompleteCheckout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ export interface CompleteCheckout_checkoutComplete_order_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/CreateCheckout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,6 @@ export interface CreateCheckout_checkoutCreate_checkout_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/CreateCheckoutPayment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ export interface CreateCheckoutPayment_checkoutPaymentCreate_checkout_lines_vari
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/RemoveCheckoutPromoCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ export interface RemoveCheckoutPromoCode_checkoutRemovePromoCode_checkout_lines_
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/UpdateCheckoutBillingAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,6 @@ export interface UpdateCheckoutBillingAddress_checkoutBillingAddressUpdate_check
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,6 @@ export interface UpdateCheckoutBillingAddressWithEmail_checkoutBillingAddressUpd
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down Expand Up @@ -1088,10 +1084,6 @@ export interface UpdateCheckoutBillingAddressWithEmail_checkoutEmailUpdate_check
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/UpdateCheckoutLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ export interface UpdateCheckoutLine_checkoutLinesUpdate_checkout_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
8 changes: 0 additions & 8 deletions src/mutations/gqlTypes/UpdateCheckoutShippingAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,6 @@ export interface UpdateCheckoutShippingAddress_checkoutShippingAddressUpdate_che
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down Expand Up @@ -1088,10 +1084,6 @@ export interface UpdateCheckoutShippingAddress_checkoutEmailUpdate_checkout_line
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/mutations/gqlTypes/UpdateCheckoutShippingMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ export interface UpdateCheckoutShippingMethod_checkoutShippingMethodUpdate_check
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/queries/gqlTypes/CheckoutDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,6 @@ export interface CheckoutDetails_checkout_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/queries/gqlTypes/CheckoutProductVariants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ export interface CheckoutProductVariants_productVariants_edges_node {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/queries/gqlTypes/OrderByToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ export interface OrderByToken_orderByToken_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/queries/gqlTypes/ProductDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,10 +686,6 @@ export interface ProductDetails_product_variants {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* List of images for the product variant.
*/
Expand Down
4 changes: 0 additions & 4 deletions src/queries/gqlTypes/UserOrderByToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ export interface UserOrderByToken_orderByToken_lines_variant {
* Quantity of a product available for sale in one checkout.
*/
quantityAvailable: number;
/**
* Whether the variant is in stock and visible or not.
*/
isAvailable: boolean | null;
/**
* Lists the storefront variant's pricing, the current price and discounts, only meant for displaying.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/react/hooks/__snapshots__/products.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ Object {
"url": "http://localhost:8000/media/products/saleordemoproduct_beer-01_1_v0HTi2S.png",
},
],
"isAvailable": true,
"name": "",
"pricing": Object {
"__typename": "VariantPricingInfo",
Expand Down Expand Up @@ -1076,7 +1075,6 @@ Object {
"url": "http://localhost:8000/media/products/saleordemoproduct_beer-01_1_v0HTi2S.png",
},
],
"isAvailable": true,
"name": "",
"pricing": Object {
"__typename": "VariantPricingInfo",
Expand Down

0 comments on commit 1f6b2e6

Please sign in to comment.