diff --git a/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx b/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx index 1c948a2be..717617d08 100644 --- a/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx +++ b/src/apps/components/CustomAppCreatePage/CustomAppCreatePage.tsx @@ -1,4 +1,3 @@ -import { AppErrorFragment } from "@saleor/apps/types/AppErrorFragment"; import AccountPermissions from "@saleor/components/AccountPermissions"; import AppHeader from "@saleor/components/AppHeader"; import AppStatus from "@saleor/components/AppStatus"; @@ -10,6 +9,7 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; +import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; import { sectionNames } from "@saleor/intl"; import { PermissionEnum } from "@saleor/types/globalTypes"; import { getFormErrors } from "@saleor/utils/errors"; diff --git a/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx b/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx index 75bdef75d..2836436b7 100644 --- a/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx +++ b/src/apps/components/CustomAppDetailsPage/CustomAppDetailsPage.tsx @@ -1,4 +1,3 @@ -import { AppErrorFragment } from "@saleor/apps/types/AppErrorFragment"; import AccountPermissions from "@saleor/components/AccountPermissions"; import AppHeader from "@saleor/components/AppHeader"; import AppStatus from "@saleor/components/AppStatus"; @@ -10,6 +9,7 @@ import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import { ShopInfo_shop_permissions } from "@saleor/components/Shop/types/ShopInfo"; +import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { sectionNames } from "@saleor/intl"; import { PermissionEnum } from "@saleor/types/globalTypes"; diff --git a/src/apps/components/CustomAppInformation/CustomAppInformation.tsx b/src/apps/components/CustomAppInformation/CustomAppInformation.tsx index 207a0d3c4..dc4e84603 100644 --- a/src/apps/components/CustomAppInformation/CustomAppInformation.tsx +++ b/src/apps/components/CustomAppInformation/CustomAppInformation.tsx @@ -1,8 +1,8 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; -import { AppErrorFragment } from "@saleor/apps/types/AppErrorFragment"; import CardTitle from "@saleor/components/CardTitle"; +import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; import { FormChange } from "@saleor/hooks/useForm"; import { getFormErrors } from "@saleor/utils/errors"; import getAppErrorMessage from "@saleor/utils/errors/app"; diff --git a/src/apps/types/AppErrorFragment.ts b/src/apps/types/AppErrorFragment.ts deleted file mode 100644 index 2dca654b1..000000000 --- a/src/apps/types/AppErrorFragment.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AppErrorFragment -// ==================================================== - -export interface AppErrorFragment { - __typename: "AppError"; - field: string | null; - message: string | null; - code: AppErrorCode; - permissions: PermissionEnum[] | null; -} diff --git a/src/apps/types/AppFragment.ts b/src/apps/types/AppFragment.ts deleted file mode 100644 index ef2f53128..000000000 --- a/src/apps/types/AppFragment.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { AppTypeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: AppFragment -// ==================================================== - -export interface AppFragment_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppFragment_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface AppFragment_tokens { - __typename: "AppToken"; - authToken: string | null; - id: string; - name: string | null; -} - -export interface AppFragment_webhooks_app { - __typename: "App"; - id: string; - name: string | null; -} - -export interface AppFragment_webhooks { - __typename: "Webhook"; - id: string; - name: string; - isActive: boolean; - app: AppFragment_webhooks_app; -} - -export interface AppFragment { - __typename: "App"; - id: string; - name: string | null; - created: any | null; - isActive: boolean | null; - type: AppTypeEnum | null; - homepageUrl: string | null; - appUrl: string | null; - configurationUrl: string | null; - supportUrl: string | null; - version: string | null; - accessToken: string | null; - privateMetadata: (AppFragment_privateMetadata | null)[]; - metadata: (AppFragment_metadata | null)[]; - tokens: (AppFragment_tokens | null)[] | null; - webhooks: (AppFragment_webhooks | null)[] | null; -} diff --git a/src/categories/components/CategoryProductList/CategoryProductList.tsx b/src/categories/components/CategoryProductList/CategoryProductList.tsx index b6ffd2ae3..7fdcd6313 100644 --- a/src/categories/components/CategoryProductList/CategoryProductList.tsx +++ b/src/categories/components/CategoryProductList/CategoryProductList.tsx @@ -5,7 +5,7 @@ import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import { ChannelsAvailabilityDropdown } from "@saleor/components/ChannelsAvailabilityDropdown"; import Checkbox from "@saleor/components/Checkbox"; -import Money from "@saleor/components/Money"; +import MoneyRange from "@saleor/components/MoneyRange"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar, { @@ -207,7 +207,10 @@ export const CategoryProductList: React.FC = props => {product?.channelListings ? ( - + ) : ( )} diff --git a/src/categories/fixtures.ts b/src/categories/fixtures.ts index d59c8663f..f1464237a 100644 --- a/src/categories/fixtures.ts +++ b/src/categories/fixtures.ts @@ -139,13 +139,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false }, @@ -159,13 +176,30 @@ export const category: ( name: "Channel2" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -196,13 +230,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -233,13 +284,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -270,13 +338,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -307,13 +392,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -344,13 +446,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -381,13 +500,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -418,13 +554,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -455,13 +608,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } @@ -492,13 +662,30 @@ export const category: ( name: "Channel1" }, currency: "USD", - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: false } diff --git a/src/categories/types/CategoryDetails.ts b/src/categories/types/CategoryDetails.ts index c7b149d4b..94e345be9 100644 --- a/src/categories/types/CategoryDetails.ts +++ b/src/categories/types/CategoryDetails.ts @@ -85,12 +85,6 @@ export interface CategoryDetails_category_products_edges_node_productType { name: string; } -export interface CategoryDetails_category_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface CategoryDetails_category_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -98,15 +92,48 @@ export interface CategoryDetails_category_products_edges_node_channelListings_ch currencyCode: string; } +export interface CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_start_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_start_net; +} + +export interface CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_stop_net; +} + +export interface CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_start | null; + stop: CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange_stop | null; +} + +export interface CategoryDetails_category_products_edges_node_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: CategoryDetails_category_products_edges_node_channelListings_pricing_priceRange | null; +} + export interface CategoryDetails_category_products_edges_node_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: CategoryDetails_category_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; channel: CategoryDetails_category_products_edges_node_channelListings_channel; + pricing: CategoryDetails_category_products_edges_node_channelListings_pricing | null; } export interface CategoryDetails_category_products_edges_node { diff --git a/src/channels/fixtures.ts b/src/channels/fixtures.ts index b37ce6b86..a471fc1eb 100644 --- a/src/channels/fixtures.ts +++ b/src/channels/fixtures.ts @@ -92,13 +92,30 @@ export const productChannels: ProductDetails_product_channelListings[] = [ id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 5, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -111,13 +128,30 @@ export const productChannels: ProductDetails_product_channelListings[] = [ id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 0, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 2.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 7.1, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true }, @@ -130,13 +164,30 @@ export const productChannels: ProductDetails_product_channelListings[] = [ id: "125", name: "Channel3" }, - discountedPrice: { - __typename: "Money", - amount: 8, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 30.1, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 44.9, + currency: "USD" + } + } + } + }, publicationDate: null, visibleInListings: true } diff --git a/src/channels/types/ChannelDetailsFragment.ts b/src/channels/types/ChannelDetailsFragment.ts deleted file mode 100644 index 930833427..000000000 --- a/src/channels/types/ChannelDetailsFragment.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ChannelDetailsFragment -// ==================================================== - -export interface ChannelDetailsFragment { - __typename: "Channel"; - id: string; - name: string; - slug: string; - currencyCode: string; -} diff --git a/src/channels/types/ChannelErrorFragment.ts b/src/channels/types/ChannelErrorFragment.ts deleted file mode 100644 index 5e647c72c..000000000 --- a/src/channels/types/ChannelErrorFragment.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { ChannelErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ChannelErrorFragment -// ==================================================== - -export interface ChannelErrorFragment { - __typename: "ChannelError"; - code: ChannelErrorCode; - field: string | null; - message: string | null; -} diff --git a/src/collections/fixtures.ts b/src/collections/fixtures.ts index 6a6b8436e..8ef6784c9 100644 --- a/src/collections/fixtures.ts +++ b/src/collections/fixtures.ts @@ -185,11 +185,6 @@ export const collection: ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", @@ -204,11 +199,6 @@ export const collection: ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, publicationDate: "2020-07-30", @@ -239,11 +229,6 @@ export const collection: ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", @@ -258,11 +243,6 @@ export const collection: ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, publicationDate: "2020-07-30", @@ -293,11 +273,6 @@ export const collection: ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", @@ -312,11 +287,6 @@ export const collection: ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, publicationDate: "2020-07-30", @@ -347,11 +317,6 @@ export const collection: ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", @@ -366,11 +331,6 @@ export const collection: ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, publicationDate: "2020-07-30", diff --git a/src/collections/types/CollectionAssignProduct.ts b/src/collections/types/CollectionAssignProduct.ts index 37ba02405..9215a4d02 100644 --- a/src/collections/types/CollectionAssignProduct.ts +++ b/src/collections/types/CollectionAssignProduct.ts @@ -19,12 +19,6 @@ export interface CollectionAssignProduct_collectionAddProducts_collection_produc url: string; } -export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -36,7 +30,6 @@ export interface CollectionAssignProduct_collectionAddProducts_collection_produc __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: CollectionAssignProduct_collectionAddProducts_collection_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/collections/types/CollectionBulkPublish.ts b/src/collections/types/CollectionBulkPublish.ts deleted file mode 100644 index 542a2eaa5..000000000 --- a/src/collections/types/CollectionBulkPublish.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CollectionBulkPublish -// ==================================================== - -export interface CollectionBulkPublish_collectionBulkPublish_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; -} - -export interface CollectionBulkPublish_collectionBulkPublish { - __typename: "CollectionBulkPublish"; - errors: CollectionBulkPublish_collectionBulkPublish_errors[]; -} - -export interface CollectionBulkPublish { - collectionBulkPublish: CollectionBulkPublish_collectionBulkPublish | null; -} - -export interface CollectionBulkPublishVariables { - ids: (string | null)[]; - isPublished: boolean; -} diff --git a/src/collections/types/CollectionDetails.ts b/src/collections/types/CollectionDetails.ts index 8185f7624..2886931c0 100644 --- a/src/collections/types/CollectionDetails.ts +++ b/src/collections/types/CollectionDetails.ts @@ -48,12 +48,6 @@ export interface CollectionDetails_collection_products_edges_node_thumbnail { url: string; } -export interface CollectionDetails_collection_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface CollectionDetails_collection_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -65,7 +59,6 @@ export interface CollectionDetails_collection_products_edges_node_channelListing __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: CollectionDetails_collection_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/collections/types/CollectionUpdateWithHomepage.ts b/src/collections/types/CollectionUpdateWithHomepage.ts deleted file mode 100644 index 949518ad5..000000000 --- a/src/collections/types/CollectionUpdateWithHomepage.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { CollectionInput, CollectionErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: CollectionUpdateWithHomepage -// ==================================================== - -export interface CollectionUpdateWithHomepage_collectionUpdate_collection_channelListing_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface CollectionUpdateWithHomepage_collectionUpdate_collection_channelListing { - __typename: "CollectionChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: CollectionUpdateWithHomepage_collectionUpdate_collection_channelListing_channel; -} - -export interface CollectionUpdateWithHomepage_collectionUpdate_collection_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionUpdateWithHomepage_collectionUpdate_collection_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface CollectionUpdateWithHomepage_collectionUpdate_collection_backgroundImage { - __typename: "Image"; - alt: string | null; - url: string; -} - -export interface CollectionUpdateWithHomepage_collectionUpdate_collection { - __typename: "Collection"; - id: string; - name: string; - channelListings: CollectionUpdateWithHomepage_collectionUpdate_collection_channelListing[] | null; - metadata: (CollectionUpdateWithHomepage_collectionUpdate_collection_metadata | null)[]; - privateMetadata: (CollectionUpdateWithHomepage_collectionUpdate_collection_privateMetadata | null)[]; - backgroundImage: CollectionUpdateWithHomepage_collectionUpdate_collection_backgroundImage | null; - slug: string; - descriptionJson: any; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionUpdateWithHomepage_collectionUpdate_errors { - __typename: "CollectionError"; - code: CollectionErrorCode; - field: string | null; -} - -export interface CollectionUpdateWithHomepage_collectionUpdate { - __typename: "CollectionUpdate"; - collection: CollectionUpdateWithHomepage_collectionUpdate_collection | null; - errors: CollectionUpdateWithHomepage_collectionUpdate_errors[]; -} - -export interface CollectionUpdateWithHomepage { - collectionUpdate: CollectionUpdateWithHomepage_collectionUpdate | null; -} - -export interface CollectionUpdateWithHomepageVariables { - id: string; - input: CollectionInput; -} diff --git a/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx b/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx index e528ec194..2f47908bb 100644 --- a/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx +++ b/src/components/ChannelsAvailabilityDropdown/ChannelsAvailabilityDropdown.tsx @@ -5,15 +5,15 @@ import { CollectionList_collections_edges_node_channelListings } from "@saleor/c import Hr from "@saleor/components/Hr"; import StatusLabel from "@saleor/components/StatusLabel"; import useDateLocalize from "@saleor/hooks/useDateLocalize"; -import { ProductList_products_edges_node_channelListings } from "@saleor/products/types/ProductList"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { useStyles } from "./styles"; -type Channels = - | ProductList_products_edges_node_channelListings - | CollectionList_collections_edges_node_channelListings; +type Channels = Pick< + CollectionList_collections_edges_node_channelListings, + "isPublished" | "publicationDate" | "channel" +>; export interface ChannelsAvailabilityDropdownProps { allChannelsCount: number; diff --git a/src/discounts/fixtures.ts b/src/discounts/fixtures.ts index 03fd84658..db6b8e164 100644 --- a/src/discounts/fixtures.ts +++ b/src/discounts/fixtures.ts @@ -278,11 +278,6 @@ export const sale: SaleDetails_sale = { id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", @@ -316,11 +311,6 @@ export const sale: SaleDetails_sale = { id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", @@ -354,11 +344,6 @@ export const sale: SaleDetails_sale = { id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", @@ -392,11 +377,6 @@ export const sale: SaleDetails_sale = { id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, publicationDate: "2020-07-14", diff --git a/src/discounts/types/SaleCataloguesAdd.ts b/src/discounts/types/SaleCataloguesAdd.ts index 5c1c8b3f0..76737781d 100644 --- a/src/discounts/types/SaleCataloguesAdd.ts +++ b/src/discounts/types/SaleCataloguesAdd.ts @@ -41,12 +41,6 @@ export interface SaleCataloguesAdd_saleCataloguesAdd_sale_products_edges_node_th url: string; } -export interface SaleCataloguesAdd_saleCataloguesAdd_sale_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface SaleCataloguesAdd_saleCataloguesAdd_sale_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -58,7 +52,6 @@ export interface SaleCataloguesAdd_saleCataloguesAdd_sale_products_edges_node_ch __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: SaleCataloguesAdd_saleCataloguesAdd_sale_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/discounts/types/SaleCataloguesRemove.ts b/src/discounts/types/SaleCataloguesRemove.ts index e99f6630c..ebeb94f63 100644 --- a/src/discounts/types/SaleCataloguesRemove.ts +++ b/src/discounts/types/SaleCataloguesRemove.ts @@ -41,12 +41,6 @@ export interface SaleCataloguesRemove_saleCataloguesRemove_sale_products_edges_n url: string; } -export interface SaleCataloguesRemove_saleCataloguesRemove_sale_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface SaleCataloguesRemove_saleCataloguesRemove_sale_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -58,7 +52,6 @@ export interface SaleCataloguesRemove_saleCataloguesRemove_sale_products_edges_n __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: SaleCataloguesRemove_saleCataloguesRemove_sale_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/discounts/types/SaleDetails.ts b/src/discounts/types/SaleDetails.ts index a5ee9e0db..66ffb4284 100644 --- a/src/discounts/types/SaleDetails.ts +++ b/src/discounts/types/SaleDetails.ts @@ -34,12 +34,6 @@ export interface SaleDetails_sale_products_edges_node_thumbnail { url: string; } -export interface SaleDetails_sale_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface SaleDetails_sale_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -51,7 +45,6 @@ export interface SaleDetails_sale_products_edges_node_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: SaleDetails_sale_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/discounts/types/VoucherCataloguesAdd.ts b/src/discounts/types/VoucherCataloguesAdd.ts index 6bb626ad1..794b51d8e 100644 --- a/src/discounts/types/VoucherCataloguesAdd.ts +++ b/src/discounts/types/VoucherCataloguesAdd.ts @@ -54,12 +54,6 @@ export interface VoucherCataloguesAdd_voucherCataloguesAdd_voucher_products_edge url: string; } -export interface VoucherCataloguesAdd_voucherCataloguesAdd_voucher_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface VoucherCataloguesAdd_voucherCataloguesAdd_voucher_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -71,7 +65,6 @@ export interface VoucherCataloguesAdd_voucherCataloguesAdd_voucher_products_edge __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: VoucherCataloguesAdd_voucherCataloguesAdd_voucher_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/discounts/types/VoucherCataloguesRemove.ts b/src/discounts/types/VoucherCataloguesRemove.ts index ea7e76066..50f029ea7 100644 --- a/src/discounts/types/VoucherCataloguesRemove.ts +++ b/src/discounts/types/VoucherCataloguesRemove.ts @@ -54,12 +54,6 @@ export interface VoucherCataloguesRemove_voucherCataloguesRemove_voucher_product url: string; } -export interface VoucherCataloguesRemove_voucherCataloguesRemove_voucher_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface VoucherCataloguesRemove_voucherCataloguesRemove_voucher_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -71,7 +65,6 @@ export interface VoucherCataloguesRemove_voucherCataloguesRemove_voucher_product __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: VoucherCataloguesRemove_voucherCataloguesRemove_voucher_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/discounts/types/VoucherDetails.ts b/src/discounts/types/VoucherDetails.ts index b18d82d69..3b46e3dd0 100644 --- a/src/discounts/types/VoucherDetails.ts +++ b/src/discounts/types/VoucherDetails.ts @@ -47,12 +47,6 @@ export interface VoucherDetails_voucher_products_edges_node_thumbnail { url: string; } -export interface VoucherDetails_voucher_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface VoucherDetails_voucher_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -64,7 +58,6 @@ export interface VoucherDetails_voucher_products_edges_node_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: VoucherDetails_voucher_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/fragments/collections.ts b/src/fragments/collections.ts index cbc553ef7..72b65b6f2 100644 --- a/src/fragments/collections.ts +++ b/src/fragments/collections.ts @@ -1,4 +1,4 @@ -import { channelListingProductFragment } from "@saleor/fragments/products"; +import { channelListingProductWithoutPricingFragment } from "@saleor/fragments/products"; import gql from "graphql-tag"; import { metadataFragment } from "./metadata"; @@ -40,7 +40,7 @@ export const collectionDetailsFragment = gql` // https://github.com/apollographql/apollo-client/issues/2496 // https://github.com/apollographql/apollo-client/issues/3468 export const collectionProductFragment = gql` - ${channelListingProductFragment} + ${channelListingProductWithoutPricingFragment} fragment CollectionProductFragment on Product { id name @@ -52,7 +52,7 @@ export const collectionProductFragment = gql` url } channelListings { - ...ChannelListingProductFragment + ...ChannelListingProductWithoutPricingFragment } } `; diff --git a/src/fragments/discounts.ts b/src/fragments/discounts.ts index 579bc93be..dc613a35c 100644 --- a/src/fragments/discounts.ts +++ b/src/fragments/discounts.ts @@ -1,4 +1,4 @@ -import { channelListingProductFragment } from "@saleor/fragments/products"; +import { channelListingProductWithoutPricingFragment } from "@saleor/fragments/products"; import gql from "graphql-tag"; import { pageInfoFragment } from "./pageInfo"; @@ -24,7 +24,7 @@ export const saleFragment = gql` `; export const saleDetailsFragment = gql` - ${channelListingProductFragment} + ${channelListingProductWithoutPricingFragment} ${pageInfoFragment} ${saleFragment} fragment SaleDetailsFragment on Sale { @@ -42,7 +42,7 @@ export const saleDetailsFragment = gql` url } channelListings { - ...ChannelListingProductFragment + ...ChannelListingProductWithoutPricingFragment } } } @@ -117,7 +117,7 @@ export const voucherFragment = gql` export const voucherDetailsFragment = gql` ${pageInfoFragment} ${voucherFragment} - ${channelListingProductFragment} + ${channelListingProductWithoutPricingFragment} fragment VoucherDetailsFragment on Voucher { ...VoucherFragment type @@ -139,7 +139,7 @@ export const voucherDetailsFragment = gql` url } channelListings { - ...ChannelListingProductFragment + ...ChannelListingProductWithoutPricingFragment } } } diff --git a/src/fragments/products.ts b/src/fragments/products.ts index 2fcf26522..a80e34b41 100644 --- a/src/fragments/products.ts +++ b/src/fragments/products.ts @@ -23,6 +23,22 @@ export const fragmentMoney = gql` } `; +export const priceRangeFragment = gql` + ${fragmentMoney} + fragment PriceRangeFragment on TaxedMoneyRange { + start { + net { + ...Money + } + } + stop { + net { + ...Money + } + } + } +`; + export const fragmentProductImage = gql` fragment ProductImageFragment on ProductImage { id @@ -32,14 +48,10 @@ export const fragmentProductImage = gql` } `; -export const channelListingProductFragment = gql` - ${fragmentMoney} - fragment ChannelListingProductFragment on ProductChannelListing { +export const channelListingProductWithoutPricingFragment = gql` + fragment ChannelListingProductWithoutPricingFragment on ProductChannelListing { isPublished publicationDate - discountedPrice { - ...Money - } isAvailableForPurchase availableForPurchase visibleInListings @@ -50,6 +62,18 @@ export const channelListingProductFragment = gql` } } `; +export const channelListingProductFragment = gql` + ${priceRangeFragment} + ${channelListingProductWithoutPricingFragment} + fragment ChannelListingProductFragment on ProductChannelListing { + ...ChannelListingProductWithoutPricingFragment + pricing { + priceRange { + ...PriceRangeFragment + } + } + } +`; export const channelListingProductVariantFragment = gql` ${fragmentMoney} @@ -128,8 +152,10 @@ export const productVariantAttributesFragment = gql` name currencyCode } - discountedPrice { - ...Money + pricing { + priceRange { + ...PriceRangeFragment + } } } } @@ -253,8 +279,10 @@ export const fragmentVariant = gql` name currencyCode } - discountedPrice { - ...Money + pricing { + priceRange { + ...PriceRangeFragment + } } } variants { diff --git a/src/fragments/types/CategoryTranslationUpdateFragment.ts b/src/fragments/types/CategoryTranslationUpdateFragment.ts deleted file mode 100644 index f065f15c6..000000000 --- a/src/fragments/types/CategoryTranslationUpdateFragment.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CategoryTranslationUpdateFragment -// ==================================================== - -export interface CategoryTranslationUpdateFragment_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CategoryTranslationUpdateFragment_translation { - __typename: "CategoryTranslation"; - id: string; - descriptionJson: any; - language: CategoryTranslationUpdateFragment_translation_language; - name: string; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CategoryTranslationUpdateFragment { - __typename: "Category"; - id: string; - name: string; - descriptionJson: any; - seoDescription: string | null; - seoTitle: string | null; - translation: CategoryTranslationUpdateFragment_translation | null; -} diff --git a/src/fragments/types/ChannelListingAvailabilityFragment.ts b/src/fragments/types/ChannelListingAvailabilityFragment.ts deleted file mode 100644 index 1e2e43cec..000000000 --- a/src/fragments/types/ChannelListingAvailabilityFragment.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ChannelListingAvailabilityFragment -// ==================================================== - -export interface ChannelListingAvailabilityFragment_channel { - __typename: "Channel"; - id: string; - name: string; -} - -export interface ChannelListingAvailabilityFragment { - __typename: "ProductChannelListing"; - isPublished: boolean; - publicationDate: any | null; - channel: ChannelListingAvailabilityFragment_channel; -} diff --git a/src/fragments/types/ChannelListingProductFragment.ts b/src/fragments/types/ChannelListingProductFragment.ts index 584e6ed7c..cc536af19 100644 --- a/src/fragments/types/ChannelListingProductFragment.ts +++ b/src/fragments/types/ChannelListingProductFragment.ts @@ -6,12 +6,6 @@ // GraphQL fragment: ChannelListingProductFragment // ==================================================== -export interface ChannelListingProductFragment_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ChannelListingProductFragment_channel { __typename: "Channel"; id: string; @@ -19,13 +13,46 @@ export interface ChannelListingProductFragment_channel { currencyCode: string; } +export interface ChannelListingProductFragment_pricing_priceRange_start_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ChannelListingProductFragment_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ChannelListingProductFragment_pricing_priceRange_start_net; +} + +export interface ChannelListingProductFragment_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ChannelListingProductFragment_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ChannelListingProductFragment_pricing_priceRange_stop_net; +} + +export interface ChannelListingProductFragment_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ChannelListingProductFragment_pricing_priceRange_start | null; + stop: ChannelListingProductFragment_pricing_priceRange_stop | null; +} + +export interface ChannelListingProductFragment_pricing { + __typename: "ProductPricingInfo"; + priceRange: ChannelListingProductFragment_pricing_priceRange | null; +} + export interface ChannelListingProductFragment { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: ChannelListingProductFragment_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; channel: ChannelListingProductFragment_channel; + pricing: ChannelListingProductFragment_pricing | null; } diff --git a/src/fragments/types/ChannelListingProductWithoutPricingFragment.ts b/src/fragments/types/ChannelListingProductWithoutPricingFragment.ts new file mode 100644 index 000000000..7f5321849 --- /dev/null +++ b/src/fragments/types/ChannelListingProductWithoutPricingFragment.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL fragment: ChannelListingProductWithoutPricingFragment +// ==================================================== + +export interface ChannelListingProductWithoutPricingFragment_channel { + __typename: "Channel"; + id: string; + name: string; + currencyCode: string; +} + +export interface ChannelListingProductWithoutPricingFragment { + __typename: "ProductChannelListing"; + isPublished: boolean; + publicationDate: any | null; + isAvailableForPurchase: boolean | null; + availableForPurchase: any | null; + visibleInListings: boolean; + channel: ChannelListingProductWithoutPricingFragment_channel; +} diff --git a/src/fragments/types/CollectionProductFragment.ts b/src/fragments/types/CollectionProductFragment.ts index 98e85959f..5034b5fd8 100644 --- a/src/fragments/types/CollectionProductFragment.ts +++ b/src/fragments/types/CollectionProductFragment.ts @@ -17,12 +17,6 @@ export interface CollectionProductFragment_thumbnail { url: string; } -export interface CollectionProductFragment_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface CollectionProductFragment_channelListings_channel { __typename: "Channel"; id: string; @@ -34,7 +28,6 @@ export interface CollectionProductFragment_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: CollectionProductFragment_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/fragments/types/CollectionTranslationUpdateFragment.ts b/src/fragments/types/CollectionTranslationUpdateFragment.ts deleted file mode 100644 index 7b5ab4f2d..000000000 --- a/src/fragments/types/CollectionTranslationUpdateFragment.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: CollectionTranslationUpdateFragment -// ==================================================== - -export interface CollectionTranslationUpdateFragment_translation_language { - __typename: "LanguageDisplay"; - language: string; -} - -export interface CollectionTranslationUpdateFragment_translation { - __typename: "CollectionTranslation"; - id: string; - descriptionJson: any; - language: CollectionTranslationUpdateFragment_translation_language; - name: string; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface CollectionTranslationUpdateFragment { - __typename: "Collection"; - id: string; - name: string; - descriptionJson: any; - seoDescription: string | null; - seoTitle: string | null; - translation: CollectionTranslationUpdateFragment_translation | null; -} diff --git a/src/fragments/types/Metadata.ts b/src/fragments/types/Metadata.ts deleted file mode 100644 index 27a384243..000000000 --- a/src/fragments/types/Metadata.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: Metadata -// ==================================================== - -export interface Metadata_metadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface Metadata_privateMetadata { - __typename: "MetadataItem"; - key: string; - value: string; -} - -export interface Metadata { - __typename: "ServiceAccount" | "App" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice"; - metadata: (Metadata_metadata | null)[]; - privateMetadata: (Metadata_privateMetadata | null)[]; -} diff --git a/src/fragments/types/PageTranslationUpdateFragment.ts b/src/fragments/types/PageTranslationUpdateFragment.ts deleted file mode 100644 index e801e2430..000000000 --- a/src/fragments/types/PageTranslationUpdateFragment.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: PageTranslationUpdateFragment -// ==================================================== - -export interface PageTranslationUpdateFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface PageTranslationUpdateFragment_translation { - __typename: "PageTranslation"; - id: string; - contentJson: any; - seoDescription: string | null; - seoTitle: string | null; - title: string; - language: PageTranslationUpdateFragment_translation_language; -} - -export interface PageTranslationUpdateFragment { - __typename: "Page"; - id: string; - contentJson: any; - seoDescription: string | null; - seoTitle: string | null; - title: string; - translation: PageTranslationUpdateFragment_translation | null; -} diff --git a/src/fragments/types/PriceRangeFragment.ts b/src/fragments/types/PriceRangeFragment.ts new file mode 100644 index 000000000..6a697c8c9 --- /dev/null +++ b/src/fragments/types/PriceRangeFragment.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL fragment: PriceRangeFragment +// ==================================================== + +export interface PriceRangeFragment_start_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface PriceRangeFragment_start { + __typename: "TaxedMoney"; + net: PriceRangeFragment_start_net; +} + +export interface PriceRangeFragment_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface PriceRangeFragment_stop { + __typename: "TaxedMoney"; + net: PriceRangeFragment_stop_net; +} + +export interface PriceRangeFragment { + __typename: "TaxedMoneyRange"; + start: PriceRangeFragment_start | null; + stop: PriceRangeFragment_stop | null; +} diff --git a/src/fragments/types/Product.ts b/src/fragments/types/Product.ts index c9fecf583..897ebdd24 100644 --- a/src/fragments/types/Product.ts +++ b/src/fragments/types/Product.ts @@ -74,16 +74,43 @@ export interface Product_channelListings_channel { currencyCode: string; } -export interface Product_channelListings_discountedPrice { +export interface Product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface Product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: Product_channelListings_pricing_priceRange_start_net; +} + +export interface Product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface Product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: Product_channelListings_pricing_priceRange_stop_net; +} + +export interface Product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: Product_channelListings_pricing_priceRange_start | null; + stop: Product_channelListings_pricing_priceRange_stop | null; +} + +export interface Product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: Product_channelListings_pricing_priceRange | null; +} + export interface Product_channelListings { __typename: "ProductChannelListing"; channel: Product_channelListings_channel; - discountedPrice: Product_channelListings_discountedPrice | null; + pricing: Product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/fragments/types/ProductFragment.ts b/src/fragments/types/ProductFragment.ts index e3a996d00..0299b1fa9 100644 --- a/src/fragments/types/ProductFragment.ts +++ b/src/fragments/types/ProductFragment.ts @@ -18,12 +18,6 @@ export interface ProductFragment_productType { hasVariants: boolean; } -export interface ProductFragment_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductFragment_channelListings_channel { __typename: "Channel"; id: string; @@ -31,15 +25,48 @@ export interface ProductFragment_channelListings_channel { currencyCode: string; } +export interface ProductFragment_channelListings_pricing_priceRange_start_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductFragment_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductFragment_channelListings_pricing_priceRange_start_net; +} + +export interface ProductFragment_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductFragment_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductFragment_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductFragment_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductFragment_channelListings_pricing_priceRange_start | null; + stop: ProductFragment_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductFragment_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductFragment_channelListings_pricing_priceRange | null; +} + export interface ProductFragment_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: ProductFragment_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; channel: ProductFragment_channelListings_channel; + pricing: ProductFragment_channelListings_pricing | null; } export interface ProductFragment { diff --git a/src/fragments/types/ProductTranslationUpdateFragment.ts b/src/fragments/types/ProductTranslationUpdateFragment.ts deleted file mode 100644 index 96abef4b2..000000000 --- a/src/fragments/types/ProductTranslationUpdateFragment.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: ProductTranslationUpdateFragment -// ==================================================== - -export interface ProductTranslationUpdateFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface ProductTranslationUpdateFragment_translation { - __typename: "ProductTranslation"; - id: string; - descriptionJson: any; - language: ProductTranslationUpdateFragment_translation_language; - name: string; - seoDescription: string | null; - seoTitle: string | null; -} - -export interface ProductTranslationUpdateFragment { - __typename: "Product"; - id: string; - name: string; - descriptionJson: any; - seoDescription: string | null; - seoTitle: string | null; - translation: ProductTranslationUpdateFragment_translation | null; -} diff --git a/src/fragments/types/ProductTypeTranslationFragment.ts b/src/fragments/types/ProductTypeTranslationFragment.ts deleted file mode 100644 index ba108edb8..000000000 --- a/src/fragments/types/ProductTypeTranslationFragment.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL fragment: ProductTypeTranslationFragment -// ==================================================== - -export interface ProductTypeTranslationFragment_product_productType_productAttributes_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface ProductTypeTranslationFragment_product_productType_productAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - translation: ProductTypeTranslationFragment_product_productType_productAttributes_translation | null; -} - -export interface ProductTypeTranslationFragment_product_productType_variantAttributes_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface ProductTypeTranslationFragment_product_productType_variantAttributes { - __typename: "Attribute"; - id: string; - name: string | null; - translation: ProductTypeTranslationFragment_product_productType_variantAttributes_translation | null; -} - -export interface ProductTypeTranslationFragment_product_productType { - __typename: "ProductType"; - id: string; - name: string; - productAttributes: (ProductTypeTranslationFragment_product_productType_productAttributes | null)[] | null; - variantAttributes: (ProductTypeTranslationFragment_product_productType_variantAttributes | null)[] | null; -} - -export interface ProductTypeTranslationFragment_product { - __typename: "Product"; - productType: ProductTypeTranslationFragment_product_productType; -} - -export interface ProductTypeTranslationFragment { - __typename: "ProductTranslatableContent"; - product: ProductTypeTranslationFragment_product | null; -} diff --git a/src/fragments/types/ProductVariant.ts b/src/fragments/types/ProductVariant.ts index b02a1d6c9..6f1ecdba1 100644 --- a/src/fragments/types/ProductVariant.ts +++ b/src/fragments/types/ProductVariant.ts @@ -80,16 +80,43 @@ export interface ProductVariant_product_channelListings_channel { currencyCode: string; } -export interface ProductVariant_product_channelListings_discountedPrice { +export interface ProductVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductVariant_product_channelListings_pricing_priceRange_start | null; + stop: ProductVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductVariant_product_channelListings_pricing_priceRange | null; +} + export interface ProductVariant_product_channelListings { __typename: "ProductChannelListing"; channel: ProductVariant_product_channelListings_channel; - discountedPrice: ProductVariant_product_channelListings_discountedPrice | null; + pricing: ProductVariant_product_channelListings_pricing | null; } export interface ProductVariant_product_variants_images { diff --git a/src/fragments/types/ProductVariantAttributesFragment.ts b/src/fragments/types/ProductVariantAttributesFragment.ts index f2e0dbbcb..d05a0ce61 100644 --- a/src/fragments/types/ProductVariantAttributesFragment.ts +++ b/src/fragments/types/ProductVariantAttributesFragment.ts @@ -65,16 +65,43 @@ export interface ProductVariantAttributesFragment_channelListings_channel { currencyCode: string; } -export interface ProductVariantAttributesFragment_channelListings_discountedPrice { +export interface ProductVariantAttributesFragment_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductVariantAttributesFragment_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductVariantAttributesFragment_channelListings_pricing_priceRange_start_net; +} + +export interface ProductVariantAttributesFragment_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariantAttributesFragment_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductVariantAttributesFragment_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductVariantAttributesFragment_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductVariantAttributesFragment_channelListings_pricing_priceRange_start | null; + stop: ProductVariantAttributesFragment_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductVariantAttributesFragment_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductVariantAttributesFragment_channelListings_pricing_priceRange | null; +} + export interface ProductVariantAttributesFragment_channelListings { __typename: "ProductChannelListing"; channel: ProductVariantAttributesFragment_channelListings_channel; - discountedPrice: ProductVariantAttributesFragment_channelListings_discountedPrice | null; + pricing: ProductVariantAttributesFragment_channelListings_pricing | null; } export interface ProductVariantAttributesFragment { diff --git a/src/fragments/types/SaleDetailsFragment.ts b/src/fragments/types/SaleDetailsFragment.ts index 728593a8e..aa40c604d 100644 --- a/src/fragments/types/SaleDetailsFragment.ts +++ b/src/fragments/types/SaleDetailsFragment.ts @@ -34,12 +34,6 @@ export interface SaleDetailsFragment_products_edges_node_thumbnail { url: string; } -export interface SaleDetailsFragment_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface SaleDetailsFragment_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -51,7 +45,6 @@ export interface SaleDetailsFragment_products_edges_node_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: SaleDetailsFragment_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/fragments/types/SaleTranslationUpdateFragment.ts b/src/fragments/types/SaleTranslationUpdateFragment.ts deleted file mode 100644 index 1ebf86144..000000000 --- a/src/fragments/types/SaleTranslationUpdateFragment.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: SaleTranslationUpdateFragment -// ==================================================== - -export interface SaleTranslationUpdateFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface SaleTranslationUpdateFragment_translation { - __typename: "SaleTranslation"; - id: string; - language: SaleTranslationUpdateFragment_translation_language; - name: string | null; -} - -export interface SaleTranslationUpdateFragment { - __typename: "Sale"; - id: string; - name: string; - translation: SaleTranslationUpdateFragment_translation | null; -} diff --git a/src/fragments/types/VoucherDetailsFragment.ts b/src/fragments/types/VoucherDetailsFragment.ts index b92280532..d5b2ee5ff 100644 --- a/src/fragments/types/VoucherDetailsFragment.ts +++ b/src/fragments/types/VoucherDetailsFragment.ts @@ -47,12 +47,6 @@ export interface VoucherDetailsFragment_products_edges_node_thumbnail { url: string; } -export interface VoucherDetailsFragment_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface VoucherDetailsFragment_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -64,7 +58,6 @@ export interface VoucherDetailsFragment_products_edges_node_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: VoucherDetailsFragment_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; diff --git a/src/fragments/types/VoucherTranslationUpdateFragment.ts b/src/fragments/types/VoucherTranslationUpdateFragment.ts deleted file mode 100644 index c4a3f7341..000000000 --- a/src/fragments/types/VoucherTranslationUpdateFragment.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL fragment: VoucherTranslationUpdateFragment -// ==================================================== - -export interface VoucherTranslationUpdateFragment_translation_language { - __typename: "LanguageDisplay"; - code: LanguageCodeEnum; - language: string; -} - -export interface VoucherTranslationUpdateFragment_translation { - __typename: "VoucherTranslation"; - id: string; - language: VoucherTranslationUpdateFragment_translation_language; - name: string | null; -} - -export interface VoucherTranslationUpdateFragment { - __typename: "Voucher"; - id: string; - name: string | null; - translation: VoucherTranslationUpdateFragment_translation | null; -} diff --git a/src/home/fixtures.ts b/src/home/fixtures.ts index 321c06a00..f23aacdbd 100644 --- a/src/home/fixtures.ts +++ b/src/home/fixtures.ts @@ -324,11 +324,6 @@ export const shop: (placeholderImage: string) => Home = ( id: "UHJvZHVjdFZhcmlhbnQ6NDM=", product: { __typename: "Product", - basePrice: { - __typename: "Money", - amount: 37.65, - currency: "USD" - }, id: "UHJvZHVjdDo4", name: "Gardner-Martin", thumbnail: { diff --git a/src/products/components/ProductCreatePage/form.tsx b/src/products/components/ProductCreatePage/form.tsx index 356c99548..11e4152e1 100644 --- a/src/products/components/ProductCreatePage/form.tsx +++ b/src/products/components/ProductCreatePage/form.tsx @@ -37,7 +37,6 @@ import { import { ProductStockInput } from "../ProductStocks"; export interface ProductCreateFormData extends MetadataFormData { - basePrice: number; category: string; changeTaxCode: boolean; channelListings: ChannelData[]; @@ -126,7 +125,6 @@ function useProductCreateForm( ): UseProductCreateFormResult { const defaultInitialFormData: ProductCreateFormData & Record<"productType", string> = { - basePrice: 0, category: "", changeTaxCode: false, channelListings: opts.currentChannels, diff --git a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx index 603e2afc8..da39c93f7 100644 --- a/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx +++ b/src/products/components/ProductDetailsForm/ProductDetailsForm.tsx @@ -4,6 +4,7 @@ import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; import CardTitle from "@saleor/components/CardTitle"; import FormSpacer from "@saleor/components/FormSpacer"; +import Grid from "@saleor/components/Grid"; import Hr from "@saleor/components/Hr"; import RichTextEditor, { RichTextEditorChange @@ -72,19 +73,21 @@ export const ProductDetailsForm: React.FC = ({ />
- + + + ); diff --git a/src/products/components/ProductList/ProductList.tsx b/src/products/components/ProductList/ProductList.tsx index 68c3df67b..8d0367910 100644 --- a/src/products/components/ProductList/ProductList.tsx +++ b/src/products/components/ProductList/ProductList.tsx @@ -6,7 +6,7 @@ import TableRow from "@material-ui/core/TableRow"; import Typography from "@material-ui/core/Typography"; import { ChannelsAvailabilityDropdown } from "@saleor/components/ChannelsAvailabilityDropdown"; import Checkbox from "@saleor/components/Checkbox"; -import Money from "@saleor/components/Money"; +import MoneyRange from "@saleor/components/MoneyRange"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableCellAvatar, { @@ -400,7 +400,10 @@ export const ProductList: React.FC = props => { > {product?.channelListings ? ( - + ) : ( )} diff --git a/src/products/components/ProductUpdatePage/form.tsx b/src/products/components/ProductUpdatePage/form.tsx index 048151149..104e4e478 100644 --- a/src/products/components/ProductUpdatePage/form.tsx +++ b/src/products/components/ProductUpdatePage/form.tsx @@ -39,7 +39,6 @@ import { ProductAttributeInput } from "../ProductAttributes"; import { ProductStockInput } from "../ProductStocks"; export interface ProductUpdateFormData extends MetadataFormData { - basePrice: number; category: string | null; changeTaxCode: boolean; channelListings: ChannelData[]; diff --git a/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx b/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx index ac44f9042..361eabb60 100644 --- a/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx +++ b/src/products/components/ProductVariantCreatorPage/ProductVariantCreator.stories.tsx @@ -26,7 +26,7 @@ const selectedWarehouses = [0, 1, 3].map(index => warehouseList[index]); const channels: ChannelPrice[] = productChannels.map(channel => ({ channelId: channel.channel.id, - price: channel.discountedPrice.amount.toString() + price: channel.pricing?.priceRange?.start?.net.amount.toString() })); const price: Price = { @@ -87,10 +87,10 @@ const data: ProductVariantCreateFormData = { const props: ProductVariantCreatorContentProps = { attributes: [0, 1, 4, 6].map(index => attributes[index]), channelListings: productChannels.map(listing => ({ - currency: listing.discountedPrice.currency, + currency: listing.pricing?.priceRange?.start?.net.currency, id: listing.channel.id, name: listing.channel.name, - price: listing.discountedPrice?.amount.toString() || "" + price: listing.pricing?.priceRange?.start?.net?.amount.toString() || "" })), data: { ...data, diff --git a/src/products/fixtures.ts b/src/products/fixtures.ts index c9b1d018b..e740ac9fd 100644 --- a/src/products/fixtures.ts +++ b/src/products/fixtures.ts @@ -98,12 +98,6 @@ export const product: ( } ], availableForPurchase: null, - basePrice: { - __typename: "Money" as "Money", - amount: 339.39, - currency: "NZD", - localized: "339.39 NZD" - }, category: { __typename: "Category", id: "Q2F0ZWdvcnk6MQ==", @@ -119,13 +113,30 @@ export const product: ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -138,13 +149,30 @@ export const product: ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -416,13 +444,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -435,13 +480,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -472,13 +534,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -491,13 +570,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -528,13 +624,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -547,13 +660,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -599,13 +729,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -618,13 +765,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -670,13 +834,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -689,13 +870,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -741,13 +939,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -761,13 +976,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -813,13 +1045,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -832,13 +1081,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -884,13 +1150,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -903,13 +1186,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -955,13 +1255,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -974,13 +1291,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1026,13 +1360,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -1045,13 +1396,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -1097,13 +1465,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -1116,13 +1501,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1168,13 +1570,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -1187,13 +1606,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1239,13 +1675,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -1258,13 +1711,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1310,13 +1780,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -1329,13 +1816,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -1381,13 +1885,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -1400,13 +1921,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -1452,13 +1990,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -1471,13 +2026,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1523,13 +2095,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: false }, @@ -1542,13 +2131,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: false } @@ -1594,13 +2200,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -1613,13 +2236,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 3.99, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1665,13 +2305,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -1684,13 +2341,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1736,13 +2410,30 @@ export const products = ( id: "123", name: "Channel1" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: true, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-14", visibleInListings: true }, @@ -1755,13 +2446,30 @@ export const products = ( id: "124", name: "Channel2" }, - discountedPrice: { - __typename: "Money", - amount: 1, - currency: "USD" - }, isAvailableForPurchase: false, isPublished: false, + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } + }, publicationDate: "2020-07-30", visibleInListings: true } @@ -1944,10 +2652,27 @@ export const variant = (placeholderImage: string): ProductVariant => ({ id: "test1", name: "Test channel" }, - discountedPrice: { - __typename: "Money", - amount: 10, - currency: "USD" + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } } }, { @@ -1958,10 +2683,27 @@ export const variant = (placeholderImage: string): ProductVariant => ({ id: "test2", name: "Test channel other" }, - discountedPrice: { - __typename: "Money", - amount: 20, - currency: "USD" + pricing: { + __typename: "ProductPricingInfo", + priceRange: { + __typename: "TaxedMoneyRange", + start: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 1.2, + currency: "USD" + } + }, + stop: { + __typename: "TaxedMoney", + net: { + __typename: "Money", + amount: 3.5, + currency: "USD" + } + } + } } } ], diff --git a/src/products/types/CreateMultipleVariantsData.ts b/src/products/types/CreateMultipleVariantsData.ts index 1d3f7a8b5..cc073ea5a 100644 --- a/src/products/types/CreateMultipleVariantsData.ts +++ b/src/products/types/CreateMultipleVariantsData.ts @@ -65,16 +65,43 @@ export interface CreateMultipleVariantsData_product_channelListings_channel { currencyCode: string; } -export interface CreateMultipleVariantsData_product_channelListings_discountedPrice { +export interface CreateMultipleVariantsData_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface CreateMultipleVariantsData_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: CreateMultipleVariantsData_product_channelListings_pricing_priceRange_start_net; +} + +export interface CreateMultipleVariantsData_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface CreateMultipleVariantsData_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: CreateMultipleVariantsData_product_channelListings_pricing_priceRange_stop_net; +} + +export interface CreateMultipleVariantsData_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: CreateMultipleVariantsData_product_channelListings_pricing_priceRange_start | null; + stop: CreateMultipleVariantsData_product_channelListings_pricing_priceRange_stop | null; +} + +export interface CreateMultipleVariantsData_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: CreateMultipleVariantsData_product_channelListings_pricing_priceRange | null; +} + export interface CreateMultipleVariantsData_product_channelListings { __typename: "ProductChannelListing"; channel: CreateMultipleVariantsData_product_channelListings_channel; - discountedPrice: CreateMultipleVariantsData_product_channelListings_discountedPrice | null; + pricing: CreateMultipleVariantsData_product_channelListings_pricing | null; } export interface CreateMultipleVariantsData_product { diff --git a/src/products/types/ProductChannelListingUpdate.ts b/src/products/types/ProductChannelListingUpdate.ts index 267909c36..680658fc9 100644 --- a/src/products/types/ProductChannelListingUpdate.ts +++ b/src/products/types/ProductChannelListingUpdate.ts @@ -74,16 +74,43 @@ export interface ProductChannelListingUpdate_productChannelListingUpdate_product currencyCode: string; } -export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_discountedPrice { +export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_start | null; + stop: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing_priceRange | null; +} + export interface ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings { __typename: "ProductChannelListing"; channel: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_channel; - discountedPrice: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_discountedPrice | null; + pricing: ProductChannelListingUpdate_productChannelListingUpdate_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/ProductCreate.ts b/src/products/types/ProductCreate.ts index c1104b07b..a00567b09 100644 --- a/src/products/types/ProductCreate.ts +++ b/src/products/types/ProductCreate.ts @@ -81,16 +81,43 @@ export interface ProductCreate_productCreate_product_channelListings_channel { currencyCode: string; } -export interface ProductCreate_productCreate_product_channelListings_discountedPrice { +export interface ProductCreate_productCreate_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductCreate_productCreate_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductCreate_productCreate_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductCreate_productCreate_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductCreate_productCreate_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductCreate_productCreate_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductCreate_productCreate_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductCreate_productCreate_product_channelListings_pricing_priceRange_start | null; + stop: ProductCreate_productCreate_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductCreate_productCreate_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductCreate_productCreate_product_channelListings_pricing_priceRange | null; +} + export interface ProductCreate_productCreate_product_channelListings { __typename: "ProductChannelListing"; channel: ProductCreate_productCreate_product_channelListings_channel; - discountedPrice: ProductCreate_productCreate_product_channelListings_discountedPrice | null; + pricing: ProductCreate_productCreate_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/ProductDetails.ts b/src/products/types/ProductDetails.ts index b30b22b83..4a9320a5e 100644 --- a/src/products/types/ProductDetails.ts +++ b/src/products/types/ProductDetails.ts @@ -74,16 +74,43 @@ export interface ProductDetails_product_channelListings_channel { currencyCode: string; } -export interface ProductDetails_product_channelListings_discountedPrice { +export interface ProductDetails_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductDetails_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductDetails_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductDetails_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductDetails_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductDetails_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductDetails_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductDetails_product_channelListings_pricing_priceRange_start | null; + stop: ProductDetails_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductDetails_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductDetails_product_channelListings_pricing_priceRange | null; +} + export interface ProductDetails_product_channelListings { __typename: "ProductChannelListing"; channel: ProductDetails_product_channelListings_channel; - discountedPrice: ProductDetails_product_channelListings_discountedPrice | null; + pricing: ProductDetails_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/ProductImageCreate.ts b/src/products/types/ProductImageCreate.ts index 7c4ee1b69..8f8112e85 100644 --- a/src/products/types/ProductImageCreate.ts +++ b/src/products/types/ProductImageCreate.ts @@ -80,16 +80,43 @@ export interface ProductImageCreate_productImageCreate_product_channelListings_c currencyCode: string; } -export interface ProductImageCreate_productImageCreate_product_channelListings_discountedPrice { +export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_start | null; + stop: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductImageCreate_productImageCreate_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductImageCreate_productImageCreate_product_channelListings_pricing_priceRange | null; +} + export interface ProductImageCreate_productImageCreate_product_channelListings { __typename: "ProductChannelListing"; channel: ProductImageCreate_productImageCreate_product_channelListings_channel; - discountedPrice: ProductImageCreate_productImageCreate_product_channelListings_discountedPrice | null; + pricing: ProductImageCreate_productImageCreate_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/ProductImageUpdate.ts b/src/products/types/ProductImageUpdate.ts index 5d0d5a32c..e930253a0 100644 --- a/src/products/types/ProductImageUpdate.ts +++ b/src/products/types/ProductImageUpdate.ts @@ -80,16 +80,43 @@ export interface ProductImageUpdate_productImageUpdate_product_channelListings_c currencyCode: string; } -export interface ProductImageUpdate_productImageUpdate_product_channelListings_discountedPrice { +export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_start | null; + stop: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductImageUpdate_productImageUpdate_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductImageUpdate_productImageUpdate_product_channelListings_pricing_priceRange | null; +} + export interface ProductImageUpdate_productImageUpdate_product_channelListings { __typename: "ProductChannelListing"; channel: ProductImageUpdate_productImageUpdate_product_channelListings_channel; - discountedPrice: ProductImageUpdate_productImageUpdate_product_channelListings_discountedPrice | null; + pricing: ProductImageUpdate_productImageUpdate_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/ProductList.ts b/src/products/types/ProductList.ts index 7dd42074a..cc5993ff3 100644 --- a/src/products/types/ProductList.ts +++ b/src/products/types/ProductList.ts @@ -20,12 +20,6 @@ export interface ProductList_products_edges_node_productType { hasVariants: boolean; } -export interface ProductList_products_edges_node_channelListings_discountedPrice { - __typename: "Money"; - amount: number; - currency: string; -} - export interface ProductList_products_edges_node_channelListings_channel { __typename: "Channel"; id: string; @@ -33,15 +27,48 @@ export interface ProductList_products_edges_node_channelListings_channel { currencyCode: string; } +export interface ProductList_products_edges_node_channelListings_pricing_priceRange_start_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductList_products_edges_node_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductList_products_edges_node_channelListings_pricing_priceRange_start_net; +} + +export interface ProductList_products_edges_node_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductList_products_edges_node_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductList_products_edges_node_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductList_products_edges_node_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductList_products_edges_node_channelListings_pricing_priceRange_start | null; + stop: ProductList_products_edges_node_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductList_products_edges_node_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductList_products_edges_node_channelListings_pricing_priceRange | null; +} + export interface ProductList_products_edges_node_channelListings { __typename: "ProductChannelListing"; isPublished: boolean; publicationDate: any | null; - discountedPrice: ProductList_products_edges_node_channelListings_discountedPrice | null; isAvailableForPurchase: boolean | null; availableForPurchase: any | null; visibleInListings: boolean; channel: ProductList_products_edges_node_channelListings_channel; + pricing: ProductList_products_edges_node_channelListings_pricing | null; } export interface ProductList_products_edges_node_attributes_attribute { diff --git a/src/products/types/ProductUpdate.ts b/src/products/types/ProductUpdate.ts index 273518f1e..e10d20cd1 100644 --- a/src/products/types/ProductUpdate.ts +++ b/src/products/types/ProductUpdate.ts @@ -81,16 +81,43 @@ export interface ProductUpdate_productUpdate_product_channelListings_channel { currencyCode: string; } -export interface ProductUpdate_productUpdate_product_channelListings_discountedPrice { +export interface ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductUpdate_productUpdate_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start | null; + stop: ProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductUpdate_productUpdate_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductUpdate_productUpdate_product_channelListings_pricing_priceRange | null; +} + export interface ProductUpdate_productUpdate_product_channelListings { __typename: "ProductChannelListing"; channel: ProductUpdate_productUpdate_product_channelListings_channel; - discountedPrice: ProductUpdate_productUpdate_product_channelListings_discountedPrice | null; + pricing: ProductUpdate_productUpdate_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/ProductVariantChannelListingUpdate.ts b/src/products/types/ProductVariantChannelListingUpdate.ts index 5addf30e6..1041e7cd4 100644 --- a/src/products/types/ProductVariantChannelListingUpdate.ts +++ b/src/products/types/ProductVariantChannelListingUpdate.ts @@ -80,16 +80,43 @@ export interface ProductVariantChannelListingUpdate_productVariantChannelListing currencyCode: string; } -export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_discountedPrice { +export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_start | null; + stop: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing_priceRange | null; +} + export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings { __typename: "ProductChannelListing"; channel: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_channel; - discountedPrice: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_discountedPrice | null; + pricing: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing | null; } export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_variants_images { diff --git a/src/products/types/ProductVariantDetails.ts b/src/products/types/ProductVariantDetails.ts index 25e72981e..132ffc40f 100644 --- a/src/products/types/ProductVariantDetails.ts +++ b/src/products/types/ProductVariantDetails.ts @@ -80,16 +80,43 @@ export interface ProductVariantDetails_productVariant_product_channelListings_ch currencyCode: string; } -export interface ProductVariantDetails_productVariant_product_channelListings_discountedPrice { +export interface ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductVariantDetails_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductVariantDetails_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface ProductVariantDetails_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: ProductVariantDetails_productVariant_product_channelListings_channel; - discountedPrice: ProductVariantDetails_productVariant_product_channelListings_discountedPrice | null; + pricing: ProductVariantDetails_productVariant_product_channelListings_pricing | null; } export interface ProductVariantDetails_productVariant_product_variants_images { diff --git a/src/products/types/ProductVariantReorder.ts b/src/products/types/ProductVariantReorder.ts index 2a255249e..53e2a1deb 100644 --- a/src/products/types/ProductVariantReorder.ts +++ b/src/products/types/ProductVariantReorder.ts @@ -80,16 +80,43 @@ export interface ProductVariantReorder_productVariantReorder_product_channelList currencyCode: string; } -export interface ProductVariantReorder_productVariantReorder_product_channelListings_discountedPrice { +export interface ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_start | null; + stop: ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductVariantReorder_productVariantReorder_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductVariantReorder_productVariantReorder_product_channelListings_pricing_priceRange | null; +} + export interface ProductVariantReorder_productVariantReorder_product_channelListings { __typename: "ProductChannelListing"; channel: ProductVariantReorder_productVariantReorder_product_channelListings_channel; - discountedPrice: ProductVariantReorder_productVariantReorder_product_channelListings_discountedPrice | null; + pricing: ProductVariantReorder_productVariantReorder_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/ProductVariantSetDefault.ts b/src/products/types/ProductVariantSetDefault.ts index 76505e034..dd94f3d0e 100644 --- a/src/products/types/ProductVariantSetDefault.ts +++ b/src/products/types/ProductVariantSetDefault.ts @@ -80,16 +80,43 @@ export interface ProductVariantSetDefault_productVariantSetDefault_product_chann currencyCode: string; } -export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings_discountedPrice { +export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_start_net; +} + +export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_stop_net; +} + +export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_start | null; + stop: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange_stop | null; +} + +export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing_priceRange | null; +} + export interface ProductVariantSetDefault_productVariantSetDefault_product_channelListings { __typename: "ProductChannelListing"; channel: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_channel; - discountedPrice: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_discountedPrice | null; + pricing: ProductVariantSetDefault_productVariantSetDefault_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; diff --git a/src/products/types/SimpleProductUpdate.ts b/src/products/types/SimpleProductUpdate.ts index bd50129c4..3fe444359 100644 --- a/src/products/types/SimpleProductUpdate.ts +++ b/src/products/types/SimpleProductUpdate.ts @@ -81,16 +81,43 @@ export interface SimpleProductUpdate_productUpdate_product_channelListings_chann currencyCode: string; } -export interface SimpleProductUpdate_productUpdate_product_channelListings_discountedPrice { +export interface SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start_net; +} + +export interface SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop_net; +} + +export interface SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_start | null; + stop: SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange_stop | null; +} + +export interface SimpleProductUpdate_productUpdate_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: SimpleProductUpdate_productUpdate_product_channelListings_pricing_priceRange | null; +} + export interface SimpleProductUpdate_productUpdate_product_channelListings { __typename: "ProductChannelListing"; channel: SimpleProductUpdate_productUpdate_product_channelListings_channel; - discountedPrice: SimpleProductUpdate_productUpdate_product_channelListings_discountedPrice | null; + pricing: SimpleProductUpdate_productUpdate_product_channelListings_pricing | null; isPublished: boolean; publicationDate: any | null; isAvailableForPurchase: boolean | null; @@ -308,16 +335,43 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_product currencyCode: string; } -export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_discountedPrice { +export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_channel; - discountedPrice: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_discountedPrice | null; + pricing: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing | null; } export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_variants_images { @@ -492,16 +546,43 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_p currencyCode: string; } -export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_discountedPrice { +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_channel; - discountedPrice: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_discountedPrice | null; + pricing: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing | null; } export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants_images { @@ -675,16 +756,43 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_p currencyCode: string; } -export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_discountedPrice { +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_channel; - discountedPrice: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_discountedPrice | null; + pricing: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing | null; } export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants_images { @@ -859,16 +967,43 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_p currencyCode: string; } -export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_discountedPrice { +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_channel; - discountedPrice: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_discountedPrice | null; + pricing: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing | null; } export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants_images { diff --git a/src/products/types/VariantCreate.ts b/src/products/types/VariantCreate.ts index a0b50a9d5..e3605b6fe 100644 --- a/src/products/types/VariantCreate.ts +++ b/src/products/types/VariantCreate.ts @@ -87,16 +87,43 @@ export interface VariantCreate_productVariantCreate_productVariant_product_chann currencyCode: string; } -export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_discountedPrice { +export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface VariantCreate_productVariantCreate_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: VariantCreate_productVariantCreate_productVariant_product_channelListings_channel; - discountedPrice: VariantCreate_productVariantCreate_productVariant_product_channelListings_discountedPrice | null; + pricing: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing | null; } export interface VariantCreate_productVariantCreate_productVariant_product_variants_images { diff --git a/src/products/types/VariantImageAssign.ts b/src/products/types/VariantImageAssign.ts index baf4917ca..278b8c467 100644 --- a/src/products/types/VariantImageAssign.ts +++ b/src/products/types/VariantImageAssign.ts @@ -86,16 +86,43 @@ export interface VariantImageAssign_variantImageAssign_productVariant_product_ch currencyCode: string; } -export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_discountedPrice { +export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_channel; - discountedPrice: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_discountedPrice | null; + pricing: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing | null; } export interface VariantImageAssign_variantImageAssign_productVariant_product_variants_images { diff --git a/src/products/types/VariantImageUnassign.ts b/src/products/types/VariantImageUnassign.ts index c55630f1f..b480a6912 100644 --- a/src/products/types/VariantImageUnassign.ts +++ b/src/products/types/VariantImageUnassign.ts @@ -86,16 +86,43 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant_produc currencyCode: string; } -export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_discountedPrice { +export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_channel; - discountedPrice: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_discountedPrice | null; + pricing: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing | null; } export interface VariantImageUnassign_variantImageUnassign_productVariant_product_variants_images { diff --git a/src/products/types/VariantUpdate.ts b/src/products/types/VariantUpdate.ts index 3c18b6acc..a0ddb1769 100644 --- a/src/products/types/VariantUpdate.ts +++ b/src/products/types/VariantUpdate.ts @@ -87,16 +87,43 @@ export interface VariantUpdate_productVariantUpdate_productVariant_product_chann currencyCode: string; } -export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_discountedPrice { +export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface VariantUpdate_productVariantUpdate_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_channel; - discountedPrice: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_discountedPrice | null; + pricing: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing | null; } export interface VariantUpdate_productVariantUpdate_productVariant_product_variants_images { @@ -271,16 +298,43 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant_product currencyCode: string; } -export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_discountedPrice { +export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start_net { __typename: "Money"; amount: number; currency: string; } +export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start { + __typename: "TaxedMoney"; + net: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start_net; +} + +export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net { + __typename: "Money"; + amount: number; + currency: string; +} + +export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop { + __typename: "TaxedMoney"; + net: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop_net; +} + +export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange { + __typename: "TaxedMoneyRange"; + start: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_start | null; + stop: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange_stop | null; +} + +export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing { + __typename: "ProductPricingInfo"; + priceRange: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing_priceRange | null; +} + export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings { __typename: "ProductChannelListing"; channel: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_channel; - discountedPrice: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_discountedPrice | null; + pricing: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing | null; } export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_variants_images { diff --git a/src/products/types/productBulkPublish.ts b/src/products/types/productBulkPublish.ts deleted file mode 100644 index f34853adc..000000000 --- a/src/products/types/productBulkPublish.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: productBulkPublish -// ==================================================== - -export interface productBulkPublish_productBulkPublish_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; -} - -export interface productBulkPublish_productBulkPublish { - __typename: "ProductBulkPublish"; - errors: productBulkPublish_productBulkPublish_errors[]; -} - -export interface productBulkPublish { - productBulkPublish: productBulkPublish_productBulkPublish | null; -} - -export interface productBulkPublishVariables { - ids: string[]; -} diff --git a/src/products/utils/data.ts b/src/products/utils/data.ts index e342e3da8..0c8fd7626 100644 --- a/src/products/utils/data.ts +++ b/src/products/utils/data.ts @@ -169,7 +169,6 @@ export function getChoices(nodes: Node[]): SingleAutocompleteChoiceType[] { } export interface ProductUpdatePageFormData extends MetadataFormData { - basePrice: number; category: string | null; changeTaxCode: boolean; channelListings: ChannelData[]; @@ -193,10 +192,6 @@ export function getProductUpdatePageFormData( currentChannels: ChannelData[] ): ProductUpdatePageFormData { return { - basePrice: maybe( - () => product.channelListings[0].discountedPrice.amount, - 0 - ), category: maybe(() => product.category.id, ""), changeTaxCode: !!product?.taxType.taxCode, channelListings: currentChannels, diff --git a/src/searches/types/SearchServiceAccount.ts b/src/searches/types/SearchServiceAccount.ts deleted file mode 100644 index 33c63466c..000000000 --- a/src/searches/types/SearchServiceAccount.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -// ==================================================== -// GraphQL query operation: SearchServiceAccount -// ==================================================== - -export interface SearchServiceAccount_search_edges_node { - __typename: "ServiceAccount"; - id: string; - name: string | null; -} - -export interface SearchServiceAccount_search_edges { - __typename: "ServiceAccountCountableEdge"; - node: SearchServiceAccount_search_edges_node; -} - -export interface SearchServiceAccount_search_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface SearchServiceAccount_search { - __typename: "ServiceAccountCountableConnection"; - edges: SearchServiceAccount_search_edges[]; - pageInfo: SearchServiceAccount_search_pageInfo; -} - -export interface SearchServiceAccount { - search: SearchServiceAccount_search | null; -} - -export interface SearchServiceAccountVariables { - after?: string | null; - first: number; - query: string; -} diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 01c46c153..3dc9cf9ae 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -40998,7 +40998,7 @@ exports[`Storyshots Views / Categories / Update category products 1`] = ` - $1.00 + $30.10 - $44.90
-
- - +
@@ -153207,38 +153211,42 @@ exports[`Storyshots Views / Products / Create product default 1`] = ` class="FormSpacer-spacer-id" />
-
- - +
@@ -154238,38 +154246,42 @@ exports[`Storyshots Views / Products / Create product form errors 1`] = ` class="FormSpacer-spacer-id" />
-
- - +
@@ -160491,38 +160503,42 @@ exports[`Storyshots Views / Products / Product edit form errors 1`] = ` class="FormSpacer-spacer-id" />
-
- - +
@@ -162264,38 +162280,42 @@ exports[`Storyshots Views / Products / Product edit no product attributes 1`] = class="FormSpacer-spacer-id" />
-
- - +
@@ -163768,38 +163788,42 @@ exports[`Storyshots Views / Products / Product edit no stock and no variants 1`] class="FormSpacer-spacer-id" />
-
- - +
@@ -165509,38 +165533,42 @@ exports[`Storyshots Views / Products / Product edit no stock, no variants and no class="FormSpacer-spacer-id" />
-
- - +
@@ -167187,38 +167215,42 @@ exports[`Storyshots Views / Products / Product edit no variants 1`] = ` class="FormSpacer-spacer-id" />
-
- - +
@@ -169062,38 +169094,42 @@ exports[`Storyshots Views / Products / Product edit when data is fully loaded 1` class="FormSpacer-spacer-id" />
-
- - +
@@ -170831,39 +170867,43 @@ exports[`Storyshots Views / Products / Product edit when loading data 1`] = ` class="FormSpacer-spacer-id" />
-
- - +
@@ -171838,38 +171878,42 @@ exports[`Storyshots Views / Products / Product edit when product has no images 1 class="FormSpacer-spacer-id" />
-
- - +
@@ -173557,38 +173601,42 @@ exports[`Storyshots Views / Products / Product edit when product has no variants class="FormSpacer-spacer-id" />
-
- - +
@@ -175432,38 +175480,42 @@ exports[`Storyshots Views / Products / Product edit with channels 1`] = ` class="FormSpacer-spacer-id" />
-
- - +
@@ -178324,7 +178376,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = ` - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 @@ -184089,7 +184141,7 @@ exports[`Storyshots Views / Products / Product list with data 1`] = ` - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $3.99 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 - $1.00 + $1.20 - $3.50 diff --git a/src/storybook/stories/products/ProductUpdatePage.tsx b/src/storybook/stories/products/ProductUpdatePage.tsx index 6465ee047..2259779ae 100644 --- a/src/storybook/stories/products/ProductUpdatePage.tsx +++ b/src/storybook/stories/products/ProductUpdatePage.tsx @@ -155,7 +155,6 @@ storiesOf("Views / Products / Product edit", module) {...props} errors={([ "attributes", - "basePrice", "category", "chargeTaxes", "collections", diff --git a/src/translations/types/ProductTypeTranslationDetails.ts b/src/translations/types/ProductTypeTranslationDetails.ts deleted file mode 100644 index adac08508..000000000 --- a/src/translations/types/ProductTypeTranslationDetails.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductTypeTranslationDetails -// ==================================================== - -export interface ProductTypeTranslationDetails_translation_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface ProductTypeTranslationDetails_translation_AttributeTranslatableContent_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface ProductTypeTranslationDetails_translation_AttributeTranslatableContent_attribute_values_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; -} - -export interface ProductTypeTranslationDetails_translation_AttributeTranslatableContent_attribute_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - translation: ProductTypeTranslationDetails_translation_AttributeTranslatableContent_attribute_values_translation | null; -} - -export interface ProductTypeTranslationDetails_translation_AttributeTranslatableContent_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - values: (ProductTypeTranslationDetails_translation_AttributeTranslatableContent_attribute_values | null)[] | null; -} - -export interface ProductTypeTranslationDetails_translation_AttributeTranslatableContent { - __typename: "AttributeTranslatableContent"; - translation: ProductTypeTranslationDetails_translation_AttributeTranslatableContent_translation | null; - attribute: ProductTypeTranslationDetails_translation_AttributeTranslatableContent_attribute | null; -} - -export type ProductTypeTranslationDetails_translation = ProductTypeTranslationDetails_translation_ProductTranslatableContent | ProductTypeTranslationDetails_translation_AttributeTranslatableContent; - -export interface ProductTypeTranslationDetails { - translation: ProductTypeTranslationDetails_translation | null; -} - -export interface ProductTypeTranslationDetailsVariables { - id: string; - language: LanguageCodeEnum; -} diff --git a/src/translations/types/ProductTypeTranslations.ts b/src/translations/types/ProductTypeTranslations.ts deleted file mode 100644 index fe2c34717..000000000 --- a/src/translations/types/ProductTypeTranslations.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { LanguageCodeEnum } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL query operation: ProductTypeTranslations -// ==================================================== - -export interface ProductTypeTranslations_translations_edges_node_ProductTranslatableContent { - __typename: "ProductTranslatableContent" | "CollectionTranslatableContent" | "CategoryTranslatableContent" | "AttributeValueTranslatableContent" | "ProductVariantTranslatableContent" | "PageTranslatableContent" | "ShippingMethodTranslatableContent" | "SaleTranslatableContent" | "VoucherTranslatableContent" | "MenuItemTranslatableContent"; -} - -export interface ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_translation { - __typename: "AttributeTranslation"; - id: string; - name: string; -} - -export interface ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_attribute_values_translation { - __typename: "AttributeValueTranslation"; - id: string; - name: string; -} - -export interface ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_attribute_values { - __typename: "AttributeValue"; - id: string; - name: string | null; - translation: ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_attribute_values_translation | null; -} - -export interface ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_attribute { - __typename: "Attribute"; - id: string; - name: string | null; - values: (ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_attribute_values | null)[] | null; -} - -export interface ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent { - __typename: "AttributeTranslatableContent"; - translation: ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_translation | null; - attribute: ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent_attribute | null; -} - -export type ProductTypeTranslations_translations_edges_node = ProductTypeTranslations_translations_edges_node_ProductTranslatableContent | ProductTypeTranslations_translations_edges_node_AttributeTranslatableContent; - -export interface ProductTypeTranslations_translations_edges { - __typename: "TranslatableItemEdge"; - node: ProductTypeTranslations_translations_edges_node; -} - -export interface ProductTypeTranslations_translations_pageInfo { - __typename: "PageInfo"; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - startCursor: string | null; -} - -export interface ProductTypeTranslations_translations { - __typename: "TranslatableItemConnection"; - edges: ProductTypeTranslations_translations_edges[]; - pageInfo: ProductTypeTranslations_translations_pageInfo; -} - -export interface ProductTypeTranslations { - translations: ProductTypeTranslations_translations | null; -} - -export interface ProductTypeTranslationsVariables { - language: LanguageCodeEnum; - first?: number | null; - after?: string | null; - last?: number | null; - before?: string | null; -} diff --git a/src/utils/errors/app.ts b/src/utils/errors/app.ts index 074dd49e1..5208c8b0f 100644 --- a/src/utils/errors/app.ts +++ b/src/utils/errors/app.ts @@ -1,4 +1,4 @@ -import { AppErrorFragment } from "@saleor/apps/types/AppErrorFragment"; +import { AppErrorFragment } from "@saleor/fragments/types/AppErrorFragment"; import { commonMessages } from "@saleor/intl"; import { AppErrorCode } from "@saleor/types/globalTypes"; import { defineMessages, IntlShape } from "react-intl";